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,900
Movement extraction by detecting dynamics switches and repetitions Silvia Chiappa Statistical Laboratory Wilberforce Road, Cambridge, UK silvia@statslab.cam.ac.uk Jan Peters Max Planck Institute for Biological Cybernetics Spemannstrasse 38, Tuebingen, Germany jan.peters@tuebingen.mpg.de Abstract Many time-series such as human movement data consist of a sequence of basic actions, e.g., forehands and backhands in tennis. Automatically extracting and characterizing such actions is an important problem for a variety of different applications. In this paper, we present a probabilistic segmentation approach in which an observed time-series is modeled as a concatenation of segments corresponding to different basic actions. Each segment is generated through a noisy transformation of one of a few hidden trajectories representing different types of movement, with possible time re-scaling. We analyze three different approximation methods for dealing with model intractability, and demonstrate how the proposed approach can successfully segment table tennis movements recorded using a robot arm as haptic input device. 1 Introduction Motion capture systems have become widespread in many application areas such as robotics [18], physical therapy, sports sciences [10], virtual reality [15], artificial movie generation [13], computer games [1], etc. These systems are used for extracting the movement templates characterizing basic actions contained in their recordings. In physical therapy and sports sciences, these templates are employed to analyze patient’s progress or sports professional’s movements; in robotics, virtual reality, movie generation or computer games, they become the basic elements for composing complex actions. In order to obtain the movement templates, boundaries between actions need to be detected. Furthermore, fundamental similarities and differences in the dynamics underlying different actions need to be captured. For example, in a recording from a game of table tennis, observations corresponding to different actions can differ, due to different goals for hitting the ball, racket speeds, desired ball interaction, etc. The system needs to determine whether this dissimilarity corresponds to substantially diverse types of underlying movements (such as in the case of a forehand and a backhand), or not (such as in the case of two forehands that differ only in speed). To date, most approaches addressed the problem by using considerable manual interaction [16]; an important advancement would be to develop an automatic method that requires little human intervention. In this paper, we present a probabilistic model in which actions are assumed to arise from noisy transformations of a small set of hidden trajectories, each representing a different movement template, with non-linear time re-scaling accounting for differences in action durations. Action boundaries are explicitly modeled through a set of discrete random variables. Segmentation is obtained by inferring, at each time-step, the position of the observations in the current action and the underlying movement template. To guide segmentation, we impose constraints on the minimum and maximum duration that each action can have. 1 75 67 68 61 94 56 53 53 51 Observations 64 73 97 Hidden dynamics (a) · · · σt−1 σt σt+1 · · · zt−1 zt zt+1 vt−1 vt vt+1 h1:S 1:M (b) Figure 1: (a) The hidden dynamics shown on the top layer are assumed to generate the time-series at the bottom. (b) Belief network representation of the proposed segmentation model. Rectangular nodes indicate discrete variables, while (filled) oval nodes indicate (observed) continuous variables. We apply the model to a human game of table tennis recorded with a Barrett WAM used as a haptic input device, and show that we can obtain a meaningful segmentation of the time-series. 2 The Segmentation Model In the proposed segmentation approach, the observations originate from a set of continuous-valued hidden trajectories, each representing a different movement template. Specifically, we assume that the observed time-series consists of a concatenation of segments (basic actions), each generated through a noisy transformation of one of the hidden trajectories, with possible time re-scaling. This generation process is illustrated in Figure 1 (a), where the observations on the lower graph are generated from the three underlying hidden trajectories on the upper graph. Time re-scaling happens during the generation process, e.g., the first hidden trajectory of length 97 gives rise to three segments of length 75, 68 and 94 respectively. The observed time-series and the S hidden trajectories are represented by the continuous random variables1 v1:T ≡v1, . . . , vT (vt ∈ℜV ) and h1:S 1:M ≡h1 1:M, . . . , hS 1:M (hi m ∈ℜH), respectively. Furthermore, we introduce two sets of discrete random variables σ1:T and z1:T . The first set is used to infer which movement template generated the observations at each time-step, to detect action boundaries, and to define hard constraints on the minimum and maximum duration of each observed action. The second set is used to model time re-scaling from the hidden trajectories to the observations. We assume that the joint distribution of these variables factorizes as follows p(h1:S 1:M) Y t p(vt|h1:S 1:M, zt, σt)p(zt|zt−1, σt−1:t)p(σt|σt−1). These independence relations are graphically represented by the belief network of Figure 1 (b). The variable σt is a triple σt = {st, dt, ct} with a similar role as in regime-switching models with explicit regime-duration distribution (ERDMs) [4]. The variable st ∈{1, . . . , S} indicates which of the S hidden trajectories underlies the observations at time t. The duration variables dt specifies the time interval spanned by the observations forming the current action, and takes a value between dmin and dmax. The count variable ct indicates the time distance to the beginning of the next action, taking value ct = dt and ct = 1 respectively at the beginning and end of an action. More specifically, we define p(σt|σt−1) = p(ct|dt, ct−1)p(dt|dt−1, ct−1)p(st|st−1, ct−1) with2 1For the sake of notational simplicity, we describe the model for the case of a single observed time-series and hidden trajectories of the same length M. 2We assume c0 = 1, cT = 1. For t = 1, p(s1) = ˜πs1, p(d1) = ρd1, p(c1|d1) = δ(c1 =d1). 2 p(st|st−1, ct−1) = πst,st−1 if ct−1 =1, δ(st =st−1) if ct−1 >1, p(dt|dt−1, ct−1) = ρdt if ct−1 =1, δ(dt =dt−1) if ct−1 >1, p(ct|dt, ct−1) = δ(ct =dt) if ct−1 =1, δ(ct =ct−1−1) if ct−1 >1, where δ(x = y) = 1 if x = y and δ(x = y) = 0 if x ̸= y, π is a matrix specifying the time-invariant dynamics-switching distribution, and ρ is a vector defining the action-duration distribution. The variable zt indicates which of the M elements in the hidden trajectory generated the observations vt. We define p(zt|zt−1, σt−1:t) = p(zt|zt−1, dt, ct−1:t) with p(zt|zt−1, dt, ct−1:t) = ( ˜ψdt,ct zt if ct−1 =1, ψdt,ct zt,zt−1 if ct−1 >1. The vector ˜ψdt,ct and the matrix ψdt,ct encode two constraints3. First, zt −zt−1 ∈{1, . . . , wmax} ensures that subsequent observations are generated by subsequent elements of the hidden trajectory and imposes a limit on the magnitude of time-warping. Second, zt ∈{dt −ct + 1, . . . , M −ct + 1} accounts for the dt −ct and ct −1 observations preceding and following vt in the action. Table 1: Model’s Generation Mechanism for i = 1, . . . , S do generate hidden trajectory i hi 1 ∼N(µi, Σi) hi m =F ihi m−1 + ηh m, ηh m ∼N(0, Σi H) set t= 1 for action a = 1, . . . , A do sample a dynamics type st ∼π:,st−1 sample a duration dt ∼ρ mark the beginning of the action ct = dt while ct ≥1 do sample time-warping zt ∼ψdt,ct :,zt−1 generate the observations vt =Gsthst zt + λdt,t+ct−1 + ηv t ηv t ∼N(0, Σst V ) t = t + 1 if ct−1 > 1 do st =st−1, dt =dt−1, ct =ct−1−1 The hidden trajectories follow independent linear Markovian dynamics with Gaussian noise, that is p(hi m|hi m−1) = N(F ihi m−1, Σi H), hi 1 ∼N(µi, Σi). Finally, the observations are generated from a linear transformation of the hidden variables with Gaussian noise p(vt|h1:S 1:M, zt, σt) = N(Gsthst zt + λdt,t+ct−1, Σst V ), where the term λdt,t+ct−1 is common to all observations belonging to the same action and allows for spatial translation. The generative process underlying the model is described in detail in4 Table 1. The set Θ of unknown model parameters is given by {F 1:S, G1:S, Σ1:S H , Σ1:S V , µ1:S, Σ1:S, π, ˜π, ρ, ψ, ˜ψ, λ}. After learning Θ, we can sample a segmentation from p(σ1:T |v1:T ) or compute the most likely segmentation σ∗ 1:T = arg maxσ1:T p(σ1:T |v1:T )5. Relation to previous models. From a modeling point of view, the presented method builds on previous approaches that consider the observed time-series as time-warped transformations of one or several continuous-valued hidden trajectories. In [11], the authors introduced a model in which different time-series are assumed to be generated by a single continuous-valued latent trace, with spatial and time re-scaling. This model was used to align speech sequences. In [6], a modified version of such a model was employed in the domain of helicopter flight to learn a desired trajectory from demonstrations. In [12] and [14], the authors considered the case in which each time-series is generated by one of a set of different hidden trajectories. None of these models can deal with the situation in which possibly different dynamics underlie different segments of the same time-series. From an application point of view, previous segmentation systems for extracting basic movements employed considerable human intervention [16]. On the other hand, automatic probabilistic methods for modeling movement templates assumed that the time-series data was pre-segmented into basic movements [5, 17]. 3In the experiments we added the additional constraint that nearly complete movements are observed, that is zt−dt+ct ∈{1, . . . , ι}, zt+ct−1 ∈{ϵ, . . . , M} (see the Appendix for more details). 4With π:,st−1 we indicate the vector of transition probabilities from dynamics type st−1 to any dynamics. 5Due to space limitations, we describe only how to sample a segmentation, which is required in the Gibbs sampling method. 3 3 Inference and Learning The interaction between the continuous and discrete hidden variables renders the computation of the posterior distributions required for learning and sampling a segmentation intractable. In this section, we present and analyze three different approximation methods for dealing with this problem. In the first (variational) method, p(h1:S 1:M, z1:T , σ1:T |v1:T , Θ) is approximated with a simpler distribution q, and the optimal q and Θ are found by maximizing a tractable lower bound on the log-likelihood using an Expectation-Maximization (EM) approach. In the second (maximum a posteriori) method, we estimate the most likely set of hidden trajectories and Θ by maximizing p(h1:S 1:M, v1:T |Θ) using an EM approach. In the third (Gibbs sampling) method, we use stochastic EM [3] with Gibbs sampling. 3.1 Variational Method In the variational approximation, we introduce a distribution q in which the problematic dependence between the hidden dynamics and the segmentation and time-warping variables is relaxed, that is6 q(h1:S 1:M, z1:T , σ1:T ) = q(h1:S 1:M)q(z1:T |σ1:T )q(σ1:T ) . From the Kullback-Leibler divergence between this distribution and the original posterior distribution we obtain a tractable lower bound on the log-likelihood log p(v1:T |Θ), given by B(q, Θ) = Hq(h1:S 1:M) + ⟨Hq(z1:T |σ1:T )⟩q(σ1:T ) + Hq(σ1:T ) + ⟨log p(v1:T |h1:S 1:M, z1:T , σ1:T , Θ)⟩q(h1:S 1:M)q(z1:T |σ1:T )q(σ1:T ) + ⟨log p(z1:T |σ1:T , Θ)⟩q(z1:T |σ1:T )q(σ1:T ) + ⟨log p(σ1:T |Θ)⟩q(σ1:T ) + log p(h1:S 1:M|Θ) q(h1:S 1:M) , where ⟨·⟩q denotes expectation with respect to q, and Hq denotes the entropy of q. We then use a variational EM algorithm in which B(q, Θ) is iteratively maximized with respect to q and the model parameters Θ until convergence7. Maximization with respect to q leads to the following updates q(h1:S 1:M) ∝p(h1:S 1:M)e⟨log p(v1:T |h1:S 1:M,z1:T ,σ1:T )⟩q(z1:T |σ1:T )q(σ1:T ) , (1) q(σ1:T ) ∝p(σ1:T )eHq(z1:T |σ1:T )e⟨log p(v1:T ,z1:T |h1:S 1:M,σ1:T )⟩q(h1:S 1:M )q(z1:T |σ1:T ) , (2) q(z1:T |σ1:T ) ∝p(z1:T |σ1:T )e⟨log p(v1:T |h1:S 1:M,z1:T ,σ1:T )⟩q(h1:S 1:M ) . (3) Before describing how to perform inference on these distributions, we observe that all quantities required for learning Θ, sampling a segmentation, and updating q(h1:S 1:M) can be formulated such that only partial inference on q(σ1:T ) and q(z1:T |σ1:T ) is required. For example, we can write log p(v1:T |h1:S 1:M, z1:T , σ1:T ) q(z1:T ,σ1:T ) = X t,i,k γi,k,1 t X τ,m ξi,k,t,m τ log p(vτ|hi m, zτ =m, σi,k,1 t ), (4) with γi,k,1 t = q(σi,k,1 t ), ξi,k,t,m τ = q(zτ = m|σi,k,1 t ), σi,k,1 t = {st = i, dt = k, ct = 1}. Thus, only posteriors for which the count variables take value 1 are required8. Inference on q(h1:S 1:M). We first notice that, by using (4) in (1), we obtain q(h1:S 1:M) = Q i q(hi 1:M). We then observe that we can rewrite the update for q(hi 1:M) as proportional to the joint distribution of the following linear gaussian state-space model (LGSSM) hi m = F ihi m−1 + ηh m, ηh m ∼N(0, Σi H), hi 1 ∼N(µi, Σi), ˆvi m = Gihi m + ηv m, ηv m ∼N(0, ˆΣi V,m), 6Conditioning on v1:T in q is omitted for notational simplicity. 7Maximization with respect to Θ is omitted due to space limitations. 8This is common to ERDMs using separate duration and count variables [4]. 4 where ˆvi m ≡1/ai m X t,k γi,k,1 t t X τ=t−k+1 ξi,k,t,m τ vτ, ˆΣi V,m ≡1/ai mΣi V , ai m ≡ X t,k γi,k,1 t t X τ=t−k+1 ξi,k,t,m τ . Therefore, inference on q(h1:S 1:M) can be accomplished with LGSSM smoothing routines [7]. Inference on q(σ1:T ). By substituting update (3) (including the normalization constant) into update (2), we obtain q(σ1:T ) ∝q(v1:T |σ1:T )p(σ1:T ). This update has the form of the joint distribution of an ERDM using separate duration and count variables [4]. Therefore, we can employ similar forward-backward recursions. More specifically γi,k,1 t = q(σi,k,1 t ) = q(vt+1:T |st = j, ct = 1)q(σi,k,1 t , v1:t)/q(v1:T ) = βi,1 t αi,k,1 t /q(v1:T ), where αi,k,1 t = q(vt−k+1:t|σi,k,1 t ) X jl p(σi,k,1 t |σj,l,1 t−k ) | {z } ρkπi,j αj,l,1 t−k , βj,1 t = X i,k q(vt+1:t+k|σi,k,1 t+k )πi,jβi,1 t+kρk. Since we have imposed the constraints c0 = 1, cT = 1, we need to replace terms such as p(dt = k, ct = 1|ct−k = 1) = ρk with p(dt = k, ct = 1|ct−k = 1, c0 = 1, cT = 1). The constraint cT = 1 implies q(v1:T ) = P j,l αj,l,1 T . Required terms such as q(vt−k+1:t|σi,k,1 t ) can be computed as likelihood terms when performing inference on q(zt−k+1:t|σi,k,1 t ). Inference on q(z1:T |σ1:T ). The form of update (3) implies that inference on distributions of the type q(zt−k+1:t|σi,k,1 t ) can be accomplished with forward-backward routines similar to the ones used in hidden Markov models (HMMs). Sampling a segmentation. A segmentation can be sampled by using the factorization q(σ1:T |v1:T ) = q(σT |v1:T ) QT −1 t=1 q(σt|σt+1, v1:T ), with q(σt|σt+1, v1:T ) = p(σt+1|σt)q(vt+1|σt+1)ασt t  βσt+1 t+1 ασt+1 t+1  βσt+1 t+1 . Suppose that, at time t, ct = 1 and we have sampled dynamics type st = i and duration dt = k. Then, σt−k+1:t−1 and ct−k are determined by the model assumptions9, so that we effectively need to sample st−k, dt−k from the distribution q(st−k, dt−k, ct−k = 1|σt−k+1, v1:T ), which is given by ρkπi,:q(vt−k+1:t|σt)α:,:,1 t−k/αi,k,1 t , since q(vt−k+2:t|σt−k+2:t)αi,k,k t−k+1 = αi,k,1 t . 3.2 Maximum a Posteriori (MAP) Method Instead of approximating the posterior distribution of all hidden variables, we can approximate only p(h1:S 1:M|v1:T ) with a deterministic distribution, by using the variational method described above in which q(hi m) is a Dirac delta around its mean. Notice that this is equivalent to compute the most likely set of hidden trajectories and parameters by maximizing the joint distribution p(v1:T , h1:S 1:M|Θ) with respect to h1:S 1:M and Θ using an EM algorithm. 3.3 Gibbs Sampling Method In our stochastic EM approach with Gibbs sampling, the expectation of the complete-data loglikelihood L(Θ) is approximated by L(Θ) ≈ PN n=1 log p(v1:T , ˆzn 1:T , ˆσn 1:T , ˆh1:S,n 1:M |Θ), where ˆzn 1:T , ˆσn 1:T , ˆh1:S,n 1:M are samples drawn from p(h1:S 1:M, z1:T , σ1:T |v1:T ). Such samples can be obtained by iterative drawing from the tractable conditionals p(z1:T , σ1:T |h1:S 1:M, v1:T ) and p(h1:S 1:M|z1:T , σ1:T , v1:T ). 9The values of c1:T −1 are automatically determined if cT and d1:T are given. 5 Time-series 1 Time-series 2 Time-series 3 Time-series 4 Time-series 5 Correct Seg. 1 24 42 66 89 1 23 46 63 1 23 40 63 1 22 47 68 1 24 42 65 88 105 1 17 39 62 82 1 23 46 64 1 21 39 62 1 23 47 68 1 18 42 65 82 100 Variational 1 17 39 63 82 1 18 42 63 1 22 38 62 1 22 47 66 1 18 42 65 82 99 Approx. 1 17 38 62 81 1 18 42 63 1 17 38 60 87 1 9 23 31 60 66 1 6 12 42 58 76 83 100 1 14 39 63 79 1 22 45 63 1 23 38 62 1 9 23 31 46 67 1 11 18 42 60 85 102 1 20 40 64 85 1 23 46 62 1 21 40 64 1 22 47 69 1 18 40 55 65 82 97 MAP 1 19 40 64 84 1 23 46 62 1 21 40 63 1 22 47 68 1 18 42 64 82 98 Approx. 1 17 39 63 82 1 23 46 62 1 22 40 65 1 22 47 68 1 18 42 65 82 96 1 20 40 64 85 1 23 46 63 1 22 40 63 1 15 20 45 67 1 11 19 40 60 85 102 1 17 39 63 82 1 18 36 56 1 23 38 62 1 14 24 38 63 1 16 44 71 97 Gibbs Sampling 1 22 41 64 88 1 20 42 60 1 16 35 61 82 1 14 24 38 63 1 16 40 63 80 102 Approx. 1 17 40 65 81 1 9 23 47 63 71 1 17 40 64 84 1 9 22 32 47 68 1 22 44 63 89 104 1 17 40 64 82 1 21 47 62 1 17 37 60 86 1 9 23 31 52 74 1 7 13 21 31 58 71 101 114 Table 2: Segmentations given by the variational, MAP and Gibbs sampling methods on 5 artificial time-series. In order to sample from p(z1:T , σ1:T |h1:S 1:M, v1:T ), we can first sample a segmentation from p(σ1:T |h1:S 1:M, v1:T ) employing the method described above (with q(·) replaced by p(·|h1:S 1:M, v1:T )), and then use a HMM forward-filtering backward-sampling method for sampling from p(z1:T |σ1:T , h1:S 1:M, v1:T ). Finally, sampling from p(h1:S 1:M|z1:T , σ1:T , v1:T ) may be carried out using the forward-filtering backward-sampling procedure described in [8]. 3.4 Comparison of the Approximation Methods In this section, we compare the performance of the approximation methods presented above on 5 artificially generated time-series. Each time-series (with V=2 or V=3) contains repeated occurrences of actions arising from the noisy transformation of up to three hidden trajectories with time-warping. In the second row of Table 2, we give the correct segmentation for each time-series. Each number indicates the time-step at which a new action starts, whilst the colors indicate the types of dynamics underlying the actions. In the rows below, we give the segmentations obtained by each approximation method with 4 different initial random conditions (with minimum and maximum action duration between 5 and 30). From the results, we can deduce that Gibbs sampling performs considerably worse than the deterministic approaches. Between the variational and MAP methods, the latter is preferable and gives a good solution in most cases. The poor performance of Gibbs sampling can be explained by the fact that this method cannot deal well with high correlation between h1:S 1:M and σ1:T , z1:T . The continuous hidden variables are sampled given a single set of segmentation and time-warping variables (unlike update (1) in which we average over segmentation and time-warping variables), which may result in poor mixing. The inferior performance of the variational method in comparison to the MAP method would seem to suggest that the posterior covariances of the continuous hidden variables cannot accurately be estimated. 4 Table Tennis Recordings using a Robot Arm In this section, we show how the proposed model performs in segmenting time-series obtained from table tennis recordings using a robot arm moved by a human. The generic goal is to extract movement templates to be used for robot imitation learning [2, 9]. Here, kinesthetic teach-in can be advantageous in order to avoid the correspondence problem. We used the Barrett WAM robot arm shown in Figure 2 as a haptic input device for recording and replaying movements. We recorded a game of table tennis where a human moved the robot arm making the typical moves occurring in this specific setup. These naturally include forehands, going into an awaiting posture for a forehand, backhands, and going into an awaiting posture for a backhand. They also include smashes, however, due to the inertia of the robot, they are hard to perform and only occur using the forehand. 6 −2.5 0 2.5 Positions −4.7 0 4.0 Velocities 3 2 7 2 7 2 7 1 5 1 5 1 4 7 2 7 1 5 1 5 6 7 1 5 1 5 6 7 1 5 1 5 6 7 2 7 1 5 1 5 6 7 2 7 1 5 1 5 4 2 7 1 3 1 3 1 5 6 7 Figure 3: This figure shows the first three degrees of freedom (known as flexion-extension, adduction-abduction and humerus rotation) of a robot arm when used by a human as a haptic input device playing table tennis. The upper graph shows the joint positions while the lower one shows the joint velocities. The dashed vertical lines indicate the obtained action boundaries and the numbers the underlying movement templates. This sequence includes moves to the right awaiting posture (1), moves to the left awaiting posture (2), forehands (3, 5), two incomplete moves towards the awaiting posture merged with a backhand (4), moves to the left awaiting posture with humerus rotation (6) and backhands (7). Figure 2: The Barrett WAM used for recording the table tennis sequences. During the experiment the robot is in a gravity compensation and sequences can be replayed on the real system. The recorded time-series contains the joint positions and velocities of all seven degrees of freedom (DoF) of an anthropomorphic arm. However, only the shoulder and upper arm DoF, which are the most significant in such movements, were considered for the analysis. The 1.5 minutes long recording was subsampled at 5 samples per seconds. The minimum and maximum durations dmin and dmax were set to 4 and 15 respectively, as prior knowledge about table tennis would suggest that basic-action durations are within this range. We also imposed the constraint that nearly complete movements are observed (ι = 2, ϵ = M −1). The length of the hidden dynamics M was set to dmax, the variable wmax was set to10 4, and the number of movement templates S was set to 8, as this should be a reasonable upper bound on the number of different underlying movements. Given the results obtained in the previous section, we used the MAP approximation method. We assumed no prior knowledge on the dynamics of the hidden trajectories. However, in a real application of the model we could simplify the problem by incorporating knowledge about previously identified movement templates. As shown in Figure 3, the model segments the time-series into 59 basic movements of forehands (numbers 3, 5), backhands (7), and going into a right (1) and left (2, 6) awaiting posture. In some cases, a more fluid game results in incomplete moves towards an awaiting posture and hence into a composite movement that can no longer be segmented (4). Also, there appear to be two types of moving back to the left awaiting posture: one which needs untwisting of the humerus rotation degree of freedom (6), and another which purely employs shoulder degrees of freedom (2). The action boundaries estimated by the model are in strong agreement with manual visual segmentation, with the exception of movements 4 that should be segmented into two separate movements. At the web-page http://silviac.yolasite.com we provide a visual interpretation of the segmentation from which the model accuracy can be appreciated. 10This is the smallest value that ensures that complete actions can be observed. 7 5 Conclusions In this paper we have introduced a probabilistic model for detecting repeated occurrences of basic movements in time-series data. This model may potentially be applicable in domains such as robotics, sports sciences, physical therapy, virtual reality, artificial movie generation, computer games, etc., for automatic extraction of the movement templates contained in a recording. We have presented an evaluation on table tennis movements that we have recorded using a robot arm as haptic input device, showing that the model is able to accurately segment the time-series into basic movements that could be used for robot imitation learning. Appendix Constraints on z1:T Consider an action starting at time 1 and finishing at time t with the constraints z1 ∈{1, . . . , ι} and zt ∈{ϵ, . . . , M}. Suppose that zτ = m for τ ∈{1, . . . , t −1}. Then it must be 1. m ∈{max[τ, ϵ −(t −τ)wmax], . . . , min[ι + (τ −1)wmax, M −(t −τ)]}. 2. zτ+1 ∈{max[m + 1, ϵ −(t −τ −1)wmax], . . . , min[m + wmax, M −(t −τ −1)]}. Therefore, we need to modify the original priors ˜ψ, ψ with time-dependent priors with zero values outside the appropriate range. References [1] R. Boulic, B. Ulicny, and D. Thalmann. Versatile walk engine. Journal of Game Development, 1(1):29–52, 2004. [2] S. Calinon, F. Guenter, and A. Billard. On learning, representing and generalizing a task in a humanoid robot. IEEE Transactions on Systems, Man and Cybernetics, Part B, 37(2):286–298, 2007. [3] G. Celeux and J. Diebolt. The SEM algorithm: A probabilistic teacher algorithm derived from the EM algorithm for the mixture problem. Computational Statistics Quarterly, 2:73–82, 1985. [4] S. Chiappa. Hidden Markov switching models with explicit regime-duration distribution. Under submission. [5] S. Chiappa, J. Kober, and J. Peters. Using Bayesian dynamical systems for motion template libraries. In Advances in NIPS 21, pages 297–304, 2009. [6] A. Coates, P. Abbeel, and A. Y. Ng. Learning for control from multiple demonstrations. In Proceedings of ICML, pages 144–151, 2008. [7] J. Durbin and S. J. Koopman. Time Series Analysis by State Space Methods. Oxford Univ. Press, 2001. [8] S. Fr¨uhwirth-Schnatter. Data augmentation and dynamic linear models. Journal of Time-Series Analysis, 15:183–202, 1994. [9] A. Ijspeert, J. Nakanishi, and S. Schaal. Learning attractor landscapes for learning motor primitives. In Advances in NIPS 15, pages 1547–1554, 2003. [10] U. Kersting, P. McAlpine, B. Rosenhahn, H. Seidel, and R. Klette. Marker-less human motion tracking opportunities for field testing in sports. Journal of Biomechanics, 39:S191–S191, 2006. [11] J. Listgarten, R. M. Neal, S. T. Roweis, and A. Emili. Multiple alignment of continuous time series. In Advances in NIPS 17, pages 817–824, 2005. [12] J. Listgarten, R. M. Neal, S. T. Roweis, R. Puckrin, and S. Cutler. Bayesian detection of infrequent differences in sets of time series with shared structure. In Advances in NIPS 19, pages 905–912, 2007. [13] R. McDonnell, S. J˙.org, J. K. Hodgins, F. N. Newell, and C. O’Sullivan. Evaluating the effect of motion and body shape on the perceived sex of virtual characters. ACM Transactions on Applied Perception, 5(4), 2009. 8 [14] W. Pan and L. Torresani. Unsupervised hierarchical modeling of locomotion styles. In Proceedings of ICML, 2009. [15] M. Peinado, D. Maupu, D. Raunhardt, D. Meziat, D. Thalmann, and R. Boulic. Full-body avatar control with environment awareness. IEEE Computer Graphics and Applications, 29(3), 2009. [16] W. Takano, K. Yamane, and Y. Nakamura. Capture database through symbolization, recognition and generation of motion patterns. In Proceedings of ICRA, pages 3092–3097, 2007. [17] B. Williams, M. Toussaint, and A. Storkey. Modelling motion primitives and their timing in biologically executed movements. In Advances in NIPS 20, pages 1609–1616, 2008. [18] K. Yamane and J. K. Hodgins. Simultaneous tracking and balancing of humanoid robots for imitating human motion capture data. In Proceedings of IROS, pages 2510–2517, 2009. 9
2010
141
3,901
Exact inference and learning for cumulative distribution functions on loopy graphs Jim C. Huang, Nebojsa Jojic and Christopher Meek Microsoft Research One Microsoft Way, Redmond, WA 98052 Abstract Many problem domains including climatology and epidemiology require models that can capture both heavy-tailed statistics and local dependencies. Specifying such distributions using graphical models for probability density functions (PDFs) generally lead to intractable inference and learning. Cumulative distribution networks (CDNs) provide a means to tractably specify multivariate heavy-tailed models as a product of cumulative distribution functions (CDFs). Existing algorithms for inference and learning in CDNs are limited to those with tree-structured (nonloopy) graphs. In this paper, we develop inference and learning algorithms for CDNs with arbitrary topology. Our approach to inference and learning relies on recursively decomposing the computation of mixed derivatives based on a junction trees over the cumulative distribution functions. We demonstrate that our systematic approach to utilizing the sparsity represented by the junction tree yields significant performance improvements over the general symbolic differentiation programs Mathematica and D*. Using two real-world datasets, we demonstrate that non-tree structured (loopy) CDNs are able to provide significantly better fits to the data as compared to tree-structured and unstructured CDNs and other heavy-tailed multivariate distributions such as the multivariate copula and logistic models. 1 Introduction The last two decades have been marked by significant advances in modeling multivariate probability density functions (PDFs) on graphs. Various inference and learning algorithms have been successfully developed that take advantage of known variable dependence which can be used to simplify computations and avoid overtraining. A major source of difficulty for such algorithms is the need to compute a normalization term, as graphical models generally assume a factorized form for the joint PDF. To make these models tractable, the factors themselves can be chosen to have tractable forms such as Gaussians. Such choices may then make the model unsuitable for many types of data, such as data with heavy-tailed statistics that are a quintessential feature in many application areas such as climatology and epidemiology. Recently, a number of techniques have been proposed to allow for both heavy-tailed/non-Gaussian distributions with a specifiable variable dependence structure. Most of these methods are based on transforming the data to make it more easily modeled by Gaussian PDF-fitting techniques, an example of which is the Gaussian copula [11] parameterized as a CDF defined on nonlinearly transformed variables. In addition to copula models, many non-Gaussian distributions are conveniently parameterized as CDFs [2]. Most existing CDF models, however, do not allow the specification of local dependence structures and thus can only be applied to very low-dimensional problems. Recently, a class of multiplicative CDF models has been proposed as a way of modeling structured CDFs. The cumulative distribution networks (CDNs) model a multivariate CDF as a product over functions, each dependent on a small subset of variables and each having a CDF form [6, 7]. One of the key advantages of this approach is that it eliminates the need to enforce normalization constraints that complicate inference and learning in graphical models of PDFs. An example of a CDN is shown in Figure 1(a), where diamonds correspond to CDN functions and circles represent variables. In a CDN, inference and learning involves computation of derivatives of the joint CDF with respect to model variables and parameters. The graphical model then allows us to efficiently perform inference and learning for non-loopy CDNs using message-passing [6, 8]. Models of this form have 1 been applied to multivariate heavy-tailed data in climatology and epidemiology where they have demonstrated improved predictive performance as compared to several graphical models for PDFs despite the restriction to tree-structured CDNs. Non-loopy CDNs may however be limited models and adding functions to the CDN may provide significantly more expressive models, with the caveat that the resulting CDN may become loopy and previous algorithms for inference and learning in CDNs then cease to be exact. . Our aim in this paper is to provide an effective algorithm for learning and inference in loopy CDNs, thus improving on previous approaches which were limited to CDNs with non-loopy dependencies. In principle, symbolic differentiation algorithms such as Mathematica [16] and D* [4] could be used for inference and learning for loopy CDNs. However, as we demonstrate, such generic algorithms quickly become intractable for larger models. In this paper, we develop the JDiff algorithm which uses the graphical structure to simplify the computation of the derivative and enables both inference and learning for CDNs of arbitrary topology. In addition, we provide an analysis of the time and space complexity of the algorithm and provide experiments comparing JDiff to Mathematica and D*, in which we show that JDiff runs in less time and can handle significantly larger graphs. We also provide an empirical comparison of several methods for modeling multivariate distributions as applied to rainfall data and H1N1 data. We show that loopy CDNs provide significantly better model fits for multivariate heavy-tailed data than non-loopy CDNs. Furthermore, these models outperform models based on Gaussian copulas [11], as well as multivariate heavy tailed models that do not allow for structure specification. 2 Cumulative distribution networks In this section we establish preliminaries about learning and inference for CDNs [6, 7, 8]. Let x be a vector of observed values for random variables in the set 푉and let 푥훼, x퐴denote the observed values for variable node 훼∈푉and variable set 퐴⊆푉. Let 풩(푠) be the set of neighboring variable nodes for function node 푠. Define the operator ∂x퐴[⋅] as the mixed derivative operator with respect to variables in set 퐴. For example, ∂푥1,2,3[퐹(푥1, 푥2, 푥3)] ≡ ∂3퐹 ∂푥1∂푥2∂푥3 . Throughout the paper we will be dealing primarily with continuous random variables and so we will generally deal with PDFs, with probability mass functions (PMFs) as a special case. We also assume in the sequel that all derivatives of a CDF with respect to any and all arguments exist and are continuous and as a result any mixed derivative of the CDF is invariant to the order of differentiation (Schwarz’ theorem). Definition 2.1. The cumulative distribution network (CDN) consists of (1) an undirected bipartite graphical model consisting of a bipartite graph 풢= (푉, 푆, 퐸), where 푉denotes variable nodes and 푆denotes function nodes, with edges in 퐸connecting function nodes to variable nodes and (2) a specification of functions 휙푠(x푠) for each function node 푠∈푆, where x푠≡x풩(푠), ∪푠∈푆풩(푠) = 푉 and each function 휙푠: ℝ∣풩(푠)∣7→[0, 1] satisfies the properties of a CDF. The joint CDF over the variables in the CDN is then given by the product of CDFs 휙푠, or 퐹(x) = ∏ 푠∈푆휙푠(x푠), where each CDF 휙푠is defined over neighboring variable nodes 풩(푠). □ For example, in the CDN of Figure 1(a), each diamond corresponds to a function 휙푠defined over neighboring pairs of variable nodes, such that the product of functions satisfies the properties of a CDF. In the sequel we will assume that both 퐹and CDN functions 휙푠are parametric functions of parameter vector 휽and so 퐹≡퐹(x) ≡퐹(x∣휽) and 휙푠≡휙푠(x푠) ≡휙푠(x푠; 휽). In a CDN, the marginal CDF for any subset 퐴⊆푉is obtained simply by taking limits such that 퐹(x퐴) = lim x푉∖퐴→∞퐹(x), which can be done in constant time for each variable. 2.1 Inference and learning in CDNs as differentiation For a joint CDF, the problems of inference and likelihood evaluation, or computing conditional CDFs and marginal PDFs, both correspond to mixed differentiation of the joint CDF [6]. In particular, the conditional CDF 퐹(x퐵∣x퐴) is related to the mixed derivative ∂x퐴[퐹(x퐴, x퐵)] by 퐹(x퐵∣x퐴) = ∂x퐴[퐹(x퐴,x퐵)] ∂x퐴[퐹(x퐴)] . In the case of evaluating the likelihood corresponding to the model, we note that for CDF 퐹(x∣휽), the PDF is defined as 푃(x∣휽) = ∂x[퐹(x∣휽)]. In order to perform maximumlikelihood estimation, we require the gradient vector ∇휽log 푃(x∣휽) = 1 푃(x∣휽)∇휽푃(x∣휽), which requires us to compute a vector of single derivatives ∂휃푖[푃(x∣휽)] of the joint CDF with respect to parameters in the model. 2 2.2 Message-passing algorithms for differentiation in non-loopy graphs As described above, inference and learning in a CDN corresponds to computing derivatives of the CDF with respect to subsets of variables and/or model parameters. For inference in non-loopy CDNs, computing mixed derivatives of the form ∂x퐴[퐹(x)] for some subset of nodes 퐴⊆푉can be solved efficiently by the derivative-sum-product (DSP) algorithm of [6]. In analogy to the way in which marginalization in graphical models for PDFs can be decomposed into a series of local computations, the DSP algorithm decomposes the global computation of the total mixed derivative ∂x[퐹(x)] into a series of local computations by the passing of messages that correspond to mixed derivatives of 퐹(x) with respect to subsets of variables in the model. To evaluate the model likelihood, messages are passed from leaf nodes to the root variable node and the product of incoming root messages is differentiated. This procedure provably produces the correct likelihood 푃(x∣휽) = ∂x[퐹(x∣휽)] for non-loopy CDNs [6]. To estimate model parameters 휽for which the likelihood over i.i.d. data samples x1, ⋅⋅⋅, x푁is optimized, we can further make use of the gradient of the log-likelihood ∇휽log 푃(x∣휽) within a gradient-based optimization algorithm. As in the DSP inference algorithm, the computation of the gradient can also be broken down into a series of local gradient computations. The gradientderivative-product (GDP) algorithm [8] updates the gradients of the messages from the DSP algorithm and passes these from leaf nodes to the root variable node in the CDN, provably obtaining the correct gradient of the log-likelihood of a particular set of observations x for a non-loopy CDN. 3 Differentiation in loopy graphs For loopy graphs, the DSP and GDP algorithms are not guaranteed to yield the correct derivative computations. For the general case of differentiating a product of CDFs, computing the total mixed derivative requires time and space exponential in the number of variables. To see this, consider the simple example of the derivative of a product of two functions 푓, 푔, both of which are functions of x = [푥1, ⋅⋅⋅, 푥퐾]. The mixed derivative of the product is then given by [5] ∂x[푓(x)푔(x)] = ∑ 푈⊆{1,⋅⋅⋅,퐾} ∂x푈[푓(x)]∂x{1,⋅⋅⋅,퐾}∖푈[푔(x)], (1) a summation that contains 2퐾terms. As computing the mixed derivative of a product of more functions will entail even greater complexity, the na¨ıve approach will in general be intractable. However, as we show in this paper, a CDN’s sparse graphical structure may often point to ways to computing these derivatives efficiently, with non-loopy graphs being special, previously-studied cases. To motivate our approach, consider the following lemma that follows in straightforward fashion from the product rule of differentiation: Lemma 3.1. Let 풢= (푉, 푆, 퐸) be a CDN and let 퐹(x) = ∏ 푠∈푆 휙푠(x푠) be defined over variables in 푉. Let 푀1, 푀2 be a partition of the function nodes 푆and let 퐺1(x퐶1) = ∏ 푠∈푀1 휙푠(x푠) and 퐺2(x퐶2) = ∏ 푠∈푀2 휙푠(x푠), where 퐶1 = ∪ 푠∈푀1 풩(푠) and 퐶2 = ∪ 푠∈푀2 풩(푠) are the variables that are arguments to 퐺1, 퐺2. Let 푆1,2 = 퐶1 ∩퐶2. Then ∂x[퐺1(x퐶1)퐺2(x퐶2)] = ∑ 퐴⊆푆1,2 ∂x퐶1∖푆1,2 [ ∂x퐴[퐺1(x퐶1)] ] ∂x퐶2∖푆1,2 [ ∂x푆1,2∖퐴[퐺2(x퐶2)] ] . (2) Proof. Define 퐿= 퐶1 ∖푆1,2 and 푅= 퐶2 ∖푆1,2. Then ∂x[퐹(x)] = ∂x[퐺1(x퐶1)퐺2(x퐶2)] = ∑ 푈⊆푉 ∂x푈[퐺1(x퐶1)]∂x푉∖푈[퐺2(x퐶2)] = ∑ 퐴⊆푆1,2 ∑ 퐵⊆퐿 ∑ 퐶⊆푅 ∂x퐴,퐵,퐶[퐺1(x퐶1)]∂x푆1,2∖퐴,퐿∖퐵,푅∖퐶[퐺2(x퐶2)] = ∑ 퐴⊆푆1,2 ∂x퐴,퐿[퐺1(x퐶1)]∂x푆1,2∖퐴,푅[퐺2(x퐶2)]. (3) The last step follows from identifying all derivatives that are zero, as we note that in the above, ∂x퐶[퐺1(x퐶1)] = 0 for 퐶∕= ∅and similarly, ∂x퐿∖퐵[퐺2(x퐶2)] = 0 for 퐿∖퐵∕= ∅. The number of individual steps needed to complete the differentiation in (2) depends on the size of the variable intersection set 푆1,2 = 퐶1 ∩퐶2. When the two factors 퐺1, 퐺2 depend on two variable 3 sets that do not intersect, then the differentiation can be simplified by independently computing derivatives for each factor and multiplying. For example, for the CDN in Figure 1(a), partitioning the problem such that 퐶1 = {2, 3, 4, 6}, 퐶2 = {1, 2, 5, 7} yields a more efficient computation than the brute force approach. Significant computational advantages exist even when 푆∕= ∅, provided ∣푆1,2∣is small. This suggests that we can recursively decompose the total mixed derivative and gradient computations into a series of simpler computations so that ∂x[퐹(x)] reduces to a sum that contains far fewer terms than that required by brute force. In such a recursion, the total product of factors is always broken into parts that share as few variables as possible. This is efficient for most CDNs of interest that consist of a large number of factors that each depend on a small subset of variables. Such a recursive decomposition is naturally represented using a junction tree [12] for the CDN in which we will pass messages corresponding to local derivative computations. 3.1 Differentiation in junction trees In a CDN 풢= (푉, 푆, 퐸), let {퐶1, ⋅⋅⋅, 퐶푛} be a set of 푛subsets of variable nodes in 푉, where ∪푛 푖=1 퐶푖= 푉. Let 풞= {1, ⋅⋅⋅, 푛} and 풯= (ℰ, 풞) be a tree where ℰis the set of undirected edges so that for any pair 푖, 푗∈풞there is a unique path from 푖to 푗. Then 풯is a junction tree for 풢if any intersection 퐶푖 ∩퐶푗is contained in the subset 퐶푘corresponding to a node 푘on the path from 푖to 푗. For each directed edge (푖, 푗) we define the separator set as 푆푖,푗= 퐶푖 ∩퐶푗. An example of a CDN and a corresponding junction tree are shown in Figures 1(a), 1(b). (a) (b) (c) (d) Figure 1: a) An example of a CDN with 7 variable nodes (circles) and 15 function nodes (diamonds); b) A junction tree obtained from the CDN of a). Separating sets are shown for each edge connecting nodes in the junction tree, each corresponding to a connected subset of variables in the CDN; c), d) CDNs used to model the rainfall and H1N1 datasets. Nodes and edges in the non-loopy CDNs of [8] are shown in blue and function nodes/edges that were added to the trees are shown in red. Since 풯is a tree, we can root the tree at some node in 풞, say 푟. Given 푟, denote by 휏푗 푖the subset of elements of 풞that are in the subtree of 풯rooted at 푗and containing 푖. Also, let ℰ푖be the set of neighbors of 푖in 풯, such that ℰ푖= {푗∣(푖, 푗) ∈ℰ}. Finally, let 퐶퐴= ∪ 푖∈퐴퐶푖. Suppose 푀1, ⋅⋅⋅, 푀푛is a partition of 푆such that for any 푖= 1, ⋅⋅⋅, 푛, 푀푖consists of all 푠∈푆whose neighbors in 풢are contained in 퐶푖and there is no 푗> 푖such that all neighbors of 푠∈푀푖are included in 퐶푗. Define the potential function 휓푖(x퐶푖) = ∏ 푠∈푀푖휙푠(x푠) for subset 퐶푖. We can then write the joint CDF as 퐹(x) = 휓푟(x퐶푟) ∏ 푘∈ℰ푟 푇푟 푘(x), (4) where 푇푟 푘 ( x ) = ∏ 푗∈휏푟 푘휓푗(x퐶푗), with 휓푗defined as above. Computing the probability 푃(x) then corresponds to computing ∂x [ 휓푟(x퐶푟) ∏ 푘∈ℰ푟 푇푟 푘 ( x ) ] = ∂x퐶푟 [ 휓푟(x퐶푟) ∏ 푘∈ℰ푟 ∂x퐶휏푟 푘 ∖푆푟,푘[푇푟 푘 ( x ) ] ] = ∂x퐶푟 [ 휓푟(x퐶푟) ∏ 푘∈ℰ푟 푚푘→푟(∅) ] , (5) where we have defined messages 푚푘→푟(퐴) ≡∂x퐴 [ ∂x퐶휏푟 푘 ∖푆푟,푘[푇푟 푘 ( x ) ] ] , with 푚푘→푟(∅) = ∂x퐶휏푟 푘 ∖푆푟,푘[푇푟 푘 ( x ) ]. It remains to determine how we can efficiently compute messages in the above expression. We notice that for any given 푖∈풞with 퐴⊆퐶푖and 푈푖⊆ℰ푖, we can define the 4 quantity 푚푖(퐴, 푈푖) ≡∂x퐴 [ 휓푖(x퐶푖) ∏ 푗∈푈푖푚푗→푖(∅) ] . Now select 푘∈푈푖for the given 푖: we can recursively re-write the above as 푚푖(퐴, 푈푖) = ∂x퐴 [( 휓푖(x퐶푖) ∏ 푗∈푈푖∖푘 푚푗→푖(∅) ) 푚푘→푖(∅) ] = ∂x퐴 [ 푚푖(∅, 푈푖∖푘)푚푘→푖(∅) ] = ∑ 퐵⊆퐴 푚푘→푖(퐵)푚푖(퐴∖퐵, 푈푖∖푘) = ∑ 퐵⊆퐴∩푆푖,푘 푚푘→푖(퐵)푚푖(퐴∖퐵, 푈푖∖푘), (6) where in the last step we note that whenever 퐵∩푆푖,푘= ∅, 푚푘→푖(퐵) = 0, since by definition message 푚푘→푖(퐴) does not depend on variables in 퐶푖∖푆푖,푘. From the definition of message 푚푗→푖(퐴), for any 퐴⊆푆푖,푗we also have 푚푗→푖(퐴) = ∂x퐴 [ ∂x퐶휏푖 푗 ∖푆푖,푗[푇푖 푗 ( x ) ] ] = ∂x퐴,퐶푗∖푆푖,푗 [ 휓푗(x퐶푗) ∏ 푙∈ℰ푗∖푖 ∂x퐶 휏푗 푙 ∖푆푙,푗[푇푗 푙 ( x ) ] ] = 푚푗 ( 퐴 ∪ 퐶푗∖푆푖,푗, ℰ푗∖푖 ) , (7) where 휏푗 푙is the subtree of 풯rooted at 푗and containing 푙. Thus, we can recursively compute functions 푚푖, 푚푗→푖by applying the above updates for each node in 풯, starting from from leaf nodes of 풯 and up to the root node 푟. At the root node, the correct mixed derivative is then given by 푃(x) = ∂x[퐹(x)] = 푚푟(퐶푟, ℰ푟). Note that the messages can be kept in a symbolic form as functions over appropriate variables, or, as is the case in the experiments section, they can simply be evaluated for the given data x. In the latter case, each message reduces to a scalar, as we can evaluate derivatives of the functions in the model for fixed x, 휽and so we do not need to store increasingly complex symbolic terms. 3.2 Maximum-likelihood learning in junction trees While computing 푃(x∣휽) = ∂x[퐹(x∣휽)], we can in parallel obtain the gradient of the likelihood function. The likelihood is equal to the message 푚푟(퐶푟, ℰ푟) at the root node 푟∈풯. The computation of its gradient ∇휽푚푟(퐶푟, ℰ푟) can be decomposed in a similar fashion to the decomposition of the mixed derivative computation. The gradient of each message 푚푖, 푚푗→푖in the junction tree decomposition is updated in parallel with the likelihood messages through the use of gradient messages g푖≡∇휽푚푖and g푗→푖≡∇휽푚푗→푖. The algorithm for computing both the likelihood and its gradient, which we call JDiff for junction tree differentiation, is shown in Algorithm 1. Thus by recursively computing the messages and their gradients starting from leaf nodes of 풯to the root node 푟, we can obtain the exact likelihood and gradient vector for the CDF modelled by 풢. 3.3 Running time analysis The space and time complexity of JDiff is dominated by Steps 1-3 in Algorithm 1: we quantify this in the next Theorem. Theorem 3.2. The time and space complexity of the JDiff algorithm is 푂 ( max 푗(∣푀푗∣+ 1)∣퐶푗∣+ max (푗,푘)∈ℰ(∣ℰ푗∣−1) ∗2∣퐶푗∖푆푗,푘∣3∣푆푗,푘∣) . (8) Proof. The complexity of Step 1 in Algorithm 1 is given by ∑퐶푗 푘=1 (∣퐶푗∣ 푘 ) ∣푀푗∣푘= 푂 ( (푀푗+1)∣퐶푗∣) , which is the total number of terms in the expanded sum of products form for computing mixed derivatives ∂x퐴[휓푗] for all 퐴⊆퐶푗. Step 2 has complexity bounded by 푂 ( (∣ℰ푗∣−1) ∗max 푘∈ℰ푗 푆푗,푘 ∑ 푙=0 (∣푆푗,푘∣ 푙 ) 2∣퐶푗∖푆푗,푘∣2푙) = (∣ℰ푗∣−1) ∗푂(max 푘∈ℰ푗2∣퐶푗∖푆푗,푘∣3∣푆푗,푘∣) (9) since the cost of computing derivatives for each 퐴⊆퐶푗is a function of the size of the intersection with 푆푖,푗. Thus we have the number of ways that an intersection can be of size 푙times the number of ways that we can choose the variables not in the separator 푆푗,푘times the cost for that size of overlap. Finally, Step 3 has complexity bounded by 푂(2∣푆푗,푘∣). The total time and space complexity is then of order given by 푂 ( max 푗(∣푀푗∣+ 1)∣퐶푗∣+ max (푗,푘)∈ℰ(∣ℰ푗∣−1) ∗2∣퐶푗∖푆푗,푘∣3∣푆푗,푘∣) . 5 Algorithm 1: JDiff: A junction tree algorithm for computing the likelihood ∂x[퐹(x∣휽)] and its gradient ∇휽∂x[퐹(x∣휽)] for a CDN 풢. Lines marked 1,2,3 dominate the space and time complexity. Input: A CDN 풢= (푉, 푆, 퐸), a junction tree 풯≡풯(풢) = (ℰ, 풞) with node set 풞= {1, ⋅⋅⋅, 푛} and edge set ℰ, where each 푖∈풞indexes a subset 퐶푖⊆푉. Let 푟∈풞be the root of 풯and denote the subtree of 풯rooted at 푗containing 푘by 휏푗 푘. Let 푀1, ⋅⋅⋅, 푀푛be a partition of 푆 such that 푀푗= {푠∈푆∣풩(푠) ⊆퐶푗, 풩(푠) ∩퐶푘= ∅∀푘< 푗}. Data: Observations and parameters (x, 휽) Output: Likelihood and gradient ( ∂x[퐹(x; 휽)], ∇휽∂x[퐹(x; 휽)] ) foreach Node 푗∈풞do 푈푗←∅; 휓푗←∏ 푠∈푀푗휙푠; 1 foreach Subset 퐴⊆퐶푗do 푚푗(퐴, ∅) ←∂x퐴[휓푗]; g푗(퐴, ∅) ←∇휽∂x퐴[휓푗]; end 2 foreach Neighbor 푘∈ℰ푗 ∩휏푗 푘do 푆푗,푘←퐶푗 ∩퐶푘; foreach Subset 퐴⊆퐶푗do 푚푗(퐴, 푈푗 ∪푘) ←∑ 퐵⊆퐴∩푆푗,푘푚푘→푗(퐵)푚푗(퐴∖퐵, 푈푗); g푗(퐴, 푈푗 ∪푘) ←∑ 퐵⊆퐴∩푆푗,푘푚푘→푗(퐵)g푗(퐴∖퐵, 푈푗) + g푘→푗(퐵)푚푗(퐴∖퐵, 푈푗); end 푈푗←푈푗 ∪푘; end if 푗∕= 푟then 푘←{푙∣ℰ푗 ∩휏푙 푗∕= ∅}; 푆푗,푘←퐶푗 ∩퐶푘; 3 foreach Subset 퐴⊆푆푗,푘do 푚푗→푘(퐴) ←푚푗 ( 퐴∪퐶푗∖푆푗,푘, ℰ푗∖푘 ) ; g푗→푘(퐴) ←g푗 ( 퐴∪퐶푗∖푆푗,푘, ℰ푗∖푘 ) ; end else return ( 푚푟(퐶푟, ℰ푟), g푟(퐶푟, ℰ푟) ) end end Note that JDiff reduces to the algorithms of [6, 8] for non-loopy CDNs and its complexity then becomes linear in the number of variables. For other types of graphs, the complexity grows exponentially with the tree-width. 4 Experiments The experiments are divided into two parts. The first part evaluates the computational efficiency of the JDiff algorithm for various graph topologies. The second set of experiments uses rainfall and H1N1 epidemiology data to demonstrate the practical value of loopy CDNs, which JDiff for the first time makes practical to learn from data. 4.1 Symbolic differentiation As a first test, we compared the runtime of JDiff to that of commonly-used symbolic differentiation tools such as Mathematica [16] and D* [4]. The task here was to symbolically compute ∂x[퐹(x)] for a variety of CDNs. All three algorithms were run on a machine with a 2.66 GHz CPU and 16 GB of RAM. The JDiff algorithm was implemented in MATLAB. A junction tree was constructed by greedily eliminating the variables with the minimal fill-in algorithm and then constructing elimination subsets for nodes in the junction tree [10] using the MATLAB implementation of [14]. For square grid-structured CDNs with CDN functions defined over pairs of adjacent variables, Mathematica and D* ran out of memory for grids larger than 3 × 3. For the 3 × 3 grid, JDiff took less than 1 second to compute the symbolic derivative, whereas Mathematica and D* took 6.2 s. and 9.2 6 −30 −25 −20 −15 −10 −5 0 5 10 15 Log−likelihood NPN−BDG NPN−MRF GBDG−log GMRF−log MVlogistic CDN−disc CDN−tree CDN−loopy (a) −80 −70 −60 −50 −40 −30 −20 −10 0 Log−likelihood NPN−BDG NPN−MRF GBDG−log GMRF−log MVlogistic CDN−disc CDN−tree CDN−loopy (b) (c) CDN NPN-BDG GBDG-log (d) Figure 2: Both a), b) report average test log-likelihoods achieved for the CDNs, the nonparanormal bidirected and Markov models (NPN-BDG,NPN-MRF), Gaussian bidirected and Markov models for log-transformed data (GBDG-log,GMRF-log) and the multivariate logistic distribution (MVlogistic) on leave-one-out crossvalidation of the a) rainfall and b) H1N1 datasets; c) Contour plots of log-bivariate densities under the CDN model of Figure 1(c) for rainfall with observed measurements shown. Each panel shows the marginal PDF 푃(푥훼, 푥훽) = ∂푥훼,훽[퐹(푥훼, 푥훽)] under the CDN model for each CDN function 푠and its neighbors 훼, 훽. Each marginal PDF can be computed analytically by taking limits followed by differentiation; d) Graphs for the H1N1 datasets with edges weighted according to mutual information under the CDN, nonparanormal and Gaussian BDGs for log-transformed data. Dashed edges correspond to information of less than 1 bit. s. each. We also found that JDiff could tractably (i.e.: in less than 20 min. of CPU time) compute derivatives for graphs as large as 9 × 9. We also compared the time to compute mixed derivatives in loops of length 푛= 10, 11, ⋅⋅⋅, 20. The time required by JDiff varied from 0.81 s. to 2.83 s. to compute the total mixed derivative, whereas the time required by Mathematica varied from 1.2 s. to 580 s. and for D*, 6.7 s. to 12.7 s. 4.2 Learning models for rainfall and H1N1 data The JDiff algorithm allows us to compute mixed derivatives of a joint CDF for applications in which we may need to learn multivariate heavy-tailed distributions defined on loopy graphs. The graphical structures in our examples are based on geographical location of variables that impose dependence constraints based on spatial proximity. To model pairs of heavy-tailed variables, we used the bivariate logistic distribution with Gumbel margins [2], given by 휙푠(푥, 푦) = exp ( − ( 푒− 푥−휇푥,푠 휎푥,푠휃푠+ 푒− 푦−휇푦,푠 휎푦,푠휃푠)휃푠) , 휎푥,푠> 0, 휎푦,푠> 0, 0 < 휃푠< 1. (10) Models constructed by computing products of functions of the above type have the properties of both being heavy-tailed multivariate distributions and satisfying marginal independence constraints between variables that share no function nodes [8]. Here we examined the data studied in [8], which consisted of spatial measurements for rainfall and for H1N1 mortality. The rainfall dataset consists of 61 daily measurements of rainfall at 22 sites in China and the H1N1 dataset consists of 29 weekly mortality rates in 11 cities in the Northeastern US during the 2008-2009 epidemic. Starting from the non-loopy CDNs used in [8] (Figures 1(c) and 1(d), shown in blue), we added function nodes and edges to construct loopy CDNs (shown in red in Figures 1(c) and 1(d)) to construct CDNs capable 7 of expressing many more marginal dependencies at the cost of creating numerous loops in the graph. All CDN models (non-loopy and loopy) were learned from data using stochastic gradients to update model parameters using settings described in the Supplemental Information. The loopy CDN model was compared via leave-one-out cross-validation to non-loopy CDNs of [8] and disconnected CDNs corresponding to independence models. To compare with other multivariate approaches for modelling heavy-tailed data, we also tested the following: ∙Gaussian bi-directed (BDG) and Markov (MRF) models with the same topology as the loopy CDNs for log-transformed data with ˜푥= log(푥+ 휖푖) for 휖푖= 10−푖, 푖= 1, 2, 3, 4, 5, where we show the results for 푖that yielded the best test likelihood. Models were fitted using the algorithms of [3] and [15]. For the Gaussian BDGs, the covariance matrices Σ were constrained so that (Σ)훼,훽= 0 only if there is no edge connecting variable nodes 훼, 훽. For the Gaussian MRF, the constraints were (Σ)−1 훼,훽= 0). ∙Structured nonparanormaldistributions [11], which use a Gaussian copula model, where the structure was specified by the same BDG and MRF graphs and estimation of the covariance was performed using the algorithms for Gaussian MRFs and BDGs on nonlinearly transformed data. The nonlinear transformation is given by 푓훼(푥훼) = ˜휇훼+ ˜휎훼Φ−1( ˜퐹훼(푥훼)) where Φ is the normal CDF, ˜퐹훼is the Winsorized estimator [11] of the CDF for random variable 푋훼and parameters ˜휇훼, ˜휎훼are the empirical mean and standard deviation for 푋훼. Although the nonparanormal allows for structure learning as part of model fitting, for the sake of comparison the structure of the model was set to be same as those of the BDG and MRF models. ∙The multivariate logistic CDF [13] that is heavy-tailed but does not model local dependencies. Here we designed the BDG and MRF models to have the same graphical structure as the loopy CDN model such that all three model classes represent the same set of local dependencies even though the set of global dependencies is different for a BDG, MRF and CDN of the same connectivity. Additional details about these comparisons are provided in the Supplemental Information. The resulting average test log-likelihoods on leave-one-out cross-validation achieved by the above models are shown in Figures 2(a) and 2(b). Here, capturing the additional local dependencies and heavy-tailedness using loopy CDNs leads to significantly better fits (푝< 10−8, two-sided sign test). To further explore the loopy CDN model, we can visualize the set of log-bivariate densities obtained from the loopy CDN model for the rainfall data in tandem with observed data (Figure 2(c)). The marginal bivariate density for each pair of neighboring variables is obtained by taking limits of the learned multivariate CDF and differentiating the resulting bivariate CDF. We can also examine the resulting models by comparing the mutual information (MI) between pairs of neighboring variables in the graphical models for the H1N1 dataset. This is shown in Figure 2(d) in the form of undirected weighted graphs where edges are weighted proportional to the MI between the two variable nodes connected by that edge. For the CDN, MI was computed by drawing 50,000 samples from the resulting density model via the Metropolis algorithm; for Gaussian models, the MI was obtained analytically. As can be seen, the loopy CDN model differs significantly from the nonparanormal and Gaussian BDGs for log-transformed data in the MI between pairs of variables (Figure 2(d)). Not only are the MI values under the loopy CDN model significantly higher as compared to those under the Gaussian models, but also high MI is assigned to the edge corresponding to the Newark,NJ/Philadelphia,PA air corridor, which is a likely source of H1N1 transmission between cities [1] (edge shown in black in Figure 2(d)). In contrast, this edge is largely missed by the nonparanormal and log-transformed Gaussian BDGs. 5 Discussion The above results for the rainfall and H1N1 datasets, combined with the lower runtime of JDiff compared to standard symbolic differentiation algorithms, highlight A) the usefulness of JDiff as an algorithm for exact inference and learning for loopy CDNs and B) the usefulness of loopy CDNs in which multiple local functions can be used to model local dependencies between variables in the model. Future work could include learning the structure of compact probability models in the sense of graphs with bounded treewidth, with practical applications to other problem domains (e.g.: finance, seismology) in which data are heavy-tailed and high-dimensional and comparisons to existing techniques for doing this [11]. Another line of research would be to further study the connection between CDNs and other copula-based models (e.g.: [9]). Finally, given the demonstrated value of adding dependency constraints to CDNs, further development of faster approximate algorithms for loopy CDNs will also be of practical value. 8 References [1] Colizza, V., Barrat, A., Barthelemy, M. and Vespignani, A. (2006) Prediction and predictability of global epidemics: the role of the airline transportation network. Proceedings of the National Academy of Sciences USA (PNAS) 103, 2015-2020. [2] de Haan, L. and Ferreira, A. (2006) Extreme value theory. Springer. [3] Drton, M. and Richardson, T.S. (2004) Iterative conditional fitting for Gaussian ancestral graph models. Proceedings of the Twentieth Conference on Uncertainty in Artificial Intelligence (UAI), 130-137. [4] Guenter, B. (2007) Efficient symbolic differentiation for graphics applications. ACM Transactions on Graphics 26(3). [5] Hardy, M. (2006) Combinatorics of partial derivatives. Electronic Journal of Combinatorics 13. [6] Huang, J.C. and Frey, B.J. (2008) Cumulative distribution networks and the derivative-sumproduct algorithm. Proceedings of the Twenty-Fourth Conference on Uncertainty in Artificial Intelligence (UAI), 290-297. [7] Huang, J.C. (2009) Cumulative distribution networks: Inference, estimation and applications of graphical models for cumulative distribution functions. University of Toronto Ph.D. thesis. http://hdl.handle.net/1807/19194 [8] Huang, J.C. and Jojic, N. (2010) Maximum-likelihood learning of cumulative distribution functions on graphs. Journal of Machine Learning Research W&CP Series 9, 342-349. [9] Kirschner, S. (2007) Learning with tree-averaged densities and distributions. Advances in Neural Information Systems Processing (NIPS) 20, 761-768. [10] Koller, D. and Friedman, N. (2009). Probabilistic Graphical Models: Principles and Techniques, MIT Press. [11] Liu, H., Lafferty, J. and Wasserman, L. (2009) The nonparanormal: Semiparametric estimation of high dimensional undirected graphs. Journal of Machine Learning Research (JMLR) 10, 22952328. [12] Lauritzen, S.L. and Spiegelhalter, D.J. (1988) Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society Series B (Methodological) 50(2), 157224. [13] Malik, H.J. and Abraham, B. (1978) Multivariate logistic distributions. Annals of Statistics 1(3), 588-590. [14] Murphy, K.P. (2001) The Bayes Net Toolbox for MATLAB. Computing science and statistics. [15] Speed, T.S. and Kiiveri, H.T. (1986) Gaussian Markov distributions over finite graphs. Annals of Statistics 14(1), 138-150. [16] Wolfram Research, Inc. (2008) Mathematica, Version 7.0. Champaign, IL. 9
2010
142
3,902
Spectral Regularization for Support Estimation Ernesto De Vito DSA, Univ. di Genova, and INFN, Sezione di Genova, Italy devito@dima.ungie.it Lorenzo Rosasco CBCL - MIT, - USA, and IIT, Italy lrosasco@mit.edu Alessandro Toigo Politec. di Milano, Dept. of Math., and INFN, Sezione di Milano, Italy toigo@ge.infn.it Abstract In this paper we consider the problem of learning from data the support of a probability distribution when the distribution does not have a density (with respect to some reference measure). We propose a new class of regularized spectral estimators based on a new notion of reproducing kernel Hilbert space, which we call “completely regular”. Completely regular kernels allow to capture the relevant geometric and topological properties of an arbitrary probability space. In particular, they are the key ingredient to prove the universal consistency of the spectral estimators and in this respect they are the analogue of universal kernels for supervised problems. Numerical experiments show that spectral estimators compare favorably to state of the art machine learning algorithms for density support estimation. 1 Introduction In this paper we consider the problem of estimating the support of an arbitrary probability distribution and we are more broadly motivated by the problem of learning from complex high dimensional data. The general intuition that allows to tackle these problems is that, though the initial representation of the data is often very high dimensional, in most situations the data are not uniformly distributed, but are in fact confined to a small (possibly low dimensional) region. Making such an intuition rigorous is the key towards designing effective algorithms for high dimensional learning. The problem of estimating the support of a probability distribution is of interest in a variety of applications such as anomaly/novelty detection [8], or surface modeling [16]. From a theoretical point of view the problem has been usually considered in the setting where the probability distribution has a density with respect to a known measure (for example the Lebesgue measure in Rd or the volume measure on a manifold). Among others we mention [22, 5] and references therein. Algorithms inspired by Support Vector Machine (SVM), often called one-class SVM are have been proposed see [17, 20] and references therein. Another kernel method, related to the one we discuss in this paper, is presented in [11]. More generally one of the main approaches to learning from high dimensional is the one considered in manifold learning. In this context the data are assumed to lie on a low dimensional Riemannian sub-manifold embedded (that is represented) in a high dimensional Euclidean space. This framework inspired algorithms to solve a variety of problems such as: semisupervised learning [3], clustering [23], data parameterization/dimensionality reduction [15, 21], to name a few. The basic assumption underlying manifold learning is often too restrictive to describe real data and this motivates considering other models, such as the setting where the data are assumed to be essentially concentrated around a low dimensional manifold as in [12], or can be modeled as samples from a metric space as in [10]. 1 In this paper we consider a general scenario (see [18]) where the underlying model is a probability space (X, ρ) and we are given a (similarity) function K which is a reproducing kernel. The available training set is an i.i.d sample x1, . . . , xn ∼ρ. The geometry (and topology) in (X, ρ) is defined by the kernel K. While this framework is abstract and poses new challenges, by assuming the similarity function to be a reproducing kernel we can make full use of the good computational properties of kernel methods and the powerful theory of reproducing kernel Hilbert spaces (RKHS) [2]. Interestingly, the idea of using a reproducing kernel K to construct a metric on a set X is originally due to Schoenberg (see for example [4]). Broadly speaking, in this setting we consider the problem of finding a model of the smallest region Xρ containing all the data. A rigorous formalization of this problem requires: 1) defining the region Xρ, 2) specifying the sense in which we model Xρ. This can be easily done if the probability distribution has density p with respect to a known measure, in fact Xρ = {x ∈X : p(x) > 0}, but is otherwise a challenging question for a general distribution. Intuitively, Xρ can be thought of as the region where the distribution is concentrated, that is ρ(Xρ) = 1. However, there are many different sets having this property. If X is Rd (in fact any topological space), a natural candidate to define the region of interest, is the notion of support of a probability distribution– defined as the intersection of the closed subsets C of X, such that ρ(C) = 1. In an arbitrary probability space the support of the measure is not well defined since no topology is given. The reproducing kernel K provides a way to solve this problem and also suggests a possible approach to model Xρ. The first idea is to use the fact that under mild assumptions the kernel defines a metric on X [18], so that the concept of closed set, hence that of support, is well defined. The second idea is to use the kernel to construct a function Fρ such that the level set corresponding to one is exactly the support Xρ– in this case we say that the RKHS associated to K separates the support Xρ. By doing this we are in fact imposing an assumption on Xρ: given a kernel K, we can only separate certain sets. More precisely, our contribution is two-fold. • We prove that Fρ is uniquely defined by the null space of the integral operator associated to K. Given that the integral operator (and its spectral properties) can be approximated studying the kernel matrix on a sample, this result suggests a way to estimate the support empirically. However, a further complication arises from the fact that in general zero is not an isolated point of the spectrum, so that the estimation of a null space is an ill-posed problem (see for example [9]). Then, a regularization approach is needed in order to find a stable (hence generalizing) estimator. In this paper, we consider a spectral estimator based on a spectral regularization strategy, replacing the kernel matrix with its regularized version (Tikhonov regularization being one example). • We introduce the notion of completely regular RKHS, that answer positively to the question whether there exist kernels that can separate the support of any distribution. Examples of completely regular kernels are presented and results suggesting how they can be constructed are given. The concept of completely regular RKHS plays a role similar to the concept of universal kernels in supervised learning, for example see [19]. Finally, given the above results, we show that the regularized spectral estimator enjoys a universal consistency property: the correct support can be asymptotically recovered for any problem (that is any probability distribution). The plan of the paper is as follows. In Section 2 we introduce the notion of completely regular kernels and their basic properties. In Section 3 we present the proposed regularized algorithms. In Section 4 and 5 we provide a theoretical and empirical analysis, respectively. Proofs and further development can be found in the supplementary material. 2 Completely regular reproducing kernel Hilbert spaces In this section we introduce the notion of a completely regular reproducing kernel Hilbert space. Such a space defines a geometry on a measurable space X which is compatible with the measurable structure. Furthermore it shows how to define a function F such that the one level set is the support of the probability distribution. The function is determined by the spectral projection associated with the null eigenvalue of the integral operator defined by the reproducing kernel. All the proofs of this section are reported in the supplementary material. 2 We assume X to be a measurable space with a probability measure ρ. We fix a complex1 reproducing kernel Hilbert space H on X with a reproducing kernel K : X × X →C [2]. The scalar product and the norm are denoted by ⟨·, ·⟩, linear in the first argument, and ∥·∥, respectively. For all x ∈X, Kx ∈H denotes the function K(·, x). For each function f ∈H, the reproducing property f(x) = ⟨f, Kx⟩holds for all x ∈X. When different reproducing kernel Hilbert spaces are considered, we denote by HK the reproducing kernel Hilbert space with reproducing kernel K. Before giving the definition of completely regular RKHS, which is the key concept presented in this section, we need some preliminary definitions and results. Definition 1. A subset C ⊂X is separated by H, if, for any x0 ̸∈C, there exists f ∈H such that f(x0) ̸= 0 and f(x) = 0 ∀x ∈C. (1) For example, if X = Rd and H is the reproducing kernel Hilbert space with linear kernel K(x, t) = x · t, the sets separated by H are precisely the hyperplanes containing the origin. In Eq. (1) the function f depends on x0 and C, but Proposition 1 below will show that there is a function, possibly not in H, whose one level set is precisely C ( if K(x, x) = 1 ). Note that in [19] a different notion of separating property is given. We need some further notation. For any set C, let PC : H →H be the orthogonal projection onto the closure of the linear space generated by {Kx | x ∈C}, so that P 2 C = PC, P ∗ C = PC and ker PC = {Kx | x ∈C}⊥= {f ∈H | f(x) = 0, ∀x ∈C}. Moreover let FC : X →C be defined by FC(x) = ⟨PCKx, Kx⟩. Proposition 1. For any subset C ⊂X, the following facts are equivalent (i) the set C is separated by H; (ii) for all x ̸∈C, Kx /∈Ran PC; (iii) C = {x ∈X | FC(x) = K(x, x)}. If one of the above conditions is satisfied, then K(x, x) ̸= 0 ∀x /∈C. A natural and minimal requirement on H is to be able to separates any pairs of distinct points and this implies that Kx ̸= Kt if x ̸= t and K(x, x) ̸= 0. The first condition ensures the metric given by dK(x, y) = ∥Kx −Kt∥ x, t ∈X. (2) to be well defined. Then (X, dK) is a metric space and the sets separated by H are always dKclosed, see Prop. 2 below. This last property is not enough to ensure that we can evaluate ρ on the set separated by RKHS H. In fact the σ-algebra generated by the metric d might not be contained in the σ-algebra on X. The next result shows that assuming the kernel to be measurable is enough to solve this problem. Proposition 2. Assume that Kx ̸= Kt if x ̸= t, then the sets separated by H are closed with respect to dK. Moreover, if H is separable and the kernel is measurable, then the sets separated by H are measurable. Given the above premises, the following is the key definition that characterizes the reproducing kernel Hilbert spaces which are able to separate the largest family of subsets of X. Definition 2 (Completely Regular RKHS). A reproducing kernel Hilbert space H with reproducing kernel K such that Kx ̸= Kt if x ̸= t is called completely regular if H separates all the subsets C ⊂X which are closed with respect to the metric (2). The term completely regular is borrowed from topology, where a topological space is called completely regular if, for any closed subset C and any point x0 /∈C, there exists a continuous function f such that f(x0) ̸= 0 and f(x) = 0 for all x ∈C. In the supplementary material, several examples of completely regular reproducing kernel Hilbert spaces are given, as well as a discussion on how such spaces can be constructed. A particular case is when X is already a metric space with a distance 1Considering complex valued RKHS allows to use the theory of Fourier transform and for practical problems we can simply consider real valued kernels. 3 function dX. If K is continuous with respect to dX, the assumption of complete regularity forces the metrics dK and dX to have the same closed subsets. Then, the supports defined by dK and dX are the same. Furthermore, since the closed sets of X are independent of H, the complete regularity of H can be proved by showing that a suitable family of bump2 functions is contained in H. Corollary 1. Let X be a separable metric space with respect to a metric dX. Assume that the kernel K is a continuous function with respect to dX and that the space H separates every subset C which is closed with respect to dX. Then (i) The space H is separable and K is measurable with respect to the Borel σ-algebra generated by dX. (ii) The metric dK defined by (2) is equivalent to dX, that is, a set is closed with respect to dK if and only if it is closed with respect to dX. (iii) The space H is completely regular. As a consequence of the above result, many classical reproducing kernel Hilbert spaces are completely regular. For example, if X = Rd and H is the Sobolev space of order s with s > d/2, then H is completely regular. This is due to the fact that the space of smooth compactly supported functions is contained in H. In fact, a standard result of analysis ensures that, for any closed set C and any x0 /∈C there exists a smooth bump function such that f(x0) = 1 and its support is contained in the complement of C. Interestingly enough, if H is the reproducing kernel Hilbert space with the Gaussian kernel, it is known that the elements of H are analytic functions, see Cor. 4.44 in [19]. Clearly H can not be completely regular. Indeed, if C is a closed subset of Rd with not empty interior and f ∈H is such that f(x) = 0 for all x ∈C, a standard result of complex analysis implies that f(x) = 0 for every x ∈Rd. Finally, the next result shows that the reproducing kernel can be normalized to one on the diagonal under the mild assumption that K(x, x) ̸= 0 for all x ∈X. Lemma 1. Assume that K(x, x) > 0 for all x ∈X. Then the reproducing kernel Hilbert space with the normalized kernel K′(x, t) = K(x, t) p K(x, x)K(t, t) separates the same sets as H. Finally we briefly mention some examples and refer to the supplementary material for further developments. In particular, we prove that both the Laplacian kernel K(x, y) = e−∥x−y∥2 √ 2σ and ℓ1exponential kernel K(x, y) = e−∥x−y∥1 √ 2σ defined on Rd are completely regular for any σ > 0 and d ∈N. 3 Spectral Algorithms for Learning the Support In this section, we first discuss our framework and our main assumptions. Then we present the proposed regularized spectral algorithms. Motivated by the results in the previous section, we describe our framework which is given by a triple (X, ρ, K). We consider a probability space (X, ρ) and a training set x = (x1 . . . , xn) sampled i.i.d. with respect to ρ. Moreover we consider a reproducing kernel K satisfying the following assumption. Assumption 1. The reproducing kernel K is measurable and K(x, x) = 1, for all x ∈X. Moreover K defines a completely regular and separable RKHS H. We endow X with the metric dK defined in (2), so that X becomes a separable metric space. The assumption of complete regularity ensures that any closed subset is separated by H and, hence, is measurable by Prop. 2. Then we can define the support Xρ of the measure ρ, as the intersection of all the closed sets C ⊂X, such that ρ(C) = 1. Clearly Xρ is closed and ρ(Xρ) = 1 (note that this last property depends on the separability of X, hence of H). Summarizing the key result in the previous section, under the above assumptions, Xρ is the one level set of the function Fρ : X →[0, 1] Fρ(x) = ⟨PρKx, Kx⟩, 2Given an open subset U and a compact subset C ⊂U, a bump function is a continuous compactly supported function which is one on C and its support is contained in U. 4 where Pρ is a short notation for PXρ. Since Fρ depends on the unknown measure ρ, in practice it cannot be explicitly calculated. To design an effective empirical estimator we develop a novel characterization of the support of an arbitrary distribution that we describe in the next section. 3.1 A New Characterization of the Support The key observation towards defining a learning algorithm to estimate Xρ it is that the projection Pρ can be expressed in terms of the integral operator defined by the kernel K. To see this, for all x ∈X, let Kx ⊗Kx denote the rank one positive operator on H, given by (Kx ⊗Kx)(f) = ⟨f, Kx⟩Kx = f(x)Kx f ∈H. Moreover, let T : H →H be the linear operator defined as T = Z X Kx ⊗Kxdρ(x), where the integral converges in the Hilbert space of Hilbert-Schmidt operators on H (see for example [7] for the proof). Using the reproducing property in H [2], it is straightforward to see that T is simply the integral operator with kernel K with domain and range in H. Then, one can easily see that the null space of T is precisely (I −Pρ)H, so that Pρ = T †T, (3) where T † is the pseudo-inverse of T (see for example [9]). Hence Fρ(x) = T †T Kx, Kx . Observe that in general Kx does not belong to the domain of T † and, if θ denotes the Heaviside function with θ(0) = 0, then spectral theory gives that Pρ = T †T = θ(T ). The above observation is crucial as it gives a new characterization of the support of ρ in terms of the null space of T and the latter can be estimated from data. 3.2 Spectral Regularization Algorithms Finally, in this section, we describe how to construct an estimator Fn of Fρ. As we mentioned above, Eq. (3) suggests a possible way to learn the projection from finite data. In fact, we can consider the empirical version of the integral operator associated to K which is simply defined by Tn = 1 n n X i=1 Kxi ⊗Kxi. The latter operator is an unbiased estimator of T . Indeed, since Kx ⊗Kx is a bounded random variable into the separable Hilbert space of Hilbert-Schmidt operators, one can use concentration inequalities for random variables in Hilbert spaces to prove that lim n→+∞ √n log n∥T −Tn∥HS = 0 almost surely, (4) where ∥·∥HS is the Hilbert-Schmidt norm (see for example [14] for a short proof). However, in general T † nTn does non converge to T †T since 0 is an accumulation point of the spectrum of T or, equivalently, since T † is not a bounded operator. Hence, a regularization approach is needed. In this paper we study a spectral filtering approach which replaces T † n with an approximation gλ(Tn) obtained filtering out the components corresponding to the small eigenvalues of Tn. The function gλ is defined by spectral calculus. More precisely if Tn = P j σjvj ⊗vj is a spectral decomposition of Tn, then gλ(Tn) = P j gλ(σj)vj ⊗vj. Spectral regularization defined by linear filters is classical in the theory of inverse problems [9]. Intuitively, gλ(Tn) is an approximation of the generalized inverse T † n and it is such that the approximation gets better, but the condition number of gλ(Tn) gets worse as λ decreases. More formally these properties are captured by the following set of conditions. Assumption 2. For σ ∈[0, 1], let rλ(σ) := σgλ(σ), then • rλ(σ) ∈[0, 1], ∀λ > 0, 5 • limλ→0 rλ(σ) = 1, , ∀σ > 0 • |rλ(σ) −rλ(σ′)| ≤Lλ|σ −σ′|, ∀λ > 0, where Lλ is a positive constant depending on λ. Examples of algorithms that fall into the above class include iterative methods– akin to boosting gλ(σ) = Pmλ k=0(1 −σ)k, spectral cut-off gλ(σ) = 1 σ 1σ>λ(σ) + 1 λ1σ≤λ(σ), and Tikhonov regularization gλ(σ) = 1 σ+λ. We refer the reader to [9] for more details and examples, and, given the space constraints, will focus mostly on Tikhonov regularization in the following. For a chosen filter, the regularized empirical estimator of Fρ can be defined by Fn(x) = ⟨gλ(Tn)TnKx, Kx⟩. (5) One can see that that the computation of Fn reduces to solving a simple finite dimensional problem involving the empirical kernel matrix defined by the training data. Towards this end, it is useful to introduce the sampling operator Sn : H →Cn defined by Snf = (f(x1), . . . , f(xn)), f ∈H, which can be interpreted as the restriction operator which evaluates functions in H on the training set points. The adjoint S∗ n : Cn →H of Sn is given by S∗ nα = Pn i=1 αiKxi, α = (α1, . . . , αn) ∈Cn, and can be interpreted as the out-of-sample extension operator. A simple computation shows that Tn = 1 nS∗ nSn and SnS∗ n = Kn is the n by n kernel matrix, where the (i, j)-entry is K(xi, xj). Then it is easy to see that gλ(Tn)Tn = gλ(S∗ nSn/n)S∗ nSn/n = 1 nS∗ ngλ(Kn/n)Sn, so that Fn(x) = 1 nkx T gλ(Kn/n)kx, (6) where kx is the n-dimensional column vector kx = SnKx = (K(x1, x), . . . , K(xn, x)) . Note that Equation (6) plays the role of a representer theorem for the spectral estimator, in the sense that it reduces the problem of finding an estimator in an infinite dimensional space to a finite dimensional problem. 4 Theoretical Analysis: Universal Consistency In this section we study the consistency property of spectral estimators. All the proofs of this section are reported in the supplementary material. We prove the results only for the filter corresponding to the classical Tikhonov regularization though the same results hold for the class of spectral filters described by Assumption 2. To study the consistency of the methods we need to choose an appropriate performance measure to compare Fn and Fρ. Note that there is no natural notion of risk, since we have to compute the function on and off the support. Also note that standard metric used for support estimation (see for example [22, 5]) cannot be used in our analsys since they rely on the existence of a reference measure µ (usually the Lebesgue measure) and the assumption that ρ is absolutely continuous with respect to µ. The following preliminary result shows that we can control the convergence of the Tikhonov estimator Fn, defined by gλ(T ) = (Tn + λnI)−1, to Fρ uniformly on any compact set of X, provided a suitable sequence λn. Theorem 1. Let Fn be the estimator defined by Tikhonov regularization and choose a sequence λn so that lim n→∞λn = 0 and limsup n→∞ log n λn √n < +∞, (7) then lim n→+∞sup x∈C |Fn(x) −Fρ(x)| = 0, almost surely, (8) for every compact subset C of X We add three comments. First, we note that, as we mentioned before, Tikhonov regularization can be replaced by a large class of filters. Second, we observe that a natural choice would be the regularization defined by kernel PCA [11], which corresponds to truncating the generalized inverse of the kernel matrix at some cutoff parameter λ. However, one can show that, in general, in this case it is not possible to choose λ so that the sample error goes to zero. In fact, for KPCA the sample error depends on the gap between the M-th and the M + 1-th eigenvalue of T [1], where M-th and M + 1-th are the eigenvalues around the cutoff parameter. Such a gap can go to zero with an 6 arbitrary rate so that there exists no choice of the cut-off parameter ensuring convergence to zero of the sample error. Third, we note that the uniform convergence of Fn to Fρ on compact subsets does not imply the convergence of the level sets of Fn to the corresponding level sets of Fρ, for example with respect to the standard Hausdorff distance among closed subsets. In practice to have an effective decision rule, an off-set parameter τn can be introduced and the level set is replaced by Xn = {x ∈X | Fn(x) ≥1 −τn} – recall that Fn takes values in [0, 1]. The following result will show that for a suitable choice of τn the Hausdorff distance between Xn ∩C and Xρ ∩C goes to zero for all compact sets C. We recall that the Hausdorff distance between two subsets A, B ⊂X is dH(A, B) = max{sup a∈A dK(a, B), sup b∈B dK(b, A)} Theorem 2. If the sequence (τn)n∈N converges to zero in such a way that lim sup n→∞ supx∈C|Fn(x) −Fρ(x)| τn ≤1, almost surely (9) then, lim n→+∞dH(Xn ∩C, Xρ ∩C) = 0 almost surely, for any compact subset C. We add two comments. First, it is possible to show that, if the (normalized) kernel K is such that limx′→∞Kx(x′) = 0 for any x ∈X – as it happens for the Laplacian kernel, then Theorems 1 and 2 also hold by choosing C = X. Second, note that the choice of τn depends on the rate of convergence of Fn to Fρ which will itself depend on some a-priori assumption on ρ. Developing learning rates and finite sample bound is a key question that we will tackle in future work. 5 Empirical Analysis In this section we describe some preliminary experiments aimed at testing the properties and the performances of the proposed methods both on simlauted and real data. Again for space constraints we will only discuss spectral algorithms induced by Tikhonov regularization. Note that while computations can be made efficient in several ways, we consider a simple algorithmic protocol and leave a more refined computational study for future work. Following the discussion in the last section, Tikhonov regularization defines an estimator Fn(x) = kx T (Kn + nλI)−1kx and a point is labeled as belonging to the support if Fn(x) ≥1 −τ. The computational cost for the algorithm is, in the worst case, of order n3, like standard regularized least squares, for training and order Nn2 if we have to predict the value of Fn at N test points. In practice, one has to choose a good value for the regularization parameter λ and this requires computing multiple solutions, a so called regularization path. As noted in [13], if we form the inverse using the eigendecomposition of the kernel matrix the price of computing the full regularization path is essentially the same as that of computing a single solution (note that the cost of the eigen-decomposition of Kn is also of order n3 though the constant is worse). This is the strategy that we consider in the following. In our experiments we considered two data-sets the MNIST data-set and the CBCL face database. For the digits we considered a reduced set consisting of a training set of 5000 images and a test set of 1000 images. In the first experiment we trained on 500 images for the digit 3 and tested on 200 images of digits 3 and 8. Each experiment consists of training on one class and testing on two different classes and was repeated for 20 trials over different training set choices. The performance is evaluated computing ROC curve (and the corresponding AUC value) for varying τ, τ ′, τ ′′. For all our experiments we considered the Laplacian kernel. Note that, in this case the algorithm requires to choose 3 parameters: the regularization parameter λ, the kernel width σ and the threshold τ. In supervised learning cross validation is typically used for parameter tuning, but cannot be used in our setting since support estimation is an unsupervised problem. Then, we considered the following heuristics. The kernel width is chosen as the median of the distribution of distances of the K-th nearest neighbor of each training set point for K = 10. Fixed the kernel width, we choose regularization parameter in correspondence of the maximum curvature in the eigenvalue behavior– see Figure 1, the rational being that after this value the eigenvalues are relatively small. For comparison we considered a Parzen window density estimator and one-class SVM (1CSVM )as implemented by [6]. For the Parzen window estimator we used the same kernel used in the spectral algorithm, that is the Laplacian kernel and use the 7 0 50 100 150 200 250 300 350 400 0 20 40 60 80 100 120 140 160 Eigenvalues Index Eigenvalues Maginitude Eigenvalues Decay Eigenvalues Decay Regularization Parameter 5 10 15 20 25 30 35 40 45 50 0 2 4 6 8 10 12 14 16 18 Eigenvalues Index Eigenvalues Maginitude Eigenvalues Decay Eigenvalues Decay Regularization Parameter Figure 1: Decay of the eigenvalues of the kernel matrix ordered in decreasing magnitude and corresponding regularization parameter (Left) and a detail of the first 50 eigenvalues (Right). same width used in our estimator. Given a kernel width an estimate of the probability distribution is computed and can be used to estimate the support by fixing a threshold τ ′. For the one-class SVM we considered the Gaussian kernel, so that we have to fix the kernel width and a regularization parameter ν. We fix the kernel width to be the same used by our estimator and fixed ν = 0.9. For the sake of comparison, also for one-class SVM we considered a varying offset τ ′′. The ROC curves on the different tasks are reported (for one of the trial) in Figure 2, Left. The mean and standard deviation of the AUC for the 3 methods is reported in Table 5. Similar experiments were repeated considering other pairs of digits, see Table 5. Also in the case of the CBCL data sets we considered a reduced data-set consisting of 472 images for training and other 472 for test. On the different test performed on the Mnist data the spectral algorithm always achieves results which are better- and often substantially better - than those of the other methods. On the CBCL dataset SVM provides the best result, but spectral algorithm still provides a competitive performance. 6 Conclusions In this paper we presented a new approach to estimate the support of an arbitrary probability distribution. Unlike previous work we drop the assumption that the distribution has a density with respect to a (known) reference measure and consider a general probability space. To overcome this problem we introduce a new notion of RKHS, that we call completely regular, that captures the relevant geometric properties of the probability distribution. Then, the support of the distribution can be characterized as the null space of the integral operator defined by the kernel and can be estimated using a spectral filtering approach. The proposed estimators are proven to be universally consistent and have good empirical performances on some benchmark data-sets. Future work will be devoted MNIST 9vs4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FalsePos TruePos Spectral Parzen OneClassSVM MNIST 1vs7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FalsePos TruePos Spectral Parzen OneClassSVM CBCL 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FalsePos TruePos Spectral Parzen OneClassSVM Figure 2: ROC curves for the different estimator in three different tasks: digit 9vs 4 Left, digit 1vs 7 Center, CBCL Right. 3vs 8 8vs 3 1vs 7 9vs 4 CBCL Spectral 0.8371 ± 0.0056 0.7830 ± 0.0026 0.9921 ± 4.7283e −04 0.8651 ± 0.0024 0.8682 ± 0.0023 Parzen 0.7841 ± 0.0069 0.7656 ± 0.0029 0.9811 ± 3.4158e −04 0.0.7244 ± 0.0030 0.8778 ± 0.0023 1CSVM 0.7896 ± 0.0061 0.7642 ± 0.0032 0.9889 ± 1.8479e −04 0.7535 ± 0.0041 0.8824 ± 0.0020 Table 1: Average and standard deviation of the AUC for the different estimators on the considered tasks. 8 to derive finite sample bounds, to develop strategies to scale-up the algorithms to massive data-sets and to a more extensive experimental analysis. References [1] P. M. Anselone. Collectively compact operator approximation theory and applications to integral equations. Prentice-Hall Inc., Englewood Cliffs, N. J., 1971. [2] N. Aronszajn. Theory of reproducing kernels. Trans. Amer. Math. Soc., 68:337–404, 1950. [3] 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. [4] C. Berg, J. Christensen, and P. Ressel. Harmonic analysis on semigroups, volume 100 of Graduate Texts in Mathematics. Springer-Verlag, New York, 1984. [5] G. Biau, B. Cadre, D. Mason, and Bruno Pelletier. Asymptotic normality in density support estimation. Electron. J. Probab., 14:no. 91, 2617–2635, 2009. [6] S. Canu, Y. Grandvalet, V. Guigue, and A. Rakotomamonjy. Svm and kernel methods matlab toolbox. Perception Systmes et Information, INSA de Rouen, Rouen, France, 2005. [7] C. Carmeli, E. De Vito, and A. Toigo. Vector valued reproducing kernel Hilbert spaces of integrable functions and Mercer theorem. Anal. Appl. (Singap.), 4(4):377–408, 2006. [8] V. Chandola, A. Banerjee, and V. Kumar. Anomaly detection: A survey. ACM Comput. Surv., 41(3):1–58, 2009. [9] H. W. Engl, M. Hanke, and A. Neubauer. Regularization of inverse problems, volume 375 of Mathematics and its Applications. Kluwer Academic Publishers Group, Dordrecht, 1996. [10] M. Hein, O. Bousquet, and B. Schlkopf. Maximal margin classification for metric spaces. Journal of Computer and System Sciences, 71(3):333–359, 10 2005. [11] H. Hoffmann. Kernel pca for novelty detection. Pattern Recogn., 40(3):863–874, 2007. [12] P Niyogi, S Smale, and S Weinberger. A topological view of unsupervised learning from noisy data. preprint, Jan 2008. [13] R. Rifkin and R. Lippert. Notes on regularized least squares. Technical report, Massachusetts Institute of Technology, 2007. [14] L. Rosasco, M. Belkin, and E. De Vito. On learning with integral operators. J. Mach. Learn. Res., 11:905–934, 2010. [15] S Roweis and L Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, Jan 2000. [16] B. Sch¨olkopf, J. Giesen, and S. Spalinger. Kernel methods for implicit surface modeling. In Advances in Neural Information Processing Systems 17, pages 1193–1200, Cambridge, MA, 2005. MIT Press. [17] B. Sch¨olkopf, J. Platt, J. Shawe-Taylor, A. Smola, and R. Williamson. Estimating the support of a high-dimensional distribution. Neural Comput., 13(7):1443–1471, 2001. [18] S. Smale and D.X. Zhou. Geometry of probability spaces. Constr. Approx., 30(3):311–323, 2009. [19] I. Steinwart and A. Christmann. Support vector machines. Information Science and Statistics. Springer, New York, 2008. [20] I. Steinwart, D. Hush, and C. Scovel. A classification framework for anomaly detection. J. Mach. Learn. Res., 6:211–232 (electronic), 2005. [21] J. Tenenbaum, V. Silva, and J. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, Jan 2000. [22] A. B. Tsybakov. On nonparametric estimation of density level sets. Ann. Statist., 25(3):948– 969, 1997. [23] U. Von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4), 2007. 9
2010
143
3,903
Online Learning for Latent Dirichlet Allocation Matthew D. Hoffman Department of Computer Science Princeton University Princeton, NJ mdhoffma@cs.princeton.edu David M. Blei Department of Computer Science Princeton University Princeton, NJ blei@cs.princeton.edu Francis Bach INRIA—Ecole Normale Sup´erieure Paris, France francis.bach@ens.fr Abstract We develop an online variational Bayes (VB) algorithm for Latent Dirichlet Allocation (LDA). Online LDA is based on online stochastic optimization with a natural gradient step, which we show converges to a local optimum of the VB objective function. It can handily analyze massive document collections, including those arriving in a stream. We study the performance of online LDA in several ways, including by fitting a 100-topic topic model to 3.3M articles from Wikipedia in a single pass. We demonstrate that online LDA finds topic models as good or better than those found with batch VB, and in a fraction of the time. 1 Introduction Hierarchical Bayesian modeling has become a mainstay in machine learning and applied statistics. Bayesian models provide a natural way to encode assumptions about observed data, and analysis proceeds by examining the posterior distribution of model parameters and latent variables conditioned on a set of observations. For example, research in probabilistic topic modeling—the application we will focus on in this paper—revolves around fitting complex hierarchical Bayesian models to large collections of documents. In a topic model, the posterior distribution reveals latent semantic structure that can be used for many applications. For topic models and many other Bayesian models of interest, however, the posterior is intractable to compute and researchers must appeal to approximate posterior inference. Modern approximate posterior inference algorithms fall in two categories—sampling approaches and optimization approaches. Sampling approaches are usually based on Markov Chain Monte Carlo (MCMC) sampling, where a Markov chain is defined whose stationary distribution is the posterior of interest. Optimization approaches are usually based on variational inference, which is called variational Bayes (VB) when used in a Bayesian hierarchical model. Whereas MCMC methods seek to generate independent samples from the posterior, VB optimizes a simplified parametric distribution to be close in Kullback-Leibler divergence to the posterior. Although the choice of approximate posterior introduces bias, VB is empirically shown to be faster than and as accurate as MCMC, which makes it an attractive option when applying Bayesian models to large datasets [1, 2, 3]. Nonetheless, large scale data analysis with VB can be computationally difficult. Standard “batch” VB algorithms iterate between analyzing each observation and updating dataset-wide variational parameters. The per-iteration cost of batch algorithms can quickly become impractical for very large datasets. In topic modeling applications, this issue is particularly relevant—topic modeling promises 1 4096 systems health communication service billion language care road 8192 service systems health companies market communication company billion 12288 service systems companies business company billion health industry 16384 service companies systems business company industry market billion 32768 business service companies industry company management systems services 49152 business service companies industry services company management public 2048 systems road made service announced national west language 65536 business industry service companies services company management public Documents analyzed Top eight words Documents seen (log scale) Perplexity 600 650 700 750 800 850 900 103.5 104 104.5 105 105.5 106 106.5 Batch 98K Online 98K Online 3.3M Figure 1: Top: Perplexity on held-out Wikipedia documents as a function of number of documents analyzed, i.e., the number of E steps. Online VB run on 3.3 million unique Wikipedia articles is compared with online VB run on 98,000 Wikipedia articles and with the batch algorithm run on the same 98,000 articles. The online algorithms converge much faster than the batch algorithm does. Bottom: Evolution of a topic about business as online LDA sees more and more documents. to summarize the latent structure of massive document collections that cannot be annotated by hand. A central research problem for topic modeling is to efficiently fit models to larger corpora [4, 5]. To this end, we develop an online variational Bayes algorithm for latent Dirichlet allocation (LDA), one of the simplest topic models and one on which many others are based. Our algorithm is based on online stochastic optimization, which has been shown to produce good parameter estimates dramatically faster than batch algorithms on large datasets [6]. Online LDA handily analyzes massive collections of documents and, moreover, online LDA need not locally store or collect the documents— each can arrive in a stream and be discarded after one look. In the subsequent sections, we derive online LDA and show that it converges to a stationary point of the variational objective function. We study the performance of online LDA in several ways, including by fitting a topic model to 3.3M articles from Wikipedia without looking at the same article twice. We show that online LDA finds topic models as good as or better than those found with batch VB, and in a fraction of the time (see figure 1). Online variational Bayes is a practical new method for estimating the posterior of complex hierarchical Bayesian models. 2 Online variational Bayes for latent Dirichlet allocation Latent Dirichlet Allocation (LDA) [7] is a Bayesian probabilistic model of text documents. It assumes a collection of K “topics.” Each topic defines a multinomial distribution over the vocabulary and is assumed to have been drawn from a Dirichlet, βk ∼Dirichlet(η). Given the topics, LDA assumes the following generative process for each document d. First, draw a distribution over topics θd ∼Dirichlet(α). Then, for each word i in the document, draw a topic index zdi ∈{1, . . . , K} from the topic weights zdi ∼θd and draw the observed word wdi from the selected topic, wdi ∼βzdi. For simplicity, we assume symmetric priors on θ and β, but this assumption is easy to relax [8]. Note that if we sum over the topic assignments z, then we get p(wdi|θd, β) = P k θdkβkw. This leads to the “multinomial PCA” interpretation of LDA; we can think of LDA as a probabilistic factorization of the matrix of word counts n (where ndw is the number of times word w appears in document d) into a matrix of topic weights θ and a dictionary of topics β [9]. Our work can thus 2 be seen as an extension of online matrix factorization techniques that optimize squared error [10] to more general probabilistic formulations. We can analyze a corpus of documents with LDA by examining the posterior distribution of the topics β, topic proportions θ, and topic assignments z conditioned on the documents. This reveals latent structure in the collection that can be used for prediction or data exploration. This posterior cannot be computed directly [7], and is usually approximated using Markov Chain Monte Carlo (MCMC) methods or variational inference. Both classes of methods are effective, but both present significant computational challenges in the face of massive data sets.Developing scalable approximate inference methods for topic models is an active area of research [3, 4, 5, 11]. To this end, we develop online variational inference for LDA, an approximate posterior inference algorithm that can analyze massive collections of documents. We first review the traditional variational Bayes algorithm for LDA and its objective function, then present our online method, and show that it converges to a stationary point of the same objective function. 2.1 Batch variational Bayes for LDA In Variational Bayesian inference (VB) the true posterior is approximated by a simpler distribution q(z, θ, β), which is indexed by a set of free parameters [12, 13]. These parameters are optimized to maximize the Evidence Lower BOund (ELBO): log p(w|α, η) ≥L(w, φ, γ, λ) ≜Eq[log p(w, z, θ, β|α, η)] −Eq[log q(z, θ, β)]. (1) Maximizing the ELBO is equivalent to minimizing the KL divergence between q(z, θ, β) and the posterior p(z, θ, β|w, α, η). Following [7], we choose a fully factorized distribution q of the form q(zdi = k) = φdwdik; q(θd) = Dirichlet(θd; γd); q(βk) = Dirichlet(βk; λk), (2) The posterior over the per-word topic assignments z is parameterized by φ, the posterior over the perdocument topic weights θ is parameterized by θ, and the posterior over the topics β is parameterized by λ. As a shorthand, we refer to λ as “the topics.” Equation 1 factorizes to L(w, φ, γ, λ) = P d  Eq[log p(wd|θd, zd, β)] + Eq[log p(zd|θd)] −Eq[log q(zd)] + Eq[log p(θd|α)] −Eq[log q(θd)] + (Eq[log p(β|η)] −Eq[log q(β)])/D . (3) Notice we have brought the per-corpus terms into the summation over documents, and divided them by the number of documents D. This step will help us to derive an online inference algorithm. We now expand the expectations above to be functions of the variational parameters. This reveals that the variational objective relies only on ndw, the number of times word w appears in document d. When using VB—as opposed to MCMC—documents can be summarized by their word counts, L = P d P w ndw P k φdwk(Eq[log θdk] + Eq[log βkw] −log φdwk) −log Γ(P k γdk) + P k(α −γdk)Eq[log θdk] + log Γ(γdk) + (P k −log Γ(P w λkw) + P w(η −λkw)Eq[log βkw] + log Γ(λkw))/D + log Γ(Kα) −K log Γ(α) + (log Γ(Wη) −W log Γ(η))/D ≜P d ℓ(nd, φd, γd, λ), (4) where W is the size of the vocabulary and D is the number of documents. ℓ(nd, φd, γd, λ) denotes the contribution of document d to the ELBO. L can be optimized using coordinate ascent over the variational parameters φ, γ, λ [7]: φdwk ∝exp{Eq[log θdk] + Eq[log βkw]}; γdk = α + P w ndwφdwk; λkw = η + P d ndwφdwk. (5) The expectations under q of log θ and log β are Eq[log θdk] = Ψ(γdk) −Ψ(PK i=1 γdi); Eq[log βkw] = Ψ(λkw) −Ψ(PW i=1 λki), (6) where Ψ denotes the digamma function (the first derivative of the logarithm of the gamma function). The updates in equation 5 are guaranteed to converge to a stationary point of the ELBO. By analogy to the Expectation-Maximization (EM) algorithm [14], we can partition these updates into an “E” step—iteratively updating γ and φ until convergence, holding λ fixed—and an “M” step—updating λ given φ. In practice, this algorithm converges to a better solution if we reinitialize γ and φ before each E step. Algorithm 1 outlines batch VB for LDA. 3 Algorithm 1 Batch variational Bayes for LDA Initialize λ randomly. while relative improvement in L(w, φ, γ, λ) > 0.00001 do E step: for d = 1 to D do Initialize γdk = 1. (The constant 1 is arbitrary.) repeat Set φdwk ∝exp{Eq[log θdk] + Eq[log βkw]} Set γdk = α + P w φdwkndw until 1 K P k |change inγdk| < 0.00001 end for M step: Set λkw = η + P d ndwφdwk end while 2.2 Online variational inference for LDA Algorithm 1 has constant memory requirements and empirically converges faster than batch collapsed Gibbs sampling [3]. However, it still requires a full pass through the entire corpus each iteration. It can therefore be slow to apply to very large datasets, and is not naturally suited to settings where new data is constantly arriving. We propose an online variational inference algorithm for fitting λ, the parameters to the variational posterior over the topic distributions β. Our algorithm is nearly as simple as the batch VB algorithm, but converges much faster for large datasets. A good setting of the topics λ is one for which the ELBO L is as high as possible after fitting the per-document variational parameters γ and φ with the E step defined in algorithm 1. Let γ(nd, λ) and φ(nd, λ) be the values of γd and φd produced by the E step. Our goal is to set λ to maximize L(n, λ) ≜P d ℓ(nd, γ(nd, λ), φ(nd, λ), λ), (7) where ℓ(nd, γd, φd, λ) is the dth document’s contribution to the variational bound in equation 4. This is analogous to the goal of least-squares matrix factorization, although the ELBO for LDA is less convenient to work with than a simple squared loss function such as the one in [10]. Online VB for LDA (“online LDA”) is described in algorithm 2. As the tth vector of word counts nt is observed, we perform an E step to find locally optimal values of γt and φt, holding λ fixed. We then compute ˜λ, the setting of λ that would be optimal (given φt) if our entire corpus consisted of the single document nt repeated D times. D is the number of unique documents available to the algorithm, e.g. the size of a corpus. (In the true online case D →∞, corresponding to empirical Bayes estimation of β.) We then update λ using a weighted average of its previous value and ˜λ. The weight given to ˜λ is given by ρt ≜(τ0 + t)−κ, where κ ∈(0.5, 1] controls the rate at which old values of ˜λ are forgotten and τ0 ≥0 slows down the early iterations of the algorithm. The condition that κ ∈(0.5, 1] is needed to guarantee convergence. We show in section 2.3 that online LDA corresponds to a stochastic natural gradient algorithm on the variational objective L [15, 16]. This algorithm closely resembles one proposed in [16] for online VB on models with hidden data— the most important difference is that we use an approximate E step to optimize γt and φt, since we cannot compute the conditional distribution p(zt, θt|β, nt, α) exactly. Mini-batches. A common technique in stochastic learning is to consider multiple observations per update to reduce noise [6, 17]. In online LDA, this means computing ˜λ using S > 1 observations: ˜λkw = η + D S P s ntskφtskw, (8) where nts is the sth document in mini-batch t. The variational parameters φts and γts for this document are fit with a normal E step. Note that we recover batch VB when S = D and κ = 0. Hyperparameter estimation. In batch variational LDA, point estimates of the hyperparameters α and η can be fit given γ and λ using a linear-time Newton-Raphson method [7]. We can likewise 4 Algorithm 2 Online variational Bayes for LDA Define ρt ≜(τ0 + t)−κ Initialize λ randomly. for t = 0 to ∞do E step: Initialize γtk = 1. (The constant 1 is arbitrary.) repeat Set φtwk ∝exp{Eq[log θtk] + Eq[log βkw]} Set γtk = α + P w φtwkntw until 1 K P k |change inγtk| < 0.00001 M step: Compute ˜λkw = η + Dntwφtwk Set λ = (1 −ρt)λ + ρt˜λ. end for incorporate updates for α and η into online LDA: α ←α −ρt˜α(γt); η ←η −ρt˜η(λ), (9) where ˜α(γt) is the inverse of the Hessian times the gradient ∇αℓ(nt, γt, φt, λ), ˜η(λ) is the inverse of the Hessian times the gradient ∇ηL, and ρt ≜(τ0 + t)−κ as elsewhere. 2.3 Analysis of convergence In this section we show that algorithm 2 converges to a stationary point of the objective defined in equation 7. Since variational inference replaces sampling with optimization, we can use results from stochastic optimization to analyze online LDA. Stochastic optimization algorithms optimize an objective using noisy estimates of its gradient [18]. Although there is no explicit gradient computation, algorithm 2 can be interpreted as a stochastic natural gradient algorithm [16, 15]. We begin by deriving a related first-order stochastic gradient algorithm for LDA. Let g(n) denote the population distribution over documents n from which we will repeatedly sample documents: g(n) ≜1 D PD d=1 I[n = nd]. (10) I[n = nd] is 1 if n = nd and 0 otherwise. If this population consists of the D documents in the corpus, then we can rewrite equation 7 as L(g, λ) ≜DEg[ℓ(n, γ(n, λ), φ(n, λ), λ)|λ]. (11) where ℓis defined as in equation 3. We can optimize equation 11 over λ by repeatedly drawing an observation nt ∼g, computing γt ≜γ(nt, λ) and φt ≜φ(nt, λ), and applying the update λ ←λ + ρtD∇λℓ(nt, γt, φt, λ) (12) where ρt ≜(τ0 + t)−κ as in algorithm 2. If we condition on the current value of λ and treat γt and φt as random variables drawn at the same time as each observed document nt, then Eg[D∇λℓ(nt, γt, φt, λ)|λ] = ∇λ P d ℓ(nd, γd, φd, λ). Thus, since P∞ t=0 ρt = ∞and P∞ t=0 ρ2 t < ∞, the analysis in [19] shows both that λ converges and that the gradient ∇λ P d ℓ(nd, γd, φd, λ) converges to 0, and thus that λ converges to a stationary point.1 The update in equation 12 only makes use of first-order gradient information. Stochastic gradient algorithms can be sped up by multiplying the gradient by the inverse of an appropriate positive definite matrix H [19]. One choice for H is the Hessian of the objective function. In variational inference, an alternative is to use the Fisher information matrix of the variational distribution q (i.e., the Hessian of the log of the variational probability density function), which corresponds to using 1Although we use a deterministic procedure to compute γ and φ given n and λ, this analysis can also be applied if γ and φ are optimized using a randomized algorithm. We address this case in the supplement. 5 a natural gradient method instead of a (quasi-) Newton method [16, 15]. Following the analysis in [16], the gradient of the per-document ELBO ℓcan be written as ∂ℓ(nt,γt,φt,λ) ∂λkw = PW v=1 ∂Eq[log βkv] ∂λkw (−λkv/D + η/D + ntvφtvk) = PW v=1 −∂2 log q(βk) ∂λkv∂λkw (−λkv/D + η/D + ntvφtvk), (13) where we have used the fact that Eq[log βkv] is the derivative of the log-normalizer of q(log βk). By definition, multiplying equation 13 by the inverse of the Fisher information matrix yields  −∂2 log q(log βk) ∂λk∂λT k −1 ∂ℓ(nt,γt,φt,λ) ∂λk  w = −λkw/D + η/D + ntwφtwk. (14) Multiplying equation 14 by ρtD and adding it to λkw yields the update for λ in algorithm 2. Thus we can interpret our algorithm as a stochastic natural gradient algorithm, as in [16]. 3 Related work Comparison with other stochastic learning algorithms. In the standard stochastic gradient optimization setup, the number of parameters to be fit does not depend on the number of observations [19]. However, some learning algorithms must also fit a set of per-observation parameters (such as the per-document variational parameters γd and φd in LDA). The problem is addressed by online coordinate ascent algorithms such as those described in [20, 21, 16, 17, 10]. The goal of these algorithms is to set the global parameters so that the objective is as good as possible once the perobservation parameters are optimized. Most of these approaches assume the computability of a unique optimum for the per-observation parameters, which is not available for LDA. Efficient sampling methods. Markov Chain Monte Carlo (MCMC) methods form one class of approximate inference algorithms for LDA. Collapsed Gibbs Sampling (CGS) is a popular MCMC approach that samples from the posterior over topic assignments z by repeatedly sampling the topic assignment zdi conditioned on the data and all other topic assignments [22]. One online MCMC approach adapts CGS by sampling topic assignments zdi based on the topic assignments and data for all previously analyzed words, instead of all other words in the corpus [23]. This algorithm is fast and has constant memory requirements, but is not guaranteed to converge to the posterior. Two alternative online MCMC approaches were considered in [24]. The first, called incremental LDA, periodically resamples the topic assignments for previously analyzed words. The second approach uses particle filtering instead of CGS. In a study in [24], none of these three online MCMC algorithms performed as well as batch CGS. Instead of online methods, the authors of [4] used parallel computing to apply LDA to large corpora. They developed two approximate parallel CGS schemes for LDA that gave similar predictive performance on held-out documents to batch CGS. However, they require parallel hardware, and their complexity and memory costs still scale linearly with the number of documents. Except for the algorithm in [23] (which is not guaranteed to converge), all of the MCMC algorithms described above have memory costs that scale linearly with the number of documents analyzed. By contrast, batch VB can be implemented using constant memory, and parallelizes easily. As we will show in the next section, its online counterpart is even faster. 4 Experiments We ran several experiments to evaluate online LDA’s efficiency and effectiveness. The first set of experiments compares algorithms 1 and 2 on static datasets. The second set of experiments evaluates online VB in the setting where new documents are constantly being observed. Both algorithms were implemented in Python using Numpy. The implementations are as similar as possible.2 2Open-source Python implementations of batch and online LDA can be found at http://www.cs. princeton.edu/˜mdhoffma. 6 Table 1: Best settings of κ and τ0 for various mini-batch sizes S, with resulting perplexities on Nature and Wikipedia corpora. Best parameter settings for Nature corpus S 1 4 16 64 256 1024 4096 16384 κ 0.9 0.8 0.8 0.7 0.6 0.5 0.5 0.5 τ0 1024 1024 1024 1024 1024 256 64 1 Perplexity 1132 1087 1052 1053 1042 1031 1030 1046 Best parameter settings for Wikipedia corpus S 1 4 16 64 256 1024 4096 16384 κ 0.9 0.9 0.8 0.7 0.6 0.5 0.5 0.5 τ0 1024 1024 1024 1024 1024 1024 64 1 Perplexity 675 640 611 595 588 584 580 584 Time in seconds (log scale) Perplexity 1500 2000 2500 101 102 103 104 Batch size 00001 00016 00256 01024 04096 16384 batch10K batch98K Time in seconds (log scale) Perplexity 600 700 800 900 1000 101 102 103 104 Batch size 00001 00016 00256 01024 04096 16384 batch10K batch98K Figure 2: Held-out perplexity obtained on the Nature (left) and Wikipedia (right) corpora as a function of CPU time. For moderately large mini-batch sizes, online LDA finds solutions as good as those that the batch LDA finds, but with much less computation. When fit to a 10,000-document subset of the training corpus batch LDA’s speed improves, but its performance suffers. We use perplexity on held-out data as a measure of model fit. Perplexity is defined as the geometric mean of the inverse marginal probability of each word in the held-out set of documents: perplexity(ntest, λ, α) ≜exp n −(P i log p(ntest i |α, β))/(P i,w ntest iw ) o (15) where nitest denotes the vector of word counts for the ith document. Since we cannot directly compute log p(ntest i |α, β), we use a lower bound on perplexity as a proxy: perplexity(ntest, λ, α) ≤exp n −(P i Eq[log p(ntest i , θi, zi|α, β)] −Eq[log q(θi, zi)])(P i,w ntest iw ) o . (16) The per-document parameters γi and φi for the variational distributions q(θi) and q(zi) are fit using the E step in algorithm 2. The topics λ are fit to a training set of documents and then held fixed. In all experiments α and η are fixed at 0.01 and the number of topics K = 100. There is some question as to the meaningfulness of perplexity as a metric for comparing different topic models [25]. Held-out likelihood metrics are nonetheless well suited to measuring how well an inference algorithm accomplishes the specific optimization task defined by a model. Evaluating learning parameters. Online LDA introduces several learning parameters: κ ∈ (0.5, 1], which controls how quickly old information is forgotten; τ0 ≥0, which downweights early iterations; and the mini-batch size S, which controls how many documents are used each iteration. Although online LDA converges to a stationary point for any valid κ, τ0, and S, the quality of this stationary point and the speed of convergence may depend on how the learning parameters are set. We evaluated a range of settings of the learning parameters κ, τ0, and S on two corpora: 352,549 documents from the journal Nature 3 and 100,000 documents downloaded from the English ver3For the Nature articles, we removed all words not in a pruned vocabulary of 4,253 words. 7 sion of Wikipedia 4. For each corpus, we set aside a 1,000-document test set and a separate 1,000-document validation set. We then ran online LDA for five hours on the remaining documents from each corpus for κ ∈{0.5, 0.6, 0.7, 0.8, 0.9, 1.0}, τ0 ∈{1, 4, 16, 64, 256, 1024}, and S ∈{1, 4, 16, 64, 256, 1024, 4096, 16384}, for a total of 288 runs per corpus. After five hours of CPU time, we computed perplexity on the test sets for the topics λ obtained at the end of each fit. Table 1 summarizes the best settings for each corpus of κ and τ0 for a range of settings of S. The supplement includes a more exhaustive summary. The best learning parameter settings for both corpora were κ = 0.5, τ0 = 64, and S = 4096. The best settings of κ and τ0 are consistent across the two corpora. For mini-batch sizes from 256 to 16384 there is little difference in perplexity scores. Several trends emerge from these results. Higher values of the learning rate κ and the downweighting parameter τ0 lead to better performance for small mini-batch sizes S, but worse performance for larger values of S. Mini-batch sizes of at least 256 documents outperform smaller mini-batch sizes. Comparing batch and online on fixed corpora. To compare batch LDA to online LDA, we evaluated held-out perplexity as a function of time on the Nature and Wikipedia corpora above. We tried various mini-batch sizes from 1 to 16,384, using the best learning parameters for each mini-batch size found in the previous study of the Nature corpus. We also evaluated batch LDA fit to a 10,000document subset of the training corpus. We computed perplexity on a separate validation set from the test set used in the previous experiment. Each algorithm ran for 24 hours of CPU time. Figure 2 summarizes the results. On the larger Nature corpus, online LDA finds a solution as good as the batch algorithm’s with much less computation. On the smaller Wikipedia corpus, the online algorithm finds a better solution than the batch algorithm does. The batch algorithm converges quickly on the 10,000-document corpora, but makes less accurate predictions on held-out documents. True online. To demonstrate the ability of online VB to perform in a true online setting, we wrote a Python script to continually download and analyze mini-batches of articles chosen at random from a list of approximately 3.3 million Wikipedia articles. This script can download and analyze about 60,000 articles an hour. It completed a pass through all 3.3 million articles in under three days. The amount of time needed to download an article and convert it to a vector of word counts is comparable to the amount of time that the online LDA algorithm takes to analyze it. We ran online LDA with κ = 0.5, τ0 = 1024, and S = 1024. Figure 1 shows the evolution of the perplexity obtained on the held-out validation set of 1,000 Wikipedia articles by the online algorithm as a function of number of articles seen. Shown for comparison is the perplexity obtained by the online algorithm (with the same parameters) fit to only 98,000 Wikipedia articles, and that obtained by the batch algorithm fit to the same 98,000 articles. The online algorithm outperforms the batch algorithm regardless of which training dataset is used, but it does best with access to a constant stream of novel documents. The batch algorithm’s failure to outperform the online algorithm on limited data may be due to stochastic gradient’s robustness to local optima [19]. The online algorithm converged after analyzing about half of the 3.3 million articles. Even one iteration of the batch algorithm over that many articles would have taken days. 5 Discussion We have developed online variational Bayes (VB) for LDA. This algorithm requires only a few more lines of code than the traditional batch VB of [7], and is handily applied to massive and streaming document collections. Online VB for LDA approximates the posterior as well as previous approaches in a fraction of the time. The approach we used to derive an online version of batch VB for LDA is general (and simple) enough to apply to a wide variety of hierarchical Bayesian models. Acknowledgments D.M. Blei is supported by ONR 175-6343, NSF CAREER 0745520, AFOSR 09NL202, the Alfred P. Sloan foundation, and a grant from Google. F. Bach is supported by ANR (MGA project). 4For the Wikipedia articles, we removed all words not from a fixed vocabulary of 7,995 common words. This vocabulary was obtained by removing words less than 3 characters long from a list of the 10,000 most common words in Project Gutenberg texts obtained from http://en.wiktionary.org/wiki/Wiktionary:Frequency lists. 8 References [1] M. Braun and J. McAuliffe. Variational inference for large-scale models of discrete choice. arXiv, (0712.2526), 2008. [2] D. Blei and M. Jordan. Variational methods for the Dirichlet process. In Proc. 21st Int’l Conf. on Machine Learning, 2004. [3] A. Asuncion, M. Welling, P. Smyth, and Y.W. Teh. On smoothing and inference for topic models. In Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence, 2009. [4] D. Newman, A. Asuncion, P. Smyth, and M. Welling. Distributed inference for latent Dirichlet allocation. In Neural Information Processing Systems, 2007. [5] Feng Yan, Ningyi Xu, and Yuan Qi. Parallel inference for latent Dirichlet allocation on graphics processing units. In Advances in Neural Information Processing Systems 22, pages 2134–2142, 2009. [6] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems, volume 20, pages 161–168. NIPS Foundation (http://books.nips.cc), 2008. [7] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, January 2003. [8] Hanna Wallach, David Mimno, and Andrew McCallum. Rethinking lda: Why priors matter. In Advances in Neural Information Processing Systems 22, pages 1973–1981, 2009. [9] W. Buntine. Variational extentions to EM and multinomial PCA. In European Conf. on Machine Learning, 2002. [10] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online learning for matrix factorization and sparse coding. Journal of Machine Learning Research, 11(1):19–60, 2010. [11] L. Yao, D. Mimno, and A. McCallum. Efficient methods for topic model inference on streaming document collections. In KDD 2009: Proc. 15th ACM SIGKDD int’l Conf. on Knowledge discovery and data mining, pages 937–946, 2009. [12] M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. Introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999. [13] H. Attias. A variational Bayesian framework for graphical models. In Advances in Neural Information Processing Systems 12, 2000. [14] A. Dempster, N. Laird, and D. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B, 39:1–38, 1977. [15] L. Bottou and N. Murata. Stochastic approximations and efficient learning. The Handbook of Brain Theory and Neural Networks, Second edition. The MIT Press, Cambridge, MA, 2002. [16] M.A. Sato. Online model selection based on the variational Bayes. Neural Computation, 13(7):1649– 1681, 2001. [17] P. Liang and D. Klein. Online EM for unsupervised models. In Proc. Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 611–619, 2009. [18] H. Robbins and S. Monro. A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407, 1951. [19] L. Bottou. Online learning and stochastic approximations. Cambridge University Press, Cambridge, UK, 1998. [20] R.M. Neal and G.E. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. Learning in graphical models, 89:355–368, 1998. [21] M.A. Sato and S. Ishii. On-line EM algorithm for the normalized Gaussian network. Neural Computation, 12(2):407–432, 2000. [22] T. Griffiths and M. Steyvers. Finding scientific topics. Proc. National Academy of Science, 2004. [23] X. Song, C.Y. Lin, B.L. Tseng, and M.T. Sun. Modeling and predicting personal information dissemination behavior. In KDD 2005: Proc. 11th ACM SIGKDD int’l Conf. on Knowledge discovery and data mining. ACM, 2005. [24] K.R. Canini, L. Shi, and T.L. Griffiths. Online inference of topics with latent Dirichlet allocation. In Proceedings of the International Conference on Artificial Intelligence and Statistics, volume 5, 2009. [25] J. Chang, J. Boyd-Graber, S. Gerrish, C. Wang, and D. Blei. Reading tea leaves: How humans interpret topic models. In Advances in Neural Information Processing Systems 21 (NIPS), 2009. 9
2010
144
3,904
Random Projections for k-means Clustering Christos Boutsidis Department of Computer Science RPI Anastasios Zouzias Department of Computer Science University of Toronto Petros Drineas Department of Computer Science RPI Abstract This paper discusses the topic of dimensionality reduction for k-means clustering. We prove that any set of n points in d dimensions (rows in a matrix A ∈Rn×d) can be projected into t = Ω(k/ε2) dimensions, for any ε ∈(0, 1/3), in O(nd⌈ε−2k/ log(d)⌉) time, such that with constant probability the optimal k-partition of the point set is preserved within a factor of 2 + ε. The projection is done by post-multiplying A with a d × t random matrix R having entries +1/ √ t or −1/ √ t with equal probability. A numerical implementation of our technique and experiments on a large face images dataset verify the speed and the accuracy of our theoretical results. 1 Introduction The k-means clustering algorithm [16] was recently recognized as one of the top ten data mining tools of the last fifty years [20]. In parallel, random projections (RP) or the so-called Johnson-Lindenstrauss type embeddings [12] became popular and found applications in both theoretical computer science [2] and data analytics [4]. This paper focuses on the application of the random projection method (see Section 2.3) to the k-means clustering problem (see Definition 1). Formally, assuming as input a set of n points in d dimensions, our goal is to randomly project the points into ˜d dimensions, with ˜d ≪d, and then apply a k-means clustering algorithm (see Definition 2) on the projected points. Of course, one should be able to compute the projection fast without distorting significantly the “clusters” of the original point set. Our algorithm (see Algorithm 1) satisfies both conditions by computing the embedding in time linear in the size of the input and by distorting the “clusters” of the dataset by a factor of at most 2 + ε, for some ε ∈(0, 1/3) (see Theorem 1). We believe that the high dimensionality of modern data will render our algorithm useful and attractive in many practical applications [9]. Dimensionality reduction encompasses the union of two different approaches: feature selection, which embeds the points into a low-dimensional space by selecting actual dimensions of the data, and feature extraction, which finds an embedding by constructing new artificial features that are, for example, linear combinations of the original features. Let A be an n × d matrix containing n d-dimensional points (A(i) denotes the i-th point of the set), and let k be the number of clusters (see also Section 2.2 for more notation). We slightly abuse notation by also denoting by A the n-point set formed by the rows of A. We say that an embedding f : A →R ˜d with f(A(i)) = ˜A(i) for all i ∈[n] and some ˜d < d, preserves the clustering structure of A within a factor φ, for some φ ≥1, if finding an optimal clustering in ˜A and plugging it back to A is only a factor of φ worse than finding the optimal clustering directly in A. Clustering optimality and approximability are formally presented in Definitions 1 and 2, respectively. Prior efforts on designing provably accurate dimensionality reduction methods for k-means clustering include: (i) the Singular Value Decomposition (SVD), where one finds an embedding with image ˜A = UkΣk ∈Rn×k such that the clustering structure is preserved within a factor of two; (ii) random projections, where one projects the input points into t = Ω(log(n)/ε2) dimensions such that with constant probability the clustering structure is preserved within a factor of 1+ε (see Section 2.3); (iii) SVD-based feature selection, where one can use the SVD to find c = Ω(k log(k/ε)/ε2) actual features, i.e. an embedding with image ˜A ∈Rn×c containing (rescaled) columns from A, such that with constant probability the clustering structure is preserved within a factor of 2 + ε. These results are summarized in Table 1. A head-to-head comparison of our algorithm with existing results allows us to claim the following improvements: (i) 1 Year Ref. Description Dimensions Time Accuracy 1999 [6] SVD - feature extraction k O(nd min{n, d}) 2 Folklore RP - feature extraction Ω(log(n)/ε2) O(nd⌈ε−2 log(n)/ log(d)⌉) 1 + ε 2009 [5] SVD - feature selection Ω(k log(k/ε)/ε2) O(nd min{n, d}) 2 + ε 2010 This paper RP - feature extraction Ω(k/ε2) O(nd⌈ε−2k/ log(d)⌉) 2 + ε Table 1: Dimension reduction methods for k-means. In the RP methods the construction is done with random sign matrices and the mailman algorithm (see Sections 2.3 and 3.1, respectively). reduce the running time by a factor of min{n, d}⌈ε2 log(d)/k⌉, while losing only a factor of ε in the approximation accuracy and a factor of 1/ε2 in the dimension of the embedding; (ii) reduce the dimension of the embedding and the running time by a factor of log(n)/k while losing a factor of one in the approximation accuracy; (iii) reduce the dimension of the embedding by a factor of log(k/ε) and the running time by a factor of min{n, d}⌈ε2 log(d)/k⌉, respectively. Finally, we should point out that other techniques, for example the Laplacian scores [10] or the Fisher scores [7], are very popular in applications (see also surveys on the topic [8, 13]). However, they lack a theoretical worst case analysis of the form we describe in this work. 2 Preliminaries We start by formally defining the k-means clustering problem using matrix notation. Later in this section, we precisely describe the approximability framework adopted in the k-means clustering literature and fix the notation. Definition 1. [THE K-MEANS CLUSTERING PROBLEM] Given a set of n points in d dimensions (rows in an n × d matrix A) and a positive integer k denoting the number of clusters, find the n × k indicator matrix Xopt such that Xopt = arg min X∈X A −XX⊤A 2 F . (1) Here X denotes the set of all n× k indicator matrices X. The functional F(A, X) = A −XX⊤A 2 F is the so-called k-means objective function. An n × k indicator matrix has exactly one non-zero element per row, which denotes cluster membership. Equivalently, for all i = 1, . . . , n and j = 1, . . . , k, the i-th point belongs to the j-th cluster if and only if Xij = 1/√zj, where zj denotes the number of points in the corresponding cluster. Note that X⊤X = Ik, where Ik is the k × k identity matrix. 2.1 Approximation Algorithms for k-means clustering Finding Xopt is an NP-hard problem even for k = 2 [3], thus research has focused on developing approximation algorithms for k-means clustering. The following definition captures the framework of such efforts. Definition 2. [K-MEANS APPROXIMATION ALGORITHM] An algorithm is a “γ-approximation” for the k-means clustering problem (γ ≥1) if it takes inputs A and k, and returns an indicator matrix Xγ that satisfies with probability at least 1 −δγ, A −XγX⊤ γ A 2 F ≤γ min X∈X A −XX⊤A 2 F . (2) In the above, δγ ∈[0, 1) is the failure probability of the γ-approximation k-means algorithm. For our discussion, we fix the γ-approximation algorithm to be the one presented in [14], which guarantees γ = 1 + ε′ for any ε′ ∈(0, 1] with running time O(2(k/ε′)O(1)dn). 2.2 Notation Given an n × d matrix A and an integer k with k < min{n, d}, let Uk ∈Rn×k (resp. Vk ∈Rd×k) be the matrix of the top k left (resp. right) singular vectors of A, and let Σk ∈Rk×k be a diagonal matrix containing the top 2 k singular values of A in non-increasing order. If we let ρ be the rank of A, then Aρ−k is equal to A −Ak, with Ak = UkΣkV ⊤ k . By A(i) we denote the i-th row of A. For an index i taking values in the set {1, . . . , n} we write i ∈[n]. We denote, in non-increasing order, the non-negative singular values of A by σi(A) with i ∈[ρ]. ∥A∥F and ∥A∥2 denote the Frobenius and the spectral norm of a matrix A, respectively. A† denotes the pseudo-inverse of A, i.e. the unique d × n matrix satisfying A = AA†A, A†AA† = A†, (AA†)⊤= AA†, and (A†A)⊤= A†A. Note also that A† 2 = σ1(A†) = 1/σρ(A) and ∥A∥2 = σ1(A) = 1/σρ(A†). A useful property of matrix norms is that for any two matrices C and T of appropriate dimensions, ∥CT ∥F ≤∥C∥F ∥T ∥2; this is a stronger version of the standard submultiplicavity property. We call P a projector matrix if it is square and P 2 = P. We use E [Y ] and Var [Y ] to take the expectation and the variance of a random variable Y and P (e) to take the probability of an event e. We abbreviate “independent identically distributed” to “i.i.d.” and “with probability” to “w.p.”. Finally, all logarithms are base two. 2.3 Random Projections A classical result of Johnson and Lindenstrauss states that any n-point set in d dimensions - rows in a matrix A ∈Rn×d - can be linearly projected into t = Ω(log(n)/ε2) dimensions while preserving pairwise distances within a factor of 1±ε using a random orthonormal matrix [12]. Subsequent research simplified the proof of the above result by showing that such a projection can be generated using a d × t random Gaussian matrix R, i.e., a matrix whose entries are i.i.d. Gaussian random variables with zero mean and variance 1/ √ t [11]. More precisely, the following inequality holds with high probability over the randomness of R, (1 −ε) A(i) −A(j) 2 ≤ A(i)R −A(j)R 2 ≤(1 + ε) A(i) −A(j) 2 . (3) Notice that such an embedding ˜A = AR preserves the metric structure of the point-set, so it also preserves, within a factor of 1 + ε, the optimal value of the k-means objective function of A. Achlioptas proved that even a (rescaled) random sign matrix suffices in order to get the same guarantees as above [1], an approach that we adopt here (see step two in Algorithm 1). Moreover, in this paper we will heavily exploit the structure of such a random matrix, and obtain, as an added bonus, savings on the computation of the projection. 3 A random-projection-type k-means algorithm Algorithm 1 takes as inputs the matrix A ∈Rn×d, the number of clusters k, an error parameter ε ∈(0, 1/3), and some γ-approximation k-means algorithm. It returns an indicator matrix X˜γ determining a k-partition of the rows of A. Input: n × d matrix A (n points, d features), number of clusters k, error parameter ε ∈(0, 1/3), and γ-approximation k-means algorithm. Output: Indicator matrix X˜γ determining a k-partition on the rows of A. 1. Set t = Ω(k/ε2), i.e. set t = to ≥ck/ε2 for a sufficiently large constant c. 2. Compute a random d × t matrix R as follows. For all i ∈[d], j ∈[t] Rij = +1/ √ t, w.p. 1/2, −1/ √ t, w.p. 1/2. 3. Compute the product ˜A = AR. 4. Run the γ-approximation algorithm on ˜A to obtain X˜γ; Return the indicator matrix X˜γ Algorithm 1: A random projection algorithm for k-means clustering. 3.1 Running time analysis Algorithm 1 reduces the dimensions of A by post-multiplying it with a random sign matrix R. Interestingly, any “random projection matrix” R that respects the properties of Lemma 2 with t = Ω(k/ε2) can be used in this step. If R is constructed as in Algorithm 1, one can employ the so-called mailman algorithm for matrix multiplication [15] and 3 compute the product AR in O(nd⌈ε−2k/ log(d)⌉) time. Indeed, the mailman algorithm computes (after preprocessing 1) a matrix-vector product of any d-dimensional vector (row of A) with an d × log(d) sign matrix in O(d) time. By partitioning the columns of our d × t matrix R into ⌈t/ log(d)⌉blocks, the claim follows. Notice that when k = O(log(d)), then we get an - almost - linear time complexity O(nd/ε2). The latter assumption is reasonable in our setting since the need for dimension reduction in k-means clustering arises usually in high-dimensional data (large d). Other choices of R would give the same approximation results; the time complexity to compute the embedding would be different though. A matrix where each entry is a random Gaussian variable with zero mean and variance 1/ √ t would imply an O(knd/ε2) time complexity (naive multiplication). In our experiments in Section 5 we experiment with the matrix R described in Algorithm 1 and employ MatLab’s matrix-matrix BLAS implementation to proceed in the third step of the algorithm. We also experimented with a novel MatLab/C implementation of the mailman algorithm but, in the general case, we were not able to outperform MatLab’s built-in routines (see section 5.2). Finally, note that any γ-approximation algorithm may be used in the last step of Algorithm 1. Using, for example, the algorithm of [14] with γ = 1 + ε would result in an algorithm that preserves the clustering within a factor of 2 + ε, for any ε ∈(0, 1/3), running in time O(nd⌈ε−2k/ log(d)⌉+ 2(k/ε)O(1)kn/ε2). In practice though, the Lloyd algorithm [16, 17] is very popular and although it does not admit a worst case theoretical analysis, it empirically does well. We thus employ the Lloyd algorithm for our experimental evaluation of our algorithm in Section 5. Note that, after using the proposed dimensionality reduction method, the cost of the Lloyd heuristic is only O(nk2/ε2) per iteration. This should be compared to the cost of O(knd) per iteration if applied on the original high dimensional data. 4 Main Theorem Theorem 1 is our main quality-of-approximation result for Algorithm 1. Notice that if γ = 1, i.e. if the k-means problem with inputs ˜A and k is solved exactly, Algorithm 1 guarantees a distortion of at most 2 + ε, as advertised. Theorem 1. Let the n × d matrix A and the positive integer k < min{n, d} be the inputs of the k-means clustering problem. Let ε ∈(0, 1/3) and assume access to a γ-approximation k-means algorithm. Run Algorithm 1 with inputs A, k, ε, and the γ-approximation algorithm in order to construct an indicator matrix X˜γ. Then with probability at least 0.97 −δγ, A −X˜γX⊤ ˜γ A 2 F ≤(1 + (1 + ε)γ) A −XoptX⊤ optA 2 F . (4) Proof of Theorem 1 The proof of Theorem 1 employs several results from [19] including Lemma 6, 8 and Corollary 11. We summarize these results in Lemma 2 below. Before employing Corollary 11, Lemma 6, and Lemma 8 from [19] we need to make sure that the matrix R constructed in Algorithm 1 is consistent with Definition 1 and Lemma 5 in [19]. Theorem 1.1 of [1] immediately shows that the random sign matrix R of Algorithm 1 satisfies Definition 1 and Lemma 5 in [19]. Lemma 2. Assume that the matrix R is constructed by using Algorithm 1 with inputs A, k and ε. 1. Singular Values Preservation: For all i ∈[k] and w.p. at least 0.99, |1 −σi(V ⊤ k R)| ≤ε. 2. Matrix Multiplication: For any two matrices S ∈Rn×d and T ∈Rd×k, E h ST −SRR⊤T 2 F i ≤2 t ∥S∥2 F ∥T ∥2 F . 3. Moments: For any C ∈Rn×d: E h ∥CR∥2 F i = ∥C∥2 F and Var [∥CR∥F] ≤2 ∥C∥4 F /t. The first statement above assumes c being sufficiently large (see step 1 of Algorithm 1). We continue with several novel results of general interest. 1Reading the input d × log d sign matrix requires O(d log d) time. However, in our case we only consider multiplication with a random sign matrix, therefore we can avoid the preprocessing step by directly computing a random correspondence matrix as discussed in [15, Preprocessing Section]. 4 Lemma 3. Under the same assumptions as in Lemma 2 and w.p. at least 0.99, (V ⊤ k R) † −(V ⊤ k R)⊤ 2 ≤3ε. (5) Proof. Let Φ = V ⊤ k R; note that Φ is a k × t matrix and the SV D of Φ is Φ = UΦΣΦV ⊤ Φ , where UΦ and ΣΦ are k × k matrices, and VΦ is a t × k matrix. By taking the SVD of (V ⊤ k R) † and (V ⊤ k R)⊤we get (V ⊤ k R) † −(V ⊤ k R)⊤ 2 = VΦΣ−1 Φ U ⊤ Φ −VΦΣΦU ⊤ Φ 2 = VΦ(Σ−1 Φ −ΣΦ)U ⊤ Φ 2 = Σ−1 Φ −ΣΦ 2 , since VΦ and U ⊤ Φ can be dropped without changing any unitarily invariant norm. Let Ψ = Σ−1 Φ −ΣΦ; Ψ is a k × k diagonal matrix. Assuming that, for all i ∈[k], σi(Φ) and τi(Ψ) denote the i-th largest singular value of Φ and the i-th diagonal element of Ψ, respectively, it is τi(Ψ) = 1 −σi(Φ)σk+1−i(Φ) σk+1−i . Since Ψ is a diagonal matrix, ∥Ψ∥2 = max 1≤i≤k τi(Ψ) = max 1≤i≤k 1 −σi(Φ)σk+1−i(Φ) σk+1−i(Φ) . The first statement of Lemma 2, our choice of ε ∈(0, 1/3) and elementary calculations suffice to conclude the proof. Lemma 4. Under the same assumptions as in Lemma 2 and for any n × d matrix C w.p. at least 0.99, ∥CR∥F ≤ p (1 + ε) ∥C∥F . (6) Proof. Notice that there exists a sufficiently large constant c such that t ≥ck/ε2. Then, setting Z = ∥CR∥2 F, using the third statement of Lemma 2, the fact that k ≥1, and Chebyshev’s inequality we get P  |Z −E [Z] | ≥ε ∥C∥2 F  ≤ Var [Z] ε2 ∥C∥4 F ≤ 2 ∥C∥4 F tε2 ∥C∥4 F ≤ 2 ck ≤0.01. The last inequality follows assuming c sufficiently large. Finally, taking square root on both sides concludes the proof. Lemma 5. Under the same assumptions as in Lemma 2 and w.p. at least 0.97, Ak = (AR)(V ⊤ k R) †V ⊤ k + E, (7) where E is an n × d matrix with ∥E∥F ≤4ε ∥A −Ak∥F. Proof. Since (AR)(V ⊤ k R) †V ⊤ k is an n × d matrix, let us write E = Ak −(AR)(V ⊤ k R) †V ⊤ k . Then, setting A = Ak + Aρ−k, and using the triangle inequality we get ∥E∥F ≤ Ak −AkR(V ⊤ k R) †V ⊤ k F + Aρ−kR(V ⊤ k R) †V ⊤ k F . The first statement of Lemma 2 implies that rank(V ⊤ k R) = k thus (V ⊤ k R)(V ⊤ k R) † = Ik, where Ik is the k×k identity matrix. Replacing Ak = UkΣkV ⊤ k and setting (V ⊤ k R)(V ⊤ k R) † = Ik we get that Ak −AkR(V ⊤ k R) †V ⊤ k F = Ak −UkΣkV ⊤ k R(V ⊤ k R) †V ⊤ k F = Ak −UkΣkV ⊤ k F = 0. To bound the second term above, we drop V ⊤ k , add and subtract the matrix Aρ−kR(V ⊤ k R)⊤V ⊤ k , and use the triangle inequality and submultiplicativity: Aρ−kR(V ⊤ k R) †V ⊤ k F ≤ Aρ−kR(V ⊤ k R)⊤ F + Aρ−kR((V ⊤ k R) † −(V ⊤ k R)⊤) F ≤ Aρ−kRR⊤Vk F + ∥Aρ−kR∥F (V ⊤ k R) † −(V ⊤ k R)⊤ 2 . 5 Now we will bound each term individually. A crucial observation for bounding the first term is that Aρ−kVk = Uρ−kΣρ−kV ⊤ ρ−kVk = 0 by orthogonality of the columns of Vk and Vρ−k. This term now can be bounded using the second statement of Lemma 2 with S = Aρ−k and T = Vk. This statement, assuming c sufficiently large, and an application of Markov’s inequality on the random variable Aρ−kRR⊤Vk −Aρ−kVk F give that w.p. at least 0.99, Aρ−kRR⊤Vk F ≤0.5ε ∥Aρ−k∥F . (8) The second two terms can be bounded using Lemma 3 and Lemma 4 on C = Aρ−k. Hence by applying a union bound on Lemma 3, Lemma 4 and Inq. (8), we get that w.p. at least 0.97, ∥E∥F ≤ Aρ−kRR⊤Vk F + ∥Aρ−kR∥F (V ⊤ k R) † −(V ⊤ k R)⊤ 2 ≤ 0.5ε ∥Aρ−k∥F + p (1 + ε) ∥Aρ−k∥F · 3ε ≤ 0.5ε ∥Aρ−k∥F + 3.5ε ∥Aρ−k∥F = 4ε · ∥Aρ−k∥F . The last inequality holds thanks to our choice of ε ∈(0, 1/3). Proposition 6. A well-known property connects the SVD of a matrix and k-means clustering. Recall Definition 1, and notice that XoptX⊤ optA is a matrix of rank at most k. From the SVD optimality we immediately get that ∥Aρ−k∥2 F = ∥A −Ak∥2 F ≤ A −XoptX⊤ optA 2 F . (9) 4.1 The proof of Eqn. (4) of Theorem 1 We start by manipulating the term A −X˜γX⊤ ˜γ A 2 F in Eqn. (4). Replacing A by Ak + Aρ−k, and using the Pythagorean theorem (the subspaces spanned by the components Ak −X˜γX⊤ ˜γ Ak and Aρ−k −X˜γX⊤ ˜γ Aρ−k are perpendicular) we get A −X˜γX⊤ ˜γ A 2 F = (I −X˜γX⊤ ˜γ )Ak 2 F | {z } θ2 1 + (I −X˜γX⊤ ˜γ )Aρ−k 2 F | {z } θ2 2 . (10) We first bound the second term of Eqn. (10). Since I −X˜γX⊤ ˜γ is a projector matrix, it can be dropped without increasing a unitarily invariant norm. Now Proposition 6 implies that θ2 2 ≤∥Aρ−k∥2 F ≤ A −XoptX⊤ optA 2 F . (11) We now bound the first term of Eqn. (10): θ1 ≤ (I −X˜γX⊤ ˜γ )AR(VkR)†V ⊤ k F + ∥E∥F (12) ≤ (I −X˜γX⊤ ˜γ )AR F (VkR)† 2 + ∥E∥F (13) ≤ √γ (I −XoptX⊤ opt)AR F (VkR)† 2 + ∥E∥F (14) ≤ √γ p (1 + ε) (I −XoptX⊤ opt)A F 1 1 −ε + 4ε (I −XoptX⊤ opt)A F (15) ≤ √γ(1 + 2.5ε) (I −XoptX⊤ opt)A F + √γ 4ε (I −XoptX⊤ opt)A F (16) ≤ √γ(1 + 6.5ε) (I −XoptX⊤ opt)A F (17) In Eqn. (12) we used Lemma 5, the triangle inequality, and the fact that I −˜Xγ ˜X⊤ γ is a projector matrix and can be dropped without increasing a unitarily invariant norm. In Eqn. (13) we used submultiplicativity (see Section 2.2) and the fact that V ⊤ k can be dropped without changing the spectral norm. In Eqn. (14) we replaced X˜γ by Xopt and the factor √γ appeared in the first term. To better understand this step, notice that X˜γ gives a γ-approximation to the optimal k-means clustering of the matrix AR, and any other n × k indicator matrix (for example, the matrix Xopt) satisfies I −X˜γX⊤ ˜γ  AR 2 F ≤γ min X∈X (I −XX⊤)AR 2 F ≤γ I −XoptX⊤ opt  AR 2 F . 6 0 50 100 150 200 250 300 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 F vs. t number of dimensions t normalized objective function value F 0 50 100 150 200 250 300 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 P vs. t number of dimensions t Mis−classification rate P 0 50 100 150 200 250 300 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 T vs. t number of dimensions t Time of k−means procedure in seconds T Figure 1: The results of our experiments after running Algorithm 1 with k = 40 on the face images collection. In Eqn. (15) we used Lemma 4 with C = (I −XoptX⊤ opt)A, Lemma 3 and Proposition 6. In Eqn. (16) we used the fact that γ ≥1 and that for any ε ∈(0, 1/3) it is (√1 + ε)/(1 −ε) ≤1 + 2.5ε. Taking squares in Eqn. (17) we get θ2 1 ≤γ(1 + 28ε) (I −XoptX⊤ opt)A 2 F . Finally, rescaling ε accordingly and applying the union bound on Lemma 5 and Definition 2 concludes the proof. 5 Experiments This section describes an empirical evaluation of Algorithm 1 on a face images collection. We implemented our algorithm in MatLab and compared it against other prominent dimensionality reduction techniques such as the Local Linear Embedding (LLE) algorithm and the Laplacian scores for feature selection. We ran all the experiments on a Mac machine with a dual core 2.26 Ghz processor and 4 GB of RAM. Our empirical findings are very promising indicating that our algorithm and implementation could be very useful in real applications involving clustering of large-scale data. 5.1 An application of Algorithm 1 on a face images collection We experiment with a face images collection. We downloaded the images corresponding to the ORL database from [21]. This collection contains 400 face images of dimensions 64 × 64 corresponding to 40 different people. These images form 40 groups each one containing exactly 10 different images of the same person. After vectorizing each 2-D image and putting it as a row vector in an appropriate matrix, one can construct a 400 × 4096 image-by-pixel matrix A. In this matrix, objects are the face images of the ORL collection while features are the pixel values of the images. To apply the Lloyd’s heuristic on A, we employ MatLab’s function kmeans with the parameter determining the maximum number of repetitions setting to 30. We also chose a deterministic initialization of the Lloyd’s iterative E-M procedure, i.e. whenever we call kmeans with inputs a matrix ˜A ∈R400× ˜d, with ˜d ≥1, and the integer k = 40, we initialize the cluster centers with the 1-st, 11-th,..., 391-th rows of ˜A, respectively. Note that this initialization corresponds to picking images from the forty different groups of the available collection, since the images of every group are stored sequentially in A. We evaluate the clustering outcome from two different perspectives. First, we measure and report the objective function F of the k-means clustering problem. In particular, we report a normalized version of F, i.e. ˜F = F/||A||2 F . Second, we report the mis-classification accuracy of the clustering result. We denote this number by P (0 ≤P ≤1), where P = 0.9, for example, implies that 90% of the objects were assigned to the correct cluster after the application of the clustering algorithm. In the sequel, we first perform experiments by running Algorithm 1 with everything fixed but t, which denotes the dimensionality of the projected data. Then, for four representative values of t, we compare Algorithm 1 with three other dimensionality reduction methods as well with the approach of running the Lloyd’s heuristic on the original high dimensional data. We run Algorithm 1 with t = 5, 10, ..., 300 and k = 40 on the matrix A described above. Figure 1 depicts the results of our experiments. A few interesting observations are immediate. First, the normalized objective function ˜F is a piece-wise non-increasing function of the number of dimensions t. The decrease in ˜F is large in the first few choices 7 SVD LLE LS HD RP t = 10 P F 0.5900 0.0262 0.6500 0.0245 0.3400 0.0380 0.6255 0.0220 0.4225 0.0283 t = 20 P F 0.6750 0.0268 0.7125 0.0247 0.3875 0.0362 0.6255 0.0220 0.4800 0.0255 t = 50 P F 0.7650 0.0269 0.7725 0.0258 0.4575 0.0319 0.6255 0.0220 0.6425 0.0234 t = 100 P F 0.6500 0.0324 0.6150 0.0337 0.4850 0.0278 0.6255 0.0220 0.6575 0.0219 Table 2: Numerics from our experiments with five different methods. of t; then, increasing the number of dimensions t of the projected data decreases ˜F by a smaller value. The increase of t seems to become irrelevant after around t = 90 dimensions. Second, the mis-classification rate P is a piece-wise non-decreasing function of t. The increase of t seems to become irrelevant again after around t = 90 dimensions. Another interesting observation of these two plots is that the mis-classification rate is not directly relevant to the objective function F. Notice, for example, that the two have different behavior from t = 20 to t = 25 dimensions. Finally, we report the running time T of the algorithm which includes only the clustering step. Notice that the increase in the running time is - almost - linear with the increase of t. The non-linearities in the plot are due to the fact that the number of iterations that are necessary to guarantee convergence of the Lloyd’s method are different for different values of t. This observation indicates that small values of t result to significant computational savings, especially when n is large. Compare, for example, the one second running time that is needed to solve the k-means problem when t = 275 against the 10 seconds that are necessary to solve the problem on the high dimensional data. To our benefit, in this case, the multiplication AR takes only 0.1 seconds resulting to a total running time of 1.1 seconds which corresponds to an almost 90% speedup of the overall procedure. We now compare our algorithm against other dimensionality reduction techniques. In particular, in this paragraph we present head-to-head comparisons for the following five methods: (i) SVD: the Singular Value Decomposition (or Principal Components Analysis) dimensionality reduction approach - we use MatLab’s svds function; (ii) LLE: the famous Local Linear Embedding algorithm of [18] - we use the MatLab code from [23] with the parameter K determining the number of neighbors setting equal to 40; (iii) LS: the Laplacian score feature selection method of [10] - we use the MatLab code from [22] with the default parameters2; (v) HD: we run the k-means algorithm on the High Dimensional data; and (vi) RP: the random projection method we proposed in this work - we use our own MatLab implementation. The results of our experiments on A, k = 40 and t = 10, 20, 50, 100 are shown in Table 2. In terms of computational complexity, for example t = 50, the time (in seconds) needed for all five methods (only the dimension reduction step) are TSV D = 5.9, TLLE = 4.4, TLS = 0.32, THD = 0, and TRP = 0.03. Notice that our algorithm is much faster than the other approaches while achieving worse (t = 10, 20), slightly worse (t = 50) or slightly better (t = 100) approximation accuracy results. 5.2 A note on the mailman algorithm for matrix-matrix and matrix-vector multiplication In this section, we compare three different implementations of the third step of Algorithm 1. As we already discussed in Section 3.1, the mailman algorithm is asymptotically faster than naively multiplying the two matrices A and R. In this section we want to understand whether this asymptotic behavior of the mailman algorithm is indeed achieved in a practical implementation. We compare three different approaches for the implementation of the third step of our algorithm: the first is MatLab’s function times(A, R) (MM1); the second exploits the fact that we do not need to explicitly store the whole matrix R, and that the computation can be performed on the fly (column-by-column)(MM2); the last is the mailman algorithm [15] (see Section 3.1 for more details). We implemented the last two algorithms in C using MatLab’s MEX technology. We observed that when A is a vector (n = 1), then the mailman algorithm is indeed faster than (MM1) and (MM2) as it is also observed in the numerical experiments of [15]. Moreover, it’s worth-noting that (MM2) is also superior compared to (MM1). On the other hand, our best implementation of the mailman algorithm for matrix-matrix operations is inferior to both (MM1) and (MM2) for any 10 ≤n ≤10, 000. Based on these findings, we chose to use (MM1) for our experimental evaluations. Acknowledgments: Christos Boutsidis was supported by NSF CCF 0916415 and a Gerondelis Foundation Fellowship; Petros Drineas was partially supported by an NSF CAREER Award and NSF CCF 0916415. 2In particular, we run W = constructW (A); Scores = LaplacianScore(A, W ); 8 References [1] D. Achlioptas. Database-friendly random projections: Johnson-Lindenstrauss with binary coins. Journal of Computer and System Science, 66(4):671–687, 2003. [2] N. Ailon and B. Chazelle. Approximate nearest neighbors and the fast Johnson-Lindenstrauss transform. In ACM Symposium on Theory of Computing (STOC), pages 557–563, 2006. [3] D. Aloise, A. Deshpande, P. Hansen, and P. Popat. NP-hardness of Euclidean sum-of-squares clustering. Machine Learning, 75(2):245–248, 2009. [4] E. Bingham and H. Mannila. Random projection in dimensionality reduction: applications to image and text data. In ACM SIGKDD international conference on Knowledge discovery and data mining (KDD), pages 245– 250, 2001. [5] C. Boutsidis, M. W. Mahoney, and P. Drineas. Unsupervised feature selection for the k-means clustering problem. In Advances in Neural Information Processing Systems (NIPS), 2009. [6] P. Drineas, A. Frieze, R. Kannan, S. Vempala, and V. Vinay. Clustering in large graphs and matrices. In ACMSIAM Symposium on Discrete Algorithms (SODA), pages 291–299, 1999. [7] D. Foley and J. Sammon. An optimal set of discriminant vectors. IEEE Transactions on Computers, C-24(3):281– 289, March 1975. [8] I. Guyon and A. Elisseeff. An introduction to variable and feature selection. Journal of Machine Learning Research, 3:1157–1182, 2003. [9] I. Guyon, S. Gunn, A. Ben-Hur, and G. Dror. Result analysis of the NIPS 2003 feature selection challenge. In Advances in Neural Information Processing Systems (NIPS), pages 545–552. 2005. [10] X. He, D. Cai, and P. Niyogi. Laplacian score for feature selection. In Advances in Neural Information Processing Systems (NIPS) 18, pages 507–514. 2006. [11] P. Indyk and R. Motwani Approximate nearest neighbors: towards removing the curse of dimensionality. In ACM Symposium on Theory of Computing (STOC), pages 604–613, 1998. [12] W. Johnson and J. Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. Contemporary mathematics, 26(189-206):1–1, 1984. [13] E. Kokiopoulou, J. Chen and Y. Saad. Trace optimization and eigenproblems in dimension reduction methods. Numerical Linear Algebra with Applications, to appear. [14] A. Kumar, Y. Sabharwal, and S. Sen. A simple linear time (1+ε)-approximationalgorithm for k-means clustering in any dimensions. In IEEE Symposium on Foundations of Computer Science (FOCS), pages 454–462, 2004. [15] E. Liberty and S. Zucker. The Mailman algorithm: A note on matrix-vector multiplication. Information Processing Letters, 109(3):179–182, 2009. [16] S. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982. [17] R. Ostrovsky, Y. Rabani, L. J. Schulman, and C. Swamy. The effectiveness of Lloyd-type methods for the k-means problem. In IEEE Symposium on Foundations of Computer Science (FOCS), pages 165–176, 2006. [18] S. Roweis, and L. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:5500, pages 2323-2326, 2000. [19] T. Sarlos. Improved approximation algorithms for large matrices via random projections. In IEEE Symposium on Foundations of Computer Science (FOCS), pages 329–337, 2006. [20] X. Wu et al. Top 10 algorithms in data mining. Knowledge and Information Systems, 14(1):1–37, 2008. [21] http://www.cs.uiuc.edu/˜dengcai2/Data/FaceData.html [22] http://www.cs.uiuc.edu/˜dengcai2/Data/data.html [23] http://www.cs.nyu.edu/˜roweis/lle/ 9
2010
145
3,905
Inference and communication in the game of Password Yang Xu∗and Charles Kemp† Machine Learning Department∗ School of Computer Science∗ Department of Psychology† Carnegie Mellon University {yx1@cs.cmu.edu, ckemp@cmu.edu} Abstract Communication between a speaker and hearer will be most efficient when both parties make accurate inferences about the other. We study inference and communication in a television game called Password, where speakers must convey secret words to hearers by providing one-word clues. Our working hypothesis is that human communication is relatively efficient, and we use game show data to examine three predictions. First, we predict that speakers and hearers are both considerate, and that both take the other’s perspective into account. Second, we predict that speakers and hearers are calibrated, and that both make accurate assumptions about the strategy used by the other. Finally, we predict that speakers and hearers are collaborative, and that they tend to share the cognitive burden of communication equally. We find evidence in support of all three predictions, and demonstrate in addition that efficient communication tends to break down when speakers and hearers are placed under time pressure. 1 Introduction Communication and inference are intimately linked. Suppose, for example, that Joan states that some of her pets are dogs. Under normal circumstances, a hearer will infer that not all of Joan’s pets are dogs on the grounds that Joan would have expressed herself differently if all of her pets were dogs [1]. Inferences like these have been widely studied by linguists and psychologists [2, 3, 4, 5] and are often encountered in everyday settings. One compelling explanation is presented by Levinson [4], who points out that speaking (i.e. phonetic articulation) is substantially slower than thinking (i.e. inference). As a result, communication will be maximally efficient if a speaker’s utterance leaves inferential gaps that will be bridged by the hearer. Inference, however, is not only the responsibility of the hearer. For communication to be maximally efficient, a speaker must take the hearer’s perspective into account (“if I say X, will she infer Y?”). The hearer should therefore allow for inferences on the part of the speaker (“did she think that saying X would lead me to infer Y?”) Considerations of this sort rapidly lead to a game-theoretic regress, and achieving efficient communication under these circumstances begins to look like a very challenging problem. Here we study a simple communication game that allows us to explore inferences made by speakers and hearers. Inference becomes especially important in settings where speakers are prevented from directly expressing the concepts they have in mind, and where utterances are constrained to be short. The television show Password is organized around a game that satisfies both constraints. In this game, a speaker is supplied with a single, secret word (the password) and must communicate this word to a hearer by choosing a single one-word clue. For example, if the password is “mend”, then the speaker might choose “sew” as the clue, and the hearer might guess “stitch” in response. Figure 1 shows several examples drawn from the show—note that communication is successful in the first 1 −8 −6 −4 −2 0 −8 −6 −4 −2 0 password:divide; clue:multiply log forward strength (Sf) log backward strength (Sb) −8 −6 −4 −2 0 −8 −6 −4 −2 0 clue:multiply; guess:divide log forward strength (Hf) log backward strength (Hb) −8 −6 −4 −2 0 −8 −6 −4 −2 0 password:mend; clue:sew Sf Sb −8 −6 −4 −2 0 −8 −6 −4 −2 0 clue:sew; guess:stitch Hf Hb −8 −6 −4 −2 0 −8 −6 −4 −2 0 password:shovel; clue:snow Sf Sb −8 −6 −4 −2 0 −8 −6 −4 −2 0 clue:snow; guess:flake Hf Hb dig dirt needle ski pwd:divide pwd: shovel separate division pwd:mend conquer subtract split part quotient add math numbers rabbit times subtract reproduce factor heal rip bend restore seam break stitch fix clothes pants fabric pin yarn thread spoon spade scoop digger ditch tool pick work cold white hail fall ball Figure 1: Three rounds from the television game show Password. Given each password, the top row plots the forward (Sf: password →clue) and backward (Sb: password ←clue) strengths for several potential clues. The clue chosen by the speaker is circled. Given this clue, the bottom row plots the forward (Hf: clue →guess) and backward (Hb: clue ←guess) strengths for several potential guesses. The guess chosen by the hearer is circled and the password is indicated by an arrow. The first two columns represent two normal rounds, and the final column is a lightning round where speakers and hearers are placed under time pressure. The gray dots in each plot show words that are associated with the password (top row) or clue (bottom row) in the University of Southern Florida word association database. Labels for these words are included where space permits. example but not in the remaining two. The clues and guesses generated by speakers and hearers are obviously much simpler than most real-world linguistic utterances, but studying a setting this simple allows us to develop and evaluate formal models of communication. Our analyses therefore contribute to a growing body of work that uses formal methods to explore the efficiency of human communication [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]. At first sight the optimal strategies for speaker and hearer may seem obvious: the speaker should generate the clue that is associated most strongly with the password, and the hearer should guess the word that is associated most strongly with the clue. Note, however, that word associations are asymmetric. Given a pair of words such as “shovel” and “snow”, the forward association (shovel → snow) may be strong but the backward association (shovel ←snow) may be weak. The third example in Figure 1 shows a case where communication fails because the speaker chooses a clue with a strong forward association but a weak backward association. Although the data include examples like the case just described, we hypothesize that speakers and hearers are both considerate: in other words, that both parties attempt to take the other’s perspective into account. We test this hypothesis by exploring whether speakers and hearers tend to take backward associations into account when generating their clues and guesses. Our second hypothesis is that speaker and hearer are calibrated: in other words, that both make accurate assumptions about the strategy used by the other. Taking the other person’s perspective into account is a good start, but is no guarantee of calibration. Suppose, for example, that the speaker attempts to make the hearer’s task as easy as possible, and considers only backward associations when choosing his clue. This strategy will work best if the hearer considers only forward associates of the clue, but suppose that the hearer considers only backward associations, on the theory that the speaker probably generated his clue by choosing a forward associate. In this case, both parties are considerate but not calibrated, and communication is unlikely to prove successful. 2 Our third hypothesis is that speakers and hearers are collaborative: in other words, that they settle on strategies that tend to share the cognitive burden of communication. In operationalizing this hypothesis we assume that forward associates are easier for people to generate than backward associates. A pair of strategies can be calibrated but not cooperative: for example, the speaker and hearer will be calibrated if both agree that the speaker will consider only forward associates, and the hearer will consider only backward associates. This policy, however, is likely to demand more effort from the hearer than the speaker, and we propose that speakers and hearers will satisfy the principle of least collaborative effort [17, 18] by choosing a calibrated pair of strategies where each person weights forward and backward associates equally. To evaluate our hypotheses we use word association data to analyze the choices made by game show contestants. We first present evidence that speakers and hearers are considerate and take both forward and backward associations into account. We then develop simple models of the speaker and hearer, and use these models to explore the extent to which speakers and hearers weight forward and backward associations. Our results suggest that speakers and hearers are both calibrated and collaborative under normal conditions, but that calibration and collaboration tend to break down under time pressure. 2 Game show and word association data We collected data from the Password game show hosted by Allen Ludden on CBS. Previous researchers have used game show data to explore several aspects of human decision-making [19], but to our knowledge the game of Password has not been previously studied. In each game round, a single English word (the password) is shown to speakers on two competing teams. With each team taking turns, the speaker gives a one-word clue to the hearer and the hearer makes a one-word guess in return. The team that performs best proceeds to the lightning rounds where the same game is played under time pressure. Our data set includes passwords, speaker-generated clues and hearergenerated guesses for 100 normal and 100 lightning rounds sampled from the show episodes during 1962–1967. Each round includes a single password and potentially multiple clues and guesses from both teams. For all our our analyses, we use only the first clue–guess pair in each round. The responses of speakers and hearers are likely to depend heavily on word associations, and we can therefore use word association data to model both speakers and hearers. We used the word association database from the University of South Florida (USF) for all of our analyses [20]. These data were collected using a free association task, where participants were given a cue word and asked to generate a single associate of the cue. More than 6000 participants contributed to the database, and each generated associates for 100–120 English words. To allow for weak associates that were not generated by these participants, we added a count of 1 to the observed frequency for each cuetarget pair in the database. The forward strength (wi →wj) is defined as the proportion of wi trials where wj was generated as an associate. The backward strength (wi ←wj) is proportional to the forward strength (wj →wi) but is normalized with respect to all forward strengths to wi: (wi ←wj) = (wj →wi) P k(wk →wi). (1) Note that this normalization ensures that both forward and backward strengths can be treated as probabilities. The correlation between forward strengths and backward strengths is positive but low (r = 0.32), suggesting that our game show analyses may be able to differentiate the influence of forward and backward associations. The USF database includes associates for a set of 5016 words, and we used this set as the lexicon for all of our analyses. Some of the rounds in our game show data include passwords, clues or guesses that do not appear in this lexicon, and we removed these rounds, leaving 68 password-clue and 68 clue-guess pairs in the normal rounds and 86 password-clue pairs and 80 clue-guess pairs in the lightning rounds. The USF database also includes the frequency of each word in a standard corpus of written English [21], and we use these frequencies in our first analysis. 3 −12 −10 −8 −6 Sf Sb Sf + Sb log normalized rank SN a) i) mean −12 −10 −8 −6 Hf Hb Hf + Hb HN −12 −10 −8 −6 Sf Sb Sf + Sb b) i) SL −12 −10 −8 −6 Hf Hb Hf + Hb HL 0 1 2 3 4 5 0 1 2 3 4 5 SN log backward rank log forward rank ii) r = 0.32 0 1 2 3 4 5 0 1 2 3 4 5 HN r = 0.70 0 1 2 3 4 5 0 1 2 3 4 5 SL ii) r = 0.60 0 1 2 3 4 5 0 1 2 3 4 5 HL r = 0.45 Bb EbWb Cf Bf Ef Wf Cb 0 0.1 0.2 0.3 0.4 0.5 SN iii) normalized count Bb EbWb Cf Bf Ef Wf Cb 0 0.1 0.2 0.3 0.4 0.5 HN Bb EbWb Cf Bf Ef Wf Cb 0 0.1 0.2 0.3 0.4 0.5 SL iii) Bb EbWb Cf Bf Ef Wf Cb 0 0.1 0.2 0.3 0.4 0.5 HL Figure 2: (a) Analyses of the speaker and hearer data (SN and HN) from the normal rounds. (i) Ranks of the human responses normalized with respect to all other words in the lexicon. Ranks are shown along three dimensions: forward strength (f), backward strength (b) and combined forward and backward strengths. The dark square shows the mean rank, and the horizontal lines within the box show the median and interquartile range. The plus symbols are outliers. (ii) Ranks of the human responses along the forward and backward dimensions. (iii) “Matched rank” analysis exploring whether human responses tend to be better along one of the dimensions than alternatives that are matched along the other dimension. The four bars on the left in each subplot show normalized counts based on comparisons with matches along the f dimension, and the four bars on the right are based on matches along the b dimension. For example, group Bb includes human responses that are better along the b dimension compared to matches along the f dimension, and groups Eb and Wb include cases where human responses are equal to or worse than the f-matches. Group Cf includes cases where the human response is top ranked along the f dimension. Groups Bf, Ef, Wf and Cb are defined similarly. (b) Analyses of the lightning rounds. 3 Speakers and hearers are considerate A speaker should find it easy to generate clues that are strong forward associates of a password, and a hearer should likewise find it easy to generate guesses that are strong forward associates of a clue. A considerate speaker, however, may attempt to generate strong backward associates, which will make it easier for the hearer to successfully guess the password. Similarly, a hearer who considers the task faced by the speaker should also take backward associates into account. This section describes some initial analyses that explore whether clues and guesses are shaped by backward associations. Figure 2a.i compares forward and backward strengths as predictors of the responses chosen by speakers and hearers. A dimension is a successful predictor if the words chosen by contestants tend to have low ranks along this dimension with respect to the 5016 words in the lexicon (rank 1 is the top rank). We handle ties using fractional ranking, which means that it is sensible to compare mean ranks along each dimension. In Figure 2a.i, Sf and Sb represent forward (password →clue) and backward (password ←clue) strengths for the speaker, and Hf and Hb represent forward (clue →guess) and 4 backward (clue ←guess) strengths for the hearer. In addition to forward and backward strengths, we also considered word frequency as a predictor. Across both normal (SN and HN) and lightning (SL and HL) rounds, the ranks along the forward and backward dimensions are substantially better than ranks along the frequency dimension (p < 0.01 in pairwise t-tests), and we therefore focus on forward and backward strengths for the rest of our analyses. For data set SN the mean ranks suggest that forward and backward strengths appear to predict choices about equally well. The third dimension Sf + Sb is created by combining dimensions Sf and Sb. Word w1 dominates w2 if it is superior along one dimension and no worse along the other, and the rank for each word along the combined dimension is based on the number of words that dominate it. For data set SN, the mean rank based on the Sf + Sb dimension is lower than that for Sf alone, suggesting that backward strengths make a predictive contribution that goes beyond the information present in the forward associations. Note, however, that the difference between mean ranks for Sf and Sf + Sb is not statistically significant. For data set HN, Figure 2a.i provides little evidence that backward strengths make a contribution that goes beyond the forward strengths. Figure 2a.ii plots the rank of each guess along the dimensions of forward and backward strength. The correlation between the dimensions is relatively high, suggesting that both dimensions tend to capture the information present in the other. As a result, the hearer data set HN may offer little opportunity to explore whether backward and forward associations both contribute to people’s responses. Figure 2a.iii shows the results of an analysis that explores more directly whether each dimension makes a contribution that goes beyond the other. We compared each “actual word” (i.e. each clue or guess chosen by a contestant) to “matched words” that are matched in rank along one of the dimensions. For example, if the backward dimension matters, then the actual words should tend to be better along the b dimension than words that are matched along the f dimension. The first group of bars in Figure 2a.iii shows the proportion of actual words that are better (Bb), equivalent (Eb) or worse (Wb) along the backward dimension than matches along the forward dimension. The Bb bar is higher than the others, suggesting that the backward dimension does indeed make a contribution that goes beyond the forward dimension. Note that a match is defined as a word that is ranked the same as the actual word, or in cases where there are no ties, a word that is ranked one step better. The fourth bar (Cf, for champion along the forward dimension) includes all cases where a word is ranked best along the forward dimension, which means that no match can be found. Our policy for identifying matches is conservative—all other things being equal, actual words should be equivalent (Eb) or worse (Wb) than the matched words, which means that the large Bb bar provides strong evidence that the backward dimension is important. A binomial test confirms that the Bb bar is significantly greater than the Wb bar (p < 0.05). The Bf bar for the speaker data is also high, suggesting that the forward dimension makes a contribution that goes beyond the backward dimension. In other words, Figure 2a.iii suggests that both dimensions influence the responses of the speaker. The results for the hearer data HN provide additional support for the idea that neither dimension predicts hearer guesses better than the other. Note, for example, that the second group of four bars in Figure 2a.iii suggests that the forward dimension is not predictive once the backward dimension is taken into account (Bf is smaller than Wf). This result is consistent with our previous finding that forward and backward strengths are highly correlated in the case of the hearer, and that neither dimension makes a contribution after controlling for the other. Our analyses so far suggest that forward and backward strengths both make independent contributions to the choices made by speakers, but that the hearer data do not allow us to discriminate between these dimensions. Figure 2b shows similar analyses for the lightning rounds. The most notable change is that backward strengths appear to play a much smaller role when speakers are placed under time pressure. For example, Figure 2b.i suggests that backward strengths are now worse than forward strengths at predicting the clues chosen by speakers. Relative to the results for the normal rounds SN, the Bb counts for SL in Figure 2b.iii show a substantial drop (53% decrease) and the Bf counts show an increase of similar scale. χ2 goodness-of-fit tests show that the distributions of counts for both {Bb, Eb, Wb, Cf} and {Bf, Ef, Wf, Cb} in the lightning rounds significantly deviate from those in the normal rounds (p < 0.01). This result provides further evidence that speakers tend to rely more heavily on forward associations than backward associations when placed under time pressure. 5 Speaker distribution pS(c|w) Hearer distribution pH(w|c) S0 (w →c) H0 (c →w) S1 (w ←c) H1 (c ←w) S2 α(2) S (w →c) + β(2) S (w ←c) H2 α(2) H (c →w) + β(2) H (c ←w) ... ... Sn α(n) S (w →c) + β(n) S (w ←c) Hn α(n) H (c →w) + β(n) H (c ←w) Table 1: Strategies for speaker and hearer. In each case we assume that the speaker and hearer sample words from distributions pS(c|w) and pH(w|c) based on the expressions shown. At level 0, both speaker and hearer rely entirely on forward associates, and at level 1, both parties rely entirely on backward associates. For each party, the strategy at level k is the best choice assuming that the other person uses a strategy at a level lower than k. Our previous analyses found little evidence that forward and backward strengths make separate contributions in the case of the hearer, but the lightning data HL suggest that these dimensions may indeed make separate contributions. Figure 2b.iii suggests that time pressure affects these dimensions differently: note that Bb counts decrease by 19% and Bf counts increase by 64%. χ2 tests confirm that the distributions of {Bb, Eb, Wb, Cf} and {Bf, Ef, Wf, Cb} in the lightning rounds significantly deviate from those in the normal rounds (p < 0.01), suggesting that the hearer (like the speaker) tends to rely on forward strengths rather than backward strengths in the lightning rounds. Taken together, the full set of results in Figure 2 suggests that the responses of speakers and hearers are both shaped by backward associates—in other words, that both parties are considerate of the other person’s situation. The evidence in the case of the speaker is relatively strong and all of the analyses we considered suggest that backward associations play a role. The evidence is weaker in the case of the hearer, and only the comparison between normal and lightning rounds suggests that backward associations play some role. 4 Efficient communication: calibration and collaboration Our analyses so far provide some initial evidence that speakers and hearers are both influenced by forward and backward associations. Given this result, we now consider a model that explores how forward and backward associations are combined in generating a response. 4.1 Speaker and hearer models Since both kinds of associations appear to play a role, we explore a simple speaker model which assumes that the clue c chosen for the password w is sampled from a mixture distribution pS(c|w) = αS(w →c) + βS(w ←c) (2) where (w →c) indicates the forward strength from w to c, (w ←c) indicates the backward strength from c to w, and αS and βS are mixture weights that sum to 1. The corresponding hearer model assumes that guess w given clue c is sampled from the mixture distribution pH(w|c) = αH(c →w) + βH(c ←w). (3) Several possible mixture distributions for speaker and hearer are shown in Table 1. For example, the level 0 distributions assume that speaker and hearer both rely entirely on forward associates, and the level 1 distributions assume that both rely entirely on backward associates. By fitting mixture weights to the game show data we can explore the extent to which speaker and hearer rely on forward and backward associations. The mixture models in Equations 2 and 3 can be derived by assuming that the hearer relies on Bayesian inference. Using Bayes’ rule, the hearer distribution pH(w|c) can be expressed as pH(w|c) ∝pS(c|w)p(w). (4) 6 To simplify our analysis we make three assumptions. First, we assume that the prior p(w) in Equation 4 is uniform. Second, we assume that contestants are near-optimal in many respects but that they sample rather than maximize. In other words, we assume that the hearer samples a guess w from the distribution pH(w|c) in Equation 4, and that the speaker samples a clue from a distribution pS(c|w) ∝pH(w|c). Finally, we assume that the normalizing constant in Equation 1 is 1 for all words wi. This assumption seems reasonable since for our smoothed data set the mean value of the normalizing constant is 1 and the standard deviation is 0.04. Our final assumption simplifies matters considerably since it implies that (wi →wj) = (wj ←wi) for all pairs wi and wj. Given these assumptions it is straightforward to show that the level 0 strategies in Table 1 are the best responses to the level 1 strategies, and vice versa. For example, if the speaker uses strategy S0 and samples a clue c from the distribution pS(c|w) = w →c, then Equation 4 suggests that the hearer should sample a guess w from the distribution pH(c|w) ∝(w →c) = (c ←w). Similarly, if the speaker uses the strategy S1 and samples a clue c from the distribution pS(c|w) = (w ←c), then Equation 4 suggests that the hearer should sample a guess w from the distribution pH(c|w) ∝ (w ←c) = (c →w). Suppose now that the hearer is uncertain about the strategy used by the speaker. A level 2 hearer assumes that the speaker could use strategy S0 or strategy S1 and assigns prior probabilities of β(2) H and α(2) H to these speaker strategies. Since H1 is the appropriate response to S0 and H0 is the appropriate response to S1, the level 2 hearer should sample from the distribution pH(w|c) = p(S1)pH(w|c, S1) + p(S0)pH(w|c, S0) = α(2) H (c →w) + β(2) H (c ←w). (5) More generally, suppose that a level n hearer assumes that the speaker uses a strategy from the set {S0, S1, . . . , Sn−1}. Since the appropriate response to any one of these strategies is a mixture similar to Equation 5, it follows that strategy Hn is also a mixture of the distributions (w →c) and (w ←c). A similar result holds for the speaker, and strategy Sn in Table 1 also takes the form of a mixture distribution. Our Bayesian analysis therefore suggests that efficient speakers and hearers can be characterized by the mixture models in Equations 2 and 3. Some pairs of mixture models are calibrated in the sense that the hearer model is the best choice given the speaker model and vice versa. Equation 4 implies that calibration is achieved when the forward weight for the speaker matches the backward weight for the hearer (αS = βH) and the backward weight for the speaker matches the forward weight for the hearer (βS = αH). If game show contestants achieve efficient communication, then mixture weights fit to their responses should come close to satisfying this calibration condition. There are many sets of weights that satisfy the calibration condition. For example, calibration is achieved if the speaker uses strategy S0 and the hearer uses strategy H1. If generating backward associates is more difficult than thinking about forward associates, this solution seems unbalanced since the hearer alone is required to think about backward associates. Consistent with the principle of least collaborative effort, we make a second prediction that speaker and hearer will collaborate and share the communicative burden equally. More precisely, we predict that both parties will assign the same weight to backward associates and that βS will equal βH. Combining our two predictions, we expect that the weights which best characterize human responses will have αS = βS = αH = βH = 0.5. 4.2 Fitting forward and backward mixture weights to the data To evaluate our predictions we assumed that the speaker and hearer are characterized by Equations 2 and 3 and identified the mixture weights that best fit the game show data. Assuming that the M game rounds are independent, the log likelihood for the speaker data is L = log M Y m=1 P(cm|wm) = M X m=1 [αS log(wm →cm) + βS log(wm ←cm)] (6) and a similar expression is used for the hearer data. We fit the weights αS and βS by maximizing the log likelihood in Equation 6. Since this likelihood term is convex and there is a single free parameter (αS +βS = 1), the global optimum can be found by a simple line search over the range 0 < αS < 1. 7 0 0.2 0.4 0.6 0.8 1 mixture weights SN HN SL HL α β S H 0 5 10 response time (sec) normal lightning −2 −1 0 1 2 3 4 log( α β ) SN HN SL HL a) c) b) Figure 3: (a) Fitted mixture weights for the speaker (S) and hearer (H) models based on bootstrapped normal (N) and lightning (L) rounds. α and β are weights on the forward and backward strengths. (b) Log-ratios of α and β weights estimated from bootstrapped normal and lightning rounds. (c) Average response times for speakers choosing clues and hearers choosing guesses in normal and lightning rounds. Averages are computed over 30 rounds randomly sampled from the game show. We ran separate analyses for normal and lightning rounds, and ran similar analyses for the hearer data. 1000 estimates of each mixture weight were computed by bootstrapping game show rounds while keeping tallies of normal and lightning rounds constant. Consistent with our predictions, the results in Figure 3a suggest that all four mixure weights for the normal rounds are relatively close to 0.5. Both speaker and hearer appear to weight forward associates slightly more heavily than backward associates, but 0.5 is within one standard deviation of the bootstrapped estimates in all four cases. The lightning rounds produce a different pattern of results and suggest that the speaker now relies much more heavily on forward than backward associates. Figure 3b shows log ratios of the mixture weights, and indicates that these ratios lie close to 0 (i.e. α = β) in all cases except for the speaker in the lightning rounds. Further confidence tests show that the percentage of bootstrapped ratios exceeding 0 is 100% for the speaker in the lightning rounds, but 85% or lower in the three remaining cases. Consistent with our previous analyses, this result suggests that coordinating with the hearer requires some effort on the part of the speaker, and that this coordination is likely to break down under time pressure. The fitted mixture weights, however, do not confirm the prediction that time pressure makes it difficult for the hearer to consider backward associations. Figure 3c helps to explain why mixture weights for the speaker but not the hearer may differ across normal and lightning rounds. The difference in response times between normal and lightning rounds is substantially greater for the speaker than the hearer, suggesting that any differences between normal and lightning rounds are more likely to emerge for the speaker than the hearer. 5 Conclusion We studied how speakers and hearers communicate in a very simple context. Our results suggest that both parties take the other person’s perspective into account, that both parties make accurate assumptions about the strategy used by the other, and that the burden of communication is equally divided between the two. All of these conclusions support the idea that human communication is relatively efficient. Our results, however, suggest that efficient communication is not trivial to achieve, and tends to break down when speakers are placed under time pressure. Although we worked with simple models of the speaker and hearer, note that neither model is intended to capture psychological processing. Future studies can explore how our models might be implemented by psychologically plausible mechanisms. For example, one possibility is that speakers sample a small set of words with high forward strengths, then choose the word in this sample with greatest backward strength. Different processing models might be considered, but we believe that any successful model of speaker or hearer will need to include some role for inferences about the other person. Acknowledgments This work was supported in part by the Richard King Mellon Foundation (YX) and by NSF grant CDI-0835797 (CK). 8 References [1] L. Horn. Toward a new taxonomy for pragmatic inference: Q-based and R-based implicature. In Meaning, Form, and Use in Context: Linguistic Applications. Georgetown University Press, 1984. [2] P. Grice. Studies in the Way of Words. Harvard University Press, Cambridge, 1989. [3] D. Sperber. Relevance: Communication and Cognition. Blackwell, Oxford, 1986. [4] S. Levinson. Presumptive Meanings: The Theory of Generalized Implicature. MIT Press, Cambridge, 2000. [5] D. Jurafsky. Pragmatics and computational linguistics. In L. R. Horn and G. Ward, editors, Handbook of Pragmatics, pages 578–604. Blackwell, Oxford, 2005. [6] G. K. Zipf, editor. Human behaviour and the principle of least effort: An introduction to human ecology. Addison-Wesley Press, Cambridge, 1949. [7] R. Levy and T. F. Jaeger. Speakers optimize information density through syntactic reduction. In Advances in Neural Information Processing Systems, 2007. [8] T. F. Jaeger. Redundancy and reduction: Speakers manage syntactic information density. Cognitive Psychology, 61(1):23–62, 2010. [9] M. Aylett and A. Turk. The smooth signal redundancy hypothesis: A functional explanation for relationships between redundancy, prosodic prominence, and duration in spontaneous speech. Language and Speech, 47(1):31–56, 2004. [10] S. T. Piantadosi, H. J. Tily, and E. Gibson. The communicative lexicon hypothesis. In The 31st annual meeting of the Cognitive Science Society, 2009. [11] R. Baddeley and D. Attewell. The relationship between language and the environment: information theory shows why we have only three lightness terms. Psychological Science, 20(9):1100–1107, 2009. [12] J. Hawkins. Efficiency and complexity in grammars. Oxford University Press, Oxford, 2004. [13] N. Chomsky. Language and mind: current thoughts on ancient problems. In L. Jenkins, editor, Variations and universals in biolinguistics, pages 379–405. Elsevier, Amsterdam, 2004. [14] R. van Rooy. Conversational implicatures and communication theory. In J. van Kuppevelt and R. Smith, editors, Current and New Directions in Discourse and Dialogue. Kluwer, 2003. [15] C. R. M. McKenzie and J. D. Nelson. What a speaker’s choice of frame reveals: reference points, frame selection, and framing effects. Psychonomic Bullentin and Review, 10, 2003. [16] S. Sher and C. R. M. McKenzie. Information leakage from logically equivalent frames. Cognition, 101:467–494, 2006. [17] H. H. Clark and D. Wilkes-Gibbs. Referring as a collaborative process. Cognition, 22:1–39, 1986. [18] H. H. Clark. Using language. Cambridge University Press, Cambridge, 1996. [19] J. B. Berk, E. Hughson, and K. Vandezande. The price is right, but are the bids? An investigation of rational decision theory. The American Economic Review, 86(4):654–970, 1996. [20] D. L. Nelson, C. L. McEvoy, and T. A. Schreiber. The University of South Florida word association, rhyme, and word fragment norms. http://www.usf.edu/FreeAssociation/, 1998. [21] H. Kucera and W. N. Francis. Computational Analysis of Present-day American Engish. Brown University Press, Providence, 1967. 9
2010
146
3,906
Smoothness, Low-Noise and Fast Rates Nathan Srebro Karthik Sridharan nati@ttic.edu karthik@ttic.edu Toyota Technological Institute at Chicago Ambuj Tewari ambuj@cs.utexas.edu Computer Science Dept., University of Texas at Austin Abstract We establish an excess risk bound of ˜O  HR2 n + √ HL∗Rn  for ERM with an H-smooth loss function and a hypothesis class with Rademacher complexity Rn, where L∗is the best risk achievable by the hypothesis class. For typical hypothesis classes where Rn = p R/n, this translates to a learning rate of ˜O (RH/n) in the separable (L∗= 0) case and ˜O  RH/n + p L∗RH/n  more generally. We also provide similar guarantees for online and stochastic convex optimization of a smooth non-negative objective. 1 Introduction Consider empirical risk minimization for a hypothesis class H = {h : X →R} w.r.t. some non-negative loss function φ(t, y). That is, we would like to learn a predictor h with small risk L (h) = E [φ(h(X), Y )] by minimizing the empirical risk ˆL(h) = 1 n Pn i=1 φ(h(xi), yi) of an i.i.d. sample (x1, y1), . . . , (xn, yn). Statistical guarantees on the excess risk are well understood for parametric (i.e. finite dimensional) hypothesis classes. More formally, these are hypothesis classes with finite VC-subgraph dimension [23] (aka pseudo-dimension). For such classes learning guarantees can be obtained for any bounded loss function (i.e. s.t. |φ| ≤b < ∞) and the relevant measure of complexity is the VC-subgraph dimension. Alternatively, even for some non-parametric hypothesis classes (i.e. those with infinite VC-subgraph dimension), e.g. the class of low-norm linear predictors HB = {hw : x 7→⟨w, x⟩|∥w∥≤B} , guarantees can be obtained in terms of scale-sensitive measures of complexity such as fat-shattering dimensions [1], covering numbers [23] or Rademacher complexity [2]. The classical statistical learning theory approach for obtaining learning guarantees for such scalesensitive classes is to rely on the Lipschitz constant D of φ(t, y) w.r.t. t (i.e. bound on its derivative w.r.t. t). The excess risk can then be bounded as (in expectation over the sample): L  ˆh  ≤L∗+ 2DRn(H) = L∗+ 2 r D2 R n (1) where ˆh = arg min ˆL(h) is the empirical risk minimizer (ERM), L∗= infh L (h) is the approximation error, and Rn(H) is the Rademacher complexity, which typically scales as Rn(H) = p R/n. E.g. for ℓ2-bounded linear predictors, R = B2 sup ∥X∥2 2. In this paper we address two deficiencies of the guarantee (1). First, the bound applies only to loss functions with bounded derivative, like the hinge loss and logistic loss popular for classification, or the absolute-value (ℓ1) loss for regression. It is not directly applicable to the squared loss φ(t, y) = 1 2(t −y)2, for which the second derivative is bounded, but not the first. We could try to simply bound the derivative of the squared loss in terms of a bound on the magnitude of h(x), but e.g. for norm-bounded linear predictors HB this results in a very disappointing excess risk bound of the form O( p B4(max ∥X∥)4/n). One aim of this paper is to provide clean bounds on the excess risk for smooth loss functions such as the squared loss with a bounded second, rather then first, derivative. 1 The second deficiency of (1) is the dependence on 1/√n. The dependence on 1/√n might be unavoidable in general. But at least for finite dimensional (parametric) classes, we know it can be improved to a 1/n rate when the distribution is separable, i.e. when there exists h ∈H with L (h) = 0 and so L∗= 0. In particular, if H is a class of bounded functions with VC-subgraph-dimension d (e.g. d-dimensional linear predictors), then in expectation over sample [22]: L  ˆh  ≤L∗+ O dD log n n + r dDL∗log n n ! (2) The p 1/n term disappears in the separable case, and we get a graceful degradation between the p 1/n rate to the 1/n rate for separable case. Could we get a 1/n separable rate, and such a graceful degradation, in non-parametric case? As we will show, the two deficiencies are actually related. For non-parametric classes, and non-smooth Lipschitz loss, such as the hinge-loss, the excess risk might scale as p 1/n and not 1/n, even in the separable case. However, for H-smooth non-negative loss functions, where the second derivative of φ(t, y) w.r.t. t is bounded by H, a 1/n separable rate is possible. In Section 2 we obtain the following bound on the excess risk (up to logarithmic factors): L  ˆh  ≤L∗+ ˜O  HR2 n(H) + √ HL∗Rn(H)  = L∗+ ˜O HR n + r HRL∗ n ! ≤ 2L∗+ ˜O HR n  . (3) In particular, for ℓ2-norm-bounded linear predictors HB with sup ∥X∥2 2 ≤1, the excess risk is bounded by ˜O(HB2/n + p HB2L∗/n). Another interesting distinction between parametric and non-parametric classes, is that even for the squared-loss, the bound (3) is tight and the non-separable rate of 1/√n is unavoidable. This is in contrast to the parametric (fine dimensional) case, where a rate of 1/n is always possible for the squared loss, regardless of the approximation error L∗[16]. The differences between parametric and scale-sensitive classes, and between non-smooth, smooth and strongly convex loss functions are discussed in Section 4 and summarized in Table 1. The guarantees discussed thus far are general learning guarantees for the stochastic setting that rely only on the Rademacher complexity of the hypothesis class, and are phrased in terms of minimizing some scalar loss function. In Section 3 we consider also the online setting, in addition to the stochastic setting, and present similar guarantees for online and stochastic convex optimization [32, 24]. The guarantees of Section 3 match equation (3) for the special case of a convex loss function and norm-bounded linear predictors, but Section 3 capture a more general setting of optimizing an arbitrary non-negative convex objective, which we require to be smooth (there is no separate discussion of a “predictor” and a scalar loss function in Section 3). Results in Section 3 are expressed in terms of properties of the norm, rather then a measure of concentration like the Radamacher complexity as in (3) and Section 2. However, the online and stochastic convex optimization setting of Section 3 is also more restrictive, as we require the objective be convex (in Section 2 we make no assumption about the convexity of hypothesis class H nor the loss function φ). Specifically, for a non-negative H-smooth convex objective, over a domain bounded by B, we prove that the average online regret (and excess risk of stochastic optimization) is bounded by O(HB2/n + p HB2L∗/n). Comparing with the bound of O( p D2B2/n) when the loss is D-Lipschitz rather then H-smooth [32, 21], we see the same relationship discussed above for ERM. Unlike the bound (3) for the ERM, the convex optimization bound avoids polylogarithmic factors. The results in Section 3 also generalize to smoothness and boundedness with respect to non-Euclidean norms. Studying the online and stochastic convex optimization setting (Section 3), in addition to ERM (Section 2), has several advantages. First, it allows us to obtain a learning guarantee for an efficient single-pass learning methods, namely stochastic gradient descent (or mirror descent), as well as for the non-stochastic regret. Second, the bound we obtain in the convex optimization setting (Section 3) is actually better then the bound for the ERM (Section 2) as it avoids all polylogarithmic and large constant factors. Third, the bound is applicable to other non-negative online or stochastic optimization problems beyond classification, including problems for which ERM is not applicable (see, e.g., [24]). The detailed proofs of the statements claimed in this paper can be found in the supplementary material corresponding to the paper. 2 Empirical Risk Minimization with Smooth Loss Recall that the Rademacher complexity of H for any n ∈N given by [2]: Rn(H) = sup x1,...,xn∈X Eσ∼Unif({±1}n) " sup h∈H 1 n n X i=1 h(xi)σi # . (4) 2 Throughout we shall consider the “worst case” Rademacher complexity. Our starting point is the learning bound (1) that applies to D-Lipschitz loss functions, i.e. such that |φ′(t, y)| ≤D (we always take derivatives w.r.t. the first argument). What type of bound can we obtain if we instead bound the second derivative φ′′(t, y)? We will actually avoid talking about the second derivative explicitly, and instead say that a function is H-smooth iff its derivative is H-Lipschitz. For twice differentiable φ, this just means that |φ′′| ≤H. The central observation, which allows us to obtain guarantees for smooth loss functions, is that for a smooth loss, the derivative can be bounded in terms of the function value: Lemma 2.1. For an H-smooth non-negative function f : R 7→R, we have: |f ′(t)| ≤ p 4Hf(t) This Lemma allows us to argue that close to the optimum value, where the value of the loss is small, then so is its derivative. Looking at the dependence of (1) on the derivative bound D, we are guided by the following heuristic intuition: Since we should be concerned only with the behavior around the ERM, perhaps it is enough to bound φ′( ˆw, x) at the ERM ˆw. Applying Lemma 2.1 to L(ˆh), we can bound |E [φ′( ˆw, X)]| ≤ q 4HL(ˆh). What we would actually want is to bound each |φ′( ˆw, x)| separately, or at least have the absolute value inside the expectation—this is where the non-negativity of the loss plays an important role. Ignoring this important issue for the moment and plugging this instead of D into (1) yields L(ˆh) ≤L∗+ 4 q HL(ˆh)Rn(H). Solving for L(ˆh) yields the desired bound (3). This rough intuition is captured by the following Theorem: Theorem 1. For an H-smooth non-negative loss φ s.t.∀x,y,h |φ(h(x), y)| ≤b, for any δ > 0 we have that with probability at least 1 −δ over a random sample of size n, for any h ∈H, L (h) ≤ˆL(h) + K q ˆL(h) √ H log1.5n Rn(H) + r b log(1/δ) n ! + H log3n R2 n(H) + b log(1/δ) n ! and so: L  ˆh  ≤L∗+ K √ L∗ √ H log1.5n Rn(H) + r b log(1/δ) n ! + H log3n R2 n(H) + b log(1/δ) n ! where K < 105 is a numeric constant derived from [20] and [6]. Note that only the “confidence” terms depended on b = sup |φ|, and this is typically not the dominant term—we believe it is possible to also obtain a bound that holds in expectation over the sample (rather than with high probability) and that avoids a direct dependence on sup |φ|. To prove Theorem 1 we use the notion of Local Rademacher Complexity [3], which allows us to focus on the behavior close to the ERM. To this end, consider the following empirically restricted loss class Lφ(r) := n (x, y) 7→φ(h(x), y) : h ∈H, ˆL(h) ≤r o Lemma 2.2, presented below, solidifies the heuristic intuition discussed above, by showing that the Rademacher complexity of Lφ(r) scales with √ Hr. The Lemma can be seen as a higher-order version of the Lipschitz Composition Lemma [2], which states that the Rademacher complexity of the unrestricted loss class is bounded by DRn(H). Here, we use the second, rather then first, derivative, and obtain a bound that depends on the empirical restriction: Lemma 2.2. For a non-negative H-smooth loss φ bounded by b and any function class H bounded by B: Rn(Lφ(r)) ≤ √ 12Hr Rn(H) 16 log3/2  nB Rn(H)  −14 log3/2 n √ 12HB √ b !! Applying Lemma 2.2, Theorem 1 follows using standard Local Rademacher argument [3]. 2.1 Related Results Rates faster than 1/√n have been previously explored under various conditions, including when L∗is small. 3 The Finite Dimensional Case : Lee et al [16] showed faster rates for squared loss, exploiting the strong convexity of this loss function, even when L∗> 0, but only with finite VC-subgraph-dimension. Panchenko [22] provides fast rate results for general Lipschitz bounded loss functions, still in the finite VC-subgraph-dimension case. Bousquet [6] provided similar guarantees for linear predictors in Hilbert spaces when the spectrum of the kernel matrix (covariance of X) is exponentially decaying, making the situation almost finite dimensional. All these methods rely on finiteness of effective dimension to provide fast rates. In this case, smoothness is not necessary. Our method, on the other hand, establishes fast rates, when L∗= 0, for function classes that do not have finite VC-subgraph-dimension. We show how in this non-parametric case, smoothness is necessary and plays an important role (see also Table 1). Aggregation : Tsybakov [29] studied learning rates for aggregation, where a predictor is chosen from the convex hull of a finite set of base predictors. This is equivalent to an ℓ1 constraint where each base predictor is viewed as a “feature”. As with ℓ1-based analysis, since the bounds depend only logarithmically on the number of base predictors (i.e. dimensionality), and rely on the scale of change of the loss function, they are of “scale sensitive” nature. For such an aggregate classifier, Tsybakov obtained a rate of 1/n when zero (or small) risk is achieve by one of the base classifiers. Using Tsybakov’s result, it is not enough for zero risk to be achieved by an aggregate (i.e. bounded ell1) classifier in order to obtain the faster rate. Tsybakov’s core result is thus in a sense more similar to the finite dimensional results, since it allows for a rate of 1/n when zero error is achieved by a finite cardinality (and hence finite dimension) class. Tsybakov then used the approximation error of a small class of base predictors w.r.t. a large hypothesis class (i.e. a covering) to obtain learning rates for the large hypothesis class by considering aggregation within the small class. However these results only imply fast learning rates for hypothesis classes with very low complexity. Specifically to get learning rates better than 1/√n using these results, the covering number of the hypothesis class at scale ϵ needs to behave as 1/ϵp for some p < 2. But typical classes, including the class of linear predictors with bounded norm, have covering numbers that scale as 1/ϵ2 and so these methods do not imply fast rates for such function classes. In fact, to get rates of 1/n with these techniques, even when L∗= 0, requires covering numbers that do not increase with ϵ at all, and so actually finite VC-subgraph-dimension. Chesneau et al [10] extend Tsybakov’s work also to general losses, deriving similar results for Lipschitz loss function. The same caveats hold: even when L∗= 0, rates faster when 1/√n require covering numbers that grow slower than 1/ϵ2, and rates of 1/n essentially require finite VC-subgraph-dimension. Our work, on the other hand, is applicable whenever the Rademacher complexity (equivalently covering numbers) can be controlled. Although it uses some similar techniques, it is also rather different from the work of Tsybakov and Chesneau et al, in that it points out the importance of smoothness for obtaining fast rates in the non-parametric case: Chesneau et al relied only on the Lipschitz constant, which we show, in Section 4, is not enough for obtaining fast rates in the non-parametric case, even when L∗= 0. Local Rademacher Complexities : Bartlett et al [3] developed a general machinery for proving possible fast rates based on local Rademacher complexities. However, it is important to note that the localized complexity term typically dominates the rate and still needs to be controlled. For example, Steinwart [27] used Local Rademacher Complexity to provide fast rate on the 0/1 loss of Support Vector Machines (SVMs) (ℓ2-regularized hinge-loss minimization) based on the so called “geometric margin condition” and Tsybakov’s margin condition. Steinwart’s analysis is specific to SVMs. We also use Local Rademacher Complexities in order to obtain fast rates, but do so for general hypothesis classes, based only on the standard Rademacher complexity Rn(H) of the hypothesis classes, as well as the smoothness of the loss function and the magnitude of L∗, but without any further assumptions on the hypothesis classes itself. Non-Lipschitz Loss : Beyond the strong connections between smoothness and fast rates which we highlight, we are also not aware of prior work providing an explicit and easy-to-use result for controlling a generic non-Lipschitz loss (such as the squared loss) solely in terms of the Rademacher complexity. 3 Online and Stochastic Optimization of Smooth Convex Objectives We now turn to online and stochastic convex optimization. In these settings a learner chooses w ∈W, where W is a closed convex set in a normed vector space, attempting to minimize an objective ℓ(w, z) on instances z ∈Z, where ℓ: W × Z →R is an objective function which is convex in w. This captures learning linear predictors w.r.t. a convex loss function φ(t, z), where Z = X × Y and ℓ(w, (x, y)) = φ(⟨w, x⟩, y), and extends beyond supervised learning. We consider the case where the objective ℓ(w, z) is H-smooth w.r.t. some norm ∥w∥(the reader may choose to think of W as a subset of a Euclidean or Hilbert space, and ∥w∥as the ℓ2-norm): By this we mean that for any z ∈Z, and all w, w′ ∈W ∥∇ℓ(w, z) −∇ℓ(w′, z)∥∗≤H ∥w −w′∥ 4 where ∥· ∥∗is the dual norm. The key here is to generalize Lemma 2.1 to smoothness w.r.t. a vector w, rather than scalar smoothness: Lemma 3.1. For an H-smooth non-negative f : W →R, for all w ∈W: ∥∇f(w)∥∗≤ p 4Hf(w) In order to consider general norms, we will also need to rely on a non-negative regularizer F : W 7→R that is a 1-strongly convex (see Definition in e.g. [31]) w.r.t. to the norm ∥w∥for all w ∈W. For the Euclidean norm we can use the squared Euclidean norm regularizer: F(w) = 1 2 ∥w∥2. 3.1 Online Optimization Setting In the online convex optimization setting we consider an n round game played between a learner and an adversary (Nature) where at each round i, the player chooses a wi ∈W and then the adversary picks a zi ∈Z. The player’s choice wi may only depend on the adversary’s choices in previous rounds. The goal of the player is to have low average objective value 1 n Pn i=1 ℓ(wi, zi) compared to the best single choice in hind sight [9]. A classic algorithm for this setting is Mirror Descent [4], which starts at some arbitrary w1 ∈W and updates wi+1 according to zi and a stepsize η (to be discussed later) as follows: wi+1 ←arg min w∈W ⟨η∇ℓ(wi, zi) −∇F(wi), w⟩+ F(w) (5) For the Euclidean norm with F(w) = 1 2∥w∥2, the update (5) becomes projected online gradient descent [32]: wi+1 ←ΠW(wi −η∇ℓ(wi, zi)) where ΠW(w) = arg minw′∈W ∥w −w′∥is the projection onto W. Theorem 2. For any B ∈R and L∗if we use stepsize η = 1 HB2+√ H2B4+HB2nL∗for the Mirror Descent algorithm then for any instance sequence z1, . . . , zn ∈Z, the average regret w.r.t. any w∗∈W s.t. F(w∗) ≤B2 and 1 n Pn j=1 ℓ(w∗, zi) ≤L∗is bounded by: 1 n n X i=1 ℓ(wi, zi) −1 n n X i=1 ℓ(w∗, zi) ≤4HB2 n + 2 s HB2L∗ n Note that the stepsize depends on the bound L∗on the loss in hindsight. The above theorem can be proved using Lemma 3.1 and Theorem 1 of [26]. 3.2 Stochastic Optimization An online algorithm can also serve as an efficient one-pass learning algorithm in the stochastic setting. Here, we again consider an i.i.d. sample z1, . . . , zn from some unknown distribution (as in Section 2), and we would like to find w with low risk L(w) = E [ℓ(w, Z)]. When z = (x, y) and ℓ(w, z) = φ(⟨w, x⟩, y) this agrees with the supervised learning risk discussed in the Introduction and analyzed in Section 2. But instead of focusing on the ERM, we run Mirror Descent on the sample, and then take ˜w = 1 n Pn i=1 wi. Standard arguments [8] allow us to convert the online regret bound of Theorem 2 to a bound on the excess risk: Corollary 3. For any B ∈R and L∗, if we run Mirror Descent on the sample with η = 1 HB2+√ H2B4+HB2nL∗, then for any w∗∈W with F(w∗) ≤B2 and L(w∗) ≤L∗, with expectation over the sample: L ( ˜wn) −L (w⋆) ≤4HB2 n + 2 s HB2L∗ n . It is instructive to contrast this guarantee with similar looking guarantees derived recently in the stochastic convex optimization literature [14]. There, the model is stochastic first-order optimization, i.e. the learner gets to see an unbiased estimate ∇l(w, zi) of the gradient of L(w). The variance of the estimate is assumed to be bounded by σ2. The expected accuracy after n gradient evaluations then has two terms: a “accelerated” term that is O(H/n2) and a slow O(σ/√n) term. While this result is applicable more generally (since it doesn’t require non-negativity of ℓ), it is not immediately clear if our guarantees can be derived using it. The main difficulty is that σ depends on the norm of the gradient estimates. Thus, it cannot be bounded in advance even if we know that L(w⋆) is small. That said, it is 5 intuitively clear that towards the end of the optimization process, the gradient norms will typically be small if L(w⋆) is small because of the self bounding property (Lemma 3.1). It is interesting to note that using stability arguments, a guarantee very similar to Corollary 3, avoiding the polylogarithmic factors of Theorem 1 as well as the dependence on the bound on the loss, can be obtained also for a “batch” learning rule similar to ERM, but incorporating regularization. For given regularization parameter λ > 0 define the regularized empirical loss as ˆLλ(w) := ˆL(w) + λF(w) and consider the Regularized Empirical Risk Minimizer ˆwλ = arg min w∈W ˆLλ(w) (6) The following theorem provides a bound on excess risk similar to Corollary 3: Theorem 4. For any B ∈R and L∗if we set λ = 128H n + q 1282H2 n2 + 128HL∗ nB2 then for all w⋆∈W with F(w⋆) ≤B2 and L(w⋆) ≤L∗, we have that in expectation over sample of size n: L ( ˆwλ) −L (w⋆) ≤256HB2 n + s 2048HB2L∗ n . To prove Theorem 4 we use stability arguments similar to the ones used by Shalev-Shwartz et al [24], which are in turn based on Bousquet and Elisseeff [7]. However, while Shalev-Shwartz et al [24] use the notion of uniform stability, here it is necessary to look at stability in expectation to get the faster rates. 4 Tightness In this Section we return to the learning rates for the ERM for parametric and for scale-sensitive hypothesis classes (i.e. in terms of the dimensionality and in terms of scale sensitive complexity measures), discussed in the Introduction and analyzed in Section 2. We compare the guarantees on the learning rates in different situations, identify differences between the parametric and scale-sensitive cases and between the smooth and non-smooth cases, and argue that these differences are real by showing that the corresponding guarantees are tight. Although we discuss the tightness of the learning guarantees for ERM in the stochastic setting, similar arguments can also be made for online learning. Table 1 summarizes the bounds on the excess risk of the ERM implied by Theorem 1 as well previous bounds for Lipschitz loss on finite-dimensional [22] and scale-sensitive [2] classes, and a bound for squared-loss on finite-dimensional classes [9, Theorem 11.7] that can be generalized to any smooth strongly convex loss. We shall now show that the Parametric Scale-Sensitive Loss function is: dim(H) ≤d , |h| ≤1 Rn(H) ≤ p R/n D-Lipschitz dD n + q dDL∗ n q D2R n H-smooth dH n + q dHL∗ n HR n + q HRL∗ n H-smooth and λ-strongly Convex H λ dH n HR n + q HRL∗ n Table 1: Bounds on the excess risk, up to polylogarithmic factors. 1/√n dependencies in Table 1 are unavoidable. To do so, we will consider the class H = {x 7→⟨w, x⟩: ∥w∥≤1} of ℓ2-bounded linear predictors (all norms in this Section are Euclidean), with different loss functions, and various specific distributions over X ×Y, where X =  x ∈Rd : ∥x∥≤1 and Y = [0, 1]. For the non-parametric lower-bounds, we will allow the dimensionality d to grow with the sample size n. Infinite dimensional, Lipschitz (non-smooth), separable Consider the absolute difference loss φ(h(x), y) = |h(x) −y|, take d = 2n and consider the following distribution: X is uniformly distributed over the d standard basis vectors ei and if X = ei, then Y = 1 √nri, where r1, . . . , rd ∈{±1} is an arbitrary sequence of signs unknown to the learner. Taking w⋆= 1 √n Pn i=1 riei, ∥w⋆∥= 1 and L∗= L (w⋆) = 0. However any sample (x1, y1), . . . , (xn, yn) reveals at most n of 2n signs ri, and no information on the remaining signs. This means that for any learning algorithm, there exists a choice of ri’s such that on at least n of the remaining points not seen by the learner, he/she has to suffer a loss of at least 1/√n, yielding an overall risk of at least 1/ √ 4n. 6 Infinite dimensional, smooth, non-separable, even if strongly convex Consider the squared loss φ(h(x), y) = (h(x) −y)2 which is 2-smooth and 2-strongly convex. For any σ ≥0 let d = √n/σ and consider the following distribution: X is uniform over ei as before, but this time Y |X is random, with Y |(X = ei) ∼N( ri 2 √ d, σ), where again ri are pre-determined, unknown to the learner, random signs. The minimizer of the expected risk is w⋆= Pd i=1 ri 2 √ dei, with ∥w⋆∥= 1 2 and L∗= L(w⋆) = σ2. Furthermore, for any w ∈W, L (w) −L (w⋆) = E [⟨w −w⋆, x⟩]2 = 1 d d X i=1 (w[i] −w⋆[i])2 = 1 d ∥w −w⋆∥2 If the norm constraint becomes tight, i.e. ∥ˆw∥= 1, then L( ˆw) −L(w⋆) ≥1/(4d) = σ/(4√n) = √ L∗/(4√n). Otherwise, each coordinate is a separate mean estimation problem, with ni samples, where ni is the number of appearances of ei in the sample. We have E  ( ˆw[i] −w⋆[i])2 = σ2/ni and so L( ˆw)−L∗= 1 d ∥ˆw −w⋆∥2 = 1 d Pd i=1 σ2 ni ≥ q L∗ n Finite dimensional, smooth, not strongly convex, non-separable: Take d = 1, with X = 1 with probability q and X = 0 with probability 1 −q. Conditioned on X = 0 let Y = 0 deterministically and while conditioned on X = 1 let Y = +1 with probability p = 1 2 + 0.2 √qn and Y = −1 with probability 1 −p. Consider the following 1-smooth loss : φ(h(x), y) = ( (h(x) −y)2 if |h(x) −y| ≤1/2 |h(x) −y| −1/4 if |h(x) −y| ≥1/2 First, irrespective of choice of w, when x = 0, we always have h(x) = 0 and so suffer no loss. This happens with probability 1 −q. Next observe that for p > 0.5, the optimal predictor is w⋆≥1/2. However, for n > 20, with probability at least 0.25, Pn i=1 yi < 0, and so ˆw ≤−1/2. Hence, L( ˆw) −L∗> L(−1/2) −L(1/2) = p 0.16 q/n. However for p > 0.5 and n > 20, L∗> q/2 and so with probability 0.25, L( ˆw) −L∗> p 0.32L∗/n. 5 Implications 5.1 Improved Margin Bounds “Margin bounds” provide a bound on the expected zero-one loss of a classifiers based on the margin 0/1 error on the training sample. Koltchinskii and Panchenko [13] provides margin bounds for a generic class H based on the Rademacher complexity of the class. This is done by using a non-smooth Lipschitz “ramp” loss that upper bounds the zero-one loss and is upper-bounded by the margin zero-one loss. However, such an analysis unavoidably leads to a 1/√n rate even in the separable case. Following the same idea we use the following smooth “ramp”: φ(t) =    1 t ≤0 1+cos(πt/γ) 2 0 < t < γ 0 t ≥γ This loss function is π2 4γ2 -smooth and is lower bounded by the zero-one loss and upper bounded by the γ margin loss. Using Theorem 1 we can now provide improved margin bounds for the zero-one loss of any classifier based on empirical margin error. Denote err(h) = E  11{h(x)̸=y}  the zero-one risk and for any γ > 0 and sample (x1, y1), . . . , (xn, yn) ∈X × {±1} define the γ-margin empirical zero one loss as c errγ(h) := 1 n Pn i=1 11{yih(xi)<γ}. Theorem 5. For any hypothesis class H, with |h| ≤b, and any δ > 0, with probability at least 1 −δ, simultaneously for all margins γ > 0 and all h ∈H: err(h) ≤c errγ(h) + K q c errγ(h)  log1.5 n γ Rn(H) + q log(log( 4b γ )/δ) n  + log3 n γ2 R2 n(H) + log(log( 4b γ )/δ) n  where K is a numeric constant from Theorem 1. In particular, for appropriate numeric constant K : err(h) ≤1.01 c errγ(h) + K 2 log3 n γ2 R2 n(H) + 2 log(log( 4b γ )/δ) n ! Improved margin bounds of the above form have been previously shown specifically for linear prediction in a Hilbert space based on the PAC Bayes theorem [19, 15]. However PAC-Bayes based results are specific to certain linear function class. Theorem 5, in contrast, is a generic concentration-based result that can be applied to any function class. 7 5.2 Interaction of Norm and Dimension Consider the problem of learning a low-norm linear predictor with respect to the squared loss φ(t, z) = (t −z)2, where X ∈Rd, for finite but very large d, and where the expected norm of X is low. Specifically, let X be Gaussian with E ∥X∥2 = B, Y = ⟨w∗, X⟩+ N(0, σ2) with ∥w∗∥= 1, and consider learning a linear predictor using ℓ2 regularization. What determines the sample complexity? How does the error decrease as the sample size increases? From a scale-sensitive statistical learning perspective, we expect that the sample complexity, and the decrease of the error, should depend on the norm B, especially if d ≫B2. However, for any fixed d and B, even if d ≫B2, asymptotically as the number of samples increase, the excess risk of norm-constrained or norm-regularized regression actually behaves as L( ˆw) −L∗≈d nσ2, and depends (to first order) only on the dimensionality d and not on B [17]. The asymptotic dependence on the dimensionality alone can be understood through Table 1. In this non-separable situation, parametric complexity controls can lead to a 1/n rate, ultimately dominating the 1/√n rate resulting from L∗> 0 when considering the scale-sensitive, non-parametric complexity control B. Combining Theorem 4 with the asymptotic d nσ2 behavior, and noting that at the worst case we can predict using a zero vector, yields the following overall picture on the expected excess risk of ridge regression with an optimally chosen λ: L( ˆwλ) −L∗≤O min B2, B2/n + Bσ/√n, dσ2/n  Roughly speaking, each term above describes the behavior in a different regime of the sample size. The first regime has excess risk of order B2 which occurs until n = Θ(B2). The second (“low-noise”) regime is one where the excess risk is dominated by the norm and behaves as B2/n, until n = Θ(B2/σ2) and L( ˆw) = Θ(L∗). The third (“slow”) regime, where the excess risk is controlled by the norm and the approximation error and behaves as Bσ/√n, until n = Θ(d2σ2/B2) and L( ˆw) = L∗+ Θ(B2/d). The fourth (“asymptotic”) regime is where excess risk behaves as d/n. This sheds further light on recent work by Liang and Srebro [18] based on exact asymptotics. 5.3 Sparse Prediction The use of the ℓ1 norm has become popular for learning sparse predictors in high dimensions, as in the LASSO. The LASSO estimator [28] ˆw is obtained by considering the squared loss φ(z, y) = (z−y)2 and minimizing ˆL(w) subject to ∥w∥1 ≤B. Let us assume there is some (unknown) sparse reference predictor w0 that has low expected loss and sparsity (number of non-zeros) ∥w0∥0 = k, and that ∥x∥∞≤1, y ≤1. In order to choose B and apply Theorem 1 in this setting, we need to bound ∥w0∥1. This can be done by, e.g., assuming that the features x[i] in the support of w0 are mutually uncorrelated. Under such an assumption, we have: ∥w0∥2 1 ≤kE w0, x 2 ≤2k(L(w0) + Ey2) ≤4k. Thus, Theorem 1 along with Rademacher complexity bounds from [11] gives us, L( ˆw) ≤L(w0) + ˜O  k log(d)/n + p k L(w0) log(d)/n  . (7) It is possible to relax the no-correlation assumption to a bound on the correlations, as in mutual incoherence, or to other weaker conditions [25]. But in any case, unlike typical analysis for compressed sensing, where the goal is recovering w0 itself, here we are only concerned with correlations inside the support of w0. Furthermore, we do not require that the optimal predictor is sparse or that the model is well specified: only that there exists a low risk predictor using a small number of fairly uncorrelated features. Bounds similar to (7) have been derived using specialized arguments [12, 30, 5]—here we demonstrate that bounds of these forms can be obtained under simple conditions, using the generic framework we suggest. It is also interesting to note that the methods and results of Section 3 can also be applied to this setting. We use the entropy regularizer F(w) = B X i x[i] log x[i] 1/d  + B2 e (8) which is non-negative and 1-strongly convex with respect to ∥w∥1 on W =  w ∈Rd w[i] ≥0, ∥w∥1 ≤B , with F(w) ≤B2(1 + log d) (we consider here only non-negative weights—in order to allow w[i] < 0 we can include also each feature’s negation). Recalling that w0 1 ≤2 √ k and using B = 2 √ k in the entropy regularizer (8), we have from Theorem 4 we that L( ˆwλ) ≤L(w0) + O  k log(d)/n + p k L(w0) log(d)/n  where ˆwλ is the regularized empirical minimizer (6) using the entropy regularizer (8) with λ as in Theorem 4. The advantage here is that using Theorem 4 instead of Theorem 1 avoids the extra logarithmic factors. 8 References [1] N. Alon, S. Ben-David, N. Cesa-Bianchi, and D. Haussler. Scale-sensitive dimensions, uniform convergence, and learnability. FOCS, 0:292–301, 1993. [2] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. JMLR, 3:463– 482, 2002. [3] P.L. Bartlett, O. Bousquet, and S. Mendelson. Local rademacher complexities. Annals of Statistics, 33(4):1497–1537, 2005. [4] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31:167–175, 2003. [5] P.J. Bickel, Y. Ritov, and A.B. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. The Annals of Statistics, 37(4):1705–1732, 2009. [6] O. Bousquet. Concentration Inequalities and Empirical Processes Theory Applied to the Analysis of Learning Algorithms. PhD thesis, Ecole Polytechnique, 2002. [7] Olivier Bousquet and Andr´e Elisseeff. Stability and generalization. J. Mach. Learn. Res., 2:499–526, 2002. [8] N. Cesa-Bianchi, A. Conconi, and C.Gentile. On the generalization ability of on-line learning algorithms. In NIPS, pages 359–366, 2002. [9] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [10] Christophe Chesneau and Guillaume Lecu. Adapting to unknown smoothness by aggregation of thresholded wavelet estimators. 2006. [11] S.M. Kakade, K. Sridharan, and A. Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In NIPS, 2008. [12] V. Koltchinskii. Sparsity in penalized empirical risk minimization. Ann. Inst, H. Poincar´e Probab. Statist., 45(1):7–57, 2009. [13] V. Koltchinskii and D. Panchenko. Empirical margin distributions and bounding the generalization error of combined classifiers. Ann. of Stats., 30(1):1–50, 2002. [14] G. Lan. Convex Optimization Under Inexact First-order Information. PhD thesis, Georgia Institute of Technology, 2009. [15] J. Langford and J. Shawe-Taylor. PAC-Bayes & margins. In Advances in Neural Information Processing Systems 15, pages 423–430, 2003. [16] Wee Sun Lee, Peter L. Bartlett, and Robert C. Williamson. The importance of convexity in learning with squared loss. IEEE Trans. on Information Theory, 1998. [17] P. Liang, F. Bach, G. Bouchard, and M. I. Jordan. Asymptotically optimal regularization in smooth parametric models. In NIPS, 2010. [18] P. Liang and N. Srebro. On the interaction between norm and dimensionality: Multiple regimes in learning. In ICML, 2010. [19] D. A. McAllester. Simplified PAC-Bayesian margin bounds. In COLT, pages 203–215, 2003. [20] Shahar Mendelson. Rademacher averages and phase transitions in glivenko-cantelli classes. IEEE Trans. On Information Theory, 48(1):251–263, 2002. [21] A. Nemirovski and D. Yudin. Problem complexity and method efficiency in optimization. Nauka Publishers, Moscow, 1978. [22] D. Panchenko. Some extensions of an inequality of vapnik and chervonenkis. Electronic Communications in Probability, 7:55–65, 2002. [23] David Pollard. Convergence of Stochastic Processes. Springer-Verlag, 1984. [24] S. Shalev-Shwartz, O. Shamir, N. Srebro, and K. Sridharan. Stochastic convex optimization. In COLT, 2009. [25] S. Shalev-Shwartz, N. Srebro, and T. Zhang. Trading accuracy for sparsity. Technical report, TTI-C, 2009. Available at ttic.uchicago.edu/∼shai. [26] S.Shalev-Shwartz. Online Learning: Theory, Algorithms, and Applications. PhD thesis, Hebrew University of Jerusalem, 2007. [27] I. Steinwart and C. Scovel. Fast rates for support vector machines using gaussian kernels. ANNALS OF STATISTICS, 35:575, 2007. [28] R. Tibshirani. Regression shrinkage and selection via the lasso. J. Royal. Statist. Soc B., 58(1):267–288, 1996. [29] A. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, 32:135–166, 2004. [30] S. A. van de Geer. High-dimensional generalized linear models and the lasso. Annals of Statistics, 36(2):614–645, 2008. [31] C. Zalinescu. Convex analysis in general vector spaces. World Scientific Publishing Co. Inc., River Edge, NJ, 2002. [32] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, 2003. 9
2010
147
3,907
Energy Disaggregation via Discriminative Sparse Coding J. Zico Kolter Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Cambridge, MA 02139 kolter@csail.mit.edu Siddarth Batra, Andrew Y. Ng Computer Science Department Stanford University Stanford, CA 94305 {sidbatra,ang}@cs.stanford.edu Abstract Energy disaggregation is the task of taking a whole-home energy signal and separating it into its component appliances. Studies have shown that having devicelevel energy information can cause users to conserve significant amounts of energy, but current electricity meters only report whole-home data. Thus, developing algorithmic methods for disaggregation presents a key technical challenge in the effort to maximize energy conservation. In this paper, we examine a large scale energy disaggregation task, and apply a novel extension of sparse coding to this problem. In particular, we develop a method, based upon structured prediction, for discriminatively training sparse coding algorithms specifically to maximize disaggregation performance. We show that this significantly improves the performance of sparse coding algorithms on the energy task and illustrate how these disaggregation results can provide useful information about energy usage. 1 Introduction Energy issues present one of the largest challenges facing our society. The world currently consumes an average of 16 terawatts of power, 86% of which comes from fossil fuels [28]; without any effort to curb energy consumption or use different sources of energy, most climate models predict that the earth’s temperature will increase by at least 5 degrees Fahrenheit in the next 90 years [1], a change that could cause ecological disasters on a global scale. While there are of course numerous facets to the energy problem, there is a growing consensus that many energy and sustainability problems are fundamentally informatics problems, areas where machine learning can play a significant role. This paper looks specifically at the task of energy disaggregation, an informatics task relating to energy efficiency. Energy disaggregation, also called non-intrusive load monitoring [11], involves taking an aggregated energy signal, for example the total power consumption of a house as read by an electricity meter, and separating it into the different electrical appliances being used. Numerous studies have shown that receiving information about ones energy usage can automatically induce energy-conserving behaviors [6, 19], and these studies also clearly indicate that receiving appliancespecific information leads to much larger gains than whole-home data alone ([19] estimates that appliance-level data could reduce consumption by an average of 12% in the residential sector). In the United States, electricity constitutes 38% of all energy used, and residential and commercial buildings together use 75% of this electricity [28]; thus, this 12% figure accounts for a sizable amount of energy that could potentially be saved. However, the widely-available sensors that provide electricity consumption information, namely the so-called “Smart Meters” that are already becoming ubiquitous, collect energy information only at the whole-home level and at a very low resolution (typically every hour or 15 minutes). Thus, energy disaggregation methods that can take this wholehome data and use it to predict individual appliance usage present an algorithmic challenge where advances can have a significant impact on large-scale energy efficiency issues. 1 Energy disaggregation methods do have a long history in the engineering community, including some which have applied machine learning techniques — early algorithms [11, 26] typically looked for “edges” in power signal to indicate whether a known device was turned on or off; later work focused on computing harmonics of steady-state power or current draw to determine more complex device signatures [16, 14, 25, 2]; recently, researchers have analyzed the transient noise of an electrical circuit that occurs when a device changes state [15, 21]. However, these and all other studies we are aware of were either conducted in artificial laboratory environments, contained a relatively small number of devices, trained and tested on the same set of devices in a house, and/or used custom hardware for very high frequency electrical monitoring with an algorithmic focus on “event detection” (detecting when different appliances were turned on and off). In contrast, in this paper we focus on disaggregating electricity using low-resolution, hourly data of the type that is readily available via smart meters (but where most single-device “events” are not apparent); we specifically look at the generalization ability of our algorithms for devices and homes unseen at training time; and we consider a data set that is substantially larger than those previously considered, with 590 homes, 10,165 unique devices, and energy usage spanning a time period of over two years. The algorithmic approach we present in this paper builds upon sparse coding methods and recent work in single-channel source separation [24, 23, 22]. Specifically, we use a sparse coding algorithm to learn a model of each device’s power consumption over a typical week, then combine these learned models to predict the power consumption of different devices in previously unseen homes, using their aggregate signal alone. While energy disaggregation can naturally be formulated as such a single-channel source separation problem, we know of no previous application of these methods to the energy disaggregation task. Indeed, the most common application of such algorithm is audio signal separation, which typically has very high temporal resolution; thus, the low-resolution energy disaggregation task we consider here poses a new set of challenges for such methods, and existing approaches alone perform quite poorly. As a second major contribution of the paper, we develop a novel approach for discriminatively training sparse coding dictionaries for disaggregation tasks, and show that this significantly improves performance on our energy domain. Specifically, we formulate the task of maximizing disaggregation performance as a structured prediction problem, which leads to a simple and effective algorithm for discriminatively training such sparse representation for disaggregation tasks. The algorithm is similar in spirit to a number of recent approaches to discriminative training of sparse representations [12, 17, 18]. However, these past works were interested in discriminatively training sparse coding representation specifically for classification tasks, whereas we focus here on discriminatively training the representation for disaggregation tasks, which naturally leads to substantially different algorithmic approaches. 2 Discriminative Disaggregation via Sparse Coding We begin by reviewing sparse coding methods and their application to disaggregation tasks. For concreteness we use the terminology of our energy disaggregation domain throughout this description, but the algorithms can apply equally to other domains. Formally, assume we are given k different classes, which in our setting corresponds to device categories such as televisions, refrigerators, heaters, etc. For every i = 1, . . . , k, we have a matrix Xi ∈RT ×m where each column of Xi contains a week of energy usage (measured every hour) for a particular house and for this particular type of device. Thus, for example, the jth column of X1, which we denote x(j) 1 , may contain weekly energy consumption for a refrigerator (for a single week in a single house) and x(j) 2 could contain weekly energy consumption of a heater (for this same week in the same house). We denote the aggregate power consumption over all device types as ¯X ≡Pk i=1 Xi so that the jth column of ¯X, ¯x(j), contains a week of aggregated energy consumption for all devices in a given house. At training time, we assume we have access to the individual device energy readings X1, . . . , Xk (obtained for example from plug-level monitors in a small number of instrumented homes). At test time, however, we assume that we have access only to the aggregate signal of a new set of data points ¯X′ (as would be reported by smart meter), and the goal is to separate this signal into its components, X′ 1, . . . , X′ k. The sparse coding approach to source separation (e.g., [24, 23]), which forms for the basis for our disaggregation approach, is to train separate models for each individual class Xi, then use these models to separate an aggregate signal. Formally, sparse coding models the ith data matrix using the approximation Xi ≈BiAi where the columns of Bi ∈RT ×n contain a set of n basis functions, also called the dictionary, and the columns of Ai ∈Rn×m contain the activations of these basis functions 2 [20]. Sparse coding additionally imposes the the constraint that the activations Ai be sparse, i.e., that they contain mostly zero entries, which allows us to learn overcomplete representations of the data (more basis functions than the dimensionality of the data). A common approach for achieving this sparsity is to add an ℓ1 regularization penalty to the activations. Since energy usage is an inherently non-negative quantity, we impose the further constraint that the activations and bases be non-negative, an extension known as non-negative sparse coding [13, 7]. Specifically, in this paper we will consider the non-negative sparse coding objective min Ai≥0,Bi≥0 1 2∥Xi −BiAi∥2 F + λ X p,q (Ai)pq subject to ∥b(j) i ∥2 ≤1, j = 1, . . . , n (1) where Xi, Ai, and Bi are defined as above, λ ∈R+ is a regularization parameter, ∥Y∥F ≡ (P p,q Ypq)1/2 is the Frobenius norm, and ∥y∥2 ≡(P p y2 p)1/2 is the ℓ2 norm. This optimization problem is not jointly convex in Ai and Bi, but it is convex in each optimization variable when holding the other fixed, so a common strategy for optimizing (1) is to alternate between minimizing the objective over Ai and Bi. After using the above procedure to find representations Ai and Bi for each of the classes i = 1, . . . , k, we can disaggregate a new aggregate signal ¯X ∈RT ×m′ (without providing the algorithm its individual components), using the following procedure (used by, e.g., [23], amongst others). We concatenate the bases to form single joint set of basis functions and solve the optimization problem ˆA1:k = arg min A1:k≥0 ¯X −[B1 · · · Bk]   A1 ... Ak   2 F + λ X i,p,q (Ai)pq ≡arg min A1:k≥0 F( ¯X, B1:k, A1:k) (2) where for ease of notation we use A1:k as shorthand for A1, . . . , Ak, and we abbreviate the optimization objective as F( ¯X, B1:k, A1:k). We then predict the ith component of the signal to be ˆXi = Bi ˆAi. (3) The intuition behind this approach is that if Bi is trained to reconstruct the ith class with small activations, then it should be better at reconstructing the ith portion of the aggregate signal (i.e., require smaller activations) than all other bases Bj for j ̸= i. We can evaluate the quality of the resulting disaggregation by what we refer to as the disaggregation error, E(X1:k, B1:k) ≡ k X i=1 1 2∥Xi −Bi ˆAi∥2 F subject to ˆA1:k = arg min A1:k≥0 F k X i=1 Xi, B1:k, A1:k ! , (4) which quantifies how accurately we reconstruct each individual class when using the activations obtained only via the aggregated signal. 2.1 Structured Prediction for Discriminative Disaggregation Sparse Coding An issue with using sparse coding alone for disaggregation tasks is that the bases are not trained to minimize the disaggregation error. Instead, the method relies on the hope that learning basis functions for each class individually will produce bases that are distinct enough to also produce small disaggregation error. Furthermore, it is very difficult to optimize the disaggregation error directly over B1:k, due to the non-differentiability (and discontinuity) of the argmin operator with a nonnegativity constraint. One could imagine an alternating procedure where we iteratively optimize over B1:k, ignoring the the dependence of ˆA1:k on B1:k, then re-solve for the activations ˆA1:k; but ignoring how ˆA1:k depends on B1:k loses much of the problem’s structure and this approach performs very poorly in practice. Alternatively, other methods (though in a different context from disaggregation) have been proposed that use a differentiable objective function and implicit differentiation to explicitly model the derivative of the activations with respect to the basis functions [4]; however, this formulation loses some of the benefits of the standard sparse coding formulation, and computing these derivatives is a computationally expensive procedure. 3 Instead, we propose in this paper a method for optimizing disaggregation performance based upon structured prediction methods [27]. To describe our approach, we first define the regularized disaggregation error, which is simply the disaggregation error plus a regularization penalty on ˆA1:k, Ereg(X1:k, B1:k) ≡E(X1:k, B1:k) + λ X i,p,q ( ˆAi)pq (5) where ˆA is defined as in (2). This criterion provides a better optimization objective for our algorithm, as we wish to obtain a sparse set of coefficients that can achieve low disaggregation error. Clearly, the best possible value of ˆAi for this objective function is given by A⋆ i = arg min Ai≥0 1 2∥Xi −BiAi∥2 F + λ X p,q (Ai)pq, (6) which is precisely the activations obtained after an iteration of sparse coding on the data matrix Xi. Motivated by this fact, the first intuition of our algorithm is that in order to minimize disaggregation error, we can discriminatively optimize the bases B1:k that such performing the optimization (2) produces activations that are as close to A⋆ 1:k as possible. Of course, changing the bases B1:k to optimize this criterion would also change the resulting optimal coefficients A⋆ 1:k. Thus, the second intuition of our method is that the bases used in the optimization (2) need not be the same as the bases used to reconstruct the signals. We define an augmented regularized disaggregation error objective ˜Ereg(X1:k, B1:k, ˜B1:k) ≡ k X i=1 1 2∥Xi −Bi ˆAi∥2 F + λ X p,q ( ˆAi)pq ! subject to ˆA1:k = arg min A1:k≥0 F k X i=1 Xi, ˜B1:k, A1:k ! , (7) where the B1:k bases (referred to as the reconstruction bases) are the same as those learned from sparse coding while the ˜B1:k bases (refereed to as the disaggregation bases) are discriminatively optimized in order to move ˆA1:k closer to A⋆ 1:k, without changing these targets. Discriminatively training the disaggregation bases ˜B1:k is naturally framed as a structured prediction task: the input is ¯X, the multi-variate desired output is A⋆ 1:k, the model parameters are ˜B1:k, and the discriminant function is F( ¯X, ˜B1:k, A1:k).1 In other words, we seek bases ˜B1:k such that (ideally) A⋆ 1:k = arg min A1:k≥0 F( ¯X, ˜B1:k, A1:k). (8) While there are many potential methods for optimizing such a prediction task, we use a simple method based on the structured perceptron algorithm [5]. Given some value of the parameters ˜B1:k, we first compute ˆA using (2). We then perform the perceptron update with a step size α, ˜B1:k ←˜B1:k −α  ∇˜B1:kF( ¯X, ˜B1:k, A⋆ 1:k) −∇˜B1:kF( ¯X, ˜B1:k, ˆA1:k)  (9) or more explicitly, defining ˜B = h ˜B1 · · · ˜Bk i , A⋆= h A⋆ 1 T · · · A⋆ 1 T iT (and similarly for ˆA), ˜B ←˜B −α  ( ¯X −˜B ˆA) ˆAT −( ¯X −˜BA⋆)A⋆T  . (10) To keep ˜B1:k in a similar form to B1:k, we keep only the positive part of ˜B1:k and we re-normalize each column to have unit norm. One item to note is that, unlike typical structured prediction where the discriminant is a linear function in the parameters (which guarantees convexity of the problem), here our discriminant is a quadratic function of the parameters, and so we no longer expect to necessarily reach a global optimum of the prediction problem; however, since sparse coding itself is a non-convex problem, this is not overly concerning for our setting. Our complete method for discriminative disaggregation sparse coding, which we call DDSC, is shown in Algorithm 1. 1The structured prediction task actually involves m examples (where m is the number of columns of ¯X), and the goal is to output the desired activations (a⋆ 1:k)(j), for the jth example ¯x(j). However, since the function F decomposes across the columns of X and A, the above notation is equivalent to the more explicit formulation. 4 Algorithm 1 Discriminative disaggregation sparse coding Input: data points for each individual source Xi ∈RT ×m, i = 1, . . . , k, regularization parameter λ ∈R+, gradient step size α ∈R+. Sparse coding pre-training: 1. Initialize Bi and Ai with positive values and scale columns of Bi such that ∥b(j) i ∥2 = 1. 2. For each i = 1, . . . , k, iterate until convergence: (a) Ai ←arg minA≥0 ∥Xi −BiA∥2 F + λ P p,q Apq (b) Bi ←arg minB≥0,∥b(j)∥2≤1 ∥Xi −BAi∥2 F Discriminative disaggregation training: 3. Set A⋆ 1:k ←A1:k, ˜B1:k ←B1:k. 4. Iterate until convergence: (a) ˆA1:k ←arg minA1:k≥0 F( ¯X, ˜B1:k, A1:k) (b) ˜B ← h ˜B −α  ( ¯X −˜B ˆA) ˆAT −( ¯X −˜BA⋆)(A⋆)T i + (c) For all i, j, b(j) i ←b(j) i /∥b(j) i ∥2. Given aggregated test examples ¯X′: 5. ˆA′ 1:k ←arg minA1:k≥0 F( ¯X′, ˜B1:k, A1:k) 6. Predict ˆX′ i = Bi ˆA′ i. 2.2 Extensions Although, as we show shortly, the discriminative training procedure has made the largest difference in terms of improving disaggregation performance in our domain, a number of other modifications to the standard sparse coding formulation have also proven useful. Since these are typically trivial extensions or well-known algorithms, we mention them only briefly here. Total Energy Priors. One deficiency of the sparse coding framework for energy disaggregation is that the optimization objective does not take into consideration the size of an energy signal for determinining which class it belongs to, just its shape. Since total energy used is obviously a discriminating factor for different device types, we consider an extension that penalizes the ℓ2 deviation between a device and its mean total energy. Formally, we augment the objective F with the penalty FT EP ( ¯X, B1:k, A1:k) = F( ¯X, B1:k, A1:k) + λT EP k X i=1 ∥µi1T −1T BiAi∥2 2 (11) where 1 denotes a vector of ones of the appropriate size, and µi = 1 m1T Xi denotes the average total energy of device class i. Group Lasso. Since the data set we consider exhibits some amount of sparsity at the device level (i.e., several examples have zero energy consumed by certain device types, as there is either no such device in the home or it was not being monitored), we also would like to encourage a grouping effect to the activations. That is, we would like a certain coefficient being active for a particular class to encourage other coefficients to also be active in that class. To achieve this, we employ the group Lasso algorithm [29], which adds an ℓ2 norm penalty to the activations of each device FGL( ¯X, B1:k, A1:k) = F( ¯X, B1:k, A1:k) + λGL k X i=1 m X j=1 ∥a(j) i ∥2. (12) Shift Invariant Sparse Coding. Shift invariant, or convolutional sparse coding is an extension to the standard sparse coding framework where each basis is convolved over the input data, with a separate activation for each shift position [3, 10]. Such a scheme may intuitively seem to be beneficial for the energy disaggregation task, where a given device might exhibit the same energy signature at different times. However, as we will show in the next section, this extension actually perform worse in our domain; this is likely due to the fact that, since we have ample training data 5 and a relatively low-dimensional domain (each energy signal has 168 dimensions, 24 hours per day times 7 days in the week), the standard sparse coding bases are able to cover all possible shift positions for typical device usage. However, pure shift invariant bases cannot capture information about when in the week or day each device is typically used, and such information has proven crucial for disaggregation performance. 2.3 Implementation Space constraints preclude a full discussion of the implementation details of our algorithms, but for the most part we rely on standard methods for solving the optimization problems. In particular, most of the time spent by the algorithm involves solving sparse optimization problems to find the activation coefficients, namely steps 2a and 4a in Algorithm 1. We use a coordinate descent approach here, both for the standard and group Lasso version of the optimization problems, as these have been recently shown to be efficient algorithms for ℓ1-type optimization problems [8, 9], and have the added benefit that we can warm-start the optimization with the solution from previous iterations. To solve the optimization over Bi in step 2b, we use the multiplicative non-negative matrix factorization update from [7]. 3 Experimental Results 3.1 The Plugwise Energy Data Set and Experimental Setup We conducted this work using a data set provided by Plugwise, a European manufacturer of pluglevel monitoring devices. The data set contains hourly energy readings from 10,165 different devices in 590 homes, collected over more than two years. Each device is labeled with one of 52 device types, which we further reduce to ten broad categories of electrical devices: lighting, TV, computer, other electronics, kitchen appliances, washing machine and dryer, refrigerator and freezer, dishwasher, heating/cooling, and a miscellaneous category. We look at time periods in blocks of one week, and try to predict the individual device consumption over this week given only the wholehome signal (since the data set does not currently contain true whole-home energy readings, we approximate the home’s overall energy usage by aggregating the individual devices). Crucially, we focus on disaggregating data from homes that are absent from the training set (we assigned 70% of the homes to the training set, and 30% to the test set, resulting in 17,133 total training weeks and 6846 testing weeks); thus, we are attempting to generalize over the basic category of devices, not just over different uses of the same device in a single house. We fit the hyper-parameters of the algorithms (number of bases and regularization parameters) using grid search over each parameter independently on a cross validation set consisting of 20% of the training homes. 3.2 Qualitative Evaluation of the Disaggregation Algorithms We first look qualitatively at the results obtained by the method. Figure 1 shows the true energy energy consumed by two different houses in the test set for two different weeks, along with the energy consumption predicted by our algorithms. The figure shows both the predicted energy of several devices over the whole week, as well as a pie chart that shows the relative energy consumption of different device types over the whole week (a more intuitive display of energy consumed over the week). In many cases, certain devices like the refrigerator, washer/dryer, and computer are predicted quite accurately, both in terms the total predicted percentage and in terms of the signals themselves. There are also cases where certain devices are not predicted well, such as underestimating the heating component in the example on the left, and a predicting spike in computer usage in the example on the right when it was in fact a dishwasher. Nonetheless, despite some poor predictions at the hourly device level, the breakdown of electric consumption is still quite informative, determining the approximate percentage of many devices types and demonstrating the promise of such feedback. In addition to the disaggregation results themselves, sparse coding representations of the different device types are interesting in their own right, as they give a good intuition about how the different devices are typically used. Figure 2 shows a graphical representation of the learned basis functions. In each plot, the grayscale image on the right shows an intensity map of all bases functions learned for that device category, where each column in the image corresponds to a learned basis. The plot on the left shows examples of seven basis functions for the different device types. Notice, for example, that the bases learned for the washer/dryer devices are nearly all heavily peaked, while the refrigerator bases are much lower in maximum magnitude. Additionally, in the basis images devices like lighting demonstrate a clear “band” pattern, indicating that these devices are likely to 6 1 2 3 4 5 6 7 0 1 2 3 Whole Home Actual Energy Predicted Energy 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 Computer 1 2 3 4 5 6 7 0 0.5 1 1.5 2 Washer/Dryer 1 2 3 4 5 6 7 0 0.5 1 Dishwasher 1 2 3 4 5 6 7 0 0.05 0.1 Refrigerator 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 Heating/Cooling True Usage Predicted Usage Lighting TV Computer Electronics Kitchen Appliances Washer/Dryer Dishwasher Refrigerator Heating/Cooling Other 1 2 3 4 5 6 7 0 0.5 1 1.5 2 Whole Home Actual Energy Predicted Energy 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 Computer 1 2 3 4 5 6 7 0 0.5 1 1.5 Washer/Dryer 1 2 3 4 5 6 7 0 0.5 1 Dishwasher 1 2 3 4 5 6 7 0 0.05 0.1 Refrigerator 1 2 3 4 5 6 7 0 0.02 0.04 0.06 Heating/Cooling True Usage Predicted Usage Lighting TV Computer Electronics Kitchen Appliances Washer/Dryer Dishwasher Refrigerator Heating/Cooling Other Figure 1: Example predicted energy profiles and total energy percentages (best viewed in color). Blue lines show the true energy usage, and red the predicted usage, both in units of kWh. 0 0.2 0.4 0.6 0.8 1 Lighting 0 0.2 0.4 0.6 0.8 1 Refridgerator 0 0.2 0.4 0.6 0.8 1 Washer/Dryer Figure 2: Example basis functions learned from three device categories (best viewed in color). The plot of the left shows seven example bases, while the image on the right shows all learned basis functions (one basis per column). be on and off during certain times of the day (each basis covers a week of energy usage, so the seven bands represent the seven days). The plots also suggests why the standard implementation of shift invariance is not helpful here. There is sufficient training data such that, for devices like washers and dryers, we learn a separate basis for all possible shifts. In contrast, for devices like lighting, where the time of usage is an important factor, simple shift-invariant bases miss key information. 3.3 Quantitative Evaluation of the Disaggregation Methods There are a number of components to the final algorithm we have proposed, and in this section we present quantitative results that evaluate the performance of each of these different components. While many of the algorithmic elements improve the disaggregation performance, the results in this section show that the discriminative training in particular is crucial for optimizing disaggregation performance. The most natural metric for evaluating disaggregation performance is the disaggregation error in (4). However, average disaggregation error is not a particularly intuitive metric, and so we also evaluate a total-week accuracy of the prediction system, defined formally as Accuracy ≡ P i,q min nP p(Xi)pq, P p(Bi ˆAi)pq o P p,q ¯Xp,q . (13) 7 Method Training Set Test Accuracy Disagg. Err. Acc. Disagg. Err. Acc. Predict Mean Energy 20.98 45.78% 21.72 47.41% SISC 20.84 41.87% 24.08 41.79% Sparse Coding 10.54 56.96% 18.69 48.00% Sparse Coding + TEP 11.27 55.52% 16.86 50.62% Sparse Coding + GL 10.55 54.98% 17.18 46.46% Sparse Coding + TEP + GL 9.24 58.03% 14.05 52.52% DDSC 7.20 64.42% 15.59 53.70% DDSC + TEP 8.99 59.61% 15.61 53.23% DDSC + GL 7.59 63.09% 14.58 52.20% DDSC + TEP + GL 7.92 61.64% 13.20 55.05% Table 1: Disaggregation results of algorithms (TEP = Total Energy Prior, GL = Group Lasso, SISC = Shift Invariant Sparse Coding, DDSC = Discriminative Disaggregation Sparse Coding). 0 20 40 60 80 100 7.5 8 8.5 9 9.5 Training Set DDSC Iteration 0 20 40 60 80 1000.56 0.58 0.6 0.62 0.64 Disaggregation Error Accuracy 0 20 40 60 80 100 13 13.5 14 14.5 Test Set DDSC Iteration 0 20 40 60 80 1000.52 0.54 0.56 0.58 Disaggregation Error Accuracy Figure 3: Evolution of training and testing errors for iterations of the discriminative DDSC updates. Despite the complex definition, this quantity simply captures the average amount of energy predicted correctly over the week (i.e., the overlap between the true and predicted energy pie charts). Table 1 shows the disaggregation performance obtained by many different prediction methods. The advantage of the discriminative training procedure is clear: all the methods employing discriminative training perform nearly as well or better than all the methods without discriminative training; furthermore, the system with all the extensions, discriminative training, a total energy prior, and the group Lasso, outperforms all competing methods on both metrics. To put these accuracies in context, we note that separate to the results presented here we trained an SVM, using a variety of hand-engineered features, to classify individual energy signals into their device category, and were able to achieve at most 59% classification accuracy. It therefore seems unlikely that we could disaggregate a signal to above this accuracy and so, informally speaking, we expect the achievable performance on this particular data set to range between 47% for the baseline of predicting mean energy (which in fact is a very reasonable method, as devices often follow their average usage patterns) and 59% for the individual classification accuracy. It is clear, then, that the discriminative training is crucial to improving the performance of the sparse coding disaggregation procedure within this range, and does provide a significant improvement over the baseline. Finally, as shown in Figure 3, both the training and testing error decrease reliably with iterations of DDSC, and we have found that this result holds for a wide range of parameter choices and step sizes (though, as with all gradient methods, some care be taken to choose a step size that is not prohibitively large). 4 Conclusion Energy disaggregation is a domain where advances in machine learning can have a significant impact on energy use. In this paper we presented an application of sparse coding algorithms to this task, focusing on a large data set that contains the type of low-resolution data readily available from smart meters. We developed the discriminative disaggregation sparse coding (DDSC) algorithm, a novel discriminative training procedure, and show that this algorithm significantly improves the accuracy of sparse coding for the energy disaggregation task. Acknowledgments This work was supported by ARPA-E (Advanced Research Projects Agency– Energy) under grant number DE-AR0000018. We are very grateful to Plugwise for providing us with their plug-level energy data set, and in particular we thank Willem Houck for his assistance with this data. We also thank Carrie Armel and Adrian Albert for helpful discussions. 8 References [1] D. Archer. Global Warming: Understanding the Forecast. Blackwell Publishing, 2008. [2] M. Berges, E. Goldman, H. S. Matthews, and L Soibelman. Learning systems for electric comsumption of buildings. In ASCI International Workshop on Computing in Civil Engineering, 2009. [3] T. Blumensath and M. Davies. On shift-invariant sparse coding. Lecture Notes in Computer Science, 3195(1):1205–1212, 2004. [4] D. Bradley and J.A. Bagnell. Differentiable sparse coding. In Advances in Neural Information Processing Systems, 2008. [5] M. Collins. Discriminative training methods for hidden markov models: Theory and experiements with perceptron algorithms. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2002. [6] S. Darby. The effectiveness of feedback on energy consumption. Technical report, Environmental Change Institute, University of Oxford, 2006. [7] J. Eggert and E. Korner. Sparse coding and NMF. In IEEE International Joint Conference on Neural Networks, 2004. [8] J. Friedman, T. Hastie, H Hoefling, and R. Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 2(1):302–332, 2007. [9] J. Friedman, T. Hastie, and R. Tibshirani. A note on the group lasso and a sparse group lasso. Technical report, Stanford University, 2010. [10] R. Grosse, R. Raina, H. Kwong, and A. Y. Ng. Shift-invariant sparse coding for audio classification. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2007. [11] G. Hart. Nonintrusive appliance load monitoring. Proceedings of the IEEE, 80(12), 1992. [12] S. Hasler, H. Wersin, and E Korner. Combinging reconstruction and discrimination with class-specific sparse coding. Neural Computation, 19(7):1897–1918, 2007. [13] P.O. Hoyer. Non-negative sparse coding. In IEEE Workshop on Neural Networks for Signal Processing, 2002. [14] C. Laughman, K. Lee, R. Cox, S. Shaw, S. Leeb, L. Norford, and P. Armstrong. Power signature analysis. IEEE Power & Energy Magazine, 2003. [15] C. Laughman, S. Leeb, and Lee. Advanced non-intrusive monitoring of electric loads. IEEE Power and Energy, 2003. [16] W. Lee, G. Fung, H. Lam, F. Chan, and M. Lucente. Exploration on load signatures. International Conference on Electrical Engineering (ICEE), 2004. [17] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Supervised dictionary learning. In Advances in Neural Information Processing Systems, 2008. [18] J. Mairal, M. Leordeanu, F. Bach, M. Hebert, and J. Ponce. Discriminative sparse image models for class-specific edge detection and image interpretation. In European Conference on Computer Vision, 2008. [19] B. Neenan and J. Robinson. Residential electricity use feedback: A research synthesis and economic framework. Technical report, Electric Power Research Institute, 2009. [20] 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. [21] S. N. Patel, T. Robertson, J. A. Kientz, M. S. Reynolds, and G. D. Abowd. At the flick of a switch: Detecting and classifying unique electrical events on the residential power line. 9th international conference on Ubiquitous Computing (UbiComp 2007), 2007. [22] S. T. Roweis. One microphone source separation. In Advances in Neural Information Processing Systems, 2000. [23] M. N. Schmidt, J. Larsen, and F. Hsiao. Wind noise reduction using non-negative sparse coding. In IEEE Workshop on Machine Learning for Signal Processing, 2007. [24] M N. Schmidt and R. K. Olsson. Single-channel speech separation using sparse non-negative matrix factorization. In International Conference on Spoken Language Processing, 2006. [25] S. R. Shaw, C. B. Abler, R. F. Lepard, D. Luo, S. B. Leeb, and L. K. Norford. Instrumentation for high performance nonintrusive electrical load monitoring. ASME, 120(224), 1998. [26] F. Sultanem. Using appliance signatures for monitoring residential loads at meter panel level. IEEE Transaction on Power Delivery, 6(4), 1991. [27] B. Taskar, V. Chatalbashev, D. Koller, and C. Guestrin. Learning structured prediction models: A large margin approach. In International Conference on Machine Learning, 2005. [28] Various. Annual Energy Review 2009. U.S. Energy Information Administration, 2009. [29] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statisical Society, Series B, 68(1):49–67, 2007. 9
2010
148
3,908
Random Conic Pursuit for Semidefinite Programming Ariel Kleiner Computer Science Division Univerisity of California Berkeley, CA 94720 akleiner@cs.berkeley.edu Ali Rahimi Intel Research Berkeley Berkeley, CA 94720 ali.rahimi@intel.com Michael I. Jordan Computer Science Division University of California Berkeley, CA 94720 jordan@cs.berkeley.edu Abstract We present a novel algorithm, Random Conic Pursuit, that solves semidefinite programs (SDPs) via repeated optimization over randomly selected two-dimensional subcones of the PSD cone. This scheme is simple, easily implemented, applicable to very general SDPs, scalable, and theoretically interesting. Its advantages are realized at the expense of an ability to readily compute highly exact solutions, though useful approximate solutions are easily obtained. This property renders Random Conic Pursuit of particular interest for machine learning applications, in which the relevant SDPs are generally based upon random data and so exact minima are often not a priority. Indeed, we present empirical results to this effect for various SDPs encountered in machine learning; these experiments demonstrate the potential practical usefulness of Random Conic Pursuit. We also provide a preliminary analysis that yields insight into the theoretical properties and convergence of the algorithm. 1 Introduction Many difficult problems have been shown to admit elegant and tractably computable representations via optimization over the set of positive semidefinite (PSD) matrices. As a result, semidefinite programs (SDPs) have appeared as the basis for many procedures in machine learning, such as sparse PCA [8], distance metric learning [24], nonlinear dimensionality reduction [23], multiple kernel learning [14], multitask learning [19], and matrix completion [2]. While SDPs can be solved in polynomial time, they remain computationally challenging. Generalpurpose solvers, often based on interior point methods, do exist and readily provide high-accuracy solutions. However, their memory requirements do not scale well with problem size, and they typically do not allow a fine-grained tradeoff between optimization accuracy and speed, which is often a desirable tradeoff in machine learning problems that are based on random data. Furthermore, SDPs in machine learning frequently arise as convex relaxations of problems that are originally computationally intractable, in which case even an exact solution to the SDP yields only an approximate solution to the original problem, and an approximate SDP solution can once again be quite useful. Although some SDPs do admit tailored solvers which are fast and scalable (e.g., [17, 3, 7]), deriving and implementing these methods is often challenging, and an easily usable solver that alleviates these issues has been elusive. This is partly the case because generic first-order methods do not apply readily to general SDPs. In this work, we present Random Conic Pursuit, a randomized solver for general SDPs that is simple, easily implemented, scalable, and of inherent interest due to its novel construction. We consider general SDPs over Rd×d of the form min X⪰0 f(X) s.t. gj(X) ≤0, j = 1 . . . k, (1) 1 where f and the gj are convex real-valued functions, and ⪰denotes the ordering induced by the PSD cone. Random Conic Pursuit minimizes the objective function iteratively, repeatedly randomly sampling a PSD matrix and optimizing over the random two-dimensional subcone given by this matrix and the current iterate. This construction maintains feasibility while avoiding the computational expense of deterministically finding feasible directions or of projecting into the feasible set. Furthermore, each iteration is computationally inexpensive, though in exchange we generally require a relatively large number of iterations. In this regard, Random Conic Pursuit is similar in spirit to algorithms such as online gradient descent and sequential minimal optimization [20] which have illustrated that in the machine learning setting, algorithms that take a large number of simple, inexpensive steps can be surprisingly successful. The resulting algorithm, despite its simplicity and randomized nature, converges fairly quickly to useful approximate solutions. Unlike interior point methods, Random Conic Pursuit does not excel in producing highly exact solutions. However, it is more scalable and provides the ability to trade off computation for more approximate solutions. In what follows, we present our algorithm in full detail and demonstrate its empirical behavior and efficacy on various SDPs that arise in machine learning; we also provide early analytical results that yield insight into its behavior and convergence properties. 2 Random Conic Pursuit Random Conic Pursuit (Algorithm 1) solves SDPs of the general form (1) via a sequence of simple two-variable optimizations (2). At each iteration, the algorithm considers the two-dimensional cone spanned by the current iterate, Xt, and a random rank one PSD matrix, Yt. It selects as its next iterate, Xt+1, the point in this cone that minimizes the objective f subject to the constraints gj(Xt+1) ≤0 in (1). The distribution of the random matrices is periodically updated based on the current iterate (e.g., to match the current iterate in expectation); these updates yield random matrices that are better matched to the optimum of the SDP at hand. The two-variable optimization (2) can be solved quickly in general via a two-dimensional bisection search. As a further speedup, for many of the problems that we considered, the two-variable optimization can be altogether short-circuited with a simple check that determines whether the solution Xt+1 = Xt, with ˆβ = 1 and ˆα = 0, is optimal. Additionally, SDPs with a trace constraint tr X = 1 force α + β = 1 and therefore require only a one-dimensional optimization. Two simple guarantees for Random Conic Pursuit are immediate. First, its iterates are feasible for (1) because each iterate is a positive sum of two PSD matrices, and because the constraints gj of (2) are also those of (1). Second, the objective values decrease monotonically because β = 1, α = 0 is a feasible solution to (2). We must also note two limitations of Random Conic Pursuit: it does not admit general equality constraints, and it requires a feasible starting point. Nonetheless, for many of the SDPs that appear in machine learning, feasible points are easy to identify, and equality constraints are either absent or fortuitously pose no difficulty. We can gain further intuition by observing that Random Conic Pursuit’s iterates, Xt, are positive weighted sums of random rank one matrices and so lie in the random polyhedral cones Fx t := ( t X i=1 γixtx′ t : γi ≥0 ) ⊂{X : X ⪰0}. (3) Thus, Random Conic Pursuit optimizes the SDP (1) by greedily optimizing f w.r.t. the gj constraints within an expanding sequence of random cones {Fx t }. These cones yield successively better inner approximations of the PSD cone (a basis for which is the set of all rank one matrices) while allowing us to easily ensure that the iterates remain PSD. In light of this discussion, one might consider approximating the original SDP by sampling a random cone Fx n in one shot and replacing the constraint X ⪰0 in (1) with the simpler linear constraints X ∈Fx n. For sufficiently large n, Fx n would approximate the PSD cone well (see Theorem 2 below), yielding an inner approximation that upper bounds the original SDP; the resulting problem would be easier than the original (e.g., it would become a linear program if the gj were linear). However, we have found empirically that a very large n is required to obtain good approximations, thus negating any potential performance improvements (e.g., over interior point methods). Random Conic Pursuit 2 Algorithm 1: Random Conic Pursuit [brackets contain a particular, generally effective, sampling scheme] Input: A problem of the form (1) X0: a feasible initial iterate n ∈N: number of iterations [κ ∈(0, 1): numerical stability parameter] Output: An approximate solution Xn to (1) p ←a distribution over Rd [p ←N(0, Σ) with Σ = (1 −κ)X0 + κId] for t ←1 to n do Sample xt from p and set Yt ←xtx′ t Set ˆα, ˆβ to the optimizer of min α,β∈R f(αYt + βXt−1) s.t. gj(αYt + βXt−1) ≤0, j = 1 . . . k α, β ≥0 (2) Set Xt ←ˆαYt + ˆβXt−1 if ˆα > 0 then Update p based on Xt [p ←N(0, Σ) with Σ = (1 −κ)Xt + κId] end return Xn successfully resolves this issue by iteratively expanding the random cone Fx t . As a result, we are able to much more efficiently access large values of n, though we compute a greedy solution within Fx n rather than a global optimum over the entire cone. This tradeoff is ultimately quite advantageous. 3 Applications and Experiments We assess the practical convergence and scaling properties of Random Conic Pursuit by applying it to three different machine learning tasks that rely on SDPs: distance metric learning, sparse PCA, and maximum variance unfolding. For each, we compare the performance of Random Conic Pursuit (implemented in MATLAB) to that of a standard and widely used interior point solver, SeDuMi [21] (via cvx [9]), and to the best available solver which has been customized for each problem. To evaluate convergence, we first compute a ground-truth solution X∗for each problem instance by running the interior point solver with extremely low tolerance. Then, for each algorithm, we plot the normalized objective value errors [f(Xt) −f(X∗)]/|f(X∗)| of its iterates Xt as a function of the amount of time required to generate each iterate. Additionally, for each problem, we plot the value of an application-specific metric for each iterate. These metrics provide a measure of the practical implications of obtaining SDP solutions which are suboptimal to varying degrees. We evaluate scaling with problem dimensionality by running the various solvers on problems of different dimensionalities and computing various metrics on the solver runs as described below for each experiment. Unless otherwise noted, we use the bracketed sampling scheme given in Algorithm 1 with κ = 10−4 for all runs of Random Conic Pursuit. 3.1 Metric Learning Given a set of datapoints in Rd and a pairwise similarity relation over them, metric learning extracts a Mahalanobis distance dA(x, y) = p (x −y)′A(x −y) under which similar points are nearby and dissimilar points are far apart [24]. Let S be the set of similar pairs of datapoints, and let ¯S be its complement. The metric learning SDP, for A ∈Rd×d and C = P (i,j)∈S(xi −xj)(xi −xj)′, is min A⪰0 tr(CA) s.t. X (i,j)∈¯ S dA(xi, xj) ≥1. (4) To apply Random Conic Pursuit, X0 is set to a feasible scaled identity matrix. We solve the twovariable optimization (2) via a double bisection search: at each iteration, α is optimized out with a one-variable bisection search over α given fixed β, yielding a function of β only. This resulting function is itself then optimized using a bisection search over β. 3 0 734 1468 2202 2936 0 0.02 0.04 0.06 0.08 0.1 time (sec) normalized objective value error Interior Point Random Pursuit Projected Gradient 0 734 1468 2202 2936 0.4 0.6 0.8 1 time (sec) pairwise distance quality (Q) Interior Point Random Pursuit Projected Gradient d alg f after 2 hrs∗ time to Q > 0.99 100 IP 3.7e-9 636.3 100 RCP 2.8e-7, 3.0e-7 142.7, 148.4 100 PG 1.1e-5 42.3 200 RCP 5.1e-8, 6.1e-8 529.1, 714.8 200 PG 1.6e-5 207.7 300 RCP 5.4e-8, 6.5e-8 729.1, 1774.7 300 PG 2.0e-5 1095.8 400 RCP 7.2e-8, 1.0e-8 2128.4, 2227.2 400 PG 2.4e-5 1143.3 Figure 1: Results for metric learning. (plots) Trajectories of objective value error (left) and Q (right) on UCI ionosphere data. (table) Scaling experiments on synthetic data (IP = interior point, RCP = Random Conic Pursuit, PG = projected gradient), with two trials per d for RCP and times in seconds. ∗For d = 100, third column shows f after 20 minutes. As the application-specific metric for this problem, we measure the extent to which the metric learning goal has been achieved: similar datapoints should be near each other, and dissimilar datapoints should be farther away. We adopt the following metric of quality of a solution matrix X, where ζ = P i |{j : (i, j) ∈S}| · |{l : (i, l) ∈¯S}| and 1[·] is the indicator function: Q(X) = 1 ζ P i P j:(i,j)∈S P l:(i,l)∈¯ S 1[dij(X) < dil(X)]. To examine convergence behavior, we first apply the metric learning SDP to the UCI ionosphere dataset, which has d = 34 and 351 datapoints with two distinct labels (S contains pairs with identical labels). We selected this dataset from among those used in [24] because it is among the datasets which have the largest dimensionality and experience the greatest impact from metric learning in that work’s clustering application. Because the interior point solver scales prohibitively badly in the number of datapoints, we subsampled the dataset to yield 4 × 34 = 136 datapoints. To evaluate scaling, we use synthetic data in order to allow variation of d. To generate a ddimensional data set, we first generate mixture centers by applying a random rotation to the elements of C1 = {(−1, 1), (−1, −1)} and C2 = {(1, 1), (1, −1)}. We then sample each datapoint xi ∈Rd from N(0, Id) and assign it uniformly at random to one of two clusters. Finally, we set the first two components of xi to a random element of Ck if xi was assigned to cluster k ∈{1, 2}; these two components are perturbed by adding a sample from N(0, 0.25I2). The best known customized solver for the metric learning SDP is a projected gradient algorithm [24], for which we used code available from the author’s website. Figure 1 shows the results of our experiments. The two trajectory plots, for an ionosphere data problem instance, show that Random Conic Pursuit converges to a very high-quality solution (with high Q and negligible objective value error) significantly faster than interior point. Additionally, our performance is comparable to that of the projected gradient method which has been customized for this task. The table in Figure 1 illustrates scaling for increasing d. Interior point scales badly in part because parsing the SDP becomes impracticably slow for d significantly larger than 100. Nonetheless, Random Conic Pursuit scales well beyond that point, continuing to return solutions with high Q in reasonable time. On this synthetic data, projected gradient appears to reach high Q somewhat more quickly, though Random Conic Pursuit consistently yields significantly better objective values, indicating better-quality solutions. 3.2 Sparse PCA Sparse PCA seeks to find a sparse unit length vector that maximizes x′Ax for a given data covariance matrix A. This problem can be relaxed to the following SDP [8], for X, A ∈Rd×d: min X⪰0 ρ1′|X|1 −tr(AX) s.t. tr(X) = 1, (5) where the scalar ρ > 0 controls the solution’s sparsity. A subsequent rounding step returns the dominant eigenvector of the SDP’s solution, yielding a sparse principal component. We use the colon cancer dataset [1] that has been used frequently in past studies of sparse PCA and contains 2,000 microarray readings for 62 subjects. The goal is to identify a small number of 4 0 1076 2152 3228 4304 0 0.02 0.04 0.06 0.08 0.1 time (sec) normalized objective value error Interior Point Random Pursuit DSPCA 1076 2152 3228 4304 0 0.13 0.26 0.39 0.52 time (sec) top eigenvector sparsity Interior Point Random Pursuit DSPCA d alg f after 4 hrs sparsity after 4 hrs 120 IP -10.25 0.55 120 RCP -9.98, -10.02 0.47, 0.45 120 DSPCA -10.24 0.55 200 IP failed failed 200 RCP -10.30, -10.27 0.51, 0.50 200 DSPCA -11.07 0.64 300 IP failed failed 300 RCP -9.39, -9.29 0.51, 0.51 300 DSPCA -11.52 0.69 500 IP failed failed 500 RCP -6.95, -6.54 0.53, 0.50 500 DSPCA -11.61 0.78 Figure 2: Results for sparse PCA. All solvers quickly yield similar captured variance (not shown here). (plots) Trajectories of objective value error (left) and sparsity (right), for a problem with d = 100. (table) Scaling experiments (IP = interior point, RCP = Random Conic Pursuit), with two trials per d for RCP. microarray cells that capture the greatest variance in the dataset. We vary d by subsampling the readings and use ρ = 0.2 (large enough to yield sparse solutions) for all experiments. To apply Random Conic Pursuit, we set X0 = A/ tr(A). The trace constraint (5) implies that tr(Xt−1) = 1 and so tr(αYt + βXt−1) = α tr(Yt) + β = 1 in (2). Thus, we can simplify the two-variable optimization (2) to a one-variable optimization, which we solve by bisection search. The fastest available customized solver for the sparse PCA SDP is an adaptation of Nesterov’s smooth optimization procedure [8] (denoted by DSPCA), for which we used a MATLAB implementation with heavy MEX optimizations that is downloadable from the author’s web site. We compute two application-specific metrics which capture the two goals of sparse PCA: high captured variance and high sparsity. Given the top eigenvector u of a solution matrix X, its captured variance is u′Au, and its sparsity is given by 1 d P j 1[|uj| < τ]; we take τ = 10−3 based on qualitative inspection of the raw microarray data covariance matrix A. The results of our experiments are shown in Figure 2. As seen in the two plots, on a problem instance with d = 100, Random Conic Pursuit quickly achieves an objective value within 4% of optimal and thereafter continues to converge, albeit more slowly; we also quickly achieve fairly high sparsity (compared to that of the exact SDP optimum). In contrast, interior point is able to achieve lower objective value and even higher sparsity within the timeframe shown, but, unlike Random Conic Pursuit, it does not provide the option of spending less time to achieve a solution which is still relatively sparse. All of the solvers quickly achieve very similar captured variances, which are not shown. DSPCA is extremely efficient, requiring much less time than its counterparts to find nearly exact solutions. However, that procedure is highly customized (via several pages of derivation and an optimized implementation), whereas Random Conic Pursuit and interior point are general-purpose. The table in Figure 2 illustrates scaling by reporting achieved objecive values and sparsities after the solvers have each run for 4 hours. Interior point fails due to memory requirements for d > 130, whereas Random Conic Pursuit continues to function and provide useful solutions, as seen from the achieved sparsity values, which are much larger than those of the raw data covariance matrix. Again, DSPCA continues to be extremely efficient. 3.3 Maximum Variance Unfolding (MVU) MVU searches for a kernel matrix that embeds high-dimensional input data into a lower-dimensional manifold [23]. Given m data points and a neighborhood relation i ∼j between them, it forms their centered and normalized Gram matrix G ∈Rm×m and the squared Euclidean distances d2 ij = Gii+Gjj −2Gij. The desired kernel matrix is the solution of the following SDP, where X ∈Rm×m and the scalar ν > 0 controls the dimensionality of the resulting embedding: max X⪰0 tr(X) −ν X i∼j (Xii + Xjj −2Xij −d2 ij)2 s.t. 1′X1 = 0. (6) To apply Random Conic Pursuit, we set X0 = G and use the general sampling formulation in Algorithm 1 by setting p = N(0, Π(∇f(Xt))) in the initialization (i.e., t = 0) and update steps, where 5 0 10 20 30 1800 2000 2200 2400 2600 2800 3000 Time (sec) Objective value Interior Point Random Pursuit 0 100 200 300 400 0 2 4 6 8x 10 4 Time (sec) Objective value Random Pursuit m alg f after convergence seconds to f >0.99 ˆ f 40 IP 23.4 0.4 40 RCP 22.83 (0.03) 0.5 (0.03) 40 GD 23.2 5.4 200 IP 2972.6 12.4 200 RCP 2921.3 (1.4) 6.6 (0.8) 200 GD 2943.3 965.4 400 IP 12255.6 97.1 400 RCP 12207.96 (36.58) 26.3 (9.8) 800 IP failed failed 800 RCP 71231.1 (2185.7) 115.4 (29.2) Figure 3: Results for MVU. (plots) Trajectories of objective value for m = 200 (left) and m = 800 (right). (table) Scaling experiments showing convergence as a function of m (IP = interior point, RCP = Random Conic Pursuit, GD = gradient descent). Π truncates negative eigenvalues of its argument to zero. This scheme empirically yields improved performance for the MVU problem as compared to the bracketed sampling scheme in Algorithm 1. To handle the equality constraint, each Yt is first transformed to ˘Yt = (I −11′/m)Yt(I −11′/m), which preserves PSDness and ensures feasibility. The two-variable optimization (2) proceeds as before on ˘Yt and becomes a two-variable quadratic program, which can be solved analytically. MVU also admits a gradient descent algorithm, which serves as a straw-man large-scale solver for the MVU SDP. At each iteration, the step size is picked by a line search, and the spectrum of the iterate is truncated to maintain PSDness. We use G as the initial iterate. To generate data, we randomly sample m points from the surface of a synthetic swiss roll [23]; we set ν = 1. To quantify the amount of time it takes a solver to converge, we run it until its objective curve appears qualitatively flat and declare the convergence point to be the earliest iterate whose objective is within 1% of the best objective value seen so far (which we denote by ˆf). Figure 3 illustrates that Random Conic Pursuit’s objective values converge quickly, and on problems where the interior point solver achieves the optimum, Random Conic Pursuit nearly achieves that optimum. The interior point solver runs out of memory when m > 400 and also fails on smaller problems if its tolerance parameter is not tuned. Random Conic Pursuit easily runs on larger problems for which interior point fails, and for smaller problems its running time is within a small factor of that of the interior point solver; Random Conic Pursuit typically converges within 1000 iterations. The gradient descent solver is orders of magnitude slower than the other solvers and failed to converge to a meaningful solution for m ≥400 even after 2000 iterations (which took 8 hours). 4 Analysis Analysis of Random Conic Pursuit is complicated by the procedure’s use of randomness and its handling of the constraints gj ≤0 explicitly in the sub-problem (2), rather than via penalty functions or projections. Nonetheless, we are able to obtain useful insights by first analyzing a simpler setting having only a PSD constraint. We thus obtain a bound on the rate at which the objective values of Random Conic Pursuit’s iterates converge to the SDP’s optimal value when the problem has no constraints of the form gj ≤0: Theorem 1 (Convergence rate of Random Conic Pursuit when f is weakly convex and k = 0). Let f : Rd×d →R be a convex differentiable function with L-Lipschitz gradients such that the minimum of the following optimization problem is attained at some X∗: min X⪰0 f(X). (7) Let X1 . . . Xt be the iterates of Algorithm 1 when applied to this problem starting at iterate X0 (using the bracketed sampling scheme given in the algorithm specification), and suppose ∥Xt−X∗∥ is bounded. Then Ef(Xt) −f(X∗) ≤1 t · max(ΓL, f(X0) −f(X∗)), (8) for some constant Γ that does not depend on t. 6 Proof. We prove that equation (8) holds in general for any X∗, and thus for the optimizer of f in particular. The convexity of f implies the following linear lower bound on f(X) for any X and Y : f(X) ≥f(Y ) + ⟨∂f(Y ), X −Y ⟩. (9) The Lipschitz assumption on the gradient of f implies the following quadratic upper bound on f(X) for any X and Y [18]: f(X) ≤f(Y ) + ⟨∂f(Y ), X −Y ⟩+ L 2 ∥X −Y ∥2. (10) Define the random variable ˜Yt := γt(Yt)Yt with γt a positive function that ensures E ˜Yt = X∗. It suffices to set γt = q(Y )/˘p(Y ), where ˘p is the distribution of Yt and q is any distribution with mean X∗. In particular, the choice ˜Yt := γt(xt)xtx′ t with γt(x) = N(x|0, X∗)/N(x|0, Σt) satisfies this. At iteration t, Algorithm 1 produces αt and βt so that Xt+1 := αtYt + βtXt minimizes f(Xt+1). We will bound the defect f(Xt+1) −f(X∗) at each iteration by sub-optimally picking ˆαt = 1/t, ˆβt = 1 −1/t, and ˆXt+1 = ˆβtXt + ˆαtγt(Yt)Yt = ˆβtXt + ˆαt ˜Yt. Conditioned on Xt, we have Ef(Xt+1) −f(X∗) ≤Ef(ˆβtXt + ˆαt ˜Yt) −f(X∗) = Ef  Xt −1 t (Xt −˜Yt)  −f(X∗) (11) ≤f(Xt) −f(X∗) + E D ∂f(Xt), 1 t ( ˜Yt −Xt) E + L 2t2 E∥Xt −˜Yt∥2 (12) = f(Xt) −f(X∗) + 1 t ⟨∂f(Xt), X∗−Xt⟩+ L 2t2 E∥Xt −˜Yt∥2 (13) ≤f(Xt) −f(X∗) + 1 t (f(X∗) −f(Xt)) + L 2t2 E∥Xt −˜Yt∥2 (14) = 1 −1 t  f(Xt) −f(X∗)  + L 2t2 E∥Xt −˜Yt∥2. (15) The first inequality follows by the suboptimality of ˆαt and ˆβt, the second by Equation (10), and the third by (9). Define et := Ef(Xt)−f(X∗). The term E∥˜Yt −Xt∥2 is bounded above by some absolute constant Γ because E∥˜Yt −Xt∥2 = E∥˜Yt −X∗∥2 + ∥Xt −X∗∥2. The first term is bounded because it is the variance of ˜Yt, and the second term is bounded by assumption. Taking expectation over Xt gives the bound et+1 ≤ 1 −1 t  et + LΓ 2t2 , which is solved by et = 1 t · max(ΓL, f(X0) −f(X∗)) [16]. Despite the extremely simple and randomized nature of Random Conic Pursuit, the theorem guarantees that its objective values converge at the rate O(1/t) on an important subclass of SDPs. We omit here some readily available extensions: for example, the probability that a trajectory of iterates violates the above rate can be bounded by noting that the iterates’ objective values behave as a finite difference sub-martingale. Additionally, the theorem and proof could be generalized to hold for a broader class of sampling schemes. Directly characterizing the convergence of Random Conic Pursuit on problems with constraints appears to be significantly more difficult and seems to require introduction of new quantities depending on the constraint set (e.g., condition number of the constraint set and its overlap with the PSD cone) whose implications for the algorithm are difficult to explicitly characterize with respect to d and the properties of the gj, X∗, and the Yt sampling distribution. Indeed, it would be useful to better understand the limitations of Random Conic Pursuit. As noted above, the procedure cannot readily accommodate general equality constraints; furthermore, for some constraint sets, sampling only a rank one Yt at each iteration could conceivably cause the iterates to become trapped at a sub-optimal boundary point (this could be alleviated by sampling higher rank Yt). A more general analysis is the subject of continuing work, though our experiments confirm empirically that we realize usefully fast convergence of Random Conic Pursuit even when it is applied to a variety of constrained SDPs. We obtain a different analytical perspective by recalling that Random Conic Pursuit computes a solution within the random polyhedral cone Fx n, defined in (3) above. The distance between this cone and the optimal matrix X∗is closely related to the quality of solutions produced by Random Conic Pursuit. The following theorem characterizes the distance between a sampled cone Fx n and any fixed X∗in the PSD cone: Theorem 2. Let X∗≻0 be a fixed positive definite matrix, and let x1, . . . , xn ∈Rd be drawn i.i.d. from N(0, Σ) with Σ ≻X∗. Then, for any δ > 0, with probability at least 1 −δ, min X∈Fx n ∥X −X∗∥≤1 + √ 2 log 1 δ √n · 2 e q ΣX∗−1  X∗−1 −Σ−1−1 2 7 See supplementary materials for proof. As expected, Fx n provides a progressively better approximation to the PSD cone (with high probability) as n grows. Furthermore, the rate at which this occurs depends on X∗and its relationship to Σ; as the latter becomes better matched to the former, smaller values of n are required to achieve an approximation of given quality. The constant Γ in Theorem 1 can hide a dependence on the dimensionality of the problem d, though the proof of Theorem 2 helps to elucidate the dependence of Γ on d and X∗for the particular case when Σ does not vary over time (the constants in Theorem 2 arise from bounding ∥γt(xt)xtx′ t∥). A potential concern regarding both of the above theorems is the possibility of extremely adverse dependence of their constants on the dimensionality d and the properties (e.g., condition number) of X∗. However, our empirical results in Section 3 show that Random Conic Pursuit does indeed decrease the objective function usefully quickly on real problems with relatively large d and solution matrices X∗which are rank one, a case predicted by the analysis to be among the most difficult. 5 Related Work Random Conic Pursuit and the analyses above are related to a number of existing optimization and sampling algorithms. Our procedure is closely related to feasible direction methods [22], which move along descent directions in the feasible set defined by the constraints at the current iterate. Cutting plane methods [11], when applied to some SDPs, solve a linear program obtained by replacing the PSD constraint with a polyhedral constraint. Random Conic Pursuit overcomes the difficulty of finding feasible descent directions or cutting planes, respectively, by sampling directions randomly and also allowing the current iterate to be rescaled. Pursuit-based optimization methods [6, 13] return a solution within the convex hull of an a priorispecified convenient set of points M. At each iteration, they refine their solution to a point between the current iterate and a point in M. The main burden in these methods is to select a near-optimal point in M at each iteration. For SDPs having only a trace equality constraint and with M the set of rank one PSD matrices, Hazan [10] shows that such points in M can be found via an eigenvalue computation, thereby obtaining a convergence rate of O(1/t). In contrast, our method selects steps randomly and still obtains a rate of O(1/t) in the unconstrained case. The Hit-and-Run algorithm for sampling from convex bodies can be combined with simulated annealing to solve SDPs [15]. In this configuration, similarly to Random Conic Pursuit, it conducts a search along random directions whose distribution is adapted over time. Finally, whereas Random Conic Pursuit utilizes a randomized polyhedral inner approximation of the PSD cone, the work of Calafiore and Campi [5] yields a randomized outer approximation to the PSD cone obtained by replacing the PSD constraint X ⪰0 with a set of sampled linear inequality constraints. It can be shown that for linear SDPs, the dual of the interior LP relaxation is identical to the exterior LP relaxation of the dual of the SDP. Empirically, however, this outer relaxation requires impractically many sampled constraints to ensure that the problem remains bounded and yields a good-quality solution. 6 Conclusion We have presented Random Conic Pursuit, a simple, easily implemented randomized solver for general SDPs. Unlike interior point methods, our procedure does not excel at producing highly exact solutions. However, it is more scalable and provides useful approximate solutions fairly quickly, characteristics that are often desirable in machine learning applications. This fact is illustrated by our experiments on three different machine learning tasks based on SDPs; we have also provided a preliminary analysis yielding further insight into Random Conic Pursuit. Acknowledgments We are grateful to Guillaume Obozinski for early discussions that motivated this line of work. 8 References [1] U. Alon, N. Barkai, D. A. Notterman, K. Gish, S. Ybarra, D. Mack, and A. J. Levine. Broad patterns of gene expression revealed by clustering analysis of tumor and normal colon tissues probed by oligonucleotide arrays. Proc. Natl. Acad. Sci. USA, 96:6745–6750, June 1999. [2] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [3] S. Burer and R.D.C Monteiro. Local minima and convergence in low-rank semidefinite programming. Mathematical Programming, 103(3):427–444, 2005. [4] S. Burer, R.D.C. Monteiro, and Y. Zhang. A computational study of a gradient-based log-barrier algorithm for a class of large-scale sdps. Mathematical Programming, 95(2):359–379, 2003. [5] G. Calafiore and M.C. Campi. Uncertain convex programs: randomized solutions and confidence levels. Mathematical Programming, 102(1):25–46, 2005. [6] K. Clarkson. Coresets, sparse greedy approximation, and the frank-wolfe algorithm. In Symposium on Discrete Algorithms (SODA), 2008. [7] A. d’Aspremont. Subsampling algorithms for semidefinite programming. Technical Report 0803.1990, ArXiv, 2009. [8] A. d’Aspremont, L. El Ghaoui, M. I. Jordan, and G. R. G. Lanckriet. A direct formulation for sparse pca using semidefinite programming. SIAM Review, 49(3):434–448, 2007. [9] M. Grant and S. Boyd. CVX: Matlab software for disciplined convex programming, version 1.21. http://cvxr.com/cvx, May 2010. [10] E. Hazan. Sparse approximate solutions to semidefinite programs. In Latin American conference on Theoretical informatics, pages 306–316, 2008. [11] C. Helmberg. A cutting plane algorithm for large scale semidefinite relaxations. In Martin Gr¨otschel, editor, The sharpest cut, chapter 15. MPS/SIAM series on optimization, 2001. [12] C. Helmberg and F. Rendl. A spectral bundle method for semidefinite programming. SIAM Journal on Optimization archive, 10(3):673–696, 1999. [13] L. K. Jones. A simple lemma on greedy approximation in Hilbert space and convergence rates for projection pursuit regression and neural network training. The Annals of Statistics, 20(1):608–613, March 1992. [14] G. R. G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research (JMLR), 5:27–72, December 2004. [15] L. Lov´asz and S. Vempala. Fast algorithms for logconcave functions: Sampling, rounding, integration and optimization. In Foundations of Computer Science (FOCS), 2006. [16] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [17] Y Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127– 152, May 2005. [18] Y. Nesterov. Smoothing technique and its applications in semidefinite optimization. Mathematical Programming, 110(2):245–259, July 2007. [19] G. Obozinski, B. Taskar, and M. I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing, pages 1573–1375, 2009. [20] J. Platt. Using sparseness and analytic QP to speed training of Support Vector Machines. In Advances in Neural Information Processing Systems (NIPS), 1999. [21] J.F. Sturm. Using sedumi 1.02, a matlab toolbox for optimization over symmetric cones. Optimization Methods and Software, Special issue on Interior Point Methods, 11-12:625–653, 1999. [22] W. Sun and Y. Yuan. Optimization Theory And Methods: Nonlinear Programming. Springer Optimization And Its Applications, 2006. [23] K. Q. Weinberger, F. Sha, Q. Zhu, and L. K. Saul. Graph laplacian regularization for large-scale semidefinite programming. In Advances in Neural Information Processing Systems (NIPS), 2006. [24] E. Xing, A. Ng, M. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In Advances in Neural Information Processing Systems (NIPS), 2003. 9
2010
149
3,909
A Computational Decision Theory for Interactive Assistants Alan Fern School of EECS Oregon State University Corvallis, OR 97331 afern@eecs.oregonstate.edu Prasad Tadepalli School of EECS Oregon State University Corvallis, OR 97331 tadepall@eecs.oregonstate.edu Abstract We study several classes of interactive assistants from the points of view of decision theory and computational complexity. We first introduce a class of POMDPs called hidden-goal MDPs (HGMDPs), which formalize the problem of interactively assisting an agent whose goal is hidden and whose actions are observable. In spite of its restricted nature, we show that optimal action selection in finite horizon HGMDPs is PSPACE-complete even in domains with deterministic dynamics. We then introduce a more restricted model called helper action MDPs (HAMDPs), where the assistant’s action is accepted by the agent when it is helpful, and can be easily ignored by the agent otherwise. We show classes of HAMDPs that are complete for PSPACE and NP along with a polynomial time class. Furthermore, we show that for general HAMDPs a simple myopic policy achieves a regret, compared to an omniscient assistant, that is bounded by the entropy of the initial goal distribution. A variation of this policy is shown to achieve worst-case regret that is logarithmic in the number of goals for any goal distribution. 1 Introduction Integrating AI with Human Computer Interaction has received significant attention in recent years [8, 11, 13, 3, 2]. In most applications, e.g. travel scheduling, information retrieval, or computer desktop navigation, the relevant state of the computer is fully observable, but the goal of the user is not, which poses a difficult problem to the computer assistant. The assistant needs to correctly reason about the relative merits of taking different actions in the presence of significant uncertainty about the goals of the human agent. It might consider taking actions that directly reveal the goal of the agent, e.g. by asking questions to the user. However, direct communication is often difficult due to the language mismatch between the human and the computer. Another strategy is to take actions that help achieve the most likely goals. Yet another strategy is to take actions that help with a large number of possible goals. In this paper, we formulate and study several classes of interactive assistant problems from the points of view of decision theory and computational complexity. Building on the framework of decision-theoretic assistance (DTA) [5], we analyze the inherent computational complexity of optimal assistance in a variety of settings and the sources of that complexity. Positively, we analyze a simple myopic heuristic and show that it performs nearly optimally in a reasonably pervasive assistance problem, thus explaining some of the positive empirical results of [5]. We formulate the problem of optimal assistance as solving a hidden-goal MDP (HGMDP), which is a special case of a POMDP [6]. In a HGMDP, a (human) agent and a (computer) assistant take actions in turns. The agent’s goal is the only unobservable part of the state of the system and does not change throughout the episode. The objective for the assistant is to find a history-dependent policy that maximizes the expected reward of the agent given the agent’s goal-based policy and its goal distribution. Despite the restricted nature of HGMDPs, the complexity of determining if an HGMDP has a finite-horizon policy of a given value is PSPACE-complete even in deterministic 1 environments. This motivates a more restricted model called Helper Action MDP (HAMDP), where the assistant executes a helper action at each step. The agent is obliged to accept the helper action if it is helpful for its goal and receives a reward bonus (or cost reduction) for doing so. Otherwise, the agent can continue with its own preferred action without any reward or penalty to the assistant. We show classes of this problem that are complete for PSPACE and NP. We also show that for the class of HAMDPs with deterministic agents there are polynomial time algorithms for minimizing the expected and worst-case regret relative to an omniscient assistant. Further, we show that the optimal worst case regret can be characterized by a graph-theoretic property called the tree rank of the corresponding all-goals policy tree and can be computed in linear time. The main positive result of the paper is to give a simple myopic policy for general stochastic HAMDPs that has a regret which is upper bounded by the entropy of the goal distribution. Furthermore we give a variant of this policy that is able to achieve worst-case and expected regret that is logarithmic in the number of goals without any prior knowledge of the goal distribution. To the best of our knowledge, this is the first formal study of the computational hardness of the problem of decision-theoretically optimal assistance and the performance of myopic heuristics. While the current HAMDP results are confined to unobtrusively assisting a competent agent, they provide a strong foundation for analyzing more complex classes of assistant problems, possibly including direct communication, coordination, partial observability, and irrationality of users. 2 Hidden Goal MDPs Throughout the paper we will refer to the entity that we are attempting to assist as the agent and the assisting entity as the assistant. Our objective is to select actions for the assistant in order to help the agent maximize its reward. The key complication is that the agent’s goal is not directly observable to the assistant, so reasoning about the likelihood of possible goals and how to help maximize reward given those goals is required. In order to support this type of reasoning we will model the agent-assistant process via hidden goal MDPs (HGMDPs). General Model. An HGMDP describes the dynamics and reward structure of the environment via a first-order Markov model, where it is assumed that the state is fully observable to both the agent and assistant. In addition, an HGMDP describes the possible goals of the agent and the behavior of the agent when pursuing those goals. More formally, an HGMDP is a tuple ⟨S, G, A, A′, T, R, π, IS, IG⟩where S is a set of states, G is a finite set of possible agent goals, A is the set of agent actions, A′ is the set of assistant actions, T is the transition function such that T(s, g, a, s′) is the probability of a transition to state s′ from s after taking action a ∈A ∪A′ when the agent goal is g, R is the reward function which maps S ×G×(A∪A′) to real valued rewards, π is the agent’s policy that maps S × G to distributions over A and need not be optimal in any sense, and IS (IG) is an initial state (goal) distribution. The dependence of the reward and policy on the goal allows the model to capture the agent’s desires and behavior under each goal. The dependence of T on the goal is less intuitive and in many cases there will be no dependence when T is used only to model the dynamics of the environment. However, we allow goal dependence of T for generality of modeling. For example, it can be convenient to model basic communication actions of the agent as changing aspects of the state, and the result of such actions will often be goal dependent. We consider a finite-horizon episodic problem setting where the agent begins each episode in a state drawn from IS with a goal drawn from IG. The goal, for example, might correspond to a physical location, a dish that the agent wants to cook, or a destination folder on a computer desktop. The process then alternates between the agent and assistant executing actions (including noops) in the environment until the horizon is reached. The agent is assumed to select actions according to π. In many domains, a terminal goal state will be reached within the horizon, though in general, goals can have arbitrary impact on the reward function. The reward for the episode is equal to the sum of the rewards of the actions executed by the agent and assistant during the episode. The objective of the assistant is to reason about the HGMDP and observed state-action history in order to select actions that maximize the expected (or worst-case) total reward of an episode. An example HGMDP from previous work [5] is the doorman domain, where an agent navigates a grid world in order to arrive at certain goal locations. To move from one location to another the agent must open a door and then walk through the door. The assistant can reduce the effort for the agent by opening the relevant doors for the agent. Another example from [1] involves a computer 2 desktop where the agent wishes to navigate to certain folders using a mouse. The assistant can select actions that offer the agent a small number of shortcuts through the folder structure. Given knowledge of the agent’s goal g in an HGMDP, the assistant’s problem reduces to solving an MDP over assistant actions. The MDP transition function captures both the state change due to the assistant action and also the ensuing state change due to the agent action selected according to the policy π given g. Likewise the reward function on a transition captures the reward due to the assistant action and the ensuing agent action conditioned on g. The optimal policy for this MDP corresponds to an optimal assistant policy for g. However, since the real assistant will often have uncertainty about the agent’s goal, it is unlikely that this optimal performance will be achieved. Computational Complexity. We can view an HGMDP as a collection of |G| MDPs that share the same state space, where the assistant is placed in one of the MDPs at the beginning of each episode, but cannot observe which one. Each MDP is the result of fixing the goal component of the HGMDP definition to one of the goals. This collection can be easily modeled as a restricted type of partially observable MDP (POMDP) with a state space S × G. The S component is completely observable, while the G component is unobservable but only changes at the beginning of each episode (according to IG) and remains constant throughout an episode. Furthermore, each POMDP transition provides observations of the agent action, which gives direct evidence about the unchanging G component. From this perspective HGMDPs appear to be a significant restriction over general POMDPs. However, our first result shows that despite this restriction the worst-case complexity is not reduced even for deterministic dynamics. Given an HGMDP M, a horizon m = O(|M|) where |M| is the size of the encoding of M, and a reward target r∗, the short-term reward maximization problem asks whether there exists a historydependent assistant policy that achieves an expected finite horizon reward of at least r∗. For general POMDPs this problem is PSPACE-complete [12, 10], and for POMDPs with deterministic dynamics, it is NP-complete [9]. However, we have the following result. Theorem 1. Short-term reward maximization for HGMDPs with deterministic dynamics is PSPACE-complete. The proof is in the appendix. This result shows that any POMDP can be encoded as an HGMDP with deterministic dynamics, where the stochastic dynamics of the POMDP are captured via the stochastic agent policy in the HGMDP. However, the HGMDPs resulting from the PSPACE-hardness reduction are quite pathological compared to those that are likely to arise in practice. Most importantly, the agent’s actions provide practically no information about the agent’s goal until the end of an episode, when it is too late to exploit this knowledge. This suggests that we search for restricted classes of HGMDPs that will allow for efficient solutions with performance guarantees. 3 Helper Action MDPs The motivation for HAMDPs is to place restrictions on the agent and assistant that avoid the following three complexities that arise in general HGMDPs: 1) the agent can behave arbitrarily poorly if left unassisted and as such the agent actions may not provide significant evidence about the goal; 2) the agent is free to effectively “ignore” the assistant’s help and not exploit the results of assistive action, even when doing so would be beneficial; and 3) the assistant actions have the possibility of negatively impacting the agent compared to not having an assistant. HAMDPs will address the first issue by assuming that the agent is competent at (approximately) maximizing reward without the assistant. The last two issues will be addressed by assuming that the agent will always “detect and exploit” helpful actions and that the assistant actions do not hurt the agent. Informally, the HAMDP provides the assistant with a helper action for each of the agent’s actions. Whenever a helper action h is executed directly before the corresponding agent action a, the agent receives a bonus reward of 1. However, the agent will only accept the helper action h (by taking a) and hence receive the bonus, if a is an action that the agent considers to be good for achieving the goal without the assistant. Thus, the primary objective of the assistant in an HAMDP is to maximize the number of helper actions that get accepted by the agent. While simple, this model captures much of the essence of assistance domains where assistant actions cause minimal harm and the agent is able to detect and accept good assistance when it arises. An HAMDP is an HGMDP ⟨S, G, A, A′, T, R, π, IS, IG⟩with the following constraints: 3 • The agent and the assistant actions sets are A = {a1, . . . , an} and A′ = {h1, . . . , hn}, so that for each ai there is a corresponding helper action hi. • The state space is S = W ∪(W × A′), where W is a set of world states. States in W × A′ encode the current world state and the previous assistant action. • The reward function R is 0 for all assistant actions. For agent actions the reward is zero unless the agent selects the action ai in state (s, hi) which gives a reward of 1. That is, the agent receives a bonus of 1 whenever its action corresponds to the preceding helper action. • The assistant always acts from states in W, and T is such that taking hi in s deterministically transitions to (s, hi). • The agent always acts from states in S×A′, resulting in states in S according to a transition function that does not depend on hi, i.e. T((s, hi), g, ai, s′) = T ′(s, g, ai, s′) for some transition function T ′. • Finally, for the agent policy, let Π(s, g) be a function that returns a set of actions and P(s, g) be a distribution over those actions. We will view Π(s, g) as the set of actions that the agent considers acceptable (or equally good) in state s for goal g. The agent policy π always selects ai after its helper action hi whenever ai is acceptable. That is, π((s, hi), g) = ai whenever ai ∈Π(s, g). Otherwise the agent draws an action according to P(s, g). In a HAMDP, the primary impact of an assistant action is to influence the reward of the following agent action. The only rewards in HAMDPS are the bonuses received whenever the agent accepts a helper action. Any additional environmental reward is assumed to be already captured by the agent policy via Π(s, g) that contains actions that approximately optimize this reward. The HAMDP model can be adapted to both the doorman domain in [5] and the folder prediction domain from [1]. In the doorman domain, the helper actions correspond to opening doors for the agent, which reduce the cost of navigating from one room to another. Importantly opening an incorrect door has a fixed reward loss compared to an optimal assistant, which is a key property of HAMDPs. In the folder prediction domain, the system proposes multiple folders to save a file, potentially saving the user a few clicks every time the proposal is accepted. Despite the apparent simplification of HAMDPs over HGMDPs, somewhat surprisingly the worst case computational complexity is not reduced. Theorem 2. Short-term reward maximization for HAMDPs is PSPACE-complete. The proof is in the appendix. Unlike the case of HGMDPs, we will see that the stochastic dynamics are essential for PSPACE-hardness. Despite this negative result, the following sections show the utility of the HAMDP restriction by giving performance guarantees for simple policies and improved complexity results in special cases. So far, there are no analogous results for HGMDPs. 4 Regret Analysis for HAMDPs Given an assistant policy π′, the regret of a particular episode is the extra reward that an omniscient assistant with knowledge of the goal would achieve over π′. For HAMDPs the omniscient assistant can always achieve a reward equal to the finite horizon m, because it can always select a helper action that will be accepted by the agent. Thus, the regret of an execution of π′ in a HAMDP is equal to the number of helper actions that are not accepted by the agent, which we will call mispredictions. From above we know that optimizing regret is PSPACE-hard and thus here we focus on bounding the expected and worst-case regret of the assistant. We now show that a simple myopic policy is able to achieve regret bounds that are logarithmic in the number of goals. Myopic Policy. Intuitively, our myopic assistant policy ˆπ will select an action that has the highest probability of being accepted with respect to a “coarsened” version of the posterior distribution over goals. The myopic policy in state s given history H is based on the consistent goal set C(H), which is the set of goals that have non-zero probability with respect to history H. It is straightforward to maintain C(H) after each observation. The myopic policy is defined as: ˆπ(s, H) = arg max a IG(C(H) ∩G(s, a)) where G(s, a) = {g | a ∈Π(s, g)} is the set of goals for which the agent considers a to be an acceptable action in state s. The expression IG(C(H) ∩G(s, a)) can be viewed as the probability 4 mass of G(s, a) under a coarsened goal posterior which assigns goals outside of C(H) probability zero and otherwise weighs them proportional to the prior. Theorem 3. For any HAMDP the expected regret of the myopic policy is bounded above by the entropy of the goal distribution H(IG). Proof. The main idea of the proof is to show that after each misprediction of the myopic policy (i.e. the selected helper action is not accepted by the agent) the uncertainty about the goal is reduced by a constant factor, which will allow us to bound the total number of mispredictions on any trajectory. Consider a misprediction step where the myopic policy selects helper action hi in state s given history H, but the agent does not accept the action and instead selects a∗̸= ai. By the definition of the myopic policy we know that IG(C(H) ∩G(s, ai)) ≥IG(C(H) ∩G(s, a∗)), since otherwise the assistant would not have chosen hi. From this fact we now argue that IG(C(H′)) ≤IG(C(H))/2 where H′ is the history after the misprediction. That is, the probability mass under IG of the consistent goal set after the misprediction is less than half that of the consistent goal set before the misprediction. To show this we will consider two cases: 1) IG(C(H) ∩G(s, ai)) < IG(C(H))/2, and 2) IG(C(H) ∩G(s, ai)) ≥IG(C(H))/2. In the first case, we immediately get that IG(C(H)∩G(s, a∗)) < IG(C(H))/2. Combining this with the fact that C(H′) ⊆C(H)∩G(s, a∗) we get the desired result that IG(C(H′)) ≤IG(C(H))/2. In the second case, note that C(H′) ⊆C(H) ∩(G(s, a∗) −G(s, ai)) ⊆C(H) −(C(H) ∩G(s, ai)) Combining this with our assumption for the second case implies that IG(C(H′)) ≤IG(C(H))/2. This implies that for any episode, after n mispredictions resulting in a history Hn, IG(C(Hn)) ≤ 2−n. Now consider an arbitrary episode where the true goal is g. We know that IG(g) is a lower bound on IG(C(Hn)), which implies that IG(g) ≤2−n or equivalently that n ≤−log(IG(g)). Thus for any episode with goal g the maximum number of mistakes is bounded by −log(IG(g)). Using this fact we get that the expected number of mispredictions during an episode with respect to IG is bounded above by −P g IG(g) log(IG(g)) = H(IG), which completes the proof. Since H(IG) ≤log(|G|), this result implies that for HAMDPs the expected regret of the myopic policy is no more than logarithmic in the number of goals. Furthermore, as the uncertainty about the goal decreases (decreasing H(IG)) the regret bound improves until we get a regret of 0 when IG puts all mass on a single goal. This logarithmic bound is asymptotically tight in the worst case. Theorem 4. There exists a HAMDP such that for any assistant policy the expected regret is at least log(|G|)/2. Proof. Consider a deterministic HAMDP such that the environment is structured as a binary tree of depth log(|G|), where each leaf corresponds to one of the |G| goals. By considering a uniform goal distribution it is easy to verify that at any node in the tree there is an equal chance that the true goal is in the left or right sub-tree during any episode. Thus, any policy will have a 0.5 chance of committing a misprediction at each step of an episode. Since each episode is of length log(|G|), the expected regret of an episode for any policy is log(|G|)/2. Resolving the gap between the myopic policy bound and this regret lower bound is an open problem. Approximate Goal Distributions. Suppose that the assistant uses an approximate goal distribution I′ G instead of the true underlying goal distribution IG when computing the myopic policy. That is, the assistant selects actions that maximize I′ G(C(H) ∩G(s, a)), which we will refer to as the myopic policy relative to I′ G. The extra regret for using I′ G instead of IG can be bounded in terms of the KL-divergence between these distributions KL(IG ∥I′ G), which is zero when I′ G equals IG. Theorem 5. For any HAMDP with goal distribution IG, the expected regret of the myopic policy with respect to distribution I′ G is bounded above by H(IG) + KL(IG ∥I′ G). The proof is in the appendix. Deriving similar results for other approximations is an open problem. A consequence of Theorem 5 is that the myopic policy with respect to the uniform goal distribution has expected regret bounded by log(|G|) for any HAMDP, showing that logarithmic regret can be achieved without knowledge of IG. This can be strengthened to hold for worst case regret. 5 Theorem 6. For any HAMDP, the worst case and hence expected regret of the myopic policy with respect to the uniform goal distribution is bounded above by log(|G|). Proof. The proof of Theorem 5 shows that the number of mispredictions on any episode is bounded above by −log(I′ G). In our case I′ G = 1/|G| which shows a worst case regret bound of log(|G|), which also bounds the expected regret of the uniform myopic policy. 5 Deterministic and Bounded Choice Policies We now consider several special cases of HAMDPs. First, we restrict the agent’s policy to be deterministic for each goal, i.e. Π(s, g) has at most a single action for each state-goal pair (s, g). Theorem 7. The myopic policy achieves the optimal expected reward for HAMDPs with deterministic agent policies. The proof is given in the appendix. We now consider the case where both the agent policy and the environment are deterministic, and attempt to minimize the worst possible regret compared to an omniscient assistant who knows the agent’s goal. As it happens, this “minimax policy” can be captured by a graph-theoretic notion of tree rank that generalizes the rank of decision trees [4]. Definition 1. The rank of a rooted tree is the rank of its root node. If a node is a leaf node then rank(node) = 0, else if a node has at least two distinct children c1 and c2 with equal highest ranks among all children, then rank(node) = 1+ rank(c1). Otherwise rank(node) = rank of the highest ranked child. The optimal trajectory tree (OTT) of a HAMDP in deterministic environments is a tree where the nodes represent the states of the HAMDP reached by the prefixes of optimal action sequences for different goals starting from the initial state.1 Each node in the tree represents a state and a set of goals for which it is on the optimal path from the initial state. Since the agent policy and the environment are both deterministic, there is at most one trajectory per goal in the tree. Hence the size of the optimal trajectory tree is bounded by the number of goals times the maximum length of any trajectory, which is at most the size of the state space in deterministic domains. The following Lemma follows by induction on the depth of the optimal trajectory tree. Lemma 1. The minimum worst-case regret of any policy for an HAMDP for deterministic environments and deterministic agent policies is equal to the tree rank of its optimal trajectory tree. Theorem 8. If the agent policy is deterministic, the problem of minimizing the maximum regret in HAMDPs in deterministic environments is in P. Proof. We first construct the optimal trajectory tree. We then compute its rank and the optimal minimax policy using the recursive definition of tree rank in linear time. The assumption of deterministic agent policy may be too restrictive in many domains. We now consider HAMDPs in which the agent policies have a constant bound on the number of possible actions in Π(s, g) for each state-goal pair. We call them bounded choice HAMDPs. Definition 2. The branching factor of a HAMDP is the largest number of possible actions in Π(s, g) by the agent in any state for any goal and any assistant’s action. The doorman domain of [5] has a branching factor of 2 since there are at most two optimal actions to reach any goal from any state. Theorem 9. Minimizing the worst-case regret in finite horizon bounded choice HAMDPS of a constant branching factor k ≥2 in deterministic environments is NP-complete. The proof is in the appendix. We can also show that minimizing the expected regret for a bounded k is NP-hard. We conjecture that this problem is also in NP, but this question remains open. 1If there are multiple initial states, we build an OTT for each initial state. Then the rank would be the maximum of the ranks of all trees. 6 6 Conclusions and Future Work In this paper, we formulated the problem of optimal assistance and analyzed its complexity in multiple settings. We showed that the general problem of HGMDP is PSPACE-complete due to the lack of constraints on the user, who can behave stochastically or even adversarially with respect to the assistant, which makes the assistant’s task very difficult. By suitably constraining the user’s actions through HAMDPs, we are able to reduce the complexity to NP-complete, but only in deterministic environments with bounded choice agents. More encouragingly, we are able to show that HAMDPs are amenable to a simple myopic heuristic which has a regret bounded by the entropy of the goal distribution when compared to the omniscient assistant. This is a satisfying result since optimal communication of the goal requires as much information to pass from the agent to the assistant. Importantly, this result applies to stochastic as well as deterministic environments and with no bound on the number of agent’s action choices. Although HAMDPs are somewhat restricted compared to possible assistantship scenarios one could imagine, they in fact fit naturally to many domains where the user is on-line, knows which helper actions are acceptable, and accepts help when it is appropriate to the goal. Indeed, in many domains, it is reasonable to constrain the assistant so that the agent has the final say on approving the actions proposed by the assistant. These scenarios range from the ubiquitous auto-complete functions and Microsoft’s infamous Paperclip to more sophisticated adaptive programs such as SmartEdit [7] and TaskTracer [3] that learn assistant policies from users’ long-term behaviors. By analyzing the complexity of these tasks in a more general framework than what is usually done, we shed light on some of the sources of complexity such as the stochasticity of the environment and the agent’s policy. Many open problems remain including generalization of these and other results to more general assistant frameworks, including partially observable and adversarial settings, learning assistants, and multi-agent assistance. 7 Appendix Proof of Theorem 1. Membership in PSPACE follows from the fact that any HGMDP can be polynomially encoded as a POMDP for which policy existence is in PSPACE. To show PSPACEhardness, we reduce the QSAT problem to the problem of the existence of a history-dependent assistant policy of expected reward ≥r. Let φ be a quantified Boolean formula ∀x1∃x2∀x3 . . . ∃xn {C1(x1, . . . , xn) ∧. . . ∧ Cm(x1, . . . , xn)}, where each Ci is a disjunctive clause. For us, each goal gi is a quantified clause, ∀x1∃x2∀x3 . . . ∃xn {Ci(x1, . . . , xn)}. The agent chooses a goal uniformly randomly from the set of goals formed from φ and hides it from the assistant. The states consist of pairs of the form (v, i), where v ∈{0, 1} is the current value of the goal clause, and i is the next variable to set. The actions of the assistant are to set the existentially quantified variables. The agent simulates setting the universally quantified variables by choosing actions from the set {0, 1} with equal probability. The episode terminates when all the variables are set, and the assistant gets a reward of 1 if the value of the clause is 1 at the end and a reward of 0 otherwise. Note that the assistant does not get any useful feedback from the agent until it is too late and it either makes a mistake or solves the goal. The best the assistant can do is to find an optimal historydependent policy that maximizes the expected reward over the goals in Φ. If Φ is satisfiable, then there is an assistant policy that leads to a reward of 1 over all goals and all agent actions, and hence has an expected value of 1 over the goal distribution. If not, then at least one of the goals will not be satisfied for some setting of the universal quantifiers, leading to an expected value < 1. Proof of Theorem 2. Membership in PSPACE follows easily since HAMDP is a specialization of HGMDP. The proof of PSPACE-hardness is identical to that of 1 except that here, instead of the agent’s actions, the stochastic environment models the universal quantifiers. The agent accepts all actions until the last one and sets the variable as suggested by the assistant. After each of the assistant’s actions, the environment chooses a value for the universally quantified variable with equal probability. The last action is accepted by the agent if the goal clause evaluates to 1, otherwise not. There is a history-dependent policy whose expected reward ≥the number of existential variables if and only if the quantified Boolean formula is satisfiable. 7 Proof of Theorem 5. The proof is similar to that of Theorem 3, except that since the myopic policy is with respect to I′ G rather than IG, on any episode, the maximum number of mispredictions n is bounded above by −log(I′ G(g)). Hence, the average number of mispredictions is given by: P g IG(g) log( 1 I′ G(g)) = X g IG(g)  log( 1 I′ G(g)) + log(IG(g)) −log(IG(g))  = P g IG(g) log(IG(g) I′ G(g)) − X g IG(g) log(IG(g)) = H(IG) + KL(IG ∥I′ G). Proof of Theorem 7. According to the theory of POMDPs, the optimal action in a POMDP maximizes the sum of the immediate expected reward and the value of the resulting belief state (of the assistant) [6]. When the agent policy is deterministic, the initial goal distribution IG and the history of agent actions and states H fully capture the belief state of the agent. Let V (IG, H) represent the optimal value of the current belief state. It satisfies the following Bellman equation, where H′ stands for the history after the assistant’s action hi and the agent’s action aj. V (IG, H) = max hi E(R((s, hi), g, aj)) + V (IG, H′) Since there is only one agent’s action a∗(s, g) in Π(s, g), the subsequent state s′ in H′, and its value do not depend on hi. Hence the best helper action h∗of the assistant is given by: h∗(IG, H) = arg max hi E(R((s, hi), g, a∗(s, g))) = arg max hi X g∈C(H) IG(g)I(ai ∈Π(s, g)) = arg max hi IG(C(H) ∩G(s, ai)) where C(H) is the set of goals consistent with the current history H, and G(s, ai) is the set of goals g for which ai ∈Π(s, g). I(ai ∈Π(s, g)) is an indicator function which is = 1 if ai ∈Π(s, g). Note that h∗is exactly the myopic policy. Proof of Theorem 9. We first show that the problem is in NP. We build a tree representation of an optimal history-dependent policy for each initial state which acts as a polynomial-size certificate. Every node in the tree is represented by a pair (si, Gi), where si is a state and Gi is a set of goals for which the node is on a good path from the root node. We let hi be the helper action selected in node i. The children of a node in the tree represent possible successor nodes (sj, Gj) reached by the agent’s response to hi. Note that multiple children can result from the same action because the dynamics is a function of the agent’s goal. To verify that the optimal policy tree is of polynomial size we note that the number of leaf nodes is upper bounded by |G| × maxg N(g), where N(g) is the number of leaf nodes generated by the goal g and G is the set of all goals. To estimate N(g), we note that by our protocol, for any node (si, Gi) where g ∈Gi and the assistant’s action is hi, if ai ∈Π(s, g), it will have a single successor that contains g. Otherwise, there is a misprediction, which leads to at most k successors for g. Hence, the number of nodes reached for g grows geometrically with the number of mispredictions. Since there are at most log |G| mispredictions in any such path, N(g) ≤klog2 |G| = klogk |G| log2 k = |G|log2 k. Hence the total number of all leaf nodes of the tree is bounded by |G|1+log k, and the total number of nodes in the tree is bounded by m|G|1+log k, where m is the number of steps to the horizon. Since this is polynomial in the problem parameters, the problem is in NP. To show NP-hardness, we reduce 3-SAT to the given problem. We consider each 3-literal clause Ci of a propositional formula Φ as a possible goal. The rest of the proof is identical to that of Theorem 1 except that all variables are set by the assistant. The agent accepts every setting, except possibly the last one which he reverses if the clause evaluates to 0. Since the assistant does not get any useful information until it makes the clause true or fails to do so, its optimal policy is to choose the assignment that maximizes the number of satisfied clauses so that the mistakes are minimized. The assistant makes a single prediction mistake on the last literal of each clause that is not satisfied by the assignment. Hence, the worst regret on any goal is 0 iff the 3-SAT problem is satisfiable. Acknowledgments The authors gratefully acknowledge the support of NSF under grants IIS-0905678 and IIS-0964705. 8 References [1] Xinlong Bao, Jonathan L. Herlocker, and Thomas G. Dietterich. Fewer clicks and less frustration: reducing the cost of reaching the right folder. In IUI, pages 178–185, 2006. [2] J. Boger, P. Poupart, J. Hoey, C. Boutilier, G. Fernie, and A. Mihailidis. A decision-theoretic approach to task assistance for persons with dementia. In IJCAI, 2005. [3] Anton N. Dragunov, Thomas G. Dietterich, Kevin Johnsrude, Matt McLaughlin, Lida Li, and Jon L. Herlocker. Tasktracer: A desktop environment to support multi-tasking knowledge workers. In Proceedings of IUI, 2005. [4] Andrzej Ehrenfeucht and David Haussler. Learning decision trees from random examples. Information and Computation, 82(3):231–246, September 1989. [5] A. Fern, S. Natarajan, K. Judah, and P. Tadepalli. A decision-theoretic model of assistance. In Proceedings of the International Joint Conference in AI, 2007. [6] Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra. Planning and acting in partially observable stochastic domains. Artificial Intelligence, 101:99–134, 1998. [7] Tessa A. Lau, Steven A. Wolfman, Pedro Domingos, and Daniel S. Weld. Programming by demonstration using version space algebra. Machine Learning, 53(1-2):111–156, 2003. [8] H. Lieberman. User interface goals, AI opportunities. AI Magazine, 30(2), 2009. [9] M. L . Littman. Algorithms for Sequential Decision Making. PhD thesis, Brown University, Providence, RI, 1996. [10] Martin Mundhenk. The complexity of planning with partially-observable Markov Decision Processes. PhD thesis, Friedrich-Schiller-Universitdt, 2001. [11] K. Myers, P. Berry, J. Blythe, K. Conley, M. Gervasio, D. McGuinness, D. Morley, A. Pfeffer, M. Pollack, and M. Tambe. An intelligent personal assistant for task and time management. AI Magazine, 28(2):47– 61, 2007. [12] C. Papadimitriou and J. Tsitsiklis. The complexity of Markov Decision Processes. Mathematics of Operations Research, 12(3):441–450, 1987. [13] M. Tambe. Electric Elves: What went wrong and why. AI Magazine, 29(2), 2008. 9
2010
15
3,910
Deterministic Single-Pass Algorithm for LDA Issei Sato University of Tokyo, Japan sato@r.dl.itc.u-tokyo.ac.jp Kenichi Kurihara Google kenichi.kurihara@gmail.com Hiroshi Nakagawa University of Tokyo, Japan n3@dl.itc.u-tokyo.ac.jp Abstract We develop a deterministic single-pass algorithm for latent Dirichlet allocation (LDA) in order to process received documents one at a time and then discard them in an excess text stream. Our algorithm does not need to store old statistics for all data. The proposed algorithm is much faster than a batch algorithm and is comparable to the batch algorithm in terms of perplexity in experiments. 1 Introduction Running me Memory usage iREM-LDA CVB-LDA short long sREM-LDA large small VB-LDA Figure 1: Overview of the relationships among inferences. Huge quantities of text data such as news articles and blog posts arrives in a continuous stream. Online learning has attracted a great deal of attention as a useful method for handling this growing quantity of streaming data because it processes data one at a time, whereas batch algorithms are not feasible in these settings because they need all the data at the same time. This paper focus on online learning for Latent Dirichlet allocation (LDA) (Blei et al., 2003), which is a widely used probabilistic model for text data. Online learning for LDA has been already developed (Banerjee and Basu, 2007; Alsumait et al., 2008; Canini et al., 2009; Yao et al., 2009). Existing studies were based on sampling methods such as the incremental Gibbs sampler and particle filter. Sampling methods seem to be inappropriate for streaming data because sampling methods have to represent a posterior by using a lot of samples, which basically needs much time. Moreover, sampling algorithms often need a resampling step in which a sampling method is applied to old data. Storing old data or old samples adversely affects the good properties of online algorithms. Particle filters also need to run m parallel processing. A parallel algorithm needs more memory than a single-process algorithm, which is not useful for a large quantity of data, especially in the case of a large vocabulary. For example, LDA needs to store the number of words observed in a topic. If the number of topics is T, the vocabulary size is V and m, so the required memory size is O(m ∗T ∗V ). We propose two deterministic online algorithms; an incremental algorithms and a single-pass algorithm. Our incremental algorithm is an incremental variant of the reverse EM (REM) algorithm (Minka, 2001). The incremental algorithm updates parameters by replacing old sufficient statistics with new one for each datum. Our single-pass algorithm is based on an incremental algorithm, but it does not need to store old statistics for all data. In our single-pass algorithm, we propose a sequential update method for the Dirichlet parameters. Asuncion et al. (2009); Wallach et al. (2009) indicated the importance of estimating the parameters of the Dirichlet distribution, which is the distribution over the topic distributions of documents. Moreover, we can deal with the growing vocabulary size. In real life, the total vocabulary size is unknown, i.e., increasing as a document is observed. 1 In summary, Fig.1 shows the relationships among inferences. VB-LDA is the variational inference for LDA, which is a batch inference; CVB-LDA is the collapsed variational inference for LDA (Teh et al., 2007); iREM-LDA is our incremental algorithm; and sREM-LDA is our single-pass algorithm for LDA. Sections.2 briefly explains inference algorithms for LDA. Section 3 describes the proposed algorithm for online learning. Section 4 presents the experimental results. 2 Overview of Latent Dirichlet Allocation This section overviews LDA where documents are represented as random mixtures over latent topics and each topic is characterized by a distribution over words. First, we will define the notations, and then, describe the formulation of LDA. T is the number of topics. M is the number of documents. V is the vocabulary size. Nj is the number of words in document j. wj,i denotes the i-th word in document j. zj,i denotes the latent topic of word wj,i. Multi(·) is a multinomial distribution. Dir(·) is a Dirichlet distribution. θj denotes a T-dimensional probability vector that is the parameters of the multinomial distribution, and represents the topic distribution of document j. βt is a multinomial parameter a V -dimensional probability where βt,v specifies the probability of generating word v given topic t. α is the T-dimensional parameter vector of the Dirichlet distribution over θj (j = 1, · · · , M). LDA assumes the following generative process. For each of the T topics t, draw βt ∼Dir(β|λ) ∝ ∏ v βλ−1 t,v . For each of the M documents j, draw θj ∼Dir(θ|α) where Dir(θ|α) ∝ ∏ t θαt−1 t . For each of the Nj words wj,i in document j, draw topic zj,i ∼Multi(z|θj) and draw word wj,i ∼ p(w|zj,i, β) where p(w = v|z = t, β) = βt,v. That is to say, the complete-data likelihood of a document wj is given by p(wj, zj, θj|α, β) = p(θj|α) Nj ∏ i p(wj,i|zj,i, β)p(zj|θj). (1) 2.1 Variational Bayes Inference for LDA The VB inference for LDA(Blei et al., 2003) introduces a factorized variational posterior q(z, θ, β) over z = {zj,i}, θ = {θj} and β = {βt} given by q(z, θ, β) = ∏ j,i q(zj,i|ϕj,i) ∏ j q(θj|γj) ∏ t q(βt|µt), (2) where ϕ and γ are variational parameters, ϕj,i,t specifies the probability that the topic of word wj,k is topic t, and γj and µt are the parameters of the Dirichlet distributions over θj and βt, respectively, i.e., q(θj|γj) ∝ ∏ t θγj,t−1 j,t and q(βt|µt) ∝ ∏ v βµt,v−1 t,v . The log-likelihood of documents is lower bounded introducing q(z, θ) by F[q(z, θ, β)] = ∫∑ z q(z, θ, β) log ∏ j p(wj, zj, θj|α, β) ∏ t p(βt|λ) q(z, θ, β) dθjdβ. (3) The parameters are updated as ϕj,i,t ∝exp Ψ(µt,wj,i) exp Ψ(∑ v µt,v) exp Ψ(γj,t)), γj,t = αt + Nj ∑ i=1 ϕj,i,t, µt,v = λ + ∑ j nj,t,v, (4) where nj,t,v = ∑ i ϕj,i,tI(wj,i = v) and I(·) is an indicator function. We can estimate α with the fixed point iteration (Minka, 2000; Asuncion et al., 2009) by introducing the gamma prior G(αt|a0, b0), i.e., αt ∼G(αt|a0, b0)(t = 1, ..., T), as αnew t = a0 −1 + ∑ j{Ψ(αold t + nj,t) −Ψ(αold t )}αold t b0 + ∑ j(Ψ(Nj + αold 0 ) −Ψ(αold 0 )) , (5) 2 Algorithm 1 VB inference for LDA 1: for iteration it = 1, · · · , L do 2: for j = 1, · · · , M do 3: for i = 1, · · · , Nj do 4: Update ϕj,i,t (t = 1, · · · , T) by Eq. (4) 5: end for 6: Update γj,t (t = 1, · · · , T) by Eq. (4) 7: end for 8: Update µ by Eq. (4) 9: Update α by Eq. (5) 10: end for Algorithm 2 CVB inference for LDA 1: for iteration it = 1, · · · , L do 2: for j = 1, · · · , M do 3: for i = 1, · · · , Nj do 4: Update ϕj,i,t by Eq. (7) 5: Update nj,t replacing ϕold j,i,t with ϕnew j,i,t. 6: Update nt,wj,i replacing ϕold j,i,t with ϕnew j,i,t. 7: end for 8: end for 9: Update α by Eq. (5) 10: end for where α0 = ∑ t αt, and a0 and b0 are the parameters for the gamma distribution. Algorithm 1 has the VB inference scheme of LDA. 2.2 Collapsed Variational Bayes Inference for LDA Teh et al. (2007) proposed CVB-LDA inspired by collapsed Gibbs sampling and found that the convergence of CVB-LDA is experimentally faster than that of VB-LDA, and CVB-LDA outperformed VB-LDA in terms of perplexity. The CVB-LDA only introduced a variational posterior q(z) where it marginalized out θ and β over the priors. The CVB inference optimizes the following lower bound given by FCV B[q(z)] = M ∑ j=1 ∑ z q(z) log p(wj, zj|α, λ) q(z) . (6) The derivation of the update equation for q(z) is slightly complicated and involves approximations to compute intractable summations. Although Teh et al. (2007) made use of a second-order Taylor expansion as an approximation, Asuncion et al. (2009) shows the usefulness of an approximation using only zero-order information. An update using only zero-order information is given by ϕj,i,t ∝ λ + n−j,i t,wj,i V λ + ∑ v n−j,i t,v (αt + n−j,i j,t ), nj,t = Nj ∑ i=1 ϕj,i,t, nt,v = ∑ j,i ϕj,i,tI(wj,i = v), (7) where “-j,i” denotes subtracting ϕj,i,t. Algorithm 2 provides the CVB inference scheme for LDA. 3 Deterministic Online Algorithm for LDA The purpose of this study is to process text data such as news articles and blog posts arriving in a continuous stream by using LDA. We propose a learning algorithm for LDA that can be applied to these semi-infinite and time-series text streams. For these situations, we want to process text one at a time and then discard them. We repeat iterations only for each word within a document. That is, we update parameters from an arriving document and discard the document after doing l iterations. Therefore, we do not need to store statistics about discarded documents. First, we derived an incremental algorithm for LDA, and then we extended the incremental algorithm to a single-pass algorithm. 3.1 Incremental Learning (Neal and Hinton, 1998) provided a framework of incremental learning for the EM algorithm. In general unsupervised-learning, we estimate sufficient statistics si for each data i, compute whole 3 sufficient statistics σ(= ∑ i si) from all data, and update parameters by using σ. In incremental learning, for each data i, we estimate si, compute σ(i) from si , and update parameters from σ(i). It is easy to extend an existing batch algorithm to the incremental learning if whole sufficient statistics or parameters updates are constructed by simply summarizing all data statistics. The incremental algorithm processes data i by subtracting old sold i and adding new snew i , i.e., σ(i) = −sold i + snew i . The incremental algorithm needs to store old statistics {sold i } for all data. While batch algorithms update parameters sweeping through all data, the incremental algorithm updates parameters for each data one at a time, which results in more parameter updates than batch algorithms. Therefore, the incremental algorithm sometimes converge faster than batch algorithms. 3.2 Incremental Learning for LDA Our motivation for devising the incremental algorithm for LDA was to compare CVB-LDA and VB-LDA. Statistics {nt,v} and {nj,t} are updated after each word is updated in CVB-LDA. This update schedule is similar to that of the incremental algorithm. This incremental property seems to be the reason CVB-LDA converges faster than VB-LDA. Moreover, since CVB-LDA optimizes a tighterlower-bound from VB-LDA, CVB-LDA can find better optima. Below, let us consider the incremental algorithm for LDA. We start by optimizing the lower-bound different form VB-LDA by using the reverse EM (REM) algorithm (Minka, 2001) as follows: p(wj|α, β) = ∫ Nj ∏ i=1 T ∑ t=1 V∏ v=1 (θj,tβt,v)I(wj,i=v)p(θj|α)dθj = ∫ Nj ∏ i=1 T ∑ t=1 (θj,tβt,wj,i)p(θj|α)dθj, (8) ≥ ∫ Nj ∏ i=1 T ∏ t=1 (θj,tβt,wj,i ϕj,i,t )ϕj,i,t p(θj|α)dθj, (9) = Nj ∏ i=1 T ∏ t=1 (βt,wj,i ϕj,i,t )ϕj,i,t ∫ T ∏ t=1 θ ∑ i ϕj,i,t j,t p(θj|α)dθj. (10) Equation (9) is derived from Jensen’s inequality as follows. log ∑ x f(x) = log ∑ x q(x) f(x) q(x) ≥ ∑ x q(x) log f(x) q(x) = log ∏ x( f(x) q(x) )q(x) where ∑ x q(x) = 1, and so ∑ x f(x) ≥∏ x( f(x) q(x) )q(x). Therefore, the lower bound for the log-likelihood is given by ˆF[q(z)] = ∑ j,i,t ϕj,i,t log βt,wj,i ϕj,i,t + ∑ j log ( Γ(∑ t αt) Γ(Nj + ∑ t αt) ∏ t Γ(αt + ∑ i ϕj,i,t) Γ(αt) ) . (11) The maximum of ˆF[q(z)] with respect to q(zj,i = t) = ϕj,i,t and β is given by ϕj,i,t ∝βt,wj,i exp{Ψ(αt + ∑ i ϕj,i,t)}, βtv ∝λ + ∑ j nj,t,v, (12) The updates of α are the same as Eq.(5). Note that we use the maximum a posteriori estiamtion for β, however, we do not use λ −1 to avoid λ −1 + ∑ j nj,t,v taking a negative value. The lower bound ˆF[q(z)] introduces only q(z) like CVB-LDA. Equation (12) incrementally updates the topic distribution of a document for each word as in CVB-LDA because we do not need γj,i in Eq.(12) due to marginalizing out of θj. Equation (12) is a fixed point update, whereas CVB-LDA can be interpreted as a coordinate ascent algorithm. α and β are updated from the entire document. That is, when we compare this algorithm with VB-LDA, it looks like a hybrid variant of a batch updates for α and β, and incremental updates for γj, Here, we consider an incremental update for β to be analogous to CVBLDA, in which β is updated for each word. Note that in the LDA setup, each independent identically distributed data point is a document not a word. Therefore, we incrementally estimate β for each document by swapping statistics nj,t,v = ∑Nj i ϕj,i,tI(wj,i = v) which is the number of word v generated from topic t in document j. Algorithm 3 shows our incremental algorithm for LDA. This algorithm incrementally optimizes the lower bound in Eq.(11). 4 Algorithm 3 Incremental algorithm for LDA 1: for iteration it = 1, · · · , L do 2: for j = 1, · · · , M do 3: for i = 1, · · · , Nj do 4: Update ϕj,i,t by Eq. (12) 5: end for 6: Replace nold j,t,v with nnew j,t,v for v ∈ {wj,i}Nj i=1 in β of Eq. (12) . 7: end for 8: Update α by Eq. (5) 9: end for Algorithm 4 Single-pass algorithm for LDA 1: for j = 1, · · · , M do 2: for iteration it = 1, · · · , l do 3: for i = 1, ..., Nj do 4: Update ϕj,i,t by Eq. (13). 5: end for 6: Update β(j) by Eq.(13). 7: Update α(j) by Eq.(17). 8: end for 9: Update λ(j) by Eq.(14). 10: Update ˜a(j) and ˜b(j) by Eq.(17). 11: end for 3.3 Single-Pass Algorithm for LDA Our single-pass algorithm for LDA was inspired by the Bayesian formulation, which internally includes a sequential update. The posterior distribution with the contribution from the data point xN is separated out so that p(θ|{xi}N i=1) ∝p(xN|θ)p(θ|{xi}N−1 i=1 ), where θ denotes a parameter. This indicates that we can use a posterior given an observed datum as a prior for the next datum.. We use parameters learned from observed data as prior parameters for the next data. For example, βt,v in Eq. (12) is represented as βt,v ∝{λ + ∑M−1 j nj,t,v} + nM,t,v. Here, we can interpret {λ + ∑M−1 j nj,t,v} as prior parameter λ(M−1) t,v for the M-th document. Our single-pass algorithm sequentially sets a prior for each arrived document. By using this sequential setting of prior parameters, we present a single-pass algorithm for LDA as shown in Algorithm 4. First, we update parameters from j-th arrived document given prior parameters {λ(j−1) t,v } for l iterations ϕj,i,t ∝β(j) t,wj,i exp{Ψ(α(j) t + ∑ i ϕj,i,t)}, β(j) t,v ∝λ(j−1) t,v + Nj ∑ i ϕj,i,tI(wj,i = v), (13) where λ(0) t,v = λ and α(j) t is explained below. Then, we set prior parameters by using statistics from the document for the next document as follows, and finally discard the document. λ(j) t,v =λ(j−1) t,v + Nj ∑ i ϕj,i,tI(wj,i = v). (14) Since the updates are repeated within a document, we need to store statistics {ϕj,i,t} for each word in a document, but not for all words in all documents. In the CVB and iREM algorithms, the Dirichlet parameter, α, uses batch updates, i.e., α is updated by using the entire document once in one iteration. We need an online-update algorithm for α to process a streaming text. However, unlike parameter βt,v, the update of α in Eq.(5) is not constructed by simply summarizing sufficient statistics of data and a prior. Therefore, we derive a single-pass update for the Dirichlet parameter α using the following interpretation. We consider Eq.(5) to be the expectation of αt over posterior G(αt|˜at,˜b) given documents D and prior G(αt|a0, b0), i.e, αnew t = E[αt]G(α|˜at,˜b) = ˜at −1 ˜b , where ˜at =a0 + M ∑ j aj,t, ˜b = b0 + M ∑ j bj, (15) aj,t = {Ψ(αold t + nj,t) −Ψ(αold t )}αold t , bj = Ψ(Nj + αold 0 ) −Ψ(αold 0 ). (16) 5 We regard aj,t and bj as statistics for each document, which indicates that the parameters that we actually update are ˜at and ˜b in Eq.(5). These updates are simple summarizations of aj,t and bj and prior parameters a0 and b0. Therefore, we have an update for α(j) t after observing document j given by α(j) t = E[αt]G(α|˜a(j) t ,˜b(j)) = ˜a(j) t −1 ˜b(j) , ˜a(j) t = ˜a(j−1) t + aj,t, ˜b(j) = ˜b(j−1) + bj, (17) aj,t = {Ψ(α(j−1) t + nj,t) −Ψ(α(j−1) t )}α(j−1) t , bj = Ψ(Nj + α(j−1) 0 ) −Ψ(α(j−1) 0 ), (18) where ˜a(0) t = a0 and ˜b(0) = b0. ˜a(j−1) t and ˜b(j−1) are used as prior paramters for the next j-th documents. 3.4 Analysis This section analyze the proposed updates for parameters α and β in the previous section. We eventually update parameters α(j) and β(j) given document j as α(j) t =a0 −1 + ∑j−1 d ad,t + aj,t b0 + ∑j−1 d bd + bj = α(j−1) t (1 −ηα j ) + ηα j aj,t bj , ηα j = bj b0 + ∑j d bd . (19) β(j) t,v = λ + ∑j−1 d nd,t,v + nj,t,v Vjλ + ∑j−1 d nd,t,· + nj,t,· = β(j−1) t,v (1 −ηβ j ) + ηβ j nj,t,v nj,t,· , ηβ j = (Vj −Vj−1)λ + nj,t,· Vjλ + ∑j d nd,t,· . (20) where nt,· = ∑ v nt,v and Vj is the vocabulary size of total observed documents(d = 1, · · · , j). Our single-pass algorithm sequentially sets a prior for each arrived document, and so we can select a prior (a dimension of Dirichlet distribution) corresponding to observed vocabulary. In fact, this property is useful for our problem because the vocabulary size is growing in the text stream. These updates indicate that ηα j and ηβ j interpolate the parameters estimated from old and new data. These updates look like a stepwise algorithm (H.Robbins and S.Monro, 1951; Sato and Ishii, 2000), although a stepsize algorithm interpolates sufficient statistics whereas our updates interpolate parameters. In our updates, how we set the stepsize for parameter updates is equivalent to how we set the hyperparameters for priors. Therefore, we do not need to newly introduce a stepsize parameter. In our update of β, the appearance rate of word v in topic t in document j, nj,t,v/nj,t,·, is added to old parameter β(j−1) t,v with weight ηβ j , which gradually decreases as the document is observed. The same relation holds for α. Therefore, the influence of new data decreases as the number of document observations increases as shown in Theorem 1. Moreover, Theorem 1 is an important role in analyzing the convergence of parameter updates by using the super-martingale convergence theorem (Bertsekas and Tsitsiklis, 1996; Brochu et al., 2004). This convergence analysis is our future work. Theorem 1. If ϵ and ν exist satisfying 0 < ϵ < Sj < ν for any j, ηj = Sj τ + ∑j d Sd (21) satisfies lim j→∞ηj = 0, ∞ ∑ j ηj = ∞, ∞ ∑ j η2 j < ∞ (22) Note that ηα j and ηβ j are shown as ηj given by Eq. (21). The proof is given in the supporting material. 6 4 Experiments We carried out experiments on document modeling in terms of perplexity. We compared the inferences for LDA in two sets of text data. The first was “Associated Press(AP)” where the number of documents was M = 10, 000 and the vocabulary size was V = 67, 291. The second was “The Wall Street Journal(WSJ)” where M = 10, 000 and V = 56, 738. The ordering of document is timeseries. The comparison metric for document modeling was the “test set perplexity”. We randomly split both data sets into a training set and a test set by assigninig 20% of the words in each document to the test set. Stop words were eliminated in datasets. We performed experiments on six inferences, PF, VB, CVB0, CVB, iREM and sREM. PF denotes the particle filter for LDA used in Canini et al. (2009). We set αt as 50/T in PF. The number of particles, denoted by P, is 64. The number of words for resampling, denoted by R, is 20. The effective sample size (ESS) threshold, which controls the number of resamplings, is set at 10. CVB0 and CVB are collapsed variational inference for LDA using zero-order and second-order information, respectively. iREM represents the incremental reverse EM algorithm in Algorithm 3. CVB0 and CVB estimates the Dirichlet parameter α over the topic distribution for all datasets, i.e., a batch framework. We estimated α in iREM for all datasets like CVB to clarify the properties of iREM compared with CVB. L denotes the number of iterations for whole documents in Algorithms 1 and 2. sREM indicates a single-pass variants of iREM in Algorithm 4. l denotes the number of iterations within a document in Algorithm 4. sREM does not make iterations for whole documents. Figure 2 demonstrates the results of experiments on the test set perplexity where lower values indicates better performance. We ran experiments five times with different random initializations and show the averages 1. PF and sREM calculate the test set perplexity after sweeping through all traing set. VB converges slower than CVB and iREM. Moreover, iREM outperforms CVB in the convergence rate. Although CVB0 outperforms other algorithms for the cases of low number of topics, the convergence rate of CVB0 depends on the number of topics. sREM does not outperform iREM in terms of perplexities, however, the performance of sREM is close to that of iREM As a results, we recommend sREM in a large number of documents or document streams. sREM does not need to store old statistics for all documents unlike other algorithms. In addition, the convergence of sREM depends on the length of a document, rather than the number of documents. Since we process each document individually, we can control the number of iterations corresponding to the length of each arrived document. Finally, we discuss the running time. The running time of sREM is O( L l ) times shorter than that of VB, CVB0, CVB and iREM. The averaged running times of PF(T=300,P=64,R=20) are 28.2 hours in AP and 31.2 hours in WSJ. Those of sREM(T=300,l=5) are 1.2 hours in AP and 1.3 hours in WSJ. 5 Conclusions We developed a deterministic online-learning algorithm for latent Dirichlet allocation (LDA). The proposed algorithm can be applied to excess text data in a continuous stream because it processes received documents one at a time and then discard them. The proposed algorithm was much faster than a batch algorithm and was comparable to the batch algorithm in terms of perplexity in experiments. 1We exclude the error bar with standard deviation because it is so small that it is hidden by the plot markers 7 1500 2000 2500 3000 3500 50 100 150 200 250 300 Testset Perplexity Number of Topics AP VB(L=100) CVB0(L=100) CVB(L=100) iREM(L=100) sREM(l=5) PF(P=64) 1500 1700 1900 2100 2300 2500 2700 2900 50 100 150 200 250 300 Testset Perplexity Number of Topics WSJ VB(L=100) CVB0(L=100) CVB(L=100) iREM(L=100) sREM(l=5) PF(P=64) (a) (b) 1.50E+03 2.00E+03 2.50E+03 3.00E+03 3.50E+03 4.00E+03 4.50E+03 10 20 30 40 50 60 70 80 90 100 Testset Perplexity Number of itera!ons AP(T=100) VB CVB0 CVB iREM sREM PF 1.50E+03 2.00E+03 2.50E+03 3.00E+03 3.50E+03 4.00E+03 10 20 30 40 50 60 70 80 90 100 Testset Perplexity Number of itera!ons WSJ(T=100) VB CVB0 CVB iREM sREM PF (c) (d) 1.50E+03 2.00E+03 2.50E+03 3.00E+03 3.50E+03 4.00E+03 4.50E+03 5.00E+03 5.50E+03 10 20 30 40 50 60 70 80 90 100 Testset Perplexity Number of itera!ons AP(T=300) VB CVB0 CVB iREM sREM PF 1.50E+03 2.00E+03 2.50E+03 3.00E+03 3.50E+03 4.00E+03 4.50E+03 10 20 30 40 50 60 70 80 90 100 Testset Perplexity Number of itera!ons WSJ(T=300) VB CVB0 CVB iREM sREM PF (e) (f) 1700 1800 1900 2000 2100 2200 2300 2400 2500 50 100 150 200 250 300 Testset Perplexity Number of Topics AP sREM(l=3) sREM(l=4) sREM(l=5) 1680 1780 1880 1980 2080 2180 2280 2380 50 100 150 200 250 300 Testset Perplexity Number of Topics WSJ sREM(l=3) sREM(l=4) sREM(l=5) (g) (h) Figure 2: Results of experiments. Left line indicates the results in AP corpus. Right line indicates the results in WSJ corpus. (a) and (b) compared test set perplexity with respect to the number of topics. (c), (d), (e) and (f) compared test set perplexity with respect to the number of iterations in topic T = 100 and T = 300, respectively. (g) and (h) show the relationships between test set perplexity and the number of iterations within a document, i.e., l. References Loulwah Alsumait, Daniel Barbara, and Carlotta Domeniconi. On-line lda: Adaptive topic models for mining text streams with applications to topic detection and tracking. IEEE International Conference on Data Mining, 0:3–12, 2008. ISSN 1550-4786. 8 A. Asuncion, M. Welling, P. Smyth, and Y. W. Teh. On smoothing and inference for topic models. In Proceedings of the International Conference on Uncertainty in Artificial Intelligence, 2009. Arindam Banerjee and Sugato Basu. Topic models over text streams: A study of batch and online unsupervised learning. In SIAM International Conference on Data Mining, 2007. D. P. Bertsekas and J. N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996. D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. Eric Brochu, Nando de Freitas, and Kejie Bao. Owed to a martingale: A fast bayesian on-line em algorithm for multinomial models, 2004. Kevin R. Canini, Lei Shi, and Thomas L. Griffiths. Online inference of topics with latent dirichlet allocation. In Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, 2009. H.Robbins and S.Monro. A stochastic approximation method. In Annals of Mathematical Statistics, pages 400–407, 1951. Thomas P. Minka. Estimating a dirichlet distribution. Technical report, Microsoft, 2000. URL http://research.microsoft.com/∼minka/papers/dirichlet/ minka-dirichlet.pdf. Thomas P. Minka. Using lower bounds to approximate integrals. Technical report, Microsoft, 2001. URL http://research.microsoft.com/en-us/um/people/ minka/papers/rem.html. R. Neal and G. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. In M. I. Jordan, editor, Learning in Graphical Models. Kluwer, 1998. URL http: //citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.33.2557. Masa A. Sato and Shin Ishii. On-line em algorithm for the normalized gaussian network. Neural Computation, 12(2):407–432, 2000. URL http://citeseerx.ist.psu.edu/ viewdoc/summary?doi=10.1.1.37.3704. Yee Whye Teh, David Newman, and Max Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In Advances in Neural Information Processing Systems 19, 2007. Hanna Wallach, David Mimno, and Andrew McCallum. Rethinking lda: Why priors matter. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1973–1981. 2009. Limin Yao, David Mimno, and Andrew McCallum. Efficient methods for topic model inference on streaming document collections. In KDD ’09: Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 937–946, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-495-9. 9
2010
150
3,911
A Bayesian Framework for Figure-Ground Interpretation Vicky Froyen ∗Center for Cognitive Science Rutgers University, Piscataway, NJ 08854 Laboratory of Experimental Psychology University of Leuven (K.U. Leuven), Belgium vicky.froyen@eden.rutgers.edu Jacob Feldman Center for Cognitive Science Rutgers University, Piscataway, NJ 08854 jacob@ruccs.rutgers.edu Manish Singh Center for Cognitive Science Rutgers University, Piscataway, NJ 08854 manish@ruccs.rutgers.edu Abstract Figure/ground assignment, in which the visual image is divided into nearer (figural) and farther (ground) surfaces, is an essential step in visual processing, but its underlying computational mechanisms are poorly understood. Figural assignment (often referred to as border ownership) can vary along a contour, suggesting a spatially distributed process whereby local and global cues are combined to yield local estimates of border ownership. In this paper we model figure/ground estimation in a Bayesian belief network, attempting to capture the propagation of border ownership across the image as local cues (contour curvature and T-junctions) interact with more global cues to yield a figure/ground assignment. Our network includes as a nonlocal factor skeletal (medial axis) structure, under the hypothesis that medial structure “draws” border ownership so that borders are owned by the skeletal hypothesis that best explains them. We also briefly present a psychophysical experiment in which we measured local border ownership along a contour at various distances from an inducing cue (a T-junction). Both the human subjects and the network show similar patterns of performance, converging rapidly to a similar pattern of spatial variation in border ownership along contours. Figure/ground assignment (further referred to as f/g), in which the visual image is divided into nearer (figural) and farther (ground) surfaces, is an essential step in visual processing. A number of factors are known to affect f/g assignment, including region size [9], convexity [7, 16], and symmetry [1, 7, 11]. Figural assignment (often referred to as border ownership, under the assumption that the figural side “owns” the border) is usually studied globally, meaning that entire surfaces and their enclosing boundaries are assumed to receive a globally consistent figural status. But recent psychophysical findings [8] have suggested that border ownership can vary locally along a boundary, even leading to a globally inconsistent figure/ground assignment—broadly consistent with electrophysiological evidence showing local coding for border ownership in area V2 as early as 68 msec after image onset [20]. This suggests a spatially distributed and potentially competitive process of figural assignment [15], in which adjacent surfaces compete to own their common boundary, with figural status propagating across the image as this competition proceeds. But both the principles and computational mechanisms underlying this process are poorly understood. ∗V.F. was supported by a Fullbright Honorary fellowship and by the Rutgers NSF IGERT program in Perceptual Science, NSF DGE 0549115, J.F. by NIH R01 EY15888, and M.S. by NSF CCF-0541185 1 In this paper we consider how border ownership might propagate over both space and time—that is, across the image as well as over the progression of computation. Following Weiss et al. [18] we adopt a Bayesian belief network architecture, with nodes along boundaries representing estimated border ownership, and connections arranged so that both neighboring nodes and nonlocal integrating nodes combine to influence local estimates of border ownership. Our model is novel in two particular respects: (a) we combine both local and global influences on border ownership in an integrated and principled way; and (b) we include as a nonlocal factor skeletal (medial axis) influences on f/g assignment. Skeletal structure has not been previously considered as a factor on border ownership, but its relevance follows from a model [4] in which shapes are conceived of as generated by or “grown” from an internal skeleton, with the consequence that their boundaries are perceptually “owned” by the skeletal side. We also briey present a psychophysical experiment in which we measured local border ownership along a contour, at several distances from a strong local f/g inducing cue, and at several time delays after the onset of the cue. The results show measurable spatial differences in judged border ownership, with judgments varying with distance from the inducer; but no temporal effect, with essentially asymptotic judgments even after very brief exposures. Both results are consistent with the behavior of the network, which converges quickly to an asymptotic but spatially nonuniform f/g assignment. 1 The Model The Network. For simplicity, we take an edge map as input for the model, assuming that edges and T-junctions have already been detected. From this edge map we then create a Bayesian belief network consisting of four hierarchical levels. At the input level the model receives evidence E from the image, consisting of local contour curvature and T-junctions. The nodes for this level are placed at equidistant locations along the contour. At the first level the model estimates local border ownership. The border ownership, or B-nodes at this level are at the same locations as the E-nodes, but are connected to their nearest neighbors, and are the parent of the E-node at their location. (As a simplifying assumption, such connections are broken at T-junctions in such a way that the occluded contour is disconnected from the occluder.) The highest level has skeletal nodes, S, whose positions are defined by the circumcenters of the Delaunay triangulation on all the E-nodes, creating a coarse medial axis skeleton [13]. Because of the structure of the Delaunay, each S-node is connected to exactly three E-nodes from which they receive information about the position and the local tangent of the contour. In the current state of the model the S-nodes are “passive”, meaning their posteriors are computed before the model is initiated. Between the S nodes and the B nodes are the grouping nodes G. They have the same positions as the S-nodes and the same Delaunay connections, but to B-nodes that have the same image positions as the E-nodes. They will integrate information from distant B-nodes, applying an interiority cue that is influenced by the local strength of skeletal axes as computed by the S-nodes (Fig. 1). Although this is a multiply connected network, we have found that given reasonable parameters the model converges to intuitive posteriors for a variety of shapes (see below). Updating. Our goal is to compute the posterior p(Bi|I), where I is the whole image. Bi is a binary variable coding for the local direction of border ownership, that is, the side that owns the border. In order for border ownership estimates to be influenced by image structure elsewhere in the image, information has to propagate throughout the network. To achieve this propagation, we use standard equations for node updating [14, 12]. However while to all other connections being directed, connections at the B-node level are undirected, causing each node to be child and parent node at the same time. Considering only the B-node level, a node Bi is only separated from the rest of the network by its two neighbors. Hence the Markovian property applies, in that Bi only needs to get iterative information from its neighbors to eventually compute p(Bi|I). So considering the whole network, at each iteration t, Bi receives information from both its child, Ei and from its parents—that is neigbouring nodes (Bi+1 and Bi−1)—as well as all grouping nodes connected to it (Gj, ..., Gm). The latter encode for interiority versus exteriority, interiority meaning that the B-node’s estimated gural direction points towards the G-node in question, exteriority meaning that it points away. Integrating all this information creates a multidimensional likelihood function: p(Bi|Bi−1, Bi+1, Gj, ..., Gm). Because of its complexity we choose to approximate it (assuming all nodes are marginally independent of each other when conditioned on Bi) by 2 Figure 1: Basic network structure of the model. Both skeletal (S-nodes) and border-ownerhsip nodes (B-nodes) get evidence from E-nodes, though different types. S-nodes receive mere positional information, while B-nodes receive information about local curvature and the presence of T-junctions. Because of the structure of the Delaunay triangulation S-nodes and G-nodes (grouping nodes) always get input from exactly three nodes, respectively E and B-nodes. The gray color depicts the fact that this part of the network is computed before the model is initiated and does not thereafter interact with the dynamics of the model. p(Bi|Pj, ..., Pm) ∝ m Y j p(Bi|Pj) (1) where the Pj’s are the parents of Bi. Given this, at each iteration, each node Bi performs the following computation: Bel(Bi) ←cλ(Bi)π(Bi)α(Bi)β(Bi) (2) where conceptually λ stands for bottom-up information, π for top down information and α and β for information received from within the same level. More formally, λ(Bi) ←p(E|Bi) (3) π(Bi) ← m Y j X Gj p(Bi|Gj)πGj(Bi) (4) and analogously to equation 4 for α(Bi) and β(Bi), which compute information coming from Bi−1 and Bi+1 respectively. For these πBi−1(Bi), πBi+1(Bi), and πGj(Bi): πGj(Bi) ←c′π(G) Y k̸=i λBk(Gj) (5) πBi−1(Bi) ←c′β(Bi−1)λ(Bi−1)π(Bi−1) (6) 3 and πBi+1(Bi) is analogous to πBi−1(Bi), with c′ and c being normalization constants. Finally for the G-nodes: Bel(Gi) ←cλ(Gi)π(Gi) (7) λ(Gi) ← Y j λBj(Gi) (8) λBj(Gi) ← X Bj λ(Bj)p(Bi|Gj)[α(Bj)β(Bj) m Y k̸=i X Gk p(Bi|Gk)πGk(Bi)] (9) The posteriors of the S-nodes are used to compute the π(Gi). This posterior computes how well the S-node at each position explains the contour—that is, how well it accounts for the cues flowing from the E-nodes it is connected to. Each Delaunay connection between S- and E-nodes can be seen as a rib that sprouts from the skeleton. More specifically each rib sprouts in a direction that is normal (perpendicular) to the tangent of the contour at the E-node plus a random error φi chosen independently for each rib from a von Mises distribution centered on zero, i.e. φi ∼V (0, κS) with spread parameter κS [4]. The rib lengths are drawn from an exponential decreasing density function p(ρi) ∝e−λSρi [4]. We can now express how well this node “explains” the three E-nodes it is connected to via the probability that this S-node deserves to be a skeletal node or not, p(S = true|E1, E2, E3) ∝ Y i p(ρi)p(φi) (10) with S = true depicting that this S-node deserves to be a skeletal node. From this we then compute the prior π(Gi) in such a way that good (high posterior) skeletal nodes induce a high interiority bias, hence a stronger tendency to induce figural status. Conversely, bad (low posterior) skeletal nodes create a prior close to indifferent (uniform) and thus have less (or no) influence on figural status. Likelihood functions Finally we need to express the likelihood function necessary for the updating rules described above. The first two likelihood functions are part of p(Ei|Bi), one for each of the local cues. The first one, reflecting local curvature, gives the probability of the orientations of the two vectors inherent to Ei (α1 and α2) given both direction of figure (θ) encoded in Bi as a von Mises density centered on θ, i.e. αi ∼V (θ, κEB). The second likelihood function, reflecting the presence of a T-junction, simply assumes a fixed likelihood when a T-junction is present—that is p(T-junction = true|Bi) = θT , where Bi places the direction of figure in the direction of the occluder. This likelihood function is only in effect when a T-junction is present, replacing the curvature cue at that node. The third likelihood function serves to keep consistency between nodes of the first level. This function p(Bi|Bi−1) or p(Bi|Bi+1) is used to compute α(B) and β(B) and is defined 2x2 conditional probability matrix with a single free parameter, θBB (the probability that figural direction at both B-nodes are the same). A fourth and final likelihood function p(Bi|Gj) serves to propagate information between level one and two. This likelihood function is 2x2 conditional probability matrix matrix with one free parameter, θBG. In this case θBG encodes the probability that the figural direction of the B-node is in the direction of the exterior or interior preference of the G-node. In total this brings us to six free parameters in the model: κS, λS, κEB, θT , θBB, and θBG. 2 Basic Simulations To evaluate the performance of the model, we first tested it on several basic stimulus configurations in which the desired outcome is intuitively clear: a convex shape, a concave shape, a pair of overlapping shapes, and a pair of non-overlapping shapes (Fig. 2,3). The convex shape is the simplest in that curvature never changes sign. The concave shape includes a region with oppositely signed curvature. (The shape is naturally described as predominantly positively curved with a region of negative curvature, i.e. a concavity. But note that it can also be interpreted as predominantly negatively curved “window” with a region of positive curvature, although this is not the intuitive interpretation.) 4 The overlapping pair of shapes consists of two convex shapes with one partly occluding the other, creating a competition between the two shapes for the ownership of the common borderline. Finally the non-overlapping shapes comprise two simple convex shapes that do not touch—again setting up a competition for ownership of the two inner boundaries (i.e. between each shape and the ground space between them). Fig. 2 shows the network structures for each of these four cases. Figure 2: Network structure for the four shape categories (left to right: convex, concave, overlapping, non-overlapping shapes). Blue depict the locations of the B-nodes (and also the E-nodes), the red connections are the connections between B-nodes, the green connections are connections between B-nodes and G-nodes, and the G-nodes (and also the S-nodes) go from orange to dark red. This colour code depicts low (orange) to high (dark red) probability that this is a skeletal node, and hence the strength of the interiority cue. Running our model with hand-estimated parameter values yields highly intuitive posteriors (Fig. 3), an essential “sanity check” to ensure that the network approximates human judgments in simple cases. For the convex shape the model assigns figure to the interior just as one would expect even based solely on local curvature (Fig. 3A). In the concave figure (Fig. 3B), estimated border ownership begins to reverse inside the deep concavity. This may seem surprising, but actually closely matches empirical results obtained when local border ownership is probed psychophysically inside a similarly deep concavity, i.e. a “negative part” in which f/g seems to partly reverse [8]. For the overlapping shapes posteriors were also intuitive, with the occluding shape interpreted as in front and owning the common border (Fig. 3C). Finally, for the two non-overlapping shapes the model computed border-ownership just as one would expect if each shape were run separately, with each shape treated as figural along its entire boundary (Fig. 3D). That is, even though there is skeletal structure in the ground-region between the two shapes (see Fig. 2D), its posterior is weak compared to the skeletal structure inside the shapes, which thus loses the competition to own the boundary between them. For all these configurations, the model not only converged to intuitive estimates but did so rapidly (Fig. 4), always in fewer cycles than would be expected by pure lateral propagation, niterations < Nnodes [18] (with these parameters, typically about five times faster). Figure 3: Posteriors after convergence for the four shape categories (left to right: convex, concave, overlapping, non-overlapping). Arrows indicate estimated border ownership, with direction pointing to the perceived figural side, and length proportional to the magnitude of the posterior. All four simulations used the same parameters. 5 Figure 4: Convergence of the model for the basic shape categories. The vertical lines represent the point of convergence for each of the three shape categories. The posterior change is calculated as P |p(Bi = 1|I)t −p(Bi = 1|I)t−1| at each iteration. 3 Comparison to human data Beyond the simple cases reviewed above, we wished to submit our network to a more fine-grained comparison with human data. To this end we compared its performance to that of human subjects in an experiment we conducted (to be presented in more detail in a future paper). Briefly, our experiment involved finding evidence for propagation of f/g signals across the image. Subjects were first shown a stimulus in which the f/g configuration was globally and locally unambiguous and consistent: a smaller rectangle partly occluding a larger one (Fig. 5A), meaning that the smaller (front) one owns the common border. Then this configuration was perturbed by adding two bars, of which one induced a local f/g reversal—making it now appear locally that the larger rectangle owned the border (Fig. 5B). (The other bar in the display does not alter f/g interpretation, but was included to control for the attentional affects of introducing a bar in the image.) The inducing bar creates T-junctions that serve as strong local f/g cues, in this case tending to reverse the prior global interpretation of the figure. We then measured subjective border ownership along the central contour at various distances from the inducing bar, and at different times after the onset of the bar (25ms, 100ms and 250ms). We measured border ownership locally using a method introduced in [8] in which a local motion probe is introduced at a point on the boundary between two color regions of different colors, and the subject is asked which color appeared to move. Because the figural side “owns” the border, the response reflects perceived figural status. The goal of the experiment was to actually measure the progression of the influence of the inducing T-junction as it (hypothetically) propagated along the boundary. Briefly, we found no evidence of temporal differences, meaning that f/g judgments were essentially constant over time, suggesting rapid convergence of local f/g assignment. (This is consistent with the very rapid convergence of our network, which would suggest a lack of measurable temporal differences except at much shorter time scales than we measured.) But we did find a progressive reduction of f/g reversal with increasing distance from the inducer—that is, the influence of the T-junction decayed with distance. Mean responses aggregated over subjects (shortest delay only) are shown in Fig. 6. In order to run our model on this stimulus (which has a much more complex structure than the simple figures tested above) we had to make some adjustments. We removed the bars from the edge map, leaving only the T-junctions as underlying cues. This was a necessary first step because our model is not yet able to cope with skeletons that are split up by occluders. (The larger rectangle’s skeleton has been split up by the lower bar.) In this way all contours except those created by the bars were used to create the network (Fig. 7). Given this network we ran the model using hand-picked parameters that 6 Figure 5: Stimuli used in the experiment. A. Initial stimulus with locally and globally consistent and unambiguous f/g. B. Subsequently bars were added of which one (the top bar in this case) created a local reversal of f/g. C. Positions at which local f/g judgments of subjects were probed. Figure 6: Results from our experiment aggregated for all 7 subjects (shortest delay only) are shown in red. The x-axis shows distance from the inducing bar at which f/g judgment was probed. The y-axis shows the proportion of trials on which subjects judged the smaller rectangle to own the boundary. As can be seen, the further from the T-junction, the lower the f/g reversal. The fitted model (green curve) shows very similar pattern. Horizontal black line indicates chance performance (ambiguous f/g). gave us the best possible qualitative similarity to the human data. The parameters used never entailed total elimination of the influence of any likelihood function (κS = 16, λS = .025, κEB = .5, θT = .9, θBB = .9, and θBG = .6). As can be seen in Fig. 6 the border-ownership estimates at the locations where we had data show compelling similarities to human judgments. Furthermore along the entire contour the model converged to intuitive border-ownership estimates (Fig. 7) very rapidly (within 36 iterations). The fact that our model yielded intuitive estimates for the current network in which not all contours were completed shows another strength of our model. Because our model included grouping nodes, it did not require contours to be amodally completed [6] in order for information to propagate. 4 Conclusion In this paper we proposed a model rooted in Bayesian belief networks to compute figure/ground. The model uses both local and global cues, combined in a principled way, to achieve a stable and apparently psychologically reasonable estimate of border ownership. Local cues included local curvature and T-junctions, both well-established cues to f/g. Global cues included skeletal structure, 7 Figure 7: (left) Node structure for the experimental stimulus. (right) The model’s local borderownership estimates after convergence. a novel cue motivated by the idea that strongly axial shapes tend to be figural and thus own their boundaries. We successfully tested this model on both simple displays, in which it gave intuitive results, and on a more complex experimental stimulus, in which it gave a close match to the pattern of f/g propagation found in our subjects. Specifically, the model, like the human subjects rapidly converged to a stable local f/g interpretation. Our model’s structure shows several interesting parallels to properties of neural coding of border ownership in visual cortex. Some cortical cells (end-stopped cells) appear to code for local curvature [3] and T-junctions [5]. The B-nodes in our model could be seen as corresponding to cells that code for border ownership [20]. Furthermore, some authors [2] have suggested that recurrent feedback loops between border ownership cells in V2 and cells in V4 (corresponding to G-nodes in our model) play a role in the rapid computation of border ownership. The very rapid convergence we observed in our model likewise appears to be due to the connections between B-nodes and G-nodes. Finally scale-invariant shape representations (such as, speculatively, those based on skeletons) are thought to be present in higher cortical regions such as IT [17], which project down to earlier areas in ways that are not yet understood. A number of parallels to past models of f/g should be mentioned. Weiss [18] pioneered the application of belief networks to the f/g problem, though their network only considered a more restricted set of local cues and no global ones, such that information only propagated along the contour. Furthermore it has not been systematically compared to human judgments. Kogo et al. [10] proposed an exponential decay of f/g signals as they spread throughout the image. Our model has a similar decay for information going through the G-nodes, though it is also influenced by an angular factor defined by the position of the skeletal node. Like the model by Li Zhaoping [19], our model includes horizontal propagation between B-nodes, analogous to border-ownership cells in her model. A neurophysiological model by Craft et al. [2] defines grouping cells coding for an interiority preference that decays with the size of the receptive fields of these grouping cells. Our model takes this a step further by including shape (skeletal) structure as a factor in interiority estimates, rather than simply size of receptive fields (which is similar to the rib lengths in our model). Currently, our use of skeletons as shape representations is still limited to medial axis skeletons and surfaces that are not split up by occluders. Our future goals including integrating skeletons in a more robust way following the probabilistic account suggested by Feldman and Singh [4]. Eventually, we hope to fully integrate skeleton computation with f/g computation so that the more general problem of shape and surface estimation can be approached in a coherent and unified fashion. 8 References [1] P. Bahnsen. Eine untersuchung uber symmetrie und assymmetrie bei visuellen wahrnehmungen. Zeitschrift fur psychology, 108:129–154, 1928. [2] E. Craft, H. Sch¨utze, E. Niebur, and R. von der Heydt. A neural model of figure-ground organization. Journal of Neurophysiology, 97:4310–4326, 2007. [3] A. Dobbins, S. W. Zucker, and M. S. Cyander. Endstopping and curvature. Vision Research, 29:1371–1387, 1989. [4] J. Feldman and M. Singh. Bayesian estimation of the shape skeleton. Proceedings of the National Academy of Sciences, 103:18014–18019, 2006. [5] B. Heider, V. Meskenaite, and E. Peterhans. Anatomy and physiology of a neural mechanism defining depth order and contrast polarity at illusory contours. European Journal of Neuroscience, 12:4117–4130, 2000. [6] G. Kanizsa. Organization inVision. New York: Praeger, 1979. [7] G. Kanizsa and W. Gerbino. Vision and Artifact, chapter Convexity and symmetry in figureground organisation, pages 25–32. New York: Springer, 1976. [8] S. Kim and J. Feldman. Globally inconsistent figure/ground relations induced by a negative part. Journal of Vision, 9:1534–7362, 2009. [9] K. Koffka. Principles of Gestalt Psychology. Lund Humphries, London, 1935. [10] N. Kogo, C. Strecha, L. Van Gool, and J. Wagemans. Surface construction by a 2-d differentiation-integration process: a neurocomputational model for perceived border ownership, depth, and lightness in kanizsa figures. Psychological Review, 117:406–439, 2010. [11] B. Machielsen, M. Pauwels, and J. Wagemans. The role of vertical mirror-symmetry in visual shape detection. Journal of Vision, 9:1–11, 2009. [12] K. Murphy, Y. Weiss, and M.I. Jordan. Loopy belief propagation for approximate inference: an empirical study. Proceedings of Uncertainty in AI, pages 467–475, 1999. [13] R. L. Ogniewicz and O. K¨ubler. Hierarchic Voronoi skeletons. Pattern Recognition, 28:343– 359, 1995. [14] J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988. [15] M. A. Peterson and E. Skow. Inhibitory competition between shape properties in figureground perception. Journal of Experimental Psychology: Human Perception and Performance, 34:251–267, 2008. [16] K. A. Stevens and A. Brookes. The concave cusp as a determiner of figure-ground. Perception, 17:35–42, 1988. [17] K. Tanaka, H. Saito, Y. Fukada, and M. Moriya. Coding visual images of object in the inferotemporal cortex of the macaque monkey. Journal of Neurophysiology, 66:170–189, 1991. [18] Y. Weiss. Interpreting images by propagating Bayesian beliefs. Adv. in Neural Information Processing Systems, 9:908915, 1997. [19] L. Zhaoping. Border ownership from intracortical interactions in visual area V2. Neuron, 47(1):143–153, Jul 2005. [20] H. Zhou, H. S. Friedman, and R. von der Heydt. Coding of border ownerschip in monkey visual cortex. The Journal of Neuroscience, 20:6594–6611, 2000. 9
2010
151
3,912
Online Markov Decision Processes under Bandit Feedback Gergely Neu∗† ∗Department of Computer Science and Information Theory, Budapest University of Technology and Economics, Hungary neu.gergely@gmail.com Andr´as Gy¨orgy †Machine Learning Research Group MTA SZTAKI Institute for Computer Science and Control, Hungary gya@szit.bme.hu Csaba Szepesv´ari Department of Computing Science, University of Alberta, Canada szepesva@ualberta.ca Andr´as Antos Machine Learning Research Group MTA SZTAKI Institute for Computer Science and Control, Hungary antos@szit.bme.hu Abstract We consider online learning in finite stochastic Markovian environments where in each time step a new reward function is chosen by an oblivious adversary. The goal of the learning agent is to compete with the best stationary policy in terms of the total reward received. In each time step the agent observes the current state and the reward associated with the last transition, however, the agent does not observe the rewards associated with other state-action pairs. The agent is assumed to know the transition probabilities. The state of the art result for this setting is a no-regret algorithm. In this paper we propose a new learning algorithm and, assuming that stationary policies mix uniformly fast, we show that after T time steps, the expected regret of the new algorithm is O T 2/3(ln T)1/3 , giving the first rigorously proved regret bound for the problem. 1 Introduction We consider online learning in finite Markov decision processes (MDPs) with a fixed, known dynamics. The formal problem definition is as follows: An agent navigates in a finite stochastic environment by selecting actions based on the states and rewards experienced previously. At each time instant the agent observes the reward associated with the last transition and the current state, that is, at time t + 1 the agent observes rt(xt, at), where xt is the state visited at time t and at is the action chosen. The agent does not observe the rewards associated with other transitions, that is, the agent faces a bandit situation. The goal of the agent is to maximize its total expected reward ˆRT in T steps. As opposed to the standard MDP setting, the reward function at each time step may be different. The only assumption about this sequence of reward functions rt is that they are chosen ahead of time, independently of how the agent acts. However, no statistical assumptions are made about the choice of this sequence. As usual in such cases, a meaningful performance measure for the agent is how well it can compete with a certain class of reference policies, in our case the set of all stationary policies: If R∗ T denotes the expected total reward in T steps that can be collected by choosing the best stationary policy (this policy can be chosen based on the full knowledge of the sequence rt), the goal of learning can be expressed as minimizing the total expected regret, ˆLT = R∗ T −ˆRT . In this paper we propose a new algorithm for this setting. Assuming that the stationary distributions underlying stationary policies exist, are unique and they are uniformly bounded away from zero and 1 that these policies mix uniformly fast, our main result shows that the total expected regret of our algorithm in T time steps is O T 2/3(ln T)1/3 . The first work that considered a similar online learning setting is due to Even-Dar et al. (2005, 2009). In fact, this is the work that provides the starting point for our algorithm and analysis. The major difference between our work and that of Even-Dar et al. (2005, 2009) is that they assume that the reward function is fully observed (i.e., in each time step the learning agent observes the whole reward function rt), whereas we consider the bandit setting. The main result in these works is a bound on the total expected regret, which scales with the square root of the number of time steps under mixing assumptions identical to our assumptions. Another work that considered the full information problem is due to Yu et al. (2009) who proposed new algorithms and proved a bound on the expected regret of order O T 3/4+ε for arbitrary ε ∈(0, 1/3). The advantage of the algorithm of Yu et al. (2009) to that of Even-Dar et al. (2009) is that it is computationally less expensive, which, however, comes at the price of an increased bound on the regret. Yu et al. (2009) introduced another algorithm (“Q-FPL”) and they have shown a sublinear (o(T)) almost sure bound on the regret. All the works reviewed so far considered the full information case. The requirement that the full reward function must be given to the agent at every time step significantly limits their applicability. There are only three papers that we know of where the bandit situation was considered. The first paper which falls into this category is due to Yu et al. (2009) who proposed an algorithm (“Exploratory FPL”) for this setting and have shown an o(T) almost sure bound on the regret. Recently, Neu et al. (2010) gave O √ T  regret bounds for a special bandit setting when the agent interacts with a loop-free episodic environment. The algorithm and analysis in this work heavily exploits the specifics of these environments (i.e., that in the same episode no state can be visited twice) and so they do not generalize to our setting. Another closely related work is due to Yu and Mannor (2009a,b) who considered the problem of online learning in MDPs where the transition probabilities may also change arbitrarily after each transition. This problem, however, is significantly different from ours and the algorithms studied are unsuitable for our setting. Further, the analysis in these papers seems to have gaps (see Neu et al., 2010). Thus, currently, the only result for the case considered in this paper is an asymptotic “no-regret” result. The rest of the paper is organized as follows: The problem is laid out in Section 2, which is followed by a section about our assumptions (Section 3). The algorithm and the main result are given in Section 4, while a proof sketch of the latter is presented in Section 5. 2 Problem definition Formally, a finite Markov Decision Process (MDP) M is defined by a finite state space X, a finite action set A, a transition probability kernel P : X × A × X →[0, 1], and a reward function r : X × A →[0, 1]. In time step t ∈{1, 2, . . .}, knowing the state xt ∈X, an agent acting in the MDP M chooses an action at ∈A(xt) to be executed based on (xt, r(at−1, xt−1), at−1, xt−1, . . . , x2, r(a1, x1), a1, x1).1 Here A(x) ⊂A is the set of admissible actions at state x. As a result of executing the chosen action the process moves to state xt+1 ∈X with probability P(xt+1|xt, at) and the agent receives reward r(xt, at). In the so-called average-reward problem, the goal of the agent is to maximize the average reward received over time. For a more detailed introduction the reader is referred to, for example, Puterman (1994). 2.1 Online learning in MDPs In this paper we consider the online version of MDPs when the reward function is allowed to change arbitrarily. That is, instead of a single reward function r, a sequence of reward functions {rt} is given. This sequence is assumed to be fixed ahead of time, and, for simplicity, we assume that rt(x, a) ∈[0, 1] for all (x, a) ∈X × A and t ∈{1, 2, . . .}. No other assumptions are made about this sequence. 1We follow the convention that boldface letters denote random variables. 2 The learning agent is assumed to know the transition probabilities P, but is not given the sequence {rt}. The protocol of interaction with the environment is unchanged: At time step t the agent receives xt and then selects an action at which is sent to the environment. In response, the reward rt(xt, at) and the next state xt+1 are communicated to the agent. The initial state x1 is generated from a fixed distribution P0. The goal of the learning agent is to maximize its expected total reward ˆRT = E " T X t=1 rt(xt, at) # . An equivalent goal is to minimize the regret, that is, to minimize the difference between the expected total reward received by the best algorithm within some reference class and the expected total reward of the learning algorithm. In the case of MDPs a reasonable reference class, used by various previous works (e.g., Even-Dar et al., 2005, 2009; Yu et al., 2009) is the class of stationary stochastic policies.2 A stationary stochastic policy, π, (or, in short: a policy) is a mapping π : A × X →[0, 1], where π(a|x) ≡π(a, x) is the probability of taking action a in state x. We say that a policy π is followed in an MDP if the action at time t is drawn from π, independently of previous states and actions given the current state x′ t: a′ t ∼π(·|x′ t). The expected total reward while following a policy π is defined as Rπ T = E " T X t=1 rt(x′ t, a′ t) # . Here {(x′ t, a′ t)} denotes the trajectory that results from following policy π from x′ 1 ∼P0. The expected regret (or expected relative loss) of the learning agent relative to the class of policies (in short, the regret) is defined as ˆLT = sup π Rπ T −ˆRT , where the supremum is taken over all (stochastic stationary) policies. Note that the optimal policy is chosen in hindsight, depending acausally on the reward function. If the regret of an agent grows sublinearly with T then we can say that in the long run it acts as well as the best (stochastic stationary) policy (i.e., the average expected regret of the agent is asymptotically equal to that of the best policy). 3 Assumptions In this section we list the assumptions that we make throughout the paper about the transition probability kernel (hence, these assumptions will not be mentioned in the subsequent results). In addition, recall that we assume that the rewards are bound to [0, 1]. Before describing the assumptions, a few more definitions are needed: Let π be a stationary policy. Define P π(x′|x) = P a π(a|x)P(x′|x, a). We will also view P π as a matrix: (P π)x,x′ = P π(x′|x), where, without loss of generality, we assume that X = {1, 2, . . . , |X|}. In general, distributions will also be treated as row vectors. Hence, for a distribution µ, µP π is the distribution over X that results from using policy π for one step from µ (i.e., the “next-state distribution” under π). Remember that the stationary distribution of a policy π is a distribution µ which satisfies µP π = µ. Assumption A1 Every policy π has a well-defined unique stationary distribution µπ. Assumption A2 The stationary distributions are uniformly bounded away from zero: infπ,x µπ(x) ≥β for some β > 0. Assumption A3 There exists some fixed positive τ such that for any two arbitrary distributions µ and µ′ over X, sup π ∥(µ −µ′)P π∥1 ≤e−1/τ∥µ −µ′∥1, where ∥· ∥1 is the 1-norm of vectors: ∥v∥1 = P i |vi|. 2This is a reasonable reference class because for a fixed reward function one can always find a member of it which maximizes the average reward per time step, see Puterman (1994). 3 Note that Assumption A3 implies Assumption A1. The quantity τ is called the mixing time underlying P by Even-Dar et al. (2009) who also assume A3. 4 Learning in online MDPs under bandit feedback In this section we shall first introduce some additional, standard MDP definitions, which we will be used later. That these are well-defined follows from our assumptions on P and from standard results to be found, for example, in the book by Puterman (1994). After the definitions, we specify our algorithm. The section is finished by the statement of our main result concerning the performance of the proposed algorithm. 4.1 Preliminaries Fix an arbitrary policy π and t ≥1. Let {(x′ s, a′ s)} be the random trajectory generated by π and the transition probability kernel P. Define, ρπ t , the average reward per stage corresponding to π, P and rt by ρπ t = lim S→∞ 1 S S X s=0 E[rt(x′ s, a′ s)] . An alternative expression for ρπ t is ρπ t = P x µπ(x) P a π(a|x)rt(x, a), where µπ is the stationary distribution underlying π. Let qπ t be the action-value function of π, P and rt and vπ t be the corresponding state-value function. These can be uniquely defined as the solutions of the following Bellman equations: qπ t (x, a) = rt(x, a) −ρπ t + X x′ P(x′|x, a)vπ t (x′), vπ t (x) = X a π(a|x)qπ t (x, a). Now, consider the trajectory {(xt, at)} underlying a learning agent, where x1 is randomly chosen from P0, and define ut = ( x1, a1, r1(x1, a1), x2, a2, r2(x2, a2), . . . , xt, at, rt(xt, at) ) and πt(a|x) = P[at = a|ut−1, xt = x]. That is, πt denotes the policy followed by the agent at time step t (which is computed based on past information and is therefore random). We will use the following notation: qt = qπt t , vt = vπt t , ρt = ρπt t . Note that qt, vt satisfy the Bellman equations underlying πt, P and rt. For reasons to be made clear later in the paper, we shall need the state distribution at time step t given that we start from the state-action pair (x, a) at time t −N, conditioned on the policies used between time steps t −N and t: µN t,x,a(x′) def = P [xt = x′ | xt−N = x, at−N = a, πt−N+1, . . . , πt−1] , x, x′ ∈X, a ∈A . It will be useful to view µN t as a matrix of dimensions |X ×A|×|X|. Thus, µN t,x,a(·) will be viewed as one row of this matrix. To emphasize the conditional nature of this distribution, we will also use µN t (·|x, a) instead of µN t,x,a(·). 4.2 The algorithm Our algorithm is similar to that of Even-Dar et al. (2009) in that we use an expert algorithm in each state. Since in our case the full reward function rt is not observed, the agent uses an estimate of it. The main difficulty is to come up with an unbiased estimate of rt with a controlled variance. Here we propose to use the following estimate: ˆrt(x, a) = ( rt(x,a) πt(a|x)µN t (x|xt−N,at−N) if (x, a) = (xt, at) 0 otherwise, (1) 4 where t ≥N + 1. Define ˆqt, ˆvt and ˆρ as the solution to the Bellman equations underlying the average reward MDP defined by (P, πt, ˆrt): ˆqt(x, a) = ˆrt(x, a) −ˆρt + X x′ P(x′|x, a)ˆvt(x′), ˆvt(x) = X a πt(a|x)ˆqt(x, a) , ˆρt = X x,a µπt(x)πt(a|x)ˆrt(x, a) . (2) Note that if N is sufficiently large and πt changes sufficiently slowly then µN t (x|xt−N, at−N) > 0, (3) almost surely, for arbitrary x ∈X, t ≥N + 1. This fact will be shown in Lemma 4. Now, assume that πt is computed based on ut−N, that is, πt is measurable with respect to the σ-field σ(ut−N) generated by the history ut−N: πt ∈σ(ut−N) . (4) Then also πt−1, . . . , πt−N ∈σ(ut−N) and µN t can be computed using µN t,x,a = exP aP πt−N+1 · · · P πt−1, (5) where P a is the transition probability matrix when in every state action a is used and ex is the unit row vector corresponding to x (and we assumed that X = {1, . . . , |X|}). Moreover, a simple but tedious calculation shows that (3) and (4) ensure the conditional unbiasedness of our estimates, that is, E [ˆrt(x, a)| ut−N] = rt(x, a). (6) It then follows that E[ ˆρt|ut−N] = ρt, and, hence, by the uniqueness of the solutions of the Bellman equations, we have, for all (x, a) ∈ X × A, E[ˆqt(x, a)|ut−N] = qt(x, a) and E[ˆvt(x)|ut−N] = vt(x). (7) As a consequence, we also have, for all (x, a) ∈X × A, t ≥N + 1, E[ ˆρt] = E [ρt] , E[ˆqt(x, a)] = E [qt(x, a)] , and E[ˆvt(x)] = E [vt(x)] . (8) The bandit algorithm that we propose is shown as Algorithm 1. It follows the approach of Even-Dar et al. (2009) in that a bandit algorithm is used in each state which together determine the policy to be used. These bandit algorithms are fed with estimates of action-values for the current policy and the current reward. In our case these action-value estimates are ˆqt defined earlier, which are based on the reward estimates ˆrt. A major difference is that the policy computed based on the most recent actionvalue estimates is used only N steps later. This delay allows us to construct unbiased estimates of the rewards. Its price is that we need to store N policies (or weights, leading to the policies), thus, the memory needed by our algorithm scales with N |A||X|. The computational complexity of the algorithm is dominated by the cost of computing ˆrt (and, in particular, by the cost of computing µN t (·|xt−N, at−N)). The cost of this is O N|A||X|3 . In addition to the need of dealing with the delay, we also need to deal with the fact that in our case qt and ˆqt can be both negative, which must be taken into account in the proper tuning of the algorithm’s parameters. 4.3 Main result Our main result is the following bound concerning the performance of Algorithm 1. Theorem 1. Let N = ⌈τ ln T⌉, η = T −2/3 · (ln |A|)2/3 · 4τ + 8 β (2τ + 4)τ|A| ln T + (3τ + 1)2−1/3 , γ = T −1/3 · (2τ + 4)−2/3 · 2 ln |A| β (2τ + 4)τ|A| ln T + (3τ + 1)21/3 . 5 Algorithm 1 Algorithm for the online bandit MDP. Set N ≥1, w1(x, a) = w2(x, a) = · · · = w2N(x, a) = 1, γ ∈(0, 1), η ∈(0, γ]. For t = 1, 2, . . . , T, repeat 1. Set πt(a|x) = (1 −γ) wt(x, a) P b wt(x, b) + γ |A| for all (x, a) ∈X × A. 2. Draw an action at randomly, according to the policy πt(·|xt). 3. Receive reward rt(xt, at) and observe xt+1. 4. If t ≥N + 1 (a) Compute µN t (x|xt−N, at−N) for all x ∈X using (5). (b) Construct estimates ˆrt using (1) and compute ˆqt using (2). (c) Set wt+N(x, a) = wt+N−1(x, a)eηˆqt(x,a) for all (x, a) ∈X × A. Then the regret can be bounded as ˆLT ≤3 T 2/3 · (4τ + 8) ln |A| β (2τ + 4)τ|A| ln T + (3τ + 1)21/3 + O  T 1/3 . It is interesting to note that, similarly to the regret bound of Even-Dar et al. (2009), the main term of the regret bound does not directly depend on the size of the state space, but it depends on it only through β and the mixing time τ, defined in Assumptions A2 and A3, respectively; however, we also need to note that β > 1/|X|. While the theorem provides the first rigorously proved finite sample regret bound for the online bandit MDP problem, we suspect that the given convergence rate is not sharp in the sense that it may be possible, in agreement with the standard bandit lower bound of Auer et al. (2002), to give an algorithm with an O √ T  regret (up to some logarithmic factors). The proof of the theorem is similar to the proof of a similar bound done for the full-information case by Even-Dar et al. (2009). Clearly, it suffices to bound Rπ T −ˆRT for an arbitrary fix policy π. We use the following decomposition of this difference (also used by Even-Dar et al., 2009): Rπ T −ˆRT = Rπ T − T X t=1 ρπ t ! + T X t=1 ρπ t − T X t=1 ρt ! + T X t=1 ρt −ˆRT ! . (9) The first term is bounded using the following standard MDP result. Lemma 1 (Even-Dar et al., 2009). For any policy π and any T ≥ 1 it holds that  Rπ T −PT t=1 ρπ t  ≤2(τ + 1). Hence, it remains to bound the expectation of the other terms, which is done in the following two propositions. Proposition 1. Let N ≥⌈τ ln T⌉. For any policy π and for all T large enough, we have T X t=1 E [ρπ t −ρt] ≤(4τ + 10)N + ln |A| η + (2τ + 4) T  γ + 2η β |A|  N (1/γ + 4τ + 6) + (e −2)(2τ + 4)  . Proposition 2. Let N ≥⌈τ ln T⌉. For any T large enough, T X t=1 E [ρt] −ˆRT ≤T 2η β  1 γ + 4τ + 6  (3τ + 1)2 + 2Te−N/τ + 2N. (10) 6 Note that the choice of N ensures that the second term in (10) becomes O(1). The proofs are broken into a number of statements presented in the next section. Due to space constraints we present proof sketches only; the full proofs are presented in the extended version of the paper. 5 Analysis 5.1 General tools First, we show that if the policies that we follow up to time step t change slowly, µN t is “close” to µπt: Lemma 2. Let 1 ≤N < t ≤T and c > 0 be such that maxx P a |πs+1(a|x) −πs(a|x)| ≤c holds for 1 ≤s ≤t −1. Then we have max x,a X x′ µN t,x,a(x′) −µπt(x′) ≤c (3τ + 1)2 + 2e−N/τ. In the next two lemmas we compute the rate of change of the policies produced by Exp3 and show that for a large enough value of N, µN t,x,a can be uniformly bounded form below by β/2. Lemma 3. Assume that for some N + 1 ≤t ≤T, µN t,xt−N,at−N (x′) ≥β/2 holds for all states x′. Let c = 2η β  1 γ + 4τ + 6  . Then, max x X a |πt+N−1(a|x) −πt+N(a|x)| ≤c. (11) The previous results yield the following result that show that by choosing the parameters appropriately, the policies will change slowly and µN t will be uniformly bounded away from zero. Lemma 4. Let c be as in Lemma 3. Assume that c(3τ + 1)2 < β/2, and let N ≥  τ ln  4 β −2c(3τ + 1)2  . (12) Then, for all N < t ≤T, x, x′ ∈X and a ∈A, we have µN t,x,a(x′) ≥β/2 and maxx′ P a′ |πt+1(a′|x′) −πt(a′|x′)| ≤c. This result is proved by first ensuring that µt is uniformly lower bounded for t = N + 1, . . . , 2N, which can be easily seen since the policies do not change in this period. For the rest of the time instants, one can proceed by induction, using Lemmas 2 and 3 in the inductive step. 5.2 Proof of Proposition 1 The statement is trivial for T ≤N. The following simple result is the first step in proving Proposition 1 for T > N. Lemma 5. (cf. Lemma 4.1 in Even-Dar et al., 2009) For any policy π and t ≥1, ρπ t −ρt = X x,a µπ(x)π(a|x) [qt(x, a) −vt(x)] . For every x, a define QT (x, a) = PT t=N+1 qt(x, a) and VT (x) = PT t=N+1 vt(x). The preceding lemma shows that in order to prove Proposition 1, it suffices to prove an upper bound on E [QT (x, a) −VT (x)]. Lemma 6. Let c be as in Lemma 3. Assume that γ ∈(0, 1), c(3τ + 1)2 < β/2, N ≥ l τ ln  4 β−2c(3τ+1)2 m , 0 < η ≤ β 2(1/γ +2τ+3), and T > N hold. Then, for all (x, a) ∈X × A, E [QT (x, a) −VT (x)] ≤(4τ + 8)N + ln |A| η + (2τ + 4) T  γ + 2η β |A|  N (1/γ + 4τ + 6) + (e −2)(2τ + 4)  . 7 Proof sketch. The proof essentially follows the original proof of Auer et al. (2002) concerning the regret bound of Exp3, although some details are more subtle in our case: our estimates have different properties than the ones considered in the original proof, and we also have to deal with the N-step delay. Let ˆVN T (x) = T −N+1 X t=N+1 X a πt+N−1(a|x)ˆqt(x, a) and ˆQN T (x, b) = T −N+1 X t=N+1 ˆqt(x, b). Observe that although qt(x, a) is not necessarily positive (in contrast to the rewards in the Exp3 algorithm), one can prove that πt(a|x)|ˆqt(x, a)| ≤4 β (τ + 2) and E [|ˆqt(x, a)|] ≤2(τ + 2). (13) Similarly, it can be easily seen that the constraint on η ensures that ηˆqt(x, a) ≤1 for all x, a, t. Then, following the proof of Auer et al. (2002), we can show that ˆVN T (x) ≥(1 −γ) ˆQN T (x, b) −ln |A| η −4 β (τ + 2) η(e −2) T −N+1 X t=N+1 X a |ˆqt(x, a)| . (14) Next, since the policies satisfy maxx P a |πs+1(a|x) −πs(a|x)| ≤c by Lemma 4, we can prove, using (8) and (13), that E h ˆVN T (x) i ≤E [VT (x)] + 2(τ + 2) N (c T|A| + 1). Now, taking the expectation of both sides of (14) and using the bound on E h ˆVN T (x) i we get E [VT (x)] ≥(1 −γ)E  QN T (x, b)  −ln |A| η −4 β (τ + 2) η(e −2) T −N+1 X t=N+1 X a E [|ˆqt(x, a)|] −2(τ + 2) N (c T|A| + 1), where we used that E h ˆQN T (x, b) i = E  QN T (x, b)  by (8). Since qt(x, b) ≤2(τ + 2), E  QN T (x, b)  ≤E [QT (x, b)] + 2(τ + 2) N. Combining the above results and using (13) again, then substituting the definition of c yields the desired result. Proof of Proposition 1. Under the conditions of the proposition, combining Lemmas 5-6 yields T X t=1 E [ρπ t −ρt] ≤2N + X x,a µπ(x)π(a|x) E [QT (x, a) −VT (x)] ≤(4τ + 10)N + ln |A| η + (2τ + 4) T  γ + 2η β |A|  N (1/γ + 4τ + 6) + (e −2)(2τ + 4)  , proving Proposition 1. Acknowledgments This work was supported in part by the Hungarian Scientific Research Fund and the Hungarian National Office for Research and Technology (OTKA-NKTH CNK 77782), the PASCAL2 Network of Excellence under EC grant no. 216886, NSERC, AITF, the Alberta Ingenuity Centre for Machine Learning, the DARPA GALE project (HR0011-08-C-0110) and iCore. 8 References Auer, P., Cesa-Bianchi, N., Freund, Y., and Schapire, R. E. (2002). The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77. Even-Dar, E., Kakade, S. M., and Mansour, Y. (2005). Experts in a Markov decision process. In Saul, L. K., Weiss, Y., and Bottou, L., editors, Advances in Neural Information Processing Systems 17, pages 401–408. Even-Dar, E., Kakade, S. M., and Mansour, Y. (2009). Online Markov decision processes. Mathematics of Operations Research, 34(3):726–736. Neu, G., Gy¨orgy, A., and Szepesv´ari, C. (2010). The online loop-free stochastic shortest-path problem. In COLT-10. Puterman, M. L. (1994). Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley-Interscience. Yu, J. Y. and Mannor, S. (2009a). Arbitrarily modulated Markov decision processes. In Joint 48th IEEE Conference on Decision and Control and 28th Chinese Control Conference. IEEE Press. Yu, J. Y. and Mannor, S. (2009b). Online learning in Markov decision processes with arbitrarily changing rewards and transitions. In GameNets’09: Proceedings of the First ICST international conference on Game Theory for Networks, pages 314–322, Piscataway, NJ, USA. IEEE Press. Yu, J. Y., Mannor, S., and Shimkin, N. (2009). Markov decision processes with arbitrary reward processes. Mathematics of Operations Research, 34(3):737–757. 9
2010
152
3,913
A Log-Domain Implementation of the Diffusion Network in Very Large Scale Integration Yi-Da Wu, Shi-Jie Lin, and Hsin Chen Department of Electrical Engineering National Tsing Hua University Hsinchu, Taiwan 30013 {ydwu;hchen}@ee.nthu.edu.tw Abstract The Diffusion Network(DN) is a stochastic recurrent network which has been shown capable of modeling the distributions of continuous-valued, continuoustime paths. However, the dynamics of the DN are governed by stochastic differential equations, making the DN unfavourable for simulation in a digital computer. This paper presents the implementation of the DN in analogue Very Large Scale Integration, enabling the DN to be simulated in real time. Moreover, the logdomain representation is applied to the DN, allowing the supply voltage and thus the power consumption to be reduced without limiting the dynamic ranges for diffusion processes. A VLSI chip containing a DN with two stochastic units has been designed and fabricated. The design of component circuits will be described, so will the simulation of the full system be presented. The simulation results demonstrate that the DN in VLSI is able to regenerate various types of continuous paths in real-time. 1 Introduction In many implantable biomedical microsystems [1, 2], an embedded system capable of recognising high-dimensional, time-varying signals have been demanded. For example, recognising multichannel neural activity on-line is important for implantable brain-machine interfaces to avoid transmitting all data wirelessly, or to control prosthetic devices and to deliver bio-feedbacks in realtime [3]. The Diffusion Network (DN) proposed by Movellan is a stochastic recurrent network whose stochastic dynamics can be trained to model the probability distributions of continuous-time paths by the Monte-Carlo Expectation-Maximisation (EM) algorithm [4,5]. As stochasticity is useful for generalising the natural variability in data [6, 7], the DN is further shown suitable for recognising noisy, continuous-time biomedical data [8]. However, the stochastic dynamics of the DN is defined by a set of continuous-time, stochastic differential equations (SDEs). The speed of simulating stochastic differential equations in a digital computer is inherently limited by the serial processing and numerical iterations of the computer. Translating the DN into analogue circuits is thus of great interests for simulating the DN in real time by exploiting the natural, differential current-voltage (I-V) relationship of capacitors [9]. This paper presents the implementation of the DN in analogue Very Large Scale Integration (VLSI). To minimise the power consumption, the power supply voltage is only 1.5V, and most transistors are operated in subthreshold regions. As the reduced supply voltage limits directly the dynamic range available for voltages across capacitors, the log-domain representation proposed in [10] is applied to the DN, allowing diffusion processes to be simulated in a limited voltage ranges. After a brief 1 introduction to the DN, the following sections will derive the log-domain representation of the DN and describe its corresponding implementation in analogue VLSI. xk xi xj ωij ωii ωjj ωkk ωji Figure 1: The architecture of a Diffusion Network with one visible and two hidden units EXP EXP EXP EXP ωjj ϕ(xj) ωij ϕ(xi) ξj ξj + Σωijϕi xj VXj CXj ρjIs ρjxoff σ κj · dB dt xoff Is Figure 2: The block diagram of a DN unit in VLSI 2 The Diffusion Network As shown in Fig. 1, the DN comprises n continuous-time, continuous-valued stochastic units with fully recurrent connections. The state of the jth unit at time t, xj(t), is governed by dxj(t) dt = µj xj(t)  + σ · dB(t) dt (1) where µj(t) is a deterministic drift term given in (2), σ a constant, and dB(t) the Brownian motion. The Brownian motion introduces the stochasticity, enriching greatly the representational capability of the DN [5]. µj xj(t)  = κj ·  −ρjxj(t) + ξj + n X i=1 ωij · ϕ xi(t)  (2) ωij defines the connection weight from unit i to unit j. κ−1 j and ρ−1 j represent the input capacitance and transmembrane resistance, respectively, of the jth unit. ξj is the input bias, and ϕ is the sigmoid function given as ϕ(xj; a) = −1 + 2 1 + e−axj = tanh a 2xj  (3) where a adapts the slope of the sigmoid function. As shown in Fig. 1, the DN contains both visible(white) and hidden(grey) stochastic units. The learning of the DN aims to regenerate at visible units the probability distribution of a specific set of continuous paths. The number of visible units thus equals the dimension of the data to be modeled, while the minimum number of hidden units required for modeling data satisfactorily is identified by experimental trials. During training, visible units are “clamped” to the dynamics of the training dataset, and the dynamics of hidden units are Monte-Carlo sampled for estimating optimal parameters (ωij, κj, ρj, ξj) that maximise the expectation of training data [5]. After training, all units are given initial values at t = 0 only to sample the dynamics modeled by the DN. The similarity between the dynamics of visible units and those of training data indicate how well the DN models the data. 2.1 Log-domain translation To maximise the dynamic ranges for diffusion processes in VLSI, the stochastic state xj(t) is represented as a current and then logarithmically-compressed into a voltage VXj in VLSI [11]. The logarithmic compression allows xj(t) to change over three decades within a limited voltage range for VXj. The voltage representation VXj further facilitates the exploitation of the nature, differential (I-V) relationship of a capacitor to simulate SDEs in real-time and in parallel. 2 The logarithmic relationship between xj(t) and VXj can be realised by the exponential I-V characteristics of a MOS transistor in subthreshold operation [12]. To keep xj(t) a non-negative value (current) in VLSI, an offset xoff is added to xj(t), resulting in the following relationship between xj(t) and VXj. xj + xoff ≡IS · eαVXj, dxj = αIS · eαVXj · dVXj (4) where Is and α are process-dependent constants extractable from simulated I-V curves of transistors. Substituting Eq. (4) into Eq. (1) then translates the diffusion process in Eq. (1) into the following equation. CXj · dVXj dt =  ξj + n X i=1 ωijϕ(xi)  · e−αVXj + σ κj dBj(t) dt · e−αVXj + ρjxoff · e−αVXj −ρjIS (5) where CXj equals α/κj. Fig. 2 illustrates the block diagram for implementing Eq. (5) in VLSI. CXj is a capacitor and VXj the voltage across the capacitor. Each term on the right hand side of Eq. (5) then corresponds to a current flowing into CXj. Let (VP −VN) and IV AR represent the differential input voltage and the input current of an EXP-element, respectively. Each EXP-element in Fig. 2 produces an output current of Iout = IV AR · eα(VP −VN). Therefore, the EXP-elements implement the first three terms multiplied with e−αVXj in accordance with Eq. (5). The last term, ρjIS, is a constant and is thus implemented by a constant current source. Finally, the sigmoid circuit transforms xj into ϕ(xj) and the multipliers output a total current proportional to Pn i=1 ωij · ϕ(xi). 3 4 5 6 7 0 100 200 300 400 500 Time samples Figure 3: The stochastic dynamics (gray lines) regenerated by the DN trained on the bifurcating curves (black lines). 3 4 5 6 7 0 100 200 300 400 500 600 700 800 900 1000 Time samples Figure 4: The stochastic dynamics (gray lines) regenerated by the DN trained on the sinusoidal curve (the black line). 2.5 3.5 4.5 5.5 6.5 7.5 0 20 40 60 80 Time samples Figure 5: The stochastic dynamics (gray lines) regenerated by the DN trained on the QRS segments of electrocardiograms (black lines). 4 5 6 7 8 9 10 3.5 4.5 5.5 6.5 7.5 8.5 Unit 2 Unit 1 Figure 6: The stochastic dynamics (gray lines) regenerated by the DN trained on the handwritten ρ (the black line). 2.2 Adapting ρj instead of κj The DN has been shown capable of modeling various distributions of continuous paths by adapting wij, ξj, and κj in [5]. An adaptable κj corresponds to an adaptable CXj, but a tunable capacitor with a wide linear range is not easy to implement in VLSI. As Eq. (2) indicates that ρj is complementary 3 to κj in determining the “time constant” of the dynamics of the unit j, the possibility of adapting ρj instead of κj is investigated by Matlab simulation. With κj = 1, the DN was trained to model different data by adapting ωij, ξj, and ρj for 100 epochs. A DN with one visible and one hidden units was proved capable of regenerating the dynamics of bifurcating curves (Fig. 3), sinusoidal waves (Fig. 4), and electrocardiograms (Fig. 5). Moreover, a DN with only two visible units was able to regenerate the handwritten ρ satisfactorily, as illustrated in Fig. 6. The promising results supported the suggestion that adapting ρj instead of κj also allowed the DN to model different data. As a variable ρj simply corresponded to a tunable current source ρjIS in Fig. 2, the VLSI implementation was greatly simplified. 2.3 Parameter mappings Table 1 summarises the parameter mappings between the numerical simulation and the VLSI implementation. All variables except for VXj in Fig. 2 are represented as currents in VLSI. The unit currents (Iunit) of xj, ωij, and ξj are defined as 10 nA to match the current scales of transistors in subthreshold operation, as well as to reduce the power consumption. Moreover, extensive simulations indicate that the dynamic ranges required for modeling various data are [−3, 5] for xj and [−30, 30] for ωij. With xoff = 5 in Eq. (4), i.e. xoff = 50nA in VLSI, VXj ranges from 773 to 827 mV. While the diffusion process in Eq. (1) is iterated with ∆t = 0.05 in numerical simulation, ∆t = 0.05 is set to be 5 µs in VLSI, corresponding to a reasonable sampling rate (200kHz) at which most instruments can sample multiple channels(units) simultaneously. Finally, the unit capacitance for 1/κj is calculated as Cunit = Iunit · ∆tunit/VXj,unit, equaling 1 pF and resulting in CXj = α · Cunit = 30 pF. Table 1: Parameter mappings between numerical simulation and VLSI implementation parameter numeric circuit comment xj -3∼5 -30∼50 nA Iunit = 10 nA xoff 5 50 nA offset term in Eq. (4) VXj 0.773∼0.827 773∼827 mV VXj,unit = 1 V ω, ξ -30∼30 -300∼300 nA Iunit = 10 nA ϕ(xj) -1∼1 -400∼400 nA activation function CXj α/κj = 30 30 pF Cunit = 1 pF ∆t 0.05 5 µs tunit = 0.1 ms ρ 0.5∼2 0.5∼2 3 Circuit implementation A DN with two stochastic units have been designed with the CMOS 0.18 µm technology provided by the Taiwan Semiconductor Manufacturing Company (TSMC). The following subsections introduce the design of each component circuit. 3.1 The EXP element Fig. 7(b) shows the schematics of the EXP element. With M1 and M2 operated in the subthreshold region, the output current is given as Iout = IB · exp  1 nUT (VP −VN)  (6) where UT denotes the thermal voltage and n the subthreshold slope factor. Comparing Eq. (6) with Eq. (4) reveals that α = 1/nUT . As the drain current (Id) of a transistor in subthreshold operation is exponentially proportional to its gate-to-source voltage (VGS) as Id ∝eVGS/nUT , α = 1/nUT is extracted to be 30 by plotting log(Id) versus VGS in SPICE. Transistors M3-M5 form an active biasing circuit that sinks IB +Iout. By adjusting the gate voltage of M3 through the negative feedback, Iout is allowed to change over several decades. In addition, 4 n actually depends on the gate voltage and introduces variability to α [13]. To prevent the variable α from introducing simulation errors, all EXP elements of the DN unit are biased with a constant IB = 100 nA. As shown by Fig. 7(a), Iout of each element is then re-scaled by the one-quadrant current multiplier basing on translinear loops (Fig. 7(c)) [13] to produce I′ out = Iout × IV AR/IB, where IV AR represents the current input to each element in Fig. 2 (e.g.Σωϕ or ρxoff). EXP IOUT IV AR I′ OUT VP VN IB IB (a) M1 M2 VN VP M3 M5 VS M4 Vbiasn IB IOUT (b) Vbiasn M6 M5 M1 M4 M3 M2 M7 Vref IOUT I′ OUT IB IV AR (c) Figure 7: The circuit diagram of the EXP element. 3.2 Current multipliers Four-quadrant multipliers basing on translinear loops [13] are employed to calculate Σωijϕ(xi) in Eq. (5). Both ωij and ϕ(xi) are represented by differential currents as ωij = Iω+ −Iω−, ϕ(xi) = Iϕ+ −Iϕ− (7) Let the differential current (IZ+ −IZ−) represents the multiplier’s output and IU represent a unit current. Eq. (8) indicates that the four-quadrant multiplication can be composed of four one-quadrant multipliers in Fig. 7(c), as illustrated in Fig. 8. IZ+ · IU −IZ−· IU = (Iω+ · Iϕ+ + Iω−· Iϕ−) −(Iω+ · Iϕ−+ Iω−· Iϕ+) (8) Fig. 9 shows the simulation result of the four-quadrant multiplier, exhibiting satisfactory linearity over the dynamic ranges required in Table 1. IZ− IU IU Iω+ Iϕ− Iω− Iϕ+ IZ+ IU IU Iω+ Iϕ+ Iω− Iϕ− Figure 8: The four-quadrant current multiplier 5 −200 −100 0 100 200 −400 −200 0 200 400 (IZ+ −IZ−) in nA (Iω+ −Iω−) in nA ϕi = −400nA ϕi = −300nA ϕi = −200nA ϕi = −100nA ϕi = 0 ϕi = 100nA ϕi = 200nA ϕi = 300nA ϕi = 400nA Figure 9: The simulation results of the fourquadrant current multiplier -500 -400 -300 -200 -100 0 100 200 300 400 500 -600 -400 -200 0 200 400 600 Output current in nA Input current in nA gain=0.8 gain=1.0 gain=3.0 gain=5.0 Figure 10: The simulation result of the sigmoid circuit with different Va 3.3 Sigmoid function ϕ(·) Fig. 11 shows the block diagram for implementing the sigmoid function in Eq. (3). The current IXi representing xi is firstly converted into a voltage Vi by the the operational amplifier(OPA) with a voltage-controlled active resistor (VCR) proposed in [14]. Vi is then sent to an operational transconductance amplifier(OTA) in subthreshold operation, producing an output current of Is = IB tanh  1 2nUT (Vi −Vref)  (9) Since Vi −Vref = Ri · Ixi, with Ri representing the resistance of the VCR, the voltage Va adapts Ri and thus the slope of the sigmoid function. Finally, the 2nd generation current conveyor (CCII) in Fig. 12 [15] converts the current Is into a pair of differential currents (IOUT N, IOUT P ) ranging between −400 nA and +400 nA. The differential currents are then duplicated for the inputs of four-quadrant multipliers of all DN units. CCII OPA VCR Vref Va Vref Vref OTA IXi IOUT N IOUT P Figure 11: The block diagram of the sigmoid circuit. 3.4 Capacitor amplification As CXi = 30 pF requires considerable chip area, CXi is implemented by the circuit in Fig. 13, utilising the Miller effect to amplify the capacitance. Let A denote the gain of the amplifier. The effective capacitance between X and Y is (1 + A) · CX. Fig. 13 also shows the schematics of the amplifier whose gain is designed to be 2. As a result, CX = 10 pF is sufficient for providing an effective CXi of 30 pF. 4/4x1 4/4x16 −A M2 M1 VREF Y VBIAS X Y X CX CEQ = CX(1 + A) Figure 13: The circuit diagram of the capacitor amplified by the Miller effect. 6 Vbiasn Vbiasp Isig OPA 0.3V 0.3V 1.2V 1.2V VY IOUT N IOUT P VREF VX IP IN Figure 12: The circuit diagram of the single-to-differential current conveyor 2 1.5 Volts Chip Area Num. of Units Power Consumption Power Supply Technology 1D/2D continuous paths (including pads) Capability Max. Bandwidth 1.6 kHz 1.368×1.368mm2 345 µWatts 1P6M 0.18 µm CMOS Figure 14: The chip layout and its specification. 30 40 50 0 0.5 1 1.5 2 Time in ms IX1 in µA Figure 15: The sinusoidal dynamics regenerated by the DN chip in post-layout simulation (10 trials). 30 35 40 45 50 55 0 0.05 0.1 0.15 0.2 0.25 0.3 Time in ms IX1 in µA Figure 16: The electrocardiogram dynamics regenerated by the DN chip in post-layout simulation (10 trials). 7 20 30 40 50 60 0 0.5 1 1.5 2 2.5 Time in ms IX1 in µA Figure 17: The bifurcating dynamics regenerated by the DN chip in post-layout simulation (8 trials). 10 20 30 40 50 60 70 10 15 20 25 30 35 40 45 50 55 IX2 in µA IX1 in µA Figure 18: The handwritten ρ regenerated by the DN chip in post-layout simulation (10 trials). 4 The Diffusion Network in VLSI Fig. 14 shows the chip layout of the log-domain implementation of the DN with two stochastic units, so is the specification shown. The area of the core circuit and the capacitors are 0.306 mm2 and 0.384 mm2, respectively. The total power consumption is merely 345 µW, by the merit of low supply voltage (1.5V) and subthreshold operation. The chip has been taped out for fabrication with the CMOS 0.18 µm Technology by the TSMC. The post-layout simulations are shown in Fig. 15−18 and described as follows. With one unit functioning as a visible unit and the other as a hidden unit, the parameters of the DN was programmed to regenerate the one-dimensional paths in Sec. 2.2. The noise current σ κ · dB dt was simulated by a piecewise-linear current source with random amplitudes in the SPICE. As shown by Fig. 15-17, the visible unit was capable of regenerating the sinusoidal waves, the electrocardiograms, and the bifurcating curves with negligible differences from Fig. 3-5. Moreover, as both units functioned as visible units, the DN was capable of regenerating the handwritten ρ as Fig. 18. These promising results demonstrate the capability of the DN chip to model the distributions of different continuous paths reliably and power-efficiently. After chip is fabricated in August, the chip will be tested and the measurement results will be presented in the conference. 5 Conclusion The log-domain representation of the Diffusion Network has been derived and translated into analogue VLSI circuits. Based on well-defined parameter mappings, the DN chip is proved capable of regenerating various types of continuous paths, and the log-domain representation allows the diffusion processes to be simulated in real-time and within a limited dynamic range. In other words, analogue VLSI circuits are proved useful for solving (simulating) multiple SDEs in real-time and in a power-efficient manner. After verifying the chip functionality, a DN chip with a scalable number of units will be further developed for recognising multi-channel, time-varying biomedical signals in implantable microsystems. Acknowledgments The authors thank National Chip Implementation Center (CIC) for fabrication services, and Mr. C.-M. Lai and S.-C. Sun for helpful discussions. 8 References [1] G. Iddan, G. Meron, A. Glukhovsky, and P. Swain, “Wireless capsule endoscopy,” Nature, vol. 405, no. 6785, p. 417, July 2000. [2] T. W. Berger, M. Baudry, J.-S. L. Roberta Diaz Brinton, V. Z. Marmarelis, A. Y. Park, B. J. Sheu, and A. R. Tanguay, JR., “Brain-implantable biomimetic electronics as the next era in neural prosthetics,” Proc. IEEE, vol. 89, no. 7, pp. 993–1012, July 2001. [3] M. A. Lebedev and M. A. L. Nicolelis, “Brain-machine interfaces: past, present and future,” Trends in Neuroscience, vol. 29, no. 9, pp. 536–546, 2006. [4] J. R. Movellan, “A learning theorem for networks at detailed stochastic equilibrium,” Neural Computation, vol. 10, pp. 1157–1178, July 1998. [5] J. R. Movellan, P. Mineiro, and R. J.Williams, “A Monte Carlo EM approach for partially observable diffusion processes: Theory and applications to neural networks,” Neural Computation, vol. 14, pp. 1507–1544, July 2002. [6] H. Chen and A. F. Murray, “A continuous restricted Boltzmann machine with an implementable training algorithm,” IEE Proc. of Vision, Image and Signal Processing, vol. 150, no. 3, pp. 153–158, 2003. [7] D. F. Specht, “Probabilistic neural networks,” Neural Networks, vol. 3, no. 1, pp. 109–118, 1990. [8] Y. S. Hsu, T. J. Chiu, and H. Chen, “Real-time recognition of continuous-time biomedical signals using the diffusion network,” in Proc. of the Int. Joint Conf. on Neural Networks (IJCNN), 2008, pp. 2628–2633. [9] L. O. Chua, T. Roska, T. Kozek, and A. Zarandy, “CNN universal chips crank up the computing power,” IEEE Circuits and Devices Mag., vol. 12, no. 4, pp. 18–28, July 1996. [10] T. Serrano-Gotarredona and B. Linares-Barranco, “Log-domain implementation of complex dynamics reaction-diffusion neural networks,” IEEE Trans. Neural Networks, vol. 14, pp. 1337–1355, Sept. 2003. [11] D. R. Frey, “Exponential state space filters: A generic current mode design strategy,” IEEE Trans. Circuits Syst. I, vol. 43, pp. 34–42, Jan. 1996. [12] E. Vittoz and J. Fellrath, “CMOS analog integrated circuits based on weak inversion operation,” IEEE J. Solid-State Circuits, vol. 12, pp. 224–231, June 1977. [13] S.-C. Liu, J. Kramer, G. Indiveri, T. Delbr¨uck, and R. Douglas, Analog VLSI: Circuits and Principles. The MIT Press, 2002. [14] M. Banu and Y. Tsividis, “Floating voltage-controlled resistors in CMOS technology,” Electronics Letters, vol. 18, no. 15, pp. 678–679, July 1982. [15] C. Toumazou, F. J. Lidgey, and D. G. Haigh, Analogue IC Design: The Current-Mode Approach. Peter Peregrinus Ltd, 1990. 9
2010
153
3,914
SpikeAnts, a spiking neuron network modelling the emergence of organization in a complex system Sylvain Chevallier TAO, INRIA-Saclay Univ. Paris-Sud F-91405 Orsay, France sylchev@lri.fr H´el`ene Paugam-Moisy LIRIS, CNRS Univ. Lyon 2 F-69676 Bron, France hpaugam@liris.cnrs.fr Mich`ele Sebag TAO, LRI −CNRS Univ. Paris-Sud F-91405 Orsay, France sebag@lri.fr Abstract Many complex systems, ranging from neural cell assemblies to insect societies, involve and rely on some division of labor. How to enforce such a division in a decentralized and distributed way, is tackled in this paper, using a spiking neuron network architecture. Specifically, a spatio-temporal model called SpikeAnts is shown to enforce the emergence of synchronized activities in an ant colony. Each ant is modelled from two spiking neurons; the ant colony is a sparsely connected spiking neuron network. Each ant makes its decision (among foraging, sleeping and self-grooming) from the competition between its two neurons, after the signals received from its neighbor ants. Interestingly, three types of temporal patterns emerge in the ant colony: asynchronous, synchronous, and synchronous periodic foraging activities −similar to the actual behavior of some living ant colonies. A phase diagram of the emergent activity patterns with respect to two control parameters, respectively accounting for ant sociability and receptivity, is presented and discussed. 1 Introduction The emergence of organization is at the core of many complex systems, from neural cell assemblies to living insect societies. For instance, the emergence of synchronized rhythmical activity has been observed in many social insect colonies [2, 4, 5, 7], where synchronized patterns of activity may indeed contribute to the collective efficiency in various ways. But how do ants proceed to temporally synchronize their activity? As suggested by Cole [4], the synchronization of activity is a consequence of temporal coupling between individuals. It thus comes naturally to investigate how spiking neuron networks (SNNs), also based on temporal dynamics, enable to model the emergence of collective phenomena, specifically synchronized activities, in complex systems. The reader’s familiarity with SNNs, inspired from the mechanisms of information processing in the brain, is assumed in the following, referring to [18] for a comprehensive presentation. 1.1 Related work In computational neuroscience, SNNs are well known for generating a rich variety of dynamical patterns of activity, e.g. synchrony of cell assemblies [9], complete synchrony [17], transient synchrony [10], order-chaos phase transition [20] or polychronization [11]. For instance, a mesoscopic model [3] explains the emergence of a rhythmic oscillation at the network level, resulting from the competition of excitatory and inhibitory connections between neurons. In computer science, the field of reservoir computing (RC) [13] focuses on analyzing and exploiting the echos generated by external inputs in the dynamics of sparse random networks. The proposed SpikeAnts model features one distinctive characteristics compared to the state of the art in RC and SNNs: its only aim is to 1 model an emergent property in a complex closed system; it does neither receive any external inputs nor involve any learning rule. To our best knowledge, current models of emergence are mostly based on statistical physics, involving differential equations and mean field approaches [19], or mathematics and computer science, using random Markov fields, cellular automata or multi-agent systems. 1.2 Target of the SpikeAnts model The SpikeAnts model implements a distributed decision making process in a population of agents, say an ant colony. The phenomenon to analyze is the division of labor. The model relies on the spatio-temporal interactions of spiking neurons, where each ant agent is accounted for by two neurons. A simplified scheme is proposed, inspired from [2] and [16]: Each agent may be in one out of four states, Observing, Foraging, Sleeping or self-Grooming (Fig. 1). The interactions take place during the observation round. Each agent a observes its environment and if it perceives none or too few working agents, a goes foraging for a given time and eventually goes to sleep. Otherwise, if a perceives “sufficiently many” agents engaged in foraging, it goes back to the nest for less vital tasks (the grooming state) before returning to observation after a while. Each state lasts for a fixed duration (resp. tO, tF, tS and tG), with an exception for the observation state. The observation period is only subject to an upper bound tO. If the agent sees sufficiently many other foraging ants before the end of the observation period, it can switch at once to the self-grooming state. O G F S leeping (long) or rooming (short) time O F bservation oraging S G Figure 1: (Left) Transitions between the four agent states: Grooming, Observing, Foraging and Sleeping states. Black arrows denote transitions and the dotted arrow indicates an inhibitory message. (Right) An example of agent schedule. The agent decisions only depend on the information exchanged between them, through agent neurons sending spikes to (respectively, receiving spikes from) other agents in the population. It must be emphasized that the proposed decision process does not assume the agent ability to “count” (here the number of its foraging neighbors). In the meanwhile, this process is deterministic, contrasting with the threshold-based probabilistic models used in [1, 2, 7]. 2 The SpikeAnts spiking neuron network This section describes the structure of the SpikeAnts model. Each ant agent is modelled by two spiking neurons. Any two agents (i, j) are connected with an average density ρ (0 ⩽ρ ⩽1). The ant colony thus defines a sparsely connected network of spiking neurons, referred to as SNN. 2.1 Spiking neuron models An agent is modelled by two coupled spiking neurons, respectively a Leaky Integrate-and-Fire (LIF) neuron [6, 14] and a Quadratic Integrate-and-Fire (QIF) neuron [8, 15]. These models of neuron are biologically plausible and they have been thoroughly studied. We shall show that their coupling achieves a frugal control of the agent behavior. A LIF neuron fires a spike if its potential Vp exceeds a threshold ϑ. Upon firing a spike, Vp is reset to Vreset. Formally:  dVp dt = −λ(Vp(t) −Vrest) + Iexc(t), if Vp < ϑ else fires a spike and Vp is set to V p reset , (1) where λ is the relaxation constant. Iexc(t) models instantaneous synaptic interactions. Let Pre denote the set of presynaptic neurons (such that there exists an edge from every neuron in Pre and 2 the current neuron), and let Traini denote the spike trains of the ith neuron in Pre; then, Iexc(t) = w X i∈Pre X j∈Traini δ(t −ti j), (2) where w is a synaptic weight controlling the dynamics of the SNN (more in section 3.1), δ(.) is Dirac distribution and ti j is the firing time of the jth spike from the ith presynaptic neuron. The QIF neuron is described by the evolution of the potential Va, compared to the resting potential Vrest and an internal threshold Vthres. Additionally, it receives an internal signal Iclock modelling a gap junction connection:  dVa dt = λ(Va(t) −Vrest)(Va(t) −Vthres) + Iinh(t) + Iclock(t), if Va < ϑ else fires a spike and Va is set to V a reset . (3) Depending on whether the reset threshold is greater than the internal threshold (V a reset ⩾Vthres), the QIF neuron is bistable [12], which motivated the choice of this neuron model. If V a reset < Vthres, the membrane potential Va stabilizes on Vrest when there is no external perturbation, and the neuron thus exhibits an integrator behavior. When V a reset ⩾Vthres, the neuron displays a bursting behavior and fires periodically. 2.2 The ant agent model Each SpikeAnts agent mimics an ant. Its behavior is controlled after the competition between two coupled spiking neurons, an active one (QIF, Eq. (3)) and a passive one (LIF, Eq. (1)). The agent additionally involves an internal unit providing the Iclock signal. During the observation round, the ant makes its decision (whether it goes foraging) based on the competition between its active and passive neurons (Fig. 2). Both neurons are aware of the foraging neighbor ants. The signal emitted by these neighbors is an excitatory signal (respectively an inhibitory signal) for the passive (resp. active) neuron: Iinh(t) = −Iexc(t). The active neuron additionally receives the excitatory signal Iclock(t) of the internal clock unit. In the case where the ant agent does not see too many foraging ants, the internal excitatory signal Iclock(t) dominates the inhibitory signal Iinh(t), the active neuron fires first and drives the ant to Active neuron Passive neuron 0 0.5 1 1.5 0 20 40 60 80 100 120 Time (ms) Membrane potential (mV) ϑ State S O F O O S S F G Figure 2: Membrane potentials of active (in dark/red) and passive (in grey/green) neurons. The dashed line indicates the threshold ϑ. The first observation state starts at 20ms: the active neuron fires before the passive one, the agent thus goes foraging and the active neuron continues sending spikes during the whole foraging period (signalling its foraging behavior to other agents). After a sleep period (from circa 50 to 70ms), starts a second observation round. This time the passive neuron fires before the active one. The agent thus goes self-grooming, and switches to the observation state thereafter. During the last observation round, the active neuron wins again against the passive one, and the agent goes foraging. 3 foraging (first and last episode in Fig. 2). When foraging, the active neuron enters in a bursting phase and periodically sends a spike to the ant neighbors. Note that these spikes are only meaningful for the ants in observation state. After a foraging period (duration tF), the ant goes to sleep (duration tS). The sleeping state is triggered by a delayed connection between the internal unit and the active neuron. Quite the contrary, if the ant sees many other foraging ants, the excitatory signal Iexc(t) drives the passive neuron to fire before the active one (second episode in Fig. 2), and the ant accordingly sets in a self-grooming state (duration tG). The decision making of the ant agent thus relies on the competition between its active and passive neurons. In particular, the number of spikes needed for an ant to go foraging or self-grooming depends on the temporal dynamics of the system; it varies from one observation episode to another. After some rest (self-grooming or sleeping states, with respective durations tG and tS, tG< tS), the ant returns to the observation state. As above-mentioned, incoming spikes are only relevant to the active and passive neurons of an observing ant. During the foraging and resting states, presynaptic spikes have no influence, which can be thought of as an intrinsic plasticity mechanism [21] driven by the internal unit. The internal unit can indeed be seen as the ant biological clock. In a further model, it will be replaced by a neural group interacting with active and passive neurons through intrinsic plasticity, e.g. using a transient increase of λ for LIF and QIF neurons. 2.3 Model parameters Overall, the SpikeAnts model is controlled by three types of parameters, respectively related to spiking neuron models, to ant agents (state durations) and to the whole population (size and connectivity of the SNN). The default parameter values used in the simulations are displayed in Table 1. The values of state durations are such that their ratio are not integers, in order to avoid spurious synchronizations. Note that state duration timescale is not significant at the ant colony level. Parameter type Symbol Description Value (units) Neural λ Membrane relaxation constant 0.1 mV−1 Vrest Resting potential 0.0 mV ϑ Spike firing threshold 1.0 mV V p reset Passive neuron reset potential -0.1 mV Vthres Active neuron bifurcation threshold 0.5 mV V a reset Active neuron reset potential 0.55 mV Iclock Active neuron constant input current 0.1 mV w Synaptic weight 0.01 mV−1 Agent tF Foraging duration 47.1 ms tO Maximum observation duration 10.5 ms tS Sleeping duration 45.7 ms tG Self-grooming duration 16.7 ms Population ρ Connection probability 0.3 M population size 150 agents Table 1: Neural, model and population parameters used in simulations. 3 Experiments This section reports on the experimental study of the SpikeAnts model, first describing the experimental setting and the goals of experiments. The population behavior is measured after a global indicator, and the sensitivity thereof w.r.t. the SpikeAnts parameters is studied. Two compound control parameters, summarizing the model parameters and governing the emergent synchronization of the system are proposed. A consistent phase diagram depicting the global synchronization in the plane defined from both control parameters is displayed and discussed. Goals of experiments A first goal of experiments is to measure the global activity of the population, denoted F and defined as the overall time spent foraging: F = X t nF(t) (4) 4 where nF(t) is the number of foraging agents at time t. The study focuses on the sensitivity of F w.r.t. the model parameters. The second and most important goal of experiments is to study the temporal structure of the population activity. A synchronization indicator will be proposed and its sensitivity w.r.t. the model parameters will be examined. Experimental settings Each run starts with all ants initially sleeping. Each ant wakes up after some time uniformly drawn in ]0, 2tS]. Spiking neurons are simulated using a discrete time scheme: numerical simulations of the spiking neuron network are based on a clock-driven simulator, using Runge-Kutta method for the approximation of differential equations, with a small time step of 0.1ms to enforce numerical stability. Each run lasts for 100,000 time steps. All reported results are averaged over 10 independent runs. 3.1 Sensitivity analysis of the foraging effort This section first examines how the overall foraging effort F depends on the size M of the population, the connection rate ρ and two neural parameters, the active neuron reset potential V a reset and the synaptic weight w. The average ¯F is reported with its standard deviation in Fig. 3. 200 400 600 800 1000 0 200 400 600 800 1000 200 300 400 500 600 700 0 0.2 0.4 0.6 0.8 1 ¯F ¯F M ρ 0 500 1000 1500 0 0.05 0.1 0.15 0.2 ¯F w 200 240 280 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 ¯F V a reset Figure 3: Sensitivity analysis of the average foraging effort ¯F, versus population size M (top left), connection probability ρ (top right), active neuron reset potential V a reset (bottom left) and synaptic weight w (bottom right). The overall foraging effort F was expected to linearly increase with the population size M. While it indeed increases with M, it displays a breaking down around M=600 (Fig. 3, top left); this unexpected change will be explained in section 3.2, and related to the increased variability of the population synchronization. F was expected to exponentially decrease with the connectivity ρ, and it does so (Fig. 3, top right): the more neighbors, the more likely an ant will see other foraging ants, and will thus avoid go foraging itself. Along the same line, F was expected to decrease with the reset potential V a reset: the closer V a reset to ϑ, the more spikes a foraging ant will sent, exciting other ants’ passive neuron and thereby sending these ants to rest (Fig. 3, bottom left; the value of ϑ is 1, and F indeed goes to 0 as V a reset goes to 1). The most surprising result regards the influence of the synaptic weight w (Fig. 3, bottom right). It was expected that high w values would favor the triggering of passive neurons, and thus adversely affect the foraging effort. High w values however mostly result in a high variance of F. The interpretation proposed for this fact goes as follows. For low w values, an ant behaves as a “good statistician”, meaning that its decision is based on observing many other foraging agents. Accordingly, the foraging/resting ratio is very stable along time and across runs. As w increases however, it makes it possible for an ant to take decisions based on few cues and the behavioral variability increases. More precisely, the F variance is low for small w values (an ant makes its decision based on about 80 spikes for w = 0.01). The variance dramatically increases in a narrow region around w = 0.15; an ant makes its decision based on circa 6 spikes and small variations in the received spike trains might thus lead to different decisions, explaining the high variance of F. For higher w 5 values however, the F variance decreases again. A close look at the experimental results reveals the existence of different temporal regimes with abrupt transitions among these, explaining the breaking down around M = 600 ants and the abrupt increase and decrease of F variance. 3.2 Emergent synchronization: Control parameters and phase transitions 0 10 20 30 40 50 60 70 80 0 500 1000 1500 2000 nF(t) Simulated time t 0 50 100 150 200 250 0 500 1000 1500 2000 nF(t) Simulated time t 0 100 200 300 400 500 600 700 800 900 1000 0 500 1000 1500 2000 nF(t) Simulated time t Asynchronous Synchronous aperiodic Synchronous periodic A B C 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 nF(t + 1) nF(t) 50 100 150 200 250 50 100 150 200 250 nF(t + 1) nF(t) 200 400 600 800 1000 200 400 600 800 1000 nF(t + 1) nF(t) Figure 4: (Top row) Asynchronous, synchronous aperiodic and synchronous periodic patterns of activity (number of foraging ants versus time for t = 1 . . . 2, 000). (Bottom row) Temporal correlation of the activity for the above three patterns, for t = 1 . . . 100, 000. The emergence of three synchronization patterns appears in the experimental results. The first one, referred to as asynchronous (Fig. 4, left), depicts a situation where each ant (almost) independently makes its own decisions. The second one, referred to as synchronous (Fig. 4, middle) displays some coordination among the ants; specifically, the number of foraging ants is piecewise constant, though varying from a time interval to another. The third pattern, referred to as periodic synchronous (Fig. 4, right) involves two stable subpopulations which forage alternatively; the population enters a bi-phase mode, as actually observed in some ants colonies [4, 5]. The difference between the three patterns of activity is most visible from the phase diagram plotting nF(t + 1) vs nF(t) (Fig. 4, bottom row; transient states are removed in the synchronized periodic and aperiodic regime for the sake of clarity). The orbit of the synchronous aperiodic activity indicates the presence of at least one attractor whereas the synchronous periodic activity displays a flip bifurcation. The ergodicity of the SpikeAnts system is first analyzed based on the Lyapunov exponents, after the computation algorithms proposed in [22]. On asynchronous patterns, the mean value of the 5,000 Lyapunov exponents found with an 8 dimension analysis is −0.01±0.1. For synchronous aperiodic patterns, the mean value of the 3,500 Lyapunov exponents found with a 6 dimension analysis is also −0.01 ± 0.1 (after discarding the transient states). Whereas the asynchronous and synchronous aperiodic activities lie at the edge of chaos, the periodic synchronous regime only displays large negative Lyapunov exponents, indicating a very stable behavior. An entropy-based indicator is proposed to analyze the emergent synchronization of the SpikeAnts system. Let I denote the set of values nF(t) (after pruning all transient time steps such that nF(t) ̸= nF(t + 1) and nF(t) ̸= nF(t −1)); the foraging histogram is defined by associating to each value k in I, the number nk of time steps such that nF(t) = k. The synchronization of the population is 6 finally measured from the histogram entropy H: H = − X k∈I nk P m nm log  nk P m nm  (5) The entropy of the asynchronous regime is zero, since all states are transient. The synchronous periodic regime, where two subpopulations alternatively forage, gets a low entropy (< log 2). Finally, the synchronous aperiodic regime which involves a few dozens of subpopulations, gets a high entropy value. The transition from one regime to another one is clearly related to the model parameters. The goal thus becomes to identify the influential factors, best explaining the population behavior. A first such influential factor, defined as ρ √ M and referred to as sociability, controls the amount of interactions between the ants. A high sociability enables the ants to base their foraging decision on reliable estimates of the current foraging activity, thus entailing a low variance of the global foraging effort. A second influential factor, referred to as receptivity, is the ratio between the weight w of the input signal and the subthreshold range (depending on the resting potential Vrest and the spike firing threshold ϑ). This ratio w |ϑ−Vrest| indicates the amplitude of the depolarization induced by the input spike compared to the difference between rest and threshold. A high receptivity thus enables the ant to postpone its foraging decision based on few cues (i.e. visible foraging ants), thereby entailing a high variance of the global foraging effort. The sociability and receptivity factors, referred to as control parameters, support a clear picture of the asynchronous, synchronous aperiodic and periodic synchronous patterns. The entropy (Fig. 5, left) and its variance (Fig. 5, right) are displayed in the 2D plane defined from the sociability and receptivity of the SpikeAnts system, defining the phase diagram of the SpikeAnts system. For a low sociability and a high receptivity (region A in Fig. 5), few interactions among ants take place and each ant makes its decisions based on few cues. In this region, the population is a collection of quasi independent individuals, and few ants (60 on average on Fig. 4) are foraging at any given time step. For a higher sociability and a low receptivity (region B in Fig. 5), ants see more of their peers and they base their decisions on reliable estimates of the foraging activity. A synchronization of the ant activities emerges, in the sense that many agents make their foraging decisions at the same time. Still, the synchronization remains aperiodic, i.e. the number of foraging ants varies from 50 to 240 (Fig. 4). For a high sociability and a high receptivity (region C in Fig. 5), ants see many of their peers and they make their decisions based on few cues. In this case a periodic synchronized regime is observed, where two subpopulations alternatively go foraging (the first one involves ∼950 ants in Fig. 4). A C B 0 5 10 15 20 25 0.05 0.1 0.15 0.2 Receptivity 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Sociability H (mean) A C B 0 5 10 15 20 25 0.05 0.1 0.15 0.2 Receptivity 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 Sociability H (standard deviation) Figure 5: Emergence of synchronizations in the population activity: entropy H (left) and variance of H (right) versus the ant sociability and receptivity. The asynchronous pattern, with entropy H = 0 corresponds to a low sociability and high receptivity (region A). The synchronous aperiodic pattern, with high entropy, corresponds to a medium sociability and low receptivity (region B). The synchronous periodic pattern, H ∼log 2, corresponds to both high sociability and receptivity (region C). 7 0 50 100 150 200 250 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 nF(t) t Figure 6: A representative simulation: the global behavior switches from a synchronous aperiodic regime to an asynchronous one before stabilizing in a periodic synchronous regime. Complementary experiments show abrupt transitions between the different regimes in the borderline regions. Specifically, an asynchronous aperiodic regime (region B) is prone to evolve into an asynchronous (region A) or periodic synchronous (region C) regimes (Figure 6). Quite the contrary, the periodic synchronous regime is stable, i.e. the population does not get back to any other regime after the periodic synchronous regime is installed. The aperiodic synchronous regime, though less stable than the periodic one, is far more stable than the asynchronous one. 4 Discussion The main contribution of this paper is a local and parsimonious model, accounting for individual decision making, which reproduces the emergence of synchronized activity in a complex system in a realistic way: the three different regimes obtained in simulation are comparable to the different patterns of activity observed in social insect colonies [7, 5, 4]. The synchronization patterns that emerge at the macroscopic scale can be fully controlled by several model parameters ruling the sociability of ants (whether an ant may observe many other ants) and their receptivity (whether an ant makes its foraging decision based on a few cues). The synchronization patterns are endogenous, with no external influence from the environment. Additionally, they do not rely on individual synchronizations, as each agent has a specific behavior, different from its neighbor and varying during simulation time. To our best knowledge, the SpikeAnts model is the first one accounting for a population behavior and based on spiking neurons. SpikeAnts captures both spatial and temporal features of the complex system in a deterministic way (as opposed to stochastic models). It does not require any external constraints or data. Most importantly, it does not require the agent to feature sophisticated skills (e.g. “counting” its foraging neighbors). It is worth noting that SpikeAnts does not involve the resolution of differential equations: While spiking neurons are modelled in continuous time, their behavior is computed through finite differences, parameterized from the user-specified time step. In summary, SpikeAnts demonstrates that SNNs can be used to model a simple self-organizing system. It hopefully opens new perspectives for modelling emergent phenomena in complex systems. A first perspective for further research is to investigate the temporal dynamics of spike trains using standard approaches from neuroscience. The underlying question is whether the population synchronization can be facilitated, e.g. in the transient regime, by making spiking neurons sensitive to the synchrony of spike trains. The role of inhibition and the role of the excitation/inhibition balance in the emergence of synchronized patterns will be studied. In particular, the impact on the phase diagram of individual parameter variations will be analyzed. A second perspective is to endow SpikeAnts with some learning skills, e.g. adapting the connections weights w with a local unsupervised learning rule (e.g. Spike-Timing-Dependent Plasticity), in order to optimize the collective efficiency of the population. Along the same line, the ability of SpikeAnts to cope with external perturbations (e.g. affecting the number of foraging ants) will be investigated. Acknowledgments We thank Mathias Quoy, Universit´e Cergy, for many fruitful discussions about complex systems, and helpful remarks about this paper. We thank Jean-Louis Deneubourg and Jos´e Halloy, Universit´e Libre de Bruxelles, for many insights into the collective behavior of living systems. This work was supported by NSF grant No. PHY-9723972 and by the European Integrated Project SYMBRION. 8 References [1] E. Bonabeau, G. Theraulaz, and J.L. Deneubourg. Fixed response thresholds and the regulation of division of labor in insect societies. Bulletin of Mathematical Biology, 60(4):753–807–807, July 1998. [2] E. Bonabeau, G. Theraulaz, and J.L. Deneubourg. The synchronization of recruitement-based activities in ants. BioSystems, 45:195–211, 1998. [3] N. Brunel and X.J. Wang. What determines the frequency of fast network oscillations with irregular neural discharges? I. Synaptic dynamics and excitation-inhibition balance. Journal of Neurophysiology, 90(1):415–430, 2003. [4] B.J. Cole. Short-term activity cycles in ants: Generation of periodicity by worker interaction. The American Naturalist, 137(2), 1991. [5] N.R. Franks and S. Bryant. Rhythmical patterns of activity within the nest of ants. Chemistry and Biology of Social Insects, pages 122–123, 1987. [6] W. Gerstner and W. Kistler. Spiking Neuron Models: Single Neurons, Population, Plasticity. Cambridge University Press, 2002. [7] S. Goss and J.L. Deneubourg. Autocatalysis as a source of synchronised rythmical activity in social insects. Insectes Sociaux, 35(3):310–315, 1988. [8] D. Hansel and G. Mato. Existence and stability of persistent states in large neuronal networks. Physical Review Letters, 86(18):4175–4178, April 2001. [9] D.O. Hebb. The Organization of Behaviour. Wiley, New York, 1949. [10] J.J. Hopfield and C.D. Brody. What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc. Natl. Acad. Sci., 98(3):1282–1287, 2001. [11] E.M. Izhikevich. Polychronization: Computation with spikes. Neural Computation, 18(2):245–282, 2006. [12] E.M. Izhikevich. Dynamical systems in neuroscience: the geometry of excitability and bursting, chapter One-Dimensional Systems. MIT Press, 2007. [13] H. Jaeger, W. Maass, and J. Principe. Special issue on echo state networks and liquid state machines (editorial). Neural Networks, 20(3):287–289, April 2007. [14] B.W. Knight. Dynamics of encoding in a population of neurons. The Journal of General Physiology, 59(6):734–766, June 1972. [15] P.E. Latham, B.J. Richmond, P.G. Nelson, and S. Nirenberg. Intrinsic dynamics in neuronal networks. i. theory. Journal of Neurophysiology, 83(2):808–827, February 2000. [16] W. Liu, A.F.T. Winfield, J. Sa, J. Chen, and L. Dou. Towards energy optimisation: Emergent task allocation in a swarm of foraging robots. Adaptive Behavior, 15(3):289–305, 2007. [17] R.E. Mirollo and S.H. Strogatz. Synchronization of pulse-coupled biological oscillators. SIAM Journal on Applied Mathematics, 50(6):1645–1662, 1990. [18] H. Paugam-Moisy and S.M. Bohte. Handbook of Natural Computing, chapter 10. Computing with Spiking Neuron Networks. Springer, 2010. (in press). [19] D. Phan, M.B. Gordon, and J.P. Nadal. Cognitive Economics, chapter Social interactions in economic theory: An insight from statistical mechanics, pages 335–358. Springer, 2004. [20] B. Schrauwen, L. B¨using, and R. Legenstein. On computational power and the order-chaos phase transition in reservoir computing. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems, pages 1425–1432. MIT Press, 2008. [21] J. Triesch. Synergies between intrinsic and synaptic plasticity mechanisms. Neural Computation, 19(4):885–909, 2007. [22] A. Wolf, J. Swift, H. Swinney, and J. Vastano. Determining lyapunov exponents from a time series. Physica D: Nonlinear Phenomena, 16(3):285–317, 1985. 9
2010
154
3,915
Permutation Complexity Bound on Out-Sample Error Malik Magdon-Ismail Computer Science Department Rensselaer Ploytechnic Institute 110 8th Street, Troy, NY 12180, USA magdon@cs.rpi.edu Abstract We define a data dependent permutation complexity for a hypothesis set H, which is similar to a Rademacher complexity or maximum discrepancy. The permutation complexity is based (like the maximum discrepancy) on dependent sampling. We prove a uniform bound on the generalization error, as well as a concentration result which means that the permutation estimate can be efficiently estimated. 1 Introduction Assume a standard setting with data D = {(xi, yi)}n i=1, where (xi, yi) are sampled iid from the joint distribution p(x, y) on Rd×{±1}. Let H = {h : Rd 7→{±1}} be a learning model which produces a hypothesis g ∈H when given D (we use g for the hypothesis returned by the learning algorithm and h for a generic hypothesis in H). We assume the 0-1 loss, so the in-sample error is ein(h) = 1 2n Pn i=1(1 −yih(xi)). The out-sample error eout(h) = 1 2 E [(1 −yh(x))]; the expectation is over the joint distribution p(x, y). We wish to bound eout(g). To do so, we will bound |eout(h) −ein(h)| uniformly over H for all distributions p(x, y); however, the bound itself will depend on the data, and hence the distribution. The classic distribution independent bound is the VC-bound (Vapnik and Chervonenkis, 1971); the hope is that by taking into account the data one can get a tighter bound. The data dependent permutation complexity1 for H is defined by: PH(n, D) = Eπ " max h∈H 1 n n X i=1 yπih(xi) # . Here, π is a uniformly random permutation on {1, . . ., n}. PH(n, D) is an intuitively plausible measure of the complexity of a model, measuring its ability to correlate with a random permutation of the target values. The difficulty in analyzing PH is that {yπi} is an ordered random sample from y = [y1, . . . , yn], sampled without replacement; as such it is a dependent sampling from a data driven distribution. Analogously, we may define the bootstrap complexity, using the bootstrap distribution B on y, where each sample yB i is independent and uniformly random over y1, . . . , yn: BH(n, D) = EB " max h∈H 1 n n X i=1 yB i h(xi) # . When the average y-value ¯y = 0, the bootstrap complexity is exactly the Rademacher complexity (Bartlett and Mendelson, 2002; Fromont, 2007; K¨a¨ari¨ainen and Elomaa, 2003; Koltchinskii, 2001; Koltchinskii and Panchenko, 2000; Lozano, 2000; Lugosi and Nobel, 1999; Massart, 2000): RH(n, D) = Er " max h∈H 1 n n X i=1 rih(xi) # , 1For simplicity, we assume that H is closed under negation; generally, all the results hold with the complexities defined using absolute values, so for example PH(n, D) = Eπ ˆ maxh∈H ˛˛ 1 n Pn i=1 yπih(xi) ˛˛˜ . 1 where r is a random vector of i.i.d. fair ±1’s. The maximum discrepancy complexity measure ∆H(n, D) is similar to the Rademacher complexity, with the expectation over r being restricted to those r satisfying Pn i=1 ri = 0, ∆H(n, D) = Er " max h∈H 1 n n X i=1 riyih(xi) # . When ¯y = 0, the permutation complexity is the maximum discrepancy; the permutation complexity is to maximum discrepancy as the bootstrap complexity is to the Rademacher complexity. The permutation complexity maintains a little more information regarding the distribution. Indeed we prove a uniform bound very similar to the uniform bound obtained using the Rademacher complexity: Theorem 1 With probability at least 1 −δ, for every h ∈H, eout(h) ≤ein(h) + PH(n, D) + 13 r 1 2n ln 6 δ . The probability in this theorem is with respect to the data distribution. The challenge in proving this theorem is to accomodate samples (yπi) constructed according to the data, and in a dependent way. Using our same proof technique, one can also obtain a similar uniform bound with the bootstrap complexity, where the samples are independent, but according to the data. The proof starts with the standard ghost sample and symmetrization argument. We then need to handle the data dependent sampling in the complexity measure, and this is done by introducing a second ghost data set to govern the sampling. The crucial aspect about sampling according to a second ghost data set is that the samples are now independent of the data; this is acceptable, provided the two methods of sampling are close enough; this is what constitutes the meat of the proof given in Section 2.2. For a given permutation π, one can compute maxh∈H 1 n Pn i=1 yπih(xi) using an empirical risk minimization; however, the computation of the expectation over permutations is an exponential task, which needless to say is not feasible. Fortunately, we can establish that the permutation complexity is concentrated around its expectation, which means that in principle a single permutation suffices to compute the permutation complexity. Let π be a single random permutation. Theorem 2 For an absolute constant c ≤6 + p 2/ ln 2, with probability at least 1 −δ, PH(n, D) ≤sup h∈H 1 n n X i=1 yπih(xi) + c r 1 2n ln 3 δ . The probability here is with respect to random permutations (i.e., it holds for any data set). It is easy to show concentration for the bootstrap complexity about its expectation – this follows from McDiarmid’s inequality because the samples are independent. The complication with the permutation complexity is that the samples are not independent. Nevertheless, we can show the concentration indirectly by first relating the two complexities for any data set, and then using the concentration of the bootstrap complexity (see Section 2.3). Empirical Results. For a single random permutation, with probability at least 1 −δ, eout(h) ≤ein(h) + sup h∈H 1 n n X i=1 yπih(xi) + O r 1 n ln 1 δ ! . Asymptotically, one random permutation suffices; in practice, one should average over a few. Indeed, a permutation based validation estimate for model selection has been extensively tested (see Magdon-Ismail and Mertsalov (2010) for details); for classification, this permutation estimate is the permutation complexity after removing a bias term. It outperformed LOO-cross validation and the Rademacher complexity on real data. We restate those results here, comparing model selection using the permutation estimate versus using the Rademacher complexity (using real data sets from the UCI Machine Learning repository (Asuncion and Newman, 2007)). The performance metric is the regret when compared to oracle model selection on a held out set (lower regret is better). We considered two model selection tasks: choosing the number of leafs in a decision tree; and, selecting k in the k-nearest neighbor method. The results reported here are averaged over several (10,000 or more) random splits of the data into a training set and held out set. We define a learning episode as an empirical risk minimization on O(n) data points. 2 10 Learning Episodes 100 Learning Episodes Data n Decision Trees k-NN Decision Trees k-NN Perm. Rad. Perm. Rad. Perm. Rad. Perm. Rad. Abalone 3,132 0.02 0.02 0.09 0.12 0.02 0.02 0.04 0.04 Ionosphere 263 0.18 0.19 0.75 0.84 0.16 0.17 0.70 0.83 M.Mass 667 0.06 0.06 0.11 0.12 0.05 0.05 0.11 0.11 Parkinsons 144 0.34 0.40 0.32 0.44 0.34 0.41 0.33 0.43 Pima Ind. 576 0.07 0.07 0.12 0.15 0.07 0.07 0.11 0.14 Spambase 3,450 0.07 0.07 0.43 0.54 0.06 0.07 0.43 0.55 Transfusion 561 0.08 0.09 0.12 0.19 0.08 0.09 0.12 0.19 WDBC 426 0.24 0.37 0.33 0.50 0.23 0.34 0.34 0.51 Diffusion 2,665 0.03 0.02 0.06 0.04 0.03 0.02 0.06 0.03 The permutation complexity appears to dominate most of the time (especially when n is small); and, when it fails to dominate, it is as good or only slightly worse than the Rademacher estimate. It is not surprising that as n increases, the performances of the various complexities converges. Asymptotically, one can deduce several relationships between them, for example the maximum discrepancy can be asymptotically bounded from above and below by the Rademacher complexity. Similarly, (see Lemma 5), the bootstrap and permutation complexities are equal, asymptotically. The small sample performance of the complexities as bounding tools is not easy to discern theoretically, which is where the empirics comes in. An intuition for why the permutation complexity performs relatively well is because it maintains more of the true data distribution. Indeed, the permutation method for validation was found to work well empirically, even in regression (Magdon-Ismail and Mertsalov, 2010); however, our permutation complexity bound only applies to classification. Open Questions. Can the permutation complexity bound be extended beyond classification to (for example) regression with bounded loss? The permutation complexity displays a bias for severely unbalanced data; can this bias be removed. We conjecture that it should be possible to get a better uniform bound in terms of Eπ[maxh∈H 1 n Pn i=1(yπi −¯y)h(xi)]. 1.1 Related Work Out-sample error estimation has extensive coverage, both in the statistics and learning commuities. (i) Statistical methods try to estimate the out-sample error asymptotically in n, and give consistent estimates under certain model assumptions, for example: final prediction error (FPE) (Akaike, 1974); Generalized Cross Validation (GCV) (Craven and Wahba, 1979); or, covariance-type penalties (Efron, 2004; Wang and Shen, 2006). Statistical methods tend to work well when the model has been well specified. Such methods are not our primary focus. (ii) Sampling methods, such as leave-one-out cross validation (LOO-CV), try to estimate the outsample error directly. Cross validation is perhaps the most used validation method, dating as far back as 1931 (Larson, 1931; Wherry, 1931, 1951; Katzell, 1951; Cureton, 1951; Mosier, 1951; Stone, 1974). The permutation complexity uses a “sampled” data set on which to compute the complexity; other than this superficial similarity, the estimates are inherently different. (iii) Bounds. The most celebrated uniform bound on generalization error is the distribution independent bound of Vapnik-Chervonenkis (VC-bound) (Vapnik and Chervonenkis, 1971). Since the VC-dimension may be hard to compute, empirical estimates have been suggested, (Vapnik et al., 1994). The VC-bound is optimal among distribution independent bounds; however, for a particular distribution, it could be sub-optimal. Several data dependent bounds have already been mentioned, which can typically be estimated in-sample via optimization: maximum discrepancy (Bartlett et al., 2002); Rademacher-style penalties (Bartlett and Mendelson, 2002; Fromont, 2007; K¨a¨ari¨ainen and Elomaa, 2003; Koltchinskii, 2001; Koltchinskii and Panchenko, 2000; Lozano, 2000; Lugosi and Nobel, 1999; Massart, 2000); margin based bounds, for example (Shawe-Taylor et al., 1998). Generalizations to Gaussian and symmetric, bounded variance r have also been suggested, (Bartlett and Mendelson, 2002; Fromont, 2007) . One main application of such bounds is that any such approximate estimate of the out-sample error (which satisfies some bound of the form of the permutation complexity bound) can be used for model selection, after adding a (small) penalty for the “complex3 ity of model selection” (see Bartlett et al. (2002)). In practice, this penalty for the complexity of model selection is ignored (as in Bartlett et al. (2002)). (iv) Permutation Methods are not new to statistics (Good, 2005; Golland et al., 2005; Wiklund et al., 2007). Golland et al. (2005) show concentration for a permutation based test of significance for the improved performance of a more complex model, using the Rademacher complexity. We directly give a uniform bound for the out-sample error in terms of a permutation complexity, answering a question posed in (Golland et al., 2005) which asks whether there is a direct link between permutation statistics and generalization errors. Indeed, Magdon-Ismail and Mertsalov (2010) construct a permutation estimate for validation which they empirically test in both classification and regression problems. For classification, their estimate is related to the permutation complexity. Most relevant to this work are Rademacher penalties and the corresponding (sampling without replacement) maximum discrepancy. Bartlett et al. (2002) give a uniform bound using the maximum discrepancy which is in some sense a uniform bound based on a sampling without replacement (dependent sampling); however, the sampling distribution is fixed, independent of the data. It is illustrative to briefly sketch the derivation of the maximum discrepancy bound. Adapting the proof in Bartlett et al. (2002) and ignoring terms which are O ( 1 n ln 1 δ )1/2 , with probability at least 1−δ: eout(h) ≤ ein(h) + sup h∈H {eout(h) −ein(h)} (a) ≤ein(h) + ED sup h∈H {eout(h) −ein(h)} , (b) = ein(h) + ED sup h∈H ( ED′ 1 2n n X i=1 yih(xi) −y′ ih(x′ i) ) , (c) ≤ ein(h) + ED,D′ max h∈H ( 1 2n n X i=1 yih(xi) −y′ ih(x′ i) ) , (d) ≤ ein(h) + ED,D′ max h∈H    1 n n/2 X i=1 yih(xi) −y′ ih(x′ i)   , = ein(h) + ED∆H(n, D) (e) ≤ein(h) + ∆H(n, D), (a) follows from McDiarmid’s inequality because eout(h) −ein(h) is stable to a single point perturbation for every h, hence the supremum is also stable; in (b) appears a ghost data set and (c) follows by convexity of the supremum; in (d), we break the sum into two equal parts, which adds the factor of two; finally, (e) follows again by McDiarmid’s inequality because ∆H is stable to single point perturbations. The discrepancy automatically drops out from using the ghost sample; this does not happen with data dependent permutation sampling, which is where the difficulty lies. 2 Permutation Complexity Uniform Bound We now give the proof of Theorem 1. We will adapt the standard ghost sample approach in VC-type proofs and the symmetrization trick in (Gin´e and Zinn, 1984) which has greatly simplified VC-style proofs. In general, high probability results are with respect to the distribution over data sets. Our main bounding tool will be McDiarmid’s inequality: Lemma 1 (McDiarmid (1989)) Let Xi ∈Ai be independent; suppose f : Q i Ai 7→R satisfies sup (x1,...,xn)∈Q i Ai z∈Aj |f(x) −f(x1, . . . , xj−1, z, xj+1, . . . , xn)| ≤cj, for j = 1, . . . , n. Then, with probability at least 1 −δ, f(X1, . . . , Xn) ≤Ef(X1, . . . , Xn) + v u u t1 2 n X i=1 c2 i ln 1 δ . We also obtain Ef ≤f + q 1 2 Pn i=1 c2 i ln 1 δ by using −f in McDiarmid’s inequality. 4 2.1 Permutation Complexity The out-sample permutation complexity of a model is: PH(n) = EDPH(n, D) = ED,π " max h∈H 1 n n X i=1 yπih(xi) # , where the expectation is over the data D = (x1, y1), . . . , (xn, yn) and a random permutation π. Let D′ differ from D only in one example, (xj, yj) →(x′ j, y′ j). Lemma 2 |PH(n, D) −PH(n, D′)| ≤4 n. Proof: For any permutation π and every h ∈H, the sum Pn i=1 yπih(xi) changes by at most 4 in going from D to D′; thus, the maximum over h ∈H changes by at most 4. Lemma 2 together with McDiarmid’s inequality implies a concentration of PH(n, D) about PH(n), which means we can work with PH(n, D) instead of the unknown PH(n). Corollary 1 With probability at least 1 −δ, PH(n) ≤PH(n, D) + 4 r 1 2n ln 1 δ . Since ein(h) = 1 2(1 −1 n Pn i=1 yih(xi)), the empirical risk minimizer gπ on the permuted targets yπ can be used to compute PH(n, D) for a particular permutation π. 2.2 Bounding the Out-Sample Error To bound suph∈H{eout(h) −ein(h)}, we first use the standard ghost sample and symmetrization arguments typical of modern generalization error proofs (see for example Bartlett and Mendelson (2002); Shawe-Taylor and Cristianini (2004)). Let r′′ = [r′′ 1, . . . , r′′ n] be a ±1 sequence. Lemma 3 With probability at least 1 −δ: sup h∈H {eout(h) −ein(h)} ≤ ED,D′ " sup h∈H ( 1 2n n X i=1 r′′ i (yih(xi) −y′ ih(x′ i)) )# + r 1 2n ln 1 δ . Proof: We proceed as in the proof of the maximum discrepancy bound in Section 1.1: sup h∈H {eout(h) −ein(h)} (a) ≤ ED,D′ " sup h∈H ( 1 2n n X i=1 yih(xi) −y′ ih(x′ i) )# + r 1 2n ln 1 δ , (b) = ED,D′ " sup h∈H ( 1 2n n X i=1 r′′ i (yih(xi) −y′ ih(x′ i)) )# + r 1 2n ln 1 δ . In (a), the O(( 1 n ln 1 δ )1/2) term is from applying McDiarmid’s inequality because ein(h) changes by at most 1 n if one data point changes, and so the supremum changes by at most that much; (b) follows because r′′ i = −1 corresponds to exchanging xi, x′ i in the expectation which does not change the expectation (it amounts to relabeling of random variables). Lemma 3 holds for an arbitrary sequence r′′ which is independent of D, D′; we can take the expectation with respect to r′′, for arbitrarily distributed r′′, as long as r′′ is independent of D, D′. 2.2.1 Generating Permutations with ±1 Sequences Fix y; for a given permutation π, define a corresponding ±1 sequence rπ by rπ i = yπiyi; then, yπi = rπ i yi. Thus, given y, for each of the n! permutations π1, . . . , πn!, we have a corresponding ±1 sequence rπi; we thus obtain a multiset of sequences Sy = {rπ1, . . . , rπn!} (there may be repetitions as two different permutations may result in the same sequence of ±1 values); we thus have a mapping from permutations to the ±1 sequences in Sy. If r, a random vector of ±1s, is 5 uniform on Sy, then r.y (componentwise product) is uniform over the permutations of y. We say that Sy generates the permutations on y. Similarly, we can define Sy′, the generator of permutations on y′. Unfortunately, Sy, Sy′ depend on D, D′, and so we can’t take the expectation uniformly over (for example) r ∈Sy. We can overcome this by introducing a second ghost sample D′′ to “approximately” generate the permutations for y, y′, ultimately allowing us to prove the main result. Theorem 3 With probability at least 1 −5δ, sup h∈H {eout(h) −ein(h)} ≤PH(n) + 9 r 1 2n ln 1 δ , We obtain Theorem 1 by combining Theorem 3 with Corollary 1. 2.2.2 Proof of Theorem 3 Let D′′ be a second, independent ghost sample, and Sy′′ the generator of permutations for y′′. In Lemma 3, take the expectation over r′′ uniform on Sy′′. The first term on the RHS becomes ED,D′,D′′ 1 n! X π " sup h∈H 1 2n n X i=1 r′′ i (π)(yih(xi) −y′ ih(x′ i)) # , (1) where each permutation π induces a particular sequence r′′(π) ∈Sy′′ (previously we used rπ i which is now ri(π)). Consider the sequences r, r′ corresponding to the permutations on y and y′. The next lemma will ultimately relate the expectation over permutations in the second ghost data set to the permutations over D, D′. Lemma 4 With probability at least 1 −2δ, there is a one-to-one mapping from the sequences in Sy′′ = {r′′(π)}π to Sy = {r(π)}π such that 1 2n n X i=1 (r′′ i −ri(r′′))yih(xi) ≤ r 8 n ln 1 δ , for every r′′ ∈Sy′′ and every h ∈H (we write r(r′′) to denote the sequence r ∈Sy to which r′′ is mapped). Similarly, there exists such a mapping from Sy′′ to Sy′. The probability here is with respect to y, y′ and y′′. This lemma says that the permutation generating sets Sy′′, Sy′, and Sy are essentially equivalent. Proof: We can (without loss of generality) reorder the points in D′′ so that the first k′′ are +1, so y′′ 1 = · · · = y′′ k′′ = +1, and the remaining are −1. Similarily, we can order the points in D so that the first k are +1, so y1 = · · · = yk = +1. We now construct the mapping from Sy′′ to Sy as follows. For a given permutation π, we map r′′(π) ∈Sy′′ to r(π) ∈Sy. This mapping is clearly bijective since every permutation corresponds uniquely to a sequence in Sy (and Sy′′). Let ri = yπiyi and r′′ i = y′′ πiy′′ i . If ri ̸= r′′ i , either yπi ̸= y′′ πi or yi ̸= y′′ i . Since y and y′′ disagree on exactly |k −k′′| locations (and similarly for yπ and y′′ π), the number of locations where r and r′′ disagree is therefore at most 2|k −k′′|. Thus, for any r′′ and any h ∈H, 1 2n n X i=1 (r′′ i −ri(r′′))yih(xi) ≤ 1 2n n X i=1 |r′′ i −ri(r′′)| |yih(xi)| = 1 2n n X i=1 |r′′ i −ri(r′′)| ≤2|k −k′′| n . We observe that Pn i=1(yi −y′′ i ) = 2(k −k′′) and so, 1 2n n X i=1 (r′′ i −ri(r′′))yih(xi) ≤ 1 n n X i=1 (yi −y′′ i ) = 1 n n X i=1 zi , where zi = yi −y′′ i . Since y and y′′ are identically distributed, zi are independent and zero mean. We consider the function f(z1, . . . , zn) = 1 n Pn i=1 zi. Since zi ∈{0, ±2}, if you change one of the 6 zi, f changes by at most 4 n, and so the conditions hold to apply McDiarmid’s inequality to f. Thus, using the symmetry of zi, with probability at least 1 −2δ, 8 n Pn i=1 zi ≤ q 1 2n ln 1 δ . Given D, D′, D′′, assume the mappings which are known to exist by the previous lemma are r(r′′) and r′(r′′). We can rewrite the internal summand in the expression of Equation (1) using the equality r′′ i (yih(xi) −y′ ih(x′ i)) = (r′′ i −ri(r′′) + ri(r′′))yih(xi) −(r′′ i −r′ i(r′′) + r′ i(r′′))y′ ih(x′ i). Using Lemma 4, we can, with probability at least 1 −2δ, bound the term which involves (r′′ i − ri(r′′)) in Equation (1); and, similarly, with probability at least 1 −2δ, we bound the term involving (r′′ i −r′ i(r′′)). Thus, with probability at least 1 −4δ, the expression in Equation (1) is bounded by: ED,D′,D′′ 1 n! X π " sup h∈H 1 2n n X i=1 (ri(r′′)yih(xi) −r′ i(r′′)y′ ih(x′ i)) # + 2 r 8 n ln 1 δ , where r′′(π) cycles through the sequences in Sy′′. Since the mappings r(r′′) and r′(r′′) are one-toone, r(r′′).y cycles through the permutations of y, and similarly for r′(r′′).y′. Since H is closed under negation, we finally obtain the bound ED 1 n! X π " sup h∈H 1 2n n X i=1 yπih(xi) # + ED′ 1 n! X π " sup h∈H 1 2n n X i=1 y′ πih(x′ i) # + 2 r 8 n ln 1 δ ; Using this in Lemma 3, with probability at least 1 −5δ, sup h∈H {eout(h) −ein(h)} ≤PH(n) + 9 r 1 2n ln 1 δ . Commentary. (i) The permutation complexity bound needs empirical risk minimization, which is notoriously hard; however, if the same algorithm is used for learning as well as computing P, we can view it as optimization over a constrained hypothesis set (this is especially so with regularization); the bounds now hold. (ii) The same proof technique can be used to get a bootstrap complexity bound; the result is similar. (iii) One could bound PH for VC function classes, showing that this data dependent bound is asymptotically no worse than a VC-type bound. Bounding permutation complexity on specific domains could follow the methods in Bartlett and Mendelson (2002). 2.3 Estimating PH(n, D) Using a Single Permutation We now prove Theorem 2, which states that one can essentially estimate PH(n, D) (an average over all permutations) by suph∈H 1 n Pn i=1 yπih(xi), using just a single randomly selected permutation π. Our proof is indirect: we will link PH to the bootstrap complexity BH. The bootstrap complexity is concentrated via an easy application of McDiarmid’s inequality, which will ultimately allow us to conclude that the permutation estimate is also concentrated. The bootstrap distribution B constructs a random sequence yB of n independent uniform samples from y1, . . . , yn; the key requirement is that yB i are independent samples. There are nn (not distinct) possible bootstrap sequences. Lemma 5 |BH(n, D) −PH(n, D)| ≤ 1 √n. Proof: Let k be the number of yi which are +1; we condition on κ, the number of +1 in the bootstrap sample. Suppose B|κ samples uniformly among all sequences with κ entries being +1. BH(n, D) = Eκ EB|κ " sup h∈H 1 n n X i=1 yB i h(xi) κ # , The key observation is that we can generate all samples uniformly according to B|κ by first generating a random permutation and then selecting randomly |k −κ| +1’s (or −1’s) to flip, so: EB|κ " sup h∈H 1 n n X i=1 yB i h(xi) κ # = EF|k−κ| Eπ " sup h∈H 1 n n X i=1 yF πih(xi) # . 7 (F denotes the flipping random process.) Since yF πi differs from yπi in exactly |k −κ| positions, sup h∈H 1 n n X i=1 yπih(xi) −2|k −κ| n ≤sup h∈H 1 n n X i=1 yF πih(xi) ≤sup h∈H 1 n n X i=1 yπih(xi) + 2|k −κ| n . Thus, |BH(n, D) −PH(n, D)| ≤2 n Eκ [|k −κ|]. Since Eκ[|k −κ|] ≤ p Var[k −κ] ≤1 2 √n (because κ is binomial), the result follows. In addition to furthering our cause toward the proof of Theorem 2, Lemma 5 is interesting in its own right, because it says that permutation and bootstrap sampling are asymptotically similar. The nice thing about the bootstrap estimate is that the expectation is over independent yB 1 , . . . , yB n . Since the bootstrap complexity changes by at most 2 n if you change one sample, by McDiarmid’s inequality, Lemma 6 For a random bootstrap sample B, with probability at least 1 −δ, BH(n, D) ≤sup h∈H 1 n n X i=1 yB i h(xi) + 2 r 1 2n ln 1 δ . We now prove concentration for estimating PH(n, D). As in the proof of Lemma 5, generate yB in two steps. First generate κ, the number of +1’s in yB; κ is binomial. Now, generate a random permutation yπ, and flip (as appropriate) a randomly selected |k −κ| entries, where k is the number of +1’s in y. If we apply McDiarmid’s inequality to the function which equals the number of +1’s, we immediately get that with probability at least 1 −2δ, |κ −k| ≤( 1 2n ln 1 δ )1/2. Thus, with probability at least 1 −2δ, yB differs from yπ in at most (2n ln 1 δ )1/2 positions. Each flip changes the complexity by at most 2, hence, with probability at least 1 −2δ, sup h∈H 1 n n X i=1 yB i h(xi) ≤sup h∈H 1 n n X i=1 yπih(xi) + 4 r 1 2n ln 1 δ . We conclude that for a random permutation π, with probability at least 1 −3δ, BH(n, D) ≤sup h∈H 1 n n X i=1 yπih(xi) + 6 r 1 2n ln 1 δ . Now, combining with Lemma 5, we obtain Theorem 2 after a little algebra, because δ < 1. We have not only established that PH is concentrated, but we have also established a general connection between the permutation and bootstrap based estimates. In this particular case, we see that sampling with and without replacement are very closely related. In practice, sampling without replacement can be very different, because one is never in the truly asymptotic regime. Along that vein, even though we have concentration, it pays to take the average over a few permutations. References Akaike, H. (1974). A new look at the statistical model identification. IEEE Trans. Aut. Cont., 19, 716–723. Asuncion, A. and Newman, D. (2007). UCI machine learning repository. Bartlett, P. L. and Mendelson, S. (2002). Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3, 463–482. Bartlett, P. L., Boucheron, S., and Lugosi, G. (2002). Model selection and error estimation. Machine Learning, 48, 85–113. Craven, P. and Wahba, G. (1979). Smoothing noisy data with spline functions. Numerische Mathematik, 31, 377–403. Cureton, E. E. (1951). Symposium: The need and means of cross-validation: II approximate linear restraints and best predictor weights. Education and Psychology Measurement, 11, 12–15. 8 Efron, B. (2004). The estimation of prediction error: Covariance penalties and cross-validation. Journal of the American Statistical Association, 99(467), 619–632. Fromont, M. (2007). Model selection by bootstrap penalization for classification. Machine Learning, 66(2-3), 165–207. Gin´e, E. and Zinn, J. (1984). Some limit theorems for empirical processes. Annals of Prob., 12, 929–989. Golland, P., Liang, F., Mukherjee, S., and Panchenko, D. (2005). Permutation tests for classification. Learning Theory, pages 501–515. Good, P. (2005). Permutation, parametric, and bootstrap tests of hypotheses. Springer. K¨a¨ari¨ainen, M. and Elomaa, T. (2003). Rademacher penalization over decision tree prunings. In In Proc. 14th European Conference on Machine Learning, pages 193–204. Katzell, R. A. (1951). Symposium: The need and means of cross-validation: III cross validation of item analyses. Education and Psychology Measurement, 11, 16–22. Koltchinskii, V. (2001). Rademacher penalties and structural risk minimization. IEEE Transactions on Information Theory, 47(5), 1902–1914. Koltchinskii, V. and Panchenko, D. (2000). Rademacher processes and bounding the risk of function learning. In E. Gine, D. Mason, and J. Wellner, editors, High Dimensional Prob. II, volume 47, pages 443–459. Larson, S. C. (1931). The shrinkage of the coefficient of multiple correlation. Journal of Education Psychology, 22, 45–55. Lozano, F. (2000). Model selection using Rademacher penalization. In Proc. 2nd ICSC Symp. on Neural Comp. Lugosi, G. and Nobel, A. (1999). Adaptive model selection using empirical complexities. Annals of Statistics, 27, 1830–1864. Magdon-Ismail, M. and Mertsalov, K. (2010). A permutation approach to validation. In Proc. 10th SIAM International Conference on Data Mining (SDM). Massart, P. (2000). Some applications of concentration inequalities to statistics. Annales de la Facult´e des Sciencies de Toulouse, X, 245–303. McDiarmid, C. (1989). On the method of bounded differences. In Surveys in Combinatorics, pages 148–188. Cambridge University Press. Mosier, C. I. (1951). Symposium: The need and means of cross-validation: I problem and designs of cross validation. Education and Psychology Measurement, 11, 5–11. Shawe-Taylor, J. and Cristianini, N. (2004). Kernel Methods for Pattern Analysis. Camb. Univ. Press. Shawe-Taylor, J., Bartlett, P. L., Williamson, R. C., and Anthony, M. (1998). Structural risk minimization over data dependent hierarchies. IEEE Transactions on Information Theory, 44, 1926– 1940. Stone, M. (1974). Cross validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society, 36(2), 111–147. Vapnik, V. N. and Chervonenkis, A. (1971). On the uniform convergence of relative frequencies of events to their pr obabilities. Theory of Probability and its Applications, 16, 264–280. Vapnik, V. N., Levin, E., and Le Cun, Y. (1994). Measuring the VC-dimension of a learning machine. Neural Computation, 6(5), 851–876. Wang, J. and Shen, X. (2006). Estimation of generalization error: random and fixed inputs. Statistica Sinica, 16, 569–588. Wherry, R. J. (1931). A new formula for predicting the shrinkage of the multiple correlation coefficient. Annals of Mathematical Statistics, 2, 440–457. Wherry, R. J. (1951). Symposium: The need and means of cross-validation: III comparison of cross validation with statistical inference of betas and multiple r from a single sample. Education and Psychology Measurement, 11, 23–28. Wiklund, S., Nilsson, D., Eriksson, L., Sjostrom, M., Wold, S., and Faber, K. (2007). A randomization test for PLS component selection. Journal of Chemometrics, 21(10-11), 427–439. 9
2010
155
3,916
Fast global convergence of gradient methods for high-dimensional statistical recovery Alekh Agarwal1 Sahand N. Negahban1 Martin J. Wainwright1,2 Department of Electrical Engineering and Computer Science1 and Department of Statistics2 University of California, Berkeley Berkeley, CA 94720-1776 {alekh,sahand n,wainwrig}@eecs.berkeley.edu Abstract Many statistical M-estimators are based on convex optimization problems formed by the weighted sum of a loss function with a norm-based regularizer. We analyze the convergence rates of first-order gradient methods for solving such problems within a high-dimensional framework that allows the data dimension d to grow with (and possibly exceed) the sample size n. This high-dimensional structure precludes the usual global assumptions— namely, strong convexity and smoothness conditions—that underlie classical optimization analysis. We define appropriately restricted versions of these conditions, and show that they are satisfied with high probability for various statistical models. Under these conditions, our theory guarantees that Nesterov’s first-order method [12] has a globally geometric rate of convergence up to the statistical precision of the model, meaning the typical Euclidean distance between the true unknown parameter θ∗and the optimal solution bθ. This globally linear rate is substantially faster than previous analyses of global convergence for specific methods that yielded only sublinear rates. Our analysis applies to a wide range of M-estimators and statistical models, including sparse linear regression using Lasso (ℓ1regularized regression), group Lasso, block sparsity, and low-rank matrix recovery using nuclear norm regularization. Overall, this result reveals an interesting connection between statistical precision and computational efficiency in high-dimensional estimation. 1 Introduction High-dimensional data sets present challenges that are both statistical and computational in nature. On the statistical side, recent years have witnessed a flurry of results on consistency and rates for various estimators under high-dimensional scaling, meaning that the data dimension d and other structural parameters are allowed to grow with the sample size n. These results typically involve some assumption regarding the underlying structure of the parameter space, including sparse vectors, low-rank matrices, or structured regression functions, as well as some regularity conditions on the data-generating process. On the computational side, many estimators for statistical recovery are based on solving convex programs. Examples of such M-estimators include ℓ1-regularized quadratic programming (Lasso), second-order cone programs for sparse non-parametric regression, and semidefinite programming relaxations for low-rank matrix recovery. In parallel, a line of recent work (e.g., [3, 7, 6, 5, 12, 18]) focuses on polynomial-time algorithms for solving these types of convex programs. Several authors [2, 6, 1] have used variants of Nesterov’s accelerated gradient method [12] to obtain algorithms with a global 1 sublinear rate of convergence. For the special case of compressed sensing (sparse regression with incoherent design), some authors have established fast convergence rates in a local sense–once the iterates are close enough to the optimum [3, 5]. Other authors have studied finite convergence of greedy algorithms (e.g., [18]). If an algorithm identifies the support set of the optimal solution, the problem is then effectively reduced to the lower-dimensional subspace, and thus fast convergence can be guaranteed in a local sense. Also in application to compressed sensing, Garg and Khandekar [4] showed that a thresholded gradient algorithm converges rapidly up to some tolerance; we discuss this result in more detail following our Corollary 2 on this special case of sparse linear models. Unfortunately, for general convex programs with only Lipschitz conditions, the best convergence rates in a global sense using first-order methods are sub-linear. Much faster global rates—in particular, at a linear or geometric rate—can be achieved if global regularity conditions like strong convexity and smoothness are imposed [11]. However, a challenging aspect of statistical estimation in high dimensions is that the underlying optimization problems can never be globally strongly convex when d > n in typical cases (since the d × d Hessian matrix is rank-deficient), and global smoothness conditions cannot hold when d/n →+∞. In this paper, we analyze a simple variant of the composite gradient method due to Nesterov [12] in application to the optimization problems that underlie regularized Mestimators. Our main contribution is to establish a form of global geometric convergence for this algorithm that holds for a broad class of high-dimensional statistical problems. We do so by leveraging the notion of restricted strong convexity, used in recent work by Negahban et al. [8] to derive various bounds on the statistical error in high-dimensional estimation. Our analysis consists of two parts. We first establish that for optimization problems underlying such M-estimators, appropriately modified notions of restricted strong convexity (RSC) and smoothness (RSM) suffice to establish global linear convergence of a first-order method. Our second contribution is to prove that for the iterates generated by our firstorder method, these RSC/RSM assumptions do indeed hold with high probability for a broad class of statistical models, among them sparse linear regression, group-sparse regression, matrix completion, and estimation in generalized linear models. We note in passing that our notion of RSC is related to but slightly different than its previous use for bounding statistical error [8], and hence we cannot use these existing results directly. An interesting aspect of our results is that we establish global geometric convergence only up to the statistical precision of the problem, meaning the typical Euclidean distance ∥bθ −θ∗∥ between the true parameter θ∗and the estimate bθ obtained by solving the optimization problem. Note that this is very natural from the statistical perspective, since it is the true parameter θ∗itself (as opposed to the solution bθ of the M-estimator) that is of primary interest, and our analysis allows us to approach it as close as is statistically possible. Overall, our results reveal an interesting connection between the statistical and computational properties of M-estimators—that is, the properties of the underlying statistical model that make it favorable for estimation also render it more amenable to optimization procedures. The remainder of the paper is organized as follows. In the following section, we give a precise description of the M-estimators considered here, provide definitions of restricted strong convexity and smoothness, and their link to the notion of statistical precision. Section 3 gives a statement of our main result, as well as its corollaries when specialized to various statistical models. Section 4 provides some simulation results that confirm the accuracy of our theoretical predictions. Due to space constraints, we refer the reader to the full-length version of our paper for technical details. 2 Problem formulation and optimization algorithm In this section, we begin by describing the class of regularized M-estimators to which our analysis applies, as well as the optimization algorithms that we analyze. Finally, we describe the assumptions that underlie our main result. 2 A class of regularized M-estimators: Given a random variable Z ∼P taking values in some set Z, let Zn 1 = {Z1, . . . , Zn} be a collection of n observations drawn i.i.d. from P. Assuming that P lies within some indexed family {Pθ, θ ∈Ω}, the goal is to recover an estimate of the unknown true parameter θ∗∈Ωgenerating the data. In order to do so, we consider the regularized M-estimator bθλn ∈arg min θ∈Ω  L(θ; Zn 1 ) + λnR(θ) , (1) where L : Ω×Zn 7→R is a loss function, and R : Ω7→R+ is a non-negative regularizer on the parameter space. Throughout this paper, we assume that the loss function L is convex and differentiable, and that the regularizer R is a norm. In order to assess the quality of an estimate, we measure the error ∥bθλn −θ∗∥in some norm induced by an inner product ⟨·, ·⟩on the parameter space. Typical choices are the standard Euclidean inner product and ℓ2-norm for vectors; the trace inner product and the Frobenius norm for matrices; and the L2(P) inner product and norm for non-parametric regression. As described in more detail in Section 3.2, a variety of estimators—among them the Lasso, structured non-parametric regression in RKHS, and low-rank matrix recovery—can be cast in this form (1). When the data Zn 1 are clear from the context, we frequently use the shorthand L(·) for L(·; Zn 1 ). Composite objective minimization: In general, we expect the loss function L to be differentiable, while the regularizer R can be non-differentiable. Nesterov [12] proposed a simple first-order method to exploit this type of structure, and our focus is a slight variant of this procedure. In particular, given some initialization θ0 ∈Ω, consider the update θt+1 = arg min θ∈BR(ρ)  ⟨∇L(θt), θ⟩+ λnR(θ) + γu 2 ∥θ −θt∥2 2 , for t = 0, 1, 2, . . ., (2) where γu > 0 is a parameter related to the smoothness of the loss function, and BR(ρ) :=  θ ∈Ω| R(θ) ≤ρ (3) is the ball of radius ρ in the norm defined by the regularizer. The only difference from Nesterov’s method is the additional constraint θ ∈BR(ρ), which is required for control of early iterates in the high-dimensional setting. Parts of our theory apply to arbitrary choices of the radius ρ; for obtaining results that are statistically order-optimal, a setting ρ = Θ(R(θ∗)) with θ∗∈BR(ρ) is sufficient, so that fairly conservative upper bounds on R(θ∗) are adequate. Structural conditions in high dimensions: It is known that under global smoothness and strong convexity assumptions, the procedure (2) enjoys a globally geometric convergence rate, meaning that there is some α ∈(0, 1) such that ∥θt −bθ∥= O(αt) for all iterations t = 0, 1, 2, . . . (e.g., see Theorem 5 in Nesterov [12]). Unfortunately, in the high-dimensional setting (d > n), it is usually impossible to guarantee strong convexity of the problem (1) in a global sense. For instance, when the data is drawn i.i.d., the loss function consists of a sum of n terms. The resulting d × d Hessian matrix ∇2L(θ; Zn 1 ) is often a sum of n rank-1 terms and hence rank-degenerate whenever n < d. However, as we show in this paper, in order to obtain fast convergence rates for an optimization method, it is sufficient that (a) the objective is strongly convex and smooth in a restricted set of directions, and (b) the algorithm approaches the optimum bθ only along these directions. Let us now formalize this intuition. Consider the first-order Taylor series expansion of the loss function around the point θ′ in the direction of θ: TL(θ; θ′) := L(θ) −L(θ′) −⟨∇L(θ′), θ −θ′⟩. (4) Definition 1 (Restricted strong convexity (RSC)). We say the loss function L satisfies the RSC condition with strictly positive parameters (γℓ, κℓ, δ) if TL(θ; θ′) ≥γℓ 2 ∥θ −θ′∥2 −κℓδ2 for all θ, θ′ ∈BR(ρ). (5) 3 In order to gain intuition for this definition, first consider the degenerate setting δ = κℓ= 0. In this case, imposing the condition (5) for all θ ∈Ωis equivalent to the usual definition of strong convexity on the optimization set. In contrast, when the pair (δ, κℓ) are strictly positive, the condition (5) only applies to a limited set of vectors. In particular, when θ′ is set equal to the optimum bθ, and we assume that θ belongs to the set C := BR(ρ) ∩  θ ∈Ω| ∥θ −bθ∥2 ≥4κℓ γℓ δ2 , then condition (5) implies that TL(θ; bθ) ≥γℓ 4 ∥θ −bθ∥2 for all θ ∈C. Thus, for any feasible θ that is not too close to the optimum bθ, we are guaranteed strong convexity in the direction θ −bθ. We now specify an analogous notion of restricted smoothness: Definition 2 (Restricted smoothness (RSM)). We say the loss function L satisfies the RSM condition with strictly positive parameters (γu, κu, δ) if TL(θ; bθ) ≤γu 2 ∥θ −bθ∥2 + κuδ2 for all θ ∈BR(ρ). (6) Note that the tolerance parameter δ is the same as that in the definition (5). The additional term κuδ2 is not present in analogous smoothness conditions in the optimization literature, but it is essential in our set-up. Loss functions and statistical precision: In order for these definitions to be sensible and of practical interest, it remains to clarify two issues. First, for what types of loss function and regularization pairs can we expect RSC/RSM to hold? Second, what is the smallest tolerance δ with which they can hold? Past work by Negahban et al. [8] has introduced the class of decomposable regularizers; it includes various regularizers frequently used in M-estimation, among them ℓ1-norm regularization, block-sparse regularization, nuclear norm regularization, and various combinations of such norms. Negahban et al. [8] showed that versions of RSC with respect to θ∗hold for suitable loss functions combined with a decomposable regularizer. The definition of RSC given here is related but slightly different: instead of control in a neighborhood of the true parameter θ∗, we need control over the iterates of an algorithm approaching the optimum bθ. Nonetheless, it can be also be shown that our form of RSC (and also RSM) holds with high probability for decomposable regularizers, and this fact underlies the corollaries stated in Section 3.2. With regards to the choice of tolerance parameter δ, as our results will clarify, it makes little sense to be concerned with choices that are substantially smaller than the statistical precision of the model. There are various ways in which statistical precision can be defined; one natural one is ϵ2 stat := E[∥bθλn −θ∗∥2], where the expectation is taken over the randomness in the data-dependent loss function.1 The statistical precision of various M-estimators under high-dimensional scaling are now relatively well understood, and in the sequel, we will encounter various models for which the RSM/RSC conditions hold with tolerance equal to the statistical precision. 3 Global geometric convergence and its consequences In this section, we first state the main result of our paper, and discuss some of its consequences. We illustrate its application to several statistical models in Section 3.2. 1As written, statistical precision also depends on the choice of λn, but our theory will involve specific choices of λn that are order-optimal. 4 3.1 Guarantee of geometric convergence Recall that bθλn denotes any optimal solution to the problem (1). Our main theorem guarantees that if the RSC/RSM conditions hold with tolerance δ, then Algorithm (2) is guaranteed to have a geometric rate of convergence up to this tolerance. The theorem statement involves the objective function φ(θ) = L(θ) + λnR(θ). Theorem 1 (Geometric convergence). Suppose that the loss function satisfies conditions (RSC) and (RSM) with a tolerance δ and parameters (γℓ, γu, κℓ, κu). Then the sequence {θt}∞ t=0 generated by the updates (2) satisfies ∥θt −bθ∥2 ≤c0  1 −γℓ 4γu t + c1δ2 for all t = 0, 1, 2, . . . (7) where c0 := 2 (φ(0)−φ(bθ)) γℓ , and c1 := 8γu γ2 ℓ 4γℓκℓ γu + κu  . Remarks: Note that the bound (7) consists of two terms: the first term decays exponentially fast with the contraction coefficient α := 1 − γℓ 4γu . The second term is an additive offset, which becomes relevant only for t large enough such that ∥θt −bθ∥2 = O(δ2). Thus, the result guarantees a globally geometric rate of convergence up to the tolerance parameter δ. Previous work has focused primarily on the case of sparse linear regression. For this special case, certain methods are known to be globally convergent at sublinear rates (e.g., [2]), meaning of the type O(1/t2). The geometric rate of convergence guaranteed by Theorem 1 is exponentially faster. Other work on sparse regression [3, 5] has provided geometric rates of convergence that hold once the iterates are close to the optimum. In contrast, Theorem 1 guarantees geometric convergence if the iterates are not too close to the optimum bθ. In Section 3.2, we describe a number of concrete models for which the (RSC) and (RSM) conditions hold with δ ≍ϵstat, which leads to the following result. Corollary 1. Suppose that the loss function satisfies conditions (RSC) and (RSM) with tolerance δ = O(ϵstat) and parameters (γℓ, γu, κℓ, κu). Then T = O log(1/ϵstat) log(4γu/(4γu −γℓ))  (8) steps of the updates (2) ensures that ∥θT −θ∗∥2 = O(ϵ2 stat). In the setting of statistical recovery, since the true parameter θ∗is of primary interest, there is little point to optimizing to a tolerance beyond the statistical precision. To the best of our knowledge, this result—where fast convergence happens when the optimization error is larger than statistical precision—is the first of its type, and makes for an interesting contrast with other local convergence results. 3.2 Consequences for specific statistical models We now consider the consequences of Theorem 1 for some specific statistical models. In contrast to the previous deterministic results, these corollaries hold with high probability. Sparse linear regression: First, we consider the case of sparse least-squares regression. Given an unknown regression vector θ∗∈Rd, suppose that we make n i.i.d. observations of the form yi = ⟨xi, θ∗⟩+ wi, where wi is zero-mean noise. For this model, each observation is of the form Zi = (xi, yi) ∈Rd × R. In a variety of applications, it is natural to assume that θ∗is sparse. For a parameter q ∈[0, 1] and radius Rq > 0, let us define the ℓq “ball” Bq(Rq) :=  θ ∈Rd | d X j=1 |βj|q ≤Rq . (9) Note that q = 0 corresponds to the case of “hard sparsity”, for which any vector β ∈B0(R0) is supported on a set of cardinality at most R0. For q ∈(0, 1], membership in Bq(Rq) enforces a decay rate on the ordered coefficients, thereby modelling approximate sparsity. 5 In order to estimate the unknown regression vector θ∗∈Bq(Rq), we consider the usual Lasso program, with the quadratic loss function L(θ; Zn 1 ) := 1 2n Pn i=1(yi −⟨xi, θ⟩)2 and the ℓ1-norm regularizer R(θ) := ∥θ∥1. We consider the Lasso in application to a random design model, in which each predictor vector xi ∼N(0, Σ); we assume that maxj=1,...,d Σjj ≤1 for standardization, and that the condition number κ(Σ) is finite. Corollary 2 (Sparse vector recovery). Suppose that the observation noise wi is zero-mean and sub-Gaussian with parameter σ, and θ∗∈Bq(Rq), and we use the Lasso program with λn = 2σ q log d n . Then there are universal positive constants ci, i = 0, 1, 2, 3 such that with probability at least 1 −exp(−c3nλ2 n), the iterates (2) with ρ2 = Θ σ2Rq( n log d)q/2 satisfy ∥θt −bθ∥2 2 ≤c0  1 − c2 κ(Σ) t + c1 σ2Rq log d n 1−q/2 | {z } ϵ2 stat for all t = 0, 1, 2, . . .. (10) It is worth noting that the form of statistical error ϵstat given in bound (10) is known to be minimax optimal up to constant factors [13]. In related work, Garg and Khandekar [4] showed that for the special case of design matrices that satisfy the restricted isometry property (RIP), a thresholded gradient method has geometric convergence up to the tolerance ∥w∥2/√n ≈σ. However, this tolerance is independent of sample size, and far larger the statistical error ϵstat if n > log d; moreover, severe conditions like RIP are not needed to ensure fast convergence. In particular, Corollary 2 guarantees guarantees geometric convergence up to ϵstat for many random matrices that violate RIP. The proof of Corollary 2 involves exploiting some random matrix theory results [14] in order to verify that the RSC/RSM conditions hold with high probability (see the full-length version for details). Matrix regression with rank constraints: For a pair of matrices A, B ∈Rm×m, we use ⟨⟨A, B⟩⟩= trace(AT B) to denote the trace inner product. Suppose that we are given n i.i.d. observations of the form yi = ⟨⟨Xi, Θ∗⟩⟩+wi, where wi is zero-mean noise with variance σ2, and Xi ∈Rm×m is an observation matrix. The parameter space is Ω= Rm×m and each observation is of the form Zi = (Xi, yi) ∈Rm×m×R. In many contexts, it is natural to assume that Θ∗is exactly or approximately low rank; applications include collaborative filtering and matrix completion [7, 15], compressed sensing [16], and multitask learning [19, 10, 17]. In order to model such behavior, we let σ(Θ∗) ∈Rm denote the vector of singular values of Θ∗(padded with zeros as necessary), and impose the constraint σ(Θ∗) ∈Bq(Rq). We then consider the M-estimator based on the quadratic loss L(Θ; Zn 1 ) = 1 2n Pn i=1(yi −⟨⟨Xi, Θ⟩⟩)2 combined with the nuclear norm R(Θ) = ∥σ(Θ)∥1 as the regularizer. Various problems can be cast within this framework of matrix regression: • Matrix completion: In this case, observation yi is a noisy version of a randomly selected entry Θ∗ a(i),b(i) of the unknown matrix. It is a special case with Xi = Ea(i)b(i), the matrix with one in position (a(i), b(i)) and zeros elsewhere. • Compressed sensing: In this case, the observation matrices Xi are dense, drawn from some random ensemble, with the simplest being Xi ∈Rm×m with i.i.d. N(0, 1) entries. • Multitask regression: In this case, the matrix Θ∗is likely to be non-square, with the column size m2 corresponding to the dimension of the response variable, and m1 to the number of predictors. Imposing a low-rank constraint on Θ∗is equivalent to requiring that the regression vectors (or columns of the matrix) lie close to a lower-dimensional subspace. See the papers [10, 17] for more details on reformulating this problem as an instance of matrix regression. For each of these problems, it is possible to show that suitable forms of the RSC/RSM conditions will hold with high probability. For the case of matrix completion, the paper [9] establishes a form of RSC useful for controlling statistical error; this argument can be suitably modified to establish related notions of RSC/RSM required for ensuring fast algorithmic convergence. Similar statements apply to the settings of compressed sensing and multi-task 6 regression. For these matrix regression problems, consider the statistical precision ϵ2 mat ≍      Rq  m log m n 1−q/2 for matrix completion Rq  m n 1−q/2 otherwise, rates that (up to logarithmic factors) are known to be minimax-optimal [9, 17]. As dictated by this statistical theory, the regularization parameter should be chosen as λn = cσ q m log m n for matrix completion, and λn = cσp m n otherwise, where c > 0 is a universal positive constant. The following result applies to matrix regression problems for which the RSC/RSM conditions hold with tolerance δ = ϵstat. Corollary 3 (Low-rank matrix recovery). Suppose that σ(Θ∗) ∈Bq(Rq), and the observation noise is zero-mean σ-sub-Gaussian. Then there are universal positive constants c1, c2, c3 such that with probability at least 1−exp(−c3nλ2 n), the iterates (2) with ρ = Θ  ϵmat λn  satisfy |||Θt −Θ∗|||2 F ≤c0νt + c1ϵ2 mat for all t = 0, 1, 2, . . .. Here the contraction coefficient ν ∈(0, 1) is a universal constant, independent of (n, m, Rq), depending on the parameters (γℓ, γu). We refer the reader to the full-length version for specific form taken for different variants of matrix regression. 4 Simulations In this section, we provide some experimental results that confirm the accuracy of our theoretical predictions. In particular, these results verify the predicted linear rates of convergence under the conditions of Corollaries 2 and 3. Sparse regression: We consider a random ensemble of problems, in which each design vector xi ∈Rd is generated i.i.d. according to the recursion x(1) = z1 and x(j) = zj + υxi(j −1) for j = 2, . . . , d, where the zj are N(0, 1), and υ ∈[0, 1) is a correlation parameter. The singular values of the resulting covariance matrix Σ satisfy the bounds σmin(Σ) ≥1/(1+υ)2 and σmax(Σ) ≤ 2 (1−υ)2(1+υ). Note that Σ has a finite condition number for all υ ∈[0, 1); for υ = 0, it is the identity, but it becomes ill-conditioned as υ →1. We recall that in this setting yi = ⟨xi, θ∗⟩+ wi where wi ∼N(0, 1) and θ∗∈Bq(Rq). We study the convergence properties for sample sizes n = αs log d using different values of α. We note that the per iteration cost of our algorithm is n × d. All our results are averaged over 10 random trials. Our first experiment is based on taking the correlation parameter υ = 0, and the ℓq-ball parameter q = 0, corresponding to exact sparsity. We then measure convergence rates for α ∈{1, 1.25, 5, 25} with d = 40000 and s = (log d)2. As shown in Figure 1(a), the procedure fails to converge for α = 1: with this setting, the sample size n is too small for conditions (RSC) and (RSM) to hold, so that a constant step size leads to oscillations without these conditions. For α sufficiently large to ensure RSC/RSM, we observe a geometric convergence of the error ∥θt −bθ∥2, and the convergence rate is faster for α = 25 compared to α = 5, since the RSC/RSM constants are better with larger sample size. On the other hand, we expect the convergence rates to be slower when the condition number of Σ is worse; in addition to address this issue, we ran the same set of experiments with the correlation parameter υ = 0.5. As shown in Figure 1(b), in sharp contrast to the case υ = 0, we no longer observe geometric convergence for α = 1.25, since the conditioning of Σ with υ = 0.5 is much poorer than with the identity matrix. Finally, we also expect optimization to be harder as the sparsity parameter q ∈[0, 1] is increase away from zero. For larger q, larger sample sizes are required to verify the RSC/RSM conditions. Figure 1(c) shows that even with υ = 0, setting α = 5 is required for geometric convergence. Low-rank matrices: We also performed experiments with two different versions of lowrank matrix regression, each time with m2 = 1602. The first setting is a version of compressed sensing with matrices Xi ∈R160×160 with i.i.d. N(0, 1) entries, and we set q = 0, 7 0 50 100 150 200 −8 −6 −4 −2 0 2 Iterations log(∥βt −ˆβ∥2) log error vs. iterations α = 1 α =1.25 α = 5 α = 25 0 50 100 150 200 −10 −8 −6 −4 −2 0 2 Iterations log(∥βt −ˆβ∥2) log error vs. iterations α = 1 α =1.25 α = 5 α = 25 0 50 100 150 200 −8 −6 −4 −2 0 2 Iterations log(∥βt −ˆβ∥2) log error vs. iterations α = 1 α =1.25 α = 5 α = 25 (a) (b) (c) Figure 1. Plot of the log of the optimization error log(∥θt −bθ∥2) in the sparse linear regression problem. In this problem, d = 40000, s = (log d)2, n = αs log d. Plot (a) shows convergence for the exact sparse case with q = 0 and Σ = I (i.e. υ = 0). In panel (b), we observe how convergence rates change for a non-identity covariance with υ = 0.5. Finally plot (c) shows the convergence rates when υ = 0, q = 1. and formed a matrix Θ∗with rank R0 = ⌈log m⌉. We then performed a series of trials with sample size n = αR0 m, with the parameter α ∈{1, 5, 25}. The per iteration cost in this case is n × m2. As seen in Figure 2(a), the general behavior of convergence rates in this problem stays the same as for the sparse linear regression problem: it fails to converge when α is too small, and converges geometrically (with a progressively faster rate) as α increases. Figure 2(b) shows matrix completion also enjoys geometric convergence, for both exactly low-rank (q = 0) and approximately low-rank matrices. 0 50 100 150 200 −8 −6 −4 −2 0 2 Iterations log(∥Θt −ˆΘ∥F ) log error vs. iterations α = 1 α = 5 α =25 0 10 20 30 40 50 60 −5 −4 −3 −2 −1 0 1 Iterations log(∥Θt −ˆΘ∥F ) log error vs. iterations q = 0 q =0.5 q = 1 (a) (b) Figure 2. (a) Plot of log Frobenius error log(|||Θt −bΘ|||F ) versus number of iterations in matrix compressed sensing for a matrix size m = 160 with rank R0 = ⌈log(160)⌉, and sample sizes n = αR0m. For α = 1, the algorithm oscillates whereas geometric convergence is obtained for α ∈{5, 25}, consistent with the theoretical prediction. (b) Plot of log Frobenius error log(|||Θt −bΘ|||F ) versus number of iterations in matrix completion with approximately low rank matrices (q ∈{0, 0.5, 1}), showing geometric convergence. 5 Discussion We have shown that even though high-dimensional M-estimators in statistics are neither strongly convex nor smooth, simple first-order methods can still enjoy global guarantees of geometric convergence. The key insight is that strong convexity and smoothness need only hold in restricted senses, and moreover, these conditions are satisfied with high probability for many statistical models and decomposable regularizers used in practice. Examples include sparse linear regression and ℓ1-regularization, various statistical models with groupsparse regularization, and matrix regression with nuclear norm constraints. Overall, our results highlight that the properties of M-estimators favorable for fast rates in a statistical sense can also be used to establish fast rates for optimization algorithms. Acknowledgements: AA, SN and MJW were partially supported by grants AFOSR09NL184; SN and MJW acknowledge additional funding from NSF-CDI-0941742. 8 References [1] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [2] S. Becker, J. Bobin, and E. J. Candes. Nesta: a fast and accurate first-order method for sparse recovery. Technical report, Stanford University, 2009. [3] K. Bredies and D. A. Lorenz. Linear convergence of iterative soft-thresholding. Journal of Fourier Analysis and Applications, 14:813–837, 2008. [4] R. Garg and R. Khandekar. Gradient descent with sparsification: an iterative algorithm for sparse recovery with restricted isometry property. In ICML, New York, NY, USA, 2009. ACM. [5] E. T. Hale, Y. Wotao, and Y. Zhang. Fixed-point continuation for ℓ1-minimization: Methodology and convergence. SIAM J. on Optimization, 19(3):1107–1130, 2008. [6] S. Ji and J. Ye. An accelerated gradient method for trace norm minimization. In International Conference on Machine Learning, New York, NY, USA, 2009. ACM. [7] Z. Lin, A. Ganesh, J. Wright, L. Wu, M. Chen, and Y. Ma. Fast convex optimization algorithms for exact recovery of a corrupted low-rank matrix. Technical Report UILUENG-09-2214, Univ. Illinois, Urbana-Champaign, July 2009. [8] S. Negahban, P. Ravikumar, M. J. Wainwright, and B. Yu. A unified framework for high-dimensional analysis of M-estimators with decomposable regularizers. In NIPS Conference, Vancouver, Canada, December 2009. Full length version arxiv:1010.2731v1. [9] S. Negahban and M. J. Wainwright. Restricted strong convexity and (weighted) matrix completion: Optimal bounds with noise. Technical report, UC Berkeley, August 2010. arxiv:1009.2118. [10] S. Negahban and M. J. Wainwright. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. Annals of Statistics, To appear. Originally posted as arxiv:0912.5100. [11] Y. Nesterov. Introductory Lectures on Convex Optimization. Kluwer Academic Publishers, New York, 2004. [12] Y. Nesterov. Gradient methods for minimizing composite objective function. Technical Report 76, Center for Operations Research and Econometrics (CORE), Catholic University of Louvain (UCL), 2007. [13] G. Raskutti, M. J. Wainwright, and B. Yu. Minimax rates of estimation for highdimensional linear regression over ℓq-balls. Technical Report arXiv:0910.2042, UC Berkeley, Department of Statistics, 2009. [14] G. Raskutti, M. J. Wainwright, and B. Yu. Restricted eigenvalue conditions for correlated Gaussian designs. Journal of Machine Learning Research, 11:2241–2259, August 2010. [15] B. Recht. A simpler approach to matrix completion. Journal of Machine Learning Research, 2010. Posted as arXiv:0910.0651v2. [16] B. Recht, M. Fazel, and P. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Review, Vol 52(3):471–501, 2010. [17] A. Rohde and A. Tsybakov. Estimation of high-dimensional low-rank matrices. Technical Report arXiv:0912.5338v2, Universite de Paris, January 2010. [18] J. A. Tropp and A. C. Gilbert. Signal recovery from random measurements via orthogonal matching pursuit. IEEE Transactions on Information Theory, 53(12):4655–4666, December 2007. [19] M. Yuan, A. Ekici, Z. Lu, and R. Monteiro. Dimension reduction and coefficient estimation in multivariate linear regression. Journal Of The Royal Statistical Society Series B, 69(3):329–346, 2007. 9
2010
156
3,917
Attractor Dynamics with Synaptic Depression C. C. Alan Fung, K. Y. Michael Wong Hong Kong University of Science and Technology, Hong Kong, China alanfung@ust.hk, phkywong@ust.hk He Wang Tsinghua University, Beijing, China wanghe07@mails.tsinghua.edu.cn Si Wu Institute of Neuroscience, Chinese Academy of Sciences, Shanghai, China siwu@ion.ac.cn Abstract Neuronal connection weights exhibit short-term depression (STD). The present study investigates the impact of STD on the dynamics of a continuous attractor neural network (CANN) and its potential roles in neural information processing. We find that the network with STD can generate both static and traveling bumps, and STD enhances the performance of the network in tracking external inputs. In particular, we find that STD endows the network with slow-decaying plateau behaviors, namely, the network being initially stimulated to an active state will decay to silence very slowly in the time scale of STD rather than that of neural signaling. We argue that this provides a mechanism for neural systems to hold short-term memory easily and shut off persistent activities naturally. 1 Introduction Networks of various types, formed by a large number of neurons through synapses, are the substrate of brain functions. The network structure is the key that determines the responsive behaviors of a network to external inputs, and hence the computations implemented by the neural system. Understanding the relationship between the structure of a neural network and the function it can achieve is at the core of using mathematical models for elucidating brain functions. In the conventional modeling of neuronal networks, it is often assumed that the connection weights between neurons, which model the efficacy of the activities of pre-synaptic neurons on modulating the states of post-synaptic neurons, are constants, or vary only in long-time scales when learning occurs. However, experimental data has consistently revealed that neuronal connection weights change in short time scales, varying from hundreds to thousands of milliseconds (see, e.g., [1]). This is called short-term plasticity (STP). A predominant type of STP is short-term depression (STD), which decreases the connection efficacy when a pre-synaptic neuron fires. The physiological process underlying STD is the depletion of available resources when signals are transmitted from a presynaptic neuron to the post-synaptic one. Is STD simply a by-product of the biophysical process of neural signaling? Experimental and theoretical studies have suggested that this is unlikely to be the case. Instead, STD can play very active roles in neural computation. For instance, it was found that STD can achieve gain control in regulating neural responses to external inputs, realizing Weber’s law [2, 3]. Another example is that STD enables a network to generate transient synchronized population firing, appealing for detecting subtle changes in the environment [4, 5]. The STD of a neuron is also thought to play a role in estimating the information of the pre-synaptic membrane potential from the spikes it receives [6]. From the computational point of view, the time scale of STD resides between fast neural signaling 1 (in the order of milliseconds) and slow learning (in the order of minutes or above), which is the time order of many important temporal operations occurring in our daily life, such as working memory. Thus, STD may serve as a substrate for neural systems to manipulate temporal information in the relevant time scales. In this study, we will further explore the potential role of STD in neural information processing, an issue of fundamental importance but has not been adequately investigated so far. We will use continuous attractor neural networks (CANNs) as working models. CANNs are a type of recurrent networks which hold a continuous family of localized active states [7]. Neutral stability is a key advantage of CANNs, which enables neural systems to update memory states or to track timevarying stimuli smoothly. CANNs have been successfully applied to describe the retaining of shortterm memory, and the encoding of continuous features, such as the orientation, the head direction and the spatial location of objects, in neural systems [8, 9, 10]. CANNs are also shown to provide a framework for implementing population decoding efficiently [11]. We analyze the dynamics of a CANN with STD included, and find that apart from the static bump states, the network can also hold moving bump solutions. This finding agrees with the results reported in the literature [12, 13]. In particular, we find that with STD, the network can have slowdecaying plateau states, that is, the network being stimulated to an active state by a transient input will decay to silence very slowly in the time order of STD rather than that of neural signaling. This is a very interesting property. It implies that STD can provide a mechanism for neural systems to generate short-term memory and shut off activities naturally. We also find that STD retains the neutral stability of the CANN, and enhances the tracking performance of the network to external inputs. 2 The Model Let us consider a one-dimensional continuous stimulus x encoded by an ensemble of neurons. For example, the stimulus may represent the moving direction, the orientation or a general continuous feature of objects extracted by the neural system. Let u(x, t) be the synaptic input at time t to the neurons whose preferred stimulus is x. The range of the possible values of the stimulus is −L/2 < x ≤L/2 and u(x, t) is periodic, i.e., u(x+L) = u(x). The dynamics is particularly convenient to analyze in the limit that the interaction range a is much less than the stimulus range L, so that we can effectively take x ∈(−∞, ∞). The dynamics of 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 τs ∂u(x, t) ∂t = Iext(x, t) + ρ Z ∞ −∞ dx′J(x, x′)p(x′, t)r(x′, t) −u(x, t), (1) where τs is the synaptical transmission delay, which is typically in the order of 2 to 5 ms. J(x, x′) is the base neural interaction from x′ to x. r(x, t) is the firing rate of neurons. It 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], where ρ is the neural density, and k is a positive constant controlling the strength of global inhibition. The global inhibition can be generated by shunting inhibition [14]. The key character 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′) = J0 exp[−(x − x′)2/2a2]/(a √ 2π), where J0 is a constant. The STD coefficient p(x, t) in Eq. (1) takes into account the pre-synaptic STD. It has the maximum value of 1, and decreases with the firing rate of the neuron [15, 16]. Its dynamics is given by τd ∂p(x, t) ∂t = 1 −p(x, t) −p(x, t)τdβr(x, t), (2) where τd is the time constant for synaptic depression, and the parameter β controls the depression effect due to neural firing. The network dynamics is governed by two time scales. The time constants of STD is typically in the range of hundreds to thousands of milliseconds, much larger than that of neural signaling, i.e., τd ≫τs. The interplay between the fast and slow dynamics causes the network to exhibit interesting dynamical behaviors. 2 0 5 10 15 20 -3 -2 -1 0 1 2 3 x t/ s 0.000 0.05400 0.1080 0.1620 0.2160 0.2700 0.3240 0.3780 0.4320 Figure 1: The neural response profile tracks the change of position of the external stimulus from z0 = 0 to 1.5 at t = 0. Parameters: a = 0.5, k = 0.95, β = 0, α = 0.5. -2 0 2 t/τs 0 0.1 0.2 0.3 0.4 0.5 u(x) Figure 2: The profile of u(x, t) at t/τ = 0, 1, 2, · · · , 10 during the tracking process in Fig. 1. 2.1 Dynamics of CANN without Dynamical Synapses It is instructive to first consider the network dynamics when no dynamical synapses are included. This is done by setting β = 0 in Eq. (2), so that p(x, t) = 1 for all t. In this case, the network can support a continuous family of stationary states when the global inhibition is not too strong. Specifically, the steady state solution to Eq. (1) is ˜u(x|z) = u0 exp  −(x −z)2 4a2  , ˜r(x|z) = r0 exp  −(x −z)2 2a2  , (3) where u0 = [1 + (1 −k/kc)1/2]J0/(4ak√π), r0 = [1 + (1 −k/kc)1/2]/(2akρ √ 2π) and kc = ρJ2 0/(8a √ 2π). These stationary states are translationally invariant among themselves and have the Gaussian shape with a free parameter z representing the position of the Gaussian bumps. They exist for 0 < k < kc, kc is thus the critical inhibition strength. Fung et al [17] considered the perturbations of the Gaussian states. They found various distortion modes, each characterized by an eigenvalue representing its rate of evolution in time. A key property they found is that the translational mode has a zero eigenvalue, and all other distortion modes have negative eigenvalues for k < kc. This implies that the Gaussian bumps are able to track changes in the position of the external stimuli by continuously shifting the position of the bumps, with other distortion modes affecting the tracking process only in the transients. An example of the tracking process is shown in Figs. 1 and 2, when an external stimulus with a Gaussian profile is initially centered at z = 0, pinning the center of a Gaussian neuronal response at the same position. At time t = 0, the stimulus shifts its center from z = 0 to z = 1.5 abruptly. The bump moves towards the new stimulus position, and catches up with the stimulus change after a time duration. which is referred to as the reaction time. 3 Dynamics of CANN with Synaptic Depression For clarity, we will first summarize the main results obtained on the network dynamics due to STD, and then present the theoretical analysis in Sec. 4. 3.1 The Phase Diagram In the presence of STD, CANNs exhibit new interesting dynamical behaviors. Apart from the static bump state, the network also supports moving bump states. To construct a phase diagram mapping these behaviors, we first consider how the global inhibition k and the synaptic depression β scale with other parameters. In the steady state solution of Eq. (1), u0 and ρJ0u2 0 should have the same dimension; so are 1−p(x, t) and τdβu0 in Eq. (2). Hence we introduce the dimensionless parameters k ≡k/kc and β ≡τdβ/(ρ2J2 0). The phase diagram obtained by numerical solutions to the network dynamics is shown in Fig. 3. 3 0 0.2 0.4 0.6 0.8 1 k 0 0.02 0.04 0.06 β Static Silent Moving Metastatic or Moving P Figure 3: Phase diagram of the network states. Symbols: numerical solutions. Dashed line: Eq. (10). Dotted line: Eq. (13). Solid line: Gaussian approximation using 11th order perturbation of the STD coefficient. Point P: the working point for Figs. 4 and 7. Parameters: τd/τs = 50, a = 0.5/6, range of the network = [−π, π). We first note that the synaptic depression and the global inhibition plays the same role in reducing the amplitude of the bump states. This can be seen from the steady state solution of u(x, t), which reads u(x) = Z dx′ ρJ(x −x′)u(x′)2 1 + kρ R dx′′u(x′′)2 + τdβu(x′)2 . (4) The third term in the denominator of the integrand arises from STD, and plays the role of a local inhibition that is strongest where the neurons are most active. Hence we see that the silent state with u(x, t) = 0 is the only stable state when either k or β is large. When STD is weak, the network behaves similarly with CANNs without STD, that is, the static bump state is present up to k near 1. However, when β increases, a state with the bump spontaneously moving at a constant velocity comes into existence. Such moving states have been predicted in CANNs [12, 13], and can be associated with traveling wave behaviors widely observed in the neocortex [18]. At an intermediate range of β, both the static and moving states coexist, and the final state of the network depends on the initial condition. When β increases further, only the moving state is present. 3.2 The Plateau Behavior The network dynamics displays a very interesting behavior in the parameter regime when the static bump solution just loses its stability. In this regime, an initially activated network state decays very slowly to silence, in the time order of τd. Hence, although the bump state eventually decays to the silent state, it goes through a plateau region of a slowly decaying amplitude, as shown in Fig. 4. 0 100 200 300 t 0 1 2 3 4 5 maxx ρJ0u(x,t) 0 100 200 300 0 1 2 3 4 5 0 100 200 300 400 500 t 0 0.01 0.02 0.03 0.04 0.05 1-minxp(x,t) 0 100 200 300 400 500 0 0.01 0.02 0.03 0.04 0.05 A A B B Figure 4: Magnitudes of rescaled neuronal input ρJ0u(x, t) and synaptic depression 1 −p(x, t) at (k, β) = (0.95, 0.0085) (point P in Fig. 3) and for initial conditions of types A and B in Fig. 8. Symbols: numerical solutions. Lines: Gaussian approximation using Eqs. (8) and (9). Other parameters: τd/τs = 50, a = 0.5 and x ∈[−π, π). 3.3 Enhanced Tracking Performance The responses of CANNs with STD to an abrupt change of stimulus are illustrated in Fig. 5. Compared with networks without STD, we find that the bump shifts to the new position faster. The extent of improvement in the presence of STD is quantified in Fig. 6. However, when β is too strong, the bump tends to overshoot the target before eventually approaching it. 4 0 10 20 30 t 0 0.5 1 1.5 2 z(t) k = 0.5, β = 0 k = 0.5, β = 0.05 k = 0.5, β = 0.2 Figure 5: The response of CANNs with STD to an abruptly changed stimulus from z0 = 0 to z0 = 1.5 at t = 0. Symbols: numerical solutions. Lines: Gaussian approximation using 11th order perturbation of the STD coefficent. Parameters: τd/τs = 50, α = 0.5, a = 0.5 and x ∈[−π, π). 0 0.02 0.04 0.06 0.08 0.1 β 0.3 0.4 0.5 0.6 0.7 0.8 0.9 v at z = 0.5z0 k = 0.3 k = 0.5 k = 0.7 Figure 6: Tracking speed of the bump at 0.5z0, where z0 is fixed to be 1.5 4 Analysis Despite the apparently complex behaviors of CANNs with STD, we will show in this section that a Gaussian approximation can reproduce the behaviors and facilitate the interpretation of the results. Details are explained in Supplementary Information. We observe that the profile of the bump remains effectively Gaussian in the presence of synaptic depression. On the other hand, there is a considerable distortion of the profile of the synaptic depression, when STD is strong. Yet, to the lowest order approximation, let us approximate the profile of the synaptic depression to be a Gaussian as well, which is valid when STD is weak, as shown in Fig. 7(a). Hence, for a ≪L, we propose the following ansatz u(x, t) = u0(t) exp  −(x −z)2 4a2  , (5) p(x, t) = 1 −p0(t) exp  −(x −z)2 2a2  . (6) When these expressions are substituted into the dynamical equations (1) and (2), other functions f(x) of x appear. To maintain consistency with the Gaussian approximation, these functions will be approximated by their projections onto the Gaussian functions. In Eq. (1), we approximate f(x) ≈ Z dx′ √ 2πa2 f(x′)e−(x′−z)2 4a2  e−(x−z)2 4a2 . (7) Similarly, in Eq. (2), we approximate f(x) by its projection onto exp  −(x −z)2/(2a2)  . 4.1 The Solution of the Static Bumps Without loss of generality, we let z = 0. Substituting Eq. (5) and (6) into Eqs. (1) and (2), and letting u(t) ≡ρJ0u0(t), we get τs du(t) dt = u(t)2 √ 2(1 + ku(t)2/8) " 1 − r 4 7p0(t) # −u(t), (8) τd dp0(t) dt = βu(t)2 1 + ku(t)2/8 " 1 − r 2 3p0(t) # −p0(t). (9) By considering the steady state solution of u and p0 and their stability against fluctuations of u and p0, we find that stable solutions exist when β ≤p0(1 − p 4/7p0)2 4(1 − p 2/3p0) " 1 + τs τd(1 − p 2/3p0) # , (10) 5 when p0 is the steady state solution of Eqs. (1) and (2). The boundary of this region is shown as a dashed line in Fig. 3. Unfortunately, this line is not easily observed in numerical solutions since the static bump is unstable against fluctuations that are asymmetric with respect to its central position. Although the bump is stable against symmetric fluctuations, asymmetric fluctuations can displace its position and eventually convert it to a moving bump. 4.2 The Solution of the Moving Bumps As shown in Fig. 7(b), the profile of a moving bump is characterized by a lag of the synaptic depression behind the moving bump. This is because neurons tend to be less active in locations of low values of p(x, t), causing the bump to move away from locations of strong synaptic depression. In turn, the region of synaptic depression tends to follow the bump. However, if the time scale of synaptic depression is large, the recovery of the synaptic depressed region is slowed down, and cannot catch up with the bump motion. Thus, the bump starts moving spontaneously. To incorporate asymmetry into the moving state, we propose the following ansatz: u(x, t) = u0(t) exp  −(x −vt)2 4a2  , (11) p(x, t) = 1 −p0(t) exp  −(x −vt)2 2a2  + p1(t) exp  −(x −vt)2 2a2  x −vt a  . (12) Projecting the terms in Eq. (1) to the basis functions exp  −(x −vt)2/(4a2)  and exp  −(x −vt)2/(4a2)  (x −vt)/a, and those in Eq. (2) to exp  −(x −vt)2/(2a2)  and exp  −(x −vt)2/(2a2)  (x −vt)/a, we obtain four equations for u, p0, p1 and vτs/a. Real solutions exist only if βu2 1 + ku2/8 ≥A  τd τs −B + sτd τs −B 2 −C   −1 , (13) where A = 7 √ 7/4, B = (7/4)[(5/2) p 7/6 −1], and C = (343/36)(1− p 6/7). As shown in Fig. 3, the boundary of this region effectively coincides with the numerical solution of the line separating the static and moving phases. Note that when τd/τs increases, the static phase shrinks. This is because the recovery of the synaptic depressed region is slowed down, making it harder to catch up with changes in the bump motion. 0.96 0.97 0.98 0.99 1 1.01 1.02 p(x,t) u p -2 0 2 x 0 0.05 0.1 0.15 0.2 0.25 u(x,t) 0.85 0.9 0.95 1 1.05 1.1 p(x,t) u p -2 0 2 x 0 0.1 0.2 0.3 0.4 0.5 0.6 u(x,t) Stationary Moving (a) (b) Figure 7: Neuronal input u(x, t) and the STD coefficient p(x, t) in (a) the static state at (k, β) = (0.9, 0.005), and (b) the moving state at (k, β) = (0.5, 0.015). Parameter: τd/τs = 50. An alternative approach that arrives at Eq. (13) is to consider the instability of the static bump, which is obtained by setting v and p1 to zero in Eqs. (11) and (12). Considering the instability of the static bump against the asymmetric fluctuations in p1 and vt, we again arrive at Eq. (13). This shows that as soon as the moving bump comes into existence, the static bump becomes unstable. This also implies that in the entire region that the static and moving bumps coexist, the static bump is unstable to asymmetric fluctuations. It is stable (or more precisely, metastable) when it is static, but once it is pushed to one side, it will continue to move along that direction. We may call this behavior metastatic. As we shall see, this metastatic behavior is also the cause of the enhanced tracking performance. 4.3 The Plateau Behavior To illustrate the plateau behavior, we select a point in the marginally unstable regime of the silent phase, that is, in the vicinity of the static phase. As shown in Fig. 8, the nullclines of u and p0 6 (du/dt = 0 and dp0/dt = 0 respectively) do not have any intersections as they do in the static phase where the bump state exists. Yet, they are still close enough to create a region with very slow dynamics near the apex of the u-nullcline at (u, p0) = [(8/k)1/2, p 7/4(1 − √ k)]. Then, in Fig. 8, we plot the trajectories of the dynamics starting from different initial conditions. For verification, we also solve the full equations (1) and (2), and plot a flow diagram with the axes being maxx u(x, t) and 1 −minx p(x, t). The resultant flow diagram has a satisfactory agreement with Fig. 8. The most interesting family of trajectories is represented by B and C in Fig. 8. Due to the much faster dynamics of u, trajectories starting from a wide range of initial conditions converge rapidly, in a time of the order τs, to a common trajectory in the close neighborhood of the u-nullcline. Along this common trajectory, u is effectively the steady state solution of Eq. (8) at the instantaneous value of p0(t), which evolves with the much longer time scale of τd. This gives rise to the plateau region of u which can survive for a duration of the order τd. The plateau ends after the trajectory has passed the slow region near the apex of the u-nullcline. This dynamics is in clear contrast with trajectory D, in which the bump height decays to zero in a time of the order τs. Trajectory A represents another family of trajectories having rather similar behaviors, although the lifetimes of their plateaus are not so long. These trajectories start from more depleted initial conditions, and hence do not have chances to get close to the u-nullcline. Nevertheless, they converge rapidly, in a time of order τs, to the band u ≈(8/k)1/2, where the dynamics of u is slow. The trajectories then rely mainly on the dynamics of p0 to carry them out of this slow region, and hence plateaus of lifetimes of the order τd are created. 0 1 2 3 4 5 6 u 0 0.01 0.02 0.03 0.04 0.05 0.06 p0 A B C D Figure 8: Trajectories of network dynamics starting from various initial conditions at (k, β) = (0.95, 0.0085) (point P in Fig. 3). Solid line: u-nullcline. Dashed line: p0-nullcline. Symbols are data points spaced at time intervals of 2τs. 0.6 0.8 1.0 0.00 0.01 0.02 0.03 0.04 0.05 0.06 k 5.500 10.00 20.00 30.00 40.00 60.00 70.00 80.00 100.0 Bumps can sustain here. Figure 9: Contours of plateau lifetimes in the space of k and β. The lines are the two topmost phase boundaries in Fig. 3. In the initial condition, α = 0.5. Following similar arguments, the plateau behavior also exists in the stable region of the static states. This happens when the initial condition of the network lies outside the basin of attraction of the static states, but it is still in the vicinity of the basin boundary. When one goes deeper into the silent phase, the region of slow dynamics between the u- and p0nullclines broadens. Hence plateau lifetimes are longest near the phase boundary between the bump and silent states, and become shorter when one goes deeper into the silent phase. This is confirmed by the contours of plateau lifetimes in the phase diagram shown in Fig. 9 obtained by numerical solution. The initial condition is uniformly set by introducing an external stimulus Iext(x|z0) = αu0 exp[−x2/(4a2)] to the right hand side of Eq. (1), where α is the stimulus strength. After the network has reached a steady state, the stimulus is removed at t = 0, leaving the network to relax. 4.4 The Tracking Behavior To study the tracking behavior, we add the external stimulus Iext (x|z0) = αu0 exp  −(x −z0)2/(4a2)  to the right hand side of Eq. (11), where z0 is the position of the stimulus abruptly changed at t = 0. With this additional term, we solve the modified version of Eqs. (11) and (12), and the solution reproduces the qualitative features due to the presence of synaptic depression, namely, the faster response at weak β, and the overshooting at stronger β. As remarked previously, this is due to the metastatic behavior of the bumps, which enhances their reaction to move from the static state when a small push is exerted. 7 However, when describing the overshooting of the tracking process, the quantitative agreement between the numerical solution and the ansatz in Eqs. (11) and (12) is not satisfactory. We have made improvement by developing a higher order perturbation analysis using basis functions of the quantum harmonic oscillator [17]. As shown in Fig. 5, the quantitative agreement is much more satisfactory. 5 Conclusions and Discussions In this work, we have investigated the impact of STD on the dynamics of a CANN, and found that the network can support both static and moving bumps. Static bumps exist only when the synaptic depression is sufficiently weak. A consequence of synaptic depression is that it places static bumps in the metastatic state, so that its response to changing stimuli is speeded up, enhancing its tracking performance. We conjecture that moving bump states may be associated with traveling wave behaviors widely observed in the neurocortex. A finding in our work with possibly very important biological implications is that STD endows the network with slow-decaying behaviors. When the network is initially stimulated to an active state by an external input, it will decay to silence very slowly after the input is removed. The duration of the plateau is of the time scale of STD rather than neural signaling, and it provides a way for the network to hold the stimulus information for up to hundreds of milliseconds, if the network operates in the parameter regime that the bumps are marginally unstable. This property is, on the other hand, extremely difficult to be implemented in attractor networks without STD. In a CANN without STD, an active state of the network decays to silence exponentially fast or persists forever, depending on the initial activity level of the network. Indeed, how to shut off the activity of a CANN has been a challenging issue that received wide attention in theoretical neuroscience, with solutions suggesting that a strong external input either in the form of inhibition or excitation must be applied (see, e.g., [19]). Here, we show that STD provides a mechanism for closing down network activities naturally and in the desirable duration. We have also analyzed the dynamics of CANNs with STD using a Gaussian approximation of the bump. It describes the phase diagram of the static and moving phases, the plateau behavior, and provides insights on the metastatic nature of the bumps and its relation with the enhanced tracking performance. In most cases, approximating 1 −p(x, t) by a Gaussian profile is already sufficient to produce qualitatively satisfactory results. However, higher order perturbation analysis is required to yield more accurate descriptions of results such as the overshooting in the tracking process (Fig. 5). Besides STD, there are other forms of STP that may be relevant to realizing short-term memory. Mongillo et al. [20] have recently proposed a very interesting idea for achieving working memory in the prefrontal cortex by utilizing the effect of short-term facilitation (STF). Compared with STD, STF has the opposite effect in modifying the neuronal connection weights. The underlying biophysics of STF is the increased level of residual calcium due to neural firing, which increases the releasing probability of neural transmitters. Mongillo et al. [20] showed that STF provides a way for the network to encode the information of external inputs in the facilitated connection weights, and it has the advantage of not having to recruit persistent neural firing and hence is economically efficient. This STF-based memory mechanism is, however, not necessarily contradictory to the STD-based one we propose here. They may be present in different cortical areas for different computational purposes. STD and STF have been observed to have different effects in different cortical areas. One location is the sensory cortex where CANN models are often applicable. Here, the effects of STD tends to be stronger than that of STF. Different from the STF-based mechanism, our work suggests that the STD-based one exhibits the prolonged neural firing, which has been observed in some cortical areas. In terms of information transmission, prolonged neural firing is preferable in the early information pathways, so that the stimulus information can be conveyed to higher cortical areas through neuronal interactions. Hence, it seems that the brain may use a strategy of weighting the effects of STD and STF differentially for carrying out different computational tasks. It is our goal in future work to explore the joint impact of STD and STF on the dynamics of neuronal networks. This work is partially supported by the Research Grants Council of Hong Kong (grant nos. HKUST 603607 and 604008). 8 References [1] H. Markram, Y. Wang and M. Tsodyks, Proc. Natl. Acad. Sci. U.S.A., 95, 5323 (1998). [2] M. Tsodyks and H. Markram, Proc. Natl. Acad. Sci. U.S.A., 94, 719-723 (1997). [3] L. F. Abbott, J. A. Varela, K. Sen and S. B. Nelson, Science, 275, 220-224 (1997). [4] M. Tsodyks, A. Uziel and H. Markram, J. Neurosci., 20, 1-5 (2000). [5] A. Loebel and M. Tsodyks, J. Comput. Neurosci., 13, 111-124 (2002). [6] J.-P. Pfister, P. Dayan, and M. Lengyel, Advances in Neural Information Processing Systems 22, Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta (eds.), 1464 (2009). [7] S. Amari, Biological Cybernetics, 27, 77-87 (1977). [8] R. Ben-Yishai, R. Lev Bar-Or and H. Sompolinsky, Proc. Natl. Acad. Sci. U.S.A., 92, 38443848 (1995). [9] K.-C. Zhang, J. Neurosci., 16, 2112-2126 (1996). [10] A. Samsonovich, and B. L. McNaughton, J. Neurosci., 7, 5900-5920 (1997). [11] S. Deneve, P. E. Latham and A. Pouget, Nature Neuroscience, 2, 740-745 (1999). [12] L. C. York and M. C. W. van Rossum, J. Comput. Neurosci. 27, 607-620 (2009) [13] Z. P. Kilpatrick and P. C. Bressloff, Physica D 239, 547-560 (2010) [14] J. Hao, X. Wang, Y. Dan, M. Poo and X. Zhang, Proc. Natl. Acad. Sci. U.S.A., 106, 2190621911 (2009). [15] M. V. Tsodyks, K. Pawelzik and H. Markram, Neural Comput. 10, 821-835 (1998). [16] R. S. Zucker and W. G. Regehr, Annu. Rev. Physiol. 64, 355-405 (2002). [17] C. C. A. Fung, K. Y. M. Wong and S. Wu, Neural Comput. 22, 752-792 (2010) [18] J. Wu, X. Huang and C. Zhang, The Neuroscientist, 14, 487-502 (2008). [19] B. S. Gutkin, C. R. Laing, C. L. Colby, C. C. Chow and B. G. Ermentrout, J. Comput. Neurosci., 11, 121-134 (2001). [20] G. Mongillo, O. Barak and M. Tsodyks, Science, 319, 1543-1546 (2008). 9
2010
157
3,918
Layer-wise analysis of deep networks with Gaussian kernels Gr´egoire Montavon Machine Learning Group TU Berlin gmontavon@cs.tu-berlin.de Mikio L. Braun Machine Learning Group TU Berlin mikio@cs.tu-berlin.de Klaus-Robert M¨uller Machine Learning Group TU Berlin krm@cs.tu-berlin.de Abstract Deep networks can potentially express a learning problem more efficiently than local learning machines. While deep networks outperform local learning machines on some problems, it is still unclear how their nice representation emerges from their complex structure. We present an analysis based on Gaussian kernels that measures how the representation of the learning problem evolves layer after layer as the deep network builds higher-level abstract representations of the input. We use this analysis to show empirically that deep networks build progressively better representations of the learning problem and that the best representations are obtained when the deep network discriminates only in the last layers. 1 Introduction Local learning machines such as nearest neighbors classifiers, radial basis function (RBF) kernel machines or linear classifiers predict the class of new data points from their neighbors in the input space. A limitation of local learning machines is that they cannot generalize beyond the notion of continuity in the input space. This limitation becomes detrimental when the Bayes classifier has more variations (ups and downs) than the number of labeled samples available. This situation typically occurs on problems where an instance — let’s say, a handwritten digit — can take various forms due to irrelevant variation factors such as its position, its size, its thickness and more complex deformations. These multiple factors of variation can greatly increase the complexity of the learning problem (Bengio, 2009). This limitation motivates the creation of learning machines that can map the input space into a higher-level representation where regularities of higher order than simple continuity in the input space can be expressed. Engineered feature extractors, nonlocal kernel machines (Zien et al., 2000) or deep networks (Rumelhart et al., 1986; LeCun et al., 1998; Hinton et al., 2006; Bengio et al., 2007) can implement these more complex regularities. Deep networks implement them by distorting the input space so that initially distant points in the input space appear closer. Also, their multilayered nature acts as a regularizer, allowing them to share at a given layer features computed at the previous layer (Bengio, 2009). Understanding how the representation is built in a deep network and how to train it efficiently received a lot of attention (Goodfellow et al., 2009; Larochelle et al., 2009; Erhan et al., 2010). However, it is still unclear how their nice representation emerges from their complex structure, in particular, how the representation evolves from layer to layer. The main contribution of this paper is to introduce an analysis based on RBF kernels and on the kernel principal component analysis (kPCA, Sch¨olkopf et al., 1998) that can capture and quantify the layer-wise evolution of the representation in a deep network. In practice, for each layer 1 ≤l ≤L of the deep network, we take a small labeled dataset D, compute its image D(l) at the layer l of the deep network and measure what dimensionality the local model built on top of D(l) must have in order to solve the learning problem with a certain accuracy. 1 input output l = 0 f1 l = 1 f2 l = 2 f3 l = 3 y x y f1(x) y f2(f1(x)) y f3(f2(f1(x))) dimensionality d error e(d) l = 0 l = 1 l = 2 l = 3 layer l error e(do) Figure 1: As we move from the input to the output of the deep network, better representations of the learning problem are built. We measure this improvement with the layer-wise RBF analysis presented in Section 2 and Section 3.2. This analysis relates the prediction error e(d) to the dimensionality d of a local model built at each layer of the deep network. As the data is propagated through the deep network, lower errors are obtained with lower-dimensional local models. The plots on the right illustrate this dynamic where the thick gray arrows indicate the forward path of the deep network and where do is a fixed number of dimensions. We apply this novel analysis to a multilayer perceptron (MLP), a pretrained multilayer perceptron (PMLP) and a convolutional neural network (CNN). We observe in each case that the error and the dimensionality of the local model decrease as we propagate the dataset through the deep network. This reveals that the deep network improves the representation of the learning problem layer after layer. This progressive layer-wise simplification is illustrated in Figure 1. In addition, we observe that the CNN and the PMLP tend to postpone the discrimination to the last layers, leading to more transferable features and better-generalizing representations than for the simple MLP. This result suggests that the structure of a deep network, by enforcing a separation of concerns between lowlevel generic features and high-level task-specific features, has an important role to play in order to build good representations. 2 RBF analysis of a learning problem We would like to quantify the complexity of a learning problem p(y | x) where samples are drawn independently from a probability distribution p(x, y). A simple way to do it is to measure how many degrees of freedom (or dimensionality d) a local model must have in order to solve the learning problem with a certain error e. This analysis relates the dimensionality d of the local model to its prediction error e(d). In practice, there are many ways to define the dimensionality of a model, for example, (1) the number of samples given to the learning machine, (2) the number of required hidden nodes of a neural network (Murata et al., 1994), (3) the number of support vectors of a SVM or (4) the number of leading kPCA components of the input distribution p(x) used in the model. The last option is chosen for the following two reasons: First, the kPCA components are added cumulatively to the prediction model as the dimensionality of the model increases, thus offering stability, while in the case of support vector machines, previously chosen support vectors might be dropped in favor of other support vectors in higher-dimensional models. Second, the leading kPCA components obtained with a finite and typically small number of samples n are similar to those that would be obtained in the asymptotic case where p(x, y) is fully observed (n →∞). This property is shown by Braun (2006) and Braun et al. (2008) in the case of a single kernel, and by extension, in the case of a finite set of kernels. This last property is particularly useful since p(x, y) is unknown and only a finite number of observations are available. The analysis presented here is strongly inspired from the relevant dimensionality estimation (RDE) method of Braun et al. (2008) and is illustrated in Figure 2 for a small two2 d = 1 d = 2 d = 3 d = 4 d = 5 d = 6 e(d) = 0.5 e(d) = 0.25 e(d) = 0.25 e(d) = 0 e(d) = 0 e(d) = 0 Figure 2: Illustration of the RBF analysis on a toy dataset of 12 samples. As we add more and more leading kPCA components, the model becomes more flexible, creating a better decision boundary. Note that with four leading kPCA components out of the 12 kPCA components, all the samples are already classified perfectly. dimensional toy example. In the next lines, we present the computation steps required to estimate the error as a function of the dimensionality. Let {(x1, y1), . . . , (xn, yn)} be a dataset of n points drawn independently from p(x, y) where yi is an indicator vector having value 1 at the index corresponding to the class of xi and 0 elsewhere. Let X = (x1, . . . , xn) and Y = (y1, . . . , yn) be the matrices associated to the inputs and labels of the dataset. We compute the kernel matrix K associated to the dataset: [K]ij = k(xi, xj) where k(x, x′) = exp  −∥x −x′∥2 2σ2  . The kPCA components u1, . . . , un are obtained by performing an eigendecomposition of K where eigenvectors u1, . . . , un have unit length and eigenvalues λ1, . . . , λn are sorted by decreasing magnitude: K = (u1| . . . |un) · diag(λ1, . . . , λn) · (u1| . . . |un)⊤ Let ˆU = (u1| . . . |ud) and ˆΛ = diag(λ1, . . . , λd) be a d-dimensional approximation of the eigendecomposition. We fit a linear model β⋆that maps the projection on the d leading components of the training data to the log-likelihood of the classes β⋆= argminβ|| exp( ˆU ˆU ⊤β) −Y || 2 F where β is a matrix of same size as Y and where the exponential function is applied element-wise. The predicted class log-probability log(ˆy) of a test point (x, y) is computed as log(ˆy) = k(x, X) ˆU ˆΛ−1 ˆU ⊤β⋆+ C where k(x, X) is a matrix of size 1 × n computing the similarities between the new point and each training point and where C is a normalization constant. The test error is defined as: e(d) = Pr(argmax ˆy ̸= argmax y) The training and test error can be used as an approximation bound for the asymptotic case n →∞ where the data would be projected on the real eigenvectors of the input distribution. In the next sections, the training and test error are depicted respectively as dotted and solid lines in Figure 3 and as the bottom and the top of error bars in Figure 4. For each dimension, the kernel scale parameter σ that minimizes e(d) is retained, leading to a different kernel for each dimensionality. The rationale for taking a different kernel for each model is that the optimal scale parameter typically shrinks as more leading components of the input distribution are observed. 3 Methodology In order to test our two hypotheses (the progressive emergence of good representations in deep networks and the role of the structure for postponing discrimination), we consider three deep networks of interest, namely a convolutional neural network (CNN), a multilayer perceptron (MLP) and a variant of the multilayer perceptron pretrained in an unsupervised fashion with a deep belief 3 network (PMLP). These three deep networks are chosen in order to evaluate how the two types of regularizers implemented respectively by the CNN and the PMLP impact on the evolution of the representation layer after layer. We describe how they are built, how they are trained and how they are analyzed layer-wise with the RBF analysis described in Section 2. The multilayer perceptron (MLP) is a deep network obtained by alternating linear transformations and element-wise nonlinearities. Each layer maps an input vector of size m into an output vector of size n and consists of (1) a linear transformation linearm→n(x) = w · x + b where w is a weight matrix of size n × m learned from the data and (2) a non-linearity applied element-wise to the output of the linear transformation. Our implementation of the MLP maps two-dimensional images of 28 × 28 pixels into a vector of size 10 (the 10 possible digits) by applying successively the following functions: f1(x) = tanh(linear28×28→784(x)) f2(x) = tanh(linear784→784(x)) f3(x) = tanh(linear784→784(x)) f4(x) = softmax(linear784→10(x)) The pretrained multilayer perceptron (Hinton et al., 2006) that we abbreviate PMLP in this paper is a variant of the MLP where weights are initialized with a deep belief network (DBN, Hinton et al., 2006) using an unsupervised greedy layer-wise pretraining procedure. This particular weight initialization acts as a regularizer, allowing to learn better-generalizing representation of the learning problem than the simple MLP. The convolutional neural network (CNN, LeCun et al., 1998) is a deep network obtained by alternating convolution filters y = convolvea×b m→n(x) transforming a set of m input features maps {x1, . . . , xm} into a set of n output features maps {yi = Pm j=1 wij ⋆xj + bi , i = 1 . . . , n} where the convolution filters wij of size a × b are learned from data, and pooling units subsampling each feature map by a factor two. Our implementation maps images of 32 × 32 pixels into a vector of size 10 (the 10 possible digits) by applying successively the following functions: f1(x) = tanh(pool(convolve5×5 1→36(x))) f2(x) = tanh(pool(convolve5×5 36→36(x))) f3(x) = tanh(linear5×5×36→400(x)) f4(x) = softmax(linear400→10(x)) The CNN is inspired by the structure of biological visual systems (Hubel and Wiesel, 1962). It combines three ideas into a single architecture: (1) only local connections between neighboring pixels are allowed, (2) the convolution operator applies the same filter over the whole feature map and (3) a pooling mechanism at the top of each convolution filter adds robustness to input distortion. These mechanisms act as a regularizer on images and other types of sequential data, and learn wellgeneralizing models from few data points. 3.1 Training the deep networks Each deep network is trained on the MNIST handwriting digit recognition dataset (LeCun et al., 1998). The MNIST dataset consists of predicting the digit 0 – 9 from scanned handwritten digits of 28 × 28 pixels. We partition randomly the MNIST training set in three subsets of 45000, 5000 and 10000 samples that are respectively used for training the deep network, selecting the parameters of the deep network and performing the RBF analysis. We consider three training procedures: 1. No training: the weights of the deep network are left at their initial value. If the deep network hasn’t received unsupervised pretraining, the weights are set randomly according to a normal distribution N(0, γ−1) where γ denotes for a given layer the number of input nodes that are connected to a single output node. 2. Training on an alternate task: the deep network is trained on a binary classification task that consists of determining whether the digit is original (positive example) or whether it has 4 been transformed by one of the 11 possible rotation/flip combinations that differs from the original (negative example). This problem has therefore 540000 labeled samples (45000 positives and 495000 negatives). The goal of training a deep network on an alternate task is to learn features on a problem where the number of labeled samples is abundant and then reuse these features to learn the target task that has typically few labels. In the alternate task described earlier, negative examples form a cloud around the manifold of positive examples and learning this manifold potentially allows the deep network to learn features that can be transfered to the digit recognition task. 3. Training on the target task: the deep network is trained on the digit recognition task using the 45000 labeled training samples. These procedures are chosen in order to assess the forming of good representations in deep networks and to test the role of the structure of deep networks on different aspects of learning, such as the effectiveness of random projections, the transferability of features from one task to another and the generalization to new samples of the same distribution. 3.2 Applying the RBF analysis to deep networks In this section, we explain how the RBF analysis described in Section 2 is applied to analyze layerwise the deep networks presented in Section 3. Let f = fL◦· · ·◦f1 be the trained deep network of depth L. Let D be the analysis dataset containing the 10000 samples of the MNIST dataset on which the deep network hasn’t been trained. For each layer, we build a new dataset D(l) corresponding to the mapping of the original dataset D to the l first layers of the deep network. Note that by definition, the index zero corresponds to the raw input data (mapped through zero layers): D(l) =  D l = 0 , {(fl ◦· · · ◦f1(x), t) | (x, t) ∈D)} 1 ≤l ≤L . Then, for each dataset D(0), . . . , D(L) we perform the RBF analysis described in Section 2. We use n = 2500 samples for computing the eigenvectors and the remaining 7500 samples to estimate the prediction error of the model. This analysis yields for each dataset D(l) the error as a function of the dimensionality of the model e(d). A typical evolution of e(d) is depicted in Figure 1. The goal of this analysis is to observe the evolution of e(d) layer after layer for the deep networks and training procedures presented in Section 3 and to test the two hypotheses formulated in Section 1 (the progressive emergence of good representations in deep networks and the role of the structure for postponing discrimination). The interest of using a local model to solve the learning problem is that the local models are blind with respect to possibly better representations that could be obtained in previous or subsequent layers. This local scoping property allows for fine isolation of the representations in the deep network. The need for local scoping also arises when “debugging” deep architectures. Sometimes, deep architectures perform reasonably well even when the first layers do something wrong. This analysis is therefore able to detect these “bugs”. The size n of the dataset is selected so that it is large enough to approximate well the asymptotic case (n →∞) but also be small enough so that computing the eigendecomposition of the kernel matrix of size n × n is fast. We choose a set of scale parameters for the RBF kernel corresponding to the 0.01, 0.05, 0.10, 0.25, 0.5, 0.75, 0.9, 0.95 and 0.99 quantiles of the distribution of distances between pairs of data points. 4 Results Layer-wise evolution of the error e(d) is plotted in Figure 3 in the supervised training case. The layer-wise evolution of the error when d is fixed to 16 dimensions is plotted in Figure 4. Both figures capture the simultaneous reduction of error and dimensionality performed by the deep network when trained on the target task. In particular, they illustrate that in the last layers, a few number of dimensions is sufficient to build a good model of the target task. 5 Figure 3: Layer-wise evolution of the error e(d) when the deep network has been trained on the target task. The solid line and the dotted line represent respectively the test error and the training error. As the data distribution is mapped through more and more layers, more accurate and lowerdimensional models of the learning problem can be obtained. From these results, we first demonstrate some properties of deep networks trained on an “asymptotically” large number of samples. Then, we demonstrate the important role of structure in deep networks. 4.1 Asymptotic properties of deep networks When the deep network is trained on the target task with an “asymptotically” large number of samples (45000 samples) compared to the number of dimensions of the local model, the deep network builds representations layer after layer in which a low number of dimensions can create more accurate models of the learning problem. This asymptotic property of deep networks should not be thought of as a statistical superiority of deep networks over local models. Indeed, it is still possible that a higher-dimensional local model applied directly on the raw data performs as well as a local model applied at the output of the deep network. Instead, this asymptotic property has the following consequence: Despite the internal complexity of deep networks a local interpretation of the representation is possible at each stage of the processing. This means that deep networks do not explode the original data distribution into a statistically intractable distribution before recombining everything at the output, but instead, apply controlled distortions and reductions of the input space that preserve the statistical tractability of the data distribution at every layer. 4.2 Role of the structure of deep networks We can observe in Figure 4 (left) that even when the convolutional neural network (CNN) and the pretrained MLP (PMLP) have not received supervised training, the first layers slightly improve the representation with respect to the target task. On the other hand, the representation built by a simple MLP with random weights degrades layer after layer. This observation highlights the structural prior encoded by the CNN: by convolving the input with several random convolution filters and subsampling subsequent feature maps by a factor two, we obtain a random projection of the input data that outperforms the implicit projection performed by an RBF kernel in terms of task relevance. This observation closely relates to results obtained in (Ranzato et al., 2007; Jarrett et al., 2009) where it is observed that training the deep network while keeping random weights in the first layers still allows for good predictions by the subsequent layers. In the case of the PMLP, the successive layers progressively disentangle the factors of variation (Hinton and Salakhutdinov, 2006; Bengio, 2009) and simplify the learning problem. We can observe in Figure 4 (middle) that the phenomenon is even clearer when the CNN and the PMLP are trained on an alternate task: they are able to create generic features in the first layers that transfer well to the target task. This observation suggests that the structure embedded in the CNN and the PMLP enforces a separation of concerns between the first layers that encode lowlevel features, for example, edge detectors, and the last layers that encode high-level task-specific 6 Figure 4: Evolution of the error e(do) as a function of the layer l when do has been fixed to 16 dimensions. The top and the bottom of the error bars represent respectively the test error and the training error of the local model. MLP, alternate task MLP, target task PMLP, alternate task PMLP, target task CNN, alternate task CNN, target task Figure 5: Leading components of the weights (receptive fields) obtained in the first layer of each architecture. The filters learned by the CNN and the pretrained MLP are richer than the filters learned by the MLP. The first component of the MLP trained on the alternate task dominates all other components and prevents good transfer on the target task. features. On the other hand, the standard MLP trained on the alternate task leads to a degradation of representations. This degradation is even higher than in the case of random weights, despite all the prior knowledge on pixel neighborhood contained implicitly in the alternate task. Figure 5 shows that the MLP builds receptive fields that are spatially informative but dissimilar between the two tasks. The fact that receptive fields are different for each task indicates that the MLP tries to discriminate already in the first layers. The absence of a built-in separation of concerns between low-level and high-level feature extractors seems to be a reason for the inability to learn transferable features. It indicates that end-to-end transfer learning on unstructured learning machines is in general not appropriate and supports the recent success of transfer learning on restricted portions of the deep network (Collobert and Weston, 2008; Weston et al., 2008) or on structured deep networks (Mobahi et al., 2009). When the deep networks are trained on the target task, the CNN and the PMLP solve the problem differently as the MLP. In Figure 4 (right), we can observe that the CNN and the PMLP tend to postpone the discrimination to the last layers while the MLP starts to discriminate already in the first layers. This result suggests that again, the structure contained in the CNN and the PMLP enforces a separation of concerns between the first layers encoding low-level generic features and the last layers encoding high-level task-specific features. This separation of concerns might explain the better generalization of the CNN and PMLP observed respectively in (LeCun et al., 1998; Hinton et al., 2006). It also rejoins the findings of Larochelle et al. (2009) showing that the pretraining of the PMLP must be unsupervised and not supervised in order to build well-generalizing representations. 5 Conclusion We present a layer-wise analysis of deep networks based on RBF kernels. This analysis estimates for each layer of the deep network the number of dimensions that is necessary in order to model well a learning problem based on the representation obtained at the output of this layer. 7 We observe that a properly trained deep network creates representations layer after layer in which a more accurate and lower-dimensional local model of the learning problem can be built. We also observe that despite a steady improvement of representations for each architecture of interest (the CNN, the MLP and the pretrained MLP), they do not solve the problem in the same way: the CNN and the pretrained MLP seem to separate concerns by building low-level generic features in the first layers and high-level task-specific features in the last layers while the MLP does not enforce this separation. This observation emphasizes the limitations of black box transfer learning and, more generally, of black box training of deep architectures. References Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. In Advances in Neural Information Processing Systems 19, pages 153–160. MIT Press, 2007. Yoshua Bengio. Learning deep architectures for AI. Foundations and Trends in Machine Learning, 2(1):1–127, 2009. Mikio L. Braun. Accurate bounds for the eigenvalues of the kernel matrix. Journal of Machine Learning Research, 7:2303–2328, Nov 2006. Mikio L. Braun, Joachim Buhmann, and Klaus-Robert M¨uller. On relevant dimensions in kernel feature spaces. Journal of Machine Learning Research, 9:1875–1908, Aug 2008. R. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In International Conference on Machine Learning, ICML, 2008. Dumitru Erhan, Yoshua Bengio, Aaron C. Courville, Pierre-Antoine Manzagol, Pascal Vincent, and Samy Bengio. Why does unsupervised pre-training help deep learning? Journal of Machine Learning Research, 11:625–660, 2010. Ian Goodfellow, Quoc Le, Andrew Saxe, and Andrew Y. Ng. Measuring invariances in deep networks. In Advances in Neural Information Processing Systems 22, pages 646–654, 2009. G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, July 2006. Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. A fast learning algorithm for deep belief nets. Neural Comput., 18(7):1527–1554, 2006. D. H. Hubel and T. N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160:106–154, January 1962. Kevin Jarrett, Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. What is the best multistage architecture for object recognition? In Proc. International Conference on Computer Vision (ICCV’09). IEEE, 2009. Hugo Larochelle, Yoshua Bengio, J´erˆome Louradour, and Pascal Lamblin. Exploring strategies for training deep neural networks. J. Mach. Learn. Res., 10:1–40, 2009. ISSN 1532-4435. Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(1):2278–2324, November 1998. Hossein Mobahi, Ronan Collobert, and Jason Weston. Deep learning from temporal coherence in video. In L´eon Bottou and Michael Littman, editors, Proceedings of the 26th International Conference on Machine Learning, pages 737–744, Montreal, June 2009. Omnipress. Noboru Murata, Shuji Yoshizawa, and Shun ichi Amari. Network information criterion - determining the number of hidden units for an artificial neural network model. IEEE Transactions on Neural Networks, 5:865–872, 1994. Genevieve B. Orr and Klaus-Robert M¨uller, editors. Neural Networks: Tricks of the Trade, this book is an outgrowth of a 1996 NIPS workshop, volume 1524 of Lecture Notes in Computer Science, 1998. Springer. M. A. Ranzato, Fu J. Huang, Y. L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Computer Vision and Pattern Recognition, 2007. CVPR ’07. IEEE Conference on, pages 1–8, 2007. 8 D. E. Rumelhart, G. E. Hinton, and R. J. Williams. Learning representations by back-propagating errors. Nature, 323(6088):533–536, 1986. Bernhard Sch¨olkopf, Alexander Smola, and Klaus-Robert M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Comput., 10(5):1299–1319, 1998. Jason Weston, Fr´ed´eric Ratle, and Ronan Collobert. Deep learning via semi-supervised embedding. In ICML ’08: Proceedings of the 25th international conference on Machine learning, pages 1168– 1175, 2008. Alexander Zien, Gunnar R¨atsch, Sebastian Mika, Bernhard Sch¨olkopf, Thomas Lengauer, and Klaus-Robert M¨uller. Engineering support vector machine kernels that recognize translation initiation sites. Bioinformatics, 16(9):799–807, 2000. 9
2010
158
3,919
Space-Variant Single-Image Blind Deconvolution for Removing Camera Shake Stefan Harmeling, Michael Hirsch, and Bernhard Sch¨olkopf Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany firstname.lastname@tuebingen.mpg.de Abstract Modelling camera shake as a space-invariant convolution simplifies the problem of removing camera shake, but often insufficiently models actual motion blur such as those due to camera rotation and movements outside the sensor plane or when objects in the scene have different distances to the camera. In an effort to address these limitations, (i) we introduce a taxonomy of camera shakes, (ii) we build on a recently introduced framework for space-variant filtering by Hirsch et al. and a fast algorithm for single image blind deconvolution for space-invariant filters by Cho and Lee to construct a method for blind deconvolution in the case of space-variant blur, and (iii), we present an experimental setup for evaluation that allows us to take images with real camera shake while at the same time recording the spacevariant point spread function corresponding to that blur. Finally, we demonstrate that our method is able to deblur images degraded by spatially-varying blur originating from real camera shake, even without using additionally motion sensor information. 1 Introduction Camera shake is a common problem of handheld, longer exposed photographs occurring especially in low light situations, e.g., inside buildings. With a few exceptions such as panning photography, camera shake is unwanted, since it often destroys details and blurs the image. The effect of a particular camera shake can be described by a linear transformation on the sharp image, i.e., the image that would have been recorded using a tripod. Denoting for simplicity images as column vectors, the recorded blurry image y can be written as a linear transformation of the sharp image x, i.e., as y = Ax, where A is an unknown matrix describing the camera shake. The task of blind image deblurring is to recover x given only the blurred image y, but not A. Main contributions. (i) We present a taxonomy of camera shakes; (ii) we propose an algorithm for deblurring space-variant camera shakes; and (iii) we introduce an experimental setup that allows to simultaneously record images blurred by real camera shake and an image of the corresponding spatially varying point spread functions (PSFs). Related work. Our work combines ideas of three papers: (i) Hirsch et al’s work [1] on efficient space-variant filtering, (ii) Cho and Lee’s work [2] on single frame blind deconvolution, and (iii) Krishnan and Fergus’s work [3] on fast non-blind deconvolution. Previous approaches to single image blind deconvolution have dealt only with space-invariant blurs. This includes the works of Fergus et al. [4], Shan et al. [5], as well as Cho and Lee [2] (see Kundur and Hatzinakos [6] and Levin et al. [7] for overviews and further references). Tai et al. [8] represent space-variant blurs as projective motion paths and propose a non-blind deconvolution method. Shan et al. [9] consider blindly deconvolving rotational object motion, yielding a particular form of space-variant PSFs. Blind deconvolution of space-variant blurs in the context 1 of star fields has been considered by Bardsley et al. [10]. Their method estimates PSFs separately (and not simultaneously) on image patches using phase diversity, and deconvolves the overall image using [11]. Joshi et al. [12] recently proposed a method that estimates the motion path using inertial sensors, leading to high-quality image reconstructions. There exists also some work for images in which different segments have different blur: Levin [13] and Cho et al. [14] segment images into layers where each layer has a different motion blur. Both approaches consider uniform object motion, but not non-uniform ego-motion (of the camera). Hirsch et al. [1] require multiple images to perform blind deconvolution with space-variant blur, as do ˇSorel and ˇSroubek [15]. 2 A taxonomy of camera shakes Camera shake can be described from two perspectives: (i) how the PSF varies across the image, i.e., how point sources would be recorded at different locations on the sensor, and (ii) by the trajectory of the camera and how the depth of the scene varies. Throughout this discussion we assume the scene to be static, i.e., only the camera moves (only ego-motion), and none of the photographed objects (no object motion). PSF variation across the image. We distinguish three classes: • Constant: The PSF is constant across the image. In this case the linear transformation is a convolution matrix. Most algorithms for blind deconvolution are restricted to this case. • Smooth: The PSF is smoothly varying across the image. Here, the linear transformation is no longer a convolution matrix, but a more general framework is needed such as the smoothly space-varying filters in the multi-frame method of Hirsch et al. [1]. For this case, our paper proposes an algorithm for single image deblurring. • Segmented: The PSF varies smoothly within segments of the image, but between segments it may change abruptly. Depth variation across the scene. The depth in a scene, i.e., the distance of the camera to objects at different locations in the scene, can be classified into three categories: • Constant: All objects have the same distance to the camera. Example: photographing a picture hanging on the wall. • Smooth: The distance to the camera is smoothly varying across the scene. Example: photographing a wall at an angle. • Segmented: The scene can be segmented into different objects each having a different distance to the camera. Example: photographing a scene with different objects partially occluding each other. Camera trajectories. The motion of the camera can be represented by a six dimensional trajectory with three spatial and three angular coordinates. We denote the two coordinates inside the sensor plane as a and b, the coordinate corresponding to the distance to the scene as c. Furthermore, α and β describe the camera tilting up/down and left/right, and γ the camera rotation around the optical axis. It is instructive to picture how different trajectories correspond to different PSF variations in different depth situations. Exemplarily we consider the following trajectories: • Pure shift: The camera moves inside the sensor plane without rotation; only a and b vary. • Rotated shift: The camera moves inside the sensor plane with rotation; a, b, and γ vary. • Back and forth: The distance between camera and scene is changing; only c varies. • Pure tilt: The camera is tilted up and down and left and right; only α and β vary. • General trajectory: All coordinates might vary as a function of time. Table 1 shows all possible combinations. Note that only “pure shifts” in combination with “constant depths” lead to a constant PSF across the image, which is the case most methods for camera unshaking are proposed for. Thus, extending blind deconvolution to smoothly space-varying PSFs can increases the range of possible applications. Furthermore, we see that for segmented scenes, camera shake usually leads to blurs that are non-smoothly changing across the image. Even though 2 Pure shift Rotated shift Back and forth Pure tilt General trajectory Constant depth constant smooth smooth smooth smooth Smooth depth smooth smooth smooth smooth smooth Segmented depth segmented segmented segmented segmented segmented Table 1: How the PSF varies for different camera trajectories and for different depth situations. in this case the model of smoothly varying PSFs is incorrect, it might still lead to better results than constant PSFs. 3 Smoothly varying PSF as Efficient Filter Flow To obtain a generalized image deblurring method we represent the linear transformation y = Ax by the recently proposed efficient filter flow (EFF) method of Hirsch et al. [1] that can handle smoothly varying PSFs. For convenience, we briefly describe EFF, using the notation and results from [1]. Space-invariant filters. As our starting point we consider space-invariant filters (aka convolutions), which are an efficient, but restrictive class of linear transformations. We denote by y the recorded image, represented as a column vector of length m, and by a a column vector of length k, representing the space-invariant PSF, and by x the true image, represented as a column vector of length n = m + k −1 (we consider the valid part of the convolution). Then the usual convolution can be written as yi = Pk−1 j=0 ajxi−j for 0 ≤i < m. This transformation is linear in x, and thus an instance of the general linear transformation y = Ax, where the column vector a parametrizes the transformation matrix A. Furthermore, the transformation is linear in a, which implies that there exists a matrix X such that y = Ax = Xa. Using fast Fourier transforms (FFTs), these matrixvector-multiplications (MVMs) can be calculated in O(n log n). Space-variant filters. Although being efficient, the (space-invariant) convolution applies only to camera shakes which are pure shifts of flat scenes. This is generalized to space-variant filtering by employing Stockham’s overlap-add (OLA) trick [16]. The idea is (i) to cover the image with overlapping patches, (ii) to apply to each patch a different PSF, and (iii) to add the patches to obtain a single large image. The transformation can be written as yi = p−1 X r=0 k−1 X j=0 a(r) j w(r) i−j xi−j for 0 ≤i < m where p−1 X r=0 w(r) i = 1 for 0 ≤i < m. (1) Here, w(r) ≥0 smoothly fades the r-th patch in and masks out the others. Note that at each pixel the sum of the weights must sum to one. Note that this method does not simply apply a different PSF to different image regions, but instead yields a different PSF for each pixel. The reason is that usually, the patches are chosen to overlap at least 50%, so that the PSF at a pixel is a certain linear combination of several filters, where the weights are chosen to smoothly blend filters in and out, and thus the PSF tends to be different at each pixel. Fig. 1 shows that a PSF array as small as 3 × 3, corresponding to p = 9 and nine overlapping patches (right panel of the bottom row), can parametrize smoothly varying blurs (middle column) that closely mimic real camera shake (left column). Efficient implementation. As is apparent from Eq. (1), EFF is linear in x and in a, the vector obtained by stacking a(0), . . . , a(p−1). This implies that there exist matrices A and X such that y = Ax = Xa. Using Stockham’s ideas [16] to speed-up large convolutions, Hirsch et al. derive expressions for these matrices, namely A = ZT y p−1 X r=0 CT r F H Diag(FZaa(r))FCr Diag(w(r)), (2) X = ZT y p−1 X r=0 CT r F H Diag FCr Diag(w(r))x  FZaBr, (3) where Diag(w(r)) is the diagonal matrix with vector w(r) along its diagonal, Cr is a matrix that crops out the r-th patch, F is the discrete Fourier transform matrix, Za is a matrix that zero-pads 3 hand shaked photo of grid artificially blurred grid PSFs used for artificial blur Figure 1: A small set of PSFs can parametrize smoothly varying blur: (left) grid photographed with real camera shake, (middle) grid blurred by the EFF framework parametrized by nine PSFs (right). a(r) to the size of the patch, F H performs the inverse Fourier transform, ZT y chops out the valid part of the space-variant convolution. Reading Eqs. (2) and (3) forward and backward yields efficient implementations for A, AT, X, and XT with running times O(n log q) where q is the patch size, see [1] for details. The overlap increases the computational cost by a constant factor and is thus omitted. The EFF framework thus implements space-variant convolutions which are as efficient to compute as space-invariant convolutions, while being much more expressive. Note that each of the MVMs with A, AT, X, and XT is needed for blind deconvolution: A and AT for the estimation of x given a, and X and XT for the estimation of a. 4 Blind deconvolution with smoothly varying PSF We now outline a single image blind deconvolution algorithm for space-variant blur, generalizing the method of Cho and Lee [2], that aims to recover a sharp image in two steps: (i) first estimate the parameter vector a of the EFF transformation, and (ii) then perform space-variant non-blind deconvolution by running a generalization of Krishnan and Fergus’ algorithm [3]. (i) Estimation of the linear transformation: initializing x with the blurry image y, the estimation of the linear transformation A parametrized as an EFF, is performed by iterating over the following four steps: • Prediction step: remove noise in flat regions of x by edge-preserving bilateral filtering and overemphasize edges by shock filtering. To counter enhanced noise by shock filtering, we apply spatially adaptive gradient magnitude thresholding. • PSF estimation step: update the PSFs given the blurry image y and the current estimate of the predicted x, using only the gradient images of x (resulting in a preconditioning effect) and enforcing smoothness between neighboring PSFs. • Propagation step: identify regions of poorly estimated PSFs and replace them with neighboring PSFs. • Image estimation step: update the current deblurred image x by minimizing a leastsquares cost function using a smoothness prior on the gradient image. (ii) Non-blind deblurring: given the linear transformation we estimate the final deblurred image x by alternating between the following two steps: • Latent variable estimation: estimate latent variables regularized with a sparsity prior that approximate the gradient of x. This can be efficiently solved with look-up tables, see “w sub-problem” of [3] for details. • Image estimation step: update the current deblurred image x by minimizing a leastsquares cost function while penalizing the Euclidean norm of the gradient image to the latent variables of the previous step, see “x sub-problem” of [3] for details. The steps of (i) are repeated seven times on each scale of a multi-scale image pyramid. We always start with flat PSFs of size 3 × 3 pixels and the correspondingly downsampled observed image. For up- and downsampling we employ a simple linear interpolation scheme. The resulting PSFs in a 4 and the resulting image x at each scale are upsampled and initialize the next scale. The final output of this iterative procedure are the PSFs that parametrize the spatially varying linear transformation. Having obtained an estimate for the linear transformation in form of an array of PSFs, the alternating steps of (ii) perform space variant non-blind deconvolution of the recorded image y using a natural image statistics prior (as in [13]). To this end, we adapt the recently proposed method of Krishnan and Fergus [3] to deal with linear transformations represented as EFF. While our procedure is based on Cho and Lee’s [2] and Krishnan and Fergus’ [3] methods for space-invariant single blind deconvolution, it differs in several important aspects which we presently explain. Details of the Prediction step. The prediction step of Cho and Lee [2] is a clever trick to avoid the nonlinear optimizations which would be necessary if the image features emphasized by the nonlinear filtering operations (namely shock and bilateral filtering and gradient magnitude thresholding) would have to be implemented by an image prior on x. Our procedure also profits from this trick and we set the hyper-parameters exactly as Cho and Lee do (see [2] for details on the nonlinear filtering operations). However, we note that for linear transformations represented as EFF, the gradient thresholding must be applied spatially adaptive, i.e., on each patch separately. This is necessary because otherwise a large gradient in some region might totally wipe out the gradients in regions that are less textured, leading to poor PSF estimates in those regions. Details on the PSF estimation step. Given the thresholded gradient images of the nonlinear filtered image x as the output of the prediction step, the PSF estimation minimizes a regularized leastsquares cost function, X z ∥∂zy −A∂zx∥2 + λ∥a∥2 + νg(a), (4) where z ranges over the set {h, v, hh, vv, hv}, i.e., the first and second, horizontal and vertical derivatives of y and x are considered. Omitting the zeroth derivative (i.e., the images x and y themselves) has a preconditioning effect as discussed in Cho and Lee [2]. Matrix A depends on the vector of PSFs a as well. For the EFF framework we added the regularization term g(a) which encourages similarity between neighboring PSFs, g(a) = p−1 X r=0 X s∈N(r) ∥a(r) −a(s)∥2, (5) where s ∈N(r) if patches r and s are neighbors. Details on the Propagation step. Since high-frequency information, i.e. image details are required for PSF estimation, for images with less structured areas (such as sky) we can not estimate reasonable PSFs everywhere. The problem stems from the finding that even though some area might be less informative about the local PSF, it can look blurred, and thus would require deconvolution. These areas are identified by thresholding the entropy of the corresponding PSFs (similar to ˇSorel and ˇSroubek [15]). The rejected PSFs are replaced by the average of their neighboring PSFs. Since there might be areas for which the neighboring PSFs have been rejected as well, we perform a simple recursive procedure which propagates the accepted PSFs to the rejected ones. Details on the Image estimation step. In both Cho and Lee’s and also in Krishnan and Fergus’ work, the image estimation step involves direct deconvolution which corresponds to a simple pixelwise divison of the blurry image by the zero-padded PSF in Fourier domain. Unfortunately, a direct deconvolution does not exist in general for linear transformations represented as EFF, since it involves summations over patches. However, we can replace the direct deconvolution by an optimization of some regularized least-squares cost function ∥y −Ax∥2 + α∥∇x∥p. While estimating the linear transformation in (i), the regularizer is Tikhonov on the gradient image, i.e., p = 2. As the estimated x is subsequently processed in the prediction step, one might consider regularization redundant in the image estimation step of (i). However, the regularization is crucial for suppressing ringing due to insufficient estimation of a. In (ii) during the final non-blind deblurring procedure we employ a sparsity prior for x by choosing p = 1/2. The main difference in the image estimation steps to [2] and [3] is that the linear transformation A is no longer a convolution but instead a space-variant filter implemented by the EFF framework. 5 → → ⇒ → → (a) (b) (c) (d) Figure 2: How to simultaneously capture an image blurred with real camera shake and its spacevarying PSF; (a) the true image and a grid of dots is combined to (b) an RBG image, that is (c) photographed with camera shake, and (d) split into blue and red channel to separate the PSF depicting the blur and the blurred image. 5 Experiments We present results on several example images with space-variant blur, for which we are able to recover a deblurred image, while a state-of-the-art method for single image blind deconvolution does not. We begin by describing the image capture procedure. Capturing a gray scale image blurred with real camera shake along with the set of spatially varying PSFs. The idea is to create a color image where the gray scale image is shown in the red channel, a grid of dots (for recording the PSFs) is shown in the blue channel, and the green channel is set to zero. We display the resulting RBG image on a computer screen and take a photo with real hand shake. We split the recorded raw image into the red and blue part. The red part only shows the image blurred with camera shake and the blue part shows the spatially varying PSFs that depict the effect of the camera shake. To avoid a Moir´e effect the distance between the camera and the computer screen must be chosen carefully such that the discrete structure of the computer screen can not be resolved by the (discrete) image sensor of the camera. We verified that the spectral characteristics of the screen and the camera’s Bayer array filters are such that there is no cross-talk, i.e., the blue PSFs are not visible in the red image. Fig. 2 shows the whole process. Three example images with real camera shake. We applied our method, Cho and Lee’s [2] method, and a custom patch-wise variant of Cho and Lee to three examples captured as explained above. For all experiments, photos were taken with a hand-held Canon EOS 1000D digital single lens reflex camera with a zoom lens (Canon zoom lens EF 24-70 mm 1:2.8 L USM). The exposure time was 1/4 second, the distance to the screen was about two meters. The input to the deblurring algorithm was only the red channel of the RAW file which we treat as if it were a captured gray-scale image. The image sizes are: vintage car 455 × 635, butcher shop 615 × 415, elephant 625 × 455. To assess the accuracy of estimating the linear transformation (i.e., of step (i) in Sec. 4), we compare our estimated PSFs evaluated on a regular grid of dots to the true PSFs recorded in the blue channel during the camera shake. This comparison has been made for the vintage car example and is included in the supplementary material. We compare with Cho and Lee’s [2] method which we consider currently the state-of-art method for single image blind deconvolution. This method assumes space-invariant blurs, and thus we also compare to a modified version of this algorithm that is applied to the patches of our method and that finally blends the individually deblurred patches carefully to one final output image. Fig 3 shows from top to bottom, the blurry captured image, the result of our method, Cho and Lee’s [2] result, and a patch-wise variant of Cho and Lee. In our method we used for the linear transformation estimation step (step (i) in Sec. 4) for all examples the hyper-parameters detailed in [2]. Our additional hyper-parameters were set as follows: the regularization constant ν weighting the regularization term in cost function (4) that measures the similarity between neighboring PSFs is set to 5e4 for all three examples. The entropy threshold for identifying poorly estimated PSFs is set to 0.7, with the entropy normalized to range between zero and one. In all experiments, the size of a single PSF kernel is allowed to be 15 × 15 pixels. The space-variant blur was modelled for the 6 Hand-shaked photo Our result Cho and Lee [14] Patchwise Cho and Lee Butcher Shop Vintage Car Elephant Figure 3: Deblurring results and comparison. vintage car example by an array of 6 × 7 PSF kernels, for butcher shop by an array of 4 × 6 PSF kernels, and for the elephant by an array of 5 × 6 PSF kernels. These setting were also used for the patch-wise Cho and Lee variant. For the blending function w(r) in Eq. (1) we used a BartlettHanning window with 75% overlap in the vintage car example and 50% in the butcher shop and elephant example. We choose for the vintage car a larger overlap to keep the patch size reasonably large. For the final non-blind deconvolution (step (ii) in Sec. 4) hyper-parameter α was set to 2e3 and p was set to 0.5. On the three example images our algorithm took about 30 minutes for space-variant image restoration. In summary, our experiments show that our method is able to deblur space-variant blurs that are too difficult for Cho and Lee’s method. Especially, our results reveal greater detail and less restoration artifacts, especially noticeable in the regions of the closeup views. Interesting is the comparison with the patch-wise version of Cho and Lee: looking at the details (such as the house number 117 at the butcher shop, the licence plate of the vintage car, or the trunk of the elephant) our method is better. At the door frame in the vintage car image, we see that the patch-wise version of Cho and Lee has alignment problems. Our experience was that this gets more severe for larger blur kernels. 7 Blurry image Our result Joshi et al. [12] Shan et al. [5] Fergus et al.[18] Figure 4: Our blind method achieves results comparable to Joshi et al. [12] who additionally require motion sensor information which we do not use. All images apart from our own algorithm’s results are taken from [12]. This figure is best viewed on screen rather than in print. Comparison with Joshi et al.’s recent results. Fig. 4 compares the results from [12] with our method on their example images. Even though our method does not exploit the motion sensor data utilized by Joshi et al. we obtain comparable results. Run-time. The running times of our method is about 30 minutes for the images in Fig. 3 and about 80 minutes on the larger images of [12] (1123 × 749 pixels in size). How does this compare with Cho and Lee’s method for fast deblurring, which works in seconds? There are several reasons for the discrepancy: (i) Cho and Lee implemented their method using the GPU, while our implementation is in Matlab, logging lots of intermediate results for debugging and studying the code behaviour. (ii) A space-variant blur has more parameters, e.g. for 6 by 7 patches we need to estimate 42 times as many parameters as for a single kernel. Even though calculating the forward model is almost as fast as for the single kernel, convergence for that many parameters appeared to be slower. (iii) Cho and Lee are able to use direct deconvolution (division in Fourier space) for the image estimation step, while we have to solve an optimization problem, because we currently do not know how to perform direct deconvolution for the space-variant filters. 6 Discussion Blind deconvolution of images degraded by space-variant blur is a much harder problem than simply assuming space-invariant blurs. Our experiments show that even state-of-the-art algorithms such as Cho and Lee’s [2] are not able to recover image details for such blurs without unpleasant artifacts. We have proposed an algorithm that is able to tackle space-variant blurs with encouraging results. Presently, the main limitation of our approach is that it can fail if the blurs are too large or if they vary too quickly across the image. We believe there are two main reasons for this: (i) on the one hand, if the blurs are large, the patches need to be large as well to obtain enough statistics for estimating the blur. On the other hand, if at the same time the PSF is varying too quickly, the patches need to be small enough. Our method only works if we can find a patch size and overlap setting that is a good trade-off for both requirements. (ii) The method of Cho and Lee [2], which is an important component of ours, does not work for all blurs. For instance, a PSF that looks like a thick horizontal line is challenging, because the resulting image feature might be misunderstood by the prediction step to be horizontal lines in the image. Improving the method of Cho and Lee [2] to deal with such blurs would be worthwhile. Another limitation of our method are image areas with little structure. On such patches it is difficult to infer a reasonable blur kernel, and our method propagates the results from the neighboring patches to these cases. However, this propagation is heuristic and we hope to find a more rigorous approach to this problem in future work. 8 References [1] M. Hirsch, S. Sra, B. Sch¨olkopf, and S. Harmeling. Efficient Filter Flow for Space-Variant Multiframe Blind Deconvolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2010. [2] S. Cho and S. Lee. Fast Motion Deblurring. ACM Transactions on Graphics (SIGGRAPH ASIA 2009), 28(5), 2009. [3] D. Krishnan and R. Fergus. Fast image deconvolution using hyper-Laplacian priors. In Advances in Neural Information Processing Systems (NIPS), 2009. [4] R. Fergus, B. Singh, A. Hertzmann, S.T. Roweis, and W.T. Freeman. Removing camera shake from a single photograph. In ACM SIGGRAPH, page 794. ACM, 2006. [5] Q. Shan, J. Jia, and A. Agarwala. High-quality motion deblurring from a single image. ACM Transactions on Graphics (SIGGRAPH), 2008. [6] D. Kundur and D. Hatzinakos. Blind image deconvolution. IEEE Signal Processing Mag., 13(3):43–64, May 1996. [7] A. Levin, Y. Weiss, F. Durand, and W.T. Freeman. Understanding and evaluating blind deconvolution algorithms. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2009. [8] Y. W. Tai, P. Tan, L. Gao, and M. S. Brown. Richardson-Lucy deblurring for scenes under projective motion path. Technical report, KAIST, 2009. [9] Qi Shan, Wei Xiong, and Jiaya Jia. Rotational motion deblurring of a rigid object from a single image. In Proc. Int. Conf. on Computer Vision, 2007. [10] J. Bardsley, S. Jeffries, J. Nagy, and B. Plemmons. A computational method for the restoration of images with an unknown, spatially-varying blur. Optics Express, 14(5):1767–1782, 2006. [11] J.G. Nagy and D.P. O’Leary. Restoring images degraded by spatially variant blur. SIAM Journal on Scientific Computing, 19(4):1063–1082, 1998. [12] N. Joshi, S.B. Kang, C.L. Zitnick, and R. Szeliski. Image deblurring using inertial measurement sensors. In ACM SIGGRAPH 2010 Papers. ACM, 2010. [13] A. Levin. Blind motion deblurring using image statistics. In Advances in Neural Information Processing Systems (NIPS), 2006. [14] S. Cho, Y. Matsushita, and S. Lee. Removing non-uniform motion blur from images. In IEEE 11th International Conference on Computer Vision, 2007, 2007. [15] M. ˇSorel and F. ˇSroubek. Space-variant deblurring using one blurred and one underexposed image. In Proceedings of the International Conference on Image Processing (ICIP), 2009. [16] T.G. Stockham Jr. High-speed convolution and correlation. In Proceedings of the Spring joint computer conference, pages 229–233. ACM, 1966. [17] N. Joshi, R. Szeliski, and D.J. Kriegman. Image/video deblurring using a hybrid camera. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [18] R. Fergus, B. Singh, A. Hertzmann, S.T. Roweis, and W.T. Freeman. Removing camera shake from a single image. ACM Transactions on Graphics (SIGGRAPH), 2006. 9
2010
159
3,920
Large Margin Multi-Task Metric Learning Shibin Parameswaran Department of Electrical and Computer Engineering University of California, San Diego La Jolla, CA 92093 sparames@ucsd.edu Kilian Q. Weinberger Department of Computer Science and Engineering Washington University in St. Louis St. Louis, MO 63130 kilian@wustl.edu Abstract Multi-task learning (MTL) improves the prediction performance on multiple, different but related, learning problems through shared parameters or representations. One of the most prominent multi-task learning algorithms is an extension to support vector machines (svm) by Evgeniou et al. [15]. Although very elegant, multi-task svm is inherently restricted by the fact that support vector machines require each class to be addressed explicitly with its own weight vector which, in a multi-task setting, requires the different learning tasks to share the same set of classes. This paper proposes an alternative formulation for multi-task learning by extending the recently published large margin nearest neighbor (lmnn) algorithm to the MTL paradigm. Instead of relying on separating hyperplanes, its decision function is based on the nearest neighbor rule which inherently extends to many classes and becomes a natural fit for multi-task learning. We evaluate the resulting multi-task lmnn on real-world insurance data and speech classification problems and show that it consistently outperforms single-task kNN under several metrics and state-of-the-art MTL classifiers. 1 Introduction Multi-task learning (MTL) [6, 8, 19] refers to the joint training of multiple problems, enforcing a common intermediate parameterization or representation. If the different problems are sufficiently related, MTL can lead to better generalization and benefit all of the tasks. This phenomenon has been examined further by recent papers which have started to build a theoretical foundation that underpins these initial empirical findings [1, 2, 3]. A well-known application of MTL occurs within the realm of speech recognition. The way different people pronounce the same words differs greatly based on their gender, accent, nationality or other individual characteristics. One can view each possible speaker, or clusters of speakers, as different learning problems that are highly related. Ideally, a speech recognition system should be trained only on data from the user it is intended for. However, annotated data is expensive and difficult to obtain. Therefore, it is highly beneficial to leverage the similarities of data sets from different types of speakers while adapting to the specifics of each particular user [13, 16]. One particularly successful instance of multi-task learning is its adaptation to support vector machines (svm) [14, 15]. Support vector machines are arguably amongst the most successful classification algorithms of all times, however their multi-class extensions such as one-vs-all [4] or clever refinements of the loss functions [10, 21] all require at least one weight vector per class label. As a consequence, the MTL adaptation of svm [15] requires all tasks to share an identical set of labels (or require side-information about task dependencies) for meaningful tranfer of knowledge. This is a serious limitation in many domains (binary or non-binary) where different tasks might not share the same classes (e.g. identifying multiple diseases from a particular patient data). Recently, Weinberger et al. introduced Large Margin Nearest Neighbor (lmnn) [20], an algorithm that translates the maximum margin learning principle behind svms to k-nearest neighbor classification (kNN) [9]. Similar to svms, the solution of lmnn is also obtained through a convex optimization problem that maximizes a large margin 1 between input vectors from different classes. However, instead of positioning a separating hyperplane, lmnn learns a Mahalanobis metric. Weinberger et al. show that the lmnn metric improves the kNN classification accuracy to be en par with kernelized svms [20] . One advantage that the kNN decision rule has over hyperplane classifiers is its agnosticism towards the number of class labels of a particular data set. A new test point is classified by the majority label of its k closest neighbors within a known training data set — additional classes require no special treatment. We follow the intuition of Evgeniou et al. [15] and extend lmnn to the multitask setting. Our algorithm learns one metric that is shared amongst all the tasks and one specific metric unique to each task. We show that the combination is still a well-defined pseudo-metric that can be learned in a single convex optimization problem. We demonstrate on several multi-task settings that these shared metrics significantly reduce the overall classification error. Further, our algorithm tends to outperform multi-task neural networks [6] and svm [15] on tasks with many class-labels. To our knowledge, this paper introduces the first multi-task metric learning algorithm for the kNN rule that explicitly models the commonalities and specifics of different tasks. 2 Large Margin Nearest Neighbor local neighborhood Euclidean Metric margin M Mahalanobis Metric Similarly labeled (target neighbor) Differently labeled (impostor) Differently labeled (impostor) xi xi Figure 1: An illustration of a data set before and after lmnn. The circles represent points of equal distance to the vector xi. The Mahalanobis metric rescales directions to push impostors further away than target neighbors by a large margin. This section describes the large margin nearest neighbor algorithm as introduced in [20]. For now, we will focus on a single-task learning framework, with a training set consisting of n examples of dimensionality d, {(xi, yi)}n i=1, where xi ∈Rd and yi ∈{1, 2, ..., c}. Here, c denotes the number of classes. The Mahalanobis distance between two inputs xi and xj is defined as dM(xi, xj) = q (xi −xj)⊤M(xi −xj), (1) where M is a symmetric positive definite matrix (M ⪰0). The definition in eq. (1) reduces to the Euclidean metric if we set M to the identity matrix, i.e. M = I. The lmnn algorithm learns the matrix M for the Mahalanobis metric1 in eq. (1) explicitly to enhance k-nearest neighbor classification. Lmnn mimics the non-continuous and nondifferentiable leave-one-out classification error of kNN with a convex loss function. The loss function encourages the local neighborhood around every input to stay “pure”. Inputs with different labels are pushed away and inputs with a similar label are pulled closer. One of the advantages of lmnn over related work [12, 17] is that the (global) metric is optimized locally, which allows it to work with multi-modal data distributions and encourages better generalization. To achieve this, the algorithm requires k target neighbors to be identified for every input prior to learning, which should become the k nearest neighbors after the optimization. Usually, these are picked with the help of side-information, or in the absence thereof, as the k nearest neighbors within the same class based on Euclidean metric. We use the notation j ⇝i to indicate that xj is a target neighbor of xi. Lmnn learns a Mahalanobis metric that keeps each input xi closer to its target neighbors than other inputs with different class labels (impostors) — by a large margin. For an input xi, target neighbor xj, and impostor xk, this relation can be expressed as a linear inequality constraint with respect to the squared distance d2 M(·, ·): d2 M(xi, xk) −d2 M(xi, xj) ≥1. (2) Eq. (2) is enforced only for the local target neighbors. See Fig. 1 for an illustration. Here, all points on the circles have equal distance from xi. Under the Mahalanobis metric this circle is deformed to an ellipsoid, which causes the impostors (marked as squares) to be further away than the target neighbors. The semidefinite program (SDP) introduced by [20] moves target neighbors close by minimizing P j⇝i d2 M(xi, xj) while penalizing violations of the constraint in eq. (2). The latter is achieved through addi1For simplicity we will refer to pseudo-metrics also as metrics as the distinction has no implications for our algorithm. 2 tive slack variables ξijk ≥0. If we define a set of triples S = {(i, j, k) : j ⇝i, yk ̸= yi}, the problem can be stated as the SDP shown in Table 1. min M X j⇝i d2 M(xi, xj) + µ X (i,j,k)∈S ξijk subject to: (i, j, k) ∈S: (1) d2 M(xi, xk) −d2 M(xi, xj)≥1 −ξijk (2) ξijk ≥0 (3) M ⪰0. Table 1: Convex optimization problem of lmnn. This optimization problem has O(kn2) constraints of type (1) and (2), along with the positive semidefinite constraint of a d × d matrix M. Hence, standard offthe shelf packages are not particularly suited to solve this SDP. For this paper we use the special purpose subgradient descent solver, developed in [20], which can handle data sets on the order of tens of thousands of samples. As the optimization problem is not sensitive to the exact choice of the tradeoff constant µ [20], we set µ = 1 throughout this paper. 3 Multi-Task learning In this section, we briefly review the approach presented by Evgeniou et al. [15] that extends svm to multi-task learning (mt-svm). We assume that we are given T different but related tasks. Each input (xi, yi) belongs to exactly one of the tasks 1, . . . , T, and we let It be the set of indices such that i ∈It if and only if the input-label pair (xi, yi) belongs to task t. For simplification, throughout this section we will assume a binary classification scenario, in particular yi ∈{+1, −1}. Following the original description of [15], mt-svm learns T classifiers w1, . . . , wT , where each classifier wt is specifically dedicated for task t. In addition, the authors introduce a global classifier w0 that captures the commonality among all the tasks. An example xi ∈It is classified by the rule ˆyi = sign(x⊤ i (w0 +wt)). The joint optimization problem is to minimize the following cost: min w0,...,wT T X t=0 γt∥wt∥2 2+ T X t=1 X i∈It [1−yi(w0 + wt)⊤xi]+ (3) where [a]+ = max(0, a). The constants γt ≥0 trade-off the regularization of the various tasks. Note that the relative value between γ0 and the other γt>0 controls the strength of the connection across tasks. In the extreme case, if γ0 →+∞, then w0 = ⃗0 and all tasks are decoupled; on the other hand, when γ0 is small and γt>0 →+∞ we obtain wt>0 = ⃗0 and all the tasks share the same decision function with weights w0. Although the mt-svm formulation is very elegant, it requires all tasks to share the same class labels. In the remainder of this paper we will introduce an MTL algorithm based on the kNN rule, which does not model each class with its own parameter vector. 4 Multi-Task Large Margin Nearest Neighbor In this section we combine large margin nearest neighbor classification from section 2 with the multi-task learning paradigm from section 3. We follow the MTL setting with T learning tasks. Our goal is to learn a metric dt(·, ·) for each of the T tasks that minimizes the kNN leave-one-out classification error. Inspired by the methodology of the previous section, we model the commonalities between various tasks through a shared Mahalanobis metric with M0 ⪰0 and the task-specific idiosyncrasies with additional matrices M1, . . . MT ⪰0. We define the distance for task t as dt(xi, xj) = q (xi −xj)⊤(M0 + Mt)(xi −xj). (4) Intuitively, the metric defined by M0 picks up general trends across multiple data sets and Mt>0 specialize the metric further for each particular task. See Fig. 2 for an illustration. If we constrain the matrices Mt to be positive semi-definite (i.e. Mt ⪰0), then eq. (4) will result in a well defined pseudo-metric, as we show in section 4.1. An important aspect of multi-task learning is the appropriate coupling of the multiple learning tasks. We have to ensure that the learning algorithm does not put too much emphasis onto the shared parameters M0 or the individual 3 Euclidean Metric Joint Metric M0 x1 i x2 i M0+M1 M0+M2 M0 Individual Metrics Task 1 Task 2 Similarly labeled (target neighbor) Differently labeled (impostor) x1 i x2 i x1 i x2 i Figure 2: An illustration of mt-lmnn. The matrix M0 captures the communality between the several tasks, whereas Mt for t > 0 adds the task specific distance transformation. parameters M1, . . . , MT . To ensure this balance, we use the regularization term stated below: min M0,...,MT γ0∥M0 −I∥2 F + T X t=1 γt∥Mt∥2 F . (5) The trade-off parameter γt controls the regularization of Mt for all t = 0, 1, . . . , T. If γ0 →∞, the shared metric M0 reduces to the plain Euclidean metric and if γt>0 →∞, the task-specific metrics Mt>0 become irrelevant zero matrices. Therefore, if γt>0 →∞and γ0 is small, we learn a single metric M0 across all tasks. In this case we want the result to be equivalent to applying lmnn on the union of all data sets. In the other extreme case, when γ0 = 0 and γt>0 →∞, we want our formulation to reduce to T independent lmnn algorithms. Similar to the set of triples S defined in section 2, let St be the set of triples restricted to only vectors for task t, i.e., St = {(i, j, k) ∈I3 t : j ⇝i, yk ̸= yi}. We can combine the regularizer in eq.( 5) with the objective of lmnn applied to each of the T tasks. To ensure well-defined metrics, we add constraints that each matrix is positive semi-definite, i.e. Mt ⪰0 (see next paragraph for more details). We refer to the resulting algorithm as multi-task large margin nearest neighbor (mt-lmnn). The optimization problem is shown in Table 2 and can be solved efficiently after some modifications to the special-purpose solver presented by Weinberger et al. [20] 4.1 Theoretical Properties In this section we verify that our resulting distances are guaranteed to be well-defined pseudo-metrics and that the optimization is convex. Theorem 1 If Mt ⪰0 for all t = 0, . . . T then the distance functions dt(·, ·), as defined in eq.( 4), are well-defined pseudo-metrics for all 0 ≤t ≤T. The proof of Theorem 1 is completed in two steps: First, as the cone of positive semi-definite matrices is convex, any linear combination of positive semidefinite matrices is also positive semidefinite. This implies that dt(·, ·) is non-negative, and it is also trivially symmetric. The second part of the proof utilizes the fact that any positive semidefinite matrix M, can be decomposed as M = L⊤L, for some matrix L ∈Rd×d. It therefore follows that there exists some matrix Lt such that L⊤ t Lt = M0 + Mt. Hence we can rephrase eq.( 4) as dt(xi, xj)= q (xi −xj)⊤L⊤ t Lt(xi −xj), (6) which is equivalent to the Euclidean distance after the transformation xi →Ltxi. It follows that eq.( 6) preserves the triangular inequality. This completes the requirements for a pseudo-metric. If Lt is full rank, i.e. M0 + Mt is strictly positive definite, then it also fulfills identity of indiscernibles, i.e., d(xi, xj) = 0 if and only if xi = xj and d(·, ·) is a metric. 4 min M0,...,MTγ0∥M0 −I∥2 F + T X t=1  γt∥Mt∥2 F + X (i,j)∈It,j⇝i d2 t(xi, xj) + X (i,j,k)∈St ξijk   subject to: ∀t, ∀(i, j, k) ∈St: (1) d2 t(xi, xk) −d2 t(xi, xj) ≥1 −ξijk (2) ξijk ≥0 (3) M0, M1, . . . , MT ⪰0. Table 2: Convex optimization problem of mt-lmnn. One of the advantages of lmnn over alternative distance metric learning algorithms, for example NCA [17], is that it can be stated as a convex optimization problem. This allows the global solution to be found efficiently with special purpose solvers [20] or for very large data sets in an online relaxation [7]. It is therefore important to show that our new formulation preserves convexity. Theorem 2 The mt-lmnn optimization problem in Table 2 is convex. Constraints of type (2) and (3) are standard linear and positive-semidefinite constraints, which are known to be convex [5]. Convexity remains to be shown for constraints of type (1) and the objective. Both access the matrices Mt exclusively in terms of the squared distance d2(·, ·). This can be expressed as d2(xi, xj) = trace(M0vijv⊤ ij) + trace(Mtvijv⊤ ij), (7) where vij = (xi −xj). Eq.( 7) is linear in terms of the matrices Mt and it follows that the constraints of type (1) are also linear and therefore trivially convex. Similarly, it follows that all terms in the objective are also linear with the exception of the Frobenius norms in the regularization term. The latter term is quadratic (∥Mt∥2 F = trace(M⊤ t Mt)) and therefore convex with respect to Mt. The regularization of M0 can be expanded as trace(M⊤ 0 M0 −2M0 + I) which has one quadratic and one linear term. The sum of convex functions is convex [5], hence this concludes the proof. 5 Results We evaluate mt-lmnn on the Isolet spoken alphabet recognition2 and CoIL 2000 dataset3. We first provide a brief overview of the two datasets and then present results in various multi-task and domain adaptation settings. The Isolet dataset was collected from 150 speakers uttering all characters in the English alphabet twice, i.e., each speaker contributed 52 training examples (in total 7797 examples4). The task is to classify which letter has been uttered based on several acoustic features – spectral coefficients, contour-, sonorant- and post-sonorant features. The exact feature description can be found in [16]. The speakers are grouped into smaller sets of 30 similar speakers, giving rise to 5 disjoint subsets called isolet1-5. This representation of Isolet lends itself naturally to the multi-task learning regime. We treat each of the subsets as its own classification task (T = 5) with c = 26 labels. The five tasks differ because the groups of speakers vary greatly in the way they utter the characters of the English alphabets. They are also highly related to each other because all the data is collected from the same utterances (the English alphabets). To remove low variance noise and to speed up computation time we preprocess the Isolet data with PCA [18] and project it onto its leading principal components that capture 95% of the data variance reducing the dimensionality from 617 to 169. The CoIL dataset contains information of customers of an insurance company. The customer information consists of 86 variables including product usage and socio-demographic data. The training set contains 5822 and the test set 4000 examples. Out of the 86 variables, we used 6 categorical features to create different classification problems, leaving the remaining 80 features as the joint data set. Our target variables consist of attributes 1, 4, 5, 6, 44 and 86, 2Available for download from the UCI Machine Learning Repository. 3Available for download at http://kdd.ics.uci.edu/databases/tic/tic.html 4Three examples are historically missing. 5 Isolet Euc U-lmnn st-lmnn mt-lmnn st-net mt-net st-svm mt-svm 1 13.30% 6.05% 5.32% 3.89% 4.74 % 4.52 % 8.75% 5.99% 2 18.62% 6.53% 5.03% 3.17% 4.62 % 3.81 % 9.62% 5.99% 3 21.44% 8.59% 10.09% 6.99% 6.73 % 6.92 % 13.81% 7.30% 4 24.42% 8.37% 9.39% 6.31% 7.95 % 6.51 % 13.62% 8.39% 5 18.91% 7.30% 7.69% 5.58% 5.74 % 5.61 % 13.71% 7.82% Avg 19.34% 7.37% 7.51% 5.19% 5.96 % 5.48 % 11.90% 7.10% Table 3: Error rates on label-compatible Isolet tasks when tested with task-specific train sets. which indicate customer subtypes, customer age bracket, customer occupation, a discretized percentage of Roman Catholics in that area, contribution from a third party insurance and the last feature is a binary value that signifies if the customer has a caravan insurance policy. The tasks have a different number of output labels but they share the same input data. Each Isolet subset (task) was divided into randomly selected 60/20/20 splits of train/validation/test sets. We randomly picked 20% of the CoIL training examples and set them aside for validation purposes. The results were averaged over 10 runs in both cases. The validation subset was used for model selection for mt-lmnn, i.e. choosing the regularization constants γt and the number of iterations for early stopping. Although our model allows different weights γt for each task, throughout this paper we only differentiated between γ0 and γ = γt>0. The neighborhood size k was fixed to k = 3, which is the setting recommended in the original lmnn publication [20]. For competing algorithms, we performed a thorough parameter sweep and reported the best test set results (thereby favoring them over our method). These two datasets capture the essence of an ideal mt-lmnn application area. Our algorithm is very effective when the feature space is dense and when dealing with multi-label tasks with or without the same set of output labels. This is demonstrated in the first subsection of results. The second subsection provides a brief demonstration of the use of mt-lmnn in the domain adaptation (or cold start) scenario. 5.1 Multi-task Learning We categorized the multi-task learning setting into two different scenarios: label-compatible MTL and labelincompatible MTL. In the label-compatible MTL scenario, all the tasks share the same label set. The labelincompatible scenario arises when applying MTL to a group of multi-class classification tasks that do not share the same set of labels. We demonstrate the applicability and effectiveness of mt-lmnn in both these scenarios in the following sub-sections. Label-Compatible Multi-task Learning The experiments in this setting were conducted on the Isolet data, where isolet1-5 are the 5 tasks and all of them share the same 26 labels. Isolet Euc U-lmnn st-lmnn mt-lmnn 1 9.65% 4.71% 5.51% 4.13% 2 14.01% 5.19% 5.29% 3.94% 3 11.06% 5.32% 7.14% 3.85% 4 12.28% 5.03% 7.89% 4.49% 5 10.67% 4.17% 7.11% 3.65% Avg 11.53% 4.88% 6.59% 4.01% Table 4: Error rates when tested with the union of train sets from all the tasks. We compared the performance of our mtlmnn algorithm with different baselines in table 3. The first 3 algorithms are kNN classifiers using different metrics. “Euc” represents the Euclidean metric, “U-lmnn” is the metric obtained from lmnn trained on the union of the training data of all tasks (essentially “pooling” all the data and ignoring the multi-task aspect), “stlmnn” is single-task lmnn trained independent of other tasks. As additional comparison we have also included results from linear single-task and multi-task support vector machine [15], denoted as “st-svm” and “mt-svm” and non-linear single-task and multi-task neural networks (48 hidden layers) [6] denoted as “st-net” and “mt-net” respectively. A special case arises in terms of the kNN based classifiers in the label-compatible scenario: during the actual classification step, regardless what metric is used, the kNN training data set can either consist of only task specific 6 Task Euc U-lmnn st-lmnn mt-lmnn st-net mt-net st-svm 1 11.25% 4.27% 4.48% 3.44% 3.92% 3.43% 7.08% 2 10.52% 3.02% 3.96% 2.71% 2.50% 2.78% 6.83% 3 14.79% 6.25% 6.04% 5.83% 6.67% 6.39% 9.58% 4 14.79% 6.25% 6.46% 5.52% 5.83% 5.93% 9.83% 5 9.38% 2.71% 2.71% 1.77 % 1.58% 1.67% 6.17% Avg 12.15% 4.50% 4.73% 3.85% 4.10% 4.04% 7.90% Table 5: Error rates on Isolet label-incompatible tasks with task-specific train sets. Task # classes Euc st-lmnn mt-lmnn st-net mt-net st-svm 1 40 24.65% 13.67% 12.75% 47.45% 47.05% 55.68% 2 6 6.78% 5.72% 5.12% 17.25% 19.35% 36.30% 3 10 18.48% 13.28% 11.06% 23.12% 27.80% 40.98% 4 10 7.83 % 6.05% 6.00 % 19.95% 17.40% 32.98% 5 4 33.18 % 8.23 % 7.54 % 3.63% 3.63% 3.63% 6 2 9.25% 9.12% 9.10% 5.95% 6.00% 5.95% Avg 16.70% 9.35% 8.60% 19.56% 20.20% 29.25% Table 6: Error rates on CoIL label-incompatible tasks. See text for details. training data or the pooled data from all tasks. The kNN results obtained from using pooled training sets at the classification phase is shown in table 4. Both sets of results, in table 3 and 4, show that mt-lmnn obtains considerable improvement over its single-task counterparts on all 5 tasks and generally outperforms the other multi-task algorithms based on neural networks and support vector machines. Label-Incompatible Multi-task Learning To demonstrate mt-lmnn’s ability to learn multiple tasks having different sets of class labels, we ran experiments on the CoIL dataset and on artificially incompatible versions of Isolet tasks. Note that in this setting, mt-svm cannot be used because there is no intuitive way to extend it to label-incompatible multi-class multi-label MTL setting. Also, U-lmnn cannot be used with CoIL data tasks since all of them share the same input. For each original subset of Isolet we picked 10 labels at random and reduced the dataset to only examples with these labels (resulting in 600 data points per set and different sets of output labels). Table 5 shows the results of the kNN algorithm under the various metrics along with single-task and multi-task versions of svm and neural networks on these tasks. Mt-lmnn yields the lowest average performance across all tasks. The classification error rates on CoIL data tasks are shown in Table 6. The multi-task neural network and svm have a hard time with most of the tasks and, at times perform worse than their single-task versions. Once again, mt-lmnn improves upon its single task counterparts demonstrating the sharing of knowledge between tasks. Both svm and neural networks perform very well on the tasks with the least number of classes, whereas mt-lmnn does very well in tasks with many classes (in particular 40-way classification of task 1). 5.2 Domain Adaptation Domain adaptation attempts to learn a severely undersampled target domain, with the help of source domains with plenty of data, that may not have the same sample distribution as that of the target. For instance, in the context of speech recognition, one might have a lot of annotated speech recordings from a set of lab volunteers but not much from the client who will use the system. In such cases, we would like the learned classifier to gracefully adapt its recognition / classification rule to the target domain as more data becomes available. Unlike the previous setting, we now have one specific target task which can be heavily under-sampled. We evaluate the domain adaptation capability of mt-lmnn with isolet1-4 as the source and isolet5 as the target domain across varying amounts of available labeled target data. The classification errors of kNN under the mt-lmnn and U-lmnn metrics are shown in Figure 3. 7 3 4 5 6 7 8 9 10 11 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Test error rate in % Fraction of isolet5 used for training EUC U-LMNN MT-LMNN Figure 3: mt-lmnn, U-lmnn and Euclidean test error rates (%) in an unseen task with different sizes of train set. In the absence of any training data from isolet5 (also referred to as the cold-start scenario), we used the global metric M0 learned by mt-lmnn on tasks isolet1-4. Ulmnn and mt-lmnn global metric perform much better than the Euclidean metric, with U-lmnn giving slightly better classification. With the availability of more data characteristic of the new task, the performance of mt-lmnn improves much faster than Ulmnn. Note that the Euclidean error actually increases with more target data, presumably because utterances from the same speaker might be close together in Euclidean space even if they are from different classes – leading to additional misclassifications. 6 Related Work Caruana was the first to demonstrate results on multi-task learning for k-nearest neighbor regression and locally weighted averaging [6]. The multi-task aspect of their work focused on finding common feature weights across multiple, related tasks. In contrast, our work focuses on classification and learns different metrics with shared components. Previous work on multi-task learning largely focused on neural networks [6, 8], where a hidden layer is shared between various tasks. This approach is related to our work as it also learns a joint representation across tasks. It differs in the way classification and the optimization are performed. Mt-lmnn uses the kNN rule and can be expressed as a convex optimization problem with the accompanying convergence guarantees. Most recent work in multi-task learning focuses on linear classifiers [11, 15] or kernel machines [14]. Our work was influenced by these publications especially in the way the decoupling of joint and task-specific parameters is performed. However, our method uses a different optimization and learns metrics rather than separating hyperplanes. 7 Conclusion In this paper we introduced a novel multi-task learning algorithm, mt-lmnn. To our knowledge, it is the first metric learning algorithm that embraces the multi-task learning paradigm that goes beyond feature re-weighting for pooled training data. We demonstrated the abilities of mt-lmnn on real-world datasets. Mt-lmnn consistently outperformed single-task metrics for kNN in almost all of the learning settings and obtains better classification results than multi-task neural networks and support-vector machines. Addressing a major limitation of mt-svm, mt-lmnn is applicable (and effective) on multiple multi-class tasks with different sets of classes. This MTL framework can also be easily adapted for other metric learning algorithms including the online version of lmnn [7]. A further research extension is to incorporate known structure by introducing additional sub-global metrics that are shared only by a strict subset of the tasks. The nearest neighbor classification rule is a natural fit for multi-task learning, if accompanied with a suitable metric. By extending one of the state-of-the-art metric learning algorithms to the multi-task learning paradigm, mt-lmnn provides a more integrative methodology for metric learning across multiple learning problems. Acknowledgments The authors would like to thank Lawrence Saul for helpful discussions. This research was supported in part by the UCSD FWGrid Project, NSF Research Infrastructure Grant Number EIA-0303622. 8 References [1] B. Bakker and T. Heskes. Task clustering and gating for bayesian multitask learning. Journal of Machine Learning Research, 4:83–99, 2003. [2] S. Ben-David, J. Gehrke, and R. Schuller. A theoretical framework for learning from a pool of disparate data sources. In KDD, pages 443–449, 2002. [3] S. Ben-David and R. Schuller. Exploiting task relatedness for mulitple task learning. In COLT, pages 567– 580, 2003. [4] B. Boser, I. Guyon, and V. Vapnik. A training algorithm for optimal margin classifiers. In Proceedings of the fifth annual workshop on Computational learning theory, pages 144–152. ACM New York, NY, USA, 1992. [5] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [6] R. Caruana. Multitask learning. Machine Learning, 28(1):41–75, 1997. [7] G. Chechik, U. Shalit, V. Sharma, and S. Bengio. An online algorithm for large scale image similarity learning. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 306–314. 2009. [8] R. Collobert and J. Weston. A unified architecture for NLP: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM New York, NY, USA, 2008. [9] T. Cover and P. Hart. Nearest neighbor pattern classification. In IEEE Transactions in Information Theory, IT-13, pages 21–27, 1967. [10] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. The Journal of Machine Learning Research, 2:265–292, 2002. [11] H. Daum´e. Frustratingly easy domain adaptation. In Annual Meeting-Association for Computational Linguistics, volume 45, page 256, 2007. [12] J. Davis, B. Kulis, P. Jain, S. Sra, and I. Dhillon. Information-theoretic metric learning. Proceedings of the 24th international conference on Machine learning, 2007. [13] V. Digalakis, D. Rtischev, and L. Neumeyer. Fast speaker adaptation using constrained estimation of Gaussian mixtures. IEEE Trans. on Speech and Audio Processing, pages 357–366, 1995. [14] T. Evgeniou, C. Micchelli, and M. Pontil. Learning multiple tasks with kernel methods. Journal of Machine Learning Research, 6(1):615, 2006. [15] T. Evgeniou and M. Pontil. Regularized multi–task learning. In KDD, pages 109–117, 2004. [16] M. A. Fanty and R. Cole. Spoken letter recognition. In Advances in Neural Information Processing Systems 4, page 220. MIT Press, 1990. [17] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In L. K. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems 17, pages 513– 520, Cambridge, MA, 2005. MIT Press. [18] I. T. Jolliffe. Principal Component Analysis. Springer-Verlag, New York, 1986. [19] A. Quattoni, C. X., C. M., and D. T. A projected subgradient method for scalable multi-task learning. Massachusetts Institute of Technology, Technical Report, 2008. [20] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. The Journal of Machine Learning Research, 10:207–244, 2009. [21] J. Weston and C. Watkins. Support vector machines for multi-class pattern recognition. In ESANN, page 219, 1999. 9
2010
16
3,921
Sodium entry efficiency during action potentials: A novel single-parameter family of Hodgkin-Huxley models Anand Singh Institute of Pharmacology and Toxicology University of Z¨urich, Z¨urich, Switzerland anands@pharma.uzh.ch Renaud Jolivet∗ Institute of Pharmacology and Toxicology University of Z¨urich, Z¨urich, Switzerland renaud.jolivet@a3.epfl.ch Pierre J. Magistretti† Brain Mind Institute EPFL, Lausanne, Switzerland pierre.magistretti@epfl.ch Bruno Weber Institute of Pharmacology and Toxicology University of Z¨urich, Z¨urich, Switzerland bweber@pharma.uzh.ch Abstract Sodium entry during an action potential determines the energy efficiency of a neuron. The classic Hodgkin-Huxley model of action potential generation is notoriously inefficient in that regard with about 4 times more charges flowing through the membrane than the theoretical minimum required to achieve the observed depolarization. Yet, recent experimental results show that mammalian neurons are close to the optimal metabolic efficiency and that the dynamics of their voltage-gated channels is significantly different than the one exhibited by the classic Hodgkin-Huxley model during the action potential. Nevertheless, the original Hodgkin-Huxley model is still widely used and rarely to model the squid giant axon from which it was extracted. Here, we introduce a novel family of HodgkinHuxley models that correctly account for sodium entry, action potential width and whose voltage-gated channels display a dynamics very similar to the most recent experimental observations in mammalian neurons. We speak here about a family of models because the model is parameterized by a unique parameter the variations of which allow to reproduce the entire range of experimental observations from cortical pyramidal neurons to Purkinje cells, yielding a very economical framework to model a wide range of different central neurons. The present paper demonstrates the performances and discuss the properties of this new family of models. 1 Introduction Action potentials play the central role in neuron-to-neuron communication. At the onset of an action potential, the change in the membrane potential leads to opening of voltage-gated sodium channels, leading to influx of sodium ions. Once the membrane is sufficiently depolarized, the opening of voltage-gated potassium channels leads to an efflux of potassium ions and brings the membrane back to the resting potential. During and after this process, the ionic gradients are restored by the Na,K-ATPase electrogenic pump which extrudes 3 sodium ions in exchange for 2 potassium ions and requires 1 ATP molecule per cycle. ∗Contact author. †Second affiliation: Center for Psychiatric Neuroscience, University of Lausanne, Lausanne, Switzerland. 1 There is thus a metabolic cost in terms of ATP molecules to be spent associated with every action potential. This metabolic cost can be roughly estimated to be 1/3 of the sodium entry into the neuron. A metabolically efficient action potential would have sodium entry restricted to the rising phase of the action potential so that a minimal number of charges is transported to produce the observed voltage change. This can be encapsulated into a measure called Sodium Entry Ratio (SER) defined as the integral of the sodium current during the action potential divided by the product of the membrane capacitance by the observed change in membrane voltage. A metabolically optimally efficient neuron would have a SER of 1 or close to 1. The metabolic efficiency critically depends on the gating kinetics of the voltage-dependent channels and on their interaction during the action potential. All biophysical models of action potential generation rely on the framework originally established by Hodgkin and Huxley [1] and certain models in use today still rely on their parameters for the voltage-gated sodium and potassium channels responsible for the action potential generation, even though parameterization of the Hodgkin-Huxley model optimized for certain mammalian neurons have been available and used for years [2,3]. Analyzing the squid giant axon action potential, Hodgkin and Huxley established that the SER is approximately 4, owing to the fact that the sodium channels remain open during the falling phase of the action potential [1]. This has led to the idea that action potentials are metabolically inefficient and these numbers were used as key input in a number of studies aiming at establishing an energy budget for brain tissue (see e.g. [4]). However, two recent studies have demonstrated that mammalian neurons, having fundamentally similar action potentials as the squid giant axon, are significantly more efficient owing to lesser sodium entry during the falling phase of the action potential [5,6]. In the first study, Alle and colleagues observed that action potentials in mossy fiber boutons of hippocampal granule neurons have about 30% extra sodium entry than the theoretical minimum [5] (SER ≃1.3). In the second study, Carter and Bean expanded this finding, showing that different central neurons have different SERs [6]. More specifically, they measured that cortical pyramidal neurons are the most efficient with a SER ≃1.2 while pyramidal neurons from the CA1 hippocampus region have a SER ≃1.6. On the other hand, inhibitory neurons were found to have less efficient action potentials with cerebellar Purkinje neurons having a SER ≃2 and cortical basket cell interneurons having a SER ≃2. Interestingly, this is postulated to originate in the type or distribution of voltage-gated potassium channels present in each of these cell types. Even the less efficient neurons are twice more metabolically efficient than the original Hodgkin-Huxley neuron. These recent findings call for a revision of the original Hodgkin-Huxley model which fails on several accounts to describe accurately central mammalian neurons. The aim of the present work is to formulate an in silico model for an accurate description of the sodium and potassium currents underlying the generation of action potentials in central mammalian neurons. To this end, we introduce a novel family of Hodgkin-Huxley models HHξ parameterized by a single parameter ξ. Varying ξ in a meaningful range allows reproducing the whole range of observations of Carter and Bean [6] providing a very economic modeling strategy that can be used to model a wide range of central neurons from cortical pyramidal neurons to Purkinje cells. The next section provides a brief description of the model, of the strategy to design it as well as a formal definition of the key parameters like the Sodium Entry Ratio against which the predictions of our family of models is compared. The third section demonstrates the performances of the novel family of models and characterize its properties. Finally the last section discusses the implications of our results. 2 Model and methods 2.1 Hodgkin-Huxley model family In order to develop a novel family of Hodgkin-Huxley models, we started from the original HodgkinHuxley formalism [1]. In this formalism, the evolution of the membrane voltage V is governed by C dV dt = − X k Ik + Iext (1) 2 with C the membrane capacitance and Iext an externally applied current. The currents Ik are transmembrane ionic currents. Following the credo, they are described by − X k Ik = gNa m3 h (V −ENa) + gK n4 (V −EK) + gL (V −EL) (2) with gNa, gK and gL the ionic conductances and ENa, EK and EL the reversal potentials associated with the sodium current iNa = gNa m3 h (V −ENa), the potassium current iK = gK n4 (V −EK) and the uncharacterized leak current iL = gL (V −EL). All three gating variables m, n and h follow the generic equation dx dt = αx(V ) (1 −x) −βx(V ) x (3) with x standing alternatively for m, n or h. The terms αx and βx are non-trivial functions of the voltage V . It is sometimes useful to reformulate Eq. 3 as dx dt = − 1 τx(V ) (x −x∞(V )) (4) in which the equilibrium value x∞= αx/(αx+βx) is reached with the time constant τx = 1/(αx+ βx) which has units of [ms]. Specific values for the constants (C, gx and Ex) and for the functions αx and βx were originally chosen to match those introduced in [7] with the exception that the model introduced in [7] includes a secondary potassium channel that was abandoned here, thus retaining only the channels originally described by Hodgkin and Huxley. The reversal potentials Ex were then adjusted to match known concentrations of the respective ions in and around mammalian cells. We then proceeded to explore the behavior of the model and observed that the specific dynamics of iNa and iK during an action potential is critically dependent on the exact definition of αn. In our case, αn is defined by αn(V ) = p1 V −p2 1 −e−(p3 V −p4)/p5 (5) with p1, . . ., p5 some parameters. More specifically, we observed that by varying p5 in a meaningful range, we could reproduce qualitatively the observations of Carter and Bean [6] regarding the dynamics of the sodium current iNa during individual action potentials. Building on these premises, we set p5 = ξ with ξ varying in the range 10.5 ≤ξ ≤16. These boundary values were chosen relatively arbitrarily by exploring the range in which the models stay close to experimental observations. All the other parameters appearing in the αx and βx functions were then optimized using a standard optimization algorithm so that the model reproduces as closely as possible the values characterizing action potential dynamics as reported in [6]. The final values for parameters of the novel family of Hodgkin-Huxley models are reported in Table 1. The values of other parameters used in the model are: C = 1.0 µF/cm2, gL = 0.25 mS/cm2, EL = −70 mV. Table 1: The novel family of Hodgkin-Huxley models HHξ channel variable αx βx gx (mS/cm2) Ex (mV) Na m 41.3 V −3051 1−exp(−V −77.46 13.27 ) 1.2499 exp(V/42.129) 112.7 50 h 0.0036 exp( V 24.965 ) 10.405 exp(−1.024 V −26.181 15.488 )+1 K n 0.992 V −96.73 1−exp(−1.042 V −97.517 ξ ) 0.0159 exp(V/21.964) 224.6 -85.0 The voltage V is expressed in mV. 3 (a) 30 35 40 −80 0 40 voltage [mV] width = 1.30 [ms] SER =1.55 30 35 40 −500 0 500 time [ms] currents [μA/cm2] (b) 30 35 40 −80 0 40 voltage [mV] width = 0.60 [ms] SER =1.91 30 35 40 −500 0 500 time [ms] currents [μA/cm2] (c) 30 35 40 −80 0 40 voltage [mV] width = 0.40 [ms] SER =2.67 30 35 40 −500 0 500 time [ms] currents [μA/cm2] Figure 1: Dynamics of the membrane voltage V (top; black line), of the sodium current iNa (bottom; green line), of the potassium current iK (bottom; blue line) and of the total current C dV/dt (bottom; red line; see Eqs. 1-2) upon stimulation by a superthreshold pulse of current (cyan area; Iext = 25.5 µA/cm2 for 1 ms). In each panel, SER stands for Sodium Entry Ratio (see Eq. 6) and “width” indicates the width of the action potential measured at the position indicated by the cyan arrow (see “Sodium entry ratio and numerics” subsection). (a) ξ = 10.5. (b) ξ = 13.5. (c) ξ = 16.0. 2.2 Sodium entry ratio and numerics The relevant parameters to compare the novel family of Hodgkin-Huxley models HHξ to the experimental dataset under consideration are: (i) the action potential peak, (ii) the action potential width and (iii) the sodium entry ratio (SER). The action potential peak is simply defined as the maximal depolarization reached during the action potential. Following [6], the action potential width is measured at half the action potential height, measured as the difference in membrane potential from the peak to the resting potential. Finally, still following [6], the SER is defined for an isolated action potential by SER = Z iNa/C∆V (6) with ∆V the change in voltage during the action potential measured from the action potential threshold ϑ to its peak. The action potential threshold ϑ was defined as 1% of the maximal dV/dt. All simulations were implemented in MATLAB (The Mathworks, Natick MA). The system of equations was integrated using a solver for stiff problems and a time step of 0.05 ms. 3 Results Recent experimental results suggest that the dynamics of the action potential generating voltagegated channels in the classical Hodgkin-Huxley model do not correctly reproduce what is observed in mammalian neurons [5,6]. More specifically, the Hodgkin-Huxley equations generate a sodium current with a characteristic secondary peak during the action potential decaying phase, leading to a very important influx of sodium ions that counter the effect of potassium ions making the model metabolically inefficient [1]. Mammalian neurons display a sodium current with a unique sharp peak or at most a low amplitude secondary peak [5,6]. 4 0 0.5 1 1.5 0.5 1 1.5 2 2.5 3 AP width [ms] SER Figure 2: Predictions of our model family are compared to the experimentally observed correlation between the action potential width and the SER. Experimental observations (red squares) are adapted from [4]. Data were collected for (from left to right): Purkinje cells, cortical interneurons, CA1 pyramidal neurons and cortical pyramidal neurons. Error bars stand for the standard deviation. The red line is a simple linear regression through the experimental data (R2 = 0.99). The predictions of our model (black squares) are indicated for decreasing values of ξ from left (ξ = 16) to right (ξ = 10.5). In the precedent section, we have introduced a novel family of models HHξ parameterized by the unique parameter ξ (see Table 1). We will now show how varying ξ allows reproducing the wide range of dynamics observed experimentally. Figure 1 shows the behavior of HHξ during an isolated action potential for three different values of ξ. In all three cases, the action potential is triggered by the same unique square pulse of current generating an isolated action potential with roughly the same latency about 4 s after the end of the stimulating pulse. Yet the behavior of the model is very different in each case. For low values of ξ, the sodium current iNa exhibits a single very sharp peak, being almost null after the action potential has peaked. At high values of ξ, iNa exhibits a distinctive secondary peak after the action potential has peaked. The potassium current iK is also much bigger in the latter case. As a consequence, the model has a low Sodium Entry Ratio (SER) at low values of ξ and a high SER at high values of ξ (see Eq. 6). We also observe a negative correlation between ξ and the width of the action potential. The width of action potentials decreases when ξ increases. Finally action potentials generated at low ξ values return to the resting potential from above while action potentials generated at high ξ values exhibit an after-hyperpolarization. These different instances of our family of models HHξ cover all the experimentally observed behaviors as reported in [6] (compare with Figures 1-3 therein). Indeed, Carter and Bean observed neurons with low SER, broad action potentials and a single sharp peak in the sodium current dynamics (cortical and CA1 pyramidal neurons). They also observed neurons with high SER, narrow action potentials and a distinctive secondary peak in the sodium current dynamics during the action potential decaying phase (cortical interneurons and cerebellar Purkinje cells). Figure 2 compares the predictions of our model family with the observations reported in [6]. It clearly demonstrates that by varying ξ, our model family is able to capture the whole range of observed behaviors and quantitatively fits the measured SER and action potential widths. We also observe a faint positive correlation between the action potential width and its peak like in [6] (not shown). While the dynamics of gating variables is traditionally formulated in terms of αx and βx functions (see Eq. 3), it is convenient to reformulate the governing equation in the form of Eq. 4, yielding for 5 xinfnity τx [ms] membrane potential [mV] -100 0 +100 0 50 0 1 ξ = 14 ξ = 16 ξ = 16 ξ = 12 ξ = 10 ξ = 14 ξ = 10 ξ = 12 m h n Figure 3: Equilibrium function x∞(top) and time constant τx (bottom) as a function of the membrane voltage for different values of ξ for the gating variables m (red line), h (green line) and n (dotted blue lines). each gating variable an equilibrium value x∞(V ) and a time constant τx(V ). Figure 3 shows x∞and τx for all three gating variables of the model as a function of the membrane voltage V , the variable opening the sodium channel m, the variable closing the sodium channel h and the variable associated with the potassium channel n. With increment in the value of ξ, the asymptotic value n∞shifts towards lower membrane potentials, in other words for the same membrane voltage, the equilibrium value is higher. On the opposite, with increment in the value of ξ, the time constant τx is reduced in the range [−40; +40] mV. In summary, at low ξ values, the potassium current iK is only activated when the membrane potential is high and it kicks in slowly. At high ξ values, iK is activated earlier in the action potential and kicks in faster. This supports remarkably well the arguments of Carter and Bean to explain the relative metabolic inefficiency of GABAergic neurons. Indeed, fast-spiking neurons with narrow action potentials use fast-activating Kv3 channels to repolarize the membrane. It is postulated that, in these cells, recovery begins sooner and from more hyperpolarized voltages in remarkable agreement with the evolution of n∞and τn in our modeling framework. It is also interesting to note that Kv3 channels enable fast spiking [8]. This is supposedly due to incomplete sodium channel inactivation and to earlier recovery, in effect speeding recovery and reducing the refractory period. Finally, Figure 4 shows the membrane voltage V when the model is subjected to a constant input as well as the corresponding gain functions or frequency versus current curves. The f −I curve has the typical saturating profile observed for many neurons [9] and all the models start spiking at a non-zero frequency. In line with the idea that neurons with a sharp action potential and incomplete inactivation of sodium channels can spike faster, the discharge frequency increases with the value of ξ for a given input current. 4 Discussion Recent experimental results have highlighted that the original Hodgkin-Huxley model [1] is not particularly well suited to describe the dynamics of sodium and potassium voltage-gated channels during the course of an action potential in mammalian neurons. The Hodgkin-Huxley model is also a poor foundation for studies dedicated to computing an energy budget for the mammalian brain since it severely overestimates the metabolic cost associated with action potentials by at least a factor of 2. Despite that, the Hodgkin-Huxley model is still widely used and often for modeling projects specifically targeting the mammalian brain. 6 (a) 0 5 10 15 20 25 30 35 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 xsi = 12 xsi = 13 xsi = 14 xsi = 15 xsi = 16 f [kHz] I [μA/cm2] app (b) 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 time [ms] I = 4 app I = 12 app I = 20 app I = 28 app Figure 4: Gain functions and spike trains elicited by constant input. (a) The gain function (f −I curve) is plotted for different values of the parameter ξ. The models were stimulated with a constant current input of 5 sec after an initial 30 ms pulse. (b) Sample spike trains for ξ = 14 for different values of the externally applied current Iext. Here we have introduced a novel instance of the Hodgkin-Huxley model aimed at correcting these issues. The proposed family of models uses the original equations of Hodgkin and Huxley as they were formulated originally but introduces new expressions for the functions αx and βx that characterize the dynamics of the gating variables m, n and h. Moreover, the specific expression for αn depends on an extra parameter ξ. By varying ξ in a specific range, our family of models is able to quantitatively reproduce a wide range of dynamics for the voltage-gated sodium and potassium channels during individual action potentials. Our family of models is able to generate broad, metabolically efficient action potentials with a sharp single peak dynamics of the sodium current as well as narrow, metabolically inefficient action potentials with incomplete inactivation of the sodium channels during the decaying phase of the action potential. These different behaviors cover neuron types as different as cortical pyramidal neurons, cortical interneurons or Purkinje cells. For this study we chose a single-compartment Hodgkin-Huxley-type model because it is well suited to compare with the experimental conditions of Carter and Bean [6]. However, when comparing the particular parameterization of the model that is achieved here and experimental data (see Figure 2), it suggests that other changes, e.g. in sodium channel inactivation, may help to explain the differences between different cell types. It should also be noted that action potentials as narrow as 250 µs can be as energy-efficient (SER = 1.3) [10] as the widest action potentials measured by Carter and Bean [6], suggesting that sodium channel kinetics, in addition to potassium channel kinetics, is also different for different cell types and subcellular compartments. Numerous studies have been dedicated to study the energy constraints of the brain from the coding and network design perspective [4,11] or from the channel kinetic perspective [3,5,6,12]. Recently it has been argued that energy minimization under functional constraints could be the unifying principle governing the specific combination of ion channels that each individual neuron expresses [12]. In support of this hypothesis, it was demonstrated that some mammalian neurons generate their action potentials with currents that almost reach optimal metabolic efficiency [5]. So far, these studies have mostly addressed the question of metabolic efficiency considering isolated action potentials. Moreover, it can be difficult to compare neurons with very different properties. Here, we have introduced a new family of biophysical models able to reproduce different action potentials relevant to this debate and their underlying currents [6]. We believe that our approach is very valuable in providing mechanistic insights into the specific properties of different types of neurons. It also suggests that it could be possible to design a generic Hodgkin-Huxley-type model family that could encompass a very broad range of different observed behaviors in a similar way than the Izhikevich model does 7 for integrate-and-fire type model neurons [13]. Finally we believe that our model family will prove invaluable in studying metabolic questions and in particular in addressing the specific question: why are inhibitory neurons less metabolically efficient than excitatory neurons? Acknowledgements RJ is supported by grants from the Olga Mayenfisch Foundation and from the Hartmann M¨uller Foundation. The authors would like to thank Dr Arnd Roth for helpful discussions. References [1] Hodgkin AL, Huxley AF. J Physiol 1952; 116: 449–472. [2] Destexhe A, Par´e D. J Neurophysiol 1999; 81: 1531–1547. [3] Sengupta B, Stemmler M, Laughlin SB, Niven JE. PLoS Comp. Biol. 2010; 6: e1000840. [4] Attwell D, Laughlin SB. J Cereb Blood Flow Metab 2001; 21: 1133–1145. [5] Alle H, Roth A, Geiger J. Science 2009; 325: 1405–1408. [6] Carter BC, Bean BP. Neuron 2009; 64: 898–909. [7] Jolivet R, Lewis TJ, Gerstner W. J Neurophysiol 2004; 92: 959–976. [8] Lien CC, Jonas P. J Neurosci 2003; 23: 2058–2068. [9] Rauch A, La Camera G, L¨uscher HR, Senn W, Fusi S. J Neurophysiol 2003; 90: 1598–1612. [10] Alle H and Geiger J. Science 2006; 311: 1290–1293. [11] Laughlin SB, Sejnowski T. Science 2003; 301: 1870–1874. [12] Hasenstaub A, Otte S, Callaway E, Sejnowski TJ. PNAS 2010; 107: 12329–12334. [13] Izhikevich E. IEEE Trans Neural Net 2003; 14: 1569- 1572. 8
2010
160
3,922
Global Analytic Solution for Variational Bayesian Matrix Factorization Shinichi Nakajima Nikon Corporation Tokyo, 140-8601, Japan nakajima.s@nikon.co.jp Masashi Sugiyama Tokyo Institute of Technology Tokyo 152-8552, Japan sugi@cs.titech.ac.jp Ryota Tomioka The University of Tokyo Tokyo 113-8685, Japan tomioka@mist.i.u-tokyo.ac.jp Abstract Bayesian methods of matrix factorization (MF) have been actively explored recently as promising alternatives to classical singular value decomposition. In this paper, we show that, despite the fact that the optimization problem is non-convex, the global optimal solution of variational Bayesian (VB) MF can be computed analytically by solving a quartic equation. This is highly advantageous over a popular VBMF algorithm based on iterated conditional modes since it can only find a local optimal solution after iterations. We further show that the global optimal solution of empirical VBMF (hyperparameters are also learned from data) can also be analytically computed. We illustrate the usefulness of our results through experiments. 1 Introduction The problem of finding a low-rank approximation of a target matrix through matrix factorization (MF) attracted considerable attention recently since it can be used for various purposes such as reduced rank regression [19], canonical correlation analysis [8], partial least-squares [27, 21], multi-class classification [1], and multi-task learning [7, 29]. Singular value decomposition (SVD) is a classical method for MF, which gives the optimal lowrank approximation to the target matrix in terms of the squared error. Regularized variants of SVD have been studied for the Frobenius-norm penalty (i.e., singular values are regularized by the ℓ2penalty) [17] or the trace-norm penalty (i.e., singular values are regularized by the ℓ1-penalty) [23]. Since the Frobenius-norm penalty does not automatically produce a low-rank solution, it should be combined with an explicit low-rank constraint, which is non-convex. In contrast, the trace-norm penalty tends to produce sparse solutions, so a low-rank solution can be obtained without explicit rank constraints. This implies that the optimization problem of trace-norm MF is still convex, and thus the global optimal solution can be obtained. Recently, optimization techniques for trace-norm MF have been extensively studied [20, 6, 12, 25]. Bayesian approaches to MF have also been actively explored. A maximum a posteriori (MAP) estimation, which computes the mode of the posterior distributions, was shown [23] to correspond to the ℓ1-MF when Gaussian priors are imposed on factorized matrices [22]. The variational Bayesian (VB) method [3, 5], which approximates the posterior distributions by factorized distributions, has also been applied to MF [13, 18]. The VB-based MF method (VBMF) was shown to perform well in experiments, and its theoretical properties have been investigated [15]. 1 U = A⊤ L M B H L M H Figure 1: Matrix factorization model. H ≤L ≤M. A = (a1, . . . , aH) and B = (b1, . . . , bH). However, the optimization problem of VBMF is non-convex. In practice, the VBMF solution is computed by the iterated conditional modes (ICM) [4, 5], where the mean and the covariance of the posterior distributions are iteratively updated until convergence [13, 18]. One may obtain a local optimal solution by the ICM algorithm, but many restarts would be necessary to find a good local optimum. In this paper, we first show that, although the optimization problem is non-convex, the global optimal solution of VBMF can be computed analytically by solving a quartic equation. This is highly advantageous over the standard ICM algorithm since the global optimum can be found without any iterations and restarts. We next consider an empirical VB (EVB) scenario where the hyperparameters (prior variances) are also learned from data. Again, the optimization problem of EVBMF is non-convex, but we still show that the global optimal solution of EVBMF can be computed analytically. The usefulness of our results is demonstrated through experiments. Recently, the global optimal solution of VBMF when the target matrix is square has been obtained in [15]. Thus, our contribution to VBMF can be regarded as an extension of the previous result to general rectangular matrices. On the other hand, for EVBMF, this is the first paper that gives the analytic global solution, to the best of our knowledge. The global analytic solution for EVBMF is shown to be highly useful in experiments. 2 Bayesian Matrix Factorization In this section, we formulate the MF problem and review a variational Bayesian MF algorithm. 2.1 Formulation The goal of MF is to approximate an unknown target matrix U (∈RL×M) from its n observations Vn = {V (i) ∈RL×M}n i=1. We assume that L ≤M. If L > M, we may simply re-define the transpose U ⊤as U so that L ≤M holds. Thus this does not impose any restriction. A key assumption of MF is that U is a low-rank matrix. Let H (≤L) be the rank of U. Then the matrix U can be decomposed into the product of A ∈RM×H and B ∈RL×H as follows (see Figure 1): U = BA⊤. Assume that the observed matrix V is subject to the following additive-noise model: V = U + E, where E (∈RL×M) is a noise matrix. Each entry of E is assumed to independently follow the Gaussian distribution with mean zero and variance σ2. Then, the likelihood p(Vn|A, B) is given by p(Vn|A, B) ∝exp à −1 2σ2 n X i=1 ∥V (i) −BA⊤∥2 Fro ! , where ∥· ∥Fro denotes the Frobenius norm of a matrix. 2 2.2 Variational Bayesian Matrix Factorization We use the Gaussian priors on the parameters A = (a1, . . . , aH) and B = (b1, . . . , bH): φ(U) = φA(A)φB(B), where φA(A) ∝exp à − H X h=1 ∥ah∥2 2c2ah ! and φB(B) ∝exp à − H X h=1 ∥bh∥2 2c2 bh ! . c2 ah and c2 bh are hyperparameters corresponding to the prior variance. Without loss of generality, we assume that the product cahcbh is non-increasing with respect to h. Let r(A, B|Vn) be a trial distribution for A and B, and let FVB be the variational Bayes (VB) free energy with respect to r(A, B|Vn): FVB(r|Vn) = ¿ log r(A, B|Vn) p(Vn, A, B) À r(A,B|Vn) , where 〈·〉p denotes the expectation over p. The VB approach minimizes the VB free energy FVB(r|Vn) with respect to the trial distribution r(A, B|Vn), by restricting the search space of r(A, B|Vn) so that the minimization is computationally tractable. Typically, dissolution of probabilistic dependency between entangled parameters (A and B in the case of MF) makes the calculation feasible:1 r(A, B|Vn) = H Y h=1 rah(ah|Vn)rbh(bh|Vn). (1) The resulting distribution is called the VB posterior. The VB solution bU VB is given by the VB posterior mean: bU VB = 〈BA⊤〉r(A,B|Vn). By applying the variational method to the VB free energy, we see that the VB posterior can be expressed as follows: r(A, B|Vn) = H Y h=1 NM(ah; µah, Σah)NL(bh; µbh, Σbh), where Nd(·; µ, Σ) denotes the d-dimensional Gaussian density with mean µ and covariance matrix Σ. µah, µbh, Σah, and Σbh satisfy µah=ΣahΞ⊤ h µbh, µbh=ΣbhΞhµah, Σah= ³nβh σ2 +c−2 ah ´−1 IM, Σbh= ³nαh σ2 +c−2 bh ´−1 IL, (2) where Id denotes the d-dimensional identity matrix, and αh = ∥µah∥2 + tr(Σah), βh = ∥µbh∥2 + tr(Σbh), Ξh = n σ2 ³ V − X h′̸=h µbh′µ⊤ ah′ ´ , V = 1 n n X i=1 V (i). The iterated conditional modes (ICM) algorithm [4, 5] for VBMF (VB-ICM) iteratively updates µah, µbh, Σah, and Σbh by Eq.(2) from some initial values until convergence [13, 18], allowing one to obtain a local optimal solution. Finally, an estimator of U is computed as bU VB−ICM = H X h=1 µbhµ⊤ ah. When the noise variance σ2 is unknown, it may be estimated by the following re-estimation formula: σ2 = 1 σ2LM  1 n n X i=1 °°°°°V (i) − H X h=1 µbhµ⊤ ah °°°°° 2 Fro + H X h=1 ³ αhβh −∥µah∥2∥µbh∥2´  , which corresponds to the derivative of the VB free energy with respect to σ2 set to zero (see Eq.(4) in Section 3). This can be incorporated in the ICM algorithm by updating σ2 from some initial value by the above formula in every iteration of the ICM algorithm. 1Although a weaker constraint, r(A, B|Vn)=rA(A|Vn)rB(B|Vn), is sufficient to derive a tractable iterative algorithm [13], we assume the stronger one (1) used in [18], which makes our theoretical analysis tractable. 3 2.3 Empirical Variational Bayesian Matrix Factorization In the VB framework, hyperparameters (c2 ah and c2 bh in the current setup) can also be learned from data by minimizing the VB free energy, which is called the empirical VB (EVB) method [5]. By setting the derivatives of the VB free energy with respect to c2 ah and c2 bh to zero, the following optimality condition can be obtained (see also Eq.(4) in Section 3): c2 ah = αh/M and c2 bh = βh/L. (3) The ICM algorithm for EVBMF (EVB-ICM) is to iteratively update c2 ah and c2 bh by Eq.(3), in addition to µah, µbh, Σah, and Σbh by Eq.(2). Again, one may obtain a local optimal solution by this algorithm. 3 Analytic-form Expression of Global Optimal Solution of VBMF In this section, we derive an analytic-form expression of the VBMF global solution. The VB free energy can be explicitly expressed as follows. FVB(r|Vn) = nLM 2 log σ2+ H X h=1 à M 2 log c2 ah−1 2log |Σah|+ αh 2c2ah + L 2 log c2 bh−1 2log |Σbh|+ βh 2c2 bh ! + 1 2σ2 n X i=1 °°°°°V (i) − H X h=1 µbhµ⊤ ah °°°°° 2 Fro + n 2σ2 H X h=1 ³ αhβh −∥µah∥2∥µbh∥2´ , (4) where | · | denotes the determinant of a matrix. We solve the following problem: Given (c2 ah, c2 bh) ∈R2 ++ (∀h = 1, . . . , H), σ2 ∈R++, min FVB({µah, µbh, Σah, Σbh; h = 1, . . . , H}) s.t. µah ∈RM, µbh ∈RL, Σah ∈SM ++, Σbh ∈SL ++ (∀h = 1, . . . , H), where Sd ++ denotes the set of d × d symmetric positive-definite matrices. This is a non-convex optimization problem, but still we show that the global optimal solution can be analytically obtained. Let γh (≥0) be the h-th largest singular value of V , and let ωah and ωbh be the associated right and left singular vectors:2 V = L X h=1 γhωbhω⊤ ah. Let bγh be the second largest real solution of the following quartic equation with respect to t: fh(t) := t4 + ξ3t3 + ξ2t2 + ξ1t + ξ0 = 0, (5) where the coefficients are defined by ξ3 = (L −M)2γh LM , ξ2 = − à ξ3γh + (L2 + M 2)bη2 h LM + 2σ4 n2c2ahc2 bh ! , ξ1 = ξ3 p ξ0, ξ0 = à bη2 h − σ4 n2c2ahc2 bh !2 , bη2 h = µ 1 −σ2L nγ2 h ¶ µ 1 −σ2M nγ2 h ¶ γ2 h. Let eγh = v u u u t(L + M)σ2 2n + σ4 2n2c2ahc2 bh + v u u t à (L + M)σ2 2n + σ4 2n2c2ahc2 bh !2 −LMσ4 n2 . (6) Then we can analytically express the VBMF solution bU VB as in the following theorem. 2In our analysis, we assume that V has no missing entry, and its singular value decomposition (SVD) is easily obtained. Therefore, our results cannot be directly applied to missing entry prediction. 4 Theorem 1 The global VB solution can be expressed as bU VB = H X h=1 bγVB h ωbhω⊤ ah, where bγVB h = ½bγh if γh > eγh, 0 otherwise. Sketch of proof: We first show that minimizing (4) amounts to a reweighed SVD and any minimizer is a stationary point. Then, by analyzing the stationary condition (2), we obtain an equation with respect to bγh as a necessary and sufficient condition to be a stationary point (note that its quadratic approximation gives bounds of the solution [15]). Its rigorous evaluation results in the quartic equation (5). Finally, we show that only the second largest solution of the quartic equation (5) lies within the bounds, which completes the proof. The coefficients of the quartic equation (5) are analytic, so bγh can also be obtained analytically3, e.g., by Ferrari’s method [9] (we omit the details due to lack of space). Therefore, the global VB solution can be analytically computed. This is a strong advantage over the standard ICM algorithm since many iterations and restarts would be necessary to find a good solution by ICM. Based on the above result, the complete VB posterior can also be obtained analytically as follows. Corollary 2 The VB posteriors are given by rA(A|Vn) = H Y h=1 NM(ah; µah, Σah), rB(B|Vn) = H Y h=1 NM(bh; µbh, Σbh), where, for bγVB h being the solution given by Theorem 1, µah = ± q bγVB h bδh · ωah, µbh = ± q bγVB h bδ−1 h · ωbh, Σah = à − ¡ nbη2 h −σ2(M −L) ¢ + p (nbη2 h −σ2(M −L))2 + 4Mnσ2bη2 h 2nM(bγVB h bδ−1 h + n−1σ2c−2 ah ) ! IM, Σbh = à − ¡ nbη2 h + σ2(M −L) ¢ + p (nbη2 h + σ2(M −L))2 + 4Lnσ2bη2 h 2nL(bγVB h bδh + n−1σ2c−2 bh ) ! IL, bδh = n(M −L)(γh −bγVB h ) + q n2(M −L)2(γh −bγVB h )2 + 4σ4LM c2ahc2 bh 2σ2Mc−2 ah , bη2 h = ( η2 h if γh > eγh, σ2 ncahcbh otherwise. When the noise variance σ2 is unknown, one may use the minimizer of the VB free energy with respect to σ2 as its estimate. In practice, this single-parameter minimization may be carried out numerically based on Eq.(4) and Corollary 2. 4 Analytic-form Expression of Global Optimal Solution of Empirical VBMF In this section, we solve the following problem to obtain the EVBMF global solution: Given σ2 ∈R++, min FVB({µah, µbh, Σah, Σbh, c2 ah, c2 bh; h = 1, . . . , H}) s.t. µah ∈RM, µbh ∈RL, Σah ∈SM ++, Σbh ∈SL ++, (c2 ah, c2 bh) ∈R2 ++ (∀h = 1, . . . , H), where Rd ++ denotes the set of the d-dimensional vectors with positive elements. We show that, although this is again a non-convex optimization problem, the global optimal solution can be obtained analytically. We can observe the invariance of the VB free energy (4) under the transform © (µah, µbh, Σah, Σbh, c2 ah, c2 bh) ª → © (shµah, s−1 h µbh, s2 hΣah, s−2 h Σbh, s2 hc2 ah, s−2 h c2 bh) ª 3In practice, one may solve the quartic equation numerically, e.g., by the ‘roots’ function in MATLAB R ⃝. 5 0 1 2 3 2 2.5 3 Global solution h c (a) V = 1.5 0 1 2 3 3.25 3.5 h c Global solution (b) V = 2.1 0 1 2 3 4 4.5 5 h c Global solution (c) V = 2.7 Figure 2: Profiles of the VB free energy (4) when L = M = H = 1, n = 1, and σ2 = 1 for observations V = 1.5, 2.1, and 2.7. (a) When V = 1.5 < 2 = γh, the VB free energy is monotone increasing and thus the global solution is given by ch →0. (b) When V = 2.1 > 2 = γh, a local minimum exists at ch = ˘ch ≈1.37, but ∆h ≈0.12 > 0 so ch →0 is still the global solution. (c) When V = 2.7 > 2 = γh, ∆h ≈−0.74 ≤0 and thus the minimizer at ch = ˘ch ≈2.26 is the global solution. for any {sh ̸= 0; h = 1, . . . , H}. Accordingly, we fix the ratios to cah/cbh = S > 0, and refer to ch := cahcbh also as a hyperparameter. Let ˘c2 h = 1 2LM  γ2 h −(L + M)σ2 n + sµ γ2 h −(L + M)σ2 n ¶2 −4LMσ4 n2  , (7) γh = ( √ L + √ M)σ/√n. Then, we have the following lemma: Lemma 3 If γh ≥γh, the VB free energy function (4) can have two local minima, namely, ch →0 and ch = ˘ch. Otherwise, ch →0 is the only local minimum of the VB free energy. Sketch of proof: Analyzing the region where ch is so small that the VB solution given ch is bγh = 0, we find a local minimum ch →0. Combining the stationary conditions (2) and (3), we derive a quadratic equation with respect to c2 h whose larger solution is given by Eq.(7). Showing that the smaller solution corresponds to saddle points completes the proof. Figure 2 shows the profiles of the VB free energy (4) when L = M = H = 1, n = 1, and σ2 = 1 for observations V = 1.5, 2.1, and 2.7. As illustrated, depending on the value of V , either ch →0 or ch = ˘ch is the global solution. Let ∆h := M log ³ nγh Mσ2 ˘γVB h + 1 ´ + L log ³ nγh Lσ2 ˘γVB h + 1 ´ + n σ2 ¡ −2γh˘γVB h + LM˘c2 h ¢ , (8) where ˘γVB h is the VB solution for ch = ˘ch. We can show that the sign of ∆h corresponds to that of the difference of the VB free energy at ch = ˘ch and ch →0. Then, we have the following theorem and corollary. Theorem 4 The hyperparameter bch that globally minimizes the VB free energy function (4) is given by bch = ˘ch if γh > γh and ∆h ≤0. Otherwise bch →0. Corollary 5 The global EVB solution can be expressed as bU EVB = H X h=1 bγEVB h ωbhω⊤ ah, where bγEVB h := ( ˘γVB h if γh > γh and ∆h ≤0, 0 otherwise. Since the optimal hyperparameter value bch can be expressed in a closed-form, the global EVB solution can also be computed analytically using the result given in Section 3. This is again a strong advantage over the standard ICM algorithm since ICM would require many iterations and restarts to find a good solution. 6 5 Experiments In this section, we experimentally evaluate the usefulness of our analytic-form solutions using artificial and benchmark datasets. The MATLAB R ⃝code will be available at [14]. 5.1 Artificial Dataset We randomly created a true matrix V ∗= PH∗ h=1 b∗ ha∗⊤ h with L = 30, M = 100, and H∗= 10, where every element of {ah, bh} was drawn independently from the standard Gaussian distribution. We set n = 1, and an observation matrix V was created by adding independent Gaussian noise with variance σ2 = 1 to each element. We used the full-rank model, i.e., H = L = 30. The noise variance σ2 was assumed to be unknown, and estimated from data (see Section 2.2 and Section 3). We first investigate the learning curve of the VB free energy over EVB-ICM iterations. We created the initial values of the EVB-ICM algorithm as follows: µah and µbh were set to randomly created orthonormal vectors, Σah and Σbh were set to identity matrices multiplied by scalars σ2 ah and σ2 bh, respectively. σ2 ah and σ2 bh as well as the noise variance σ2 were drawn from the χ2-distribution with degree-of-freedom one. 10 learning curves of the VB free energy were plotted in Figures 3(a). The value of the VB free energy of the global solution computed by our analytic-form solution was also plotted in the graph by the dashed line. The graph shows that the EVB-ICM algorithm reduces the VB free energy reasonably well over iterations. However, for this artificial dataset, the convergence speed was quite slow once in 10 runs, which was actually trapped in a local minimum. Next, we compare the computation time. Figure 3(b) shows the computation time of EVB-ICM over iterations and our analytic form-solution. The computation time of EVB-ICM grows almost linearly with respect to the number of iterations, and it took 86.6 [sec] for 100 iterations on average. On the other hand, the computation of our analytic-form solution took only 0.055 [sec] on average, including the single-parameter search for σ2. Thus, our method provides the reduction of computation time in 4 orders of magnitude, with better accuracy as a minimizer of the VB free energy. Next, we investigate the generalization error of the global analytic solutions of VB and EVB, measured by G = ∥bU −V ∗∥2 Fro/(LM). Figure 3(c) shows the mean and error bars (min and max) over 10 runs for VB with various hyperparameter values and EVB. A single hyperparameter value was commonly used (i.e., c1 = · · · = cH) in VB, while each hyperparameter ch was separately optimized in EVB. The result shows that EVB gives slightly lower generalization errors than VB with the best common hyperparameter. Thus, automatic hyperparameter selection of EVB works quite well. Figure 3(d) shows the hyperparameter values chosen in EVB sorted in the decreasing order. This shows that, for all 10 runs, ch is positive for h ≤H∗(= 10) and zero for h > H∗. This implies that the effect of automatic relevance determination [16, 5] works excellently for this artificial dataset. 5.2 Benchmark Dataset MF can be used for canonical correlation analysis (CCA) [8] and reduced rank regression (RRR) [19] with appropriately pre-whitened data. Here, we solve these tasks by VBMF and evaluate the performance using the concrete slump test dataset [28] available from the UCI repository [2]. The experimental results are depicted in Figure 4, which is in the same format as Figure 3. The results showed that similar trends to the artificial dataset can still be observed for the CCA task with the benchmark dataset (the RRR results are similar and thus omitted from the figure). Overall, the proposed global analytic solution is shown to be a useful alternative to the popular ICM algorithm. 6 Discussion and Conclusion Overcoming the non-convexity of VB methods has been one of the important challenges in the Bayesian machine learning community, since it sometimes prevented us from applying the VB methods to highly complex real-world problems. In this paper, we focused on the MF problem with no missing entry, and showed that this weakness could be overcome by computing the global optimal solution analytically. We further derived the global optimal solution analytically for the EVBMF 7 0 50 100 1.89 1.9 1.91 1.92 1.93 1.94 1.95 FVB /(LM) EVB-Analytic EVB-ICM Iteration (a) VB free energy 0 50 100 0 20 40 60 80 100 120 Time(sec) EVB-Analytic EVB-ICM Iteration (b) Computation time 10 0 10 1 0.18 0.2 0.22 0.24 0.26 0.28 0.3 √ch G EVB-Analytic VB-Analytic (c) Generalization error 0 10 20 30 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 h h c^ 1.8 EVB-Analytic (d) Hyperparameter value Figure 3: Experimental results for artificial dataset. 0 50 100 150 200 250 −63.56 −63.55 −63.54 −63.53 −63.52 EVB-Analytic EVB-ICM Iteration (a) VB free energy 0 50 100 150 200 250 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Time(sec) EVB-Analytic EVB-ICM Iteration (b) Computation time 10 1 50 100 150 200 G √ch 10 10 −3 −1 EVB-Analytic VB-Analytic (c) Generalization error 0 1 2 3 0 0.05 0.1 0.15 0.2 0.25 h h c^ EVB-Analytic (d) Hyperparameter value Figure 4: Experimental results of CCA for the concrete slump test dataset. method, where hyperparameters are also optimized based on data samples. Since no hand-tuning parameter remains in EVBMF, our analytic-form solution is practically useful and computationally highly efficient. Numerical experiments showed that the proposed approach is promising. When cahcbh →∞, the priors get (almost) flat and the quartic equation (5) is factorized as lim cah cbh →∞fh(t) = “ t + M L “ 1−σ2L nγ2 h ” γh ”“ t + “ 1−σ2M nγ2 h ” γh ”“ t − “ 1−σ2M nγ2 h ” γh ”“ t −M L “ 1−σ2L nγ2 h ” γh ” = 0. Theorem 1 states that its second largest solution gives the VB estimator for γh > limcahcbh→∞eγh = p Mσ2/n. Thus we have lim cahcbh→∞bγVB h = max µ 0, µ 1 −Mσ2 nγ2 h ¶¶ γh. This is the positive-part James-Stein (PJS) shrinkage estimator [10], operated on each singular component separately, and this coincides with the upper-bound derived in [15] for arbitrary cahcbh > 0. The counter-intuitive fact—a shrinkage is observed even in the limit of flat priors—can be explained by strong non-uniformity of the volume element of the Fisher metric, i.e., the Jeffreys prior [11], in the parameter space. We call this effect model-induced regularization (MIR), because it is induced not by priors but by structure of model likelihood functions. MIR was shown to generally appear in Bayesian estimation when the model is non-identifiable (i.e., the mapping between parameters and distribution functions is not one-to-one) and the parameters are integrated out at least partially [26]. Thus, it never appears in MAP estimation [15]. The probabilistic PCA can be seen as an example of MF, where A and B correspond to latent variables and principal axes, respectively [24]. The MIR effect is observed in its analytic solution when A is integrated out and B is estimated to be the maximizer of the marginal likelihood. Our results fully made use of the assumptions that the likelihood and priors are both spherical Gaussian, the VB posterior is column-wise independent, and there exists no missing entry. They were necessary to solve the free energy minimization problem as a reweighted SVD. An important future work is to obtain the analytic global solution under milder assumptions. This will enable us to handle more challenging problems such as missing entry prediction [23, 20, 6, 13, 18, 22, 12, 25]. Acknowledgments The authors appreciate comments by anonymous reviewers, which helped improve our earlier manuscript and suggested promising directions for future work. MS thanks the support from the FIRST program. RT was partially supported by MEXT Kakenhi 22700138. 8 References [1] Y. Amit, M. Fink, N. Srebro, and S. Ullman. Uncovering shared structures in multiclass classification. In Proceedings of International Conference on Machine Learning, pages 17–24, 2007. [2] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. [3] H. Attias. Inferring parameters and structure of latent variable models by variational Bayes. In Proceedings of the Fifteenth Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-99), pages 21–30, San Francisco, CA, 1999. Morgan Kaufmann. [4] J. Besag. On the Statistical Analysis of Dirty Pictures. J. Royal Stat. Soc. B, 48:259–302, 1986. [5] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, New York, NY, USA, 2006. [6] J.-F. Cai, E. J. Candes, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM Journal on Optimization, 20(4):1956–1982, 2008. [7] O. Chapelle and Z. Harchaoui. A Machine Learning Approach to Conjoint Analysis. In Advances in neural information processing systems, volume 17, pages 257–264, 2005. [8] 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. [9] M. Hazewinkel, editor. Encyclopaedia of Mathematics. Springer, 2002. [10] W. James and C. Stein. Estimation with quadratic loss. In Proceedings of the 4th Berkeley Symposium on Mathematical Statistics and Probability, volume 1, pages 361–379. University of California Press, 1961. [11] H. Jeffreys. An Invariant Form for the Prior Probability in Estimation Problems. In Proceedings of the Royal Society of London. Series A, volume 186, pages 453–461, 1946. [12] S. Ji and J. Ye. An accelerated gradient method for trace norm minimization. In Proceedings of International Conference on Machine Learning, pages 457–464, 2009. [13] Y. J. Lim and T. W. Teh. Variational Bayesian Approach to Movie Rating Prediction. In Proceedings of KDD Cup and Workshop, 2007. [14] S. Nakajima. Matlab Code for VBMF, http://sites.google.com/site/shinnkj23/, 2010. [15] S. Nakajima and M. Sugiyama. Implicit regularization in variational Bayesian matrix factorization. In Proceedings of 27th International Conference on Machine Learning (ICML2010), 2010. [16] R. M. Neal. Bayesian Learning for Neural Networks. Springer, 1996. [17] A. Paterek. Improving Regularized Singular Value Decomposition for Collaborative Filtering. In Proceedings of KDD Cup and Workshop, 2007. [18] T. Raiko, A. Ilin, and J. Karhunen. Principal Component Analysis for Large Sale Problems with Lots of Missing Values. In Proc. of ECML, volume 4701, pages 691–698, 2007. [19] G. R. Reinsel and R. P. Velu. Multivariate reduced-rank Regression: Theory and Applications. Springer, New York, 1998. [20] J. D. M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22nd International Conference on Machine learning, pages 713–719, 2005. [21] R. Rosipal and N. Kr¨amer. Overview and recent advances in partial least squares. In Subspace, Latent Structure and Feature Selection Techniques, volume 3940, pages 34–51. Springer, 2006. [22] R. Salakhutdinov and A. Mnih. Probabilistic matrix factorization. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 1257–1264, 2008. [23] N. Srebro, J. Rennie, and T. Jaakkola. Maximum Margin Matrix Factorization. In Advances in NIPS, volume 17, 2005. [24] M.E. Tipping and C.M. Bishop. Probabilistic Principal Component Analysis. Journal of the Royal Statistical Society: Series B, 61(3):611–622, 1999. [25] R. Tomioka, T. Suzuki, M. Sugiyama, and H. Kashima. An efficient and general augmented Lagrangian algorithm for learning low-rank matrices. In Proceedings of International Conference on Machine Learning, 2010. [26] S. Watanabe. Algebraic Geometry and Statistical Learning. Cambridge University Press, Cambridge, UK, 2009. [27] K. J. Worsley, J-B. Poline, K. J. Friston, and A. C. Evanss. Characterizing the Response of PET and fMRI Data Using Multivariate Linear Models. NeuroImage, 6(4):305–319, 1997. [28] I-Cheng Yeh. Modeling slump flow of concrete using second-order regressions and artificial neural networks. Cement and Concrete Composites, 29(6):474–480, 2007. [29] K. Yu, V. Tresp, and A. Schwaighofer. Learning Gaussian Processes from Multiple Tasks. In Proc. of ICML, page 1019, 2005. 9
2010
161
3,923
Improving the Asymptotic Performance of Markov Chain Monte-Carlo by Inserting Vortices Yi Sun IDSIA Galleria 2, Manno CH-6928, Switzerland yi@idsia.ch Faustino Gomez IDSIA Galleria 2, Manno CH-6928, Switzerland tino@idsia.ch J¨urgen Schmidhuber IDSIA Galleria 2, Manno CH-6928, Switzerland juergen@idsia.ch Abstract We present a new way of converting a reversible finite Markov chain into a nonreversible one, with a theoretical guarantee that the asymptotic variance of the MCMC estimator based on the non-reversible chain is reduced. The method is applicable to any reversible chain whose states are not connected through a tree, and can be interpreted graphically as inserting vortices into the state transition graph. Our result confirms that non-reversible chains are fundamentally better than reversible ones in terms of asymptotic performance, and suggests interesting directions for further improving MCMC. 1 Introduction Markov Chain Monte Carlo (MCMC) methods have gained enormous popularity over a wide variety of research fields [6, 8], owing to their ability to compute expectations with respect to complex, high dimensional probability distributions. An MCMC estimator can be based on any ergodic Markov chain with the distribution of interest as its stationary distribution. However, the choice of Markov chain greatly affects the performance of the estimator, in particular the accuracy achieved with a pre-specified number of samples [4]. In general, the efficiency of an MCMC estimator is determined by two factors: i) how fast the chain converges to its stationary distribution, i.e., the mixing rate [9], and ii) once the chain reaches its stationary distribution, how much the estimates fluctuate based on trajectories of finite length, which is characterized by the asymptotic variance. In this paper, we consider the latter criteria. Previous theory concerned with reducing asymptotic variance has followed two main tracks. The first focuses on reversible chains, and is mostly based on the theorems of Peskun [10] and Tierney [11], which state that if a reversible Markov chain is modified so that the probability of staying in the same state is reduced, then the asymptotic variance can be decreased. A number of methods have been proposed, particularly in the context of Metropolis-Hastings method, to encourage the Markov chain to move away from the current state, or its adjacency in the continuous case [12, 13]. The second track, which was explored just recently, studies non-reversible chains. Neal proved in [4] that starting from any finite-state reversible chain, the asymptotic variance of a related nonreversible chain, with reduced probability of back-tracking to the immediately previous state, will not increase, and typically decrease. Several methods have been proposed by Murray based on this idea [5]. 1 Neal’s result suggests that non-reversible chains may be fundamentally better than reversible ones in terms of the asymptotic performance. In this paper, we follow up this idea by proposing a new way of converting reversible chains into non-reversible ones which, unlike in Neal’s method, are defined on the state space of the reversible chain, with the theoretical guarantee that the asymptotic variance of the associated MCMC estimator is reduced. Our method is applicable to any non-reversible chain whose state transition graph contains loops, including those whose probability of staying in the same state is zero and thus cannot be improved using Peskun’s theorem. The method also admits an interesting graphical interpretation which amounts to inserting ‘vortices’ into the state transition graph of the original chain. Our result suggests a new and interesting direction for improving the asymptotic performance of MCMC. The rest of the paper is organized as follows: section 2 reviews some background concepts and results; section 3 presents the main theoretical results, together with the graphical interpretation; section 4 provides a simple yet illustrative example and explains the intuition behind the results; section 5 concludes the paper. 2 Preliminaries Suppose we wish to estimate the expectation of some real valued function f over domain S, with respect to a probability distribution π, whose value may only be known to a multiplicative constant. Let A be a transition operator of an ergodic1 Markov chain with stationary distribution π, i.e., π (x) A (x →y) = π (y) B (y →x) , ∀x, y ∈S, (1) where B is the reverse operator as defined in [5]. The expectation can then be estimated through the MCMC estimator µT = 1 T XT t=1 f (xt) , (2) where x1, · · · , xT is a trajectory sampled from the Markov chain. The asymptotic variance of µT , with respect to transition operator A and function f is defined as σ2 A (f) = lim T →∞TV [µT ] , (3) where V [µT ] denotes the variance of µT . Since the chain is ergodic, σ2 A (f) is well-defined following the central limit theorem, and does not depend on the distribution of the initial point. Roughly speaking, asymptotic variance has the meaning that the mean square error of the estimates based on T consecutive states of the chain would be approximately 1 T σ2 A (f), after a sufficiently long period of ”burn in” such that the chain is close enough to its stationary distribution. Asymptotic variance can be used to compare the asymptotic performance of MCMC estimators based on different chains with the same stationary distribution, where smaller asymptotic variance indicates that, asymptotically, the MCMC estimator requires fewer samples to reach a specified accuracy. Under the ergodic assumption, the asymptotic variance can be written as σ2 A (f) = V [f] + X∞ τ=1 (cA,f (τ) + cB,f (τ)) , (4) where cA,f (τ) = EA [f (xt) f (xt+τ)] −EA [f (xt)] E [f (xt+τ)] is the covariance of the function value between two states that are τ time steps apart in the trajectory of the Markov chain with transition operator A. Note that σ2 A (f) depends on both A and its reverse operator B, and σ2 A (f) = σ2 B (f) since A is also the reverse operator of B by definition. In this paper, we consider only the case where S is finite, i.e., S = {1, · · · , S}, so that the transition operators A and B, the stationary distribution π, and the function f can all be written in matrix form. Let π = [π (1) , · · · , π (S)]⊤, f = [f (1) , · · · , f (S)]⊤, Ai,j = A (i →j), Bi,j = B (i →j). The asymptotic variance can thus be written as σ2 A (f) = V [f] + X∞ τ=1 f ⊤QAτ + QBτ −2ππ⊤ f, 1Strictly speaking, the ergodic assumption is not necessary for the MCMC estimator to work, see [4]. However, we make the assumption to simplify the analysis. 2 with Q = diag {π}. Since B is the reverse operator of A, QA = B⊤Q. Also, from the ergodic assumption, lim τ→∞Aτ = lim τ→∞Bτ = R, where R = 1π⊤is a square matrix in which every row is π⊤. It follows that the asymptotic variance can be represented by Kenney’s formula [7] in the non-reversible case: σ2 A (f) = V [f] + 2 (Qf)⊤ Λ− H (Qf) −2f ⊤Qf, (5) where [·]H denotes the Hermitian (symmetric) part of a matrix, and Λ = Q+ππ⊤−J, with J = QA being the joint distribution of two consecutive states. 3 Improving the asymptotic variance It is clear from Eq.5 that the transition operator A affects the asymptotic variance only through term [Λ−]H. If the chain is reversible, then J is symmetric, so that Λ is also symmetric, and therefore comparing the asymptotic variance of two MCMC estimators becomes a matter of comparing their J, namely, if2 J ⪯J′ = QA′, then σ2 A (f) ≤σ2 A′ (f), for any f. This leads to a simple proof of Peskun’s theorem in the discrete case [3]. In the case where the Markov chain is non-reversible, i.e., J is asymmetric, the analysis becomes much more complicated. We start by providing a sufficient and necessary condition in section 3.1, which transforms the comparison of asymptotic variance based on arbitrary finite Markov chains into a matrix ordering problem, using a result from matrix analysis. In section 3.2, a special case is identified, in which the asymptotic variance of a reversible chain is compared to that of a nonreversible one whose joint distribution over consecutive states is that of the reversible chain plus a skew-Hermitian matrix. We prove that the resulting non-reversible chain has smaller asymptotic variance, and provide a necessary and sufficient condition for the existence of such non-zero skewHermitian matrices. Finally in section 3.3, we provide a graphical interpretation of the result. 3.1 The general case From Eq.5 we know that comparing the asymptotic variances of two MCMC estimators is equivalent to comparing their [Λ−]H. The following result from [1, 2] allows us to write [Λ−]H in terms of the symmetric and asymmetric parts of Λ. Lemma 1 If a matrix X is invertible, then [X−]− H = [X]H + [X]⊤ S [X]− H [X]S, where [X]S is the skew Hermitian part of X. From Lemma 1, it follows immediately that in the discrete case, the comparison of MCMC estimators based on two Markov chains with the same stationary distribution can be cast as a different problem of matrix comparison, as stated in the following proposition. Proposition 1 Let A, A′ be two transition operators of ergodic Markov chains with stationary distribution π. Let J = QA, J′ = QA′, Λ = Q + ππ⊤−J, Λ′ = Q + ππ⊤−J′. Then the following three conditions are equivalent: 1) σ2 A (f) ≤σ2 A′ (f) for any f 2) [Λ−]H ⪯ h (Λ′)−i H 3) [J]H −[J]⊤ S [Λ]− H [J]S ⪯[J′]H −[J′]⊤ S [Λ′]− H [J′]S Proof. First we show that Λ is invertible. Following the steps in [3], for any f ̸= 0, f ⊤Λf = f ⊤[Λ]H f = f ⊤Q + ππ⊤−J  f = 1 2E h (f (xt) −f (xt+1))2i + E [f (xt)]2 > 0, 2For symmetric matrices X and Y , we write X ⪯Y if Y −X is positive semi-definite, and X ≺Y if Y −X is positive definite. 3 thus [Λ]H ≻0, and Λ is invertible since Λf ̸= 0 for any f ̸= 0. Condition 1) and 2) are equivalent by definition. We now prove 2) is equivalent to 3). By Lemma 1,  Λ− H ⪯ h (Λ′)−i H ⇐⇒[Λ]H + [Λ]⊤ S [Λ]H [Λ]S ⪰[Λ′]H + [Λ′]⊤ S [Λ′]H [Λ′]S , the result follows by noticing that [Λ]H = Q + ππ⊤−[J]H and [Λ]S = −[J]S. 3.2 A special case Generally speaking, the conditions in Proposition 1 are very hard to verify, particularly because of the term [J]⊤ S [Λ]− H [J]S. Here we focus on a special case where [J′]S = 0, and [J′]H = J′ = [J]H. This amounts to the case where the second chain is reversible, and its transition operator is the average of the transition operator of the first chain and the associated reverse operator. The result is formalized in the following corollary. Corollary 1 Let T be a reversible transition operator of a Markov chain with stationary distribution π. Assume there is some H that satisfies Condition I. 1⊤H = 0, H1 = 0, H = −H⊤, and3 Condition II. T ± Q−H are valid transition matrices. Denote A = T + Q−H, B = T −Q−H, then 1) A preserves π, and B is the reverse operator of A. 2) σ2 A (f) = σ2 B (f) ≤σ2 T (f) for any f. 3) If H ̸= 0, then there is some f, such that σ2 A (f) < σ2 T (f). 4) If Aε = T + (1 + ε) Q−H is valid transition matrix, ε > 0, then σ2 Aε (f) ≤σ2 A (f). Proof. For 1), notice that π⊤T = π⊤, so π⊤A = π⊤T + π⊤Q−H = π⊤+ 1⊤H = π⊤, and similarly for B. Moreover QA = QT + H = (QT −H)⊤= Q T −Q−H ⊤= (QB)⊤, thus B is the reverse operator of A. For 2), σ2 A (f) = σ2 B (f) follows from Eq.5. Let J′ = QT, J = QA. Note that [J]S = H, J′ = QT = 1 2 (QA + QB) = [QA]H = [J]H , and [Λ]H ≻0 thus H⊤[Λ]− H H ⪰0 from Proposition 1. It follows that σ2 A (f) ≤σ2 T (f) for any f. For 3), write X = [Λ]H,  Λ− H = X + H⊤X−H −= X−−X−H⊤X + HX−H⊤−HX−. Since X ≻0, HX−H⊤⪰0, one can write X + HX−H⊤−= PS s=1 λsese⊤ s , with λs > 0, ∀s. Thus H⊤X + HX−H⊤−H = XS s=1 λsHes (Hes)⊤. Since H ̸= 0, there is at least one s∗, such that Hes∗̸= 0. Let f = Q−XHes∗, then 1 2  σ2 T (f) −σ2 A (f)  = (Qf)⊤h X−− X + H⊤X−H −i (Qf) = (Qf)⊤X−H⊤X + HX−H⊤−HX−(Qf) = (Hes∗)⊤XS s=1 λsHes (Hes)⊤(Hes∗) = λs ∥Hes∗∥4 + X s̸=s∗λs e⊤ s∗H⊤Hes 2 > 0. 3We write 1 for the S-dimensional column vector of 1’s. 4 For 4), let Λε = Q + ππ⊤−QAε, then for ε > 0,  Λ− ε  H =  X + (1 + ε)2 H⊤X−H − ⪯ X + H⊤X−H −=  Λ− H , by Eq.5, we have σ2 Aε (f) ≤σ2 A (f) for any f. Corollary 1 shows that starting from a reversible Markov chain, as long as one can find a nonzero H satisfying Conditions I and II, then the asymptotic performance of the MCMC estimator is guaranteed to improve. The next question to ask is whether such an H exists, and, if so, how to find one. We answer this question by first looking at Condition I. The following proposition shows that any H satisfying this condition can be constructed systematically. Proposition 2 Let H be an S-by-S matrix. H satisfies Condition I if and only if H can be written as the linear combination of 1 2 (S −1) (S −2) matrices, with each matrix of the form Ui,j = uiu⊤ j −uju⊤ i , 1 ≤i < j ≤S −1. Here u1, · · · , uS−1 are S −1 non-zero linearly independent vectors satisfying u⊤ s 1 = 0. Proof. Sufficiency. It is straightforward to verify that each Ui,j is skew-Hermitian and satisfies Ui,j1 = 0. Such properties are inherited by any linear combination of Ui,j. Necessity. We show that there are at most 1 2 (S −1) (S −2) linearly independent bases for all H such that H = −H⊤and H1 = 0. On one hand, any S-by-S skew-Hermitian matrix can be written as the linear combination of 1 2S (S −1) matrices of the form Vi,j : {Vi,j}m,n = δ (m, i) δ (n, j) −δ (n, i) δ (m, j) , where δ is the standard delta function such that δ (i, j) = 1 if i = j and 0 otherwise. However, the constraint H1 = 0 imposes S −1 linearly independent constraints, which means that out of 1 2S (S −1) parameters, only 1 2S (S −1) −(S −1) = 1 2 (S −1) (S −2) are independent. On the other hand, selecting two non-identical vectors from u1, · · · , uS−1 results in S −1 2  = 1 2 (S −1) (S −2) different Ui,j. It has still to be shown that these Ui,j are linearly independent. Assume 0 = X 1≤i<j≤S−1 κi,jUi,j = X 1≤i<j≤S−1 κi,j uiu⊤ j −uju⊤ i  , ∀κi,j ∈R. Consider two cases: Firstly, assume u1, · · · , uS−1 are orthogonal, i.e., u⊤ i uj = 0 for i ̸= j. For a particular us, 0 = X 1≤i<j≤S−1 κi,jUi,jus = X 1≤i<j≤S−1 κi,j uiu⊤ j −uju⊤ i  us = X 1≤i<s κi,sui u⊤ s us + X s<j≤S−1 κs,juj u⊤ s us . Since u⊤ s us ̸= 0, it follows that κi,s = κs,j = 0, for all 1 ≤i < s < j ≤S −1. This holds for any us, so all κi,j must be 0, and therefore Ui,j are linearly independent by definition. Secondly, if u1, · · · , uS−1 are not orthogonal, one can construct a new set of orthogonal vectors ˜u1, · · · , ˜uS−1 from u1, · · · , uS−1 through Gram–Schmidt orthogonalization, and create a different set of bases ˜Ui,j. It is easy to verify that each ˜Ui,j is a linear combination of Ui,j. Since all ˜Ui,j are linearly independent, it follows that Ui,j must also be linearly independent. Proposition 2 confirms the existence of non-zero H satisfying Condition I. We now move to Condition II, which requires that both QT + H and QT −H remain valid joint distribution matrices, i.e. 5 all entries must be non-negative and sum up to 1. Since 1⊤(QT + H) 1 = 1 by Condition I, only the non-negative constraint needs to be considered. It turns out that not all reversible Markov chains admit a non-zero H satisfying both Condition I and II. For example, consider a Markov chain with only two states. It is impossible to find a non-zero skew-Hermitian H such that H1 = 0, because all 2-by-2 skew-Hermitian matrices are proportional to " 0 −1 1 0 # . The next proposition gives the sufficient and necessary condition for the existence of a non-zero H satisfying both I and II. In particular, it shows an interesting link between the existence of such H and the connectivity of the states in the reversible chain. Proposition 3 Assume a reversible ergodic Markov chain with transition matrix T and let J = QT. The state transition graph GT is defined as the undirected graph with node set S = {1, · · · , S} and edge set {(i, j) : Ji,j > 0, 1 ≤i < j ≤S}. Then there exists some non-zero H satisfying Condition I and II, if and only if there is a loop in GT . Proof. Sufficiency: Without loss of generality, assume the loop is made of states 1, 2, · · · , N and edges (1, 2) , · · · , (N −1, N) , (N, 1), with N ≥3. By definition, J1,N > 0, and Jn,n+1 > 0 for all 1 ≤n ≤N −1. A non-zero H can then be constructed as Hi,j =          ε, if 1 ≤i ≤N −1 and j = i + 1, −ε, if 2 ≤i ≤N and j = i −1, ε, if i = N and j = 1, −ε, if i = 1 and j = N, 0, otherwise. Here ε = min 1≤n≤N−1 {Jn,n+1, 1 −Jn,n+1, J1,N, 1 −J1,N} . Clearly, ε > 0, since all the items in the minimum are above 0. It is trivial to verify that H = −H⊤ and H1 = 0. Necessity: Assume there are no loops in GT , then all states in the chain must be organized in a tree, following the ergodic assumption. In other word, there are exactly 2 (S −1) non-zero off-diagonal elements in J. Plus, these 2 (S −1) elements are arranged symmetrically along the diagonal and spanning every column and row of J. Because the states are organized in a tree, there is at least one leaf node s in GT , with a single neighbor s′. Row s and column s in J thus looks like rs = [· · · , ps,s, · · · , ps,s′, · · · ] and its transpose, respectively, with ps,s ≥0 and ps,s′ > 0, and all other entries being 0. Assume that one wants to construct a some H, such that J ± H ≥0. Let hs be the s-th row of H. Since rs ± hs ≥0, all except the s′-th elements in hs must be 0. But since hs1 = 0, the whole s-th row, thus the s-th column of H must be 0. Having set the s-th column and row of H to 0, one can consider the reduced Markov chain with one state less, and repeat with another leaf node. Working progressively along the tree, it follows that all rows and columns in H must be 0. The indication of Proposition 3 together with 2 is that all reversible chains can be improved in terms of asymptotic variance using Corollary 1, except those whose transition graphs are trees. In practice, the non-tree constraint is not a problem because almost all current methods of constructing reversible chains generate chains with loops. 3.3 Graphical interpretation In this subsection we provide a graphical interpretation of the results in the previous sections. Starting from a simple case, consider a reversible Markov chain with three states forming a loop. Let u1 = [1, 0, −1]⊤and u2 = [0, 1, −1]⊤. Clearly, u1 and u2 are linearly independent and u⊤ 1 1 = u⊤ 2 1 = 0. By Proposition 2 and 3, there exists some ε > 0, such that H = εU12 satis6 3 2 1 7 6 5 4 9 8 6 9 8 6 5 9 8 6 5 4 9 8 6 5 4 9 8 3 3 6 5 4 9 8 – εU6,8 – εU5,6 – εU4,5 – εU3,4 + εU3,8 H = Figure 1: Illustration of the construction of larger vortices. The left hand side is a state transition graph of a reversible Markov chain with S = 9 states, with a vortex 3 →8 →6 →5 →4 of strength ε inserted. The corresponding H can be expressed as the linear combination of Ui,j, as shown on the right hand side of the graph. We start from the vortex 8 →6 →9 →8, and add one vortex a time. The dotted lines correspond to edges on which the flows cancel out when a new vortex is added. For example, when vortex 6 →5 →9 →6 is added, edge 9 →6 cancels edge 6 →9 in the previous vortex, resulting in a larger vortex with four states. Note that in this way one can construct vortices which do not include state 9, although each Ui,j is a vortex involving 9. fies Condition I and II, with U1,2 = u1u⊤ 2 −u2u⊤ 1 . Write U1,2 and J + H in explicit form, U1,2 = " 0 1 −1 −1 0 1 1 −1 0 # , J + H = " p1,1 p1,2 + ε p1,3 −ε p2,1 −ε p2,2 p2,3 + ε p3,1 + ε p3,2 −ε p3,3 # , with pi,j being the probability of the consecutive states being i, j. It is clear that in J + H, the probability of jumps 1 →2, 2 →3, and 3 →1 is increased, and the probability of jumps in the opposite direction is decreased. Intuitively, this amounts to adding a ‘vortex’ of direction 1 →2 → 3 →1 in the state transition. Similarly, the joint probability matrix for the reverse operator is J −H, which adds a vortex in the opposite direction. This simple case also gives an explanation of why adding or subtracting non-zero H can only be done where a loop already exists, since the operation requires subtracting ε from all entries in J corresponding to edges in the loop. In the general case, define S −1 vectors u1, · · · , uS−1 as us = [0, · · · , 0, 1 s-th element, 0, · · · , 0, −1]⊤. It is straightforward to see that u1, · · · , uS−1 are linearly independent and u⊤ s 1 = 0 for all s, thus any H satisfying Condition I can be represented as the linear combination of Ui,j = uiu⊤ j −uju⊤ i , with each Ui,j containing 1’s at positions (i, j), (j, S), (S, i), and −1’s at positions (i, S), (S, j), (j, i). It is easy to verify that adding εUi,j to J amounts to introducing a vortex of direction i →j → S →i, and any vortex of N states (N ≥3) s1 →s2 →· · · →sN →s1 can be represented by the linear combination PN−1 n=1 Usn,sn+1 in the case of state S being in the vortex and assuming sN = S without loss of generality, or UsN,s1 + PN−1 n=1 Usn,sn+1 if S is not in the vortex, as demonstrated in Figure 1. Therefore, adding or subtracting an H to J is equivalent to inserting a number of vortices into the state transition map. 4 An example Adding vortices to the state transition graph forces the Markov chain to move in loops following pre-specified directions. The benefit of this can be illustrated in the following example. Consider a reversible Markov chain with S states forming a ring, namely from state s one can only jump to s⊕1 or s ⊖1, with ⊕and ⊖being the mod-S summation and subtraction. The only possible non-zero H in this example is of form ε PS−1 s=1 Us,s+1, corresponding to vortices on the large ring. We assume uniform stationary distribution π (s) = 1 S . In this case, any reversible chain behaves like a random walk. The chain which achieves minimal asymptotic variance is the one with the probability of both jumping forward and backward being 1 2. The expected number of steps for this chain to reach the state S 2 edges away is S2 4 . However, adding the vortex reduces this number to 7 Without vortex With vortex 100 200 300 400 500 600 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 Without vortex With vortex HaL HbL HcL Figure 2: Demonstration of the vortex effect: (a) and (b) show two different, reversible Markov chains, each containing 128 states connected in a ring. The equilibrium distribution of the chains is depicted by the gray inner circles; darker shades correspond to higher probability. The equilibrium distribution of chain (a) is uniform, while that of (b) contains two peaks half a ring apart. In addition, the chains are constructed such that the probability of staying in the same state is zero. In each case, two trajectories, of length 1000, are generated from the chain with and without the vortex, starting from the state pointed to by the arrow. The length of the bar radiating out from a given state represents the relative frequency of visits to that state, with red and blue bars corresponding to chains with and without vortex, respectively. It is clear from the graph that trajectories sampled from reversible chains spread much slower, with only 1/5 of the states reached in (a) and 1/3 in (b), and the trajectory in (b) does not escape from the current peak. On the other hand, with vortices added, trajectories of the same length spread over all the states, and effectively explore both peaks of the stationary distribution in (b). The plot (c) show the correlation of function values (normalized by variance) between two states τ time steps apart, with τ ranging from 1 to 600. Here we take the Markov chains from (b) and use function f (s) = cos 4π · s 128  . When vortices are added, not only do the absolute values of the correlations go down significantly, but also their signs alternate, indicating that these correlations tend to cancel out in the sum of Eq.5. roughly S 2ε for large S, suggesting that it is much easier for the non-reversible chain to reach faraway states, especially for large S. In the extreme case, when ε = 1 2, the chain cycles deterministically, reducing asymptotic variance to zero. Also note that the reversible chain here has zero probability of staying in the current state, thus cannot be further improved using Peskun’s theorem. Our intuition about why adding vortices helps is that chains with vortices move faster than the reversible ones, making the function values of the trajectories less correlated. This effect is demonstrated in Figure 2. 5 Conclusion In this paper, we have presented a new way of converting a reversible finite Markov chain into a nonreversible one, with the theoretical guarantee that the asymptotic variance of the MCMC estimator based on the non-reversible chain is reduced. The method is applicable to any reversible chain whose states are not connected through a tree, and can be interpreted graphically as inserting vortices into the state transition graph. The results confirm that non-reversible chains are fundamentally better than reversible ones. The general framework of Proposition 1 suggests further improvements of MCMC’s asymptotic performance, by applying other results from matrix analysis to asymptotic variance reduction. The combined results of Corollary 1, and Propositions 2 and 3, provide a specific way of doing so, and pose interesting research questions. Which combinations of vortices yield optimal improvements for a given chain? Finding one of them is a combinatorial optimization problem. How can a good combination be constructed in practice, using limited history and computational resources? 8 References [1] R.P. Wen, ”Properties of the Matrix Inequality”, Journal of Taiyuan Teachers College, 2005. [2] R. Mathias, ”Matrices With Positive Definite Hermitian Part: Inequalities And Linear Systems”, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10. 1.1.33.1768, 1992. [3] L.H. Li, ”A New Proof of Peskun’s and Tierney’s Theorems using Matrix Method”, Joint Graduate Students Seminar of Department of Statistics and Department of Biostatistics, Univ. of Toronto, 2005. [4] R.M. Neal, ”Improving asymptotic variance of MCMC estimators: Non-reversible chains are better”, Technical Report No. 0406, Department of Statistics, Univ. of Toronto, 2004. [5] I. Murray, ”Advances in Markov chain Monte Carlo methods”, M. Sci. thesis, University College London, 2007. [6] R.M. Neal, ”Bayesian Learning for Neural Networks”, Springer, 1996. [7] J. Kenney and E.S. Keeping, ”Mathematics of Statistics”, van Nostrand, 1963. [8] C. Andrieu, N. de Freitas, A. Doucet, and M.I. Jordan, ”An Introduction to MCMC for Machine Learning”, Machine Learning, 50, 5-43, 2003. [9] Szakdolgozat, ”The Mixing Rate of Markov Chain Monte Carlo Methods and some Applications of MCMC Simulation in Bioinformatics”, M.Sci. thesis, Eotvos Lorand University, 2006. [10] P.H. Peskun, ”Optimum Monte-Carlo sampling using Markov chains”, Biometrika, vol. 60, pp. 607-612, 1973. [11] L. Tierney, ”A note on Metropolis Hastings kernels for general state spaces”, Ann. Appl. Probab. 8, 1-9, 1998. [12] S. Duane, A.D. Kennedy, B.J. Pendleton and D. Roweth, ”Hybrid Monte Carlo”, Physics Letters B, vol.195-2, 1987. [13] J.S. Liu, ”Peskun’s theorem and a modified discrete-state Gibbs sampler”, Biometria, vol.83, pp.681-682, 1996. 9
2010
162
3,924
Linear Complementarity for Regularized Policy Evaluation and Improvement Jeff Johns Christopher Painter-Wakefield Ronald Parr Department of Computer Science Duke University Durham, NC 27708 {johns, paint007, parr}@cs.duke.edu Abstract Recent work in reinforcement learning has emphasized the power of L1 regularization to perform feature selection and prevent overfitting. We propose formulating the L1 regularized linear fixed point problem as a linear complementarity problem (LCP). This formulation offers several advantages over the LARS-inspired formulation, LARS-TD. The LCP formulation allows the use of efficient off-theshelf solvers, leads to a new uniqueness result, and can be initialized with starting points from similar problems (warm starts). We demonstrate that warm starts, as well as the efficiency of LCP solvers, can speed up policy iteration. Moreover, warm starts permit a form of modified policy iteration that can be used to approximate a “greedy” homotopy path, a generalization of the LARS-TD homotopy path that combines policy evaluation and optimization. 1 Introduction L1 regularization has become an important tool over the last decade with a wide variety of machine learning applications. In the context of linear regression, its use helps prevent overfitting and enforces sparsity in the problem’s solution. Recent work has demonstrated how L1 regularization can be applied to the value function approximation problem in Markov decision processes (MDPs). Kolter and Ng [1] included L1 regularization within the least-squares temporal difference learning [2] algorithm as LARS-TD, while Petrik et al. [3] adapted an approximate linear programming algorithm. In both cases, L1 regularization automates the important task of selecting relevant features, thereby easing the design choices made by a practitioner. LARS-TD provides a homotopy method for finding the L1 regularized linear fixed point formulated by Kolter and Ng. We reformulate the L1 regularized linear fixed point as a linear complementarity problem (LCP). This formulation offers several advantages. It allows us to draw upon the rich theory of LCPs and optimized solvers to provide strong theoretical guarantees and fast performance. In addition, we can take advantage of the “warm start” capability of LCP solvers to produce algorithms that are better suited to the sequential nature of policy improvement than LARS-TD, which must start from scratch for each new policy. 2 Background First, we introduce MDPs and linear value function approximation. We then review L1 regularization and feature selection for regression problems. Finally, we introduce LCPs. We defer discussion of L1 regularization and feature selection for reinforcement learning (RL) until section 3. 1 2.1 MDP and Value Function Approximation Framework We aim to discover optimal, or near-optimal, policies for Markov decision processes (MDPs) defined by the quintuple M = (S, A, P, R, γ). Given a state s ∈S, the probability of a transition to a state s′ ∈S when action a ∈A is taken is given by P(s′|s, a). The reward function is a mapping from states to real numbers R : S "→R. A policy π for M is a mapping from states to actions π : s "→a and the transition matrix induced by π is denoted P π. Future rewards are discounted by γ ∈[0, 1). The value function at state s for policy π is the expected total γ-discounted reward for following π from s. In matrix-vector form, this is written: V π = T πV π = R + γP πV π, where T π is the Bellman operator for policy π and V π is the fixed point of this operator. An optimal policy, π∗, maximizes state values, has value function V ∗, and is the fixed point of the T ∗operator: T ∗V (s) = R(s) + γ max a∈A ! s′∈S P(s′|s, a)V (s′). Of the many algorithms that exist for finding π∗, policy iteration is most relevant to the presentation herein. For any policy πj, policy iteration computes V πj, then determines πj+1 as the “greedy” policy with respect to V πj: πj+1(s) = arg max a∈A [R(s) + γ ! s′∈S P(s′|s, a)V πj(s′)]. This is repeated until some convergence condition is met. For an exact representation of each V πj, the algorithm will converge to an optimal policy and the unique, optimal value function V ∗. The value function, transition model, and reward function are often too large to permit an exact representation. In such cases, an approximation architecture is used for the value function. A common choice is ˆV = Φw, where w is a vector of k scalar weights and Φ stores a set of k features in an n×k matrix with one row per state. Since n is often intractably large, Φ can be thought of as populated by k linearly independent basis functions, ϕ1 . . . ϕk, implicitly defining the columns of Φ. For the purposes of estimating w, it is common to replace Φ with ˆΦ, which samples rows of Φ, though for conciseness of presentation we will use Φ for both, since algorithms for estimating w are essentially identical if ˆΦ is substituted for Φ. Typical linear function approximation algorithms [2] solve for the w which is a fixed point: Φw = Π(R + γΦ′πw) = ΠT πΦw, where Π is the L2 projection into the span of Φ and Φ′π is P πΦ in the explicit case and composed of sampled next features in the sampled case. Likewise, we overload T π for the sampled case. 2.2 L1 Regularization and Feature Selection in Regression In regression, the L1 regularized least squares problem is defined as: w = arg min x∈Rk 1 2∥Φx −y∥2 2 + β∥x∥1, (1) where y ∈Rn is the target function and β ∈R≥0 is a regularization parameter. This penalized regression problem is equivalent to the Lasso [4], which minimizes the squared residual subject to a constraint on ∥x∥1. The use of the L1 norm in the objective function prevents overfitting, but also serves a secondary purpose of promoting sparse solutions (i.e., coefficients w containing many 0s). Therefore, we can think of L1 regularization as performing feature selection. The Lasso’s objective function is convex, ensuring the existence of a global (though not necessarily unique) minimum. Even though the optimal solution to the Lasso can be computed in a fairly straightforward manner using convex programming, this approach is not very efficient for large problems. This is a motivating factor for the least angle regression (LARS) algorithm [5], which can be thought of as a homotopy method for solving the Lasso for all nonnegative values of β. We do not repeat the details of the algorithm here, but point out that this is easier than it might sound at first because the homotopy path in β-space is piecewise linear (with finitely many segments). Furthermore, there exists a closed form solution for moving from one piecewise linear segment to the next segment. An important benefit of LARS is that it provides solutions for all values of β in a single run of the algorithm. Cross-validation can then be performed to select an appropriate value. 2 2.3 LCP and BLCP Given a square matrix M and a vector q, a linear complementarity problem (LCP) seeks vectors w ≥0 and z ≥0 with wT z = 0 and w = q + Mz. The problem is thus parameterized by LCP(q, M). Even though LCPs may appear to be simple feasibility problems, the framework is rich enough to express any convex quadratic program. The bounded linear complementarity problem (BLCP) [6] includes box constraints on z. The BLCP computes w and z where w = q + Mz and each variable zi meets one of the following conditions: zi = ui =⇒ wi ≤0 (2a) zi = li =⇒ wi ≥0 (2b) li < zi < ui =⇒ wi = 0 (2c) with bounds −∞≤li < ui ≤∞. The parameterization is written BLCP(q, M, l, u). Notice that an LCP is a special case of a BLCP with li = 0 and ui = ∞, ∀i. Like the LCP, the BLCP has a unique solution when M is a P-matrix1 and there exist algorithms which are guaranteed to find this solution [6, 7]. When the lower and upper bounds on the BLCP are finite, the BLCP can in fact be formulated as an equivalent LCP of twice the dimensionality of the original problem. A full derivation of this equivalence is shown in the appendix (supplementary materials). There are many algorithms for solving (B)LCPs. Since our approach is not tied to a particular algorithm, we review some general properties of (B)LCP solvers. Optimized solvers can take advantage of sparsity in z. A zero entry in z effectively cancels out a column in M. If M is large, efficient solvers can avoid using M directly, instead using a smaller M ′ that is induced by the nonzero entries of z. The columns of M ′ can be thought of as the “active” columns and the procedure of swapping columns in and out of M ′ can be thought of as a pivoting operation, analogous to pivots in the simplex algorithm. Another important property of some (B)LCP algorithms is their ability to start from an initial guess at the solution (i.e., a “warm start”). If the initial guess is close to a solution, this can significantly reduce the solver’s runtime. Recently, Kim and Park [8] derived a connection between the BLCP and the Karush-Kuhn-Tucker (KKT) conditions for LARS. In particular, they noted the solution to the minimization problem in equation (1) has the form: x !"#$ w = (ΦT Φ)−1ΦT y ! "# $ q + (ΦT Φ)−1 ! "# $ M (−c) !"#$ z , where the vector −c follows the constraints in equation (2) with li = −β and ui = β. Although we describe the equivalence between the BLCP and LARS optimality conditions using M ≡(ΦT Φ)−1, the inverse can take place inside the BLCP algorithm and this operation is feasible and efficient as it is only done for the active columns of Φ. Kim and Park [8] used a block pivoting algorithm, originally introduced by J´udice and Pires [6], for solving the Lasso. Their experiments show the block pivoting algorithm is significantly faster than both LARS and Feature Sign Search [9]. 3 Previous Work Recent work has emphasized feature selection as an important problem in reinforcement learning [10, 11]. Farahmand et al. [12] consider L2 regularized RL. An L1 regularized Bellman residual minimization algorithm was proposed by Loth et al. [13]2. Johns and Mahadevan [14] investigate the combination of least squares temporal difference learning (LSTD) [2] with different variants of the matching pursuit algorithm [15, 16]. Petrik et al. [3] consider L1 regularization in the context of approximate linear programming. Their approach offers some strong guarantees, but is not well-suited to noisy, sampled data. 1A P-matrix is a matrix for which all principal minors are positive. 2Loth et al. claim to adapt LSTD to L1 regularization, but in fact describe a Bellman residual minimization algorithm and not a fixed point calculation. 3 The work most directly related to our own is that of Kolter and Ng [1]. They propose augmenting the LSTD algorithm with an L1 regularization penalty. This results in the following L1 regularized linear fixed point (L1TD) problem: w = arg min x∈Rk 1 2∥Φx −(R + γΦ′πw)∥2 2 + β∥x∥1. (3) Kolter and Ng derive a set of necessary and sufficient conditions characterizing the above fixed point3 in terms of β, w, and a vector c of correlations between the features and the Bellman residual T π ˆV −ˆV . More specifically, the correlation ci associated with feature ϕi is given by: ci = ϕT i (T π ˆV −ˆV ) = ϕT i (R + γΦ′πw −Φw). (4) Introducing the notation I to denote the set of indices of active features in the model (i.e., I = {i : wi ̸= 0}), the fixed point optimality conditions can be summarized as follows: C1. All features in the active set share the same absolute correlation, β: ∀i ∈I, |ci| = β. C2. Inactive features have less absolute correlation than active features: ∀i /∈I, |ci| < β. C3. Active features have correlations and weights agreeing in sign: ∀i ∈I, sgn(ci) = sgn(wi). Kolter and Ng show that it is possible to find the fixed point using an iterative procedure adapted from LARS. Their algorithm, LARS-TD, computes a sequence of fixed points, each of which satisfies the optimality conditions above for some intermediate L1 parameter ¯β ≥β. Successive solutions decrease ¯β and are computed in closed form by determining the point at which a feature must be added or removed in order to further decrease ¯β without violating one of the fixed point requirements. The algorithm (as applied to action-value function approximation) is a special case of the algorithm presented in the appendix (see Fig. 2). Kolter and Ng prove that if ΦT (Φ −γΦ′π) is a P-matrix, then for any β ≥0, LARS-TD will find a solution to equation (3). LARS-TD inherits many of the benefits and limitations of LARS. The fact that it traces an entire homotopy path can be quite helpful because it does not require committing to a particular value of β. On the other hand, the incremental nature of LARS may not be the most efficient solution for any single value of the regularization parameter, as shown by Lee et al. [9] and Kim and Park [8]. It is natural to employ LARS-TD in an iterative manner within the least squares policy iteration (LSPI) algorithm [17], as Kolter and Ng did. In this usage, however, many of the benefits of LARS are lost. When a new policy is selected in the policy iteration loop, LARS-TD must discard its solution from the previous policy and start an entirely new homotopy path, making the value of the homotopy path in this context not entirely clear. One might cross-validate a choice of regularization parameter by measuring the performance of the final policy, but this requires guessing a value of β for all policies and then running LARS-TD up to this value for each policy. If a new value of β is tried, all of the work done for the previous value must be discarded. 4 The L1 Regularized Fixed Point as an LCP We show that the optimality conditions for the L1TD fixed point correspond to the solution of a (B)LCP. This reformulation allows for (1) new algorithms to compute the fixed point using (B)LCP solvers, and (2) a new guarantee on the uniqueness of a fixed point. The L1 regularized linear fixed point is described by a vector of correlations c as defined in equation (4). We introduce the following variables: A = ΦT (Φ −γΦ′π) b = ΦT R, 3For fixed w, the RHS of equation (3) is a convex optimization problem; a sufficient condition for optimality of some vector x∗is that the zero vector is in the subdifferential of the RHS at x∗. The fixed point conditions follow from the equality between the LHS and RHS. 4 that allow equation (4) to be simplified as c = b −Aw. Assuming A is a P-matrix, A is invertible4 [18] and we can write: w !"#$ w = A−1b ! "# $ q + A−1 !"#$ M (−c) !"#$ z . Consider a solution (w and z) to the equation above where z is bounded as in equation (2) with l = −β and u = β to specify a BLCP. It is easy to verify that coefficients w satisfying this BLCP acheive the L1TD optimality conditions as detailed in section 3. Thus, any appropriate solver for the BLCP(A−1b, A−1, −β, β) can be thought of as a linear complementarity approach to solving for the L1TD fixed point. We refer to this class of solvers as LC-TD algorithms and parameterize them as LC-TD(Φ, Φ′π, R, γ, β). Proposition 1 If A is a P-matrix, then for any R, the L1 regularized linear fixed point exists, is unique, and will be found by a basic-set BLCP algorithm solving BLCP(A−1b, A−1, −β, β). This proposition follows immediately from some basic BLCP results. We note that if A is a Pmatrix, so is A−1 [18], that BLCPs for P-matrices have a unique solution for any q ([7], Chp. 3), and that the the basic-set algorithm of J´udice and Pires [19] is guaranteed to find a solution to any BLCP with a P-matrix. This strengthens the theorem by Kolter and Ng [1], which guaranteed only that the LARS-TD algorithm would converge to a solution when A is a P-matrix. This connection to the LCP literature has practical benefits as well as theoretical ones. Decoupling the problem from the solver allows a variety of algorithms to be exploited. For example, the ability of many solvers to use a warm start during initialization offers a significant computational advantage over LARS-TD (which always begins with a null solution). In the experimental section of this paper, we demonstrate that the ability to use warm starts during policy iteration can significantly improve computational efficiency. We also find that (B)LCP solvers can be more robust than LARS-TD, an issue we address further in the appendix. 5 Modified Policy Iteration using LARS-TD and LC-TD As mentioned in section 3, the advantages of LARS-TD as a homotopy method are less clear when it is used in a policy iteration loop since the homotopy path is traced only for specific policies. It is possible to incorporate greedy policy improvements into the LARS-TD loop, leading to a homotopy path for greedy policies. The greedy L1 regularized fixed point equation is: w = arg min x∈Rk 1 2∥Φx −max π (R + γΦ′πw)∥2 2 + β∥x∥1. (5) We propose a modification to LARS-TD called LARQ which, along with conditions C1-C3 in section 3, maintains an additional invariant: C4. The current policy π is greedy with respect to the current solution. It turns out that we can change policies and avoid violating the LARS-TD invariants if we make policy changes at points where applying the Bellman operator yields the same value for both the old policy (π) and the new policy (π′): T π ˆV = T π′ ˆV . The LARS-TD invariants all depend on the correlation of features with the residual T π ˆV −ˆV of the current solution. When the above equation is satisfied, the residual is equal for both policies. Thus, we can change policies at such points without violating any of the LARS-TD invariants. Due to space limitations, we defer a full presentation of the LARQ algorithm to the appendix. When run to completion, LARQ provides a set of action-values that are the greedy fixed point for all settings of β. In principle, this is more flexible than LARS-TD with policy iteration because it produces these results in a single run of the algorithm. In practice, LARQ suffers two limitations. 4Even when A is not invertible, we can still use a BLCP solver as long as the principal submatrix of A associated with the active features is invertible. As with LARS-TD, the inverse only occurs for this principal submatrix. In fact, we discuss in the appendix how one need never explicitly compute A. Alternatively, we can convert the BLCP to an LCP (appendix A.1) thereby avoiding A−1 in the parameterization of the problem. 5 The first is that it can be slow. LARS-TD enumerates every point at which the active set of features might change, a calculation that must be redone every time the active set changes. LARQ must do this as well, but it must also enumerate all points at which the greedy policy can change. For k features and n samples, LARS-TD must check O(k) points, but LARQ must check O(k+n) points. Even though LARS-TD will run multiple times within a policy iteration loop, the number of such iterations will typically be far fewer than the number of training data points. In practice, we have observed that LARQ runs several times slower than LARS-TD with policy iteration. A second limitation of LARQ is that it can get “stuck.” This occurs when the greedy policy for a particular β is not well defined. In such cases, the algorithm attempts to switch to a new policy immediately following a policy change. This problem is not unique to LARQ. Looping is possible with most approximate policy iteration algorithms. What makes it particularly troublesome for LARQ is that there are few satisfying ways of addressing this issue without sacrificing the invariants. To address these limitations, we present a compromise between LARQ and LARS-TD with policy iteration. The algorithm, LC-MPI, is presented as Algorithm 1. It avoids the cost of continually checking for policy changes by updating the policy only at a fixed set of values, β(1) . . . β(m). Note that the β values are in decreasing order with β(1) set to the maximum value (i.e., the point such that w(1) is the zero vector). At each β(j), the algorithm uses a policy iteration loop to (1) determine the current policy (greedy with respect to parameters ˆw(j)), and (2) compute an approximate value function Φw(j) using LC-TD. The policy iteration loop terminates when w(j) ≈ˆw(j) or some predefined number of iterations is exceeded. This use of LC-TD within a policy iteration loop will typically be quite fast because we can use the current feature set as a warm start. The warm start is indicated in Algorithm 1 by supp( ˆw(j)), where the function supp determines the support, or active elements, in ˆw(j); many (B)LCP solvers can use this information for initialization. Once the policy iteration loop terminates for point β(j), LC-MPI simply begins at the next point β(j+1) by initializing the weights with the previous solution, ˆw(j+1) ←w(j). This was found to be a very effective technique. As an alternative, we tested initializing ˆw(j+1) with the result of running LARS-TD with the greedy policy implicit in w(j) from the point (β(j), w(j)) to β(j+1). This initialization method performed worse experimentally than the simple approach described above. We can view LC-MPI as approximating LARQ’s homotopy path since the two algorithms agree for any β(j) reachable by LARQ. However, LC-MPI is more efficient and avoids the problem of getting stuck. By compromising between the greedy updates of LARQ and the pure policy evaluation methods of LARS-TD and LC-TD, LC-MPI can be thought of as form of modified policy iteration [20]. The following table summarizes the properties of the algorithms described in this paper. LARS-TD Policy Iteration LC-TD Policy Iteration LARQ LC-MPI Warm start for each new β N N Y Y Warm start for each new policy N Y Y Y Greedy policy homotopy path N N Y Approximate Robust to policy cycles Y Y N Y 6 Experiments We performed two types of experiments to highlight the potential benefits of (B)LCP algorithms. First, we used both LARS-TD and LC-TD within policy iteration. These experiments, which were run using a single value of the L1 regularization parameter, show the benefit of warm starts for LC-TD. The second set of experiments demonstrates the benefit of using the LC-MPI algorithm. A single run of LC-MPI results in greedy policies for multiple values of β, allowing the use of crossvalidation to pick the best policy. We show this is significantly more efficient than running policy iteration with either LARS-TD or LC-TD multiple times for different values of β. We discuss the details of the specific LCP solver we used in the appendix. Both types of experiments were conducted on the 20-state chain [17] and mountain car [21] domains, the same problems tested by Kolter and Ng [1]. The chain MDP consists of two stochastic actions, left and right, a reward of one at each end of the chain, and γ = 0.9. One thousand samples were generated using 100 episodes, each consisting of 10 random steps. For features, we used 1000 Gaussian random noise features along with five equally spaced radial basis functions (RBFs) and a constant function. The goal in the mountain car MDP is to drive an underpowered car up a hill 6 Algorithm 1 LC-MPI Inputs: {si, ai, ri, s′ i}n i=1, state transition and reward samples ϕ : S × A →Rk, state-action features γ ∈[0, 1), discount factor {β(j)}m j=1, where β(1) = maxl ˛˛Pn i=1 ϕl(si, ai)ri ˛˛, β(j) < β(j−1) for j ∈{2, . . . , m}, and β(m) ≥0 ϵ ∈R+ and T ∈N, termination conditions for policy iteration Initialization: Φ ←[ϕ(s1, a1) . . . ϕ(sn, an)]T , R ←[r1 . . . rn]T , w(1) ←0 for j = 2 to m do // Initialize with the previous solution ˆw(j) ←w(j−1) // Policy iteration loop Loop: // Select greedy actions and form Φ′ ∀i : a′ i ←arg maxa ϕ(s′ i, a)T ˆw(i) Φ′ ←[ϕ(s′ 1, a′ 1) . . . ϕ(s′ n, a′ n)]T // Solve the LC-TD problem using a (B)LCP solver with a warm start w(j) ←LC-TD(Φ, Φ′, R, γ, β(j)) with warm start supp( ˆw(j)) // Check for termination if (∥w(j) −ˆw(j)∥2 ≤ϵ) or (# iterations ≥T) then break loop else ˆw(j) ←w(j) Return {w(j)}m j=1 by building up momentum. The domain is continuous, two dimensional, and has three actions. We used γ = 0.99 and 155 radial basis functions (apportioned as a two dimensional grid of 1, 2, 3, 4, 5, 6, and 8 RBFs) and one constant function for features. Samples were generated using 75 episodes where each episode started in a random start state, took random actions, and lasted at most 20 steps. 6.1 Policy Iteration To compare LARS-TD and LC-TD when employed within policy iteration, we recorded the number of steps used during each round of policy iteration, where a step corresponds to a change in the active feature set. The computational complexity per step of each algorithm is similar; therefore, we used the average number of steps per policy as a metric for comparing the algorithms. Policy iteration was run either until the solution converged or 15 rounds were exceeded. This process was repeated 10 times for 11 different values of β. We present the results from these experiments in the first two columns of Table 1. The two algorithms performed similarly for the chain MDP, but LC-TD used significantly fewer steps for the mountain car MDP. Figure 1 shows plots for the number of steps used for each round of policy iteration for a single (typical) trial. Notice the declining trend for LC-TD; this is due to the warm starts requiring fewer steps to find a solution. The plot for the chain MDP shows that LC-TD uses many more steps in the first round of policy iteration than does LARSTD. Lastly, in the trials shown in Figure 1, policy iteration using LC-TD converged in six iterations whereas it did not converge at all when using LARS-TD. This was due to LARS-TD producing solutions that violate the L1TD optimality conditions. We discuss this in detail in appendix A.5. 6.2 LC-MPI When LARS-TD and LC-TD are used as subroutines within policy iteration, the process ends at a single value of the L1 regularization parameter β. The policy iteration loop must be rerun to consider different values of β. In this section, we show how much computation can be saved by running LC-MPI once (to produce m greedy policies, each at a different value of β) versus running policy iteration m separate times. The third column in Table 1 shows the average number of algorithm steps per policy for LC-MPI. As expected, there is a significant reduction in complexity by using LC-MPI for both domains. In the appendix, we give a more detailed example of how cross-validation can be 7 0 5 10 15 0 50 100 150 200 250 300 Round of Policy Iteration Number of Steps LARS−TD LC−TD (a) Chain 0 5 10 15 0 50 100 150 200 250 Round of Policy Iteration Number of Steps LARS−TD LC−TD (b) Mountain car Figure 1: Number of steps used by algorithms LARS-TD and LC-TD during each round of policy iteration for a typical trial. For LC-TD, note the decrease in steps due to warm starts. Domain LARS-TD, PI LC-TD, PI LC-MPI Chain 73 ± 13 77 ± 11 24 ± 11 Mountain car 214 ± 33 116 ± 22 21 ± 5 Table 1: Average number of algorithm steps per policy. used to select a good value of the regularization parameter. We also offer some additional comments on the robustness of the LARS-TD algorithm. 7 Conclusions In this paper, we proposed formulating the L1 regularized linear fixed point problem as a linear complementarity problem. We showed the LCP formulation leads to a stronger theoretical guarantee in terms of the solution’s uniqueness than was previously shown. Furthermore, we demonstrated that the “warm start” ability of LCP solvers can accelerate the computation of the L1TD fixed point when initialized with the support set of a related problem. This was found to be particularly effective for policy iteration problems when the set of active features does not change significantly from one policy to the next. We proposed the LARQ algorithm as an alternative to LARS-TD. The difference between these algorithms is that LARQ incorporates greedy policy improvements inside the homotopy path. The advantage of this “greedy” homotopy path is that it provides a set of action-values that are a greedy fixed point for all settings of the L1 regularization parameter. However, this additional flexibility comes with increased computational complexity. As a compromise between LARS-TD and LARQ, we proposed the LC-MPI algorithm which only maintains the LARQ invariants at a fixed set of values. The key to making LC-MPI efficient is the use of warm starts by using an LCP algorithm. There are several directions for future work. An interesting question is whether there is a natural way to incorporate policy improvement directly within the LCP formulation. Another concern for L1TD algorithms is a better characterization of the conditions under which solutions exist and can be found efficiently. In previous work, Kolter and Ng [1] indicated the P-matrix property can always hold provided enough L2 regularization is added to the problem. While this is possible, it also decreases the sparsity of the solution; therefore, it would be useful to find other techniques for guaranteeing convergence while maintaining sparsity. Acknowledgments This work was supported by the National Science Foundation (NSF) under Grant #0937060 to the Computing Research Association for the CIFellows Project, NSF Grant IIS-0713435, and DARPA CSSG HR0011-06-1-0027. 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 National Science Foundation or the Computing Research Association. 8 References [1] J. Kolter and A. Ng. Regularization and feature selection in least-squares temporal difference learning. In Proc. ICML, pages 521–528, 2009. [2] S. Bradtke and A. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22(1-3):33–57, 1996. [3] M. Petrik, G. Taylor, R. Parr, and S. Zilberstein. Feature selection using regularization in approximate linear programs for Markov decision processes. In To appear in Proc. ICML, 2010. [4] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society. Series B (Methodological), 58(1):267–288, 1996. [5] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. The Annals of Statistics, 32(2):407–451, 2004. [6] J. J´udice and F. Pires. A block principal pivoting algorithm for large-scale strictly monotone linear complementarity problems. Computers and Operations Research, 21(5):587–596, 1994. [7] K. Murty. Linear Complementarity, Linear and Nonlinear Programming. Heldermann Verlag, 1988. [8] J. Kim and H. Park. Fast active-set-type algorithms for L1-regularized linear regression. In Proc. AISTAT, pages 397–404, 2010. [9] H. Lee, A. Battle, R. Raina, and A. Ng. Efficient sparse coding algorithms. In Advances in Neural Information Processing Systems 19, pages 801–808, 2007. [10] S. Mahadevan and M. Maggioni. Proto-value functions: A Laplacian framework for learning representation and control in Markov decision processes. JMLR, 8:2169–2231, 2007. [11] R. Parr, L. Li, G. Taylor, C. Painter-Wakefield, and M. Littman. An analysis of linear models, linear value-function approximation, and feature selection for reinforcement learning. In Proc. ICML, 2008. [12] A. Farahmand, M. Ghavamzadeh, C. Szepesv´ari, and S. Mannor. Regularized fitted Q-iteration for planning in continuous-space Markovian decision problems. In Proc. ACC. IEEE Press, 2009. [13] 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. [14] J. Johns and S. Mahadevan. Sparse approximate policy evaluation using graph-based basis functions. Technical Report UM-CS-2009-041, University of Massachusetts Amherst, Department of Computer Science, 2009. [15] S. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397–3415, 1993. [16] Y. Pati, R. Rezaiifar, and P. Krishnaprasad. Orthogonal matching pursuit: Recursive function approximation with applications to wavelet decomposition. In Proceedings of the 27th Annual Asilomar Conference on Signals, Systems, and Computers, volume 1, pages 40–44, 1993. [17] M. Lagoudakis and R. Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4:1107–1149, 2003. [18] S. Lee and H. Seol. A survey on the matrix completion problem. Trends in Mathematics, 4(1):38–43, 2001. [19] J. J´udice and F. Pires. Basic-set algorithm for a generalized linear complementarity problem. Journal of Optimization Theory and Applications, 74(3):391–411, 1992. [20] M. Puterman and M. Shin. Modified policy iteration algorithms for discounted Markov decision problems. Management Science, 24(11), 1978. [21] R. Sutton and A. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. 9
2010
163
3,925
Inter-time segment information sharing for non-homogeneous dynamic Bayesian networks Dirk Husmeier & Frank Dondelinger Biomathematics & Statistics Scotland (BioSS) JCMB, The King’s Buildings, Edinburgh EH93JZ, United Kingdom dirk@bioss.ac.uk, frank@bioss.ac.uk Sophie L`ebre Universit´e de Strasbourg, LSIIT - UMR 7005, 67412 Illkirch, France sophie.lebre@lsiit-cnrs.unistra.fr Abstract Conventional dynamic Bayesian networks (DBNs) are based on the homogeneous Markov assumption, which is too restrictive in many practical applications. Various approaches to relax the homogeneity assumption have recently been proposed, allowing the network structure to change with time. However, unless time series are very long, this flexibility leads to the risk of overfitting and inflated inference uncertainty. In the present paper we investigate three regularization schemes based on inter-segment information sharing, choosing different prior distributions and different coupling schemes between nodes. We apply our method to gene expression time series obtained during the Drosophila life cycle, and compare the predicted segmentation with other state-of-the-art techniques. We conclude our evaluation with an application to synthetic biology, where the objective is to predict a known in vivo regulatory network of five genes in yeast. 1 Introduction There is currently considerable interest in structure learning of dynamic Bayesian networks (DBNs), with a variety of applications in signal processing and computational biology; see e.g. [1, 2, 3]. The standard assumption underlying DBNs is that time-series have been generated from a homogeneous Markov process. This assumption is too restrictive in many applications and can potentially lead to erroneous conclusions. While there have been various efforts to relax the homogeneity assumption for undirected graphical models [4, 5], relaxing this restriction in DBNs is a more recent research topic [1, 2, 3, 6, 7, 8]. At present, none of the proposed methods is without its limitations, leaving room for further methodological innovation. The method proposed in [3, 8] is non-Bayesian. This requires certain regularization parameters to be optimized “externally”, by applying information criteria (like AIC or BIC), cross-validation or bootstrapping. The first approach is suboptimal, the latter approaches are computationally expensive1. In the present paper we therefore follow the Bayesian paradigm, like [1, 2, 6, 7]. These approaches also have their limitations. The method proposed in [2] assumes a fixed network structure and only allows the interaction parameters to vary with time. This assumption is too rigid when looking at processes where changes in the overall regulatory network structure are expected, e.g. in morphogenesis or embryogenesis. The method proposed in [1] requires a discretization of the data, which incurs an inevitable information loss. These limitations are addressed in [6, 7], where the authors propose a method for continuous data that allows network structures associated with different nodes to change with time in different ways. However, this high flexibility causes potential problems when applied to time series with a low number of measurements, as typically available from systems biology, leading to overfitting or inflated 1See [9] for a demonstration of the higher computational costs of bootstrapping over Bayesian approaches based on MCMC. 1 inference uncertainty. The objective of the work described in our paper is to propose a model that addresses the principled shortcomings of the three Bayesian methods mentioned above. Unlike [1], our model is continuous and therefore avoids the information loss inherent in a discretization of the data. Unlike [2], our model allows the network structure to change among segments, leading to greater model flexibility. As an improvement on [6, 7], our model introduces information sharing among time series segments, which provides an essential regularization effect. 2 Background: non-homogeneous DBNs without information coupling This section summarizes briefly the non-homogeneous DBN proposed in [6, 7], which combines the Bayesian regression model of [10] with multiple changepoint processes and pursues Bayesian inference with reversible jump Markov chain Monte Carlo (RJMCMC) [11]. In what follows, we will refer to nodes as genes and to the network as a gene regulatory network. The method is not restricted to molecular systems biology, though. 2.1 Model Multiple changepoints: Let p be the number of observed genes, whose expression values y = {yi(t)}1≤i≤p,1≤t≤N are measured at N time points. M represents a directed graph, i.e. the network defined by a set of directed edges among the p genes. Mi is the subnetwork associated with target gene i, determined by the set of its parents (nodes with a directed edge feeding into gene i). The regulatory relationships among the genes, defined by M, may vary across time, which we model with a multiple changepoint process. For each target gene i, an unknown number ki of changepoints define ki + 1 non-overlapping segments. Segment h = 1, .., ki + 1 starts at changepoint ξh−1 i and stops before ξh i , where ξi = (ξ0 i , ..., ξh−1 i , ξh i , ..., ξki+1 i ) with ξh−1 i < ξh i . To delimit the bounds, ξ0 i = 2 and ξki+1 i = N +1. Thus vector ξi has length |ξi| = ki +2. The set of changepoints is denoted by ξ = {ξi}1≤i≤p. This changepoint process induces a partition of the time series, yh i =(yi(t))ξh−1 i ≤t<ξh i , with different structures Mh i associated with the different segments h ∈{1, . . . , ki + 1}. Identifiability is satisfied by ordering the changepoints based on their position in the time series. Regression model: For all genes i, the random variable Yi(t) refers to the expression of gene i at time t. Within any segment h, the expression of gene i depends on the p gene expression values measured at the previous time point through a regression model defined by (a) a set of sh i parents denoted by Mh i = {j1, ..., jsh i } ⊆{1, . . . , p}, |Mh i | = sh i , and (b) a set of parameters ((ah ij)j∈0..p, σh i ); ah ij ∈R, σh i > 0. For all j ̸= 0, ah ij = 0 if j /∈Mh i . For all genes i, for all time points t in segment h (ξh−1 i ≤t < ξh i ), the random variable Yi(t) depends on the p variables {Yj(t −1)}1≤j≤p according to Yi(t) = ah i0 + X j∈Mh i ah ij Yj(t −1) + εi(t) (1) where the noise εi(t) is assumed to be Gaussian with mean 0 and variance (σh i )2, εi(t) ∼N(0, (σh i )2). We define ah i = (ah ij)j∈0..p. 2.2 Prior The ki + 1 segments are delimited by ki changepoints, where ki is distributed a priori as a truncated Poisson random variable with mean λ and maximum k = N−2: P(ki|λ) ∝λki ki! 1l{ki≤k} . Conditional on ki changepoints, the changepoint positions vector ξi = (ξ0 i , ξ1 i , ..., ξki+1 i ) takes non-overlapping integer values, which we take to be uniformly distributed a priori. There are (N −2) possible positions for the ki changepoints, thus vector ξi has prior density P(ξi|ki) = 1/ “ N−2 ki ” . For all genes i and all segments h, the number sh i of parents for node i follows a truncated Poisson distribution2 with mean Λ and maximum s = 5: P(sh i |Λ) ∝Λsh i sh i ! 1l{sh i ≤s}. Conditional on sh i , the prior for the parent set Mh i is a uniform distribution over all parent sets with cardinality sh i : P(Mh i ˛˛|Mh i | = sh i ) = 1/( p sh i ). The overall prior on the network structures is given by marginalization: P(Mh i |Λ) = Xs sh i =1 P(Mh i |sh i )P(sh i |Λ) (2) 2A restrictive Poisson prior encourages sparsity of the network, and is therefore comparable to a sparse exponential prior, or an approach based on the LASSO. 2 Conditional on the parent set Mh i of size sh i , the sh i + 1 regression coefficients, denoted by aMh i = (ah i0, (ah ij)j∈Mh i ), are assumed zero-mean multivariate Gaussian with covariance matrix (σh i )2ΣMh i , P(ah i |Mh i , σh i )=|2π(σh i )2ΣMh i |−1 2exp 0 @− a† Mh i Σ−1 Mh i aMh i 2(σh i )2 1 A (3) where the symbol † denotes matrix transposition, ΣMh i = δ−2D† Mh i (y)DMh i (y) and DMh i (y) is the (ξh i −ξh−1 i ) × (sh i + 1) matrix whose first column is a vector of 1 (for the constant in model (1)) and each (j + 1)th column contains the observed values (yj(t))ξh−1 i −1≤t<ξh i −1 for all factor gene j in Mh i . This prior was also used in [10] and is motivated in [12]. Finally, the conjugate prior for the variance (σh i )2 is the inverse gamma distribution, P((σh i )2) = IG(υ0, γ0). Following [6, 7], we set the hyper-hyperparameters for shape, υ0 = 0.5, and scale, γ0 = 0.05, to fixed values that give a vague distribution. The terms λ and Λ can be interpreted as the expected number of changepoints and parents, respectively, and δ2 is the expected signal-to-noise ratio. These hyperparameters are drawn from vague conjugate hyperpriors, which are in the (inverse) gamma distribution family: P(Λ) = P(λ) = Ga(0.5, 1) and P(δ2) = IG(2, 0.2). 2.3 Posterior Equation (1) implies that P (yh i |ξh−1 i , ξh i , Mh i , ah i , σh i ) = “√ 2πσh i ”−(ξh i −ξh−1 i ) exp 0 @− (yh i −DMh i (y)aMh i )† (yh i −DMh i (y)aMh i ) 2(σh i )2 1 A (4) From Bayes theorem, the posterior is given by the following equation, where all prior distributions have been defined above: P(k, ξ, M, a, σ, λ, Λ, δ2|y) ∝ P(δ2)P(λ)P(Λ) p Y i=1 P(ki|λ)P(ξi|ki) ki Y h=1 P(Mh i |Λ) (5) P([σh i ]2)P(ah i |Mh i , [σh i ]2, δ2)P(yh i |ξh−1 i , ξh i , Mh i , ah i , [σh i ]2) 2.4 Inference An attractive feature of the chosen model is that the marginalization over the parameters a and σ in the posterior distribution of (5) is analytically tractable: P(k,ξ,M,λ,Λ,δ2|y) = Z P(k,ξ,M,a,σ,λ,Λ,δ2|y)dadσ (6) See [6, 10] for details and an explicit expression. The number of changepoints and their location, k, ξ, the network structure M and the hyperparameters λ, Λ, δ2 can be sampled from the posterior P(k, ξ, M, λ, Λ, δ2|y) with RJMCMC [11]. A detailed description can be found in [6, 10]. 3 Model improvement: information coupling between segments Allowing the network structure to change between segments leads to a highly flexible model. However, this approach faces a conceptual and a practical problem. The practical problem is potential model over-flexibility. If subsequent changepoints are close together, network structures have to be inferred from short time series segments. This will almost inevitably lead to overfitting (in a maximum likelihood context) or inflated inference uncertainty (in a Bayesian context). The conceptual problem is the underlying assumption that structures associated with different segments are a priori independent. This is not realistic. For instance, for the evolution of a gene regulatory network during embryogenesis, we would assume that the network evolves gradually and that networks associated with adjacent time intervals are a priori similar. To address these problems, we propose three methods of information sharing among time series segments, as illustrated in Figure 1. The first method is based on hard information coupling between the nodes, using the exponential distribution proposed in [13]. The second scheme is also based on hard information coupling, but uses a binomial distribution with conjugate Beta prior. The third scheme is based on the same distributional assumptions as the second scheme, but replaces the hard by a soft information coupling scheme. 3 (a) Hard Node Coupling (b) Soft Node Coupling Figure 1: Hierarchical Bayesian models for inter-segment and inter-node information coupling. 1(a): Hard coupling between nodes with common hyperparameter Θ regulating the strength of the coupling between structures associated with adjacent segments, Mh i and Mh+1 i . This corresponds to the models in Section 3.1, with Θ = β, Ψ = [0, 10], and no Ω, and Section 3.2, with Θ = {a, b}, Ψ = {α, α, γ, γ}, and Ω= [0, 20]. 1(b): Soft coupling between nodes, with node-specific hyperparameters Θi coupled via level2-hyperparameters Ψ. This corresponds to the model in Section 3.3, with Θi = {ai, bi}, Ψ = {α, α, γ, γ}, and Ω= [0, 20]. 3.1 Hard information coupling based on an exponential prior Denote by Ki := ki + 1 the total number of partitions in the time series associated with node i, and recall that each time series segment yh i is associated with a separate subnetwork Mh i , 1 ≤h ≤ Ki. We impose a prior distribution P(Mh i |Mh−1 i , β) on the structures, and the joint probability distribution factorizes according to a Markovian dependence: P(y1 i , . . . , yKi i , M1 i , . . . , MKi i , β) = Ki Y h=1 P(yh i |Mh i )P(Mh i |Mh−1 i , β)P(β) (7) Similar to [13] we define P(Mh i |Mh−1 i , β) = exp(−β|Mh i −Mh−1 i |) Zi(β, Mh−1 i ) (8) for h ≥2, where β is a hyperparameter that defines the strength of the coupling between Mh i and Mh−1 i , and |.| denotes the Hamming distance. For h = 1, P(Mh i ) is given by (2). The denominator Z(β, Mh−1 i ) in (8) is a normalizing constant, also known as the partition function: Z(β) = P Mh i ∈M e−β|Mh i −Mh−1 i | where M is the set of all valid subnetwork structures. If we ignore any fan-in restriction that might have been imposed a priori (via s), then the expression for the partition function can be simplified: Z(β) ≈Qp j=1 Zj(β), where Zj(β) = P1 eh j =0 e−β|eh j −eh−1 j | = 1 + e−β and hence Z(β) = ` 1 + e−β´p. Inserting this expression into (8) gives: P(Mh i |Mh−1 i , β) = exp(−β|Mh i −Mh−1 i |) (1 + e−β)p (9) It is straightforward to integrate the proposed model into the RJMCMC scheme of [6, 7] as described in Section 2.4. When proposing a new network structure Mh i → ˜ Mh i for segment h, the prior probability ratio has to be replaced by: P (Mh+1 i | ˜ Mh i ,β)P ( ˜ Mh i |Mh−1 i ,β) P (Mh+1 i |Mh i ,β)P (Mh i |Mh−1 i ,β). An additional MCMC step is introduced for sampling the hyperparameter β from the posterior distribution. For a proposal move β →˜β with symmetric proposal probability Q(˜β|β) = Q(β|˜β) we get the following acceptance probability: A(˜β|β) = min  P ( ˜β) P (β) Qp i=1 QKi h=2 exp(−˜β|Mh i −Mh−1 i |) exp(−β|Mh i −Mh−1 i |) (1+e−β) p (1+e−˜ β) p , 1 ff where in our study the hyperprior P(β) was chosen as the uniform distribution on the interval [0, 10]. 3.2 Hard information coupling based on a binomial prior An alternative way of information sharing among segments and nodes is by using a binomial prior: P(Mh i |Mh−1 i , a, b) = aN1 1 [h,i](1 −a)N0 1 [h,i]bN0 0 [h,i](1 −b)N1 0 [h,i] (10) 4 where we have defined the following sufficient statistics: N 1 1 [h, i] is the number of edges in Mh−1 i that are matched by an edge in Mh i , N 0 1 [h, i] is the number of edges in Mh−1 i for which there is no edge in Mh i , N 1 0 [h, i] is the number of edges in Mh i for which there is no edge in Mh−1 i , and N 0 0 [h, i] is the number of coinciding non-edges in Mh−1 i and Mh i . Since the hyperparameters are shared, the joint distribution can be expressed as: P({Mh i }|a, b) = p Y i=1 P(M1 i ) Ki Y h=1 P(Mh i |Mh−1 i , a, b) = aN1 1 (1−a)N0 1 bN0 0 (1−b)N1 0 p Y i=1 P(M1 i ) (11) where we have defined N l k = Pp i=1 PKi h=2 N l k[h, i], and the right-hand side follows from Eq. (10). The conjugate prior for the hyperparameters a, b is a beta distribution, P(a, b|α, α, γ, γ) ∝a(α−1)(1− a)(α−1)b(γ−1)(1 −b)(γ−1) , which allows the hyperparameters to be integrated out in closed form: P({Mh i }|α, α, γ, γ) = Z Z P({Mh i }|a, b)P(a, b|α, α, γ, γ)dadb (12) ∝ Γ(α + α) Γ(α)Γ(α) Γ(N 1 1 + α)Γ(N 0 1 + α) Γ(N 1 1 + α + N 0 1 + α) Γ(γ + γ) Γ(γ)Γ(γ) Γ(N 0 0 + γ)Γ(N 1 0 + γ) Γ(N 0 0 + γ + N 1 0 + γ) The level-2 hyperparameters α, α, γ, γ are given a uniform hyperprior over [0, 20]. The MCMC scheme of Section 2.4 has to be modified as follows. When proposing a new network structure for node i and segment h, Mh i → ˜ Mh i , the structures Mh i and ˜ Mh i enter the prior probability ratio via the expression P({Mh i }|α, α, γ, γ), as P ({M1 i ,..., ˜ Mh i ,...,MKi i }p i=1|α,α,γ,γ) P ({M1 i ,...,Mh i ,...,MKi i }p i=1|α,α,γ,γ). Note that as a consequence of integrating out the hyperparameters, all network structures become interdependent, and information about the structures is contained in the sufficient statistics N 1 1 , N 0 1 , N 1 0 , N 0 0 . A new proposal move for the level-2 hyperparameters is added to the existing RJMCMC scheme of Section 2.4. New values for the level-2 hyperparameters x ∈{α, α, γ, γ} are proposed from a uniform distribution over a fixed interval. For a move x →˜x, the acceptance probability is: A(˜x|x) = min  P ({M1 i ,...,MKi i }p i=1|˜x,{α,α,γ,γ}\˜x) P ({M1 i ,...,MKi i }p i=1|x,{α,α,γ,γ}\x), 1 ff where {α, α, γ, γ} \ x corresponds to {α, γ, γ} if x designates hyperparameter α, and similarly for α, γ, γ. 3.3 Soft information coupling based on a binomial prior We can relax the information sharing scheme from a hard to a soft coupling by introducing node-specific hyperparameters ai, bi that are softly coupled via a common level-2 hyperprior, P(ai, bi|α, α, γ, γ) ∝a(α−1) i (1 −ai)(α−1)b(γ−1) i (1 −bi)(γ−1) , as illustrated in Figure 1(b): P(Mh i |Mh−1 i , ai, bi) = (ai)N1 1 [h,i](1 −ai)N0 1 [h,i](bi)N0 0 [h,i](1 −bi)N1 0 [h,i] (13) This leads to a straightforward modification of eq. (11) – replacing a, b by ai, bi – from which we get as an equivalent to (13), using the definition N l k[i] = PKi h=2 N l k[h, i]: P (M1 i , . . . , M Ki i |α, α, γ, γ) ∝Γ(α + α) Γ(α)Γ(α) Γ(N1 1 [i] + α)Γ(N0 1 [i] + α) Γ(N1 1 [i] + α + N0 1 [i] + α) Γ(γ + γ) Γ(γ)Γ(γ) Γ(N0 0 [i] + γ)Γ(N1 0 [i] + γ) Γ(N0 0 [i] + γ + N1 0 [i] + γ) (14) As in Section 3.2, we extend the RJMCMC scheme from Section 2.4 so that when proposing a new network structure, Mh i → ˜ Mh i , the acceptance probability has to be updated with the prior ratio: P (M1 i ,..., ˜ Mh i ,...,MKi i |α,α,γ,γ) P (M1 i ,...,Mh i ,...,MKi i |α,α,γ,γ). In addition, we have to add a new level-2 hyperparameter update move x →˜x, where the prior and proposal probabilities are the same as in Section 3.2, and the acceptance probability becomes: A(˜x|x) = min Qp i=1 P (M1 i ,...,MKi i |˜x,{α,α,γ,γ}\˜x) P (M1 i ,...,MKi i |x,{α,α,γ,γ}\x), 1 ff . 4 Results The methods described in this paper have been implemented in R, based on code from [6, 7]. Our program sets up an RJMCMC simulation to sample the network structure, the changepoints and the hyperparameters from the posterior distribution. As a convergence diagnostic we monitor the potential scale reduction factor (PSRF) [14], computed from the within-chain and between-chain variances of marginal edge posterior probabilities. Values of PSRF≤1.1 are usually taken as indication of sufficient convergence. In our simulations, we extended the burn-in phase until a value of 5 0.0 0.2 0.4 0.6 0.8 1.0 AUROC Score 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Same Segs Different Segs (a) AUROC Score Comparison 0.0 0.2 0.4 0.6 0.8 1.0 AUPRC Score 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Same Segs Different Segs (b) AUPRC Score Comparison Figure 2: Network reconstruction performance comparison of AUROC and AUPRC reconstruction scores for the four methods, HetDBN-0 (white), HetDBN-Exp (light grey), HetDBN-Bino1 (dark grey, left), HetDBN-Bino2 (dark grey, right). The boxplots show the distributions of the scores for 10 datasets with 4 network segments each, where the horizontal bar shows the median, the box margins show the 25th and 75th percentiles, the whiskers indicate data within 2 times the interquartile range, and circles are outliers. “Same Segs” means that all segments in a dataset have the same structure, while “Different Segs” indicates that structure changes are applied to the segments sequentially. PSRF≤1.05 was reached, and then sampled 1000 network and changepoint configurations in intervals of 200 RJMCMC steps. From these samples we compute the marginal posterior probabilities of all potential interactions, which defines a ranking of the edges in the recovered network. When the true network is known, this allows us to construct the Receiver Operating Characteristic (ROC) curve (plotting the sensitivity or recall against the complementary specificity) and the precisionrecall (PR) curve (plotting the precision against the recall), and to assess the network reconstruction accuracy in terms of the areas under these graphs (AUROC and AUPRC, respectively); see [15]. 4.1 Comparative evaluation on simulated data We randomly generated 10 networks with 10 nodes each, with the number of parents per node drawn from a Poisson distribution with mean λ = 3. To simulate changes in the network structure, we created 4 different network segments by drawing the number of changes from a Poisson distribution and applying the changes uniformly at random to edges and non-edges in the previous segment. For each segment, we generated a time series of length 15 using a linear regression model. The regression weights were drawn from a Gaussian N(0, 1), and Gaussian observation noise N(0, 1) was added. We compared the network reconstruction accuracy of the non-homogeneous DBN without information sharing proposed in [6, 7] (HetDBN-0) with the three information sharing approaches, based on the exponential prior from Section 3.1 (HetDBN-Exp), the binomial prior with hard node coupling from Section 3.2 (HetDBN-Bino1), and the binomial prior with soft node coupling from Section 3.3 (HetDBN-Bino2). Figures 2(a) and 2(b) shows the network reconstruction performance of the different information sharing methods in terms of AUROC and AUPRC scores. All information sharing methods show a clear improvement in network reconstruction over HetDBN-0, as confirmed by paired t-tests (p < 0.01). We investigated two different situations, the case where all segment structures are the same (although edge weights are allowed to vary) and the case where changes are applied sequentially to the segments3. Information sharing is most beneficial for the first case, but even when we introduce changes we still see an increase in the network reconstruction scores compared to HetDBN-0. When all segments are the same, HetDBN-Bino1 and HetDBNBino2 outperform HetDBN-Exp (p < 0.05), but there is no significant difference between the two binomial methods. Paired t-tests showed that all other differences in mean are significant. When the segments are different, all information sharing methods outperform HetDBN-0 (p < 0.05), but the difference between the information sharing methods is not significant. 4.2 Morphogenesis in Drosophila melanogaster We applied our methods to a gene expression time series for eleven genes involved in the muscle development of Drosophila melanogaster [16]. The microarray data measured gene expression levels during all four major stages of morphogenesis: embryo, larva, pupa and adult. We investigated whether our methods were able to infer the correct changepoints corresponding to the known transitions between stages. Figure 3(a) shows the posterior probabilities of inferred changepoints for any gene using HetDBN-0, while Figure 3(c) shows the posterior probabilities for the information shar3We chose to draw the number of changes from a Poisson with mean 1 for each node. 6 0 10 20 30 40 50 60 0.0 0.2 0.4 0.6 0.8 1.0 Timepoints Posterior Probability (a) Drosophila CPs with HetDBN-0 0 10 20 30 40 50 60 0 10 20 30 40 50 Timepoints Regression Parameter Difference (b) Drosophila CPs with TESLA 0 10 20 30 40 50 60 0.0 0.2 0.4 0.6 0.8 1.0 Timepoints Posterior Probability HetDBN−Exp HetDBN−Bino1 HetDBN−Bino2 (c) Drosophila CPs with HetDBN-Exp and HetDBN-Bino 0 5 10 15 20 25 30 35 0.0 0.2 0.4 0.6 0.8 1.0 Timepoints Posterior Probability HetDBN−0 HetDBN−Exp HetDBN−Bino1 HetDBN−Bino2 (d) Synthetic Network CPs with HetDBN Figure 3: Changepoints inferred on gene expression data related to morphogenesis in Drosophila melanogaster, and synthetic biology in Saccharomyces cerevisiae (yeast). All figures using HetDBN plot the posterior probability of a changepoint occurring for any node at a given time plotted against time. 3(a): HetDBN-0 changepoints for Drosophila (no information sharing) 3(b): TESLA, L1norm of the difference of the regression parameter vectors associated with two adjacent time points plotted against time. 3(c): HetDBN changepoints for Drosophila with information sharing; the method is indicated by the legend. 3(d) HetDBN changepoints for the synthetic gene regulatory network in yeast. In 3(a)-3(c), the vertical dotted lines indicate the three morphogenic transitions, while in 3(d) the line indicates the boundary between “switch on” and “switch off” data. ing methods. For comparison, we applied the method proposed in [3], using the authors’ software package TESLA (Figure 3(b)). Robinson and Hartemink applied the discrete non-homogeneous DBN in [1] to the same data set, and a plot corresponding to Figure 3(b) can be found in their paper. Our non-homogeneous DBN methods are generally more successful than TESLA, in that they recover changepoints for all three transitions (embryo →larva, larva →pupa, and pupa →adult). Figure 3(b) indicates that the last transition, pupa →adult, is less clearly detected with TESLA, and it is completely missing in [1]. Both our method as well as TESLA detect additional transitions during the embryo stage, which are missing in [1]. We would argue that a complex gene regulatory network is unlikely to transition into a new morphogenic phase all at once, and some pathways might have to undergo activational changes earlier in preparation for the morphogenic transition. As such, it is not implausible that additional transitions at the gene regulatory network level occur. However, a failure to detect known morphogenic transitions can clearly be seen as a shortcoming of a method, and on these grounds our model appears to outperform the two alternative ones. We note that the main effect of information sharing is to reduce the size of the smaller peaks, while keeping the three most salient peaks (corresponding to larva →pupa, and pupa →adult, and an extra transition in the embryo phase). This reflects the fact that these changepoints are associated with significant changes in network structure, and adds to the interpretability of the results. The drawback is that the third morphological transition (embryo →larva) is less pronounced. 4.3 Reconstruction of a synthetic gene regulatory network in Saccharomyces cerevisiae The highly topical field of synthetic biology enables biologists to design known gene regulatory networks in living cells. In the work described in [17], a synthetic regulatory network of 5 genes was constructed in Saccharomyces cerevisiae (yeast), and gene expression time series were measured with RT-PCR for 16 and 21 time points under two experimental conditions, related to the carbon source: galactose (“switch on”) and glucose (“switch off”). The authors tried to reconstruct the known gold-standard network from these time series with two established state-of-the-art methods from computational systems biology, one based on ordinary differential equations (ODEs), called 7 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Recall Precision HetDBN−0 HetDBN−Exp HetDBN−Bino1 HetDBN−Bino2 Precision−Recall for Switch On TSNI Banjo 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Recall Precision HetDBN−0 HetDBN−Exp HetDBN−Bino1 HetDBN−Bino2 Precision−Recall for Switch Off Banjo and TSNI Figure 4: Reconstruction of a known gene regulatory network from synthetic biology in yeast. The network was reconstructed from two gene expression time series obtained with RT-PCR in two experimental conditions, reflecting the switch in the carbon source from galactose (“switch on”) to glucose (“switch off”). The reconstruction accuracy of the methods proposed in Section 3, where the legend is explained, is shown in terms of precision (vertical axis) - recall (horizontal axis) curves. Results were averaged over 10 independent MCMC simulations. For comparison, fixed precision/recall scores are shown for two state-of-the-art methods reported in [17]: Banjo, a conventional DBN, and TSNI, a method based on ODEs. TSNI, the other based on conventional DBNs, called Banjo; see [17] for details. Both methods are optimization-based and output a single network. By comparison with the known gold standard, the authors obtained the precision (proportion of predicted interactions that are correct) and recall (proportion of predicted true interactions) scores. In our study, we merged the time series from the two experimental conditions under exclusion of the boundary point4, and applied the four nonhomogeneous DBNs described before. Figure 3(d) shows the inferred marginal posterior probability of potential changepoints. The most significant changepoint is at the boundary between “switch on” and “switch off” data, confirming that the known true changepoint is consistently identified. The biological mechanism behind the other peaks is not known, and they are potentially spurious. Interestingly, the application of the proposed information-coupling schemes reduces the height of these peaks, with the binomial models having a stronger effect than the exponential one. As we pursue a Bayesian inference scheme, we also obtain a ranking of the potential gene interactions in terms of their marginal posterior probabilities. From this we computed the precision-recall curves [15] shown in Figure 4. Our non-homogeneous DBNs with information sharing outperform Banjo and TSNI both in the “switch on” and the “switch off” phase. They also perform better than HetDBN-0 on the “switch off” data, but are slightly worse on the “switch on” data. Note that the reconstruction accuracy on the “switch off” data is generally poorer than on the “switch on” data [17]. Our results are thus plausible, suggesting that information sharing boosts the reconstruction accuracy on the poorer time series segment at the cost of a degraded performance on the stronger one. This effect is more pronounced for the exponential prior than for the binomial one, indicating a tighter coupling. The average areas under the PR curves, averaged over both phases (“switch on and off”), are as follows. HetDBN-0= 0.70, HetDBN-Exp= 0.77, HetDBN-Bino1= 0.75, HetDBNBino2= 0.75. Hence, the overall effect of information sharing is a performance improvement. 5 Conclusions We have described a non-homogeneous DBN, which has various advantages over existing schemes: it does not require the data to be discretized (as opposed to [1]); it allows the network structure to change with time (as opposed to [2]); it includes three different regularization schemes based on inter-time segment information sharing (as opposed to [6, 7]); and it allows all hyperparameters to be inferred from the data via a consistent Bayesian inference scheme (as opposed to [3]). An evaluation on simulated data has demonstrated an improved performance over [6, 7] when information sharing is introduced. The application of our method to gene expression time series taken during the life cycle of Drosophila melanogaster has revealed better agreement with known morphogenic transitions than the methods of [1] and [3]. We have carried out a comparative evaluation of different information coupling schemes: a binomial versus an exponential prior, and hard versus soft coupling. In an application to data from a topical study in synthetic biology, our methods have outperformed two established network reconstruction methods from computational systems biology. 4When merging two time series (x1, . . . , xm) and (y1, . . . , yn), only the pairs xi →xj and yi →yj are presented to the DBN, while the pair xm →y1 is excluded due to the obvious discontinuity. 8 References [1] J. W. Robinson and A. J. Hartemink. Non-stationary dynamic Bayesian networks. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems (NIPS), volume 21, pages 1369–1376. Morgan Kaufmann Publishers, 2009. [2] M. Grzegorczyk and D. Husmeier. Non-stationary continuous dynamic Bayesian networks. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems (NIPS), volume 22, pages 682–690. 2009. [3] A. Ahmed and E. P. Xing. Recovering time-varying networks of dependencies in social and biological studies. Proceedings of the National Academy of Sciences, 106:11878–11883, 2009. [4] M. Talih and N. 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. [5] X. Xuan and K. Murphy. Modeling changing dependency structure in multivariate time series. In Zoubin Ghahramani, editor, Proceedings of the 24th Annual International Conference on Machine Learning (ICML 2007), pages 1055–1062. Omnipress, 2007. [6] S. L`ebre. Stochastic process analysis for Genomics and Dynamic Bayesian Networks inference. PhD thesis, Universit´e d‘Evry-Val-d‘Essonne, France, 2007. [7] S. L`ebre, J. Becq, F. Devaux, G. Lelandais, and M.P.H. Stumpf. Statistical inference of the time-varying structure of gene-regulation networks. BMC Systems Biology, 4(130), 2010. [8] M. Kolar, L. Song, and E. Xing. Sparsistent learning of varying-coefficient models with structural changes. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems (NIPS), volume 22, pages 1006– 1014. 2009. [9] B. Larget and D. L. Simon. Markov chain Monte Carlo algorithms for the Bayesian analysis of phylogenetic trees. Molecular Biology and Evolution, 16(6):750–759, 1999. [10] C. Andrieu and A. Doucet. Joint Bayesian model selection and estimation of noisy sinusoids via reversible jump MCMC. IEEE Transactions on Signal Processing, 47(10):2667–2676, 1999. [11] P. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82:711–732, 1995. [12] A. Zellner. On assessing prior distributions and Bayesian regression analysis with g-prior distributions. In P. Goel and A. Zellner, editors, Bayesian Inference and Decision Techniques, pages 233–243. Elsevier, 1986. [13] A. V. Werhli and D. Husmeier. Gene regulatory network reconstruction by Bayesian integration of prior knowledge and/or different experimental conditions. Journal of Bioinformatics and Computational Biology, 6(3):543–572, 2008. [14] A. Gelman and D.B. Rubin. Inference from iterative simulation using multiple sequences. Statistical science, 7(4):457–472, 1992. [15] J. Davis and M. Goadrich. The relationship between precision-recall and ROC curves. In Proceedings of the 23rd international conference on Machine Learning, page 240. ACM, 2006. [16] M.N. Arbeitman, E.E.M. Furlong, F. Imam, E. Johnson, B.H. Null, B.S. Baker, M.A. Krasnow, M.P. Scott, R.W. Davis, and K.P. White. Gene expression during the life cycle of Drosophila melanogaster. Science, 297(5590):2270–2275, 2002. [17] I. Cantone, L. Marucci, F. Iorio, M. A Ricci, V. Belcastro, M. Bansal, S. Santini, M. di Bernardo, D. di Bernardo, and M. P Cosma. A yeast synthetic network for in vivo assessment of reverse-engineering and modeling approaches. Cell, 137(1):172181, 2009. 9
2010
164
3,926
Graph-Valued Regression Han Liu Xi Chen John Lafferty Larry Wasserman Carnegie Mellon University Pittsburgh, PA 15213 Abstract Undirected graphical models encode in a graph G the dependency structure of a random vector Y . In many applications, it is of interest to model Y given another random vector X as input. We refer to the problem of estimating the graph G(x) of Y conditioned on X = x as “graph-valued regression”. In this paper, we propose a semiparametric method for estimating G(x) that builds a tree on the X space just as in CART (classification and regression trees), but at each leaf of the tree estimates a graph. We call the method “Graph-optimized CART”, or GoCART. We study the theoretical properties of Go-CART using dyadic partitioning trees, establishing oracle inequalities on risk minimization and tree partition consistency. We also demonstrate the application of Go-CART to a meteorological dataset, showing how graph-valued regression can provide a useful tool for analyzing complex data. 1 Introduction Let Y be a p-dimensional random vector with distribution P. A common way to study the structure of P is to construct the undirected graph G = (V, E), where the vertex set V corresponds to the p components of the vector Y . The edge set E is a subset of the pairs of vertices, where an edge between Yj and Yk is absent if and only if Yj is conditionally independent of Yk given all the other variables. Suppose now that Y and X are both random vectors, and let P(· | X) denote the conditional distribution of Y given X. In a typical regression problem, we are interested in the conditional mean µ(x) = E (Y | X = x). But if Y is multivariate, we may be also interested in how the structure of P(· | X) varies as a function of X. In particular, let G(x) be the undirected graph corresponding to P(· | X = x). We refer to the problem of estimating G(x) as graph-valued regression. Let G = {G(x) : x ∈X} be a set of graphs indexed by x ∈X, where X is the domain of X. Then G induces a partition of X, denoted as X1, . . . , Xm, where x1 and x2 lie in the same partition element if and only if G(x1) = G(x2). Graph-valued regression is thus the problem of estimating the partition and estimating the graph within each partition element. We present three different partition-based graph estimators; two that use global optimization, and one based on a greedy splitting procedure. One of the optimization based schemes uses penalized empirical risk minimization, the other uses held-out risk minimization. As we show, both methods enjoy strong theoretical properties under relatively weak assumptions; in particular, we establish oracle inequalities on the excess risk of the estimators, and tree partition consistency (under stronger assumptions) in Section 4. While the optimization based estimates are attractive, they do not scale well computationally when the input dimension is large. An alternative is to adapt the greedy algorithms of classical CART, as we describe in Section 3. In Section 5 we present experimental results on both synthetic data and a meteorological dataset, demonstrating how graph-valued regression can be an effective tool for analyzing high dimensional data with covariates. 1 2 Graph-Valued Regression Let y1, . . . , yn be a random sample of vectors from P, where each yi ∈Rp. We are interested in the case where p is large and, in fact, may diverge with n asymptotically. One way to estimate G from the sample is the graphical lasso or glasso [13, 5, 1], where one assumes that P is Gaussian with mean µ and covariance matrix Σ. Missing edges in the graph correspond to zero elements in the precision matrix Ω= Σ−1 [12, 4, 7]. A sparse estimate of Ωis obtained by solving Ω= arg min Ω≻0  tr(SΩ) −log |Ω| + λ∥Ω∥1  (1) where Ωis positive definite, S is the sample covariance matrix, and ∥Ω∥1 =  j,k |Ωjk| is the elementwise ℓ1-norm of Ω. A fast algorithm for finding Ωwas given by Friedman et al. [5], which involves estimating a single row (and column) of Ωin each iteration by solving a lasso regression. The theoretical properties of Ωhave been studied by Rothman et al. [10] and Ravikumar et al. [9]. In practice, it seems that the glasso yields reasonable graph estimators even if Y is not Gaussian; however, proving conditions under which this happens is an open problem. We briefly mention three different strategies for estimating G(x), the graph of Y conditioned on X = x, each of which builds upon the glasso. Parametric Estimators. Assume that Z = (X, Y ) is jointly multivariate Gaussian with covariance matrix Σ = ΣX ΣXY ΣY X ΣY ! . We can estimate ΣX, ΣY , and ΣXY by their corresponding sample quantities ΣX, ΣY , and ΣXY , and the marginal precision matrix of X, denoted as ΩX, can be estimated using the glasso. The conditional distribution of Y given X = x is obtained by standard Gaussian formulas. In particular, the conditional covariance matrix of Y | X is ΣY |X = ΣY − ΣY X ΩX ΣXY and a sparse estimate of ΩY |X can be obtained by directly plugging ΣY |X into glasso. However, the estimated graph does not vary with different values of X. Kernel Smoothing Estimators. We assume that Y given X is Gaussian, but without making any assumption about the marginal distribution of X. Thus Y | X = x ∼N(µ(x), Σ(x)). Under the assumption that both µ(x) and Σ(x) are smooth functions of x, we estimate Σ(x) via kernel smoothing: Σ(x) = n  i=1 K ∥x −xi∥ h  (yi −µ(x)) (yi −µ(x))T  n  i=1 K ∥x −xi∥ h  where K is a kernel (e.g. the probability density function of the standard Gaussian distribution), ∥·∥ is the Euclidean norm, h > 0 is a bandwidth and µ(x) = n  i=1 K ∥x −xi∥ h  yi  n  i=1 K ∥x −xi∥ h  . Now we apply glasso in (1) with S = Σ(x) to obtain an estimate of G(x). This method is appealing because it is simple and very similar to nonparametric regression smoothing; the method was analyzed for one-dimensional X in [14]. However, while it is easy to estimate G(x) at any given x, it requires global smoothness of the mean and covariance functions. Partition Estimators. In this approach, we partition X into finitely many connected regions X1, . . . , Xm. Within each Xj, we apply the glasso to get an estimated graph Gj. We then take G(x) = Gj for all x ∈Xj. To find the partition, we appeal to the idea used in CART (classification and regression trees) [3]. We take the partition elements to be recursively defined hyperrectangles. As is well-known, we can then represent the partition by a tree, where each leaf node corresponds to a single partition element. In CART, the leaves are associated with the means within each partition element; while in our case, there will be an estimated undirected graph for each leaf node. We refer to this method as Graph-optimized CART, or Go-CART. The remainder of this paper is devoted to the details of this method. 3 Graph-Optimized CART Let X ∈Rd and Y ∈Rp be two random vectors, and let {(x1, y1), . . . , (xn, yn)} be n i.i.d. samples from the joint distribution of (X, Y ). The domains of X and Y are denoted by X and Y respectively; 2 and for simplicity we take X = [0, 1]d. We assume that Y | X = x ∼Np(µ(x), Σ(x)) where µ : Rd →Rp is a vector-valued mean function and Σ : Rd →Rp×p is a matrix-valued covariance function. We also assume that for each x, Ω(x) = Σ(x)−1 is a sparse matrix, i.e., many elements of Ω(x) are zero. In addition, Ω(x) may also be a sparse function of x, i.e., Ω(x) = Ω(xR) for some R ⊂{1, . . . , d} with cardinality |R| ≪d. The task of graph-valued regression is to find a sparse inverse covariance Ω(x) to estimate Ω(x) for any x ∈X; in some situations the graph of Ω(x) is of greater interest than the entries of Ω(x) themselves. Go-CART is a partition based conditional graph estimator. We partition X into finitely many connected regions X1, . . . , Xm, and within each Xj we apply the glasso to estimate a graph Gj. We then take G(x) = Gj for all x ∈Xj. To find the partition, we restrict ourselves to dyadic splits, as studied by [11, 2]. The primary reason for such a choice is the computational and theoretical tractability of dyadic partition based estimators. Let T denote the set of dyadic partitioning trees (DPTs) defined over X = [0, 1]d, where each DPT T ∈T is constructed by recursively dividing X by means of axis-orthogonal dyadic splits. Each node of a DPT corresponds to a hyperrectangle in [0, 1]d. If a node is associated to the hyperrectangle A = d l=1[al, bl], then after being dyadically split along dimension k, the two children are associated with the sub-hyperrectangles A(k) L = l<k[al, bl] × [ak, ak+bk 2 ] × l>k[al, bl] and A(k) R = A\A(k) L . Given a DPT T, we denote by Π(T) = {X1, . . . , XmT } the partition of X induced by the leaf nodes of T. For a dyadic integer N = 2K, we define TN to be the collection of all DPTs such that no partition has a side length smaller than 2−K. Let I(·) denote the indicator function. We denote µT (x) and ΩT (x) as the piecewise constant mean and precision functions associated with T: µT (x) = mT  j=1 µXj · I (x ∈Xj) and ΩT (x) = mT  j=1 ΩXj · I (x ∈Xj) , where µXj ∈Rp and ΩXj ∈Rp×p are the mean vector and precision matrix for Xj. Before formally defining our graph-valued regression estimators, we require some further definitions. Given a DPT T with an induced partition Π(T) = {Xj}mT j=1 and corresponding mean and precision functions µT (x) and ΩT (x), the negative conditional log-likelihood risk R(T, µT , ΩT ) and its sample version R(T, µT , ΩT ) are defined as follows: R(T, µT , ΩT ) = mT  j=1 E tr ΩXj (Y −µXj)(Y −µXj)T  −log |ΩXj|  · I (X ∈Xj)  , (2) R(T, µT , ΩT ) = 1 n n  i=1 mT  j=1 tr ΩXj (yi −µXj)(yi −µXj)T  −log |ΩXj|  · I (xi ∈Xj)  . (3) Let [[T]] > 0 denote a prefix code over all DPTs T ∈TN satisfying  T ∈TN 2−[[T ]] ≤1. One such prefix code [[T]] is proposed in [11], and takes the form [[T]] = 3|Π(T)| −1 + (|Π(T)| − 1) log d/ log 2. A simple upper bound for [[T]] is [[T]] ≤(3 + log d/ log 2)|Π(T)|. (4) Our analysis will assume that the conditional means and precision matrices are bounded in the ∥· ∥∞and ∥· ∥1 norms; specifically we suppose there is a positive constant B and a sequence L1,n, . . . , LmT ,n, where each Lj,n ∈R+ is a function of the sample size n, and we define the domains of each µXj and ΩXj as Mj = {µ ∈Rp : ∥µ∥∞≤B} , Λj =  Ω∈Rp×p : Ωis positive definite, symmetric, and ∥Ω∥1 ≤Lj,n  . (5) With this notation in place, we can now define two estimators. Definition 1. The penalized empirical risk minimization Go-CART estimator is defined as T,  µ b Xj, Ωb Xj m b T j=1 = argminT ∈TN,µXj ∈Mj,ΩXj ∈Λj  R(T, µT , ΩT ) + pen(T)  where R is defined in (3) and pen(T) = γn · mT  [[T ]] log 2+2 log(np) n . 3 Empirically, we may always set the dyadic integer N to be a reasonably large value; the regularization parameter γn is responsible for selecting a suitable DPT T ∈TN. We also formulate an estimator that minimizes held-out risk. Practically, we could split the data into two partitions: D1 = {(x1, y1), . . . , (xn1, yn1)} for training and D2 = {((x′ 1, y′ 1), . . . , (x′ n2, y′ n2))} for validation with n1 + n2 = n. The held-out negative log-likelihood risk is then given by Rout(T, µT , ΩT ) = 1 n2 n2  i=1 mT  j=1  tr ΩXj (y′ i −µXj)(y′ i −µXj)T  −log |ΩXj|  · I (x′ i ∈Xj)  . (6) Definition 2. For each DPT T define µT , ΩT = argminµXj ∈Mj,ΩXj ∈Λj R(T, µT , ΩT ) where R is defined in (3) but only evaluated on D1 = {(x1, y1), . . . , (xn1, yn1)}. The held-out risk minimization Go-CART estimator is T = argminT ∈TN Rout(T, µT , ΩT ). where Rout is defined in (6) but only evaluated on D2. The above procedures require us to find an optimal dyadic partitioning tree within TN. Although dynamic programming can be applied, as in [2], the computation does not scale to large input dimensions d. We now propose a simple yet effective greedy algorithm to find an approximate solution ( T, µT , ΩT ). We focus on the held-out risk minimization form as in Definition 2, due to its superior empirical performance. But note that our greedy approach is generic and can easily be adapted to the penalized empirical risk minimization form. First, consider the simple case that we are given a dyadic tree structure T which induces a partition Π(T)={X1, . . . , XmT } on X. For any partition element Xj, we estimate the sample mean using D1: µXj = 1 n1 i=1 I (xi ∈Xj) n1  i=1 yi · I (xi ∈Xj) . The glasso is then used to estimate a sparse precision matrix ΩXj. More precisely, let ΣXj be the sample covariance matrix for the partition element Xj, given by ΣXj = 1 n1 i=1 I (xi ∈Xj) n1  i=1 yi −µXj  yi −µXj T · I (xi ∈Xj) . The estimator ΩXj is obtained by optimizing ΩXj = arg minΩ≻0{tr(ΣXjΩ) −log |Ω| + λj∥Ω∥1}, where λj is in one-to-one correspondence with Lj,n in (5). In practice, we run the full regularization path of the glasso, from large λj, which yields very sparse graph, to small λj, and select the graph that minimizes the held-out negative log-likelihood risk. To further improve the model selection performance, we refit the parameters of the precision matrix after the graph has been selected. That is, to reduce the bias of the glasso, we first estimate the sparse precision matrix using ℓ1-regularization, and then we refit the Gaussian model without ℓ1-regularization, but enforcing the sparsity pattern obtained in the first step. The natural, standard greedy procedure starts from the coarsest partition X = [0, 1]d and then computes the decrease in the held-out risk by dyadically splitting each hyperrectangle A along dimension k ∈{1, . . . d}. The dimension k∗that results in the largest decrease in held-out risk is selected, where the change in risk is given by ∆R(k) out(A, µA, ΩA) = Rout(A, µA, ΩA) −Rout(A(k) L , µA(k) L , ΩA(k) L ) −Rout(A(k) R , µA(k) R , ΩA(k) R ). If splitting any dimension k of A leads to an increase in the held-out risk, the element A should no longer be split and hence becomes a partition element of Π(T). The details and pseudo code are provided in the supplementary materials. This greedy partitioning method parallels the classical algorithms for classification and regression that have been used in statistical learning for decades. However, the strength of the procedures given in Definitions 1 and 2 is that they lend themselves to a theoretical analysis under relatively weak assumptions, as we show in the following section. The theoretical properties of greedy Go-CART are left to future work. 4 4 Theoretical Properties We define the oracle risk R∗over TN as R∗= R(T ∗, µ∗ T , Ω∗ T ) = inf T ∈TN,µXj ∈Mj,ΩXj ∈Λj R(T, µT , ΩT ). Note that T ∗, µ∗ T ∗, and Ω∗ T ∗might not be unique, since the finest partition always achieves the oracle risk. To obtain oracle inequalities, we make the following two technical assumptions. Assumption 1. Let T ∈ TN be an arbitrary DPT which induces a partition Π(T) = {X1, . . . , XmT } on X, we assume that there exists a constant B, such that max 1≤j≤mT ∥µXj∥∞≤B and max 1≤j≤mT sup Ω∈Λj log |Ω| ≤Ln where Λj is defined in (5) and Ln = max1≤j≤mT Lj,n, where Lj,n is the same as in (5). We also assume that Ln = o(√n). Assumption 2. Let Y = (Y1, . . . , Yp)T ∈Rp. For any A ⊂X, we define Zkℓ(A) = YkYℓ· I(X ∈A) −E(YkYℓ· I(X ∈A)) Zj(A) = Yj · I(X ∈A) −E(Yj · I(X ∈A)). We assume there exist constants M1, M2, v1, and v2, such that sup k,ℓ,A E|Zkℓ(A)|m ≤m!M m−2 2 v2 2 and sup j,A E|Zj(A)|m ≤m!M m−2 1 v1 2 for all m ≥2. Theorem 1. Let T ∈TN be a DPT that induces a partition Π(T) = {X1, . . . , XmT } on X. For any δ ∈(0, 1/4), let T, µ b T , Ωb T be the estimator obtained using the penalized empirical risk minimization Go-CART in Definition 1, with a penalty term pen(T) of the form pen(T) = (C1 + 1)LnmT  [[T]] log 2 + 2 log p + log(48/δ) n where C1 = 8√v2 + 8B√v1 + B2. Then for sufficiently large n, the excess risk inequality R( T, µ b T , Ωb T ) −R∗≤inf T ∈TN  2pen(T) + inf µXj ∈Mj,ΩXj ∈Λj(R(T, µT , ΩT ) −R∗)  holds with probability at least 1 −δ. A similar oracle inequality holds when using the held-out risk minimization Go-CART. Theorem 2. Let T ∈TN be a DPT which induces a partition Π(T) = {X1, . . . , XmT } on X. We define φn(T) to be a function of n and T such that φn(T) = (C2 + √ 2)LnmT  [[T]] log 2 + 2 log p + log(384/δ) n where C2 = 8√2v2 + 8B√2v1 + √ 2B2 and Ln = max1≤j≤mT Lj,n. Partition the data into D1 = {(x1, y1), . . . , (xn1, yn1)} and D2 = {(x′ 1, y′ 1), . . . , (x′ n2, y′ n2)} with sizes n1 = n2 = n/2. Let T, µ b T , Ωb T be the estimator constructed using the held-out risk minimization criterion of Definition 2. Then, for sufficiently large n, the excess risk inequality R( T, µ b T , Ωb T ) −R∗≤inf T ∈TN  3φn(T) + inf µXj ∈Mj,ΩXj ∈Λj(R(T, µT , ΩT ) −R∗)  + φn( T) with probability at least 1 −δ. Note that in contrast to the statement in Theorem 1, Theorem 2 results in a stochastic upper bound due to the extra φn( T) term, which depends on the complexity of the final estimate T. Due to space limitations, the proofs of both theorems are detailed in the supplementary materials. We now temporarily make the strong assumption that the model is correct, so that Y given X is conditionally Gaussian, with a partition structure that is given by a dyadic tree. We show that with high probability, the true dyadic partition structure can be correctly recovered. 5 Assumption 3. The true model is Y | X = x ∼Np(µ∗ T ∗(x), Ω∗ T ∗(x)) (7) where T ∗∈TN is a DPT with induced partition Π(T ∗) = {X ∗ j }mT ∗ j=1 and µ∗ T ∗(x) = mT ∗  j=1 µ∗ j I(x ∈X ∗ j ), Ω∗ T ∗(x) = mT ∗  j=1 Ω∗ j I(x ∈X ∗ j ). Under this assumption, clearly R(T ∗, µ∗ T ∗, Ω∗ T ∗) = inf T ∈TN,µT ,ΩT ∈MT R(T, µT , ΩT ), where MT is given by MT =  µ(x) = mT  j=1 µXj I(x ∈Xj), Ω(x) = mT  j=1 ΩXj I(x ∈Xj) : µXj ∈Mj, ΩXj ∈Λj  . Let T1 and T2 be two DPTs, if Π(T1) can be obtained by further split the hyperrectangles within Π(T2), we say Π(T2) ⊂Π(T1). We then have the following definitions: Definition 3. A tree estimation procedure T is tree partition consistent in case P Π(T ∗) ⊂Π( T)  →1 as n →∞. Note that the estimated partition may be finer than the true partition. Establishing a tree partition consistency result requires further technical assumptions. The following assumption specifies that for arbitrary adjacent subregions of the true dyadic partition, either the means or the variances should be sufficiently different. Without such an assumption, of course, it is impossible to detect the boundaries of the true partition. Assumption 4. Let X ∗ i and X ∗ j be adjacent partition elements of T ∗, so that they have a common parent node within T ∗. Let Σ∗ X ∗ i = (Ω∗ X ∗ i )−1. We assume there exist positive constants c1, c2, c3, c4, such that either 2 log  Σ∗ X ∗ i + Σ∗ X ∗ j 2  −log |Σ∗ X ∗ i | −log |Σ∗ X ∗ j | ≥c4 or ∥µ∗ X ∗ i −µ∗ X ∗ j ∥2 2 ≥c3. We also assume ρmin(Ω∗ X ∗ j ) ≥c1, ∀j = 1, . . . , mT ∗, where ρmin(·) denotes the smallest eigenvalue. Furthermore, for any T ∈TN and any A ∈Π(T), we have P (X ∈A) ≥c2. Theorem 3. Under the above assumptions, we have inf T ∈TN, Π(T ∗)⊈Π(T ) inf µT , ΩT ∈MT R(T, µT , ΩT ) −R(T ∗, µ∗ T ∗, Ω∗ T ∗) > min{c1c2c3 2 , c2c4} where c1, c2, c3, c4 are defined in Assumption 4. Moreover, the Go-CART estimator in both the penalized risk minimization and held-out risk minimization form is tree partition consistent. This result shows that, with high probability, we obtain a finer partition than T ∗; the assumptions do not, however, control the size of the resulting partition. The proof of this result appears in the supplementary material. 5 Experiments We now present the performance of the greedy partitioning algorithm of Section 3 on both synthetic data and a real meteorological dataset. In the experiment, we always set the dyadic integer N = 210 to ensure that we can obtain fine-tuned partitions of the input space X. 5.1 Synthetic Data We generate n data points x1, . . . , xn ∈Rd with n = 10, 000 and d = 10 uniformly distributed on the unit hypercube [0, 1]d. We split the square [0, 1]2 defined by the first two dimension of the unit 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 X1< 0.5 X1> 0.5 X2< 0.5 X2> 0.5 X2< 0.5 X2> 0.5 X2< 0.25 X2> 0.25 X1< 0.75 X1> 0.75 X1< 0.25 X1> 0.25 X1< 0.25 X1> 0.25 X2< 0.75 X2> 0.75 X2< 0.75 X2> 0.75 X2< 0.125 X2> 0.125 X1< 0.375 X1> 0.375 X2< 0.625 X2> 0.625 X1< 0.875 X1> 0.875 X1< 0.125 X1> 0.125 X1< 0.125 X1> 0.125 X2< 0.375 X2> 0.375 X2< 0.375 X2> 0.375 X1< 0.625 X1> 0.625 X1< 0.625 X1> 0.625 X2< 0.875 X2> 0.875 X2< 0.875 X2> 0.875 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 6 13 14 17 18 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 0 5 10 15 20 25 20.8 20.9 21 21.1 21.2 21.3 Splitting Sequence No. Held−out Risk (a) (c) (b) Figure 1: Analysis of synthetic data. (a) Estimated dyadic tree structure; (b) Ground true partition. The horizontal axis corresponds to the first dimension denoted as X1 while the vertical axis corresponds to the second dimension denoted by X2. The bottom left point corresponds to [0, 0] and the upper right point corresponds to [1, 1]. It is also the induced partition on [0, 1]2. The number labeled on each subregion corresponds to each leaf node ID of the tree in (a); (c) The held-out negative log-likelihood risk for each split. The order of the splits corresponds the ID of the tree node (from small to large). hypercube into 22 subregions as shown in Figure 1 (b). For the t-th subregion where 1 ≤t ≤22, we generate an Erd¨os-R´enyi random graph Gt = (V t, Et) with the number of vertices p = 20, the number of edges |E| = 10 and the maximum node degree is four. Based on Gt, we generate the inverse covariance matrix Ωt according to Ωt i,j = I(i = j) + 0.245 · I((i, j) ∈Et), where 0.245 guarantees the positive definiteness of Ωt when the maximum node degree is 4. For each data point xi in the t-th subregion, we sample a 20-dimensional response vector yi from a multivariate Gaussian distribution N20 0, Ωt−1 . We also create an equally-sized held-out dataset in the same manner based on {Ωt}22 t=1. The learned dyadic tree structure and its induced partition are presented in Figure 1. We also provide the estimated graphs for some nodes. We conduct 100 monte-carlo simulations and find that 82 times out of 100 runs our algorithm perfectly recover the ground true partitions on the X1-X2 plane and never wrongly split any irrelevant dimensions ranging from X3 to X10. Moreover, the estimated graphs have interesting patterns. Even though the graphs within each subregion are sparse, the estimated graph obtained by pooling all the data together is highly dense. As the greedy algorithm proceeds, the estimated graphs become sparser and sparser. However, for the immediate parent of the leaf nodes, the graphs become denser again. Out of the 82 simulations where we correctly identify the tree structure, we list the graph estimation performance for subregions 28, 29, 13, 14, 5, 6 in terms of precision, recall, and F1-score in Table 1. Table 1: The graph estimation performance over different subregions Mean values over 100 runs (Standard deviation) subregion region 28 region 29 region 13 region 14 region 5 region 6 Precision 0.8327 (0.15) 0.8429 (0.15) 0.9853 (0.04) 0.9821 (0.05) 0.9906 (0.04) 0.9899 (0.05) Recall 0.7890 (0.16) 0.7990 (0.18) 1.0000 (0.00) 1.0000 (0.00) 1.0000 (0.00) 1.0000 (0.00) F1 −score 0.7880 (0.11) 0.7923 (0.12) 0.9921 (0.02) 0.9904 (0.03) 0.9949 (0.02) 0.9913 (0.02) We see that for a larger subregion (e.g. 13, 14, 5, 6), it is easier to obtain better recovery performance; while good recovery for a very small region (e.g. 28, 29) becomes more challenging. We also plot the held-out risk in the subplot (c). As can be seen, the first few splits lead to the most significant decreases of the held-out risk. The whole risk curve illustrates a diminishing return behavior. Correctly splitting the large rectangle leads to a significant decrease in the risk; in contrast, splitting the middle rectangles does not reduce the risk as much. We also conducted simulations where the true conditional covariance matrix is a continuous function of x; these are presented in the supplementary materials. 7 (a) (b) (c) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 CO2 CH4 CO H2 WET CLD VAP PRE FRS DTR TMN TMP TMX GLO DIR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 CO2 CH4 CO H2 WET CLD VAP PRE FRS DTR TMN TMP TMX GLO DIR CO2 CH4 CO H2 WET CLD VAP PRE FRS DTR TMN TMP TMX GLO DIR CO2 CH4 CO H2 WET CLD VAP PRE FRS DTR TMN TMP TMX GLO DIR Figure 2: Analysis of climate data. (a) Learned partitions for the 100 locations and projected to the US map, with the estimated graphs for subregions 3, 10, and 33; (b) Estimated graph with data pooled from all 100 locations; (c) the re-scaled partition pattern induced by the learned dyadic tree structure. 5.2 Climate Data Analysis In this section, we apply Go-CART on a meteorology dataset collected in a similar approach as in [8]. The data contains monthly observations of 15 different meteorological factors from 1990 to 2002. We use the data from 1990 to 1995 as the training data and data from 1996 to 2002 as the held-out validation data. The observations span 100 locations in the US between latitudes 30.475 to 47.975 and longitudes -119.75 to -82.25. The 15 meteorological factors measured for each month include levels of CO2, CH4, H2, CO, average temperature (TMP) and diurnal temperature range (DTR), minimum temperate (TMN), maximum temperature (TMX), precipitation (PRE), vapor (VAP), cloud cover (CLD), wet days (WET), frost days (FRS), global solar radiation (GLO), and direct solar radiation (DIR). As a baseline, we estimate a sparse graph on the data pooled from all 100 locations, using the glasso algorithm; the estimated graph is shown in Figure 2 (b). It is seen that the greenhouse gas factor CO2 is isolated from all the other factors. This apparently contradicts the basic domain knowledge that CO2 should be correlated with the solar radiation factors (including GLO, DIR), according to the IPCC report [6] which is one of the most authoritative reports in the field of meteorology. The reason for the missing edges in the pooled data may be that positive correlations at one location are canceled by negative correlations at other locations. Treating the longitude and latitude of each site as two-dimensional covariate X, and the meteorology data of the p = 15 factors as the response Y , we estimate a dyadic tree structure using the greedy algorithm. The result is a partition with 66 subregions, shown in Figure 2. The graphs for subregions 3 and 10 (corresponding to the coast of California and Arizona states) are shown in subplot (a) of Figure 2. The graphs for these two adjacent subregions are quite similar, suggesting spatial smoothness of the learned graphs. Moreover, for both graphs, CO2 is connected to the solar radiation factor GLO through CH4. In contrast, for subregion 33, which corresponds to the north part of Arizona, the estimated graph is quite different. In general, it is found that the graphs corresponding to the locations along the coasts are sparser than those corresponding to the locations in the mainland. Such observations, which require validation and interpretation by domain experts, are examples of the capability of graph-valued regression to provide a useful tool for high dimensional data analysis. 8 References [1] O. Banerjee, L. E. Ghaoui, and A. d’Aspremont. Model selection through sparse maximum likelihood estimation. Journal of Machine Learning Research, 9:485–516, March 2008. [2] G. Blanchard, C. Sch¨afer, Y. Rozenholc, and K.-R. M¨uller. Optimal dyadic decision trees. Mach. Learn., 66(2-3):209–241, 2007. [3] L. Breiman, J. Friedman, C. J. Stone, and R. Olshen. Classification and regression trees. Wadsworth Publishing Co Inc, 1984. [4] D. Edwards. Introduction to graphical modelling. Springer-Verlag Inc, 1995. [5] J. H. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2007. [6] IPCC. Climate Change 2007–The Physical Science Basis IPCC Fourth Assessment Report. [7] S. L. Lauritzen. Graphical Models. Oxford University Press, 1996. [8] A. C. Lozano, H. Li, A. Niculescu-Mizil, Y. Liu, C. Perlich, J. Hosking, and N. Abe. Spatialtemporal causal modeling for climate change attribution. In ACM SIGKDD, 2009. [9] P. Ravikumar, M. Wainwright, G. Raskutti, and B. Yu. Model selection in Gaussian graphical models: High-dimensional consistency of ℓ1-regularized MLE. In Advances in Neural Information Processing Systems 22, Cambridge, MA, 2009. MIT Press. [10] A. J. Rothman, P. J. Bickel, E. Levina, and J. Zhu. Sparse permutation invariant covariance estimation. Electronic Journal of Statistics, 2:494–515, 2008. [11] C. Scott and R. Nowak. Minimax-optimal classification with dyadic decision trees. Information Theory, IEEE Transactions on, 52(4):1335–1353, 2006. [12] J. Whittaker. Graphical Models in Applied Multivariate Statistics. Wiley, 1990. [13] M. Yuan and Y. Lin. Model selection and estimation in the Gaussian graphical model. Biometrika, 94(1):19–35, 2007. [14] S. Zhou, J. Lafferty, and L. Wasserman. Time varying undirected graphs. Machine Learning, 78(4), 2010. 9
2010
165
3,927
Probabilistic Multi-Task Feature Selection Yu Zhang1, Dit-Yan Yeung1, Qian Xu2 1Department of Computer Science and Engineering, 2Bioengineering Program Hong Kong University of Science and Technology {zhangyu,dyyeung}@cse.ust.hk, fleurxq@ust.hk Abstract Recently, some variants of the 푙1 norm, particularly matrix norms such as the 푙1,2 and 푙1,∞norms, have been widely used in multi-task learning, compressed sensing and other related areas to enforce sparsity via joint regularization. In this paper, we unify the 푙1,2 and 푙1,∞norms by considering a family of 푙1,푞norms for 1 < 푞≤∞and study the problem of determining the most appropriate sparsity enforcing norm to use in the context of multi-task feature selection. Using the generalized normal distribution, we provide a probabilistic interpretation of the general multi-task feature selection problem using the 푙1,푞norm. Based on this probabilistic interpretation, we develop a probabilistic model using the noninformative Jeffreys prior. We also extend the model to learn and exploit more general types of pairwise relationships between tasks. For both versions of the model, we devise expectation-maximization (EM) algorithms to learn all model parameters, including 푞, automatically. Experiments have been conducted on two cancer classification applications using microarray gene expression data. 1 Introduction Learning algorithms based on 푙1 regularization have a long history in machine learning and statistics. A well-known property of 푙1 regularization is its ability to enforce sparsity in the solutions. Recently, some variants of the 푙1 norm, particularly matrix norms such as the 푙1,2 and 푙1,∞norms, were proposed to enforce sparsity via joint regularization [24, 17, 28, 1, 2, 15, 20, 16, 18]. The 푙1,2 norm is the sum of the 푙2 norms of the rows and the 푙1,∞norm is the sum of the 푙∞norms of the rows. Regularizers based on these two matrix norms encourage row sparsity, i.e., they encourage entire rows of the matrix to have zero elements. Moreover, these norms have also been used for enforcing group sparsity among features in conventional classification and regression problems, e.g., group LASSO [29]. Recently, they have been widely used in multi-task learning, compressed sensing and other related areas. However, when given a specific application, we often have no idea which norm is the most appropriate choice to use. In this paper, we study the problem of determining the most appropriate sparsity enforcing norm to use in the context of multi-task feature selection [17, 15]. Instead of choosing between specific choices such as the 푙1,2 and 푙1,∞norms, we consider a family of 푙1,푞norms. We restrict 푞 to the range 1 < 푞≤∞to ensure that all norms in this family are convex, making it easier to solve the optimization problem formulated based on it. Within this family, the 푙1,2 and 푙1,∞norms are just two special cases. Using the 푙1,푞norm, we formulate the general multi-task feature selection problem and give it a probabilistic interpretation. It is noted that the automatic relevance determination (ARD) prior [9, 3, 26] comes as a special case under this interpretation. Based on this probabilistic interpretation, we develop a probabilistic formulation using a noninformative prior called the Jeffreys prior [10]. We devise an expectation-maximization (EM) algorithm [8] to learn all model parameters, including 푞, automatically. Moreover, an underlying assumption of existing multi-task feature selection methods is that all tasks are similar to each other and they share the same features. This assumption may not be correct in practice because there may exist outlier tasks 1 or tasks with negative correlation. As another contribution of this paper, we propose to use a matrix variate generalized normal prior [13] for the model parameters to learn the relationships between tasks. The task relationships learned here can be seen as an extension of the task covariance used in [4, 32, 31]. Experiments will be reported on two cancer classification applications using microarray gene expression data. 2 Multi-Task Feature Selection Suppose we are given 푚learning tasks {푇푖}푚 푖=1. For the 푖th task 푇푖, the training set 풟푖consists of 푛푖labeled data points in the form of ordered pairs (x푖 푗, 푦푖 푗), 푗= 1, . . . , 푛푖, with x푖 푗∈ℝ푑and its corresponding output 푦푖 푗∈ℝif it is a regression problem and 푦푖 푗∈{−1, 1} if it is a binary classification problem. The linear function for 푇푖is defined as 푓푖(x) = w푇 푖x + 푏푖. For applications that need feature selection, e.g., document classification, the feature dimensionality is usually very high and it has been found that linear methods usually perform better. The objective functions of most existing multi-task feature selection methods [24, 17, 28, 1, 2, 15, 20, 16, 18] can be expressed in the following form: 푚 ∑ 푖=1 푛푖 ∑ 푗=1 퐿(푦푖 푗, w푇 푖x푖 푗+ 푏푖) + 휆푅(W), (1) where W = (w1, . . . , w푚), 퐿(⋅, ⋅) denotes the loss function (e.g., squared loss for regression and hinge loss for classification), 푅(⋅) is the regularization function that enforces feature sparsity under the multi-task setting, and 휆is the regularization parameter controlling the relative contribution of the empirical loss and the regularizer. Multi-task feature selection seeks to minimize the objective function above to obtain the optimal parameters {w푖, 푏푖}. Two regularization functions are widely used in existing multi-task feature selection methods. One of them is based on the 푙1,2 norm of W [17, 28, 1, 2, 16, 18]: 푅(W) = ∑푑 푘=1 ∥w푘∥2 where ∥⋅∥푞denotes the 푞-norm (or 푙푞norm) of a vector and w푘denotes the 푘th row of W. Another one is based on the 푙1,∞norm of W [24, 15, 20]: 푅(W) = ∑푑 푘=1 ∥w푘∥∞. In this paper, we unify these two cases by using the 푙1,푞norm of W to define a more general regularization function: 푅(W) = 푑 ∑ 푘=1 ∥w푘∥푞, 1 < 푞≤∞. Note that when 푞< 1, 푅(W) is non-convex with respect to W. Although 푅(W) is convex when 푞= 1, each element of W is independent of each other and so the regularization function cannot enforce feature sparsity. Thus we restrict the range to 1 < 푞≤∞. Even though restricting the range to 1 < 푞≤∞can enforce feature sparsity between different tasks, different values of 푞imply different ‘group discounts’ for sharing the same feature. Specifically, when 푞approaches 1, the cost grows almost linearly with the number of tasks that use a feature, and when 푞= ∞, only the most demanding task matters. So selecting a proper 푞can potentially have a significant effect on the performance of the learning algorithms. In the following, we first give a probabilistic interpretation for multi-task feature selection methods. Based on this probabilistic interpretation, we then develop a probabilistic model which, among other things, can solve the model selection problem automatically by estimating 푞from data. 3 Probabilistic Interpretation In this section, we will show that existing multi-task feature selection methods are related to the maximum a posteriori (MAP) solution of a probabilistic model. This probabilistic interpretation sets the stage for introducing our probabilistic model in the next section. We first introduce the generalized normal distribution [11] which is useful for the model to be introduced. 2 Definition 1 푧is a univariate generalized normal random variable iff its probability density function (p.d.f.) is given as follows: 푝(푧) = 1 2휌Γ(1 + 1 푞) exp ( −∣푧−휇∣푞 휌푞 ) , where Γ(⋅) denotes the Gamma function and ∣⋅∣denotes the absolute value of a scalar. For simplicity, if 푧is a univariate generalized normal random variable, we write 푧∼풢풩(휇, 휌, 푞). The (ordinary) normal distribution can be viewed as a special case of the generalized normal distribution when 푞= 2 and the Laplace distribution is a special case when 푞= 1. When 푞approaches +∞, the generalized normal distribution approaches the uniform distribution in the range [휇−휌, 휇+ 휌]. The generalized normal distribution has proven useful in Bayesian analysis and robustness studies. Definition 2 A standardized 푟× 1 multivariate generalized normal random variable z = (푧1, . . . , 푧푟)푇consists of 푟independent and identically distributed (i.i.d.) univariate generalized normal random variables. If z is a standardized 푟× 1 multivariate generalized normal random variable, we write z ∼ ℳ풢풩(휇, 휌, 푞) with the following p.d.f.: 푝(z) = 1 [ 2휌Γ(1 + 1 푞) ]푟exp ( − ∑푟 푖=1 ∣푧푖−휇∣푞 휌푞 ) . With these definitions, we now begin to present our probabilistic interpretation for multi-task feature selection by proposing a probabilistic model. For notational simplicity, we assume that all tasks perform regression. Extension to include classification tasks will go through similar derivation. For a regression problem, we use the normal distribution to define the likelihood for x푖 푗: 푦푖 푗∼풩(w푇 푖x푖 푗+ 푏푖, 휎2), (2) where 풩(휇, 푠2) denotes the (univariate) normal distribution with mean 휇and variance 푠2. We impose the generalized normal prior on each element of W: 푤푖푗∼풢풩(0, 휌푖, 푞), (3) where 푤푖푗is the (푖, 푗)th element of W (or, equivalently, the 푖th element of w푗or the 푗th element of w푖). Then we can express the prior on w푖as (w푖)푇∼ℳ풢풩(0, 휌푖, 푞). When 푞= 2, this becomes the ARD prior [9, 3, 26] commonly used in Bayesian methods for enforcing sparsity. From this view, the generalized normal prior can be viewed as a generalization of the ARD prior. With the above likelihood and prior, we can obtain the MAP solution of W by solving the following problem: min W,b,흆퐽= 1 휎2 푚 ∑ 푖=1 푛푖 ∑ 푗=1 퐿(푦푖 푗, w푇 푖x푖 푗+ 푏푖) + 푑 ∑ 푖=1 (∥w푖∥푞 푞 휌푞 푖 + 푚ln 휌푖 ) , (4) where b = (푏1, . . . , 푏푚)푇and 흆= (휌1, . . . , 휌푚)푇. We set the derivative of 퐽with respect to 휌푖to zero and get 휌푖= ( 푞 푚 )1/푞 ∥w푖∥푞. Plugging this into problem (4), the optimization problem can be reformulated as min W,b 퐽= 1 휎2 푚 ∑ 푖=1 푛푖 ∑ 푗=1 퐿(푦푖 푗, w푇 푖x푖 푗+ 푏푖) + 푚 푑 ∑ 푖=1 ln ∥w푖∥푞. (5) Note that problem (5) is non-convex since the second term is non-convex with respect to W. Because ln 푧≤푧−1 for any 푧> 0, problem (5) can be relaxed to problem (1) by setting 휆= 푚휎2. 3 So the solutions of multi-task feature selection methods can be viewed as the solution of the relaxed optimization problem above. In many previous works such as [5, 27], ln(푥) can be used as an approximation of 퐼(푥∕= 0) where 퐼(⋅) is an indicator function. Using this view, we can regard the second term in problem (5) as an approximation of the number of rows with nonzero 푞-norms. Note that we can directly solve problem (5) using a majorization-minimization (MM) algorithm [14]. For numerical stability, we can slightly modify the objective function in problem (5) by replacing the second term with 푚∑푑 푖=1 ln(∥w푖∥푞+훼) where 훼can be regarded as a regularization parameter. We denote the solution obtained in the 푘th iteration as w푖 (푘). In the (푘+ 1)th iteration, due to the concavity property of ln(⋅), we can bound the second term in problem (5) as follows 푑 ∑ 푖=1 ln(∥w푖∥푞+ 훼) ≤ 푑 ∑ 푖=1 [ ln(∥w푖 (푘)∥푞+ 훼) + ∥w푖∥푞−∥w푖 (푘)∥푞 ∥w푖 (푘)∥푞+ 훼 ] . Thus, in the (푘+ 1)th iteration, we need to solve a weighted version of problem (1): min W,b 1 휎2 푚 ∑ 푖=1 푛푖 ∑ 푗=1 퐿(푦푖 푗, w푇 푖x푖 푗+ 푏푖) + 푚 푑 ∑ 푖=1 ∥w푖∥푞 ∥w푖 (푘)∥푞+ 훼. According to [14], the MM algorithm is guaranteed to converge to a local optimum. 4 A Probabilistic Framework for Multi-Task Feature Selection In the probabilistic interpretation above, we use a type II method to estimate {휌푖} in the generalized normal prior which can be viewed as a generalization of the ARD prior. In the ARD prior, according to [19], this approach is likely to lead to overfitting because the hyperparameters in the ARD prior are treated as points. Similar to the ARD prior, the model in the above section may overfit since {휌푖} are estimated via point estimation. In the following, we will present our probabilistic framework for multi-task feature selection by imposing priors on the hyperparameters. 4.1 The Model As in the above section, the likelihood for x푖 푗is also defined based on the normal distribution: 푦푖 푗∼풩(w푇 푖x푖 푗+ 푏푖, 휎2 푖). (6) Here we use different noise variances 휎푖for different tasks to make our model more flexible. The prior on W is also defined similarly: 푤푖푗∼풢풩(0, 휌푖, 푞). (7) The main difference here is that we treat 휌푖as a random variable with the noninformative Jeffreys prior: 푝(휌푖) ∝ √ 퐼(휌푖) = √ 피w푖∣휌푖 [(∂ln 푝(w푖∣휌푖) ∂휌푖 )2] ∝1 휌푖, (8) where 퐼(휌푖) denotes the Fisher information for 휌푖and 피휃[⋅] denotes the expectation with respect to 휃. One advantage of using the Jeffreys prior is that the distribution has no hyperparameters. 4.2 Parameter Learning and Inference Here we use the EM algorithm [8] to learn the model parameters. In our model, we denote Θ = {W, b, {휎푖}, 푞} as the model parameters and 흆= (휌1, . . . , 휌푑)푇as the hidden variables. In the E-step, we construct the so-called 푄-function as the surrogate for the log-likelihood: 푄(Θ∣Θ(푘)) = ∫ ln 푝(Θ∣y, 흆)푝(흆∣y, Θ(푘))푑흆, where Θ(푘) denotes the estimate of Θ in the 푘th iteration and y = (푦1 1, . . . , 푦푚 푛푚)푇. It is easy to show that ln 푝(Θ∣y, 흆) ∝ln 푝(y∣W, {휎푖}) + ln 푝(W∣흆) ∝− 푚 ∑ 푖=1 [ 푛푖 ∑ 푗=1 (푦푖 푗−w푇 푖x푖 푗−푏푖)2 2휎2 푖 + 푛푖ln 휎2 푖 2 ] − 푑 ∑ 푖=1 1 휌푞 푖 푚 ∑ 푗=1 ∣푤푖푗∣푞−푚푑ln Γ(1 + 1 푞) 4 and 푝(흆∣y, Θ(푘)) ∝∏푑 푖=1 ( 푝(휌푖)푝(w푖 (푘)∣휌푖) ) . We then compute 피[ 1 휌푞 푖∣y, Θ(푘)] as 피 [ 1 휌푞 푖 y, Θ(푘)] = ∫∞ 0 1 휌푞 푖푝(휌푖)푝(w푖 (푘)∣휌푖)푑휌푖 ∫∞ 0 푝(휌푖)푝(w푖 (푘)∣휌푖)푑휌푖 = 푚 푞∥w푖 (푘)∥푞 푞. So we can get 푄(Θ∣Θ(푘)) = − 푚 ∑ 푖=1 [ 푛푖 ∑ 푗=1 (푦푖 푗−w푇 푖x푖 푗−푏푖)2 2휎2 푖 + 푛푖ln 휎2 푖 2 ] − 푑 ∑ 푖=1 훽푖 푚 ∑ 푗=1 ∣푤푖푗∣푞−푚푑ln Γ(1 + 1 푞), where 훽푖= 푚 푞∥w푖 (푘)∥푞 푞. In the M-step, we maximize 푄(Θ∣Θ(푘)) to update the estimates of W, b, {휎푖} and 푞. For the estimation of W, we need to solve 푚convex optimization problems min w푖 퐽= 훽0∥ˆy푖−X푇 푖w푖∥2 2 + 푑 ∑ 푗=1 훽푗∣푤푗푖∣푞, 푖= 1, . . . , 푚, (9) where ˆy푖= (푦푖 1 −푏(푘) 푖 , . . . , 푦푖 푛푖−푏(푘) 푖 )푇, X푖= (x푖 1, . . . , x푖 푛푖), and 훽0 = 1 2(휎(푘) 푖 )2 . When 푞= 2, this becomes the conventional ridge regression problem. Here 훽푗is related to the sparsity of the 푗th row in W(푘): the more sparse the 푗th row in W(푘), the larger the 훽푗. When 훽푗is large, 푤푗푖 will be enforced to approach 0. We use a gradient method such as conjugate gradient to optimize problem (9). The subgradient with respect to w푖is ∂퐽 ∂w푖= 2훽0 ( X푖X푇 푖w푖−X푖ˆy푖 ) + 푞휽, where 휽= (훽1∣푤1푖∣푞−1sign(푤1푖), . . . , 훽푑∣푤푑푖∣푞−1sign(푤푑푖))푇and sign(⋅) denotes the sign function. We set the derivatives of 푄(Θ∣Θ(푘)) with respect to 휎푖and 푏푖to 0 and get 푏(푘+1) 푖 = 1 푛푖 푛푖 ∑ 푗=1 [ 푦푖 푗−(w(푘+1) 푖 )푇x푖 푗 ] 휎(푘+1) 푖 = v u u ⎷1 푛푖 푛푖 ∑ 푗=1 [ 푦푖 푗−(w(푘+1) 푖 )푇x푖 푗−푏(푘+1) 푖 ]2 . For the estimation of 푞, we also use a gradient method. The gradient can be calculated as ∂푄 ∂푞= − 푑 ∑ 푖=1 훽푗 푚 ∑ 푗=1,푤(푘+1) 푖푗 ∕=0 푤(푘+1) 푖푗 푞ln 푤(푘+1) 푖푗 + 푚푑 푞 + 푚푑 푞2 휓(1 푞), where 휓(푥) ≡∂ln Γ(푥) ∂푥 is the digamma function. 4.3 Extension to Deal with Outlier Tasks and Tasks with Negative Correlation An underlying assumption of multi-task feature selection using the 푙1,푞norm is that all tasks are similar to each other and they share the same features. This assumption may not be correct in practice because there may exist outlier tasks (i.e., tasks that are not related to all other tasks) or tasks with negative correlation (i.e., tasks that are negatively correlated with some other tasks). In this section, we will discuss how to extend our probabilistic model to deal with these tasks. We first introduce the matrix variate generalized normal distribution [13] which is a generalization of the generalized normal distribution to random matrices. Definition 3 A matrix Z ∈ℝ푠×푡is a matrix variate generalized normal random variable iff its p.d.f. is given as follows: 푝(Z∣M, Σ, Ω, 푞) = 1 [ 2Γ(1 + 1 푞) ]푠푡det(Σ)푡det(Ω)푠exp [ − 푠 ∑ 푖=1 푡 ∑ 푗=1 푠 ∑ 푘=1 푡 ∑ 푙=1 (Σ−1)푖푘(푍푘푙−푀푘푙)(Ω−1)푙푗 푞] , where Σ ∈ℝ푠×푠and Ω ∈ℝ푡×푡are nonsingular, det(⋅) denotes the determinant of a square matrix, 퐴푖푗is the (푖, 푗)th element of matrix A and (퐴−1)푖푗is the (푖, 푗)th element of the matrix inverse A−1. 5 We write Z ∼ℳ풱풢풩(M, Σ, Ω, 푞) for a matrix variate generalized normal random variable Z. When 푞= 2, the matrix variate generalized normal distribution becomes the (ordinary) matrix variate normal distribution [12] with row covariance matrix ΣΣ푇and column covariance matrix ΩΩ푇, which has been used before in multi-task learning [4, 32, 31]. From this view, Σ is used to model the relationships between the rows of Z and Ω is to model the relationships between the columns. We note that the prior on W in Eq. (7) can be written as W ∼ℳ풱풢풩(0, diag ( (휌1, . . . , 휌푑)푇) , I푚, 푞), where 0 denotes a zero vector or matrix of proper size, I푚denotes the 푚× 푚identity matrix and diag(⋅) converts a vector into a diagonal matrix. In this formulation, it can be seen that the columns of W (and hence the tasks) are independent of each other. However, the tasks are in general not independent. So we propose to use a new prior on W: W ∼ℳ풱풢풩(0, diag ( (휌1, . . . , 휌푑)푇) , Ω, 푞), (10) where Ω models the pairwise relationships between tasks. The likelihood is still based on the normal distribution. Since in practice the relationships between tasks are not known in advance, we also need to estimate Ω from data. For parameter learning, we again use the EM algorithm to learn the model parameters. Here the model parameters are denoted as Θ = {W, b, {휎푖}, 푞, Ω}. It is easy to show that ln 푝(Θ∣y, 흆) ∝− 푚 ∑ 푖=1 [ 푛푖 ∑ 푗=1 (푦푖 푗−w푇 푖x푖 푗−푏푖)2 2휎2 푖 + 푛푖ln 휎2 푖 2 ] − 푑 ∑ 푖=1 1 휌푞 푖 푚 ∑ 푗=1 푚 ∑ 푙=1 푊푖푙(Ω−1)푙푗 푞 −푚푑ln Γ(1 + 1 푞) −푑ln det(Ω). Then we compute 피[ 1 휌푞 푖∣y, Θ(푘)] as 피 [ 1 휌푞 푖 y, Θ(푘)] = ∫∞ 0 1 휌푞 푖푝(휌푖)푝(w푖 (푘)∣휌푖)푑휌푖 ∫∞ 0 푝(휌푖)푝(w푖 (푘)∣휌푖)푑휌푖 = 푚 푞∑푚 푗=1 ∑푚 푙=1 푊(푘) 푖푙 ( (Ω(푘))−1) 푙푗 푞≡훼(푘) 푖 . In the E-step, the 푄-function can be formulated as 푄(Θ∣Θ(푘)) = − 푚 ∑ 푖=1 [ 푛푖 ∑ 푗=1 (푦푖 푗−w푇 푖x푖 푗−푏푖)2 2휎2 푖 + 푛푖ln 휎2 푖 2 ] − 푑 ∑ 푖=1 훼(푘) 푖 푚 ∑ 푗=1 푚 ∑ 푙=1 푊푖푙(Ω−1)푙푗 푞 −푚푑ln Γ(1 + 1 푞) −푑ln det(Ω). In the M-step, for W and Ω, the optimization problem becomes min W,Ω 푚 ∑ 푖=1 훾(푘) 푖 푛푖 ∑ 푗=1 (ˆ푦푖 푗−w푇 푖x푖 푗)2 + 푑 ∑ 푖=1 훼(푘) 푖 푚 ∑ 푗=1 푚 ∑ 푙=1 푊푖푙(Ω−1)푙푗 푞 + 푑ln det(Ω), where 훾(푘) 푖 = 1 2(휎(푘) 푖 )2 . We define a new variable ˆ W = WΩ−1 to rewrite the above problem as min ˆ W,Ω 퐹= 푚 ∑ 푖=1 훾(푘) 푖 푛푖 ∑ 푗=1 (ˆ푦푖 푗−e푇 푖Ω푇ˆ W푇x푖 푗)2 + 푑 ∑ 푖=1 훼(푘) 푖 푚 ∑ 푗=1 ∣ˆ푤푖푗∣푞+ 푑ln det(Ω), where e푖denotes the 푖th column of the 푚× 푚identity matrix. We use an alternating method to solve this problem. For a fixed Ω, the problem with respect to ˆ W is a convex problem and we use conjugate gradient to solve it with the following subgradient ∂퐹 ∂ˆ W = 2 푚 ∑ 푖=1 훾(푘) 푖 푛푖 ∑ 푗=1 [ x푖 푗(x푖 푗)푇ˆ WΩe푖e푇 푖Ω푇−푦푖 푗x푖 푗e푇 푖Ω푇] + 푞M, where M is a 푑× 푚matrix with the (푖, 푗)th element 훼(푘) 푖 ∣ˆ푤푖푗∣푞−1sign( ˆ푤푖푗). For a fixed ˆ W, we also use conjugate gradient with the following gradient ∂퐹 ∂Ω = 2 푚 ∑ 푖=1 훾(푘) 푖 푛푖 ∑ 푗=1 [ ˆ W푇x푖 푗(x푖 푗)푇ˆ WΩe푖e푇 푖−푦푖 푗ˆ W푇x푖 푗e푇 푖 ] + 푑(Ω푇)−1. After obtaining the optimal ˆ W★and Ω★, we can compute the optimal W★as W★= ˆ W★Ω★. The update rules for {휎푖}, {푏푖} and 푞are similar to those in the above section. 6 5 Related Work Some probabilistic multi-task feature selection methods have been proposed before [28, 2]. However, they only focus on the 푙1,2 norm. Moreover, they use point estimation in the ARD prior and hence, as discussed in Section 3, are susceptible to overfitting [19]. Zhang et al. [30] proposed a latent variable model for multi-task learning by using the Laplace prior to enforce sparsity. This is equivalent to using the 퐿1,1 norm in our framework which, as discussed above, cannot enforce group sparsity among different features over all tasks. 6 Experiments In this section, we study our methods empirically on two cancer classification applications using microarray gene expression data. We compare our methods with three related methods: multi-task feature learning (MTFL) [1]1, multi-task feature selection using 푙1,2 regularization [16]2, and multitask feature selection using 푙1,∞regularization [20]3. 6.1 Breast Cancer Classification We first conduct empirical study on a breast cancer classification application. This application consists of three learning tasks with data collected under different platforms [21]. The dataset for the first task, collected at the Koo Foundation Sun Yat-Sen Cancer Centre in Taipei, contains 89 samples with 8948 genes per sample. The dataset for the second task, obtained from the Netherlands Cancer Institute, contains 97 samples with 16360 genes per sample. Most of the patients in this dataset had stage I or II breast cancer. The dataset for the third task, obtained using 22K Agilent oligonucleotide arrays, contains 114 samples with 12065 genes per sample. Even though these three datasets were collected under different platforms, they share 6092 common genes which are used in our experiments. Here we abbreviate the method in Section 4.2 as PMTFS1 and that in Section 4.3 as PMTFS2. For each task, we choose 70% of the data for training and the rest for testing. We perform 10 random splits of the data and report the mean and standard derivation of the classification error over the 10 trials. The results are summarized in Table 1. It is clear that PMTFS1 outperforms the three previous methods, showing the effectiveness of our more general formulation with 푞determined automatically. Moreover, we also note that PMTFS2 is better than PMTFS1. This verifies the usefulness of exploiting the relationships between tasks in multi-task feature selection. Since our methods can estimate 푞automatically, we compute the mean of the estimated 푞values over 10 trials. The means for PMTFS1 and PMTFS2 are 2.5003 and 2.6718, respectively, which seem to imply that smaller values of 푞are preferred for this application. This probably explains why the performance of MTFS1,∞is not good when compared with other methods. Table 1: Comparison of different methods on the breast cancer classification application in terms of classification error rate (in mean±std-dev). Each column in the table represents one task. Method 1st Task 2nd Task 3rd Task MTFL 0.3478±0.1108 0.0364±0.0345 0.3091±0.0498 MTFS1,2 0.3370±0.0228 0.0343±0.0134 0.2855±0.0337 MTFS1,∞ 0.3896±0.0583 0.1136±0.0579 0.2909±0.0761 PMTFS1 0.3072±0.0234 0.0298±0.0121 0.1786±0.0245 PMTFS2 0.2870±0.0228 0.0273±0.0102 0.1455±0.0263 6.2 Prostate Cancer Classification We next study a prostate cancer classification application consisting of two tasks. The Singh dataset [22] for the first task is made up of laser intensity images from each microarray. The RMA preprocessing method was used to produce gene expression values from these images. On the other 1http://ttic.uchicago.edu/∼argyriou/code/index.html 2http://www.public.asu.edu/∼jye02/Software/SLEP/index.htm 3http://www.lsi.upc.edu/∼aquattoni/ 7 hand, the Welsh dataset [25] for the second task is already in the form of gene expression values. Even though the collection techniques for the two datasets are different, they have 12600 genes in common and are used in our experiments. The experimental setup for this application is similar to that in the previous subsection, that is, 70% of the data of each task are used for training and the rest for testing, and 10 random splits of the data are performed. We report the mean and standard derivation of the classification error over the 10 trials in Table 2. As in the first set of experiments, PMTFS1 and PMTFS2 are better than the other three methods compared and PMTFS2 slightly outperforms PMTFS1. The means of the estimated 푞values for PMTFS1 and PMTFS2 are 2.5865 and 2.6319, respectively. So it seems that smaller values are also preferred for this application. Table 2: Comparison of different methods on the prostate cancer classification application in terms of classification error rate (in mean±std-dev). Each column in the table represents one task. Method 1st Task 2nd Task MTFL 0.1226±0.0620 0.3500±0.0085 MTFS1,2 0.1232±0.0270 0.3420±0.0067 MTFS1,∞ 0.2216±0.1667 0.4200±0.1304 PMTFS1 0.1123±0.0170 0.3214±0.0053 PMTFS2 0.1032±0.0136 0.3000±0.0059 7 Concluding Remarks In this paper, we have proposed a probabilistic framework for general multi-task feature selection using the 푙1,푞norm (1 < 푞≤∞). Our model allows the optimal value of 푞to be determined from data automatically. Besides considering the case in which all tasks are similar, we have also considered the more general and challenging case in which there also exist outlier tasks or tasks with negative correlation. Compressed sensing aims at recovering the sparse signal w from a measurement vector b = Aw for a given matrix A. Compressed sensing can be extended to the multiple measurement vector (MMV) model in which the signals are represented as a set of jointly sparse vectors sharing a common set of nonzero elements [7, 6, 23]. Specifically, joint compressed sensing considers the reconstruction of the signal represented by a matrix W, which is given by a dictionary (or measurement matrix) A and multiple measurement vector B such that B = AW. Similar to multi-task feature selection, we can use ∥W∥1,푞to enforce the joint sparsity in W. Since there usually exists noise in the data, the optimization problem of MMV can be formulated as: minW 휆∥W∥1,푞+ ∥AW −B∥2 2. This problem is almost identical to problem (1) except that the loss defines the reconstruction error rather than the prediction error. So we can use the probabilistic model presented in Section 4 to develop a probabilistic model for joint compressed sensing. Besides, we are also interested in developing a full Bayesian version of our model to further exploit the advantages of Bayesian modeling. Acknowledgment This research has been supported by General Research Fund 622209 from the Research Grants Council of Hong Kong. References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] J. Bi, T. Xiong, S. Yu, M. Dundar, and R. B. Rao. An improved multi-task learning approach with applications in medical diagnosis. In ECMLPKDD, 2008. [3] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, New York, 2006. [4] E. Bonilla, K. M. A. Chai, and C. Williams. Multi-task Gaussian process prediction. In NIPS 20, 2008. [5] E. J. Cand`es, M. B. Wakin, and S. P. Boyd. Enhancing sparsity by reweighted 푙1 minimization. Journal of Fourier Analysis and Applications, 14(5):877–905, 2008. 8 [6] J. Chen and X. Huo. Theoretical results on sparse representations of multiple-measurement vectors. IEEE Transactions on Signal Processing, 54(12):4634–4643, 2006. [7] S. F. Cotter, B. D. Rao, K. Engan, and K. Kreutz-Delgado. Sparse solutions to linear inverse problems with multiple measurement vectors. IEEE Transactions on Signal Processing, 53(7):2477–2488, 2005. [8] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistic Society, B, 39(1):1–38, 1977. [9] M. A. T. Figueiredo. Adaptive sparseness for supervised learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(9):1150–1159, 2003. [10] A. Gelman, J. B. Carlin, H. S. Stern, and D. B. Rubin. Bayesian Data Analysis. Chapman & Hall, 2nd edition, 2003. [11] I. R. Goodman and S. Kotz. Multivariate 휃-generalized normal distributions. Journal of Multivariate Analysis, 3(2):204–219, 1973. [12] A. K. Gupta and D. K. Nagar. Matrix Variate Distributions. Chapman & Hall, 2000. [13] A. K. Gupta and T. Varga. Matrix variate 휃-generalized normal distribution. Transactions of The American Mathematical Society, 347(4):1429–1437, 1995. [14] K. Lange, D. R. Hunter, and I. Yang. Optimization transfer using surrogate objective functions. Journal of Computational and Graphical Statistics, 9(1):1–59, 2000. [15] H. Liu, M. Palatucci, and J. Zhang. Blockwise coordinate descent procedures for the multi-task lasso, with applications to neural semantic basis discovery. In ICML, 2009. [16] J. Liu, S. Ji, and J. Ye. Multi-task feature learning via efficient 푙2,1-norm minimization. In UAI, 2009. [17] G. Obozinski, B. Taskar, and M. Jordan. Multi-task feature selection. Technical report, Department of Statistics, University of California, Berkeley, June 2006. [18] G. Obozinski1, B. Taskar, and M. I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing, 20(2):231–252, 2010. [19] Y. Qi, T. P. Minka, R. W. Picard, and Z. Ghahramani. Predictive automatic relevance determination by expectation propagation. In ICML, 2004. [20] A. Quattoni, X. Carreras, M. Collins, and T. Darrell. An efficient projection for 푙1,∞regularization. In ICML, 2009. [21] A. A. Shabalin, H. Tjelmeland, C. Fan, C. M. Perou, and A. B. Nobel. Merging two gene-expression studies via cross-platform normalization. Bioinformatics, 24(9):1154–1160, 2008. [22] D. Singh, P. G. Febbo, K. Ross, D. G. Jackson, J. Manola, C. Ladd, P. Tamayo, A. A. Renshaw, A. V. DAmico, J. P. Richie, E. S. Lander, M. Loda, P. W. Kantoff, T. R. Golub, and W. R.Sellers. Gene expression correlates of clinical prostate cancer behavior. Cancer Cell, 1(2):203–209, 2002. [23] L. Sun, J. Liu, J. Chen, and J. Ye. Efficient recovery of jointly sparse vectors. In NIPS 22. 2009. [24] B. A. Turlach, W. N. Wenables, and S. J. Wright. Simultaneous variable selection. Technometrics, 47(3):349–363, 2005. [25] J. B. Welsh, L. M. Sapinoso, A. I. Su, S. G. Kern, J. Wang-Rodriguez, C. A. Moskaluk, F. H. Frierson, Jr., and G. M. Hampton. Analysis of gene expression identifies candidate markers and pharmacological targets in prostate cancer. Cancer Research, 61(16):5974–5978, 2001. [26] D. Wipf and S. Nagarajan. A new view of automatic relevance determination. In NIPS 20, 2007. [27] D.P. Wipf and S. Nagarajan. Iterative reweighted 푙1 and 푙2 methods for finding sparse solutions. Journal of Selected Topics in Signal Processing, 2010. [28] T. Xiong, J. Bi, B. Rao, and V. Cherkassky. Probabilistic joint feature selection for multi-task learning. In SDM, 2007. [29] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B, 2006. [30] J. Zhang, Z. Ghahramani, and Y. Yang. Flexible latent variable models for multi-task learning. Machine Learning, 73(3):221–242, 2008. [31] Y. Zhang and D.-Y. Yeung. A convex formulation for learning task relationships in multi-task learning. In UAI, 2010. [32] Y. Zhang and D.-Y. Yeung. Multi-task learning using generalized 푡process. In AISTATS, 2010. 9
2010
166
3,928
Penalized Principal Component Regression on Graphs for Analysis of Subnetworks Ali Shojaie Department of Statistics University of Michigan Ann Arbor, MI 48109 shojaie@umich.edu George Michailidis Department of Statistics and EECS University of Michigan Ann Arbor, MI 48109 gmichail@umich.edu Abstract Network models are widely used to capture interactions among component of complex systems, such as social and biological. To understand their behavior, it is often necessary to analyze functionally related components of the system, corresponding to subsystems. Therefore, the analysis of subnetworks may provide additional insight into the behavior of the system, not evident from individual components. We propose a novel approach for incorporating available network information into the analysis of arbitrary subnetworks. The proposed method offers an efficient dimension reduction strategy using Laplacian eigenmaps with Neumann boundary conditions, and provides a flexible inference framework for analysis of subnetworks, based on a group-penalized principal component regression model on graphs. Asymptotic properties of the proposed inference method, as well as the choice of the tuning parameter for control of the false positive rate are discussed in high dimensional settings. The performance of the proposed methodology is illustrated using simulated and real data examples from biology. 1 Introduction Simultaneous analysis of groups of system components with similar functions, or subsystems, has recently received considerable attention. This problem is of particular interest in high dimensional biological applications, where changes in individual components may not reveal the underlying biological phenomenon, whereas the combined effect of functionally related components could improve the efficiency and interpretability of results. This idea has motivated the method of gene set enrichment analysis (GSEA), along with a number of related methods [1, 2]. The main premise of this method is that by assessing the significance of sets rather than individual components (i.e. genes), interactions among them can be preserved, and more efficient inference methods can be developed. A different class of models (see e.g. [3, 4] and references therein) has focused on directly incorporating the network information in order to achieve better efficiency in assessing the significance of individual components. These ideas have been combined in [5, 6], by introducing a model for incorporating the regulatory gene network, and developing an inference framework for analysis of subnetworks defined by biological pathways. In this frameworks, called NetGSA, a global model is introduced with parameters 1 for individual genes/proteins, and the parameters are then combined appropriately in order to assess the significance of biological pathways. However, the main challenge in applying NetGSA in realworld biological applications is the extensive computational time. In addition, the total number of parameters allowed in the model are limited by the available sample size n (see Section 5). In this paper, we propose a dimension reduction technique for networks, based on Laplacian eigenmaps, with the goal of providing an optimal low-dimensional projection for the space of random variables in each subnetwork. We then propose a general inference framework for analysis of subnetworks by reformulating the inference problem as a penalized principal regression problem on the graph. In Section 2, we review the Laplacian eigenmaps and establish their connection to principal component analysis (PCA) for random variables on a graph. Inference for significance of subnetworks is discussed in Section 3, where we introduce Laplacian eigenmaps with Neumann boundary conditions and present the group-penalized principal component regression framework for analysis of arbitrary subnetworks. Results of applying the new methodology to simulated and real data examples are presented in Section 4, and the results are summarized in Section 5. 2 Laplacian Eigenmaps Consider p random variables Xi,i = 1,..., p (e.g. expression values of genes) defined on nodes of an undirected (weighted) graph G = (V,E). Here V is the set of nodes of G and E ⊆V ×V its edge set. Throughout this paper, we represent the edge set and the strength of associations among nodes through the adjacency matrix of the graph A. Specifically, Aij ≥0 and i and j are adjacent if the Aij (and hence A ji) is non-zero. In this case we write i ∼j. Finally, we denote the observed values of the random variables by the n× p data matrix X. The subnetworks of interest are defined based on additional knowledge about their attributes and functions. In biological applications, these subnetworks are defined by common biological function, co-regulation or chromosomal location. The objective of the current paper is to develop dimension reduction methods on networks, in order to assess the significance of a priori defined subnetworks (e.g. biological pathways) with minimal information loss. 2.1 Graph Laplacian and Eigenmaps Laplacian eigenmaps are defined using the eigenfunctions of the graph Laplacian, which is commonly used in spectral graph theory, computer science and image processing. Applications based on Laplacian eigenmaps include image segmentation and the normalized cut algorithm of [7], spectral clustering [8, 9] and collaborative filtering [10]. The Laplacian matrix and its eigenvectors have also been used in biological applications. For example, in [11], the Laplacian matrix has been used to define a network-penalty for variable selection on graphs, and the interpretation of Laplacian eigenmaps as a Fourier basis was exploited in [12] to propose supervised and unsupervised classification methods. Different definitions and representations have been proposed for the spectrum of a graph, and the results may vary depending on the definition of the Laplacian matrix (see [13] for a review). Here, we follow the notation in [13], and consider the normalized Laplacian matrix of the graph. To that end, let D denote the diagonal degree matrix for A, i.e. Dii = ∑j Aij ≡di, and define the Laplacian matrix of the graph by L = D−1/2(D−A)D−1/2, or alternatively Li j =        1−Aj j d j j = i,dj ̸= 0 − Aij √ did j j ∼i 0 o.w. 2 It can be shown that [13] L is positive semidefinite with eigenvalues 0 = λ0 ≤λ1 ≤... ≤λp−1 ≤2. Its eigenfunctions are known as the spectrum of G , and optimize the Rayleigh quotient ⟨g,L g⟩ ⟨g,g⟩ = ∑i∼j ( f(i)−f(j))2 ∑j f( j)2dj , (1) It can be seen from (1), that the 0-eigenvalue of L is g = D1/21, corresponding to the average over the graph G . The first non-zero eigenvalue λ1 is the harmonic eigenfunction of L , which corresponds to the Laplace-Beltrami operator on Reimannian manifolds, and is given by λ1 = inf f⊥D1 ∑j∼i ( f(i)−f( j))2 ∑j f(j)2dj More generally, denoting by Ck−1 the projection to the subspace of the first k −1 eigenfunctions, λk = inf f⊥DCk−1 ∑j∼i ( f(i)−f( j))2 ∑j f(j)2dj . 2.2 Principal Component Analysis on Graphs Previous applications of the graph Laplacian and its spectrum often focus on the properties of the graph; however, the connection to the probability distribution of the random variables on nodes of the graph has not been strongly emphasized. In graphical models, the undirected graph G among random variables corresponds naturally to a Markov random field [14]. The following result establishes the relationship between the Laplacian eigenmaps and the principal components of the random variables defined on the nodes of the graph, in case of Gaussian observations. Lemma 1. Let X = (X1,...,Xp) be random variables defined on the nodes of graph G = (V,E) and denote by L and L + the Laplacian matrix of G and its Moore-Penrose generalized inverse. If X ∼N(0,Σ), then L and L + correspond to Ωand Σ, respectively (Ω≡Σ−1). In addition, let ν0,...,νp−1 denote the eigenfunctions corresponding to eigenvalues of L . Then ν0,...,νp−1 are the principal components of X, with ν0 corresponding to the leading principal component. Proof. For Gaussian random variables, the inverse covariance (or precision) matrix has the same non-zero pattern as the adjacency matrix of the graph, i.e. for i ̸= j, Ωij = 0 iff Aij = 0. Moreover, Ωii = τ−2 i , where τ2 i is the partial variance of Xi (see e.g. [15]). However, using the conditional autoregression (CAR) representation of Gaussian Markov random fields [16], we can write E(Xi|X−i) = ∑ j∼i cijXj (2) where −i ≡{1... p}\i and C = [ci j] has the same non-zero pattern as the adjacency matrix of the graph A, and amounts to a proper probability distribution for X. In particular, by Brook’s Lemma [16] it follows from (2) that fX(x) ∝exp  −1/2xT(0,T −1(Ip −C))x , where T = diag[τ2 i ]. Therefore, Ω= T −1(Ip −C) and hence (Ip −C) should be PD. However, since L = Ip −D−1/2AD−1/2 is PSD, we can set C = D−1/2AD−1/2 −ζI for any ζ > 0. In other words, (Ip −C) = L +ζIp, which implies that ˜ L ≡L +ζIp = TΩ, and hence ˜ L −1 = ΣT −1. Taking limit as ζ →0, it follows that L and L + correspond to Ωand Σ, respectively. The second part follows directly from the above connection between ˜ L −1 and Σ. In particular, suppose, without loss of generality, that τ2 i = 1. Then, it is easily seen that the principal components of X are given by eigenfunctions of ˜ L −1, which are in turn equal to the eigenfunctions of ˜ L with the ordering of the eigenvalues reversed. However, since eigenfunctions of L + ζIp and L are equal, the principal components of X are obtained from eigenfunctions of L . 3 ρ1 ρ2 X1 X2 X3 Figure 1: Left: A simple subnetwork of interest, marked with the dotted circle. Right: Illustration of the Neumann random walk, the dotted curve indicates the boundary of the subnetwork. Remark 2. An alternative justification for the above result, for general probability distributions defined on graphs, can be given by assuming that the graph represents “similarities” among random variables and using an optimal embedding of graph G in a lower dimensional Euclidean space1. In the case of one dimensional embedding, the goal is to find an embedding v = (v1,...,vp)T that preserves the distances among the nodes of the graph. The objective function of the embedding problem is then given by Q = ∑i, j (vi −vj)2Aij, or alternatively Q = 2vT(D −A)v [17]. Thus, the optimal embedding is found by solving argminvTDv=1 vT(D−A)v. Setting u = D1/2v, this is solved by finding the eigenvector corresponding to the smallest eigenvalue of L . Lemma 1 provides an efficient dimension reduction framework that summarizes the information in the entire network into few feature vectors. Although the resulting dimension reduction method can be used efficiently in classification (as in [12]), the eigenfunctions of G do not provide any information about significance of arbitrary subnetworks, and therefore cannot be used to analyze the changes in subnetworks. In the next section, we introduce a restricted version of Laplacian eigenmaps, and discuss the problem of analysis of subnetworks. 3 Analysis of Subnetworks and PCR on Graph (GPCR) In [5], the authors argue that to analyze the effect of subnetworks, the test statistic needs to represent the pure effect of the subnetwork, without being influenced by external nodes, and propose an inference procedure based on mixed linear models to achieve this goal. However, in order to achieve dimension reduction, we need a method that only incorporates local information at the level of each subnetwork, and possibly its neighbors (see the left panel of Figure 1). Using the connection of the Laplace operator in Reimannian manifolds to heat flow (see e.g. [17]), the problem of analysis of arbitrary subnetworks can be reformulated as a heat equation with boundary conditions. It then follows that in order to assess the “effect” of each subnetwork, the appropriate boundary conditions should block the flow of heat at the boundary of the set. This corresponds to insulating the boundary, also known as the Neumann boundary condition. For the general heat equation τ(v,x), this boundary condition is given by ∂τ ∂v(x) = 0 at each boundary point x, where v is the normal direction orthogonal to the tangent hyperplane at x. The eigenvalues of subgraphs with boundary conditions are studied in [13]. In particular, let S be any (connected) subnetwork of G , and denote by δS the boundary of S in G . The Neumann boundary condition states that for every x ∈δS, ∑y:{x,y}∈δS (f(x)−f(y)) = 0. The Neumann eigenfunctions of S are then the optimizers of the restricted Rayleigh quotient λS,i = inf f sup g∈Ci−1 ∑{t,u}∈S∪δS ( f(t)−f(u))2 ∑t∈S (f(t)−g(t))2 dt where Ci−1 is the projection to the space of previous eigenfunctions. 1For unweighted graphs, this justification was given by [17], using the unnormlized Laplacian matrix. 4 In [13], a connection between the Neumann boundary conditions and a reflected random walk on the graph is established, and it is shown that the Neumann eigenvectors can be alternatively calculated from the eigenvectors of the transition probability matrix of this reflected random walk, also known as the Neumann random walk (see [13] for additional details). Here, we generalize this idea to weighted adjacency matrices. Let ˜P and P denote the transition probability matrix of the reflected random walk, and the original random walk defined on G , respectively. Noting that P = D−1A, we can extend the results in [13] as follows. For the general case of weighted graphs, define the transition probability matrix of the reflected random walk by ˜Pi j =    Pij j ∼i,i, j ∈S Pij + AikAk j did′ k j ∼k ∼i,k /∈S 0 o.w. (3) where d′ k = ∑i∼k,i∈S Aki denotes the degree of the node k in S. Then, the Neumann eigenvalues are given by λi = 1−κi, where κi is the ith eigenvalue of ˜P. Remark 3. The connection with the Neumann random walk also sheds light into the effect of the proposed boundary condition on the joint probability distribution of the random variables on the graph. To illustrate this, consider the simple graph in the right panel of Figure 1. For the moment, suppose that the random variables X1,X2,X3 are Gaussian, and the edges from X1 and X2 to X3 are directed. As discussed in [5], the joint probability distribution of the random variables on the graph is then given by linear structural equation models: X1 = γ1 X2 = γ2 X3 = ρ1X1 +ρ1X2 ⇒ Y = Λγ, Λ = 1 0 0 0 1 0 ρ1 ρ2 1 ! Then, the conditional probability distribution of X1 and X2 given X3, is Gaussian, with the inverse covariance matrix given by  1+ρ2 1 ρ1ρ2 ρ1ρ2 1+ρ2 2  (4) A comparison between (3) and (4) then reveals that the proposed Neumann random walk corresponds to conditioning on the boundary variables, if the edges going from the set S to its boundary are directed. The reflected random walk, for the original problem, therefore corresponds to first setting all the influences from other nodes in the graph to nodes in the set S to zero (resulting in directed edges) and then conditioning on the boundary variables. Therefore, the proposed method offers a compromise compared to the full model of [5], based on local information at the level of each subnetwork. 3.1 Group-Penalized PCR on Graph Using the Neumann eigenvectors of subnetworks, we now define a principal component regression on graphs, which can be used to analyze the significance of subnetworks. Let Nj denote the |Sj|× m j matrix of the m j smallest Neumann eigenfunctions for subgraph Sj. Also, let X(j) be the n×|Sj| matrix of observations for the j-th subnetwork. An m j-dimensional projection of the original data matrix X( j) is then given by ˜X( j) = X(j)Nj. Different methods can be used in order to determine the number of eigenfunctions m j for each subnetwork. A simple procedure determines a predefined threshold for the proportion of variance explained by each eigenfunction. These proportions can be determined by considering the reciprocal of Neumann eigenvalues (ignoring the 0-eigenvalue). To simplify the presentation, here we assume mj = m,∀j. 5 The significance of subnetwork Sj is a function of the combined effect of all the nodes, captured by the transformed data matrix ˜X(j). This can be evaluated by forming a multivariate ANOVA (MANOVA) model. Formally, let y be the mn × 1 vector of observations obtained by stacking all the transformed data matrices ˜X(j). Also, let X be the mn×Jmr design matrix corresponding to the experimental settings, where r is the number of parameters used to model experimental conditions, and β be the vector of regression coefficients. For simplicity, here we focus on the case of a twoclass inference problem (e.g. treatment vs. control). Extensions to more general experimental settings follow naturally and are discussed in Section 5. To evaluate the combined effect of each subnetwork, we impose a group penalty on the coefficient of the regression of y on the design matrix X . In particular, using the group lasso penalty [18], we estimate the significance of the subnetwork by solving the following optimization problem2 argmin β ( n−1∥y− J ∑ j=1 X (j)β (j)∥2 2 +γ J ∑ j=1 ∥β (j)∥2 ) (5) where J is the total number of subnetworks considered and X (j) and β ( j) denote the columns of X , and entries of β corresponding to the subnetwork j, respectively. In equation (5), γ is the tuning parameter and is usually determined by performing k-fold cross validation or evaluation on independent data sets. However, since the goal of our analysis is to determine the significance of subnetworks, γ should be determined so that the probability of false positives is controlled at a given significance level α. Here we adapt the approach in [20] and determine the optimal value of γ so that the family-wise error rate (FWER) in repeated sampling with replacement (bootstrap) is controlled at the level α. Specifically, let qi γ be the total number of subnetworks considered significant based on the value of γ in the ith bootstrap sample. Let π be the threshold for selection of variables as significant. In other words, if P(j) i is the probability of selecting the coefficients corresponding to subnetwork j in the ith bootstrap sample, the subnetwork j is considered significant if maxγ P(j) i ≥π. Using this method, we select γ such that qi γ = p (2π −1)α p.3 The following result shows that the proposed methodology correctly selects the significant subnetworks, while controlling FWER at level α. We begin by introducing some additional notations and assumptions. We assume the columns of design matrix X are normalized so that n−1Xi TXi = 1, Throughout this paper, we consider the case where the total number of nodes in the graph p, and the number of design parameters r are allowed to diverge (the p ≫n setting). In addition, let s be the total number of non-zero elements in the true regression vector β. Theorem 4. Suppose that m,n ≥1 and there exists η ≥1 and t ≥s ≥1 such that n−1X TXij ≤ (7ηt)−1 for all i ̸= j. Also suppose that for j ̸= k, the transformed random variables ˜X(j) and ˜X(k) are independent. If the tuning parameter γ is selected such that such that qγ = p (2π −1)αrp, (i) there exists ζ = ζ(n, p) > 0 such that ζ →0 as n →∞and with probability at least 1−ζ the significant subnetworks are correctly selected with high probability, (ii) the family-wise error rate is controlled at the level α. Outline of the Proof. First note that the MANOVA model presented above can be reformulated as a multi-task learning problem [21]. Upon establishing the fact that for the proposed tuning parameter γ ∼ p log p/(nm3/2), it follows from the results in [22] that for each bootstrap sample, there exists ε = ε(n) > 0 such that with probability at least 1−(rp)−ε the significant subnetworks are correctly selected. Thus if π ≤1−(rp)−ε, the coefficients for significant subnetworks are included in the final 2The problem in (5) can be solved using the R-package grplasso [19]. 3Additional details for this method are given in [20], but are excluded here due to space limitations. 6 model with hight probability. In particular, it can be shown that ζ = Φ{ √ B(1 −(rp)−ε −π)/2}, where B is the number of bootstrap samples and Φ is the cumulative normal distribution. This proves the first claim. Next, note that the normality assumption, and the fact that the eigenfunctions within each subnetwork are orthogonal, imply that for each j, ˜X(j) i ,i = 1,...,m are independent. Moreover, the assumption of independence of ˜X(j) and ˜X(k) for j ̸= k implies that the values of y are independent realizations of i.i.d standard normal random variables. On the other hand, the KarushKuhnTucker conditions for the optimization problem in (5) imply that β ( j) ̸= 0 iff (nm)(−1)⟨(y−X β),X ( j)⟩= sgn( ˆβ (j))γ, where ⟨x,y⟩denotes their inner product. It is hence clear that 1[β (j)̸=0] are exchangeable. Combining this with the first part of the theorem, the claim follows from Theorem 1 of [20]. Remark 5. The main assumption of Theorem 4 is the independence of the variables in different subnetworks. Although this is not satisfied in general problems, it may be satisfied by the conditioning argument of Remark 3. It is possible to further relax this assumption using an argument similar to Theorem 2 of [20], but we do not pursue this here. 4 Experiments We illustrate the performance of the proposed method using simulated data motivated by biological applications, as well as a real data application based on gene expression analysis. In the simulation, we generate a small network of 80 nodes (genes), with 8 subnetworks. The random variables (expression levels of genes) are generated according to a normal distribution with mean µ. Under the null hypothesis, µnull = 1 and the association weight ρ for all edges of the network is set to 0.2. The setting of parameters under the alternative hypothesis are given in Table 1, where µalt = 3. These settings are illustrated in the left panel of Figure 2. Table 1 also includes the estimated powers of the tests for subnetworks based on 200 simulations with n = 50 observations. It can be seen that the proposed GPCR method offers improvements over GSEA [1], especially in case of subnetworks 3 and 6. However, it results in a less accurate inference compared to NetGSA [5]. In [5], the pathways involved in Galactose utilization in yeast were analyzed based on the data from [23], and the performances of the NetGSA and GSEA methods were compared. The interactions among genes, along with significance of individual genes (based on single gene analysis) are given in the right panel of Figure 2, and the results of significance analysis based on NetGSA, GSEA and the proposed GPCR are given in Table 2. As in the simulated example, the results of this analysis indicate that GPCR results in improved efficiency over GSEA, while failing to detect the significance of some of the pathways detected by NetGSA. 5 Conclusion We proposed a principal component regression method for graphs, called GPCR, using Laplacian eigenmaps with Neumann boundary conditions. The proposed method offers a systematic approach Table 1: Parameter settings under the alternative and estimated powers for the simulation study. Parameter Setting Estimated Powers Parameter Setting Estimated Powers Subnet % µalt ρ NetGSA GPCR GSEA Subnet % µalt ρ NetGSA GPCR GSEA 1 0.05 0.2 0.02 0.08 0.01 5 0.05 0.6 0.94 0.41 0.12 2 0.20 0.2 0.03 0.21 0.02 6 0.20 0.6 1.00 0.61 0.15 3 0.50 0.2 1.00 0.65 0.27 7 0.50 0.6 1.00 0.99 0.97 4 0.80 0.2 1.00 0.81 0.90 8 0.80 0.6 1.00 0.99 1.00 7 Figure 2: Left: Setting of the simulation parameters under the alternative hypothesis. Right: Network of yeast genes involved in Galactose utilization. for dimension reduction in networks, with a priori defined subnetworks of interest. It can also incorporate both weighted and unweighted adjacency matrices and can be easily extended to analyzing complex experimental conditions through the framework of linear models. This method can also be used in longitudinal and time-course studies. Our simulation studies, and the real data example indicate that the proposed GPCR method offers significant improvements over the methods of gene set enrichment analysis (GSEA). However, it does not achieve optimal powers in comparison to NetGSA. This difference in power may be attributable to the mechanism of incorporating the network information in the two methods: while NetGSA incorporates the full network information, GPCR only account for local network information, at the level of each subnetwork, and restricts the interactions with the rest of the network based on the Neumann boundary condition. However, the most computationally involved step in NetGSA requires O(p3) operation, whereas the computational cost of GPCR is O(m3). It is clear that since m ≪p in most applications, GPCR could result in significant improvement in terms of computational time and memory requirements for analysis of high dimensional networks. In addition, NetGSA requires that r < n, whilst the dimension reduction and the penalization of the proposed GPCR removes the need for any such restriction and facilitates the analysis of complex experiments in the settings with small sample sizes. Acknowledgments Funding for this work was provided by NIH grants 1RC1CA145444-0110 and 5R01LM010138-02. Table 2: Significance of pathways in Galactose utilization. PATHWAY Size NetGSA GPCR GSEA PATHWAY Size NetGSA GPCR GSEA rProtein Synthesis 28 ✓ Sugar Transport 2 Glycolytic Enzymes 16 Glycogen Metabolism 12 RNA Processing 75 Stress 12 ✓ ✓ Fatty Acid Oxidation 7 ✓ ✓ Metal Uptake 4 O2 Stress 13 Respiration 9 ✓ Mating, Cell Cycle 58 Gluconeogenesis 7 Vesicular Transport 19 Galactose Utilization 12 ✓ ✓ ✓ Amino Acid Synthesis 30 8 References [1] A. Subramanian, P. Tamayo, V.K. Mootha, S. Mukherjee, B.L. Ebert, M.A. Gillette, A. Paulovich, S.L. Pomeroy, T.R. Golub, E.S. Lander, et al. Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43):15545–15550, 2005. [2] B. Efron and R. Tibshirani. On testing the significance of sets of genes. Annals of Applied Statistics, 1(1):107–129, 2007. [3] T. Ideker, O. Ozier, B. Schwikowski, and A.F. Siegel. Discovering regulatory and signalling circuits in molecular interaction networks. Bioinformatics, 18(1):S233–S240, 2002. [4] Zhi Wei and Li Hongzhe. A markov random field model for network-based analysis of genomic data. Bioinformatics, 2007. [5] A. Shojaie and G. Michailidis. Analysis of gene sets based on the underlying regulatory network. Journal of Computational Biology, 16(3):407–426, 2009. [6] A. Shojaie and G. Michailidis. Network enrichment analysis in complex experiments. Statisitcal Applications in Genetics and Molecular Biology, 9(1), Article 22, 2010. [7] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8):888–905, 2000. [8] M. Saerens, F. Fouss, L. Yen, and P. Dupont. The principal components analysis of a graph, and its relationships to spectral clustering. Machine Learning: ECML 2004, pages 371–383, 2004. [9] A.Y. Ng, M.I. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. [10] F. Fouss, A. Pirotte, J.M. Renders, and M. Saerens. A novel way of computing dissimilarities between nodes of a graph, with application to collaborative filtering and subspace projection of the graph nodes. In European Conference on Machine Learning Proceedings, ECML, 2004. [11] C. Li and H. Li. Variable Selection and Regression Analysis for Graph-Structured Covariates with an Application to Genomics. Annals of Applied Statistics, in press, 2010. [12] F. Rapaport, A. Zinovyev, M. Dutreix, E. Barillot, and J.P. Vert. Classification of microarray data using gene networks. BMC bioinformatics, 8(1):35, 2007. [13] F.R.K. Chung. Spectral graph theory. American Mathematical Society, 1997. [14] S.L. Lauritzen. Graphical models. Oxford Univ Press, 1996. [15] H. Rue and L. Held. Gaussian Markov random fields: theory and applications. Chapman & Hall, 2005. [16] J. Besag. Spatial interaction and the statistical analysis of lattice systems. Journal of the Royal Statistical Society. Series B (Methodological), 36(2):192–236, 1974. [17] M. Belkin and P. Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. Advances in neural information processing systems, 1:585–592, 2002. [18] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of Royal Statistical Society. Series B Statistical Methodology, 68(1):49, 2006. [19] L. Meier, S. Van de Geer, and P. Buhlmann. The group lasso for logistic regression. Journal of Royal Statistical Society. Series B Statistical Methodology, 70(1):53, 2008. [20] N. Meinshausen and P. B¨uhlmann. Stability selection. Preprint, arXiv, 809, 2009. [21] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [22] K. Lounici, M. Pontil, A.B. Tsybakov, and S. van de Geer. Taking Advantage of Sparsity in Multi-Task Learning. Preprint, arXiv, 903, 2009. [23] T. Ideker, V. Thorsson, J.A. Ranish, R. Christmas, J. Buhler, J.K. Eng, R. Bumgarner, D.R. Goodlett, R. Aebersold, and L. Hood. Integrated genomic and proteomic analyses of a systematically perturbed metabolic network. Science, 292(5518):929, 2001. 9
2010
167
3,929
Bayesian Action-Graph Games Albert Xin Jiang Department of Computer Science University of British Columbia jiang@cs.ubc.ca Kevin Leyton-Brown Department of Computer Science University of British Columbia kevinlb@cs.ubc.ca Abstract Games of incomplete information, or Bayesian games, are an important gametheoretic model and have many applications in economics. We propose Bayesian action-graph games (BAGGs), a novel graphical representation for Bayesian games. BAGGs can represent arbitrary Bayesian games, and furthermore can compactly express Bayesian games exhibiting commonly encountered types of structure including symmetry, action- and type-specific utility independence, and probabilistic independence of type distributions. We provide an algorithm for computing expected utility in BAGGs, and discuss conditions under which the algorithm runs in polynomial time. Bayes-Nash equilibria of BAGGs can be computed by adapting existing algorithms for complete-information normal form games and leveraging our expected utility algorithm. We show both theoretically and empirically that our approaches improve significantly on the state of the art. 1 Introduction In the last decade, there has been much research at the interface of computer science and game theory (see e.g. [19, 22]). One fundamental class of computational problems in game theory is the computation of solution concepts of a finite game. Much of current research on computation of solution concepts has focused on complete-information games, in which the game being played is common knowledge among the players. However, in many multi-agent situations, players are uncertain about the game being played. Harsanyi [10] proposed games of incomplete information (or Bayesian games) as a mathematical model of such interactions. Bayesian games have found many applications in economics, including most notably auction theory and mechanism design. Our interest is in computing with Bayesian games, and particularly in identifying sample Bayes-Nash equilibrium. There are two key obstacles to performing such computations efficiently. The first is representational: the straightforward tabular representation of Bayesian game utility functions (the Bayesian Normal Form) requires space exponential in the number of players. For large games, it becomes infeasible to store the game in memory, and performing even computations that are polynomial time in the input size are impractical. An analogous obstacle arises in the context of complete-information games: there the standard representation (normal form) also requires space exponential in the number of players. The second obstacle is the lack of existing algorithms for identifying sample Bayes-Nash equilibrium for arbitrary Bayesian games. Harsanyi [10] showed that a Bayesian game can be interpreted as an equivalent complete-information game via “induced normal form” or “agent form” interpretations. Thus one approach is to interpret a Bayesian game as a complete-information game, enabling the use of existing Nash-equilibrium-finding algorithms (e.g. [24, 9]). However, generating the normal form representations under both of these completeinformation interpretations causes a further exponential blowup in representation size. Most games of interest have highly-structured payoff functions, and thus it is possible to overcome the first obstacle by representing them compactly. This has been done for complete information games through (e.g.) the graphical games [16] and Action-Graph Games (AGGs) [1] representations. In this paper we propose Bayesian Action-Graph Games (BAGGs), a compact representation for 1 Bayesian games. BAGGs can represent arbitrary Bayesian games, and furthermore can compactly express Bayesian games with commonly encountered types of structure. The type profile distribution is represented as a Bayesian network, which can exploit conditional independence structure among the types. BAGGs represent utility functions in a way similar to the AGG representation, and like AGGs, are able to exploit anonymity and action-specific utility independencies. Furthermore, BAGGs can compactly express Bayesian games exhibiting type-specific independence: each player’s utility function can have different kinds of structure depending on her instantiated type. We provide an algorithm for computing expected utility in BAGGs, a key step in many algorithms for game-theoretic solution concepts. Our approach interprets expected utility computation as a probabilistic inference problem on an induced Bayesian Network. In particular, our algorithm runs in polynomial time for the important case of independent type distributions. To compute Bayes-Nash equilibria for BAGGs, we consider the agent form interpretation of the BAGG. Although a naive normal form representation would require an exponential blowup, BAGGs can act as a compact representation of the agent form. Computational tasks on the agent form can be done efficiently by leveraging our expected utility algorithm for BAGGs. We have implemented our approach by adapting two Nash equilibrium algorithms, the simplicial subdivision algorithm [24] and Govindan and Wilson’s global Newton method [9]. We show empirically that our approach outperforms the existing approaches of solving for Nash on the induced normal form or on the normal form representation of the agent form. We now discuss some related literature. There has been some research on heuristic methods for finding Bayes-Nash equilibria for certain classes of auction games using iterated best response (see e.g. [21, 25]). Such methods are not guaranteed to converge to a solution. Howson and Rosenthal [12] applied the agent form transformation to 2-player Bayesian games, resulting in a completeinformation polymatrix game. Our approach can be seen as a generalization of their method to general Bayesian games. Singh et al. [23] proposed a incomplete information version of the graphical game representation, and presented efficient algorithms for computing approximate Bayes-Nash equilibria in the case of tree games. Gottlob et al. [7] considered a similar extension of the graphical game representation and analyzed the problem of finding a pure-strategy Bayes-Nash equilibrium. Like graphical games, such representations are limited in that they can only exploit strict utility independencies. Oliehoek et al. [20] proposed a heuristic search algorithm for common-payoff Bayesian games, which has applications to cooperative multi-agent problems. Bayesian games can be interpreted as dynamic games with a initial move by Nature; thus, also related is the literature on representations for dynamic games, including multi-agent influence diagrams (MAIDs) [17] and temporal action-graph games (TAGGs) [14]. Compared to these representations for dynamic games, BAGGs focus explicitly on structure common to Bayesian games; in particular, only BAGGs can efficiently express type-specific utility structure. Also, by representing utility functions and type distributions as separate components, BAGGs can be more versatile (e.g., a future direction is to answer computational questions that do not depend on the type distribution, such as ex-post equilibria). Furthermore, BAGGs can be solved by adapting Nash-equilibrium algorithms such as Govindan and Wilson’s global Newton method [9] for static games; this is generally more practical than their related Nash equilibrium algorithm [8] that directly works on dynamic games: while both approach avoids the exponential blowup of transforming to the induced normal form, the algorithm for dynamic games has to solve an additional quadratic program at each step. 2 Preliminaries 2.1 Complete-information Games We assume readers are familiar with the basic concepts of complete-information games and here we only establish essential notation. A complete-information game is a tuple (N, {Ai}i∈N, {ui}i∈N) where N = {1, . . . , n} is the set of agents; for each agent i, Ai is the set of i’s actions. We denote by ai ∈Ai one of i’s actions. An action profile a = (a1, . . . , an) ∈Q i∈N Ai is a tuple of the agents’ actions. Agent i’s utility function is ui : Q j∈N Aj →R. A mixed strategy σi for player i is a probability distribution over Ai. A mixed strategy profile σ is a tuple of the n players’ mixed strategies. We denote by ui(σ) the expected utility of player i under the mixed strategy profile σ. We adopt the following notational convention: for any n-tuple X we denote by X−i the elements of X corresponding to players other than i. A game representation is a data structure that stores all information needed to specify a game. A normal form representation of a game uses a matrix to represent each utility function ui. The size of this representation is n Q j∈N |Aj|, which grows exponentially in the number of players. 2 2.2 Bayesian Games We now define Bayesian games and discuss common types of structure. Definition 1. A Bayesian game is a tuple (N, {Ai}i∈N, Θ, P, {ui}i∈N) where N = {1, . . . , n} is the set of players; each Ai is player i’s action set, and A = Q i Ai is the set of action profiles; Θ = Q i Θi is the set of type profiles, where Θi is player i’s set of types; P : Θ →R is the type distribution and ui : A × Θ →R is the utility function for player i. As in the complete-information case, we denote by ai an element of Ai, and a = (a1, . . . , an) an action profile. Furthermore we denote by θi an element of Θi, and by θ a type profile. The game is played as follows. A type profile θ = (θ1, . . . , θn) ∈Θ is drawn according to the distribution P. Each player i observes her type θi and, based on this observation, chooses from her set of actions Ai. Each player i’s utility is then given by ui(a, θ), where a is the resulting action profile. Player i can deterministically choose a pure strategy si, in which given each θi ∈Θi she deterministically chooses an action si(θi). Player i can also randomize and play a mixed strategy σi, in which her probability of choosing ai given θi is σi(ai|θi). That is, given a type θi ∈Θi, she plays according to distribution σi(·|θi) over her set of actions Ai. A mixed strategy profile σ = (σ1, . . . , σn) is a tuple of the players’ mixed strategies. The expected utility of i given θi under a mixed strategy profile σ is the expected value of i’s utility under the resulting joint distribution of a and θ, conditioned on i receiving type θi: ui(σ|θi) = X θ−i P(θ−i|θi) X a ui(a, θ) Y j σj(aj|θj). (1) A mixed strategy profile σ is a Bayes-Nash equilibrium if for all i, for all θi, for all ai ∈Ai, ui(σ|θi) ≥ui(σθi→ai|θi), where σθi→ai is the mixed strategy profile that is identical to σ except that i plays ai with probability 1 given θi. In specifying a Bayesian game, the space bottlenecks are the type distribution and the utility functions. Without additional structure, we cannot do better than representing each utility function ui : A×Θ → R as a table and the type distribution as a table as well. We call this representation the Bayesian normal form. The size of this representation is n × Qn i=1(|Θi| × |Ai|) + Qn i=1 |Θi|. We say a Bayesian game has independent type distributions if players’ types are drawn independently, i.e. the type-profile distribution P(θ) is a product distribution: P(θ) = Q i P(θi). In this case the distribution P can be represented compactly using P i |Θi| numbers. Given a permutation of players π : N →N and an action profile a = (a1, . . . , an), let aπ = (aπ(1), . . . , aπ(n)). Similarly let θπ = (θπ(1), . . . , θπ(n)). We say the type distribution P is symmetric if |Θi| = |Θj| for all i, j ∈N, and if for all permutations π : N →N, P(θ) = P(θπ). We say a Bayesian game has symmetric utility functions if |Ai| = |Aj| and |Θi| = |Θj| for all i, j ∈N, and if for all permutations π : N →N, we have ui(a, θ) = uπ(i)(aπ, θπ) for all i ∈N. A Bayesian game is symmetric if its type distribution and utility functions are symmetric. The utility functions of such a game range over at most |Θi||Ai| n−2+|Θi||Ai| |Θi||Ai|−1  unique utility values. A Bayesian game exhibits conditional utility independence if each player i’s utility depends on the action profile a and her own type θi, but does not depend on the other players’ types. Then the utility function of each player i ranges over at most |A||Θi| unique utility values. 2.2.1 Complete-information interpretations Harsanyi [10] showed that any Bayesian game can be interpreted as a complete-information game, such that Bayes-Nash equilibria of the Bayesian game correspond to Nash equilibria of the completeinformation game. There are two complete-information interpretations of Bayesian games. A Bayesian game can be converted to its induced normal form, which is a complete-information game with the same set of n players, in which each player’s set of actions is her set of pure strategies in the Bayesian game. Each player’s utility under an action profile is defined to be equal to the player’s expected utility under the corresponding pure strategy profile in the Bayesian game. Alternatively, a Bayesian game can be transformed to its agent form, where each type of each player in the Bayesian game is turned into one player in a complete-information game. Formally, given a 3 Bayesian game (N, {Ai}i∈N, Θ, P, {ui}i∈N), we define its agent form as the complete-information game ( ˜N, { ˜Aj,θj}(j,θj)∈˜ N, {˜uj,θj}(j,θj)∈˜ N), where ˜N consists of P j∈N |Θj| players, one for every type of every player of the Bayesian game. We index the players by the tuple (j, θj) where j ∈N and θj ∈Θj. For each player (j, θj) ∈˜N of the agent form game, her action set ˜A(j,θj) is Aj, the action set of j in the Bayesian game. The set of action profiles is then ˜A = Q j,θj A(j,θj). The utility function of player (j, θj) is ˜uj,θj : ˜A →R. For all ˜a ∈˜A, ˜uj,θj(˜a) is equal to the expected utility of player j of the Bayesian game given type θj, under the pure strategy profile s˜a, where for all i and all θi, s˜a i (θi) = ˜a(i,θi). Observe that there is a one-to-one correspondence between action profiles in the agent form and pure strategies of the Bayesian game. A similar correspondence exists for mixed strategy profiles: each mixed strategy profile σ of the Bayesian game corresponds to a mixed strategy ˜σ of the agent form, with ˜σ(i,θi)(ai) = σi(ai|θi) for all i, θi, ai. It is straightforward to verify that ˜ui,θi(˜σ) = ui(σ|θi) for all i, θi. This implies a correspondence between Bayes Nash equilibria of a Bayesian game and Nash equilibria of its agent form. Proposition 2. σ is a Bayes-Nash equilibrium of a Bayesian game if and only if ˜σ is a Nash equilibrium of its agent form. 3 Bayesian Action-Graph Games In this section we introduce Bayesian Action-Graph Games (BAGGs), a compact representation of Bayesian games. First consider representing the type distributions. Specifically, the type distribution P is specified by a Bayesian network (BN) containing at least n random variables corresponding to the n players’ types θ1, . . . , θn. For example, when the types are independently distributed, then P can be specified by the simple BN with n variables θ1, . . . , θn and no edges. Now consider representing the utility functions. Our approach is to adapt concepts from the AGG representation [1, 13] to the Bayesian game setting. At a high level, a BAGG is a Bayesian game on an action graph, a directed graph on a set of action nodes A. To play the game, each player i, given her type θi, simultaneously chooses an action node from her type-action set Ai,θi ⊆A. Each action node thus corresponds to an action choice that is available to one or more of the players. Once the players have made their choices, an action count is tallied for each action node α ∈A, which is the number of agents that have chosen α. A player’s utility depends only on the action node she chose and the action counts on the neighbors of the chosen node. We now turn to a formal description of BAGG’s utility function representation. Central to our model is the action graph. An action graph G = (A, E) is a directed graph where A is the set of action nodes, and E is a set of directed edges, with self edges allowed. We say α′ is a neighbor of α if there is an edge from α′ to α, i.e., if (α′, α) ∈E. Let the neighborhood of α, denoted ν(α), be the set of neighbors of α. For each player i and each instantiation of her type θi ∈Θi, her type-action set Ai,θi ⊆A is the set of possible action choices of i given θi. These subsets are unrestricted: different type-action sets may (partially or completely) overlap. Define player i’s total action set to be A∪ i = S θi∈Θi Ai,θi. We denote by A = Q i A∪ i the set of action profiles, and by a ∈A an action profile. Observe that the action profile a provides sufficient information about the type profile to be able to determine the outcome of the game; there is no need to additionally encode the realized type distribution. We note that for different types θi, θ′ i ∈Θi, Ai,θi and Ai,θ′ i may have different sizes; i.e., i may have different numbers of available action choices depending on her realized type. A configuration c is a vector of |A| non-negative integers, specifying for each action node the numbers of players choosing that action. Let c(α) be the element of c corresponding to the action α. Let C : A 7→C be the function that maps from an action profile a to the corresponding configuration c. Formally, if c = C(a) then c(α) = |{i ∈N : ai = α}| for all α ∈A. Define C = {c : ∃a ∈A such that c = C(a)}. In other words, C is the set of all possible configurations. We can also define a configuration over a subset of nodes. In particular, we will be interested in configurations over a node’s neighborhood. Given a configuration c ∈C and a node α ∈A, let the configuration over the neighborhood of α, denoted c(α), be the restriction of c to ν(α), i.e., c(α) = (c(α′))α′∈ν(α). Similarly, let C(α) denote the set of configurations over ν(α) in which at least one player plays α. Let C(α) : A 7→C(α) be the function which maps from an action profile to the corresponding configuration over ν(α). 4 Definition 3. A Bayesian action-graph game (BAGG) is a tuple (N, Θ, P, {Ai,θi}i∈N,θi∈Θi, G, {uα}α∈A) where N is the set of agents; Θ = Q i Θi is the set of type profiles; P is the type distribution, represented as a Bayesian network; Ai,θi ⊆A is the type-action set of i given θi; G = (A, E) is the action graph; and for each α ∈A, the utility function is uα : C(α) →R. Intuitively, this representation captures two types of structure in utility functions: firstly, shared actions capture the game’s anonymity structure: if two action choices from different type-action sets share an action node α, it means that these two actions are interchangeable as far as the other players’ utilities are concerned. In other words, their utilities may depend on the number of players that chose the action node α, but not the identities of those players. Secondly, the (lack of) edges between nodes in the action graph expresses action- and type-specific independencies of utilities of the game: depending on player i’s chosen action node (which also encodes information about her type), her utility depends on configurations over different sets of nodes. Lemma 4. An arbitrary Bayesian game given in Bayesian normal form can be encoded as a BAGG storing the same number of utility values. Proof. Provided in the supplementary material. Bayesian games with symmetric utility functions exhibit anonymity structure, which can be expressed in BAGGs by sharing action nodes. Specifically, we label each Θi as {1, . . . , T}, so that each t ∈{1, . . . , T} corresponds to a class of equivalent types. Then for each t ∈{1, . . . , T}, we have Ai,t = Aj,t for all i, j ∈N, i.e. type-action sets for equivalent types are identical. 3.1 BAGGs with function nodes In this section we extend the basic BAGG representation by introducing function nodes to the action graph. The concept of function nodes was first introduced in the (complete-information) AGG setting [13]. Function nodes allow us to exploit a much wider variety of utility structures in BAGGs. In this extended representation, the action graph G’s vertices consist of both the set of action nodes A and the set of function nodes F. We require that no function node p ∈F can be in any player’s action set. Each function node p ∈F is associated with a function f p : C(p) →R. We extend c by defining c(p) to be the result of applying f p to the configuration over p’s neighbors, f p(c(p)). Intuitively, c(p) can be used to describe intermediate parameters that players’ utilities depend on. To ensure that the BAGG is meaningful, the graph restricted to nodes in F is required to be a directed acyclic graph. As before, for each action node α we define a utility function uα : C(α) →R. Of particular computational interest is the subclass of contribution-independent function nodes (also introduced by [13]). A function node p in a BAGG is contribution-independent if ν(p) ⊆A, there exists a commutative and associative operator ∗, and for each α ∈ν(p) an integer wα, such that given an action profile a = (a1, . . . , an), c(p) = ∗i∈N:ai∈ν(p) wai. A BAGG is contributionindependent if all its function nodes are contribution-independent. Intuitively, if function node p is contribution-independent, each player’s strategy affects c(p) independently. A very useful kind of contribution-independent function nodes are counting function nodes, which set ∗to the summation operator + and the weights to 1. Such a function node p simply counts the number of players that chose any action in ν(p). Let us consider the size of a BAGG representation. The representation size of the Bayesian network for P is exponential only in the in-degree of the BN. The utility functions store P α |C(α)| values. As in similar analysis for AGGs [15], estimations of this size generally depend on what types of function nodes are included. We state only the following (relatively straightforward) result since in this paper we are mostly concerned with BAGGs with counting function nodes. Theorem 5. Consider BAGGs whose only function nodes, if any, are counting function nodes. If the in-degrees of the action nodes as well as the in-degrees of the Bayesian networks for P are bounded by a constant, then the sizes of the BAGGs are bounded by a polynomial in n, |A|, |F|, P i |Θi| and the sizes of domains of variables in the BN. This theorem shows a nice property of counting function nodes: representation size does not grow exponentially in the in-degrees of these counting function nodes. The next example illustrates the usefulness of counting function nodes, including for expressing conditional utility independence. 5 Example 6 (Coffee Shop game). Consider a symmetric Bayesian game involving n players; each player plans to open a new coffee shop in a downtown area, but has to decide on the location. The downtown area is represented by a r × k grid. Each player can choose to open a shop located within any of the B ≡rk blocks or decide not to enter the market. Each player has T types, representing her private information about her cost of opening a coffee shop. Players’ types are independently distributed. Conditioned on player i choosing some location, her utility depends on: (a) her own type; (b) the number of players that chose the same block; (c) the number of players that chose any of the surrounding blocks; and (d) the number of players that chose any other location. The Bayesian normal form representation of this game has size n[T(B + 1)]n. The game can be expressed as a BAGG as follows. Since the game is symmetric, we label the types as {1, . . . , T}. A contains one action O corresponding to not entering and TB other action nodes, with each location corresponding to a set of T action nodes, each representing the choice of that location by a player with a different type. For each t ∈{1, . . . , T}, the type-action sets Ai,t = Aj,t for all i, j ∈N and each consists of the action O and B actions corresponding to locations for type t. For each location (x, y) we create three function nodes: pxy representing the number of players choosing this location, p′ xy representing the number of players choosing any surrounding blocks, and p′′ xy representing the number of players choosing any other block. Each of these function nodes is a counting function node, whose neighbors are action nodes corresponding to the appropriate locations (for all types). Each action node for location (x, y) has three neighbors, pxy, p′ xy, and p′′ xy. Since the BAGG action graph has maximum in-degree 3, by Theorem 5 the representation size is polynomial in n, B and T. 4 Computing a Bayes-Nash Equilibrium In this section we consider the problem of finding a sample Bayes-Nash equilibrium given a BAGG. Our overall approach is to interpret the Bayesian game as a complete-information game, and then to apply existing algorithms for finding Nash equilibria of complete-information games. We consider two state-of-the-art Nash equilibrium algorithms, van der Laan et al’s simplicial subdivision [24] and Govindan and Wilson’s global Newton method [9]. Both run in exponential time in the worst case, and indeed recent complexity theoretic results [3, 6, 4] imply that a polynomial-time algorithm for Nash equilibrium is unlikely to exist.1 Nevertheless, we show that we can achieve exponential speedups in these algorithms by exploiting the structure of BAGGs. Recall from Section 2.2.1 that a Bayesian game can be transformed into its induced normal form or its agent form. In the induced normal form, each player i has |Ai||Θi| actions (corresponding to her pure strategies of the Bayesian game). Solving such a game would be infeasible for large |Θi|; just to represent an Nash equilibrium requires space exponential in |Θi|. A more promising approach is to consider the agent form. Note that we can straightforwardly adapt the agent-form transformation described in Section 2.2.1 to the setting of BAGGs: now the action set of player (i, θi) of the agent form corresponds to the type-action set Ai,θi of the BAGG. The resulting complete-information game has P i∈N |Θi| players and |Ai,θi| actions for each player (i, θi); a Nash equilibrium can be represented using just P i P θi |Ai,θi| numbers. However, the normal form representation of the agent form has size P j∈N |Θj| Q i,θi |Ai,θi|, which grows exponentially in n and |Θi|. Applying the Nash equilibrium algorithms to this normal form would be infeasible in terms of time and space. Fortunately, we do not have to explicitly represent the agent form as a normal form game. Instead, we treat a BAGG as a compact representation of its agent form, and carry out any required computation on the agent form by operating on the BAGG. A key computational task required by both Nash equilibrium algorithms in their inner loops is the computation of expected utility of the agent form. Recall from Section 2.2.1 that for all (i, θi) the expected utility ˜ui,θi(˜σ) of the agent form is equal to the expected utility ui(σ|θi) of the Bayesian game. Thus in the remainder of this section we focus on the problem of computing expected utility in BAGGs. 4.1 Computing Expected Utility in BAGGs Recall that σθi→ai is the mixed strategy profile that is identical to σ except that i plays ai given θi. The main quantity we are interested in is ui(σθi→ai|θi), player i’s expected utility given θi under 1There has been some research on efficient Nash-equilibrium-finding algorithms for subclasses of games, such as Daskalakis and Papadimitriou’s [5] PTAS for anonymous games with fixed numbers of actions. One future direction would be to adapt these algorithms to subclasses of Bayesian games. 6 the strategy profile σθi→ai. Note that the expected utility ui(σ|θi) can then be computed as the sum ui(σ|θi) = P ai ui(σθi→ai|θi)σi(ai|θi). One approach is to directly apply Equation (1), which has (|Θ−i| × |A|) terms in the summation. For games represented in Bayesian normal form, this algorithm runs in time polynomial in the representation size. Since BAGGs can be exponentially more compact than their equivalent Bayesian normal form representations, this algorithm runs in exponential time for BAGGs. In this section we present a more efficient algorithm that exploits BAGG structure. We first formulate the expected utility problem as a Bayesian network inference problem. Given a BAGG and a mixed strategy profile σθi→ai, we construct the induced Bayesian network (IBN) as follows. We start with the BN representing the type distribution P, which includes (at least) the random variables θ1, . . . , θn. The conditional probability distributions (CPDs) for the network are unchanged. We add the following random variables: one strategy variable Dj for each player j; one action count variable for each action node α ∈A, representing its action count, denoted c(α); one function variable for each function node p ∈F, representing its configuration value, denoted c(p); and one utility variable U α for each action node α. We then add the following edges: an edge from θj to Dj for each player j; for each player j and each α ∈A∪ j , an edge from Dj to c(α); for each function variable c(p), all incoming edges corresponding to those in the action graph G; and for each α ∈A, for each action or function node m ∈ν(α) in G, an edge from c(m) to U α in the IBN. The CPDs of the newly added random variables are defined as follows. Each strategy variable Dj has domain A∪ j , and given its parent θj, its CPD chooses an action from A∪ j according to the mixed strategy σθi→ai j . In other words, if j ̸= i then Pr(Dj = aj|θj) is equal to σj(aj|θj) for all aj ∈Aj,θj and 0 for all aj ∈A∪ j \ Aj,θj; and if j = i we have Pr(Dj = ai|θj) = 1. For each action node α, the parents of its action-count variable c(α) are strategy variables that have α in their domains. The CPD is a deterministic function that returns the number of its parents that take value α; i.e., it calculates the action count of α. For each function variable c(p), its CPD is the deterministic function f p. The CPD for each utility variable U α is a deterministic function specified by uα. It is straightforward to verify that the IBN is a directed acyclic graph (DAG) and thus represents a valid joint distribution. Furthermore, the expected utility ui(σti→ai|θi) is exactly the expected value of the variable U ai conditioned on the instantiated type θi. Lemma 7. For all i ∈N, all θi ∈Θi and all ai ∈Ai,θi, we have ui(σθi→ai|θi) = E[U ai|θi]. Standard BN inference methods could be used to compute E[U ai|θi]. However, such standard algorithms do not take advantage of structure that is inherent in BAGGs. In particular, recall that in the induced network, each action count variable c(α)’s parents are all strategy variables that have α in their domains, implying large in-degrees for action count variables. Applying (e.g.) the clique-tree algorithm would yield large clique sizes, which is problematic because running time scales exponentially in the largest clique size of the clique tree. However, the CPDs of these action count variables are structured counting functions. Such structure is an instance of causal independence in BNs [11]. It also corresponds to anonymity structure for complete-information game representations like symmetric games and AGGs [13]. We can exploit this structure to speed up computation of expected utility in BAGGs. Our approach is a specialization of Heckerman and Breese’s method [11] for exploiting causal independence in BNs, which transforms the original BN by creating new nodes that represent intermediate results, and re-wiring some of the arcs, resulting in an equivalent BN with small in-degree. Given an action count variable c(α) with parents (say) {D1 . . . Dn}, for each i ∈{1 . . . n −1} we create a node Mα,i, representing the count induced by D1 . . . Di. Then, instead of having D1 . . . Dn as parents of c(α), its parents become Dn and Mα,n−1, and each Mα,i’s parents are Di and Mα,i−1. The resulting graph has in-degree at most 2 for c(α) and the Mα,i’s. The CPDs of function variables corresponding to contribution-independent function nodes also exhibit causal independence, and thus we can use a similar transformation to reduce their in-degree to 2. We call the resulting Bayesian network the transformed Bayesian network (TBN) of the BAGG. It is straightforward to verify that the representation size of the TBN is polynomial in the size of the BAGG. We can then use standard inference algorithms to compute E[U α|θi] on the TBN. For classes of BNs with bounded treewidths, this can be computed in polynomial time. Since the graph structure (and thus the treewidth) of the TBN does not depend on the strategy profile and only depends on the BAGG, we have the following result. 7 1 10 100 1000 10000 100000 in seconds BAGG-AF NF-AF INF 0.1 1 10 100 1000 10000 100000 3 4 5 6 7 CPU time in seconds number of players BAGG-AF NF-AF INF Figure 1: GW, varying players. 10000 100000 1000 10000 100000 nds 10 100 1000 10000 100000 econds 1 10 100 1000 10000 100000 in seconds 0.1 1 10 100 1000 10000 100000 time in seconds 0.1 1 10 100 1000 10000 100000 6 8 10 12 14 16 18 20 CPU time in seconds number of locations 0.1 1 10 100 1000 10000 100000 6 8 10 12 14 16 18 20 CPU time in seconds number of locations Figure 2: GW, varying locations. 10000 100 1000 10000 ds 10 100 1000 10000 econds 0 1 1 10 100 1000 10000 in seconds 0.01 0.1 1 10 100 1000 10000 time in seconds 0.01 0.1 1 10 100 1000 10000 2 3 4 5 6 7 8 CPU time in seconds types per player 0.01 0.1 1 10 100 1000 10000 2 3 4 5 6 7 8 CPU time in seconds types per player Figure 3: GW, varying types. 10 100 1000 10000 e in seconds BAGG-AF NF-AF 1 10 100 1000 10000 2 3 4 5 6 7 CPU time in seconds number of players BAGG-AF NF-AF Figure 4: simplicial subdivision. Theorem 8. For BAGGs whose TBNs have bounded treewidths, expected utility can be computed in time polynomial in n, |A|, |F| and | P i Θi|. Bayesian games with independent type distributions are an important class of games and have many applications, such as independent-private-value auctions. When contribution-independent BAGGs have independent type distributions, expected utility can be efficiently computed. Theorem 9. For contribution-independent BAGGs with independent type distributions, expected utility can be computed in time polynomial in the size of the BAGG. Proof. Provided in the supplementary material. Note that this result is stronger than that of Theorem 8, which only guarantees efficient computation when TBNs have constant treewidth. 5 Experiments We have implemented our approach for computing a Bayes-Nash equilibrium given a BAGG by applying Nash equilibrium algorithms on the agent form of the BAGG. We adapted two algorithms, GAMBIT’s [18] implementation of simplicial subdivision and GameTracer’s [2] implementation of Govindan and Wilson’s global Newton method, by replacing calls to expected utility computations of the complete-information game with corresponding expected utility computations of the BAGG. We ran experiments that tested the performance of our approach (denoted by BAGG-AF) against two approaches that compute a Bayes-Nash equilibrium for arbitrary Bayesian games. The first (denoted INF) computes a Nash equilibrium on the induced normal form; the second (denoted NFAF) computes a Nash equilibrium on the normal form representation of the agent form. Both were implemented using the original, normal-form-based implementations of simplicial subdivision and global Newton method. We thus studied six concrete algorithms, two for each game representation. We tested these algorithms on instances of the Coffee Shop Bayesian game described in Example 6. We created games of different sizes by varying the number of players, the number of types per player and the number of locations. For each size we generated 10 game instances with random integer payoffs, and measured the running (CPU) times. Each run was cut off after 10 hours if it had not yet finished. All our experiments were performed using a computer cluster consisting of 55 machines with dual Intel Xeon 3.2GHz CPUs, 2MB cache and 2GB RAM, running Suse Linux 11.1. We first tested the three approaches based on the Govindan-Wilson (GW) algorithm. Figure 1 shows running time results for Coffee Shop games with n players, 2 types per player on a 2 × 3 grid, with n varying from 3 to 7. Figure 2 shows running time results for Coffee Shop games with 3 players, 2 types per player on a 2 × x grid, with x varying from 3 to 10. Figure 3 shows results for Coffee Shop games with 3 players, T types per player on a 1 × 3 grid, with T varying from 2 to 8. The data points represent the median running time of 10 game instances, with the error bars indicating the maximum and minimum running times. All results show that our BAGG-based approach (BAGG-AF) significantly outperformed the two normal-form-based approaches (INF and NF-AF). Furthermore, as we increased the dimensions of the games the normal-form based approaches quickly ran out of memory (hence the missing data points), whereas BAGG-NF did not. We also did some preliminary experiments on BAGG-AF and NF-AF running the simplicial subdivision algorithm. Figure 4 shows running time results for Coffee Shop games with n players, 2 types per player on a 1 × 3 grid, with n varying from 3 to 6. Again, BAGG-AF significantly outperformed NF-AF, and NF-AF ran out of memory for game instances with more than 4 players. 8 References [1] N. Bhat and K. Leyton-Brown. Computing Nash equilibria of action-graph games. In UAI, pages 35–42, 2004. [2] B. Blum, C. Shelton, and D. Koller. Gametracer. http://dags.stanford.edu/Games/ gametracer.html, 2002. [3] X. Chen and X. Deng. Settling the complexity of 2-player Nash-equilibrium. In FOCS: Proceedings of the Annual IEEE Symposium on Foundations of Computer Science, pages 261–272, 2006. [4] C. Daskalakis, P. W. Goldberg, and C. H. Papadimitriou. The complexity of computing a Nash equilibrium. In STOC: Proceedings of the Annual ACM Symposium on Theory of Computing, pages 71–78, 2006. [5] C. Daskalakis and C. Papadimitriou. Computing equilibria in anonymous games. In FOCS: Proceedings of the Annual IEEE Symposium on Foundations of Computer Science, pages 83–93, 2007. [6] P. W. Goldberg and C. H. Papadimitriou. Reducibility among equilibrium problems. In STOC: Proceedings of the Annual ACM Symposium on Theory of Computing, pages 61–70, 2006. [7] G. Gottlob, G. Greco, and T. Mancini. Complexity of pure equilibria in Bayesian games. In IJCAI, pages 1294–1299, 2007. [8] S. Govindan and R. Wilson. Structure theorems for game trees. Proceedings of the National Academy of Sciences, 99(13):9077–9080, 2002. [9] S. Govindan and R. Wilson. A global Newton method to compute Nash equilibria. Journal of Economic Theory, 110:65–86, 2003. [10] J.C. Harsanyi. Games with incomplete information played by “Bayesian” players, i-iii. part i. the basic model. Management science, 14(3):159–182, 1967. [11] David Heckerman and John S. Breese. Causal independence for probability assessment and inference using Bayesian networks. IEEE Transactions on Systems, Man and Cybernetics, 26(6):826–831, 1996. [12] J.T. Howson Jr and R.W. Rosenthal. Bayesian equilibria of finite two-person games with incomplete information. Management Science, pages 313–315, 1974. [13] A. X. Jiang and K. Leyton-Brown. A polynomial-time algorithm for Action-Graph Games. In AAAI, pages 679–684, 2006. [14] A. X. Jiang, A. Pfeffer, and K. Leyton-Brown. Temporal Action-Graph Games: A new representation for dynamic games. In UAI, 2009. [15] Albert Xin Jiang, Kevin Leyton-Brown, and Navin Bhat. Action-graph games. Games and Economic Behavior, 2010. In press. [16] M.J. Kearns, M.L. Littman, and S.P. Singh. Graphical models for game theory. In UAI, pages 253–260, 2001. [17] D. Koller and B. Milch. Multi-agent influence diagrams for representing and solving games. In IJCAI, 2001. [18] R. D. McKelvey, A. M. McLennan, and T. L. Turocy. Gambit: Software tools for game theory, 2006. http://econweb.tamu.edu/gambit. [19] N. Nisan, T. Roughgarden, E. Tardos, and V. Vazirani, editors. Algorithmic Game Theory. Cambridge University Press, Cambridge, UK, 2007. [20] Frans A. Oliehoek, Matthijs T. J. Spaan, Jilles Dibangoye, and Christopher Amato. Heuristic search for identical payoff bayesian games. In AAMAS: Proceedings of the International Joint Conference on Autonomous Agents and Multiagent Systems, pages 1115–1122, May 2010. [21] Daniel M. Reeves and Michael P. Wellman. Computing best-response strategies in infinite games of incomplete information. In UAI, pages 470–478, 2004. [22] Y. Shoham and K. Leyton-Brown. Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations. Cambridge University Press, New York, 2009. [23] S. Singh, V. Soni, and M. Wellman. Computing approximate Bayes-Nash equilibria in treegames of incomplete information. In EC: Proceedings of the ACM Conference on Electronic Commerce, pages 81–90. ACM, 2004. [24] G. van der Laan, A.J.J. Talman, and L. van der Heyden. Simplicial variable dimension algorithms for solving the nonlinear complementarity problem on a product of unit simplices using a general labelling. Mathematics of Operations Research, 12(3):377–397, 1987. [25] Yevgeniy Vorobeychik. Mechanism Design and Analysis Using Simulation-Based Game Models. PhD thesis, University of Michigan, 2008. 9
2010
168
3,930
A Family of Penalty Functions for Structured Sparsity Charles A. Micchelli∗ Department of Mathematics City University of Hong Kong 83 Tat Chee Avenue, Kowloon Tong Hong Kong charles micchelli@hotmail.com Jean M. Morales Department of Computer Science University College London Gower Street, London WC1E England, UK j.morales@cs.ucl.ac.uk Massimiliano Pontil Department of Computer Science University College London Gower Street, London WC1E England, UK m.pontil@cs.ucl.ac.uk Abstract We study the problem of learning a sparse linear regression vector under additional conditions on the structure of its sparsity pattern. We present a family of convex penalty functions, which encode this prior knowledge by means of a set of constraints on the absolute values of the regression coefficients. This family subsumes the ℓ1 norm and is flexible enough to include different models of sparsity patterns, which are of practical and theoretical importance. We establish some important properties of these functions and discuss some examples where they can be computed explicitly. Moreover, we present a convergent optimization algorithm for solving regularized least squares with these penalty functions. Numerical simulations highlight the benefit of structured sparsity and the advantage offered by our approach over the Lasso and other related methods. 1 Introduction The problem of sparse estimation is becoming increasingly important in machine learning and statistics. In its simplest form, this problem consists in estimating a regression vector β∗∈Rn from a data vector y ∈Rm, obtained from the model y = Xβ∗+ ξ, where X is an m × n matrix, which may be fixed or randomly chosen and ξ ∈Rm is a vector resulting from the presence of noise. An important rationale for sparse estimation comes from the observation that in many practical applications the number of parameters n is much larger than the data size m, but the vector β∗is known to be sparse, that is, most of its components are equal to zero. Under these circumstances, it has been shown that regularization with the ℓ1 norm, commonly referred to as the Lasso method, provides an effective means to estimate the underlying regression vector as well as its sparsity pattern, see for example [4, 12, 15] and references therein. In this paper, we are interested in sparse estimation under additional conditions on the sparsity pattern of β∗. In other words, not only do we expect that β∗is sparse but also that it is structured sparse, namely certain configurations of its nonzero components are to be preferred to others. This problem ∗C.A. Micchelli is also with the Dept. of Mathematics and Statistics, State University of New York, Albany, USA. We are grateful to A. Argyriou and Y. Ying for valuable discussions. This work was supported by NSF Grant ITR-0312113, Air Force Grant AFOSR-FA9550, and EPSRC Grant EP/D071542/1. 1 arises is several applications, see [10] for a discussion. The prior knowledge that we consider in this paper is that the vector |β∗|, whose components are the absolute value of the corresponding components of β∗, should belong to some prescribed convex set Λ. For certain choices of Λ this implies a constraint on the sparsity pattern as well. For example, the set Λ may include vectors with some desired monotonicity constraints, or other constraints on the “shape” of the regression vector. Unfortunately, the constraint that |β∗| ∈Λ is nonconvex and its implementation is computational challenging. To overcome this difficulty, we propose a novel family of penalty functions. It is based on an extension of the ℓ1 norm used by the Lasso method and involves the solution of a smooth convex optimization problem, which incorporates the structured sparsity constraints. As we shall see, a key property of our approach is that the penalty function equals the ℓ1 norm of a vector β when |β| ∈Λ and it is strictly greater than the ℓ1 norm otherwise. This observation suggests that the penalty function encourages the desired structured sparsity property. There has been some recent research interest on structured sparsity, see [1, 2, 7, 9, 10, 11, 13, 16] and references therein. Closest to our approach are penalty methods built around the idea of mixed ℓ1 −ℓ2 norms. In particular, the group Lasso method [16] assumes that the components of the underlying regression vector β∗can be partitioned into prescribed groups, such that the restriction of β∗to a group is equal to zero for most of the groups. This idea has been extended in [10, 17] by considering the possibility that the groups overlap according to certain hierarchical or spatially related structures. A limitation of these methods is that they can only handle sparsity patterns forming a single connected region. Our point of view is different from theirs and provides a means to designing more general and flexible penalty functions which maintain convexity whilst modeling richer model structures. For example, we will demonstrate that our family of penalty functions can model sparsity pattern forming multiple connected regions of coefficients. The paper is organized as follows. In Section 2 we define the learning method. In particular, we describe the associated penalty function and establish some of its important properties. In Section 3 we provide examples of penalty functions, deriving the explicit analytical form in some important cases, namely the case that the set Λ is a box or the wedge with nonincreasing coordinates. In Section 4 we address the issue of solving the learning method numerically by means of an alternating minimization algorithm. Finally, in Section 5 we provide numerical simulations with this method, showing the advantage offered by our approach. 2 Learning method In this section, we introduce the learning method and establish some important properties of the associated penalty function. We let R++ be the positive real line and let Nn be the set of positive integers up to n. We prescribe a convex subset Λ of the positive orthant Rn ++ and estimate β∗by a solution of the convex optimization problem min  ∥Xβ −y∥2 2 + 2ρΩ(β|Λ) : β ∈Rn , (2.1) where ∥· ∥2 denotes the Euclidean norm. The penalty function takes the form Ω(β|Λ) = inf {Γ(β, λ) : λ ∈Λ} (2.2) and the function Γ : Rn × Rn ++ →R is given by the formula Γ(β, λ) = 1 2 P i∈Nn  β2 i λi + λi  . Note that Γ is convex on its domain because each of its summands are likewise convex functions. Hence, when the set Λ is convex it follows that Ω(·|Λ) is a convex function and (2.1) is a convex optimization problem. An essential idea behind our construction of this function, is that, for every λ ∈R++, the quadratic function Γ(·, λ) provides a smooth approximation to |β| from above, which is exact at β = ±λ. We indicate this graphically in Figure 1-a. This fact follows immediately by the arithmetic-geometric mean inequality, namely (a + b)/2 ≥ √ ab. Using the same inequality it also follows that the Lasso problem corresponds to (2.1) when Λ = Rn ++, that is it holds that Ω(β|Rn ++) = ∥β∥1 := P i∈Nn |βi|. This important special case motivated us to consider the general method described above. The utility of (2.2) is that upon inserting it into (2.1) results in an optimization problem over λ and β with a continuously differentiable objective function. Hence, we have succeeded in expressing a nondifferentiable convex objective function by one which is continuously differentiable on its domain. The next proposition provides a justification of the penalty function as a means to incorporate structured sparsity and establish circumstances for which the penalty function is a norm. 2 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 abs λ=0.75 λ=1.50 0 0.5 1 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 β=0.20 β=1.00 β=2.00 (a) (b) Figure 1: (a): Function Γ(·, λ) for some values of λ; (b): Function Γ(β, ·) for some values of β. Proposition 2.1. For every β ∈Rn, it holds that ∥β∥1 ≤Ω(β|Λ) and the equality holds if and only if |β| := (|βi| : i ∈Nn) ∈Λ. Moreover, if Λ is a nonempty convex cone then the function Ω(·|Λ) is a norm and we have that Ω(β|Λ) ≤ω∥β∥1, where ω := max{Ω(ek|Λ) : k ∈Nn} and {ek : k ∈Nn} is the canonical basis of Rn. Proof. By the arithmetic-geometric inequality we have that ∥β∥1 ≤Γ(β, λ), proving the first assertion. If |β| ∈Λ, there exists a sequence {λk : k ∈N} in Λ, such that limk→∞λk = |β|. Since Ω(β|Λ) ≤Γ(β, λk) it readily follows that Ω(β|Λ) ≤∥β∥1. Conversely, if |β| ∈Λ, then there is a sequence {λk : k ∈N} in Λ, such γ(β, λk) ≤∥β1∥+ 1/k. This inequality implies that some subsequence of this sequence converges to a λ ∈Λ. Using the arithmetic-geometric we conclude that λ = |β| and the result follows. To prove the second part, observe that if Λ is a nonempty convex cone, namely, for any λ ∈Λ and t ≥0 it holds that tλ ∈Λ, we have that Ωis positive homogeneous. Indeed, making the change of variable λ′ = λ/|t| we see that Ω(tβ|Λ) = |t|Ω(β|Λ). Moreover, the above inequality, Ω(β|Λ) ≥∥β∥1, implies that if Ω(β|Λ) = 0 then β = 0. The proof of the triangle inequality follows from the homogeneity and convexity of Ω, namely Ω(α+β|Λ) = 2Ω((α + β)/2|Λ) ≤Ω(α|Λ)+Ω(β|Λ). Finally, note that Ω(β|Λ) ≤ω∥β∥1 if and only if ω = max{Ω(β|Λ) : ∥β∥1 = 1}. Since Ωis convex the maximum above is achieved at an extreme point of the ℓ1 unit ball. This proposition indicates that the function Ω(·|Λ) penalizes less vectors β which have the property that |β| ∈Λ, hence encouraging structured sparsity. Indeed, any permutation of the coordinates of a vector β with the above property will incur in the same or a larger value of the penalty term. Moreover, for certain choices of the set Λ, some of which we describe below, the penalty function will encourage vectors which not only are sparse but also have sparsity patterns (1{|βi|>0} : i ∈ Nn) ∈Λ, where 1{·} denotes the indicator function. We end this section by noting that a normalized version of the group Lasso penalty [16] is included in our setting as a special case. If {Jℓ: ℓ∈Nk}, k ∈Nn form a partition of the index set Nn, the corresponding group Lasso penalty is defined as ΩGL(β) = P ℓ∈Nk p |Jℓ| ∥βJℓ∥2, where, for every J ⊆Nn, we use the notation βJ = (βj : j ∈J). It is a easy matter to verify that ΩGL(·) = Ω(·|Λ) for Λ = {λ : λ ∈Rn ++, λj = θℓ, j ∈Jℓ, ℓ∈Nk, θℓ> 0}. 3 Examples of the penalty function We proceed to discuss some examples of the set Λ ⊆Rn ++ which may be used in the design of the penalty function Ω(·|Λ). All but the first example fall into the category that Λ is a polyhedral cone, that is Λ = {λ : λ ∈Rn ++, Aλ ≥0}, where A is an m × n matrix. Thus, in view of Proposition 2.1 the function Ω(·|Λ) is a norm. The first example corresponds to the prior knowledge that the magnitude of the components of the regression vector should be in some prescribed intervals. Example 3.1. We choose a, b ∈Rn, 0 < a ≤b and define the corresponding box as B[a, b] := N i∈Nn [ai, bi]. The theorem below establishes the form of the box penalty; see also [8, 14] for related penalty functions. To state our result, we define, for every t ∈R, the function (t)+ = max(0, t). 3 Theorem 3.1. We have that Ω(β|B[a, b]) = ∥β∥1 + X i∈Nn  1 2ai (ai −|βi|)2 + + 1 2bi (|βi| −bi)2 +  . Moreover, the components of the vector λ(β) := argmin{Γ(β, λ) : λ ∈B[a, b]} are given by the equations λi(β) = |βi| + (ai −|βi|)+ −(|βi| −b)+, i ∈Nn. Proof. Since Ω(β|B[a, b]) = P i∈Nn Ω(βi|[ai, bi]) it suffices to establish the result in the case n = 1. We shall show that if a, b, β ∈R, a ≤b then Ω(β|[a, b]) = |β| + 1 2a(a −|β|)2 + + 1 2b(|β| −b)2 +. (3.1) Since both sides of the above equation are continuous functions of β it suffices to prove this equation for β ∈R\{0}. In this case, the function Γ(β, ·) is strictly convex in the second argument, and so, has a unique minimum in R++ at λ = |β|, see also Figure 1-b. Moreover, if |β| ≤a the constrained minimum occurs at λ = a, whereas if |β| ≥b, it occurs at λ = b. This establishes the formula for λ(β). Consequently, we have that Ω(β|[a, b]) = |β|1{a≤|β|≤b} + 1 2 β2 a + a  1{|β|<a} + 1 2 β2 b + b  1{|β|>b}. Equation (3.1) now follows by a direct computation. Note that the function in equation (3.1) is a concatenation of two quadratic functions, connected together with a linear function. Thus, the box penalty will favor sparsity only for a = 0, case that is defined by a limiting argument. The second example implements the prior knowledge that the coordinates of the vector λ are ordered in a non increasing fashion. Example 3.2. We define the wedge as W = {λ : λ ∈Rn ++, λj ≥λj+1, j ∈Nn−1}. We say that a partition J = {Jℓ: ℓ∈Nk} of Nn is contiguous if for all i ∈Jℓ, j ∈Jℓ+1, ℓ∈Nk−1, it holds that i < j. For example, if n = 3, partitions {{1, 2}, {3}} and {{1}, {2}, {3}} are contiguous but {{1, 3}, {2}} is not. Theorem 3.2. For every β ∈(R\{0})n there is a unique contiguous partition J = {Jℓ: ℓ∈Nk} of Nn, k ∈Nn, such that Ω(β|W) = X ℓ∈Nk p |Jℓ| ∥βJℓ∥2. (3.2) Moreover, the components of the vector λ(β) = argmin{Γ(β, λ) : λ ∈W} are given by λj(β) = ∥βJℓ∥2 p |Jℓ| , j ∈Jℓ, ℓ∈Nk (3.3) and, for every ℓ∈Nk and subset K ⊂Jℓformed by the first k < |Jℓ| elements of Jℓ, it holds that ∥βK∥2 √ k > ∥βJℓ\K∥2 p |Jℓ| −k . (3.4) The partition J appearing in the theorem is determined by the set of inequalities λj ≥λj+1 which are an equality at the minimum. This set is identified by examining the Karush-Kuhn-Tucker optimality conditions [3] of the optimization problem (2.2) for Λ = W. The detailed proof is reported in the supplementary material. Equations (3.3) and (3.4) indicate a strategy to compute the partition associated with a vector β. We explain how to do this in Section 4. An interesting property of the Wedge penalty is that it has the form of a group Lasso penalty (see the discussion at the end of Section 2) with groups not fixed a-priori but depending on the location of the vector β. The groups are the elements of the partition J and are identified by certain convex 4 constraints on the vector β. For example, for n = 2 we obtain that Ω(β|W) = ∥β∥1 if |β1| > |β2| and Ω(β|W) = √ 2∥β∥2 otherwise. For n = 3, we have that Ω(β|W) =              ∥β∥1, if |β1| > |β2| > |β3| J = {{1}, {2}, {3}} p 2(β2 1 + β2 2) + |β3|, if |β1| ≤|β2| and β2 1 + β2 2 > 2β2 3 J = {{1, 2}, {3}} |β1| + p 2(β2 2 + β2 3), if |β2| ≤|β3| and 2β2 1 > β2 2 + β2 3 J = {{1}, {2, 3}} p 3(β2 1 + β2 2 + β2 3), otherwise J = {{1, 2, 3}} where we have also reported the partition involved in each case. The next example is an extension of the wedge set which is inspired by previous work on the group Lasso estimator with hierarchically overlapping groups [17]. It models vectors whose magnitude is ordered according to a graphical structure. Within this context, the wedge corresponds to the set associated with a line graph. Example 3.3. We let A be the incidence matrix of a directed graph and choose Λ = {λ : λ ∈ Rn ++, Aλ ≥0}. We have confirmed that Theorem 3.2 extends to the case that the graph is a tree but the general case is yet to be understood. We postpone this discussion to a future occasion. Next, we note that the wedge may equivalently be expressed as the constraint that the difference vector D1(λ) := (λj+1−λj : j ∈Nn−1) is less than or equal to zero. Our next example extends this observation by using the higher order difference operator, which is given by the formula Dk(λ) =  λj+k + P ℓ∈Nk(−1)ℓk ℓ  λj+k−ℓ: j ∈Nn−k  . Example 3.4. For every k ∈Nn we define the set W k := {λ : λ ∈Rn ++, Dk(λ) ≥0}. The corresponding penalty Ω(·|W k) encourages vectors whose sparsity pattern is concentrated on at most k different contiguous regions. The case k = 1 essentially corresponds to the wedge, while the case k = 2 includes vectors which have a convex “profile” and whose sparsity pattern is concentrated either on the first elements of the vector, on the last, or on both. We end this section by discussing a useful construction which may be applied to generate new penalty functions from available ones. It is obtained by composing a set Θ ⊆Rk ++ with a linear transformation, modeling the sum of the components of a vector, across the elements of a prescribed partition {Pℓ: ℓ∈Nk} of Nn. That is, we let Λ = {λ : λ ∈Rn ++, (P j∈Pℓλj : ℓ∈Nk) ∈Θ}. We use this construction in the composite wedge experiments in Section 5. 4 Optimization method In this section, we address the issue of implementing the learning method (2.1) numerically. Since the penalty function Ω(·|Λ) is constructed as the infimum of a family of quadratic regularizers, the optimization problem (2.1) reduces to a simultaneous minimization over the vectors β and λ. For a fixed λ ∈Λ, the minimum over β ∈Rn is a standard Tikhonov regularization and can be solved directly in terms of a matrix inversion. For a fixed β, the minimization over λ ∈Λ requires computing the penalty function (2.2). These observations naturally suggests an alternating minimization algorithm, which has already been considered in special cases in [1]. To describe our algorithm we choose ǫ > 0 and introduce the mapping φǫ : Rn →Rn ++, whose i-th coordinate at β ∈Rn is given by φǫ i(β) = p β2 i + ǫ. For β ∈(R\{0})n, we also let λ(β) = argmin{Γ(β, λ) : λ ∈Λ}. The alternating minimization algorithm is defined as follows: choose, λ0 ∈Λ and, for k ∈N, define the iterates βk = diag(λk−1)(diag(λk−1)X ⊤X + ρI)−1y (4.1) λk = λ(φǫ(βk)). (4.2) The following theorem establishes convergence of this algorithm. Its proof is presented in the supplementary material. Theorem 4.1. If the set Λ is convex and, for all a, b ∈R with 0 < a < b, the set Λa,b := [a, b]n∩Λ is a nonempty, compact subset of the interior of Λ then the iterations (4.1)–(4.2)converges to the vector 5 Initialization: k ←0 Input: β ∈Rn; Output: J1, . . . , Jk for t = 1 to n do Jk+1 ←{t}; k ←k + 1 while k > 1 and ∥βJk−1 ∥2 √ |Jk−1| ≤ ∥βJk ∥2 √ |Jk| Jk−1 ←Jk−1 ∪Jk; k ←k −1 end end Figure 2: Iterative algorithm to compute the wedge penalty γ(ǫ) := argmin  ∥y −Xβ∥2 2 + 2ρΩ(φǫ(β)|Λ) : β ∈Rn . Moreover, any convergent subsequence of the sequence {γ 1 ℓ  : ℓ∈N} converges to a solution of the optimization problem (2.1). The most challenging step in the alternating algorithm is the computation of the vector λk. Fortunately, if Λ is a second order cone, problem (2.2) defining the penalty function Ω(·|Λ) may be reformulated as a second order cone program (SOCP), see e.g. [5]. To see this, we introduce an additional variable t ∈Rn and note that Ω(β|Λ) = min ( X i∈Nn ti + λi : ∥(2βi, ti −λi)∥2 ≤ti + λi, ti ≥0, i ∈Nn, λ ∈Λ ) . In particular, in all examples in Section 3, the set Λ is formed by linear constraints and, so, problem (2.2) is an SOCP. We may then use available tool-boxes to compute the solution of this problem. However, in special cases the computation of the penalty function may be significantly facilitated by using the analytical formulas derived in Section 3. Here, for simplicity we describe how to do this in the case of the wedge penalty. For this purpose we say that a vector β ∈Rn is admissible if, for every k ∈Nn, it holds that ∥βNk∥2/ √ k ≤∥β∥2/√n. The proof of the next lemma is straightforward and we do not elaborate on the details. Lemma 4.1. If β ∈Rn and δ ∈Rp are admissible and ∥β∥2/√n ≤∥δ∥2/√p then (β, δ) is admissible. The iterative algorithm presented in Figure 2 can be used to find the partition J = {Jℓ: ℓ∈Nk} and, so, the vector λ(β) described in Theorem 3.2. The algorithm processes the components of vector β in a sequential manner. Initially, the first component forms the only set in the partition. After the generic iteration t −1, where the partition is composed of k sets, the index of the next components, t, is put in a new set Jk+1. Two cases can occur: the means of the squares of the sets are in strict descending order, or this order is violated by the last set. The latter is the only case that requires further action, so the algorithm merges the last two sets and repeats until the sets in the partition are fully ordered. Note that, since the only operation performed by the algorithm is the merge of admissible sets, Lemma 4.1 ensures that after each step t the current partition satisfies the conditions (3.4). Moreover, the while loop ensures that after each step the current partition satisfies, for every ℓ∈Nk−1, the constraints ∥βJℓ∥2 p |Jℓ| > ∥βJℓ+1∥2 p |Jℓ+1|. Thus, the output of the algorithm is the partition J defined in Theorem 3.2. In the actual implementation of the algorithm, the means of squares of each set can be saved. This allows us to compute the mean of squares of a merged set as a weighted mean, which is a constant time operation. Since there are n −1 consecutive terms in total, this is also the maximum number of merges that the algorithm can perform. Each merge requires exactly one additional test, so we can conclude that the running time of the algorithm is linear. 5 Numerical simulations In this section we present some numerical simulations with the proposed method. For simplicity, we consider data generated noiselessly from y = Xβ∗, where β∗∈R100 is the true underlying regression vector, and X is an m × 100 input matrix, m being the sample size. The elements of X are generated i.i.d. from the standard normal distribution, and the columns of X are then normalized such that their ℓ2 norm is 1. Since we consider the noiseless case, we solve the interpolation problem min{Ω(β) : y = Xβ}, for different choices of the penalty function Ω. In practice, we solve problem (2.1) for a tiny value of the parameter ρ = 10−8, which we found to be sufficient to ensure that the 6 12 15 18 20 25 50 75 100 0 50 100 150 200 250 300 350 Sample size Model error Lasso Box−A Box−B Box−C 12 15 18 20 25 50 75 100 0 50 100 150 200 250 300 350 400 Sample size Model error Lasso Wedge GL−lin 12 15 18 20 25 50 75 100 0 100 200 300 400 500 600 700 Sample size Model error Lasso Wedge GL−lin (a) (b) (c) 12 15 18 20 25 50 75 100 0 1000 2000 3000 4000 5000 Sample size Model error Lasso C−Wedge GL−ind GL−hie GL−con 12 15 18 20 25 50 75 100 0 500 1000 1500 2000 2500 Sample size Model error Lasso W−2 Wedge GL−lin 22 25 28 30 35 50 75 100 0 10 20 30 40 50 60 70 80 Sample size Model error Lasso W−3 Wedge GL−lin (d) (e) (f) Figure 3: Comparison between different penalty methods: (a) Box vs. Lasso; (b,c) Wedge vs. Hierarchical group Lasso; (d) Composite wedge; (e) Convex; (f) Cubic. See text for more information error term in (2.1) is negligible at the minimum. All experiments were repeated 50 times, generating each time a new matrix X. In the figures we report the average of the model error E[∥ˆβ −β∗∥2 2] of the vector ˆβ learned by each method, as a function of the sample size m. In the following, we discuss a series of experiments, corresponding to different choices for the model vector β∗and its sparsity pattern. In all experiments, we solved the optimization problem (2.1) with the algorithm presented in Section 4. Whenever possible we solved step (4.2) using the formulas derived in Section 3 and resorted to the solver CVX (http://cvxr.com/cvx/) in the other cases. Box. In the first experiment the model is 10-sparse, where each nonzero component, in a random position, is an integer uniformly sampled in the interval [−10, 10]. We wish to show that the more accurate the prior information about the model is, the more precise the estimate will be. We use a box penalty (see Theorem 3.1) constructed “around” the model, imagining that an oracle tells us that each component |β∗ i | is bounded within an interval. We consider three boxes B[a, b] of different sizes, namely ai = (r −|β∗ i |)+ and bi = (|β∗ i |−r)+ and radii r = 5, 1 and 0.1, which we denote as Box-A, Box-B and Box-C, respectively. We compare these methods with the Lasso – see Figure 3-a. As expected, the three box penalties perform better. Moreover, as the radius of a box diminishes, the amount of information about the true model increases, and the performance improves. Wedge. In the second experiment, we consider a regression vector, whose components are nonincreasing in absolute value and only a few are nonzero. Specifically, we choose a 10-sparse vector: β∗ j = 11 −j, if j ∈N10 and zero otherwise. We compare the Lasso, which makes no use of such ordering information, with the wedge penalty Ω(β|W) (see Example 3.2 and Theorem 3.2) and the hierarchical group Lasso in [17], which both make use of such information. For the group Lasso we choose Ω(β) = P ℓ∈N100 ||βJℓ||, with Jℓ= {ℓ, ℓ+ 1, . . . , 100}, ℓ∈N100. These two methods are referred to as “Wedge” and “GL-lin” in Figure 3-b, respectively. As expected both methods improve over the Lasso, with “GL-lin” being the best of the two. We further tested the robustness of the methods, by adding two additional nonzero components with value of 10 to the vector β∗in a random position between 20 and 100. This result, reported in Figure 3-c, indicates that “GL-lin” is more sensitive to such a perturbation. Composite wedge. Next we consider a more complex experiment, where the regression vector is sparse within different contiguous regions P1, . . . , P10, and the ℓ1 norm on one region is larger than the ℓ1 norm on the next region. We choose sets Pi = {10(i −1) + 1, . . . , 10i}, i ∈N10 and generate a 6-sparse vector β∗whose i-th nonzero element has value 31 −i (decreasing) and is in a random position in Pi, for i ∈N6. We encode this prior knowledge by choosing Ω(β|Λ) with Λ =  λ ∈R100 : ||λPi||1 ≥∥λPi+1||1, i ∈N9 . This method constraints the sum of the sets to be nonincreasing and may be interpreted as the composition of the wedge set with an average operation across the sets Pi, see the discussion at the end of Section 3. This method, which is referred to as “CWedge” in Figure 3-d, is compared to the Lasso and to three other versions of the group Lasso. The 7 0 5 10 15 20 25 0 2 4 6 8 10 0 5 10 15 20 25 0 2 4 6 8 10 Figure 4: Lasso vs. penalty Ω(·|W 2) (left) and Ω(·|W 3) (Right); see text for more information. first is a standard group Lasso with the nonoverlapping groups Ji = Pi, i ∈N10, thus encouraging the presence of sets of zero elements, which is useful because there are 4 such sets. The second is a variation of the hierarchical group Lasso discussed above with Ji = ∪10 j=iPj, i ∈N10. A problem with these approaches is that the ℓ2 norm is applied at the level of the individual sets Pi, which does not promote sparsity within these sets. To counter this effect we can enforce contiguous nonzero patterns within each of the Pi, as proposed by [10]. That is, we consider as the groups the sets formed by all sequences of q ∈N9 consecutive elements at the beginning or at the end of each of the sets Pi, for a total of 180 groups. These three groupings will be referred to as “GL-ind”, “GL-hie’‘, “GL-con” in Figure 3-d, respectively. This result indicates the advantage of “C-Wedge” over the other methods considered. In particular, the group Lasso methods fall behind our method and the Lasso, with “GL-con” being slight better than “GL-ind” and “GL-hie”. Notice also that all group Lasso methods gradually diminish the model error until they have a point for each dimension, while our method and the Lasso have a steeper descent, reaching zero at a number of points which is less than half the number of dimensions. Convex and Cubic. To show the flexibility of our framework, we consider two further examples of sparse regression vectors with additional structured properties. In the first example, most of the components of this vector are zero, but the first and the last few elements follow a discrete convex trend. Specifically, we choose β∗= (52, 42, 32, 22, 1, 0, . . . , 0, 1, 22, 32, 42, 52) ∈R100. In this case, we expect the penalty function Ω(β|W 2) to outperform the Lasso, because it favors vectors with convex shape. Results are shown in Figure3-e, where this penalty is named “W-2”. In lack of other specific methods to impose this convex shape constraint, and motivating by the fact that the first few components decrease, we compare it with two methods that favors a learned vector that is decreasing: the Wedge and the group Lasso with Jk = {k, . . . , 100} for k ∈N100. These methods and the Lasso fail to use the prior knowledge of convexity, and are outperformed by using the constraint set W 2. The second example considers the case where |β∗| ∈W 3, namely the differences of the second order are decreasing. This vector is constructed from the cubic polynomial p(t) = −t(t−1.5)(t+6.5). The polynomial is evaluated at 100 equally spaced (0.1) points, starting from −7. The resulting vector starts with 5 nonzero components and has then a bump of another 15 elements. We use our method with the penalty Ω(β|W 3), which is referred to as “W-3” in the Figure. The model error, compared again with “W-1” and group Lasso linear, is shown in Figure 3-f. Finally, Figure 4 displays the regression vector found by the Lasso and the vector learned by “W-2” (left) and by the Lasso and “W-3” (right), in a single run with sample size of 15 and 35, respectively. The estimated vectors (green) are superposed to the true vector (black). Our method provides a better estimate than the Lasso in both cases. Conclusion We proposed a family of penalty functions that can be used to model structured sparsity in linear regression. We provided theoretical, algorithmic and computational information about this new class of penalty functions. Our theoretical observations highlight the generality of this framework to model structured sparsity. An important feature of our approach is that it can deal with richer model structures than current approaches while maintaining convexity of the penalty function. Our practical experience indicates that these penalties perform well numerically, improving over state of the art penalty methods for structure sparsity, suggesting that our framework is promising for applications. In the future, it would be valuable to extend the ideas presented here to learning nonlinear sparse regression models. There is also a need to clarify the rate of convergence of the algorithm presented here. 8 References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] R.G. Baraniuk, V. Cevher, M.F. Duarte, and C. Hegde. Model-based compressive sensing. Information Theory, IEEE Transactions on, 56(4):1982 –2001, 2010. [3] D. Bertsekas. Nonlinear Programming. Athena Scientific, 1999. [4] P.J. Bickel, Y. Ritov, and A.B. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. Annals of Statistics, 37:1705–1732, 2009. [5] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [6] J.M. Danskin. The theory of max-min, with applications. SIAM Journal on Applied Mathematics, 14(4):641–664, 1966. [7] J. Huang, T. Zhang, and D. Metaxas. Learning with structured sparsity. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 417–424. ACM, 2009. [8] L. Jacob. Structured priors for supervised learning in computational biology. 2009. Ph.D. Thesis. [9] L. Jacob, G. Obozinski, and J.-P. Vert. Group lasso with overlap and graph lasso. In International Conference on Machine Learning (ICML 26), 2009. [10] R. Jenatton, J.-Y. Audibert, and F. Bach. Structured variable selection with sparsity-inducing norms. arXiv:0904.3523v2, 2009. [11] S. Kim and E.P. Xing. Tree-guided group lasso for multi-task regression with structured sparsity. Technical report, 2009. arXiv:0909.1373. [12] K. Lounici. Sup-norm convergence rate and sign concentration property of Lasso and Dantzig estimators. Electronic Journal of Statistics, 2:90–102, 2008. [13] K. Lounici, M. Pontil, A.B Tsybakov, and S. van de Geer. Taking advantage of sparsity in multi-task learning. In Proc. of the 22nd Annual Conference on Learning Theory (COLT), 2009. [14] A.B. Owen. A robust hybrid of lasso and ridge regression. In Prediction and discovery: AMSIMS-SIAM Joint Summer Research Conference, Machine and Statistical Learning: Prediction and Discovery, volume 443, page 59, 2007. [15] S.A. van de Geer. High-dimensional generalized linear models and the Lasso. Annals of Statistics, 36(2):614, 2008. [16] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B (Statistical Methodology), 68(1):49–67, 2006. [17] P. Zhao, G. Rocha, and B. Yu. Grouped and hierarchical model selection through composite absolute penalties. Annals of Statistics, 37(6A):3468–3497, 2009. 9 A Appendix In this appendix we provide the proof of Theorems 3.2 and 4.1. A.1 Proof of Theorem 3.2 Before proving the theorem we require some additional notation. Given any two disjoint subsets J, K ⊆Nn we define the region QJ,K =  β : β ∈Rn, ∥βJ∥2 2 |J| > ∥βK∥2 2 |K|  . Note that the boundary of this region is determined by the zero set of a homogeneous polynomial of degree two. We also need the following construction. Definition A.1. For every subset S ⊆Nn−1 we set k = |S| + 1 and label the elements of S in increasing order as S = {jℓ: ℓ∈Nk−1}. We associate with the subset S a contiguous partition of Nn, given by J (S) = {Jℓ: ℓ∈Nk}, where we define Jℓ:= {jℓ−1 + 1, jℓ} and set j0 = 0 and jk = n. A subset S of Nn−1 also induces two regions in Rn which play a central role in the identification of the wedge penalty. First, we describe the region which “crosses over” the induced partition J (S). This is defined to be the set OS := \  QJℓ,Jℓ+1 : ℓ∈Nk−1 . (A.1) In other words, β ∈OS if the average of the square of its components within each region Jℓstrictly decreases with ℓ. The next region which is essential in our analysis is the “stays within” region, induced by the partition J (S). This region requires the notation Jℓ,q := {j : j ∈Jℓ, j ≤q} and is defined by the equation IS := \ n QJℓ,Jℓ,q : q ∈Jℓ, ℓ∈Nk o , (A.2) where Q denotes the closure of the set Q. In other words, all vectors β within this region have the property that, for every set Jℓ∈J (S), the average of the square of a first segment of components of β within this set is not greater than the average over Jℓ. We note that if S is the empty set the above notation should be interpreted as OS = Rn and IS = \ {QNn,Nq : q ∈Nn}. We also introduce, for every S ∈Nn−1 the sets US := OS ∩IS ∩(R\{0})n. We shall prove the following slightly more general version the Theorem 3.2 Theorem A.1. The collection of sets U := {US : S ⊆Nn−1} forms a partition of (R\{0})n. For each β ∈(R\{0})n there is a unique S ∈Nn−1 such that β ∈US, and Ω(β|W) = X ℓ∈Nk p |Jℓ| ∥βJℓ∥2, (A.3) where k = |S| + 1. Moreover, the components of the vector λ(β) := argmin{Γ(β, λ) : λ ∈W} is given by the equations λj(β) = µℓ, j ∈Jℓ, ℓ∈Nk, where µℓ= ∥βJℓ∥2 p |Jℓ| . (A.4) Proof. First, let us observe that there are n −1 inequality constraints defining W. It readily follows that all vectors in this constraint set are regular, in the sense of optimization theory, see [3, p. 279]. Hence, we can appeal to [3, Prop. 3.3.4, p. 316 and Prop. 3.3.6, p. 322], which state that λ ∈Rn ++ 10 is a solution to the minimum problem determined by the wedge penalty, if and only if there exists a vector α = (αi : i ∈Nn−1) with nonnegative components such that −β2 j λ2 j + 1 + αj−1 −αj = 0, j ∈Nn, (A.5) where we set α0 = αn = 0. Furthermore, the following complementary slackness conditions hold true αj(λj+1 −λj) = 0, j ∈Nn−1. (A.6) To unravel these equations, we let S := {j : λj > λj+1, j ∈Nn−1}, which is the subset of indexes corresponding to the constraints that are not tight. When k ≥2, we express this set in the form {jℓ: ℓ∈Nk−1} where k = |S| + 1. As explained in Definition A.1, the set S induces the partition J (S) = {Jℓ: ℓ∈Nk} of Nn. When k = 1 our notation should be interpreted to mean that S is empty and the partition J (S) consists only of Nn. In this case, it is easy to solve the equations (A.5) and (A.6). In fact, all components of the vector λ have a common value, say µ > 0, and by summing both sides of equation (A.5) over j ∈Nn we obtain that µ2 = ∥β∥2 2/n. Moreover, summing both sides of the same equation over j ∈Nq we obtain that αq = −P j∈Nq β2 j /µ2 +q and, since αq ≥0 we conclude that β ∈IS = US. We now consider the case that k ≥2. Hence, the vector λ has equal components on each subset Jℓ, which we denote by µℓ, ℓ∈Nk−1. The definition of the set S implies that the µℓare strictly decreasing and equation (A.6) implies that αj = 0, for every j ∈S. Summing both sides of equation (A.5) over j ∈Jℓwe obtain that −1 µ2 ℓ X j∈Jℓ β2 j + |Jℓ| = 0 from which equation (A.4) follows. Since the µℓare strictly decreasing, we conclude that β ∈OS. Moreover, choosing q ∈Jℓand summing both sides of equations (A.5) over j ∈Jℓ,q we obtain that 0 ≤αq = −∥βJℓ,q∥2 2 µ2 ℓ + |Jℓ,q| which implies that β ∈QJℓ,Jℓ,q. Since this holds for every q ∈Jℓand ℓ∈Nk we conclude that β ∈IS and therefore, it follows that β ∈US. In summary, we have shown that β ∈US. In particular, this implies that the collection of sets U covers (R\{0})n. Next, we show that the elements of U are disjoint. To this end, we observe that, the computation described above can be reversed. That is to say, conversely for any S ⊆Nn−1 and β ∈US we conclude that the vectors α and λ define above solve the equations (A.5) and (A.6). Since the wedge penalty function is strictly convex we know that equations (A.5) and (A.6) have a unique solution. Now, if β ∈US ∩US′ then it must follow that λ = λ′. Consequently, since the vectors λ and λ′ are a constant on any element of their respective partitions J (S) and J (S′), strictly decreasing from one element to the next in those partition, it must be the case that S1 = S2. We note that if some components of β are zero we may compute Ω(β|Λ) as a limiting process, since the function Ω(·|Λ) is continuous. Proof of Theorem 4.1 We divide the proof into several steps. To this end, we define Eǫ(β, λ) := ∥y −Xβ∥2 2 + 2ρΓ(φǫ(β), λ) and let β(λ) := argmin{Eǫ(α, λ) : α ∈Rn}. Step 1. We define two sequences, θk = Eǫ(βk, λk−1) and νk = Eǫ(βk, λk) and observe, for any k ≥2, that θk+1 ≤νk ≤θk ≤νk−1. (A.7) These inequalities follow directly from the definition of the alternating algorithm, see equations (4.1) and (4.2). Step 2. We define the compact set B = {β : β ∈Rn, ∥β∥1 ≤θ1}. From the first inequality in Proposition 2.1, ∥β∥1 ≤Ω(β|Λ), and inequality (A.7) we conclude, for every k ∈N, that βk ∈B. 11 Step 3. We define a function g : Rn →R at β ∈Rn as g(β) = min {Eǫ(α, λ(φǫ(β))) : α ∈Rn} . We claim that g is continuous on B. In fact, there exists a constant κ > 0 such that, for every γ1, γ2 ∈B, it holds that |g(γ1) −g(γ2)| ≤κ∥λ(φǫ(γ1)) −λ(φǫ(γ2))∥∞. (A.8) The essential ingredient in the proof of this inequality is the fact that by our hypothesis on the set Λ there exists constant a and b such that, for all β ∈B, λ(φǫ(β)) ∈[a, b]n. This fact follows by Danskin’s Theorem [6]. Step 4. By step 2, there exists a subsequence {βkℓ: ℓ∈N} which converges to ˜β ∈B and, for all β ∈Rn and λ ∈Λ, it holds that Eǫ(˜β, λ(φǫ(˜β))) ≤Eǫ(β, λ(φǫ(˜β))), Eǫ(˜β, λ(φǫ(˜β))) ≤Eǫ(˜β, λ). (A.9) Indeed, from step 1 we conclude that there exists ψ ∈R++ such that lim k→∞θk = lim k→∞νk = ψ. Under our hypothesis the mapping β 7→λ(β) is continuous for β ∈(R\{0})n, we conclude that lim ℓ→∞λkℓ= λ(φǫ(˜β)). By the definition of the alternating algorithm, we have, for all β ∈Rn and λ ∈Λ, that θk+1 = Eǫ(βk+1, λk) ≤Eǫ(β, λk), νk = Eǫ(βk, λk) ≤Eǫ(βk, λ). From this inequality we obtain, passing to limit, inequalities (A.9). Step 5. The vector (˜β, λ(φǫ(˜β)) is a stationary point. Indeed, since Λ is admissible, by step 3, λ(φǫ(˜β)) ∈int(Λ). Therefore, since Eǫ is continuously differentiable this claim follows from step 4. Step 6. The alternating algorithm converges. This claim follows from the fact that Eǫ is strictly convex. Hence, Eǫ has a unique global minimum in Rn × Λ, which in virtue of inequalities (A.9) is attained at (˜β, λ(φǫ(˜β))). The last claim in the theorem follows from the fact that the set {γ(ǫ) : ǫ > 0} is bounded and the function λ(β) is continuous. 12
2010
169
3,931
Evaluating neuronal codes for inference using Fisher information Ralf M. Haefner∗and Matthias Bethge Centre for Integrative Neuroscience, University of T¨ubingen, Bernstein Center for Computational Neuroscience, T¨ubingen, Max Planck Institute for Biological Cybernetics Spemannstr. 41, 72076 T¨ubingen, Germany Abstract Many studies have explored the impact of response variability on the quality of sensory codes. The source of this variability is almost always assumed to be intrinsic to the brain. However, when inferring a particular stimulus property, variability associated with other stimulus attributes also effectively act as noise. Here we study the impact of such stimulus-induced response variability for the case of binocular disparity inference. We characterize the response distribution for the binocular energy model in response to random dot stereograms and find it to be very different from the Poisson-like noise usually assumed. We then compute the Fisher information with respect to binocular disparity, present in the monocular inputs to the standard model of early binocular processing, and thereby obtain an upper bound on how much information a model could theoretically extract from them. Then we analyze the information loss incurred by the different ways of combining those inputs to produce a scalar single-neuron response. We find that in the case of depth inference, monocular stimulus variability places a greater limit on the extractable information than intrinsic neuronal noise for typical spike counts. Furthermore, the largest loss of information is incurred by the standard model for position disparity neurons (tuned-excitatory), that are the most ubiquitous in monkey primary visual cortex, while more information from the inputs is preserved in phase-disparity neurons (tuned-near or tuned-far) primarily found in higher cortical regions. 1 Introduction Understanding how the brain performs statistical inference is one of the main problems of theoretical neuroscience. In this paper, we propose to apply the tools developed to evaluate the information content of neuronal codes corrupted by noise to address the question of how well they support statistical inference. At the core of our approach lies the interpretation of neuronal response variability due to nuisance stimulus variability as noise. Many theoretical and experimental studies have probed the impact of intrinsic response variability on the quality of sensory codes ([1, 12] and references therein). However, most neurons are responsive to more than one stimulus attribute. So when trying to infer a particular stimulus property, the brain needs to be able to ignore the effect of confounding attributes that also influence the neuron’s response. We propose to evaluate the usefulness of a population code for inference over a particular parameter by treating the neuronal response variability due to nuisance stimulus attributes as noise equivalent to intrinsic noise (e.g. Poisson spiking). We explore the implications of this new approach for the model system of stereo vision where the inference task is to extract depth from binocular images. We compute the Fisher information present ∗Corresponding author (ralf.haefner@gmail.com) 1 Left RF Right RF Left image Right image disparity response disparity response Tuning curve Figure 1: Left: Example random dot stereogram (RDS). Right: Illustration of bincular energy model without (top) and with (bottom) phase disparity. in the monocular inputs to the standard model of early binocular processing and thereby obtain an upper bound on how precisely a model could theoretically extract depth. We compare this with the amount of information that remains after early visual processing. We distinguish the two principal model flavors that have been proposed to explain the physiological findings. We find that one of the two models appears superior to the other one for inferring depth. We start by giving a brief introduction to the two principal flavors of the binocular energy model. We then retrace the processing steps and compute the Fisher information with respect to depth inference that is present: first in the monocular inputs, then after binocular combination, and finally for the resulting tuning curves. 2 Binocular disparity as a model system Stereo vision has the advantage of a clear separation between the relevant stimulus dimension – binocular disparity – and the confounding or nuisance stimulus attributes – monocular image structure ([9]). The challenge in inferring disparity in image pairs consists in distinguishing true from false matches, regardless of the monocular structures in the two images. The stimulus that tests this system in the most general way are random dot stereograms (RDS) that consist of nearly identical dot patterns in either eye (see Figure 1). The fact that parts of the images are displaced horizontally with respect to each other has been shown to be sufficient to give rise to a sensation of depth in humans and monkeys ([5, 4]). Since RDS do not contain any monocular depth cues (e.g. size or perspective) the brain needs to correctly match the monocular image features across eyes to compute disparity. The standard model for binocular processing in primary visual cortex (V1) is the binocular energy model ([5, 10]). It explains the response of disparity-selective V1 neurons by linearly combining the output of monocular simple cells and passing the sum through a squaring nonlinearity (illustrated in Figure 1). reven = (νe L + νe R)2 + (νo L + νo R)2 = νe L 2 + νo L 2 + νe R 2 + νo R 2 + 2(νe Lνe R + νo Lνo R). (1) where νe L is the output of an even-symmetric receptive field (RF) applied to the left image, νo R is the output of an odd-symmetric receptive field (RF) applied to the right image, etc. By pairing an even and an odd-symmetric RF in each eye1, the monocular part of the response of the cell νe L 2 + νo L 2 + νe R 2 + νo R 2 becomes invariant to the monocular phase of a grating stimulus (since sin2 + cos2 = 1) and the binocular part is modulated only by the difference (or disparity) between the phases in left and right grating – as observed for complex cells in V1. The disparity tuning curve resulting from the combination in equation (1) is even-symmetric (illustrated in Figure 1 in blue) and is one of two primary types of tuning curves found in cortex ([5]). In order to model the other, odd-symmetric type of tuning curves (Figure 1 in red), the filter outputs are combined such that the output of an even-symmetric filter is always combined with that of an odd-symmetric one in the other eye: rodd = (νe L + νo R)2 + (νo L + νe R)2 = νe L 2 + νo L 2 + νe R 2 + νo R 2 + 2(νe Lνo R + νo Lνe R). (2) 1WLOG we assume the quadrature pair to consist of a purely even and a purely odd RF. 2 Note that the two models are identical in their monocular inputs and the monocular part of their output (the first four terms in equations 1 and 2) and only vary in their binocular interaction terms (in brackets). The only way in which the first model can implement preferred disparities other than zero is by a positional displacement of the RFs in the two eyes with respect to each other (the disparity tuning curve achieves its maximum when the disparity in the image matches the disparity between the RFs). The second model, on the other hand achieves non-zero preferred disparities by employing a phase shift between the left and right RF (90 deg in our case). It is therefore considered to be phase-disparity model, while the first one is called a position disparity one.2 3 Results How much information the response of a neuron carries about a particular stimulus attribute depends both on the sensitivity of the response to changes in that attribute and to the variability (or uncertainty) in the response across all stimuli while keeping that attribute fixed. Fisher information is the standard way to quantify this intuition in the context of intrinsic noise ([6], but also see [2]) and we will use it to evaluate the binocular energy model mechanisms with regard to their ability to extract the disparity information contained in the monocular inputs arriving at the eyes. 3.1 Response variability d response -1 0 1 Figure 2: Binocular responses for even (blue) and odd (red) model. Figure 2 shows the mean of the binocular response of the two models. The variation of the response around the mean due to the variation in monocular image structure in the RDS is shown in Figure 3 (top row) for four exemplary disparities: −1, 0, 1 and uncorrelated (±∞), indicated in Figure 2. Unlike in the commonly assumed case of intrinsic noise, pbinoc(r|d) – the stimulus-conditioned response distribution – is far from Poisson or Gaussian. Interestingly, its mode is always at zero – the average response to uncorrelated stimuli – and the fact that the mean depends on the stimulus disparity is primarily due to the disparity-dependence of the skew of the response distribution (Figure 3).3 The skew in turn depends on the disparity through the disparitydependent correlation between the RF outputs as illustrated in Figure 3 (bottom row). Of particular interest are the response distributions at the zero disparity 4, the disparities at which rodd takes its minimum and maximum, respectively, and the uncorrelated case (infinite disparity). In the case of infinite disparity, the images in the two eyes are completely independent of each other and hence the outputs of the left and right RFs are independent Gaussians. Therefore, νLνR ∼pbinoc(r|d = ∞) is symmetric around 0. In the case of zero disparity (identical images in left and right eye), the correlation is 1 between the outputs of left and right RFs (both even, or both odd). It follows that νLνR ∼χ2 1 and hence has a mean of 1. What is also apparent is that the binocular energy model with phase disparity (where each even-symmetric RF is paired with an odd-symmetric one) never achieves perfect correlation between the left and right eye and only covers smaller values. 3.2 Fisher information 3.2.1 Fisher information contained in monocular inputs First, we quantify the information contained in the inputs to the energy model by using Fisher information. Consider the 4D space spanned by the outputs of the four RFs in left and right eye: (νe L, νo L, νe R, νo R). Since the ν are drawn from identical Gaussians5, the mean responses of the 2We use position disparity model and even-symmetric tuning interchangeably, as well as phase disparity model and odd-symmetric tuning. Unfortunately, the term disparity is used for both disparities between the RFs, and for disparities between left and right images (in the stimulus). If not indicated otherwise, we will always refer to stimulus disparity for the rest of the paper. 3The RF outputs are Normally distributed in the limit of infinitely many dots (RFs act as linear filters + central limit theorem). Therefore the disparity-conditioned responses p(r|d) correspond to the off-diagonal terms in a Wishart distribution, marginalized over all the other matrix elements. 4WLOG we assume the displacement between the RF centers in the left and right eye to be zero. 5The model RFs have been normalized by their variance, such that var[ν] = 1 and ν ∼N(0, 1). 3 −1 0 1 0 1 −1 0 1 0 1 −1 0 1 0 1 −1 0 1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 Figure 3: Response distributions p(r|d) for varying d. Top row: histograms for values of interaction terms νe Lνe R (blue) and νe Lνo R (red). Bottom row: distribution of corresponding RF outputs νL vs νR. 1σ curves are shown to indicate correlations. Blue (νe L vs νe R) and red (νe L vs νo R) colors refer to the model with even-symmetric tuning curve and odd-symmetric tuning curve, respectively. The disparity value for each column is ±∞, −1, 0 and 1 corresponding to those highlighted in Figure 2. monocular inputs do not depend on the stimulus and hence, the Fisher information is given by I(d) = 1 2tr(C−1C′C−1C′) where C is the covariance matrix belonging to (νe L, νo L, νe R, νo R): C =    1 0 a(d) c(d) 0 1 c(−d) a(d) a(d) c(−d) 1 0 c(d) a(d) 0 1    where we model the interaction terms a(d) := ⟨νe Lνe R⟩= ⟨νo Lνo R⟩and c(d) := ⟨νe Lνo R⟩as Gabor functions6 since Gabors functions have been shown to provide a good fit to the range of RF shapes and disparity tuning curves that are empirically observed in early sensory cortex ([5]).7 a(d) and c(d) are illustrated by the blue and red curves in Figure 2, respectively. Because the binocular part of the energy model response, or disparity tuning curve, is the convolution of the left and right RFs, the phase of the Gabor describing the disparity tuning curve is given by the difference between the phases of the corresponding RFs. Therefore c(d) is odd-symmetric and c(−d) = −c(d). We obtain Iinputs(d) = 2 (1 −a2 −c2)2  (1 + a2 −c2)a′2 + (1 + c2 −a2)c′2 + 4aca′c′ (3) where we omitted the stimulus dependence of a(d) and c(d) for clarity of exposition and where ′ denotes the 1st derivative with respect to the stimulus d. The denominator of equation (3)) is given by det C and corresponds to the Gaussian envelope of the Gabor functions for a(d) and c(d): det C = 1 −a2 −c2 = 1 −exp(−s2 σ2 ). In Figure 4B (black) we plot the Fisher information as a function of disparity. We find that the Fisher information available in the inputs diverges at zero disparity (at the difference between the centers of the left and right RFs in general). This means that the ability to discriminate zero disparity from 6A Gabor function is defined as cos(2πfd −φ) exp[−(d−d0)2 2σ2 ] were f is spatial frequency, d is disparity, φ is the Gabor phase, do is the envelope center (set to zero here, WLOG) and σ the envelope bandwidth. 7The assumption that the binocular interaction can be modeled by a Gabor is not important for the principal results of this paper. In fact, the formulas for the Fisher information in the monocular inputs and in the disparity tuning curves derived below hold for other (reasonable) choices for a(d) and c(d) as well. 4 A B C D disparity d disparity d disparity d disparity d −4 −2 0 2 4 0 0.5 1 1.5 2 −4 −2 0 2 4 0 50 100 −4 −2 0 2 4 0 50 100 −4 −2 0 2 4 0 0.1 0.2 0.3 0.4 Figure 4: A: Disparity tuning curves for the model using position disparity (even) and phase disparity (odd) in blue and red, respectively. B: Black: Fisher information contained in the monocular inputs. Blue: Fisher information left after combining inputs from left and right eye according to position disparity model. Red: Fisher information after combining inputs using phase disparity model. Note that the black and red curves diverge at zero disparity. C: Fisher information for the final model output/neuronal response. Same color code as previously. Solid lines correspond to complex, dashed lines to simple cells. D: Same as C but with added Gaussian noise in the monocular inputs. nearby disparities is arbitrarily good. In reality, intrinsic neuronal variability will limit the Fisher information at zero.8 3.2.2 Combination of left and right inputs Next we analyze the information that remains after linearly combining the monocular inputs in the energy model. It follows that the 4-dimensional monocular input space is reduced to a 2-dimensional binocular one for each model, sampled by (νe L + νe R, νo L + νo R) and (νe L + νo R, νo L + νe R), respectively. Again, the marginal distributions are Gaussians with zero mean independent of stimulus disparity. This means that we can compute the Fisher information for the position disparity model from the covariance matrix C as above: Ceven =  ⟨(νe L + νe R)2⟩ ⟨(νe L + νe R)(νo L + νo R)⟩ ⟨(νe L + νe R)(νo L + νo R)⟩ ⟨(νo L + νo R)2⟩  =  2 + 2a 0 0 2 + 2a  Here we exploited that ⟨νe Lνo L⟩= ⟨νe Rνo R⟩= 0 since the even and odd RFs are orthogonal and that ⟨νe Lνo R⟩= −⟨νo Rνe L⟩. The Fisher information follows as Ieven(d) = a′(d)2 [1 + a(d)]2 . (4) The dependence of Fisher information on d is shown in Figure 4B (blue). The total information (as measured by integrating Fisher information over all disparities) communicated by the positiondisparity model is greatly reduced compared to the total Fisher information present in the inputs. a(d) is an even-symmetric Gabor (illustrated in Figure 2) and hence the Fisher information is greatest on either side of the maximum where the slopes of a(d) are steepest, and zero at the center where a(d) has its peak. We note here that the Fisher information for the final tuning curve for the position-disparity model is the same as in equation (4) and therefore we will postpone a more detailed discussion of it until section 3.2.3. 8E.g. additive Gaussian noise with variance σN2 on the monocular filter outputs eliminates the singularity: det C = 1 + σN2 −a2 −c2 ≥σN2. 5 On the other hand, when combining the monocular inputs according to the phase disparity model, we find: Codd =  ⟨(νe L + νo R)2⟩ ⟨(νe L + νo R)(νo L + νe R)⟩ ⟨(νe L + νo R)(νo L + νe R)⟩ ⟨(νo L + νe R)2⟩  =  2 + 2c 2a 2a 2 −2c  since again ⟨νe Lνo L⟩= ⟨νe Rνo R⟩= 0 and ⟨νe Lνo R⟩= −⟨νo Rνe L⟩= c. The Fisher information in this case follows as Iodd(d) = 1 (1 −a2 −c2)2  (1 + a2 −c2)a′2 + (1 + c2 −a2)c′2 + 4aca′c′ = 1 2Iinputs(d) Iodd(d) is shown in Figure 4B (red). While loosing 50% of the Fisher information present in the inputs, the Fisher information after combining left and right RF outputs is much larger in this case than for the position disparity model explored above. How can that be? Why are the two ways of combining the monocular outputs not symmetric? Insight into this question can be gained by looking at the binocular interaction terms in the quadratic expansion of the feature space for the two models.9 For the position disparity model we obtain the 3-dimensional space (νe Lνe R, νo Lνo R, νe Lνo R + νo Lνe R) of which the third dimension cannot contribute to the Fisher information since νe Lνo R + νo Lνe R = 0. In the phase-disparity model, however, the quadratic expansion yields (νe Lνo R, νo Lνe R, νe Lνe R + νo Lνo R). Here, all three dimensions are linearly independent (although correlated), each contributing to the Fisher information. This can also explain why Iodd(d) is symmetric around zero, and independent of the Gabor phase of c(d). While this is not a rigorous analysis yet of the differences between the models at the stage of binocular combination, it serves as a starting point for a future investigation. 3.2.3 Disparity tuning curves In order to collapse the 2-dimensional binocular inputs into a scalar output that can be coded in the spike rate of a neuron, the energy model postulates a squaring output nonlinearity after each linear combination and summing the results. Since the (νL + νR)2 are not Normally distributed and their means depend on the stimulus disparity, we cannot employ the above approach to calculate Fisher information but instead use the more general I(d) = E " ∂ ∂d ln p(r; d) 2# = Z ∞ 0 p(r; d)  ∂ ∂d ln p(r; d) 2 dr (5) where p(r; d) is the response distribution for stimulus disparity d. Because the ν are drawn from a Gaussian with variance 1, νe L + νe R and νo L + νo R are drawn from N[0, 2(1 + a(d))] since we defined a(d) = ⟨νe Lνe R⟩= ⟨νo Lνo R⟩. Conditioned on d, (νe L + νe R)2 and (νo L + νo R)2 are independent and it follows for the model with an even-symmetric tuning function that 1 2[1 + a(d)]  (νe L + νe R)2 + (νo L + νo R)2 ∼ χ2 2 and peven(r; d) = 1 4[1 + a(d)] exp  − r 4[1 + a(d)]  H(r) (6) where H(r) is the Heaviside step function.10 Substituting equation (6) into equation (5) we find11 Icomplex even (d) = a′(d)2 4[1 + a(d)]3 Z ∞ 0 dr  r 4[1 + a(d)] −1 2 exp  − r 4[1 + a(d)]  = a′(d)2 [1 + a(d)]2 (7) 9By quadratic expansion of the feature space we refer to expanding a 2-dimensional feature space (f1, f2) to a 3-dimensional one (f 2 1 , f 2 2 , f1f2) by considering the binocular interaction terms in all quadratic forms. 10We see that ⟨r⟩peven(r;d) = 4[1 + a(d)] and hence we recover the Gabor-shaped tuning function that we introduced in section 3.2.1 to model the empirically observed relationship between disparity d and mean spike rate r. 11R ∞ 0 dx (x/α −1)2 exp(−x/α) = α for α > 0. 6 Remarkably, this is exactly the same amount of information that is available after summing left and right RFs (see equation 4), so none is lost after squaring and combining the quadrature pair. We show Ieven(d) in Figure 4C (blue). It is also interesting to note that the general form for Ieven(d) differs from the Fisher information based on the Poisson noise model (and ignoring stimulus variability as considered here) only by the exponent of 2 in the denominator. Since 1 + a(d) ≥0 this means that the qualitative dependence of I on d is the same, the main difference being that the Fisher information favors small over large spike rates even more. Conversely, it follows that when Fisher information only takes the neuronal noise into consideration, it greatly overestimates the information that the neuron carries with respect to the to-be-inferred stimulus parameter for realistic spike counts (of greater than two). Furthermore, unlike in the Poisson case, a scaling up of the tuning function 1 + a(d) does not translate into greater Fisher information. Fisher information with respect to stimulus variability as considered here is invariant to the absolute height of the tuning curve.12 Considering the phase-disparity model, (νe L+νo R)2 and (νo L+νe R)2 are drawn from N[0, 2(1+c(d))] and N[0, 2(1+c(d))], respectively, since c(d) = ⟨νe Lνo R⟩= −⟨νo Lνe R⟩. Unfortunately, since νe L +νo R and νo L +νe R have different variances depending on d, and are usually not independent of each other, the sum cannot be modeled by a χ2−distribution. However, we can compute the Fisher information for the two implied binocular simple cells instead.13 It follows that 1 2[1 + c(d)]  (νe L + νo R)2 ∼ χ2 1 and psimple odd (r; d) = 1 2Γ(1/2) p 1 + c(d) 1 √r exp  − r 4[1 + c(d)]  H(r). and14 Isimple odd (d) = 1 2Γ(1/2) c′(d)2 p 1 + c(d) 5 Z ∞ 0 dr 1 √r  r 4[1 + c(d)] −1 2 2 exp  − r 4[1 + c(d)]  = 1 2 c′(d)2 [1 + c(d)]2 15 The dependence of Isimple odd on disparity is shown in Figure 4C (red dashed). Most of the Fisher information is located in the primary slope (compare Figure 4A) followed by secondary slope to its left. The reason for this is the strong boost Fisher information gets when responses are lowest. We also see that the total Fisher information carried by a phase-disparity simple cell is significantly higher than that carried by a position-disparity simple cell (compare dashed red and blue lines) raising the question of what other advantages or trade-offs there are that make it beneficial for the primate brain to employ so many position-disparity ones. Intrinsic neuronal variability may provide part of the answer since the difference in Fisher information between both models decreases as intrinsic variability increases. Figure 4D shows the Fisher information after Gaussian noise has been added to the monocular inputs. However, even in this high intrinsic noise regime (noise variance of the same order as tuning curve amplitude) the model with phase disparity carries significantly more total Fisher information. 12What is outside of the scope of this paper but obvious from equation (7) is that Fisher information is maximized when the denominator, or the tuning function is minimal. Within the context of the energy model, this occurs for neither the position-disparity model, nor the classic phase-disparity one, but for a model where the left and right RFs that are linearly combined, are inverted with respect to each other (i.e. phase-shifted by π). In that case a(d) is a Gabor function with phase π and becomes zero at zero disparity such that the Fisher information diverges. Such neurons, called tuned-inhibitory (TI, [11]) make up a small minority of neurons in monkey V1. 13The energy model as presented thus far models the responses of binocular complex cells. Disparityselective simple cells are typically modeled by just one combination of left and right RFs (νe L + νo R)2 or (νo L + νe R)2, and not the entire quadrature pair. 14R ∞ 0 dx √x−1(x/α −1/2)2 exp(−x/α) = √π√α/2 for α > 0. 15This derivation equally applies to the Fisher information of simple cells with position disparity by substituting a(d) for c(d) and we obtain Isimple even (d) = 1 2 a′(d)2 [1+a(d)]2 . This function is shown in Figure 4C (blue dashed). 7 4 Discussion The central idea of our paper is to evaluate the quality of a sensory code with respect to an inference task by taking stimulus variability into account, in particular that induced by irrelevant stimulus attributes. By framing stimulus-induced nuisance variability as noise, we were able to employ the existing framework of Fisher information for evaluating the standard model of early binocular processing with respect to inferring disparity from random dot stereograms. We started by investigating the disparity-conditioned variability of the binocular response in the absence of intrinsic neuronal noise. We found that the response distributions are far from Poisson or Gaussian and – independent of stimulus disparity – are always peaked at zero (the mean response to uncorrelated images). The information contained in the correlations between left and right RF outputs are translated into a modulation of the neuron’s mean firing rate primarily by altering the skew of the response distribution. This is quite different from the case of intrinsic noise and has implications for comparing different codes. It is noteworthy that these response distributions are entirely imposed by the sensory system – the combination of the structure of the external world with the internal processing model. Unlike the case of intrinsic noise which is usually added ad-hoc after the neuronal computation has been performed, in our case the computational model impacts the usefulness of the code beyond the traditionally reported tuning functions. This property extends to the case of population codes, the next step for future work. Of great importance for the performance of population codes are interneuronal correlations. Again, the noise correlations due to nuisance stimulus parameters are a direct consequence of the processing model and the structure of the external input. Next we compared the Fisher information available for our inference task at various stages of binocular processing. We computed the Fisher information available in the monocular inputs to binocular neurons in V1, after binocular combination and after the squaring nonlinearity required to translate binocular correlations into mean firing rate modulation. We find that despite the great stimulus variability, the total Fisher information available in the inputs diverges and is only bounded by intrinsic neuronal variability. The same is still true after binocular combination for one flavor of the model considered here – that employing phase disparity (or pairing unlike RFs in either eye), not the other one (position disparity), which has lost most information after the initial combination. At this point, our new approach allows us to ask a normative question: In what way should the monocular inputs be combined so as to lose a minimal amount of information about the relevant stimulus dimension? Is the combination proposed by the standard model to obtain even-symmetric tuning curves the only one to do so or are they others that produce a different tuning curve, with a different response distribution that is more suited to inferring depth? Conversely, we can compare our results for the model stages leading from simple to complex cells and compare them with the corresponding Fisher information computed from empirically observed distributions, to test our model assumptions. Recently, Fisher information has been criticized as a tool for comparing population codes ([3, 2]). We note that our approach can be readily adapted to other measures like mutual information or their framework of neurometric function analysis to compare the performance of different codes in a disparity discrimination task. Another potentially promising avenue of future research would to investigate the effect of thresholding on inference performance. One reason that odd-symmetric tuning curves had higher Fisher information in the case we investigated was that odd-symmetric cells produce near-zero responses more often in the context of the energy model. However, it is known from empirical observations that fitting even-symmetric disparity tuning curves requires an additional thresholding output nonlinearity. It is unclear at this point to what extend such a change to the response distribution helps or hinders inference. And finally, we suggest that considering the different shapes of response distributions induced by the specifics of the sensory modality might have an impact on the discussion about probabilistic population codes ([7, 8] and references therein). Cue-integration, for instance, has usually been studied under the assumption of Poisson-like response distributions, assumptions that do not appear to hold in the case of combining disparity cues from different parts of the visual field. Acknowledgments This work has been supported by the Bernstein award to MB (BMBF; FKZ: 01GQ0601). 8 References [1] LF Abbott and P Dayan. The effect of correlated variability on the accuracy of a population code. Neural Comput, 11(1):91–101, 1999. [2] P Berens, S Gerwinn, A Ecker, and M Bethge. Neurometric function analysis of population codes. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 90–98. 2009. [3] M Bethge, D Rotermund, and K Pawelzik. Optimal short-term population coding: when fisher information fails. Neural Comput, 14(10):2317–2351, 2002. [4] C Blakemore and B Julesz. Stereoscopic depth aftereffect produced without monocular cues. Science, 171(968):286–288, 1971. [5] BG Cumming and GC DeAngelis. The physiology of stereopsis. Annu Rev Neurosci, 24:203–238, 2001. [6] P Dayan and LF Abbott. Theoretical neuroscience: Computational and mathematical modeling of neural systems. MIT Press, 2001. [7] J Fiser, P Berkes, G Orban, and M Lengyel. Statistically optimal perception and learning: from behavior to neural representations. Trends Cogn Sci, 14(3):119–130, 2010. [8] WJ Ma, JM Beck, PE Latham, and A Pouget. Bayesian inference with probabilistic population codes. Nat Neurosci, 9(11):1432–1438, 2006. [9] David Marr. Vision: A Computational Investigation into the Human Representation and Processing of Visual Information. Henry Holt and Co., Inc., New York, NY, USA, 1982. [10] I Ohzawa, GC DeAngelis, and RD Freeman. Stereoscopic depth discrimination in the visual cortex: neurons ideally suited as disparity detectors. Science, 249(4972):1037–1041, 1990. [11] GF Poggio and B Fischer. Binocular interaction and depth sensitivity in striate and prestriate cortex of behaving rhesus monkey. J Neurophysiol, 40(6):1392–1405, 1977. [12] F. Rieke, D. Warland, R.R. van, Steveninck, and W. Bialek. Spikes: exploring the neural code. MIT Press, Cambridge, MA, 1997. 9
2010
17
3,932
Spike timing-dependent plasticity as dynamic filter Joscha T. Schmiedt∗, Christian Albers and Klaus Pawelzik Institute for Theoretical Physics University of Bremen Bremen, Germany schmiedt@uni-bremen.de, {calbers, pawelzik}@neuro.uni-bremen.de Abstract When stimulated with complex action potential sequences synapses exhibit spike timing-dependent plasticity (STDP) with modulated pre- and postsynaptic contributions to long-term synaptic modifications. In order to investigate the functional consequences of these contribution dynamics (CD) we propose a minimal model formulated in terms of differential equations. We find that our model reproduces data from to recent experimental studies with a small number of biophysically interpretable parameters. The model allows to investigate the susceptibility of STDP to arbitrary time courses of pre- and postsynaptic activities, i.e. its nonlinear filter properties. We demonstrate this for the simple example of small periodic modulations of pre- and postsynaptic firing rates for which our model can be solved. It predicts synaptic strengthening for synchronous rate modulations. Modifications are dominant in the theta frequency range, a result which underlines the well known relevance of theta activities in hippocampus and cortex for learning. We also find emphasis of specific baseline spike rates and suppression for high background rates. The latter suggests a mechanism of network activity regulation inherent in STDP. Furthermore, our novel formulation provides a general framework for investigating the joint dynamics of neuronal activity and the CD of STDP in both spike-based as well as rate-based neuronal network models. 1 Introduction During the past decade the effects of exact spike timing on the change of synaptic connectivity have been studied extensively. In vitro studies have shown that the induction of long-term potentiation (LTP) requires the presynaptic input to a cell to precede the postsynaptic output and vice versa for long-term depression (LTD) (see [1, 2, 3]). This phenomenon has been termed spike timingdependent plasticity (STDP) and emphasizes the importance of a causal order in neuronal signaling. Thereby it extends pure Hebbian learning, which requires only the coincidence of pre- and postsynaptic activity. Consequently, experiments have shown an asymmetric exponential dependence on the timing of spike pairs and a molecular mechanism mostly dependent on the influx of Ca2+ (see [4, 5] for reviews). Further, when induced with more complex spike trains, synaptic modification shows nonlinearities ([6, 7, 8]) indicating the influence of short-term plasticity. Theoretical approaches to STDP cover studies using the asymmetric pair-based STDP window as a lookup table, more biophysical models based on synaptic and neuronal variables, and sophisticated kinetic models (for a review see [9]). Recently, the experimentally observed influence of the postsynaptic membrane potential (e.g. [10]) has also been taken into account ([11]). Our approach is based on differential Hebbian learning ([12, 13]), which generates asymmetric timing windows similar to STDP ([14]) depending on the shape of the back-propagating action ∗Postal correspondence should be addressed to Universit¨at Bremen, Fachbereich 1, Institut f¨ur Theoretische Physik, Abt. Neurophysik, Postfach 330 440, D-28334 Bremen, Germany 1 potential ([15]). We extend it with a mechanism for activating learning by an increase in postsynaptic activity, because both the induction of LTP and LTD require [Ca2+] to exceed a threshold ([16]). Moreover, we include a mechanism for adaptive suppression on both synaptic sides, similar to the model in [7]. Finally, we for simplicity assume that both the presynaptic and the postsynaptic side function as low-pass filters; a spike leaves a fast increasing and exponentially decaying trace. Together, we propose a set of differential equations, which captures the contribution dynamics (CD) of pre- and postsynaptic activities to STDP, thereby describing synaptic plasticity as a filter. Our framework reproduces experimental findings from two recent in vitro studies in the visual cortex and the hippocampus in most details. Furthermore, it proves to be particularly suitable for the analysis of the susceptibility of STDP to pre- and postsynaptic rate modulations. This is demonstrated by an analysis of synaptic changes depending on oscillatory modulations of baseline firing rates. 2 Formulation of the model We use a variant of the classical differential Hebbian learning assuming a change of synaptic connectivity w, which is dependent on the presynaptic activity trace ypre and the temporal derivative of the postsynaptic activity trace ypost: ˙w(t) = cw ypre(t) ˙ypost(t) . (1) cw denotes a constant learning rate. An illustration of this learning rule for pairs of spikes is given in Figure 1B. For simplicity, we assume these activity traces to be abstract low-pass filtered versions of neuronal activity x in the presynaptic and postsynaptic cells, e.g. the concentration of Ca2+ or the amount of bound glutamate: ˙ypre(t) = upre(t) · xpre(t) −ypre(t) τpre (2) ˙ypost(t) = upost(t)z(t) · xpost(t) −ypost(t) τpost . (3) The dynamics of the y’s are characterized by their respective time constants τpre and τpost. The contribution of each spike is regulated by a suppressing attenuation factor u pre- and postsynaptically. On the postsynaptical side an additional activation factor z ”enables” the synapse to learn. The dynamics of u and z are discussed below. x represents neuronal activity which can be either a time-continuous firing rate or spike trains given by series of δ pulses xpre, post(t) = X i δ(t −ti pre, post) , (4) which allows analytical investigations of the properties of our model. Note that formally x(t) has then to be taken as x(t + 0). An illustrating overview over the different parts of the model with sample trajectories is shown in Figure 1A. We define the relative change of synaptic connectivity after after a period T from Equation (1) as ∆w = w(t0 + T) w(t0) −1 = cw w(t0) Z T ypre ˙ypost dt . (5) The dependence on the initial synaptic strength w(t0) as observed in [3, 8] shall not be discussed here, but can easily be achieved by making the learning rate cw in Equation (1) w-dependent. Here, w(t0) is chosen to be 1. Ignoring attenuation and activation, a single pair of spikes at temporal distance ∆t analytically yields the typical STDP window (see Figure 2A and 3A): ∆w(∆t) = ( cw  1 − τpre τpre+τpost  e−∆t/τpre for ∆t > 0 cw · τpre τpre+τpost e−∆t/τpost for ∆t < 0 (6) 2 SYNAPSE PRE POST Low-pass d dt ∆w u Activity Activity Traces (Contributions) Modulation Factors u z x x y y Low-pass & Differential Hebbian Learning Π Example for spike pairs ∆w ∼  ypre (t) ˙ypost (t) dt > 0 ∆w ∼  ypre (t) ˙ypost (t) dt < 0 τpre τpost Time ypre ypost 0 0 ypost ∆t > 0 ∆t < 0 A B Figure 1: Schematic illustration of differential Hebbian learning with contribution dynamics. A: Pre- and postsynaptic activity (x, second column) is modulated (attenuated with u, activated with z, first column) and filtered (y, third column) before it contributes to differential Hebbian learning (w, fourth column). B: Spike pair example for differential Hebbian learning. Left: a presynaptic spike trace (ypre) preceding a postsynaptic spike trace (ypost, dotted line) yields a synaptic strengthening due to the initially positive postsynaptic contribution ( ˙ypost, solid line), which is always stronger than the following negative part. Right: for the reverse timing the positive presynaptic contribution is only multiplied with the negative postsynaptic trace (right). Areas contributing to learning are shaded. The importance of adaptive suppressing mechanisms for synaptic plasticity has experimentally been shown by Froemke and colleagues ([7, 6]). Therefore, we down-regulate the contribution of the spikes to the activity traces y in Equation (2) and (3) with an attenuation factor u on both pre- and postsynaptic sides: ˙upre = 1 τ rec pre (1 −upre) −cpreuprexpre (7) ˙upost = 1 τ rec post (1 −upost) −cpost(upost −u0)xpost . (8) This should be understood as an abstract representation of for instance the depletion of transmitters in the presynaptic bouton ([17]) or the frequency-dependent spike attenuation in dendritic spines ([18]), respectively. These recover with their time constants τ rec and are bound between u0 and 1. 3 For the presynaptic side we assume in the following upre 0 = 0, so we abbreviate u0 = upost 0 . The constants cpre, post ∈[0, 1] denote the impact a spike has on the relaxed synapse. In several experiments it has been shown that a single spike is not sufficient to induce synaptic modification ([10, 8]). Therefore, we introduce a spike-induced postsynaptic activation factor z ˙z = cactxpostz −α(z −z0)2 , (9) which enhances the contribution of a postsynaptic spike to the postsynaptic trace, e.g. by the removal of the Mg2+ block from postsynaptic NMDA receptors ([19, 5]). The nonlinear positive feedback is introduced to describe strong enhancing effects as for instance autocatalytic mechanisms, which have been suggested to play a role in learning on several time-scales ([20, 21]). The activation z decays hyperbolically to a lower bound z0 and the contribution of a spike is weighted with the constant cact. 3 Comparison to experiments In order to evaluate our model we implemented experimental stimulation protocols from in vitro studies on synapses of the visual cortex ([7]) and the hippocampus ([8]) of rats. In both studies, simple pairs of spikes and more complex spike trains were artificially elicited in the presynaptic and the postsynaptic cell and the induced change of synaptic connectivity was recorded. Froemke and colleagues ([7]) focused on the effects of spike bursts on synaptic modification in the visual cortex. In addition to the classical STDP pairing protocol – a presynaptic spike preceding or following a postsynaptic spike after a specific time ∆t – four other experimental protocols (see Figure 2B to E) were performed: (1) 5-5 bursts with five spikes of a certain frequency on both synaptic sides, where the postsynaptic side follows the presynaptic side, (2) presynaptic 100 Hz bursts with n spikes following one postsynaptic spike (post-n-pre), (3) presynaptic 100 Hz bursts with different numbers of spikes followed by one postsynaptic spike (n-pre-post) and (4) a post-pre pair with varying number of following postsynaptic spikes (post-pre-n-post). −150 −100 −50 0 50 100 −0.5 0 0.5 1 1.5 ∆ t (ms) ∆ w 10 50 100 −0.5 0 0.5 Frequency (Hz) 1 2 3 4 5 −0.4 −0.2 0 Presynaptic spikes 1 2 3 4 5 0 0.2 0.4 0.6 0.8 1 Presynaptic spikes 1 2 3 4 5 −0.4 −0.2 0 0.2 0.4 Postsynaptic spikes pre post LTD LTP A B C D E Experiment Model Figure 2: Differential Hebbian learning with CD reproduces synaptic modification induced with STDP spike patterns in visual cortex. Data taken from [7], personal communication. A: experimental fit and model prediction with Equation (6) of pair-based STDP. B: dependence of synaptic modifications on the frequency of 5-5 bursts with presynaptic spikes following postsynaptic spikes by 6 ms. C, D and E: synaptic modification induced by post-n-pre, n-pre-post and post-pre-n-post 100 Hz spike trains. 4 −150 −100 −50 0 50 100 −0.5 0 0.5 1 ∆ t (ms) ∆ w (5,89,5) (5,20,5) (5,84,5) 0 0.1 0.2 0.3 (5,5) (10,10) (15,5) (5,15) 0 0.2 0.3 0.4 (5,5) (10,10) (15,5) (5,15) 0 0.1 0.2 0.3 0.4 A C B D Interspike interval (ms) Interspike interval (ms) Interspike interval (ms) pre post ∆ w Experiment Model Figure 3: Differential Hebbian learning with CD reproduces synaptic modification induced with STDP spike patterns in hippocampus. Data taken from [8] as reported in [22]. A: experimental fit and model prediction with Equation (6) of pair-based STDP. B: quadruplet protocol. C and D: post-pre-post and pre-post-pre triplet protocol for different interspike intervals. Table 1: Parameters and evaluation results for the data sets from visual cortex ([7]) and hippocampus ([8]). E: normalized mean-square error, S: ratio of correctly predicted signs of synaptic modification. cpre cpost cact τ rec pre [s] τ rec post [s] α u0 z0 E S Visual cortex 0.9 1 1.5 2 0.2 1 0.01 1 4.04 18/18 Hippocampus 0.6 0.4 3.5 0.5 0.5 1 0.7 0.2 2.16 10/11 In the hippocampal study of Wang et al. ([8]) synaptic modification induced by triplets (pre-post-pre and post-pre-post) and quadruplets (pre-post-post-pre and post-pre-pre-post) of spikes was measured while the respective interspike intervals were varied. (see Figure 3B to D). As a first step we took the time constants from the experimentally measured pair-based STDP windows as our low-pass filter time constants (see Equation 6). They remained constant for each data set: (1) τpre = 13.5 ms and τpost = 42.8 ms for [7], (2) τpre = 16.8 ms and τpost = 33.7 ms for [8] (taken from [23] since not present in the study). Next, we chose the learning rate cw in Equation (6) to fit the synaptic change for the pairing protocol: (1) cw = 1.56 for the visual cortex data, (2) cw = 0.99 for the hippocampal data set. The remaining parameters were estimated manually within biologically plausible ranges and are shown in Table 1. The model was then applied to the more complex stimulation protocols by solving the differential equations semi-analytically, i.e. separately for every spike and the following interspike interval. As measure for the prediction error of our model we used the normalized mean-square error E E = 1 N N X i=1 ∆wexp i −∆wmod i σi 2 , (10) where ∆wexp i and ∆wmod i are the experimentally measured and the predicted modifications of synaptic strength in the ith experiment; N is the number of data points (N = 18 for the visual cortex data set, N = 11 for the hippocampal data set). σi is the standard error of the mean of the experimental data. Additionally we counted the number of correctly predicted signs S of synaptic modification, i.e. induced depression or potentiation. The prediction error for both data sets is shown in Table 1. 5 1 3 7 20 50 100 1 3 7 20 50 100 1 3 7 20 50 100 1 3 7 20 50 100 1 3 7 20 50 100 1 3 7 20 50 100 Modulation frequency f [Hz] Phase shift ∆ϕ › 0 -› ›/2 -›/2 › 0 -› ›/2 -›/2 › 0 -› ›/2 -›/2 › 0 -› ›/2 -›/2 › 0 -› ›/2 -›/2 › 0 -› ›/2 -›/2 Cortex Hippocampus x0 = 1Hz x0 = 5Hz x0 = 10Hz x0 = 1Hz x0 = 5Hz x0 = 30Hz -1 1 ∆W (a.u.) 0 Figure 4: Synaptic change depending on frequency f and phase shift ∆φ of pre- and postsynaptic rate modulations for different baseline rates x0. The color codes are identical within each column and in arbitrary units. Note the strong suppression with increasing baseline rate for cortical synapses which is due to strong attenuation effects of pre- and postsynaptic contributions. It is weaker for hippocampal synapses because we found the postsynaptic attenuation to be bounded (u0 = 0.7). 4 Phase, frequency and baseline rate dependence of STDP with contribution dynamics As shown in the previous section our model can reproduce the experimental findings of synaptic weight changes in response to spike sequences surprisingly well and yields better fits than former studies (e.g. [22]). The proposed framework, however, is not restricted to spike sequences but allows to investigate synaptic changes depending on arbitrary pre- and postsynaptic activities. For instance it could be used for investigations of the plasticity effects in simulations with inhomogeneous Poisson processes. Taking x(t) to be firing rates of Poissonian spike trains our account of STDP represents a useful approximation for the expected changes of synaptic strength depending on the time courses of xpre and xpost (compare e.g. [24]). Therefore our model can serve also as building block in rate based network models for investigation of the joint dynamics of neuronal activities and synaptic weights. Here, we demonstrate the benefit of our approach for determining the filter properties of STDP subject to CD, i.e. we use the equations together with the parameters from the experiments for determining the dependency of weight changes on frequency, relative phase ∆φ and baseline rates of modulated pre- and postsynaptic firing rates. While for substantial modulations of firing rates the nonlinearities are difficult to be treated analytically, for small periodical modulations around a baseline rate x0 the corresponding synaptic changes can be calculated analytically. This is done by considering xpre(t) = x0 + ε cos(2πft) and xpost(t) = x0 + ε cos(2πft −∆φ) , (11) which for small ε < x0 allows linearization of all equations from which one obtains ∆W = ∆w/(Tεpreεpost), where T = 1/f = 2π/ω is the period of the respective oscillations. Neglect6 ing transients this finally yields the expected weight changes per unit time. Though lengthy the calculations are straightforward and presented in the supplementary material. We here show only the exact result for the case of constant u = 1 and z = 1: ∆W = ωτpreτpost p ω2(τpost −τpre)2 + (1 + ω2τpreτpost)2 2(1 + τ 2preω2)(1 + τ 2 postω2) ·sin  ∆φ+arctan ω(τpost −τpre) 1 + ω2τpreτpost  (12) The analytical results for the case with CD are shown graphically in Figure 4 using the parameters from cortex and hippocampus, respectively (see Tab. 1). These plots contain the main findings: (1) rate modulations in the theta frequency range (≃7Hz) lead to strongest synaptic changes, (2) also for phase-zero synchronous rate modulations weight changes are positive, (3) in hippocampus maximal weight change magnitudes occur at baseline rates around 5 Hz, and (4) for high baseline rates weight changes become suppressed (∼1/x0 for the hippocampus, ∼1/x2 0 for the visual cortex). Numerical simulations with finite rate modulations were found to confirm these analytical predictions surprisingly well. Also for the nonlinear regime and Poissionian spike trains deviations remained moderate. 5 Discussion STDP has been proposed to represent a fundamental mechanism underlying learning and many models explored its computational role (examples are [25, 26, 27]). In contrast, research targeting the computational roles of dynamical phenomena inherent in STDP are in the beginning (see [9]). Here, we here formulated a minimal, yet biologically plausible model including the dynamics of how neuronal activity contributes to STDP. We found that our model reproduces the synaptic changes in response to spike sequences in experiments in cortex and hippocampus with high accuracy. Using the corresponding parameters our model predicts weight changes depending on temporal structures in the pre- and postsynaptic activities including spike sequences and varying firing rates. When applied to pre- and postsynaptic rate modulations our approach quantifies synaptic changes depending on frequency and phase shifts between pre- and postsynaptic activities. A rigorous perturbation analysis of our model reveals that the dynamical filter properties of STDP make weight changes sensitively dependent on combinations of specific features of pre- and postsynaptic signals. In particular, our analysis indicates that both cortical as well as hippocampal STDP is most susceptible for modulations in the theta frequency range. It predicts the dependency of synaptic changes on pre- and postsynaptic phase relations of rate modulations. These results are in line with experimental results on the relation of theta rhythms and learning. For instance in hippocampus it is well established that theta oscillations are relevant for learning (for a recent paper see [28]). Furthermore, spike activities in hippocampus exhibit specific phase relations with the theta rhythm (for a review see [29]). Also, it has been found that during learning cortex and hippocampus tend to synchronize with particular phase relations that depend on the novelty of the item to be learned ([30]). The results presented here underline these findings and make testable predictions for the corresponding synaptic changes. Also, we find potentiation for zero phase differences and strong attenuation of weight changes at large baseline rates which is particularly strong for cortical synapses. This finding suggests a mechanism for restricting weight changes with high activity levels and that STDP is de facto switched off when large firing rates are required for the execution of a function as opposed to learning phases; during the latter baseline rates should be rather low, which is particularly relevant in cortex. While for cortical synapses our analysis predicts that very low baseline activities are contributing most to weight changes, in hippocampus synaptic modifications peak at baseline firing rates x0 around 5 Hz, which suggests that x0 can control learning. Our study suggests that the filter properties of STDP originating from the dynamics of pre- and postsynaptic activity contributions are in fact exploited for learning in the brain. In particular, shifts in baseline rates, as well as the frequency and the respective phases of pre- and postsynaptic rate modulations induced by theta oscillations could be tuned to match the values that make STDP most susceptible for synaptic modifications. A fascinating possibility thereby is that these features could be used to control the learning rate which would represent a novel mechanism in addition to other control signals as e.g. neuromodulators. 7 References [1] W. Levy and O. Steward. Temporal contiguity requirements for long-term associative potentiation/depression in the hippocampus. Neuroscience, 8(4):791–797, 1983. [2] H. Markram, J. Lubke, M. Frotscher, and B. Sakmann. Regulation of synaptic efficacy by coincidence of postsynaptic APs and EPSPs. Science, 1997. [3] 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(24):10464–72, 1998. [4] P. J. Sj¨ostr¨om, E. A. Rancz, A. Roth, and M. H¨ausser. Dendritic excitability and synaptic plasticity. Physiological Reviews, 88(2):769–840, 2008. [5] N. Caporale and Y. Dan. Spike timing–dependent plasticity: a Hebbian learning rule. Annual Review in Neuroscience, 2008. [6] R. C. Froemke and Y. Dan. Spike-timing-dependent synaptic modification induced by natural spike trains. Nature, 2002. [7] R. C. Froemke, I. A. Tsay, M. Raad, J. D. Long, and Y. Dan. Contribution of individual spikes in burst-induced long-term synaptic modification. Journal of Neurophysiology, 95(3):1620–9, 2006. [8] H. X. Wang, R. C. Gerkin, D. W. Nauen, and G. Q. Bi. Coactivation and timing-dependent integration of synaptic potentiation and depression. Nature Neuroscience, 8(2):187–93, 2005. [9] A. Morrison, M. Diesmann, and W. Gerstner. Phenomenological models of synaptic plasticity based on spike timing. Biological Cybernetics, 98(6):459–78, 2008. [10] P. J. Sj¨ostr¨om, G. G. Turrigiano, and S. B. Nelson. Rate, timing, and cooperativity jointly determine cortical synaptic plasticity. Neuron, 32(6):1149–1164, 2001. [11] C. Clopath, L. B¨using, E. Vasilaki, and W. Gerstner. Connectivity reflects coding: a model of voltage-based STDP with homeostasis. Nature Neuroscience, 13(3):344–52, 2010. [12] B. Kosco. Differential Hebbian learning. AIP Conference Proceedings 151 on Neural Networks for Computing, 1987. [13] A. H. Klopf. A drive-reinforcement model of single neuron function: An alternative to the Hebbian neuronal model. AIP Conference Proceedings, 151(1):265–270, 1986. [14] P. D. Roberts. Computational consequences of temporally asymmetric learning rules: I. differential Hebbian learning. Journal of Computational Neuroscience, 7(3):235–246, 1999. [15] A. Saudargiene, B. Porr, and F. W¨org¨otter. How the shape of pre-and postsynaptic signals can influence STDP: a biophysical model. Neural Computation, 2004. [16] T. Nevian and B. Sakmann. Spine Ca2+ signaling in spike-timing-dependent plasticity. Journal of Neuroscience, 26(43):11001–13, 2006. [17] M. V. Tsodyks and H. Markram. The neural code between neocortical pyramidal neurons depends on neurotransmitter release probability. Proceedings of the National Academy of Sciences, 94(2):719–723, 1997. [18] E. Tanaka, H. Higashi, and S. Nishi. Membrane properties of guinea pig cingulate cortical neurons in vitro. J Neurophysiol, 65(4):808–821, 1991. [19] L. Nowak, P. Bregestovski, P. Ascher, A. Herbet, and A. Prochiantz. Magnesium gates glutamate-activated channels in mouse central neurones. Nature, 307(5950):462–5, 1984. [20] J. E. Lisman. A Mechanism for Memory Storage Insensitive to Molecular Turnover: A Bistable Autophosphorylating Kinase. Proceedings of the National Academy of Sciences, 82(9):3055– 3057, 1985. [21] U. S. Bhalla and R. Iyengar. Emergent Properties of Networks of Biological Signaling Pathways. Science, 283(5400):381–387, 1999. [22] J. P. Pfister and W. Gerstner. Triplets of spikes in a model of spike timing-dependent plasticity. Journal of Neuroscience, 26(38):9673–82, 2006. [23] G. Bi and M. Poo. Synaptic modification by correlated activity: Hebb’s postulate revisited. Annual Review of Neuroscience, 24:139–66, 2001. 8 [24] M. Tsodyks, K. Pawelzik, and H. Markram. Neural networks with dynamic synapses. Neural Computation, 10(4):821–35, 1998. [25] M. Lengyel, J. Kwag, O. Paulsen, and P. Dayan. Matching storage and recall: hippocampal spike timing-dependent plasticity and phase response curves. Nature Neuroscience, 8(12):1677–83, 2005. [26] F. W¨org¨otter and B. Porr. Temporal sequence learning, prediction, and control: a review of different models and their relation to biological mechanisms. Neural Computation, 17(2):245– 319, 2005. [27] E. M. Izhikevich. Solving the distal reward problem through linkage of STDP and dopamine signaling. Cerebral Cortex, 17(10):2443–52, 2007. [28] U. Rutishauser, I. B. Ross, A. N. Mamelak, and E. M. Schuman. Human memory strength is predicted by theta-frequency phase-locking of single neurons. Nature, 464(7290):903–7, 2010. [29] Y. Yamaguchi, N. Sato, H. Wagatsuma, Z. Wu, C. Molter, and Y. Aota. A unified view of theta-phase coding in the entorhinal-hippocampal system. Current Opinion in Neurobiology, 17(2):197–204, 2007. [30] A. Jeewajee, C. Lever, S. Burton, J. O’Keefe, and N. Burgess. Environmental novelty is signaled by reduction of the hippocampal theta frequency. Hippocampus, 18(4):340–8, 2008. 9
2010
170
3,933
The Neural Costs of Optimal Control Samuel J. Gershman and Robert C. Wilson Psychology Department and Neuroscience Institute Princeton University Princeton, NJ 08540 {sjgershm,rcw2}@princeton.edu Abstract Optimal control entails combining probabilities and utilities. However, for most practical problems, probability densities can be represented only approximately. Choosing an approximation requires balancing the benefits of an accurate approximation against the costs of computing it. We propose a variational framework for achieving this balance and apply it to the problem of how a neural population code should optimally represent a distribution under resource constraints. The essence of our analysis is the conjecture that population codes are organized to maximize a lower bound on the log expected utility. This theory can account for a plethora of experimental data, including the reward-modulation of sensory receptive fields, GABAergic effects on saccadic movements, and risk aversion in decisions under uncertainty. 1 Introduction Acting optimally under uncertainty requires comparing the expected utility of each possible action, but in most situations of practical interest this expectation is impossible to calculate exactly: the hidden states that must be integrated over may be high-dimensional and the probability density may not take on any simple form. As a consequence, approximations must inevitably be used. Typically one has a choice of approximation, with more exact approximations demanding more computational resources, a penalty that can be naturally incorporated into the utility function. The question we address in this paper is: given a family of approximations and their associated resource demands, what approximation will lead as close as possible to the optimal control policy? This is a poignant problem for the brain, which expends a collosal amount of metabolic energy in building an internal model of the world. Previous theoretical work has studied how “energy-efficient codes” might be constructed by the brain to maximize information transfer with the least possible energy consumption [10]. However, maximizing information transfer is only one component of adaptive behavior; the utility of information must be taken into account when choosing a code [15], and this may interact in complicated ways with the computational costs of approximate inference. Our contribution is to place this problem within a decision-theoretic framework by representing the choice of approximation as a “meta-decision” with its own expected utility. Central to our analysis is the observation that while this expected utility cannot be maximized directly, it is possible to maximize a variational lower bound on log expected utility (see also [17, 5] for related approaches). We study the properties of this lower bound and show how it accounts for some intriguing empirical properties of neural codes. 1 2 Optimal control with approximate densities Let a denote an action and s denote a hidden state variable drawn from some probability density p(s).1 Given a utility function U(a; s), the optimal action ap is the one that maximizes expected utility Vp(a): ap = argmax a Vp(a), (1) where Vp(a) = Ep[U(a; s)] = Z s p(s)U(a; s)ds. (2) Computing the expected utility for each action requires solving a possibly intractable integral. An approximation of expected utility can be obtained by substituting an alternative density q(s) for which the expected utility is tractable. For example, one might choose q(s) to be a Gaussian with some mean and variance, or a Monte Carlo approximation, or even a delta function at some point. Using an approximate density presents the “meta-decision” of which density to use. If one chooses optimally under q(s), then the expected utility is given by Ep[U(aq; s)] = Vp(aq), therefore the optimal density q∗should be chosen according to q∗= argmax q∈Q Vp(aq), (3) where Q is some family of densities. To understand Eq. 3, consider the optimization as consisting of two parts: first, select an approximate density q(s) and choose the optimal action with respect to this density; then evaluate the true value of that action under the target density. Clearly, if p ∈Q, then q = p is the optimal solution. In general, we cannot optimize this function directly because it requires solving precisely the integral we are trying to avoid: the expected utility under p(s). We can, however, use the approximate density to lower-bound the log expected utility under p(s) by appealing to Jensen’s inequality: log Vp(a) ≥ Z s q(s) log p(s)U(a; s) q(s) ds = Eq[log U(a; s)] + Eq[log p(s)] −Eq[log q(s)], (4) Notice the similarity to the evidence lower bound used in variational Bayesian inference [9]: whereas in variational inference we attempt to lower-bound the log marginal likelihood (evidence), in variational decision theory we attempt to lower-bound the log expected utility. Examining the utility lower bound, we see that the terms exert conceptually distinct influences: 1. A utility component, Eq[log U(a; s)], the expected log utility under the approximate density. 2. A cross-entropy component, −Eq[log p(s)], reflecting the mismatch between the approximate density and the target density. This can be thought of as a form of “sensory prediction error.” 3. An entropy component, −Eq[log q(s)], embodying a maximum entropy principle [8]: for a fixed utility and cross-entropy, choose the distribution with maximal entropy. Intuitively, a more accurate approximate density q(s) should incur a larger computational cost. One way to express this notion of cost is to incorporate it directly into the utility function. That is, we consider an augmented utility function U(a, q; s) that depends on the approximate density. If we assume that the utility function takes the form log U(a, q; s) = log R(a; s) −log C(q), where R(a; s) represents a reward function and C(q) represents a computational cost function, we arrive at the following modification to the utility lower bound: L(q, a) = Eq[log R(a; s)] + Eq[log p(s)] −Eq[log q(s)] −log C(q). (5) 1For the sake of notational simplicity, we implicitly condition on any observed variables. We also refer throughout this paper to probability densities over a multimdensional, continuous state variable, but our results still apply to one dimensional and discrete variables (in which case the probability densities are replaced with probability mass functions). 2 The assumption that the log utility decomposes into additive reward and cost components is intuitive: it implies that reward is measured relative to the computational cost of earning it. In summary, the utility lower bound L(q, a) provides an objective function for simultaneously choosing an action and choosing an approximate density over hidden states. Whereas in classical decision theory, optimization is performed over the action space, in variational decision theory optimization is performed over the joint space of actions and approximate densities. Perception and action are thereby treated as a single optimization problem. 3 Choosing a probabilistic population code While the theory developed in the previous section applies to any representation scheme, in this section, for illustrative purposes, we focus on one specific family of approximate densities defined by the firing rate of neurons in a network. Specifically, we consider a population of N neurons tasked with encoding a probability density over s. One way to do this, known as a kernel density estimate (KDE) code [1, 28], is to associate with each neuron a kernel density fn(s) and then approximate the target density with a convex combination of the kernel densities: q(s) = 1 Z N X n=1 exnfn(s), (6) where xn denotes the firing rate of neuron n and Z = PN n=1 exn. We assume that the kernel density functions are Gaussian, parameterized by a preferred stimulus (mean) sn and a standard deviation σn: fn(s) = 1 √ 2πσn exp  −(s −sn)2 2σ2n  (7) For simplicity, in this paper we will focus on the limiting case in which σ ⇒0.2 In this case q(s) degenerates onto a collection of delta functions: q(s) = 1 Z N X n=1 exnδ(s −sn), (8) where δ(·) is the Dirac delta function. This density corresponds to a collection of sharply tuned neurons; provided that the preferred values {s1, . . . , sN} densely cover the state space, q(s) can represent arbitrarily complicated densities by varying the firing rates x. 3.1 Optimizing the bound Assuming for the moment that there is only a single action, we can state the optimization problem as follows: given the family of approximate densities parameterized by x, choose the density that maximizes the utility lower bound L(q, a) = 1 Z N X n=1 exn [log U(a; sn) + log ˜p(sn) −xn] + log Z −log B −log C(q), (9) where p(s) = ˜p(s)/B (i.e., ˜p(s) is the un-normalized target density). Note also that B = R s ˜p(s)ds does not depend on xn, and hence can be ignored for the purposes of optimization. Technically, the lower bound is not well defined in the limit because the target density is non-atomic (i.e., has zero mass at any given value). However, approximating the expectations in Eq. 5 by Eq[g(s)] ≈Z−1 PN n=1 exng(sn), as we do above, can be justified in terms of first-order Taylor series expansions around the preferred stimuli, which will be arbitrarily accurate as σ →0. In the rest of this paper, we shall assume that the cost function takes the following form: C(q) = βN + γ N X n=1 xn, (10) 2The case of small, finite σ can be addressed by using a Laplace approximation to the integrals and leads to small correction terms in the following equations. 3 10 30 50 70 s probability density (a) probability distributions 10 30 50 70 neuron number (d) exponential coding 10 30 50 70 neuron number (c) gain coding 10 30 50 70 neuron number firing rate (b) convolutional coding Figure 1: Comparison between coding schemes. The leftmost panel shows a collection of probability distributions with different variances, and the other panels show different neural representations of these distributions. where β is the fixed cost of maintaining a neuron, and γ is the cost of a spike (c.f. [10]). We next seek a neuronal update rule that performs gradient ascent on the utility lower bound. Holding the firing rate of all neurons except n fixed, taking the partial derivative of L(q, a) with respect to xn and setting it to 0, we arrive at the following update rule: xn ←  log U(a; sn) + log ˜p(sn) + 1 Z N X j=1 exj [xj −log U(a; sj) −log ˜p(sj)] − Zγ exnC(q)   + (11) where [·]+ denotes linear rectification.3 This update rule defines an attractor network whose Lyapunov function is the (negative) utility lower bound. When multiple actions are involved, the bound can be jointly optimized over a and q by coordinate ascent. While somewhat untraditional, we note that this update rule is biologically plausible in the sense that it only involves local pairwise interactions between neurons. 4 Relation to other probability coding schemes 4.1 Exponential, convolutional and gain coding The probability coding scheme proposed in Eq. 8 is closely related to the exponential coding described in [16]. That scheme also encodes probabilities using exponentiated activities, although it uses the representation in a very different way and in a network with very different dynamics, focusing on sequential inference problems instead of the arbitrary decision problems we consider here. Other related schemes include convolutional coding [28], in which a distribution is encoded by convolving it with a neural tuning function, and gain coding [11, 27], in which the variance of the distribution is inversely proportional to the gain of the neural response. In Figure 1, we show how these three different ways of encoding probability distributions represent three different Gaussians with variance 2 (black line in Figure 1a), 4 (red) and 10 (blue) units. Convolutional coding (Figure 1b) is characterized by a neural response pattern that gets broader as the distribution gets broader. This has been one of the major criticisms of this type of encoding scheme as this result does not seem to be borne out experimentally (e.g., [19, 2]). In contrast, gain coding schemes (Figure 1c) posit that changes in uncertainty only change the overall gain, and not the shape, of the neural response. This leads to predictions that are consistent with experiments, but limits the type of distributions that can be represented to the exponential family [11]. Finally, Figure 1d shows how the exponential coding scheme we propose represents the distributions in a manner that can be thought of as in between convolutional coding and gain encoding, with a population response that gets broader as the encoded distribution broadens, but in a much less 3This update is equivalent to performing gradient ascent on L with a variable learning rate parameter given by Z exn . We chose this rule as it converges faster and seems more neurally plausible than the pure gradient ascent. 4 pronounced way than pure convolutional coding. This point is crucial for the biological plausibility of this scheme, as it seems unlikely that these minute differences in population response width would be easily measured experimentally. It is also important to note that both the convolutional and gain coding schemes ignore the utility function in constructing probabilistic representations. As we explore in later sections, rewards and costs place strong constraints on the types of codes that are learned by the variational objective, and the available experimental data is congruent with this view. “Pure” probabilistic representations may not exist in the brain. 4.2 Connection to Monte Carlo approximation Substantial interest has been generated recently in the idea that the brain might use some form of sampling (i.e., Monte Carlo algorithm) to approximate complicated probability densities. Psychological phenomena like perceptual multistability [6] and speech perception [21] are parsimoniously explained by a model in which a density over the complete hypothesis space is replaced by a small set of discrete samples. Thus, it is reasonable to speculate whether our theory of population coding relates to these at the neural level. When each neuron’s tuning curve is sharply peaked, the resulting population code resembles importance sampling, a common Monte Carlo method for approximating probability densities, wherein the approximation consists of a weighted set of samples: p(s) ≈ N X n=1 w(n)δ(s −s(n)), (12) where s(n) is drawn from a proposal density π(s) and w(n) ∝p(s(n))/π(s(n)). In fact, we can make this correspondence precise: for any population code of the form in Eq. 8, there exists an equivalent importance sampling approximation. The corresponding proposal density takes the form: π(s) ∝ X n p(sn) exn δ(s −sn). (13) This means that optimizing the bound with respect to x is equivalent to selecting a proposal density so as to maximize utility under resource constraints. A related analysis was made by Vul et al. [26], though in a more restricted setting, showing that maximal utility is achieved with very few samples when sampling is costly. Similarly, π(s) will be sensitive to the computational costs inherent in the utility lower bound, favoring a small number of samples. Interestingly, importance sampling has been proposed as a neurally-plausible mechanism for Bayesian inference [22]. In that treatment, the proposal density was assumed to be the prior, leading to the prediction that neurons with preferred stimulus s∗should occur with frequency proportional to the prior probability of s∗. One source of evidence for this prediction comes from the oblique effect: the observation that more V1 neurons are tuned to cardinal orientations than to oblique orientations [3], consistent with the statistics of the natural visual environment. In contrast, our model predicts that the proposal density will be sensitive to rewards in addition to the prior; as we argue in the section 5.1, a considerable amount of evidence favors this view. 5 Results In the following sections, we examine some of the neurophysiological and psychological implications of the variational objective. Tying these diverse topics together is the central idea that utilities, costs and probabilistic beliefs exert a synergistic effect on neural codes and their behavioral outputs. One consequence of the variational objective is that a clear separation of these components in the brain may not exist: rewards and costs infiltrate very early sensory areas. These influences result in distortions of probabilistic belief that appear robustly in experiments with humans and animals. 5.1 Why are sensory receptive fields reward-modulated? Accumulating evidence indicates that perceptual representations in the brain are modulated by reward expectation. For example, Shuler and Bear [23] paired retinal stimulation of the left and right 5 0 0.2 0.4 0.6 0.8 1 0 0.005 0.01 0.015 0.02 0.025 0.03 Sound Probability Natural sounds Neural code Figure 2: Grasshopper auditory coding. Probability density of natural sounds and the optimized approximate density, with black lines demarcating the region of behaviorally relevant sounds. eyes with reward after different delays and recorded neurons in primary visual cortex that switched from representing purely physical attributes of the stimulation (e.g., eye of origin) to coding reward timing. Similarly, Serences [20] showed that spatially selective regions of visual cortex are biased by the prior reward associated with different spatial locations. These studies raise the possibility that the brain does not encode probabilistic beliefs separately from reward; indeed, this idea has been enshrined by a recent theoretical account [4]. One important ramification of this conflation is that it would appear to violate one of the axioms of statistical decision theory: probabilistic sophistication [18]. On the other hand, the variational framework we have described accounts for these findings by showing that decision-making using approximate densities leads automatically to reward-modulated probabilistic beliefs. Thus, the apparent inconsistency with statistical decision theory may be an artifact of rational responses to the information-processing constraints of the brain. To drive this point home, we now analyze one example in more detail. Machens et al. [12] recorded the responses of grasshopper auditory neurons to different stimulus ensembles and found that the ensembles that elicited the optimal response differed systematically from the natural auditory statistics of the grasshopper’s environment. In particular, the optimal ensembles were restricted to a region of stimulus space in which behaviorally important sounds live, namely species-specific mating signals. In the words of Machens et al., “an organism may seek to distribute its sensory resources according to the behavioral relevance of the natural stimuli, rather than according to purely statistical principles.” We modeled this phenomenon by constructing a relatively wide density of natural sounds with a narrow region of behaviorally relevant sounds (in which states are twice as rewarding). Figure 2 shows the results, confirming that maximizing the utility lower bound selects a kernel density estimate that is narrower than the target density of natural sounds. 5.2 Changing the cost of a spike Experimentally, there are at least two ways to manipulate the cost of a spike. One is by changing the amount of inhibition in the network (e.g., using injections of muscimol, a GABA agonist) and hence increasing the metabolic requirements for action potential generation. A second method is by manipulating the availability of glucose [7], either by making the subject hypoglycemic or by administering local infusions of glucose directly into the brain. We predict that increasing spiking costs (either by reducing glucose levels or increasing GABAergic transmission) will result in a diminished ability to detect weak signals embedded in noise. Consistent with this prediction, controlled hypoglycemia reduces the speed with which visual changes are detected amidst distractors [13]. These predictions have received a more direct test in a recent visual search experiment by McPeek and Keller [14], in which muscimol was injected into local regions of the superior colliculus, a brain area known to control saccadic target selection. In the absence of distractors, response latencies to the target were increased when it appeared in the receptive fields of the inhibited neurons. In the presence of distractors, response latencies increased and choice accuracy decreased when the target appeared in the receptive fields of the inhibited neurons. We simulated these findings by constructing a cost-field γ(n) to represent the amount of GABAergic transmission at different neurons induced by muscimol injections. In the distractor condition (Figure 3, top panel), accuracy 6 −50 0 50 0 0.05 0.1 0.15 0.2 s p(s) −50 0 50 0 0.05 0.1 0.15 0.2 s q(s) Control Muscimol 0 50 100 0 1 2 3 4 5 neuron number firing rate −50 0 50 0 0.05 0.1 0.15 0.2 s p(s) −50 0 50 0 0.05 0.1 0.15 0.2 s q(s) 0 50 100 0 2 4 6 8 neuron number firing rate Figure 3: Spiking cost in the superior colliculus. Top panels illustrate distractor condition. Bottom panels illustrate no-distractor condition. (Left column) Target density, with larger bump in the top panel representing the target; (Center column) neural code under different settings of cost-field γ(n); (Right column) firing rates under different cost-fields. decreases because the increased cost of spiking in the neurons representing the target location dampens the probability density in that location. Increasing spiking cost also reduces the overall firing rate in the target-representing neurons relative to the distractor-representing neurons. This predicts increased response latencies if we assume a monotonic relationship with the relative firing rate in the target-representing neurons. Similarly, in the no-distractor condition (Figure 3, bottom panel), response latencies increase due to decreased firing rate in the target-representing neurons. 5.3 Non-linear probability weighting In this section, we show that the variational objective provides a new perspective on some wellknown peculiarities of human probabilistic judgment. In particular, the ostensibly irrational nonlinear weighting of probabilities in risky choice emerges naturally from optimization of the variational objective under a natural assumption about the ecological distribution of rewards. Tversky and Kahneman [25] observed that people tend to be risk-seeking (over-weighting probabilities) for low-probability gains and risk-averse (under-weighting probabilities) for high-probability gains. This pattern reverses for losses. The variational objective explains these phenomena by virtue of the fact that under neural resource constraints, the approximate density will be biased towards high reward regions of the state space. It is also necessary to assume that the magnitude of gains or losses scales inversely with probability (i.e., large gains or losses are rare). With this assumption, the optimized neural code produce the four-fold pattern of risk-attitudes observed by Tversky and Kahneman (Figure 4). 6 Discussion We have presented a variational objective function for neural codes that balances motivational, statistical and metabolic demands in the service of optimal behavior. The essential idea is that the intractable problem of computing expected utilities can be finessed by instead computing expected utilities under an approximate density that optimizes a variational lower bound on log expected utility. This lower bound captures the neural costs of optimal control: more accurate approximations will require more metabolic resources, whereas less accurate approximations will diminish the amount of earned reward. This principle can explain, among other things, why receptive fields of 7 0 0.5 1 0 0.2 0.4 0.6 0.8 1 Target probability Approximate probability Gains Losses Figure 4: Probability weighting. Simulated calibration curve for gains and losses. Perfect calibration (i.e., linear weighting) is indicated by the dashed line. sensory neurons have repeatedly been found to be sensitive to reward contingencies. Intuitively, expending more resources on accurately approximating the complete density of natural sensory statistics is inefficient (from an optimal control perspective) if the behaviorally relevant signals live in a compact subspace. We showed that the approximation that maximizes the utility lower bound concentrates its density within this subspace. Our variational framework differs in important ways from the one recently proposed by Friston [4]. In his treatment, utilities are not represented explicitly at all; rather, they are implicit in the probabilistic structure of the environment. Based on an evolutionary argument, Friston suggests that high utility states are precisely those that have high probability, since otherwise organisms who find themselves frequently in low utility states are unlikely to survive. Thus, adopting a control policy that minimizes a variational upper bound on surprise will lead to optimal behavior. However, adopting this control policy may lead to pathological behaviors, such as attraction to malign states that have been experienced frequently (e.g., a person who has been poor her whole life should reject a winning lottery ticket). In contrast, our variational framework is motivated by quite different considerations arising from the computational constraints of the brain’s architecture. Nonetheless, these approaches have in common the idea that probabilistic beliefs will be shaped by the utility structure of the environment. The psychological concept of “bounded rationality” is an old one [24], classically associated with the observation that humans sometimes adopt strategies for identifying adequate solutions rather than optimal ones (“satisficing”). The variational framework offers a rather different perspective on bounded rationality; it asserts that humans are indeed trying to find optimal solutions, but subject to certain computational resource constraints. By making explicit what these constraints are, and how they interact at a neural level, our work provides a foundation upon which to develop a more complete neurobiological theory of optimal control under resource constraints. Acknowledgments We thank Matt Botvinick, Matt Hoffman, Chong Wang, Nathaniel Daw and Yael Niv for helpful discussions. SJG was supported by a Quantitative Computational Neuroscience grant from the National Institutes of Health. References [1] C.H. Anderson and D.C. Van Essen. Neurobiological computational systems. Computational intelligence imitating life, pages 213–222, 1994. [2] J.S. Anderson, I. Lampl, D.C. Gillespie, and D. Ferster. The contribution of noise to contrast invariance of orientation tuning in cat visual cortex. Science, 290(5498):1968, 2000. [3] R.L. De Valois, E. William Yund, and N. Hepler. The orientation and direction selectivity of cells in macaque visual cortex. Vision Research, 22(5):531–544, 1982. [4] K. Friston. The free-energy principle: a unified brain theory? Nature Reviews Neuroscience, 11(2):127–138, 2010. 8 [5] T. Furmston and D. Barber. Variational methods for reinforcement learning. Proceedings of the Thirteenth Conference on Artificial Intelligence and Statistics (AISTATS), 2010. [6] S.J. Gershman, E. Vul, and J.B. Tenenbaum. Perceptual multistability as Markov Chain Monte Carlo inference. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 611–619. 2009. [7] P.E. Gold. Role of glucose in regulating the brain and cognition. American Journal of Clinical Nutrition, 61:987S–995S, 1995. [8] E.T. Jaynes. On the rationale of maximum-entropy methods. Proceedings of the IEEE, 70(9):939–952, 1982. [9] M.I. Jordan, Z. Ghahramani, T.S. Jaakkola, and L.K. Saul. An introduction to variational methods for graphical models. Machine learning, 37(2):183–233, 1999. [10] W.B. Levy and R.A. Baxter. Energy efficient neural codes. Neural Computation, 8(3):531–543, 1996. [11] W.J. Ma, J.M. Beck, P.E. Latham, and A. Pouget. Bayesian inference with probabilistic population codes. Nature Neuroscience, 9(11):1432–1438, 2006. [12] C.K. Machens, T. Gollisch, O. Kolesnikova, and A.V.M. Herz. Testing the efficiency of sensory coding with optimal stimulus ensembles. Neuron, 47(3):447–456, 2005. [13] RJ McCrimmon, IJ Deary, BJP Huntly, KJ MacLeod, and BM Frier. Visual information processing during controlled hypoglycaemia in humans. Brain, 119(4):1277, 1996. [14] R.M. McPeek and E.L. Keller. Deficits in saccade target selection after inactivation of superior colliculus. Nature neuroscience, 7(7):757–763, 2004. [15] P.R. Montague and B. King-Casas. Efficient statistics, common currencies and the problem of reward-harvesting. Trends in cognitive sciences, 11(12):514–519, 2007. [16] R.P.N. Rao. Bayesian computation in recurrent neural circuits. Neural Computation, 16(1):1– 38, 2004. [17] M. Sahani. A biologically plausible algorithm for reinforcement-shaped representational learning. Advances in Neural Information Processing, 16, 2004. [18] L.J. Savage. The Foundations of Statistics. Dover, 1972. [19] G. Sclar and RD Freeman. Orientation selectivity in the cat’s striate cortex is invariant with stimulus contrast. Experimental Brain Research, 46(3):457–461, 1982. [20] J.T. Serences. Value-based modulations in human visual cortex. Neuron, 60(6):1169–1181, 2008. [21] L. Shi, N.H. Feldman, and T.L. Griffiths. Performing Bayesian inference with exemplar models. In Proceedings of the 30th annual conference of the cognitive science society, pages 745–750, 2008. [22] Lei Shi and Thomas Griffiths. Neural implementation of hierarchical bayesian inference by importance sampling. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1669–1677. 2009. [23] M.G. Shuler and M.F. Bear. Reward timing in the primary visual cortex. Science, 311(5767):1606, 2006. [24] H.A. Simon. Models of Bounded Rationality. MIT Press, 1982. [25] A. Tversky and D. Kahneman. Advances in prospect theory: cumulative representation of uncertainty. Journal of Risk and uncertainty, 5(4):297–323, 1992. [26] E. Vul, N.D. Goodman, T.L. Griffiths, and J.B. Tenenbaum. One and done? Optimal decisions from very few samples. In Proceedings of the 31st Annual Meeting of the Cognitive Science Society, Amseterdam, the Netherlands, 2009. [27] R.C. Wilson and L.H. Finkel. A neural implementation of the kalman filter. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 2062–2070. 2009. [28] R.S. Zemel, P. Dayan, and A. Pouget. Probabilistic interpretation of population codes. Neural Computation, 10(2):403–430, 1998. 9
2010
171
3,934
Sample complexity of testing the manifold hypothesis Hariharan Narayanan∗ Laboratory for Information and Decision Systems EECS, MIT Cambridge, MA 02139 har@mit.edu Sanjoy Mitter Laboratory for Information and Decision Systems EECS, MIT Cambridge, MA 02139 mitter@mit.edu Abstract The hypothesis that high dimensional data tends to lie in the vicinity of a low dimensional manifold is the basis of a collection of methodologies termed Manifold Learning. In this paper, we study statistical aspects of the question of fitting a manifold with a nearly optimal least squared error. Given upper bounds on the dimension, volume, and curvature, we show that Empirical Risk Minimization can produce a nearly optimal manifold using a number of random samples that is independent of the ambient dimension of the space in which data lie. We obtain an upper bound on the required number of samples that depends polynomially on the curvature, exponentially on the intrinsic dimension, and linearly on the intrinsic volume. For constant error, we prove a matching minimax lower bound on the sample complexity that shows that this dependence on intrinsic dimension, volume and curvature is unavoidable. Whether the known lower bound of O( k ϵ2 + log 1 δ ϵ2 ) for the sample complexity of Empirical Risk minimization on k−means applied to data in a unit ball of arbitrary dimension is tight, has been an open question since 1997 [3]. Here ϵ is the desired bound on the error and δ is a bound on the probability of failure. We improve the best currently known upper bound [14] of O( k2 ϵ2 + log 1 δ ϵ2 ) to O  k ϵ2  min  k, log4 k ϵ ϵ2  + log 1 δ ϵ2  . Based on these results, we devise a simple algorithm for k−means and another that uses a family of convex programs to fit a piecewise linear curve of a specified length to high dimensional data, where the sample complexity is independent of the ambient dimension. 1 Introduction We are increasingly confronted with very high dimensional data in speech signals, images, geneexpression data, and other sources. Manifold Learning can be loosely defined to be a collection of methodologies that are motivated by the belief that this hypothesis (henceforth called the manifold hypothesis) is true. It includes a number of extensively used algorithms such as Locally Linear Embedding [17], ISOMAP [19], Laplacian Eigenmaps [4] and Hessian Eigenmaps [8]. The sample complexity of classification is known to be independent of the ambient dimension [15] under the manifold hypothesis, (assuming the decision boundary is a manifold as well,) thus obviating the curse of dimensionality. A recent empirical study [6] of a large number of 3×3 images, represented as points in R9 revealed that they approximately lie on a two dimensional manifold known as the ∗Research supported by grant CCF-0836720 1 Figure 1: Fitting a torus to data. Klein bottle. On the other hand, knowledge that the manifold hypothesis is false with regard to certain data would give us reason to exercise caution in applying algorithms from manifold learning and would provide an incentive for further study. It is thus of considerable interest to know whether given data lie in the vicinity of a low dimensional manifold. Our primary technical results are the following. 1. We obtain uniform bounds relating the empirical squared loss and the true squared loss over a class F consisting of manifolds whose dimensions, volumes and curvatures are bounded in Theorems 1 and 2. These bounds imply upper bounds on the sample complexity of Empirical Risk Minimization (ERM) that are independent of the ambient dimension, exponential in the intrinsic dimension, polynomial in the curvature and almost linear in the volume. 2. We obtain a minimax lower bound on the sample complexity of any rule for learning a manifold from F in Theorem 6 showing that for a fixed error, the the dependence of the sample complexity on intrinsic dimension, curvature and volume must be at least exponential, polynomial, and linear, respectively. 3. We improve the best currently known upper bound [14] on the sample complexity of Empirical Risk minimization on k−means applied to data in a unit ball of arbitrary dimension from O( k2 ϵ2 + log 1 δ ϵ2 ) to O  k ϵ2  min  k, log4 k ϵ ϵ2  + log 1 δ ϵ2  . Whether the known lower bound of O( k ϵ2 + log 1 δ ϵ2 ) is tight, has been an open question since 1997 [3]. Here ϵ is the desired bound on the error and δ is a bound on the probability of failure. One technical contribution of this paper is the use of dimensionality reduction via random projections in the proof of Theorem 5 to bound the Fat-Shattering dimension of a function class, elements of which roughly correspond to the squared distance to a low dimensional manifold. The application of the probabilistic method involves a projection onto a low dimensional random subspace. This is then followed by arguments of a combinatorial nature involving the VC dimension of halfspaces, and the Sauer-Shelah Lemma applied with respect to the low dimensional subspace. While random projections have frequently been used in machine learning algorithms, for example in [2, 7], to our knowledge, they have not been used as a tool to bound the complexity of a function class. We illustrate the algorithmic utility of our uniform bound by devising an algorithm for k−means and a convex programming algorithm for fitting a piecewise linear curve of bounded length. For a fixed error threshold and length, the dependence on the ambient dimension is linear, which is optimal since this is the complexity of reading the input. 2 Connections and Related work In the context of curves, [10] proposed “Principal Curves”, where it was suggested that a natural curve that may be fit to a probability distribution is one where every point on the curve is the center of mass of all those points to which it is the nearest point. A different definition of a principal curve was proposed by [12], where they attempted to find piecewise linear curves of bounded length which minimize the expected squared distance to a random point from a distribution. This paper studies the decay of the error rate as the number of samples tends to infinity, but does not analyze the dependence of the error rate on the ambient dimension and the bound on the length. We address this in a more general setup in Theorem 4, and obtain sample complexity bounds that are independent of 2 the ambient dimension, and depend linearly on the bound on the length. There is a significant amount of recent research aimed at understanding topological aspects of data, such its homology [20, 16]. It has been an open question since 1997 [3], whether the known lower bound of O( k ϵ2 + log 1 δ ϵ2 ) for the sample complexity of Empirical Risk minimization on k−means applied to data in a unit ball of arbitrary dimension is tight. Here ϵ is the desired bound on the error and δ is a bound on the probability of failure. The best currently known upper bound is O( k2 ϵ2 + log 1 δ ϵ2 ) and is based on Rademacher complexities. We improve this bound to O  k ϵ2  min  k, log4 k ϵ ϵ2  + log 1 δ ϵ2  , using an argument that bounds the Fat-Shattering dimension of the appropriate function class using random projections and the Sauer-Shelah Lemma. Generalizations of principal curves to parameterized principal manifolds in certain regularized settings have been studied in [18]. There, the sample complexity was related to the decay of eigenvalues of a Mercer kernel associated with the regularizer. When the manifold to be fit is a set of k points (k−means), we obtain a bound on the sample complexity s that is independent of m and depends at most linearly on k, which also leads to an approximation algorithm with additive error, based on sub-sampling. If one allows a multiplicative error of 4 in addition to an additive error of ϵ, a statement of this nature has been proven by BenDavid (Theorem 7, [5]). 3 Upper bounds on the sample complexity of Empirical Risk Minimization In the remainder of the paper, C will always denote a universal constant which may differ across the paper. For any submanifold M contained in, and probability distribution P supported on the unit ball B in Rm, let L(M, P) := R d(M, x)2dP(x). Given a set of i.i.d points x = {x1, . . . , xs} from P, a tolerance ϵ and a class of manifolds F, Empirical Risk Minimization (ERM) outputs a manifold in Merm(x) ∈F such that Ps i=1 d(xi, Merm)2 ≤ϵ/2+infN ∈F d(xi, N)2. Given error parameters ϵ, δ, and a rule A that outputs a manifold in F when provided with a set of samples, we define the sample complexity s = s(ϵ, δ, A) to be the least number such that for any probability distribution P in the unit ball, if the result of A applied to a set of at least s i.i.d random samples from P is N, then P [L(N, P) < infM∈F L(M, P) + ϵ] > 1 −δ. 3.1 Bounded intrinsic curvature Let M be a Riemannian manifold and let p ∈M. Let ζ be a geodesic starting at p. Definition 1. The first point on ζ where ζ ceases to minimize distance is called the cut point of p along M. The cut locus of p is the set of cut points of M. The injectivity radius is the minimum taken over all points of the distance between the point and its cut locus. M is complete if it is complete as a metric space. Let Gi = Gi(d, V, λ, ι) be the family of all isometrically embedded, complete Riemannian submanifolds of B having dimension less or equal to d, induced d−dimensional volume less or equal to V , sectional curvature less or equal to λ and injectivity radius greater or equal to ι. Let Uint( 1 ϵ , d, V, λ, ι) := V  C  d min(ϵ,ι,λ−1/2) d , which for brevity, we denote Uint. Theorem 1. Let ϵ and δ be error parameters. If s ≥C  min  1 ϵ2  log4 Uint ϵ  , Uint  Uint ϵ2 + 1 ϵ2 log 1 δ  , and x = {x1, . . . , xs} is a set of i.i.d points from P then, P  L(Merm(x), P) −inf M∈Gi L(M, P) < ϵ  > 1 −δ. The proof of this theorem is deferred to Section 4. 3.2 Bounded extrinsic curvature We will consider submanifolds of B that have the property that around each of them, for any radius r < τ, the boundary of the set of all points within a distance r is smooth. This class of submanifolds 3 has appeared in the context of manifold learning [16, 15]. The condition number is defined as follows. Definition 2 (Condition Number). Let M be a smooth d−dimensional submanifold of Rm. We define the condition number c(M) to be 1 τ , where τ is the largest number to have the property that for any r < τ no two normals of length r that are incident on M have a common point unless it is on M. Let Ge = Ge(d, V, τ) be the family of Riemannian submanifolds of B having dimension ≤d, volume ≤V and condition number ≤ 1 τ . Let ϵ and δ be error parameters. Let Uext( 1 ϵ , d, τ) := V  C  d min(ϵ,τ) d , which for brevity, we denote by Uext. Theorem 2. If s ≥C  min  1 ϵ2  log4 Uext ϵ  , Uext  Uext ϵ2 + 1 ϵ2 log 1 δ  , and x = {x1, . . . , xs} is a set of i.i.d points from P then, P h L(Merm(x), P) −inf M L(M, P) < ϵ i > 1 −δ. (1) 4 Relating bounded curvature to covering number In this subsection, we note that that bounds on the dimension, volume, sectional curvature and injectivity radius suffice to ensure that they can be covered by relatively few ϵ−balls. Let V M p be the volume of a ball of radius M centered around a point p. See ([9], page 51) for a proof of the following theorem. Theorem 3 (Bishop-G¨unther Inequality). Let M be a complete Riemannian manifold and assume that r is not greater than the injectivity radius ι. Let KM denote the sectional curvature of M and let λ > 0 be a constant. Then, KM ≤λ implies V M p (r) ≥ 2π n 2 Γ( n 2 ) R r 0  sin(t √ λ) √ λ n−1 dt. Thus, if ϵ < min(ι, πλ−1 2 2 ), then, V M p (ϵ) > ϵ Cd d. Proof of Theorem 1. As a consequence of Theorem 3, we obtain an upper bound of V Cd ϵ d on the number of disjoint sets of the form M ∩Bϵ/32(p) that can be packed in M. If {M ∩ Bϵ/32(p1), . . . , M∩Bϵ/32(pk)} is a maximal family of disjoint sets of the form M∩Bϵ/32(p), then there is no point p ∈M such that min i ∥p −pi∥> ϵ/16. Therefore, M is contained in the union of balls, S i Bϵ/16(pi). Therefore, we may apply Theorem 4 with U 1 ϵ  ≤V  Cd min(ϵ,λ−1 2 ,ι) d . The proof of Theorem 2 is along the lines of that of Theorem 1, so it has been deferred to the journal version. 5 Class of manifolds with a bounded covering number In this section, we show that uniform bounds relating the empirical squares loss and the expected squared loss can be obtained for a class of manifolds whose covering number at a different scale ϵ has a specified upper bound. Let U : R+ →Z+ be any integer valued function. Let G be any family of subsets of B such that for all r > 0 every element M ∈G can be covered using open Euclidean balls of radius r centered around U( 1 r) points; let this set be ΛM(r). Note that if the subsets consist of k−tuples of points, U(1/r) can be taken to be the constant function equal to k and we recover the k−means question. A priori, it is unclear if sup M∈G Ps i=1 d(xi, M)2 s −EPd(x, M)2 , (2) 4 is a random variable, since the supremum of a set of random variables is not always a random variable (although if the set is countable this is true). However (2) is equal to lim n→∞sup M∈G Ps i=1 d(xi, ΛM(1/n))2 s −EPd(x, ΛM(1/n))2 , (3) and for each n, the supremum in the limits is over a set parameterized by U(n) points, which without loss of generality we may take to be countable (due to the density and countability of rational points). Thus, for a fixed n, the quantity in the limits is a random variable. Since the limit as n →∞of a sequence of bounded random variables is a random variable as well, (2) is a random variable too. Theorem 4. Let ϵ and δ be error parameters. If s ≥C U(16/ϵ) ϵ2 min  U(16/ϵ),  1 ϵ2  log4 U(16/ϵ) ϵ  + 1 ϵ2 log 1 δ  , Then, P  sup M∈G Ps i=1 d(xi, M)2 s −EPd(x, M)2 < ϵ 2  > 1 −δ. (4) Proof. For every g ∈G, let c(g, ϵ) = {c1, . . . , ck} be a set of k := U(16/ϵ) points in g ⊆B, such that g is covered by the union of balls of radius ϵ/16 centered at these points. Thus, for any point x ∈B, d2(x, g) ≤  ϵ 16 + d(x, c(g, ϵ)) 2 (5) ≤ ϵ2 256 + ϵ mini ∥x −ci∥ 8 + d(x, c(g, ϵ))2. (6) Since mini ∥x −ci∥is less or equal to 2, the last expression is less than ϵ 2 + d(x, c(g, ϵ))2. Our proof uses the “kernel trick” in conjunction with Theorem 5. Let Φ : (x1, . . . , xm)T 7→ 2−1/2(x1, . . . , xm, 1)T map a point x ∈Rm to one in Rm+1. For each i, let ci := (ci1, . . . , cim)T , and ˜ci := 2−1/2(−ci1, . . . , −cim, ∥ci∥2 2 )T . The factor of 2−1/2 is necessitated by the fact that we wish the image of a point in the unit ball to also belong to the unit ball. Given a collection of points c := {c1, . . . , ck} and a point x ∈B, let fc(x) := d(x, c(g, ϵ))2. Then, fc(x) = ∥x∥2 + 4 min(Φ(x) · ˜c1, . . . , Φ(x) · ˜ck). For any set of s samples x1, . . . , xs, sup fc∈G Ps i=1 fc(xi) s −EPfc(x) ≤ Ps i=1 ∥xi∥2 s −EP∥x∥2 (7) + 4 sup fc∈G Ps i=1 min i Φ(xi) · ˜ci s −EP min i Φ(x) · ˜ci . (8) By Hoeffding’s inequality, P  Ps i=1 ∥xi∥2 s −EP∥x∥2 > ϵ 4  < 2e−( 1 8)sϵ2, (9) which is less than δ 2. By Theorem 5, P " sup fc∈G Ps i=1 min i Φ(xi)·˜ci s −EP min i Φ(x) · ˜ci > ϵ 16 # < δ 2. Therefore, P " sup fc∈G Ps i=1 fc(xi) s −EPfc(x) ≤ϵ 2 # ≥1 −δ. 5 γ x1 x2 x3 x4 Rx1 Rx2 Rx3 Rx4 γ 2 Random map R Figure 2: Random projections are likely to preserve linear separations. 6 Bounding the Fat-Shattering dimension using random projections The core of the uniform bounds in Theorems 1 and 2 is the following uniform bound on the minimum of k linear functions on a ball in Rm. Theorem 5. Let F be the set of all functions f from B := {x ∈Rm : ∥x∥≤1} to R, such that for some k vectors v1, . . . , vk ∈B, f(x) := min i (vi · x). Independent of m, if s ≥C  k ϵ2 min  1 ϵ2 log4 k ϵ  , k  + 1 ϵ2 log 1 δ  , then P " sup F ∈F Ps i=1 F(xi) s −EPF(x) < ϵ # > 1 −δ. (10) It has been open since 1997 [3], whether the known lower bound of C k ϵ2 + 1 ϵ2 log 1 δ  on the sample complexity s is tight. Theorem 5 in [14], uses Rademacher complexities to obtain an upper bound of C k2 ϵ2 + 1 ϵ2 log 1 δ  . (11) (The scenarios in [3, 14] are that of k−means, but the argument in Theorem 4 reduces k−means to our setting.) Theorem 5 improves this to C  k ϵ2 min  1 ϵ2 log4 k ϵ  , k  + 1 ϵ2 log 1 δ  (12) by putting together (11) with a bound of C  k ϵ4 log4 k ϵ  + 1 ϵ2 log 1 δ  (13) obtained using the Fat-Shattering dimension. Due to constraints on space, the details of the proof of Theorem 5 will appear in the journal version, but the essential ideas are summarized here. Let u := fatF( ϵ 24) and x1, . . . , xu be a set of vectors that is γ−shattered by F . We would like to use VC theory to bound u, but doing so directly leads to a linear dependence on the ambient dimension m. In order to circumvent this difficulty, for g := C log(u+k) ϵ2 , we consider a g−dimensional random linear subspace and the image under an appropriately scaled orthogonal projection R of the points x1, . . . , xu onto it. We show that the expected value of the γ 2 −shatter coefficient of {Rx1, . . . , Rxu} is at least 2u−1 using the Johnson-Lindenstrauss Lemma [11] and the fact that {x1, . . . , xu} is γ−shattered. Using Vapnik-Chervonenkis theory and the Sauer-Shelah Lemma, we then show that γ 2 −shatter coefficient cannot be more than uk(g+2). This implies that 2u−1 ≤uk(g+2), allowing us to conclude that fatF( ϵ 24) ≤Ck ϵ2 log2 k ϵ  . By a well-known theorem of [1], a bound of Ck ϵ2 log2 k ϵ  on fatF( ϵ 24) implies the bound in (13) on the sample complexity, which implies Theorem 5. 6 7 Minimax lower bounds on the sample complexity Let K be a universal constant whose value will be fixed throughout this section. In this section, we will state lower bounds on the number of samples needed for the minimax decision rule for learning from high dimensional data, with high probability, a manifold with a squared loss that is within ϵ of the optimal. We will construct a carefully chosen prior on the space of probability distributions and use an argument that can either be viewed as an application of the probabilistic method or of the fact that the Minimax risk is at least the risk of a Bayes optimal manifold computed with respect to this prior. Let U be a K2dk−dimensional vector space containing the origin, spanned by the basis {e1, . . . , eK2dk} and S be the surface of the ball of radius 1 in Rm. We assume that m be greater or equal to K2dk+d. Let W be the d−dimensional vector space spanned by {eK2dk+1, . . . , eK2dk+d}. Let S1, . . . , SK2dk denote spheres, such that for each i, Si := S ∩( √ 1 −τ 2ei + W), where x + W is the translation of W by x. Note that each Si has radius τ. Let ℓ= K2dk Kdk  and {M1, . . . , Mℓ} consist of all Kdk−element subsets of {S1, . . . , SK2dk}. Let ωd be the volume of the unit ball in Rd. The following theorem shows that no algorithm can produce a nearly optimal manifold with high probability unless it uses a number of samples that depends linearly on volume, exponentially on intrinsic dimension and polynomially on the curvature. Theorem 6. Let F be equal to either Ge(d, V, τ) or Gi(d, V, 1 τ 2 , πτ). Let k = ⌊ V dωd(K 5 4 τ)d ⌋. Let A be an arbitrary algorithm that takes as input a set of data points x = {x1, . . . , xk} and outputs a manifold MA(x) in F. If ϵ + 2δ < 1 3  1 2 √ 2 −τ 2 then, inf P P  L(MA(x), P) −inf M∈F L(M, P) < ϵ  < 1 −δ, where P ranges over all distributions supported on B and x1, . . . , xk are i.i.d draws from P. Proof. Observe from Lemma ?? and Theorem 3 that F is a class of a manifolds such that each manifold in F is contained in the union of K 3d 2 k m−dimensional balls of radius τ, and {M1, . . . , Mℓ} ⊆F. (The reason why we have K 3d 2 rather than K 5d 4 as in the statement of the theorem is that the parameters of Gi(d, V, τ) are intrinsic, and to transfer to the extrinsic setting of the last sentence, one needs some leeway.) Let P1, . . . , Pℓbe probability distributions that are uniform on {M1, . . . , Mℓ} with respect to the induced Riemannian measure. Suppose A is an algorithm that takes as input a set of data points x = {x1, . . . , xt} and outputs a manifold MA(x). Let r be chosen uniformly at random from {1, . . . , ℓ}. Then, inf P P  L(MA(x), P) −inf M∈F L(M, P) < ϵ  ≤ EPrPx  L(MA(x), Pr) −inf M∈F L(M, Pr) < ϵ  = ExPPr  L(MA(x), Pr) −inf M∈F L(M, Pr) < ϵ x  = ExPPr  L(MA(x), Pr) < ϵ x  . We first prove a lower bound on infx Er [L(MA(x), Pr)|x]. We see that Er  L(MA(x), Pr) x  = Er,xk+1  d(MA(x), xk+1)2 x  . (14) Conditioned on x, the probability of the event (say Edif) that xk+1 does not belong to the same sphere as one of the x1, . . . , xk is at least 1 2. Conditioned on Edif and x1, . . . , xk, the probability that xk+1 lies on a given sphere Sj is equal to 0 if one of x1, . . . , xk lies on Sj and 1 K2k−k′ otherwise, where k′ ≤k is the number of spheres in {Si} which contain at least one point among x1, . . . , xk. By construction, A(x1, . . . , xk) can be covered by K 3d 2 k balls of radius τ; let their centers be y1, . . . , yK 3d 2 k. 7 However, it is easy to check that for any dimension m, the cardinality of the set Sy of all Si that have a nonempty intersection with the balls of radius 1 2 √ 2 centered around y1, . . . , yK 3d 2 k, is at most K 3d 2 k. Therefore, P h d(MA(x), xk+1) ≥ 1 2 √ 2 −τ x i is at least P  d({y1, . . . , yK 3d 2 k}, xk+1) ≥ 1 2 √ 2 x  ≥ P [Edif] P [xk+1 ̸∈Sy|Edif] ≥ 1 2 K2dk −k′ −K 3d 2 k K2dk −k′ ≥1 3. Therefore, Er,xk+1  d(MA(x), xk+1)2 x  ≥1 3  1 2 √ 2 −τ 2 . Finally, we observe that it is not possible for ExPPr  L(MA(x), Pr) < ϵ x  to be more than 1 −δ if infx PPr  L(MA(x), Pr) x  > ϵ + 2δ, because L(MA(x), Pr) is bounded above by 2. 8 Algorithmic implications 8.1 k−means Applying Theorem 4 to the case when P is a distribution supported equally on n specific points (that are part of an input) in a unit ball of Rm, we see that in order to obtain an additive ϵ approximation for the k−means problem with probability 1 −δ, it suffices to sample s ≥C k ϵ2 log4 k ϵ  ϵ2 , k ! + 1 ϵ2 log 1 δ ! points uniformly at random (which would have a cost of O(s log n) if the cost of one random bit is O(1)) and exhaustively solve k−means on the resulting subset. Supposing that a dot product between two vectors xi, xj can be computed using ˜m operations, the total cost of sampling and then exhaustively solving k−means on the sample is O( ˜msks log n). In contrast, if one asks for a multiplicative (1 + ϵ) approximation, the best running time known depends linearly on n [13]. If P is an unknown probability distribution, the above algorithm improves upon the best results in a natural statistical framework for clustering [5]. 8.2 Fitting piecewise linear curves In this subsection, we illustrate the algorithmic utility of the uniform bound in Theorem 4 by obtaining an algorithm for fitting a curve of length no more than L, to data drawn from an unknown probability distribution P supported in B, whose sample complexity is independent of the ambient dimension. This curve, with probability 1 −δ, achieves a mean squared error of less than ϵ more than the optimum. The proof of its correctness and analysis of its run-time have been deferred to the journal version. The algorithm is as follows: 1. Let k := ⌈L ϵ ⌉and s ≥C  k ϵ2  log4( k ϵ ) ϵ2 , k  + 1 ϵ2 log 1 δ  . Sample points x1, . . . , xs i.i.d from P for s =, and set J := span({xi}s i=1). 2. For every permutation σ of [s], minimize the convex objective function Pn i=1 d(xσ(i), yi)2 over the convex set of all s−tuples of points (y1, . . . , ys) in J, such that Ps−1 i=1 ∥yi+1 − yi∥≤L. 3. If the minimum over all (y1, . . . , ys) (and σ) is achieved for (z1, . . . , zs), output the curve obtained by joining zi to zi+1 for each i by a straight line segment. 9 Acknowledgements We are grateful to Stephen Boyd for several helpful conversations. 8 References [1] Noga Alon, Shai Ben-David, Nicol`o Cesa-Bianchi, and David Haussler. Scale-sensitive dimensions, uniform convergence, and learnability. J. ACM, 44(4):615–631, 1997. [2] Rosa I. Arriaga and Santosh Vempala. An algorithmic theory of learning: Robust concepts and random projection. In FOCS, pages 616–623, 1999. [3] Peter Bartlett. The minimax distortion redundancy in empirical quantizer design. IEEE Transactions on Information Theory, 44:1802–1813, 1997. [4] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Comput., 15(6):1373–1396, 2003. [5] Shai Ben-David. A framework for statistical clustering with constant time approximation algorithms for k-median and k-means clustering. Mach. Learn., 66(2-3):243–257, 2007. [6] Gunnar Carlsson. Topology and data. Bulletin of the American Mathematical Society, 46:255– 308, January 2009. [7] Sanjoy Dasgupta. Learning mixtures of gaussians. In FOCS, pages 634–644, 1999. [8] David L. Donoho and Carrie Grimes. Hessian eigenmaps: Locally linear embedding techniques for high-dimensional data. Proceedings of the National Academy of Sciences, 100(10):5591–5596, May 2003. [9] A. Gray. Tubes. Addison-Wesley, 1990. [10] Trevor J. Hastie and Werner Stuetzle. Principal curves. Journal of the American Statistical Association, 84:502–516, 1989. [11] William Johnson and Joram Lindenstrauss. Extensions of lipschitz mappings into a hilbert space. Contemporary Mathematics, 26:419–441, 1984. [12] Bal´azs K´egl, Adam Krzyzak, Tam´as Linder, and Kenneth Zeger. Learning and design of principal curves. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22:281–297, 2000. [13] Amit Kumar, Yogish Sabharwal, and Sandeep Sen. A simple linear time (1+ϵ)−approximation algorithm for k-means clustering in any dimensions. In FOCS, pages 454–462, 2004. [14] Andreas Maurer and Massimiliano Pontil. Generalization bounds for k-dimensional coding schemes in hilbert spaces. In ALT, pages 79–91, 2008. [15] H. Narayanan and P. Niyogi. On the sample complexity of learning smooth cuts on a manifold. In Proc. of the 22nd Annual Conference on Learning Theory (COLT), June 2009. [16] Partha Niyogi, Stephen Smale, and Shmuel Weinberger. Finding the homology of submanifolds with high confidence from random samples. Discrete & Computational Geometry, 39(13):419–441, 2008. [17] Sam T. Roweis and Lawrence K. Saul. Nonlinear dimensionality reduction by locally linear embedding. SCIENCE, 290:2323–2326, 2000. [18] Alexander J. Smola, Sebastian Mika, Bernhard Sch¨olkopf, and Robert C. Williamson. Regularized principal manifolds. J. Mach. Learn. Res., 1:179–209, 2001. [19] J. B. Tenenbaum, V. Silva, and J. C. Langford. A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science, 290(5500):2319–2323, 2000. [20] Afra Zomorodian and Gunnar Carlsson. Computing persistent homology. Discrete & Computational Geometry, 33(2):249–274, 2005. 9
2010
172
3,935
A biologically plausible network for the computation of orientation dominance Kritika Muralidharan Statistical Visual Computing Laboratory University of California San Diego La Jolla, CA 92039 krmurali@ucsd.edu Nuno Vasconcelos Statistical Visual Computing Laboratory University of California San Diego La Jolla, CA 92039 nuno@ece.ucsd.edu Abstract The determination of dominant orientation at a given image location is formulated as a decision-theoretic question. This leads to a novel measure for the dominance of a given orientation θ, which is similar to that used by SIFT. It is then shown that the new measure can be computed with a network that implements the sequence of operations of the standard neurophysiological model of V1. The measure can thus be seen as a biologically plausible version of SIFT, and is denoted as bioSIFT. The network units are shown to exhibit trademark properties of V1 neurons, such as cross-orientation suppression, sparseness and independence. The connection between SIFT and biological vision provides a justification for the success of SIFT-like features and reinforces the importance of contrast normalization in computer vision. We illustrate this by replacing the Gabor units of an HMAX network with the new bioSIFT units. This is shown to lead to significant gains for classification tasks, leading to state-of-the-art performance among biologically inspired network models and performance competitive with the best non-biological object recognition systems. 1 Introduction In the past decade, computer vision research in object recognition has firmly established the efficacy of representing images as collections of local descriptors of edge orientation. These descriptors are usually based on histograms of dominant orientation, for example, the edge orientation histograms of [1], the SIFT descriptor of [2], or the HOG features of [3]. SIFT, in particular, could be considered today’s default (low-level) representation for object recognition, adopted by hundreds of computer vision papers. The SIFT descriptor is heavily inspired by known computations of the early visual cortex [2], but has no formal detailed connection to computational neuroscience. Interestingly, a parallel, and equally important but seemingly unrelated, development has taken place in this area in the recent past. After many decades of modeling simple cells as linear filters plus “some” nonlinearity [4], neuroscientists have developed a much firmer understanding of their non-linear behavior. One property that has always appeared essential to the robustness of biological vision is the ability of individual cells to adapt their dynamic range to the strength of the visual stimulus. This adaptation appears as early as in the retina [5], is prevalent throughout the visual cortex [6], and seems responsible for the remarkable ability of the visual system to adapt to lighting variations. Within the last decade, it has been explained by the implementation of gain control in individual neurons, through the divisive normalization of their responses by those of their neighbors [7, 8]. Again, hundreds of papers have been written on divisive normalization, and its consequences for visual processing. Today, there appears to be little dispute about its role as a component of the standard neurophysiological model of early vision [9]. 1 In this work, we establish a formal connection between these two developments. This connection is inspired by recent work on the link between the computations of the standard model and the basic operations of statistical decision theory [10]. We start by formulating the central motivating question for descriptors such as SIFT or HOG, how to represent locally dominant image orientation, as a decision-theoretic problem. An orientation θ is defined as dominant, at a location l of the visual field, if the Gabor response of orientation θ at l, xθ(l), is both large and distinct from those of other orientations. An optimal statistical test is then derived to determine if xθ(l) is distinct from the responses of remaining orientations. The core of this test is the posterior probability of orientation of the visual stimulus at l, given xθ(l). The dominance of orientation θ, within a neighborhood R, is then defined as the expected strength of responses xθ(l), in R, which are distinct. This is shown to be a sum of the response amplitudes |xθ(l)| across R, with each location weighted by the posterior probability that it contains stimulus of orientation θ. The resulting representation of orientation is similar to that of SIFT, which assigns each point to a dominant orientation and integrates responses over R. The main difference is that a location could contribute to more than one orientation, since the expected strength relies on a soft assignment of locations to orientations, according to their posterior orientation probability. Exploiting known properties of natural image statistics, and the framework of [10], we then show that this measure of orientation dominance can be computed with the sequence of operations of the standard neurophysiological model: simple cells composed of a linear filter, divisive normalization, and a saturating non-linearity, and complex cells that implement spatial pooling. The proposed measure of orientation dominance can then be seen as a biologically plausible version of that used by SIFT, and is denoted by bioSIFT. BioSIFT units are shown to exhibit the trademark properties of V1 neurons: their responses are closely fit by the Naka-Rushton equation [11], and they exhibit an inhibitory behavior, known as cross-orientation suppression, which is ubiquitous in V1 [12]. We note, however, that our goal is not to provide an alternative to SIFT. On the contrary, the formal connection between findings from computer vision and neuroscience provides additional justification to both the success of SIFT in computer vision, and the importance of divisive normalization in the visual cortex, as well as its connection to the determination of orientation dominance. The main practical benefit of bioSIFT is to improve the performance of biologically plausible recognition networks, whose performance it brings close to the level of the state of the art in computer vision. In the process of doing this, it points to the importance of divisive normalization in vision. While such normalization tends to be justified as a means to increase robustness to variations of illumination, a hypothesis that we do not dispute, it appears to make a tremendous difference even when such variations do not hold. We illustrate these points through object recognition experiments with HMAX networks [13]. It is shown that the simple replacement of Gabor filter responses with the normalized orientation descriptors of bioSIFT produces very significant gains in recognition accuracy. These gains hold for standard datasets, such as Caltech101, where lighting variations are not a substantial nuisance. This points to the alternative hypothesis that the fundamental role of contrast normalization is to determine orientation dominance. The hypothesis is substantiated by the fact that the bioSIFT enhanced HMAX network substantially outperforms the previous best results in the literature of biologically-inspired recognition networks [14, 15]. While these networks implement a number of operations similar to those of bioSIFT, including the use of contrast normalized units, they do not have a precise functional justification (such as the determination of orientation dominace), lack a well defined optimality criterion, and do not have a rigorous statistical interpretation. The importance of these properties is further illustrated by experiments in a dataset composed exclusively of natural scenes [16], which (unlike Caltech) fully matches the assumptions under which bioSIFT is optimal (natural image statistics). In this dataset, the HMAX network with the bioSIFT features has performance identical to that of very recent state-of-the-art computer vision methods. 2 The bioSIFT Features We start by describing the implementation of the bioSIFT network in detail. We lay out the computations, establish their conformity with the standard neurophysiological model, and analyze the statistical meaning of the computed features. 2 2.1 Motivation Various authors have argued that perceptual systems compute optimal decisions tuned to the statistics of natural stimuli [17, 18, 19]. The ubiquity of orientation processing in visual cortex suggests that the estimation of local orientation is important for tasks such as object recognition. This is reinforced by the success, in computer vision, of algorithms based on SIFT or SIFT-like descriptors. While the classical view was that the brain simply performs a linear decomposition into orientation channels, through Gabor filtering, SIFT representations emphasize the estimation of dominant orientation. The latter is a very non-linear operation, involving the comparison of response strength across orientation channels, and requires inter-channel normalization. In SIFT, this is performed implicitly, by combining the computation of gradients with some post-processing heuristics. More formal estimates of dominant orientation can be obtained by formulating the problem in decisiontheoretic terms, and deriving optimal decision rules for its solution. For this, we assume that the visual system infers dominant orientation from a set of visual features x ∈RM, which measure stimulus amplitude at each orientation. In this work, we assume these features to be the set of responses Xi = I ◦Gi of the stimulus I, to a bank of Gabor filters Gi. Here, Gi is the filter of ith orientation, and ◦convolution. In principle, determining whether there is a dominant orientation requires the joint inspection of all feature channels Xi. Statistically, this implies modeling the joint feature distribution and is intractable for low-level vision. A more tractable question is whether the ith channel responses, Xi, are distinct from those of the other channels, Xj, j ̸= i. Letting θ denote the channel orientation, i.e. PX|θ(x|i) = PXi(x), this question can be posed as a classification problem with two hypotheses of label Y ∈{0, 1}, where • Y = 1 if the ith channel responses are distinct, i.e. P(X = x, θ = i) ̸= P(X = x, θ ̸= i), • Y = 0 otherwise, i.e. P(X = x, θ = i) = P(X = x, θ ̸= i). This problem has class-conditional densities P(X = x, θ = i|Y = 1) = P(X = x, θ = i) = PX|θ(x|i)Pθ(i) P(X = x, θ = i|Y = 0) = P(X = x, θ ̸= i) = X j̸=i PX|θ(x|j)Pθ(j) and the posterior probability of the ’distinct’ hypothesis given an observation from channel i is P(Y = 1|X = x, θ = i) = PX|θ(x|i)Pθ(i) P j PX|θ(x|j)Pθ(j) = Pθ|X(i|x) (1) where we have assumed that PY (0) = PY (1) = 1/2. Given the response xi(l) of Xi at location l ∈R, the minimum probability of error (MPE) decision rule is to declare it distinct when Pθ|X(i|xi(l)) = PXi(xi(l))Pθ(i) P j PXj(xi(l))Pθ(j) ≥ 1 2. (2) While this test determines if the responses of Xi are distinct from those of Xj̸=i, it does not determine if Xi is dominant: Xi could be distinct because it is the only feature that does not respond to the stimulus in R. The second question is to determine if the responses of Xi are both distinct and large. This requires a new random variable S(xi) =  |xi|, if Y = 1 0, if Y = 0. (3) which measures the strength (absolute value) of the distinct responses. The expected strength of distinct responses in R is then EY,X|θ[S(X)|θ = i] = Z |x|PY |X,θ(1|x, i)PX|θ(x|i)dx (4) = Z |x|Pθ|X(i|x)PXi(x)dx. (5) The empirical estimate of (5) from the sample xi(l), l ∈R, is \ S(Xi)R = 1 |R| X l |xi(l)|Pθ|X(i|xi(l)). (6) 3 (a) (b) (e) (f) (c) (d) (g) (h) Figure 1: bioSIFT computations for given orientation θ: (a) an image, (b) response of Gabor filter of orientation θ, (c) posterior probability map for orientation θ, (d) orientation dominance measure for channel θ; (e),(f),(g),(h) the image, Gabor response, posterior probability, and dominance measure of same channel for a contrast-reduced version of the image. This measure of the dominance of the ith orientation is a sum of the response amplitudes |xi(l)| across R, with each location weighted by the posterior probability that it contains stimulus of that orientation. It is similar to the measure used by SIFT, which assigns each point to a dominant orientation and integrates responses over R. The main difference is that a location could contribute to more than one orientation, since the expected strength relies on a soft assignment of locations to orientations, according to their posterior orientation probability. Figure 1 illustrates the computations of (6) for the image shown in a). The response of a Gabor filter of orientation θ = 3π/4 is shown in b), and the orientation probability map Pθ|X(i|xi) in c). Note that these probabilities are much smaller than the Gabor responses in the body of the starfish, where the image is textured but there is no significant structure of orientation θ. On the other hand, they are largest for the locations where the orientation is dominant. Figure 1 d) shows the final dominance measure. The combined multiplication by the Gabor responses and averaging over R magnifies the responses where the orientation is dominant, suppressing the details due to texture or noise. This can be seen by comparing b) and d). Overall, (6) is large when the ith orientation responses are 1) distinct from those of other channels and 2) large. It is small when they are either indistinct or small. One interesting property is that it penalizes large responses of Xi that are not informative of the presence of stimuli with orientation i. Hence, increasing the stimulus contrast does not increase \ S(Xi)R when responses xi(l) cannot be confidently assigned to the ith orientation. This can be seen in Figure 1 f) and h), where the Gabor response and dominance measure are shown for a lowcontrast replica of the image of a). While the Gabor responses at low (f) and high (b) contrasts are substantially different, the dominance measure (d and h) stays almost constant. It follows that (6) implements contrast normalization, a topic to which we will return in later sections. It is worth noting that such normalization is accomplished without modeling joint distributions of response across orientations. On the contrary, all quantities in (6) are scalar. 3 Biological plausibility In this section we study the biological plausibility of the orientation dominance measure of (6). 3.1 Natural image statistics Extensive research on the statistics of natural images has shown that the responses of bandpass features follow the generalized gaussian distribution (GGD) PX(x; α, β) = β 2αΓ(1/β) exp − |x| α β!! (7) where Γ(z) = R ∞ 0 e−ttz−1 , dt, t > 0 is the Gamma function, α is a scale and β a shape parameter. The biological plausibility of statistical inference for GGD stimuli was extensively studied in 4 to C1 . . . to C1 … . . . i | .|βi ÷ | .|βi Σ log P(xi(l)|θi) |xi(l) | input ψi Ŝ(Xi)R ... Σ × ... Multi-scale image ÷ | .|βk Σ log P(xi(l)|θk) Ŝ(Xi)R Σ C1 layer | .|βk image S1 layer Figure 2: One channel of the bioSIFT network. The large dashed box implements the computations of the simple cell, and the small one those of the complex cell. The simple cell computes the contribution of channel i to the expected value of the dominant response at pixel x, indicated by a filled box. Spatial pooling by the complex cell determines the channel’s contribution to the expected value of the dominant response within the pooling neighborhood. [10]. This work shows that various fundamental computations in statistics can indeed be computed biologically when a maximum a posteriori (MAP) estimate is adopted for αβ, using a conjugate (Gamma) prior. This MAP estimate is αMAP =   β n + η   n X j=1 |x(j)|β + ν     1/β (8) where ν and η are the prior hyperparameters, and x(j) a sample of training points. As is usual in Bayesian inference, the hyperparameter values are important when the sample is too small to enable reliable inference. This is not the case for the current work, where the estimates remain constant over a substantial range of their values. Hence, we simply set ν = 10−3 and η = 1 in all experiments. For natural images, the value of β is quite stable. We use β = 0.5, (determined by fitting the GGD to a large set of images) in our experiments. 3.2 Biological computations To derive a biologically plausible form of (6) we start by assuming that Pθ(i) = 1 M . This is mostly for simplicity, the discussion could be generalized to account for any prior distribution of orientations. Under this assumption, using (1) Pθ|X(θ = j|x) = PX|θ(x|θ = j) P k PX|θ(x|θ = k) = PXj(x) P k PXk(x) (9) and \ S(Xi)R ∝ X l∈R |xi(l)|ψi [log PX1(xi(l)), . . . , log PXM (xi(l))] (10) where ψk is the classical softmax activation function ψk(q1, ..., qn) = exp(qk) Pn j=1 exp(qj), (11) qj the log-likelihood (up to constants that cancel in (11)) qj = log PXj(xi(l)) = −φ(xi(l); θj) −Kj (12) and, from (7) with the MAP estimate of αβ from (8) and the responses in R as training sample, φ(x; θk) = |x|β ξk ; ξk = β |R| + η X l∈R |xk(l)|β + ν ! ; Kj = log αj = 1 β log ξj. (13) 5 0.001 0.01 0.1 1.0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 contrast response 10% 20% 30% 40% 50% 0.001 0.01 0.1 1.0 0 0.1 0.2 0.3 0.4 contrast response bioSIFT N−R eqn 0 0.2 0.4 0.6 0.8 1 −12 −10 −8 −6 −4 −2 0 response log(probability) biosift gabor a) b) c) d) channel 1 channel 2 −1 −0.5 0 0.5 1 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 channel 1 channel 2 0 0.2 0.4 0.6 0.8 1 0.35 0.3 0.25 0.2 0.15 0.1 0.05 e) f) g) h) Figure 3: (a) COS in real neurons(from [12]), and (b) in bioSIFT features (c) Contrast response in bioSIFT features and corresponding Naka-Rushton fit (d)distributions of Gabor and bioSIFT amplitudes (e) Example of Orientation selectivity (f) sample image and maximum biosift response at each location (g,h) conditional histograms of adjacent channels for Gabor(g) and bioSIFT(h) features. The computations of (11)-(13) are those performed by simple cells in the standard neurophysiological model of V1. A bank of linear filters is applied at each location l of the field of view. This produces the Gabor responses xi(l). Each response xi(l) is divisively normalized by the sum of responses in the neighborhood R, for each orientation channel k, using (13). Notice that this implies that the conditional distribution of responses of a channel is learned locally, from the sample of responses in R. Altogether, (12) implements the computations of a divisively normalized simple cell. Finally, the softmax ψk is a multi-way sigmoidal non-linearity which replicates the well known saturating behavior of simple cells. The computation of the orientation dominance measure by (10) then corresponds to a complex cell, which pools the simple cell responses in R, modulated by the magnitude of the underlying Gabor responses. This produces each channel’s contribution to the bioSIFT descriptor. A graphical description of the network is presented in Figure 2. 3.3 Naka-Rushton fit In addition to replicating the standard model of V1, the biological plausibility of the bioSIFT features can be substantiated by checking if they reproduce well-established properties of neuronal responses. One characteristic property of neural responses of monkey and cat V1 is the tightness with which they can be fit by the Naka-Rushton equation [11]. The equation describes the average response to a sinusoidal grating of contrast c as R = Rmax cq cq 50 + cq (14) where Rmax is the maximum mean response, c50 is the semi-saturation contrast i.e. the contrast at which the response is half the saturation value. The parameter q, which determines the steepness of the curve, is remarkably stable for V1 neurons, where it takes values around 2 [20]. The fit between the contrast response of a bioSIFT unit and the Naka-Rushton function was determined, using the procedure of [11], and is shown in Figure 3 c). As in biology, the Naka-Rushton model fits the bioSIFT data quite well. Over multiple trials, the q parameter for the best fitting curve is stable and stays in the interval (1.7, 2.1). 3.4 Inhibitory effects It is well known that V1 neurons have a characteristic inhibitory behavior, known as crossorientation suppression (COS) [12, 7, 21]. This suppression is observed by measuring the response of a neuron, tuned to an orientation θ, to a sinusoidal grating of orthogonal orientation (θ ± 90◦). When presented by itself, the grating barely evokes a response from the neuron. However, if superimposed with a grating of another orientation, it significantly reduces the response of the neuron to the latter. To test if the bioSIFT features exhibit COS, we repeated the set of experiments reported 6 in [12]. These consist of measuring a simple cell response to a set of sinusoidal plaids obtained by summing 1) a test grating oriented along the cell’s preferred orientation, and 2) a mask grating of orthogonal orientation. The test and the mask have the same frequency as the cell’s Gabor filter. The cell response is recorded as a function of the contrast of the gratings. Figure 3 a) shows the results reported in [12], for a real neuron. The stimuli are shown on the left and the neuron’s response on the right. Note the suppression of the latter when the mask contrast increases. The response of the bioSIFT simple cell, shown in Figure 3 b), is identical to that of the neuron. From a functional point of view, the great advantage of COS is the resulting increase in selectivity of the orientation channels. This is illustrated in Figure 3 (e). The figure shows the results of an experiment that measured the response of 12 Gabor filters of orientation in [0o, 180o] to a horizontal grating. While both the first and twelfth Gabor filters have relatively large responses to this stimulus, the twelfth channel of bioSIFT is strongly suppressed. When combined with the contrast invariance of Figure 1, this leads to a representation with strong orientation discrimination and robustness to lighting variations. An example of this is shown in Figure 3 (f) which shows the value of the dominance measure for the most dominant orientation at each image location (in “split screen” with the original image). Note how the bioSIFT features capture information about dominant orientation and object shape, suppressing uninformative or noisy pixels. 3.5 Independence and sparseness Barlow [18] argued that the goal of sensory systems is to reduce redundancy, so as to produce statistically independent responses. A known property of the responses of bandpass features to natural images is a consistent pattern of higher order dependence, characterized by bow-tie shaped conditional distributions between feature pairs. This pattern is depicted in Figure 3 g), which shows the histogram of responses of a Gabor feature, conditioned on the response of the co-located feature of an adjacent orientation channel. Simoncelli [22] showed that divisively normalizing linear filter responses reduces these higher-order dependencies, making the features independent. As can be seen from (10), (12), and (13), the bioSIFT network divisively normalizes each Gabor response by the sum, across the spatial neighborhood R, of responses from each of the Gabor orientations (11). It is thus not surprising that, as shown in Figure 3 h), the conditional histograms of bioSIFT features are zero outside a small horizontal band around the horizontal axis. This implies that they are independent (knowledge of the value of one feature does not modify the distribution of responses of the other).This is a consistent observation across bioSIFT feature pairs. Another important, and extensively researched, property of V1 responses is their sparseness. Channel sparseness is closely related to independence across channels. Sparse representations have several important advantages, such as increased generalization ability and energy efficiency of neural decision-making circuits. Given the discussion above, it is not surprising that the contrast normalization inherent to the bioSIFT representation also makes it more sparse. This is shown in Figure 3 d), which compares the sparseness of the responses of both a Gabor filter and a bioSIFT unit to a natural image. It is worth noting that these properties have not been exploited in the SIFT literature itself. For example, independence could lead to more efficient implementations of SIFT-based recognizers than the standard visual words approach, which requires an expensive quantization of SIFT features with respect to a large codebook. We leave this as a topic for future research. 4 Experimental Evaluation In this section, we report on experiments designed to evaluate the benefits, for recognition, of the connections between SIFT and the standard neurophysiological model. 4.1 Biologically inspired object recognition Biologically motivated networks for object recognition have been recently the subject of substantial research [13, 23, 14, 15]. To evaluate the impact of adding bioSIFT features to these networks, we considered the HMAX network of [13], which mimics the structure of the visual cortex as a cascade of alternating simple and complex cell layers. The first layer encodes the input image as a set of complex cell responses, and the second layer measures the distance between these responses and a set of learned prototypes. The vector of these distances is then classified with a linear SVM. 7 Model 30 training images/cat. Base HMAX [13] 42 + enhancements [23] 56 Pinto et al. [14] 65 Jarrett et al [15] 65.5 Lazebnik et al. [16] 64.6 ± 0.8 Zhang et al. [24] 66.2 ± 0.5 NBNN [25] 70.4 Yang et al. [26] 73.2 ± 0.5 base bioSIFT HMAX 54.5 +enhancements 69.3 ± 0.3 Model Performance Fei-Fei et al [27] 65.2 Lazebnik et al. [16] 81.4 ± 0.5 Yang et al [26] 80.3 ± 0.9 Kernel Codebooks [28] 76.7 ± 0.4 HMAX with bioSIFT 80.1 ± 0.6 Figure 4: Classification Results on Caltech-101(left) and the Scene Classification Database(right) For this evaluation, each unit of the first layer was replaced by a bioSIFT unit, implemented as in Figure 2. The experimental setup is similar to that of [23]: multi-class classification on Caltech101 (with the size of the images reduced so that their height is 140) using 30 images/object for training and at-most 50 for testing. The baseline accuracy of [13] was 42%. The work of [23] introduced several enhancements that were shown to considerably improve this baseline. Two of these enhancements, sparsification and inhibition, were along the lines of the contributions discussed in this work. Others, such as limiting receptive fields to restrict invariance, and discriminant selection of prototypes could also be combined with bioSIFT. The base performance of the network with bioSIFT (54.5%) is superior to that of all comparable extensions of [23] (49%). This can be attributed to the fact that those extensions are mostly heuristic, while those now proposed have a more sound decision-theoretical basis. In fact, the simple addition of bioSIFT features to the HMAX network outperforms all extensions of [23] up to the prototype selection stage (54%). When bioSIFT is complemented with limited C2 invariance and prototype selection the performance improves to 69%, which is better than all results from [23]. In fact, the HMAX network with bioSIFT outperforms the state-of-the-art 1 performance (65.5%) for biologically inspired networks [15]. This improvement is interesting, given that these networks also implement most of the operations of the bioSIFT unit (filtering, normalization, pooling, saturation, etc.). The main difference is that this is done without a clear functional justification, optimality criteria, or statistical interpretation. In result, the sequence of operations is not the same, there is no guarantee that normalization provides optimal estimates of orientation dominance, or even that it corresponds to optimal statistical learning, as in (8). 4.2 Natural scene classification When compared to the state-of-the-art from the computer vision literature, the HMAX+bioSIFT network, does not fare as well. Most notably, it has worse performance than the method of Yang et al. [26], which holds the current best results for this dataset (single descriptor methods). This is explained by two main reasons. The first is that the networks are not equivalent. Yang et. al rely on a sparse coding representation in layer 2, which is likely to be more effective than the simple Gaussian units of HMAX. This problem could be eliminated by combining bioSIFT with the same sparse representation, something that we have not attempted. A second reason is that bioSIFT is not exactly optimal for Caltech, because this dataset contains various classes with many non-natural images. To avoid this problem, we have also evaluated the bioSIFT features on the scene classification task of [16]. Using the same HMAX setup, a simple linear classifier and 3000 layer 2 units, the network achieves a classification performance of 80.1% (see Figure 4). This is a substantial improvement, since these results are nearly identical to those of Yang et al. [26], and better than many of those of other methods from the computer vision literature. Overall, these results suggest that orientation dominance is an important property for visual recognition. In particular, the improved performance of the bioSIFT units cannot be explained by the importance of contrast normalization, since this is not a major nuisance for the datasets considered, it is also implemented by the other networks, bioSIFT is not optimized to normalize contrast, and it is unlikely that constrast variations would be more of an issue on Caltech than on the natural scene dataset. 1[14] reports 65%, but for a network with a much larger number of units (SVM dimension) than what is used by all other networks. Our implementation of their network with comparable parameters only achieved 42%. 8 References [1] W. T. Freeman and M. Roth, “Orientation histograms for hand gesture recognition,” in IEEE Intl. Wkshp. on Automatic Face and Gesture Recognition, 1995. [2] D. G. Lowe, “Distinctive image features from scale-invariant keypoints,” IJCV, vol. 60(2), pp. 91–110, 2004. [3] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” in Proc. IEEE Conf. CVPR, 2005. [4] D. H. Hubel and T. N. Wiesel, “Receptive fields, binocular interaction, and functional architecture in the cat’s visual cortex,” Journal of Physiology, vol. 160, 1962. [5] R. Shapley and J. D. Victor, “The contrast gain control of the cat retina,” Vision Research, vol. 19, pp. 431– 434, 1979. [6] S. E. Palmer, Vision Science: Photons to Phenomenology. The MIT Press, 1999. [7] D. Heeger, “Normalization of cell responses in cat striate cortex,” Visual Neuroscience, vol. 9, 1992. [8] M. Carandini, D. J. Heeger, and J. A. Movshon, “Linearity and normalization in simple cells of macaque primary visual cortex,” Journal of Neuroscience, vol. 17, pp. 8621–8644, 1997. [9] M. Carandini, J. B. Demb, V. Mante, D. J. Tolhurst, Y. Dan, B. A. Olshausen, J. L. Gallant, and N. C. Rust, “Do we know what the early visual system does?,” Journal of Neuroscience, vol. 25, 2005. [10] D. Gao and N. Vasconcelos, “Decision-theoritic saliency: computational principles, biological plausibility, and implications for neurophysiology and psychophysics,” Neural Computation, vol. 21, 2009. [11] M. Chirimuuta and D. J. Tolhurst, “Does a bayesian model of v1 contrast coding offer a neurophysiological account of contrast discrimination?,” Vision Research, vol. 45, pp. 2943–2959, 2005. [12] M. Carandini, Receptive fields and suppressive fields in the early visual system. MIT Press, 2004. [13] T. Serre, L. Wolf, and T. Poggio, “Object recognition with features inspired by visual cortex,” in IEEE Conf. CVPR, 2005. [14] N. Pinto, D. Cox, and J. Dicarlo, “Why is real-world visual object recognition hard?,” PLoS Computational Biology, 2008. [15] K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y. Lecun, “What is the best multi-stage architecture for object recognition?,” in Proc. IEEE International Conference on Computer Vision, 2009. [16] S. Lazebnik, C. Schmid, and J. Ponce, “Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories,” in CVPR, 2006. [17] F. Attneave, “Informational aspects of visual perception,” Psychological review, vol. 61, pp. 183–193, 1954. [18] H. B. Barlow, “Redundancy reduction revisited,” Network: Computation in Neural Systems, vol. 12, 2001. [19] D. C. Knill and W. Richards, Perception as Bayesian inference. Cambridge University Press, 1996. [20] D. G. Albrecht and D. B. Hamilton, “Striate cortex of monkey and cat: contrast response function,” Journal of Neurophysiology, vol. 48, pp. 217–237, 1982. [21] M. C. Morrone, D. C. Burr, and L. Maffei, “Functional implications of cross orientation inhibition of cortical visual cells i. neurophysiological evidence,” Proc. Royal Society London B, vol. 216, pp. 335– 354, 1982. [22] M. J. Wainwright, O. Schwartz, and E. P. Simoncelli, “Natural image statistics and divisive normalization: Modeling nonlinearities and adaptation in cortical neurons,” in Probabilistic Models of the Brain: Perception and Neural Function, pp. 203–222, MIT Press, 2002. [23] J. Mutch and D. Lowe, “Object class recognition and localization using sparse features with limited receptive fields,” IJCV, vol. 80, pp. 45–57, 2008. [24] H. Zhang, A. Berg, M. Maire, and J. Malik, “Svm-knn: Discriminative nearest neigbor classification for visual category recognition,” in Proc. IEEE Conf CVPR, 2006. [25] O. Boiman, E. Shechtman, and M. Irani, “In defense of nearest-neighbor based image classification,” in Proc. IEEE Conf. CVPR, 2008. [26] J. Yang, K. Yu, Y. Gong, and T. Huang, “Linear spatial pyramid matching using sparse coding for image classification,” in Proc. IEEE Conf. CVPR, 2009. [27] L. Fei-Fei and P. Perona, “A bayesian heirarchical model for learning natural scene categories,” in Proc. IEEE Conf CVPR, 2005. [28] J. C. van Gemert, J. M. Geusebroek, C. J. Veenman, and A. W. M. Smeulders, “Kernel codebooks for scene categorisation,” in Proc ECCV, 2008. 9
2010
173
3,936
A primal-dual algorithm for group sparse regularization with overlapping groups Sofia Mosci DISI- Universit`a di Genova mosci@disi.unige.it Silvia Villa DISI- Universit`a di Genova villa@dima.unige.it Alessandro Verri DISI- Universit`a di Genova verri@disi.unige.it Lorenzo Rosasco IIT - MIT lrosasco@MIT.EDU Abstract We deal with the problem of variable selection when variables must be selected group-wise, with possibly overlapping groups defined a priori. In particular we propose a new optimization procedure for solving the regularized algorithm presented in [12], where the group lasso penalty is generalized to overlapping groups of variables. While in [12] the proposed implementation requires explicit replication of the variables belonging to more than one group, our iterative procedure is based on a combination of proximal methods in the primal space and projected Newton method in a reduced dual space, corresponding to the active groups. This procedure provides a scalable alternative with no need for data duplication, and allows to deal with high dimensional problems without pre-processing for dimensionality reduction. The computational advantages of our scheme with respect to state-of-the-art algorithms using data duplication are shown empirically with numerical simulations. 1 Introduction Sparsity has become a popular way to deal with small samples of high dimensional data and, in a broad sense, refers to the possibility of writing the solution in terms of a few building blocks. Often, sparsity based methods are the key towards finding interpretable models in real-world problems. In particular, regularization based on ℓ1 type penalties is a powerful approach for dealing with the problem of variable selection, since it provides sparse solutions by minimizing a convex functional. The success of ℓ1 regularization motivated exploring different kinds of sparsity properties for (generalized) linear models, exploiting available a priori information, which restricts the admissible sparsity patterns of the solution. An example of a sparsity pattern is when the input variables are partitioned into groups (known a priori), and the goal is to estimate a sparse model where variables belonging to the same group are either jointly selected or discarded. This problem can be solved by regularizing with the group-ℓ1 penalty, also known as group lasso penalty, which is the sum, over the groups, of the euclidean norms of the coefficients restricted to each group. A possible generalization of group lasso is to consider groups of variables which can be potentially overlapping, and the goal is to estimate a model which support is the union of groups. This is a common situation in bioinformatics (especially in the context of high-throughput data such as gene expression and mass spectrometry data), where problems are characterized by a very low number of samples with several thousands of variables. In fact, when the number of samples is not sufficient to guarantee accurate model estimation, an alternative is to take advantage of the huge amount of prior knowledge encoded in online databases such as the Gene Ontology. Largely motivated by applications in bioinformatics, a new type of penalty is proposed in [12], which is shown to give better 1 performances than simple ℓ1 regularization. A straightforward solution to the minimization problem underlying the method proposed in [12] is to apply state-of-the-art techniques for group lasso (we recall interior-points methods [3, 20], block coordinate descent [16], and proximal methods [9, 21], also known as forward-backward splitting algorithms, among others) in an expanded space, built by duplicating variables that belong to more than one group. As already mentioned in [12], though very simple, such an implementation does not scale to large datasets, when the groups have significant overlap, and a more scalable algorithm with no data duplication is needed. For this reason we propose an alternative optimization approach to solve the group lasso problem with overlap. Our method does not require explicit replication of the features and is thus more appropriate to deal with high dimensional problems with large groups overlap. Our approach is based on a proximal method (see for example [18, 6, 5]), and two ad hoc results that allow to efficiently compute the proximity operator in a much lower dimensional space: with Lemma 1 we identify the subset of active groups, whereas in Theorem 2 we formulate the reduced dual problem for computing the proximity operator, where the dual space dimensionality coincides with the number of active groups. The dual problem can then be solved via Bertsekas’ projected Newton method [7]. We recall that a particular overlapping structure is the hierarchical structure, where the overlap between groups is limited to inclusion of a descendant in its ancestors. In this case the CAP penalty [24] can be used for model selection, as it has been done in [2, 13], but ancestors are forced to be selected when any of their descendant are selected. Thanks to the nested structure, the proximity operator of the penalty term can be computed exactly in a finite number of steps [14]. This is no longer possible in the case of general overlap. Finally it is worth noting that the penalty analyzed here can be applied also to hierarchical group lasso. Differently from [2, 13] selection of ancestors is no longer enforced. The paper is organized as follows. In Section 2 we recall the group lasso functional for overlapping groups and set some notations. In Section 3 we state the main results, present a new iterative optimization procedure, and discuss computational issues. Finally in Section 4 we present some numerical experiments comparing running time of our algorithm with state-of-the-art techniques. The proofs are reported in the Supplementary material. 2 Problem and Notations We first fix some notations. Given a vector β ∈Rd, while ∥·∥denotes the ℓ2-norm, we will use the notation ∥β∥G = (P j∈G β2 j )1/2 to denote the ℓ2-norm of the components of β in G ⊂{1, . . . , d}. Then, for any differentiable function f : RB →R, we denote by ∂rf its partial derivative with respect to variables r, and by ∇f = (∂rf)B r=1 its gradient. We are now ready to cast group ℓ1 regularization with overlapping groups as the following variational problem. Given a training set {(xi, yi)n i=1} ∈(X ×Y )n, a dictionary (ψj)d j=1, and B subsets of variables G = {Gr}B r=1 with Gr ⊂{1, . . . , d}, we assume the estimator to be described by a generalized linear model f(x) = Pd j=1 ψj(x)βj and consider the following regularization scheme β∗= argmin β∈Rd Eτ(β) = argmin β∈Rd  1 n ∥Ψβ −y∥2 + 2τΩG overlap(β)  , (1) where Ψ is the n × d matrix given by the features ψj in the dictionary evaluated in the training set points, [Ψ]i,j = ψj(xi). The term 1 n ∥Ψβ −y∥2 is the empirical error, 1 n Pn i=1 ℓ(f(xi), yi), when the cost function1 ℓ: R × Y →R+ is the square loss, ℓ(f(x), y) = (y −f(x))2. The penalty term ΩGoverlap : Rd →R+ is lower semicontinuous, convex, and one-homogeneous, (ΩGoverlap(λβ) = λΩGoverlap(β), ∀β ∈Rd and λ ∈R+), and is defined as ΩG overlap(β) = inf (v1,...,vB),vr∈Rd,supp(vr)⊂Gr,PB r=1 vr=β B X r=1 ∥vr∥. The functional ΩGoverlap was introduced in [12] as a generalization of the group lasso penalty to allow overlapping groups, while maintaining the group lasso property of enforcing sparse solutions which support is a union of groups. When groups do not overlap, ΩGoverlap reduces to the group lasso 1Note our analysis would immediately apply to other loss functions, e.g. the logistic loss. 2 penalty. Note that, as pointed out in [12], using PB r=1 ∥β∥Gr as generalization of the group lasso penalty leads to a solution which support is the complement of the union of groups. For an extensive study of the properties of ΩGoverlap, its comparison with the ℓ1 norm, and its extension to graph lasso, we therefore refer the interested reader to [12]. 3 The GLO-pridu Algorithm If one needs to solve problem (1) for high dimensional data, the use of standard second-order methods such as interior-point methods is precluded (see for instance [6]), since they need to solve large systems of linear equations to compute the Newton steps. On the other hand, first order methods inspired to Nesterov’s seminal paper [19] (see also [18]) and based on proximal methods already proved to be a computationally efficient alternative in many machine learning applications [9, 21]. 3.1 A Proximal algorithm Given the convex functional Eτ in (1), which is sum of a differentiable term, namely 1 n ∥Ψβ −y∥2, and a non-differentiable one-homogeneous term 2τΩGoverlap, its minimum can be computed with following acceleration of the iterative forward-backward splitting scheme βp = I −πτ/σK   hp −1 nσ ΨT (Ψhp −y)  cp = (1 −tp)cp−1, tp+1 =  −cp + q c2p + 8cp  /4 (2) hp+1 = βp(1 −tp+1 + tp+1 tp ) + βp−1(tp −1)tp+1 tp for a suitable choice of σ. Due to one-homogeneity of ΩGoverlap, the proximity operator associated to τ σΩGoverlap reduces to the identity minus the projection onto the subdifferential of τ σΩGoverlap at the origin, which is a closed and convex set. We will denote such a projection as πτ/σK, where K = ∂ΩGoverlap(0). The above scheme is inspired to [10], and is equivalent to the algorithm named FISTA [5], which convergence is guaranteed, as recalled in the following theorem Theorem 1 Given β0 ∈Rd, and σ = ||ΨT Ψ||/n, let h1 = β0 and t1 = 1, c0 = 1, then there exists a constant C0 such that the iterative update (10) satisfies Eτ(βp) −Eτ(β∗) ≤C0 p2 . (3) As it happens for other accelerations of the basic forward-backward splitting algorithm such as [19, 6, 4], convergence of the sequence βp is no longer guaranteed unless strong convexity is assumed. However, sacrificing theoretical convergence for speed may be mandatory in large scale applications. Furthermore, there is a strong empirical evidence that βp is indeed convergent (see Section 4). 3.2 The projection Note that the proximity operator of the penalty ΩGoverlap does not admit a closed form and must be computed approximatively. In fact the projection on the convex set K = ∂ΩGoverlap(0) = {v ∈Rd, ∥v∥Gr ≤1 for r = 1, . . . , B}. cannot be decomposed group-wise, as in standard group ℓ1 regularization, which proximity operator resolves to a group-wise soft-thresholding operator (see Eq. (9) later). Nonetheless, the following lemma shows that, when evaluating the projection, πK, we can restrict ourselves to a subset of ˆB = | ˆG| ≤B active groups. This equivalence is crucial for speeding up the algorithm, in fact ˆB is the number of selected groups which is small if one is interested in sparse solutions. Lemma 1 Given β ∈Rd, G = {Gr}B r=1 with Gr ⊂{1, . . . , d}, and τ > 0, the projection onto the convex set τK with K = {v ∈Rd, ∥v∥Gr ≤1 for r = 1, . . . , B} is given by Minimize ∥v −β∥2 subject to v ∈Rd, ∥v∥G ≤τ for G ∈ˆG. (4) where ˆG := {G ∈G, ∥β∥G > τ} . 3 The proof (given in the supplementary material) is based on the fact that the convex set τK is the intersection of cylinders that are all centered on a coordinate subspace. Since ˆB is typically much smaller than d, it is convenient to solve the dual problem associated to (4). Theorem 2 Given β ∈Rd, {Gr}B r=1 with Gr ⊂{1, . . . , d}, and τ > 0, the projection onto the convex set τK with K = {v ∈Rd, ∥v∥Gr ≤τ for r = 1, . . . , B} is given by [πτK(β)]j = βj (1 + P ˆ B r=1 λ∗r1r,j) for j = 1, . . . , d (5) where λ∗is the solution of argmax λ∈R ˆ B + f(λ), with f(λ) := d X j=1 −β2 j 1 + P ˆ B r=1 1r,jλr − ˆ B X r=1 λrτ 2, (6) ˆG = {G ∈G, ∥β∥G > τ} := { ˆG1, . . . , ˆG ˆ B}, and 1r,j is 1 if j belongs to group ˆGr and 0 otherwise. Equation (6) is the dual problem associated to (4), and, since strong duality holds, the minimum of (4) is equal to the maximum of the dual problem, which can be efficiently solved via Bertsekas’ projected Newton method described in [7], and here reported as Algorithm 1. Algorithm 1 Projection Given: β ∈Rd, λinit ∈R ˆ B, η ∈(0, 1), δ ∈(0, 1/2), ϵ > 0 Initialize: q = 0, λ0 = λinit while (∂rf(λq) > 0 if λq r = 0, or |∂rf(λq)| > ϵ if λq r > 0, for r = 1, . . . , ˆB) do q := q + 1 ϵq = min{ϵ, ||λq −[λq −∇f(λq)]+||} Iq + = {r such that 0 ≤λq r ≤ϵq, ∂rf(λq) > 0} Hr,s = 0 if r ̸= s, and r ∈Iq +or s ∈Iq + ∂r∂sf(λq) otherwise (7) λ(α) = [λq −α(Hq)−1∇f(λq)]+ m = 0 while f(λq) −f(λ(ηm)) ≥δ n ηm P r /∈Iq + ∂rf(λq) + P r∈Iq + ∂rf(λq)[λq r −λr(ηm)] o do m := m + 1 end while λq+1 = λ(ηm) end while return λq+1 Bertsekas’ iterative scheme combines the basic simplicity of the steepest descent iteration [22] with the quadratic convergence of the projected Newton’s method [8]. It does not involve the solution of a quadratic program thereby avoiding the associated computational overhead. 3.3 Computing the regularization path In Algorithm 2 we report the complete Group Lasso with Overlap primal-dual (GLO-pridu) scheme for computing the regularization path, i.e. the set of solutions corresponding to different values of the regularization parameter τ1 > . . . > τT , for problem (1). Note that we employ the continuation strategy proposed in [11]. A similar warm starting is applied to the inner iteration, where at the p-th step λinit is determined by the solution of the (p−1)-th projection. Such an initialization empirically proved to guarantee convergence, despite the local nature of Bertsekas’ scheme. 3.4 The replicates formulation An alternative way to solve the optimization problem (1) is proposed by [12], where the authors show that problem (1) is equivalent to the standard group ℓ1 regularization (without overlap) in an expanded space built by replicating variables belonging to more than one group: 4 Algorithm 2 GLO-pridu regularization path Given: τ1 > τ2 > · · · > τT , G, η ∈(0, 1), δ ∈(0, 1/2), ϵ0 > 0, ν > 0 Let: σ = ||ΨT Ψ||/n Initialize: β(τ0) = 0 for t = 1, . . . , T do Initialize: β0 = β(τt−1), λ∗ 0 = 0 while ||βp −βp−1|| > ν||βp−1|| do • w = hp −(nσ)−1ΨT (Ψhp −y) • Find ˆG = {G ∈G, ∥w∥G ≥τ} • Compute λ∗ p via Algorithm 1 with groups ˆG, initialization λ∗ p−1 and tolerance ϵ0p−3/2 • Compute βp as βp j = wj(1 + P ˆ B r=1 λq+1 r 1r,j)−1 for j = 1, . . . , d, see Equation (5) • Update cp, tp, and hp as in (10) end while β(τt) = βp end for return β(τ1), . . . , β(τT ) ˜β∗∈argmin ˜β∈R ˜ d ( 1 n||˜Ψ˜β −y||2 + 2τ B X r=1 ||˜β|| ˜ Gr ) , (8) where ˜Ψ is the matrix built by concatenating copies of Ψ restricted each to a certain group, i.e. (˜Ψj)j∈˜ Gr = (Ψj)j∈Gr, where { ˜G1, . . . , ˜GB} = {[1, . . . , |G1|], [1+|G1|, . . . , |G1|+|G2|], . . . , [ ˜d− |GB|, . . . , ˜d|]}, and ˜d = PB r=1 |Gr| is the number of total variables obtained after including the replicates. One can then reconstruct β∗from ˜β∗as β∗ j = PB r=1 φGr(˜β∗), where φGr : R ˜d →Rd maps ˜β in v ∈Rd, such that supp(v) ⊂Gr and (vj)j∈Gr = (˜βj)j∈˜ Gr, for r = 1, . . . , B. The main advantage of the above formulation relies on the possibility of using any state-of-the-art optimization procedure for group lasso. In terms of proximal methods, a possible solution is given by Algorithm 3, where Sτ/σ is the proximity operator of the new penalty, and can be computed exactly as  Sτ/σ(˜β)  j =  ||˜β|| ˜ Gr −τ σ  + ˜βj, for j ∈˜Gr, for r = 1, . . . , B. (9) Algorithm 3 GL-prox Given: ˜β0 ∈Rd, τ > 0, σ = ||˜ΨT ˜Ψ||/n Initialize: p = 0, ˜h1 = ˜β0, t1 = 1 while convergence not reached do p := p + 1 ˜βp = Sτ/σ  ˜hp −(nσ)−1 ˜ΨT (˜Ψ˜hp −y)  (10) cp = (1 −tp)cp−1, tp+1 = 1 4(−cp + q c2p + 8cp) ˜hp+1 = ˜βp(1 −tp+1 + tp+1 tp ) + ˜βp−1(tp −1)tp+1 tp end while return ˜βp Note that in principle, by applying Lemma 1, the group-soft-thresholding operator in (9) can be computed only on the active groups. In practice this does not yield any advantage, since the identification of the active groups has the same computational cost of the thresholding itself. 3.5 Computational issues For both GL-prox and GLO-pridu, the complexity of one iteration is the sum of the complexity of computing the gradient of the data term and the complexity of computing the proximity operator of the penalty term. The former has complexity O(dn) and O( ˜dn) for GLO-pridu and GL-prox, 5 respectively, for the case n < d. One should then add at each iteration, the cost of performing the projection onto K. This can be neglected for the case of replicated variables.On the other hand, the time complexity of one iteration for Algorithm 1 is driven by the number of active groups ˆB. This number is typically small when looking for sparse solutions. The complexity is thus given by the sum of the complexity of evaluating the inverse of the ˆB × ˆB matrix H, O( ˆB3), and the complexity of performing the product H−1∇g(λ), O( ˆB2). The worst case complexity would then be O( ˆB3). Nevertheless, in practice the complexity is much lower because matrix H is highly sparse. In fact, Equation (7) tells us that the part of matrix H corresponding to the active set I+ is diagonal. As a consequence, if ˆB = ˆB−+ ˆB+, where ˆB−is the number of non active constraints, and ˆB+ is the number of active constraints, then the complexity of inverting matrix H is at most O( ˆB+) + O( ˆB3 −). Furthermore the ˆB−× ˆB−non diagonal part of matrix H is highly sparse, since Hr,s = 0 if ˆGr ∩˜Gs = ∅and the complexity of inverting it is in practice much lower than O( ˆB3 −). The worst case complexity for computing the projection onto K is thus O(q · ˆB+) + O(q · ˆB3 −), where q is the number of iterations necessary to reach convergence. Note that even if, in order to guarantee convergence, the tolerance for evaluating convergence of the inner iteration must decrease with the number of external iterations, in practice, thanks to warm starting, we observed that q is rarely greater than 10 in the experiments presented here. Concerning the number of iterations required to reach convergence for GL-prox in the replicates formulation, we empirically observed that it requires a much higher number of iterations than GLOpridu (see Table 3). We argue that such behavior is due to the combination of two occurences: 1) the local condition number of matrix ˜Ψ is 0 even if Ψ is locally well conditioned, 2) the decomposition of β∗as ˜β∗is possibly not unique, which is required in order to have a unique solution for (8). The former is due to the presence of replicated columns in ˜Ψ. In fact, since Eτ is convex but not necessarily strictly convex – as when n < d –, uniqueness and convergence is not always guaranteed unless some further assumption is imposed. Most convergence results relative to ℓ1 regularization link uniqueness of the solution as well as the rate of convergence of the Soft Thresholding Iteration to some measure of local conditioning of the Hessian of the differentiable part of Eτ (see for instance Proposition 4.1 in [11], where the Hessian restricted to the set of relevant variables is required to be full rank). In our case the Hessian for GL-prox is simply ˜H = 1/n˜ΨT ˜Ψ, so that, if the relevant groups have non null intersection, then ˜H restricted to the set of relevant variables is by no means full rank. Concerning the latter argument, we must say that in many real world problems, such as bioinformatics, one cannot easily verify that the solution indeed has a unique decomposition. In fact, we can think of trivial examples where the replicates formulation has not a unique solution. 4 Numerical Experiments In this section we present numerical experiments aimed at comparing the running time performance of GLO-pridu with state-of-the-art algorithms. To ensure a fair comparison, we first run some preliminary experiments to identify the fastest codes for group ℓ1 regularization with no overlap. We refer to [6] for an extensive empirical and theoretical comparison of different optimization procedures for solving ℓ1 regularization. Further empirical comparisons can be found in [15]. 4.1 Comparison of different implementations for standard group lasso We considered three algorithms which are representative of the optimization techniques used to solve group lasso: interior-point methods, (group) coordinate descent and its variations, and proximal methods. As an instance of the first set of techniques we employed the publicly available Matlab code at http://www.di.ens.fr/˜fbach/grouplasso/index.htm described in [1]. For coordinate descent methods, we employed the R-package grlplasso, which implements block coordinate gradient descent minimization for a set of possible loss functions. In the following we will refer to these two algorithms as “’GL-IP” and “GL-BCGD”. Finally we use our Matlab implementation of Algorithm GL-prox as an instance of proximal methods. We first observe that the solutions of the three algorithms coincide up to an error which depends on each algorithm tolerance. We thus need to tune each tolerance in order to guarantee that all iterative algorithms are stopped when the level of approximation to the true solution is the same. 6 Table 1: Running time (mean and standard deviation) in seconds for computing the entire regularization path of GL-IP, GL-BCGD, and GL-prox for different values of B, and n. For B = 1000, GL-IP could not be computed due to memory reasons. n = 100 B = 10 B = 100 B = 1000 GL-IP 5.6 ± 0.6 60 ± 90 – GL-BCGD 2.1 ± 0.6 2.8 ± 0.6 14.4 ± 1.5 GL-prox 0.21 ± 0.04 2.9 ± 0.4 183 ± 19 n = 500 B = 10 B = 100 B = 1000 GL-IP 2.30 ± 0.27 370 ± 30 – GL-BCGD 2.15 ± 0.16 4.7 ± 0.5 16.5 ± 1.2 GL-prox 0.1514 ± 0.0025 2.54 ± 0.16 109 ± 6 n = 1000 B = 10 B = 100 B = 1000 GL-IP 1.92 ± 0.25 328 ± 22 – GL-BCGD 2.06 ± 0.26 18 ± 3 20.6 ± 2.2 GL-prox 0.182 ± 0.006 4.7 ± 0.5 112 ± 6 Toward this end, we run Algorithm GL-prox with machine precision, ν = 10−16, in order to have a good approximation of the asymptotic solution. We observe that for many values of n and d, and over a large range of values of τ, the approximation of GL-prox when ν = 10−6 is of the same order of the approximation of GL-IP with optparam.tol=10−9, and of GL-BCGD with tol= 10−12. Note also that with these tolerances the three solutions coincide also in terms of selection, i.e. their supports are identical for each value of τ. Therefore the following results correspond to optparam.tol = 10−9 for GL-IP, tol = 10−12 for GL-BCGD, and ν = 10−6 for GL-prox. For the other parameters of GL-IP we used the values used in the demos supplied with the code. Concerning the data generation protocol, the input variables x = (x1, . . . , xd) are uniformly drawn from [−1, 1]d. The labels y are computed using a noise-corrupted linear regression function, i.e. y = β ·x+w, where β depends on the first 30 variables, βj = 1 if j =1, . . . , 30, and 0 otherwise, w is an additive gaussian white noise, and the signal to noise ratio is 5:1. In this case the dictionary coincides with the variables, Ψj(x) = xj for j = 1, . . . , d. We then evaluate the entire regularization path for the three algorithms with B sequential groups of 10 variables, (G1=[1, . . . , 10], G2=[11, . . . , 20], and so on), for different values of n and B. In order to make sure that we are working on the correct range of values for the parameter τ, we first evaluate the set of solutions of GL-prox corresponding to a large range of 500 values for τ, with ν = 10−4. We then determine the smallest value of τ which corresponds to selecting less than n variables, τmin, and the smallest one returning the null solution, τmax. Finally we build the geometric series of 50 values between τmin and τmax, and use it to evaluate the regularization path on the three algorithms. In order to obtain robust estimates of the running times, we repeat 20 times for each pair n, B. In Table 1 we report the computational times required to evaluate the entire regularization path for the three algorithms. Algorithms GL-BCGD and GL-prox are always faster than GL-IP which, due to memory reasons, cannot by applied to problems with more than 5000 variables, since it requires to store the d × d matrix ΨT × Ψ. It must be said that the code for GP-IL was made available mainly in order to allow reproducibility of the results presented in [1], and is not optimized in terms of time and memory occupation. However it is well known that standard second-order methods are typically precluded on large data sets, since they need to solve large systems of linear equations to compute the Newton steps. GL-BCGD is the fastest for B = 1000, whereas GL-prox is the fastest for B = 10, 100. The candidates as benchmark algorithms for comparison with GLO-pridu are GL-prox and GL-BCGD. Nevertheless we observed that, when the input data matrix contains a significant fraction of replicated columns, this algorithm does not provide sparse solutions. We therefore compare GLO-pridu with GL-prox only. 4.1.1 Projection vs duplication The data generation protocol is equal to the one described in the previous experiments, but β depends on the first 12/5b variables (which correspond to the first three groups) β = (c, . . . , c | {z } b·12/5 times , 0, 0, . . . , 0 | {z } d−b·12/5 times ). 7 We then define B groups of size b, so that ˜d = B · b > d. The first three groups correspond to the subset of relevant variables, and are defined as G1 = [1, . . . , b], G2 = [4/5b + 1, . . . , 9/5b], and G3 = [1, . . . , b/5, 8/5b + 1, . . . , 12/5b], so that they have a 20% pair-wise overlap. The remaining B −3 groups are built by randomly drawing sets of b indexes from [1, d]. In the following we will let n = 10|G1 ∪G2 ∪G3|, i.e. n is ten times the number of relevant variables, and vary d, b. We also vary the number of groups B, so that the dimension of the expanded space is α times the input dimension, ˜d = αd, with α = 1.2, 2, 5. Clearly this amounts to taking B = α · d/b. The parameter α can be thought of as the average number of groups a single variable belongs to. We identify the correct range of values for τ as in the previous experiments, using GLO-pridu with loose tolerance, and then evaluate the running time and the number of iterations necessary to compute the entire regularization path for GL-prox on the expanded space and GLO-pridu, both with ν = 10−6. Finally we repeat 20 times for each combination of the three parameters d, b, and α. Table 2: Running time (mean ± standard deviation) in seconds for b=10 (top), and b=100 (below). For each d and α, the left and right side correspond to GLO-pridu, and GL-prox, respectively. α = 1.2 α = 2 α = 5 d=1000 0.15 ± 0.04 0.20 ± 0.09 1.6 ± 0.9 5.1 ± 2.0 12.4 ± 1.3 68 ± 8 d=5000 1.1 ± 0.4 1.0 ± 0.6 1.55 ± 0.29 2.4 ± 0.7 103 ± 12 790 ± 57 d=10000 2.1 ± 0.7 2.1 ± 1.4 3.0 ± 0.6 4.5 ± 1.4 460 ± 110 2900 ± 400 α = 1.2 α = 2 α = 5 d=1000 11.7 ± 0.4 24.1 ± 2.5 11.6 ± 0.4 42 ± 4 13.5 ± 0.7 1467 ± 13 d=5000 31 ± 13 38 ± 15 90 ± 5 335 ± 21 85 ± 3 1110 ± 80 d=10000 16.6 ± 2.1 13 ± 3 90 ± 30 270 ± 120 296 ± 16 – Table 3: Number of iterations (mean ± standard deviation) for b = 10 (top) and b = 100 (below). For each d and α, the left and right side correspond to GLO-pridu, and GL-prox, respectively. α = 1.2 α = 2 α = 5 d=1000 100 ± 30 80 ± 30 1200 ± 500 1900 ± 800 2150 ± 160 11000 ± 1300 d=5000 100 ± 40 70 ± 30 148 ± 25 139 ± 24 6600 ± 500 27000 ± 2000 d=10000 100 ± 30 70 ± 40 160 ± 30 137 ± 26 13300 ± 1900 49000 ± 6000 α = 1.2 α = 2 α = 5 d=1000 913 ± 12 2160 ± 210 894 ± 11 2700 ± 300 895 ± 10 4200 ± 400 d=5000 600 ± 400 600 ± 300 1860 ± 110 4590 ± 290 1320 ± 30 6800 ± 500 d=10000 81 ± 11 63 ± 11 1000 ± 500 1800 ± 900 2100 ± 60 – Running times and number of iterations are reported in Table 2 and 3, respectively. When the degree of overlap α is low the computational times of GL-prox and GLO-pridu are comparable. As α increases, there is a clear advantage in using GLO-pridu instead of GL-prox. The same behavior occurs for the number of iterations. 5 Discussion We have presented an efficient optimization procedure for computing the solution of group lasso with overlapping groups of variables, which allows dealing with high dimensional problems with large groups overlap. We have empirically shown that our procedure has a great computational advantage with respect to state-of-the-art algorithms for group lasso applied on the expanded space built by replicating variables belonging to more than one group. We also mention that computational performance may improve if our scheme is used as core for the optimization step of active set methods, such as [23]. Finally, as shown in [17], the improved computational performance enables to use group ℓ1 regularization with overlap for pathway analysis of high-throughput biomedical data, since it can be applied to the entire data set and using all the information present in online databases, without pre-processing for dimensionality reduction. 8 References [1] F. Bach. Consistency of the group lasso and multiple kernel learning. Journal of Machine Learning Research, 9:1179–1225, 2008. [2] F. Bach. High-dimensional non-linear variable selection through hierarchical kernel learning. Technical Report HAL 00413473, INRIA, 2009. [3] F. R. Bach, G. Lanckriet, and M. I. Jordan. Multiple kernel learning, conic duality, and the smo algorithm. In ICML, volume 69 of ACM International Conference Proceeding Series, 2004. [4] A. Beck and Teboulle. M. Fast gradient-based algorithms for constrained total variation image denoising and deblurring problems. IEEE Transactions on Image Processing, 18(11):2419– 2434, 2009. [5] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sci., 2(1):183–202, 2009. [6] S. Becker, J. Bobin, and E. Candes. Nesta: A fast and accurate first-order method for sparse recovery, 2009. [7] D. Bertsekas. Projected newton methods for optimization problems with simple constraints. SIAM Journal on Control and Optimization, 20(2):221–246, 1982. [8] R. Brayton and J. Cullum. An algorithm for minimizing a differentiable function subject to. J. Opt. Th. Appl., 29:521–558, 1979. [9] J. Duchi and Y. Singer. Efficient online and batch learning using forward backward splitting. Journal of Machine Learning Research, 10:28992934, December 2009. [10] O. Guler. New proximal point algorithm for convex minimization. SIAM J. on Optimization, 2(4):649–664, 1992. [11] E. T. Hale, W. Yin, and Y. Zhang. Fixed-point continuation for l1-minimization: Methodology and convergence. SIOPT, 19(3):1107–1130, 2008. [12] L. Jacob, G. Obozinski, and J.-P. Vert. Group lasso with overlap and graph lasso. In ICML, page 55, 2009. [13] R. Jenatton, J.-Y . Audibert, and F. Bach. Structured variable selection with sparsity-inducing norms. Technical report, INRIA, 2009. [14] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for sparse hierarchical dictionary learning. In Proceeding of ICML 2010, 2010. [15] I. Loris. On the performance of algorithms for the minimization of l1-penalized functionals. Inverse Problems, 25(3):035008, 16, 2009. [16] L. Meier, S. van de Geer, and P. Buhlmann. The group lasso for logistic regression. J. R. Statist. Soc, B(70):53–71, 2008. [17] S. Mosci, S. Villa, Verri A., and L. Rosasco. A fast algorithm for structured gene selection. presented at MLSB 2010, Edinburgh. [18] Y. Nesterov. A method for unconstrained convex minimization problem with the rate of convergence o(1/k2). Doklady AN SSSR, 269(3):543–547, 1983. [19] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Prog. Series A, 103(1):127–152, 2005. [20] M. Y. Park and T. Hastie. L1-regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69:659–677, 2007. [21] L. Rosasco, M. Mosci, S. Santoro, A. Verri, and S. Villa. Iterative projection methods for structured sparsity regularization. Technical Report MIT-CSAIL-TR-2009-050, MIT, 2009. [22] J. Rosen. The gradient projection method for nonlinear programming, part i: linear constraints. J. Soc. Ind. Appl. Math., 8:181–217, 1960. [23] V. Roth and B. Fischer. The group-lasso for generalized linear models: uniqueness of solutions and efficient algorithms. In Proceedings of 25th ICML, 2008. [24] P. Zhao, G. Rocha, and B. Yu. The composite absolute penalties family for grouped and hierarchical variable selection. Annals of Statistics, 37(6A):3468–3497, 2009. 9
2010
174
3,937
Heavy-Tailed Process Priors for Selective Shrinkage Fabian L. Wauthier University of California, Berkeley flw@cs.berkeley.edu Michael I. Jordan University of California, Berkeley jordan@cs.berkeley.edu Abstract Heavy-tailed distributions are often used to enhance the robustness of regression and classification methods to outliers in output space. Often, however, we are confronted with “outliers” in input space, which are isolated observations in sparsely populated regions. We show that heavy-tailed stochastic processes (which we construct from Gaussian processes via a copula), can be used to improve robustness of regression and classification estimators to such outliers by selectively shrinking them more strongly in sparse regions than in dense regions. We carry out a theoretical analysis to show that selective shrinkage occurs when the marginals of the heavy-tailed process have sufficiently heavy tails. The analysis is complemented by experiments on biological data which indicate significant improvements of estimates in sparse regions while producing competitive results in dense regions. 1 Introduction Gaussian process classifiers (GPCs) [12] provide a Bayesian approach to nonparametric classification with the key advantage of producing predictive class probabilities. Unfortunately, when training data are unevenly sampled in input space, GPCs tend to overfit in the sparsely populated regions. Our work is motivated by an application to protein folding where this presents a major difficulty. In particular, while Nature provides samples of protein configurations near the global minima of free energy functions, protein-folding algorithms, which imitate Nature by minimizing an estimated energy function, necessarily explore regions far from the minimum. If the estimate of free energy is poor in those sparsely-sampled regions then the algorithm has a poor guide towards the minimum. More generally this problem can be viewed as one of “covariate shift,” where the sampling pattern differs in the training and testing phase. In this paper we investigate a GPC-based approach that addresses overfitting by shrinking predictive class probabilities towards conservative values. For an unevenly sampled input space it is natural to consider a selective shrinkage strategy: we wish to shrink probability estimates more strongly in sparse regions than in dense regions. To this end several approaches could be considered. If sparse regions can be readily identified, selective shrinkage could be induced by tailoring the Gaussian process (GP) kernel to reflect that information. In the absence of such knowledge, Goldberg and Williams [5] showed that Gaussian process regression (GPR) can be augmented with a GP on the log noise level. More recent work has focused on partitioning input space into discrete regions and defining different kernel functions on each. Treed Gaussian process regression [6] and Treed Gaussian process classification [1] represent advanced variations of this theme that define a prior distribution over partitions and their respective kernel hyperparameters. Another line of research which could be adapted to this problem posits that the covariate space is a nonlinear deformation of another space on which a Gaussian process prior is placed [3, 13]. Instead of directly modifying the kernel matrix, the observed non-uniformity of measurements is interpreted as being caused by the spatial deformation. A difficulty with all these approaches is that posterior inference is based on MCMC, which can be overly slow for the large-scale problems that we aim to address. 1 This paper shows that selective shrinkage can be more elegantly introduced by replacing the Gaussian process underlying GPC with a stochastic process that has heavy-tailed marginals (e.g., Laplace, hyperbolic secant, or Student-t). While heavy-tailed marginals are generally viewed as providing robustness to outliers in the output space (i.e., the response space), selective shrinkage can be viewed as a form of robustness to outliers in the input space (i.e., the covariate space). Indeed, selective shrinkage means the data points that are far from other data points in the input space are regularized more strongly. We provide a theoretical analysis and empirical results to show that inference based on stochastic processes with heavy-tailed marginals yields precisely this kind of shrinkage. The paper is structured as follows: Section 2 provides background on GPCs and highlights how selective shrinkage can arise. We present a construction of heavy-tailed processes in Section 3 and show that inference reduces to standard computations in a Gaussian process. An analysis of our approach is presented in Section 4 and details on inference algorithms are presented in Section 5. Experiments on biological data in Section 6 demonstrate that heavy-tailed process classification substantially outperforms GPC in sparse regions while performing competitively in dense regions. The paper concludes with an overview of related research and final remarks in Sections 7 and 8. 2 Gaussian process classification and shrinkage A Gaussian process (GP) [12] is a prior on functions z : X →R defined through a mean function (usually identically zero) and a symmetric positive semidefinite kernel k(·, ·). For a finite set of locations X = (x1, . . . , xn) we write z(X) ∼p(z(X)) = N(0, K(X, X)) as a random variable distributed according to the GP with finite-dimensional kernel matrix [K(X, X)]i,j = k(xi, xj). Let y denote an n-vector of binary class labels associated with measurement locations X1. For Gaussian process classification (GPC) [12] the probability that a test point x∗is labeled as class y∗= 1, given training data (X, y), is computed as p(y∗= 1|X, y, x∗) = Ep(z(x∗)|X,y,x∗)  1 1 + exp{−z(x∗)}  (1) p(z(x∗)|X, y, x∗) = Z p(z(x∗)|X, z(X), x∗)p(z(X)|X, y)dz(X). The predictive distribution p(z(x∗)|X, y, x∗) represents a regression on z(x∗) with a complicated observation model y|z. The central observation from Eq. (1) is that we could selectively shrink the prediction p(y∗= 1|X, y, x∗) towards a conservative value 1/2 by selectively shrinking p(z(x∗)|X, y, x∗) closer to a point mass at zero. 3 Heavy-tailed process priors via the Gaussian copula In this section we construct the heavy-tailed stochastic process by transforming a GP. As with the GP, we will treat the new process as a prior on functions. Suppose that diag (K(X, X)) = σ21. We define the heavy-tailed process f(X) with marginal c.d.f. Gb as z(X) ∼N(0, K(X, X)) (2) u(X) = Φ0,σ2(z(X)) (3) f(X) = G−1 b (u(X)) = G−1 b (Φ0,σ2(z(X))). Here the function Φ0,σ2(·) is the c.d.f. of a centered Gaussian with variance σ2. Presently, we only consider the case when Gb is the (continuous) c.d.f. of a heavy-tailed density gb with scale parameter b that is symmetric about the origin. Examples include the Laplace, hyperbolic secant and Student-t distribution. We note that other authors have considered asymmetric or even discrete distributions [2, 11, 16] while Snelson et al. [15] use arbitrary monotonic transformations in place of G−1 b (Φ0,σ2(·)). The process u(X) has the density of a Gaussian copula [10, 16] and is critical in transferring the correlation structure encoded by K(X, X) from z(X) to f(X). If we define 1To improve the clarity of exposition, we only deal with binary classification for now. A full multiclass classification model is used in our experiments. 2 z(f(X)) = Φ−1 0,σ2(Gb(f(X))), it is well known [7, 9, 11, 15, 16] that the density of f(X) satisfies p(f(X)) = Q i=1 gb(f(xi)) |K(X, X)/σ2|1/2 exp  −1 2z(f(X))⊤  K(X, X)−1 −I σ2  z(f(X))  . (4) Observe that if K(X, X) = σ2I then p(f(X)) = Q i=1 gb(f(xi)). Also note that if Gb were chosen to be Gaussian, we would recover the Gaussian process. The predictive distribution p(f(x∗)|X, f(X), x∗) can be interpreted as a Heavy-tailed process regression (HPR). It is easy to see that its computation can be reduced to standard computations in a Gaussian model by nonlinearly transforming observations f(X) into z-space. The predictive distribution in z-space satisfies p(z(x∗)|X, f(X), x∗) = N(µ∗, Σ∗) (5) µ∗= K(x∗, X)K(X, X)−1z(f(X)) (6) Σ∗= K(x∗, x∗) −K(x∗, X)K(X, X)−1K(X, x∗). (7) The corresponding distribution in f-space follows by another change of variables. Having defined the heavy-tailed stochastic process in general we now turn to an analysis of its shrinkage properties. 4 Selective shrinkage By “selective shrinkage” we mean that the degree of shrinkage applied to a collection of estimators varies across estimators. As motivated in Section 2, we are specifically interested in selectively shrinking posterior distributions near isolated observations more strongly than in dense regions. This section shows that we can achieve this by changing the form of prior marginals (heavy-tailed instead of Gaussian) and that this induces stronger selective shrinkage than any GPR could induce. Since HPR uses a GP in its construction, which can induce some selective shrinkage on its own, care must be taken to investigate only the additional benefits the transformation G−1 b (Φ0,σ2(·)) has on shrinkage. For this reason we assume a particular GP prior which leads to a special type of shrinkage in GPR and then check how an HPR model built on top of that GP changes the observed behavior. In this section we provide an idealized analysis that allows us to compare the selective shrinkage obtained by GPR and HPR. Note that we focus on regression in this section so that we can obtain analytical results. We work with n measurement locations, X = (x1, . . . , xn), whose index set {1, . . . , n} can be partitioned into a “dense” set D with |D| = n−1 and a single “sparse” index s /∈ D. Assume that xd = xd′, ∀d, d′ ∈D, so that we may let (without loss of generality) ˜K(xd, xd′) = 1, ∀d ̸= d′ ∈D. We also assert that xd ̸= xs ∀d ∈D and let ˜K(xd, xs) = ˜K(xs, xd) = 0 ∀d ∈D. Assuming that n > 2 we fix the remaining entry ˜K(xs, xs) = ϵ/(ϵ + n −2), for some ϵ > 0. We interpret ϵ as a noise variance and let K = ˜K + ϵI. Denote any distributions computed under the GPR model by pgp(·) and those computed in HPR by php(·). Using K(X, X) = K, define z(X) as in Eq. (2). Let y denote a vector of real-valued measurements for a regression task. The posterior distribution of z(xi) given y, with xi ∈X, is derived by standard Gaussian computations as pgp(z(xi)|X, y) = N µi, σ2 i  µi = ˜K(xi, X)K(X, X)−1y σ2 i = K(xi, xi) −˜K(xi, X)K(X, X)−1 ˜K(X, xi). For our choice of K(X, X) one can show that σ2 d = σ2 s for d ∈D. To ensure that the posterior distributions agree at the two locations we require µd = µs, which holds if measurements y satisfy y ∈Ygp ≜ n y|  ˜K(xd, X) −˜K(xs, X)  K(X, X)−1y = 0 o = ( y X d∈D yd = ys ) . A similar analysis can be carried out for the induced HPR model. By Eqs. (5)–(7) HPR inference leads to identical distributions php(z(xd)|X, y′) = php(z(xs)|X, y′) with d ∈D if measurements y′ in f-space satisfy y′ ∈Yhp ≜ n y′|  ˜K(xd, X) −˜K(xs, X)  K(X, X)−1Φ−1 0,σ2(Gb(y′)) = 0 o =  y′ = G−1 b (Φ0,σ2(y))|y ∈Ygp . 3 −10 0 10 −5 0 5 x Gb −1(Φ(x)) (a) gb(x) = 1 2b exp n −|x| b o −10 0 10 −5 0 5 x Gb −1(Φ(x)) (b) gb(x) = 1 2b sech  πx 2b  −10 0 10 −5 0 5 x Gb −1(Φ(x)) (c) gb(x) = 1 b  2+(x/b)2 3/2 Figure 1: Illustration of G−1 b (Φ0,σ2(x)), for σ2 = 1.0 with Gb the c.d.f. of (a) the Laplace distribution (b) the hyperbolic secant distribution (c) a Student-t inspired distribution, all with scale parameter b. Each plot shows three samples—dotted, dashed, solid—for growing b. As b increases the distributions become heavy-tailed and the gradient of G−1 b (Φ0,σ2(x)) increases. To compare the shrinkage properties of GPR and HPR we analyze select pairs of measurements in Ygp and Yhp. The derivation requires that G−1 b (Φ0,σ2(·)) is strongly concave on (−∞, 0], strongly convex on [0, +∞) and has gradient > 1 on R. To see intuitively why this should hold, note that for Gb with fatter tails than a Gaussian, |G−1 b (Φ0,σ2(x))| should eventually dominate |Φ−1 0,b2(Φ0,σ2(x))| = (b/σ)|x|. Figure 1 demonstrates graphically that the assumption holds for several choices of Gb, provided b is large enough, i.e., that gb has sufficiently heavy tails. Indeed, it can be shown that for scale parameters b > 0, the first and second derivatives of G−1 b (Φ0,σ2(·)) scale linearly with b. Consider a measurement 0 ̸= y ∈Ygp with sign (y(xd)) = sign (y(xd′)) , ∀d, d′ ∈D. Analyzing such y is relevant, as we are most interested in comparing how multiple reinforcing observations at clustered locations and a single isolated observation are absorbed during inference. By definition of Ygp, for d∗= argmaxd∈D|yd| we have |yd∗| < |ys| as long as n > 2. The corresponding element y′ = G−1 b (Φ0,σ2(y)) ∈Yhp then satisfies |y′(xs)| = G−1 b (Φ0,σ2(y(xs))) > G−1 b (Φ0,σ2(y(xd∗))) y(xd∗) y(xs) = y′(xd∗) y(xd∗) y(xs) . (8) Thus HPR inference leads to identical predictive distributions in f-space at the two locations even though the isolated observation y′(xs) has disproportionately larger magnitude than y′(xd∗), relative to the GPR measurements y(xs) and y(xd∗). As this statement holds for any y ∈Ygp satisfying our earlier sign requirement, it indicates that HPR systematically shrinks isolated observations more strongly than GPR. Since the second derivative of G−1 b (Φ0,σ2(·)) scales linearly with scale b > 0, an intuitive connection suggests itself when looking at inequality (8): the heavier the marginal tails, the stronger the inequality and thus the stronger the selective shrinkage effect. The previous derivation exemplifies in an idealized setting that HPR leads to improved shrinkage of predictive distributions near isolated observations. More generally, because GPR transforms measurements only linearly, while HPR additionally pre-transforms measurements nonlinearly, our analysis suggests that for any GPR we can find an HPR model which leads to stronger selective shrinkage. The result has intuitive parallels to the parametric case: just as ℓ1-regularization improves shrinkage of parametric estimators, heavy-tailed processes improve shrinkage of nonparametric estimators. We note that although our analysis kept K(X, X) fixed for GPR and HPR, in practice we are free to tune the kernel to yield a desired scale of predictive distributions. The above analysis has been carried out for regression, but motivates us to now explore heavy-tailed processes in the classification case. 5 Heavy-tailed process classification The derivation of heavy-tailed process classification (HPC) is similar to that of standard multiclass GPC with Laplace approximation in Rasmussen and Williams [12]. However, due to the nonlinear transformations involved, some nice properties of their derivation are lost. We revert notation and let y denote a vector of class labels. For a C-class classification problem with n training points we 4 introduce a vector of nC latent function measurements (f 1 1 , . . . , f 1 n, f 2 1 , . . . , f 2 n, . . . , f C 1 , . . . , f C n )⊤. For each block c ∈{1, . . . , C} of n variables we define an independent heavy-tailed process prior using Eq. (4) with kernel matrix Kc. Equivalently, we can define the prior jointly on f by letting K be a block-diagonal kernel matrix with blocks K1, . . . , KC. Each kernel matrix Kc is defined by a (possibly different) symmetric positive semidefinite kernel with its own set of parameters. The following construction relaxes the earlier condition that diag (K) = σ21 and instead views Φ0,σ2(·) as some nonlinear transformation with parameter σ2. By this relaxation we effectively adopt Liu et al.’s [9] interpretation that Eq. (4) defines the copula. The scale parameters b could in principle vary across the nC variables, but we keep them constant at least within each block of n. Labels y are represented in a 1-of-n form and generated by the following observation model p(yc i = 1|fi) = πc i = exp{f c i } P c′ exp{f c′ i }. (9) For inference we are ultimately interested in computing p(yc ∗= 1|X, y, x∗) = Ep(f∗|X,y,x∗)  exp{f c ∗} P c′ exp{f c′ ∗}  , (10) where f∗= (f 1 ∗, . . . , f C ∗)⊤. The previous section motivates that improved selective shrinkage will occur in p(f∗|X, y, x∗), provided the prior marginals have sufficiently heavy tails. 5.1 Inference As in GPC, most of the intractability lies in computing the predictive distribution p(f∗|X, y, x∗). We use the Laplace approximation to address this issue: a Gaussian approximation to p(z|X, y) is found and then combined with the Gaussian p(z∗|X, z, x∗) to give us an approximation to p(z∗|X, y, x∗). This is then transformed to a (typically non-Gaussian) distribution in f-space using a change of variables. Hence we first seek to find a mode and corresponding Hessian matrix of the log posterior log p(z|X, y). Recalling the relation f = G−1 b (Φ0,σ2(z)), the log posterior can be written as J(z) ≜log p(y|z) + log p(z) = y⊤f − X i log X c exp {f c i )} −1 2z⊤K−1z −1 2 log |K| + const. Let Π be an nC × n matrix of stacked diagonal matrices diag (πc) for n-subvectors πc of π. With W = diag (π) −ΠΠ⊤, the gradients are ∇J(z) = diag  df dz  (y −π) −K−1z ∇2J(z) = diag d2f dz2  diag (y −π) −diag  df dz  Wdiag  df dz  −K−1. Unlike in Rasmussen and Williams [12], −∇2J(z) is not generally positive definite owing to its first term. For that reason we cannot use a Newton step to find the mode and instead resort to a simpler gradient method. Once the mode ˆz has been found we approximate the posterior as p(z|X, y) ≈q(z|X, y) = N ˆz, −∇2J(ˆz)−1 , and use this to approximate the predictive distribution by q(z∗|X, y, x∗) = Z p(z∗|X, z, x∗)q(z|X, y)df. Since we arranged for both distributions in the integral to be Gaussian, the resulting Gaussian can be straightforwardly evaluated. Finally, to approximate the one-dimensional integral with respect to p(f∗|X, y, x∗) in Eq. (10) we could either use a quadrature method, or generate samples from q(z∗|X, y, x∗), convert them to f-space using G−1 b (Φ0,σ2(·)) and then approximate the expectation by an average. We have compared predictions of the latter method with those of a Gibbs sampler; the Laplace approximation matched Gibbs results well, while being much faster to compute. 5 Residue Residue Residue O H N N H C′ O Rotamer r ∈{1, 2, 3} Φ H C′ Ψ Cα (a) Φ Ψ −pi −pi/2 0 pi/2 pi −pi −pi/2 0 pi/2 pi r = 1 r = 2 r = 3 (b) Figure 2: (a) Schematic of a protein segment. The backbone is the sequence of C′, N, Cα, C′, N atoms. An amino-acid-specific sidechain extends from the Cα atom at one of three discrete angles known as “rotamers.” (b) Ramachandran plot of 400 (Φ, Ψ) measurements and corresponding rotamers (by shapes/colors) for amino-acid arginine (arg). The dark shading indicates the sparse region we considered in producing results in Figure 3. Progressively lighter shadings indicate how the sparse region was grown to produce Figure 4. 5.2 Parameter estimation Using a derivation similar to that in [12], we have for ˆf = G−1 b (Φ0,σ2(ˆz)) that the Laplace approximation of the marginal log likelihood is log p(y|x) ≈log q(y|x) = J(ˆz) −1 2 log | −2π∇2J(ˆz)| (11) = y⊤ˆf − X i log X c exp n ˆf c i o −1 2 ˆz⊤K−1ˆz −1 2 log |K| −1 2 log | −∇2J(ˆz)| + const. We optimize kernel parameters θ by taking gradient steps on log q(y|x). The derivative needs to take into account that perturbing the parameters can also perturb the mode ˆz found for the Laplace approximation. At an optimum ∇J(ˆz) must be zero, so that ˆz = Kdiag d ˆf dˆz ! (y −ˆπ), (12) where ˆπ is defined as in Eq. (9) but using ˆf rather than f. Taking derivatives of this equation allows us to compute the gradient dˆz/dθ. Differentiating the marginal likelihood we have d log q(y|x) dθ = (y −ˆπ)⊤diag d ˆf dˆz ! dˆz dθ −dˆz dθ K−1ˆz + 1 2 ˆz⊤K−1 dK dθ K−1ˆz − 1 2tr  K−1 dK dθ  −1 2tr  ∇2J(ˆz)−1 d∇2J(ˆz) dθ  . The remaining gradient computations are straightforward, albeit tedious. In addition to optimizing the kernel parameters, it may also be of interest to optimize the scale parameter b of marginals Gb. Again, differentiating Eq. (12) with respect to b allows us to compute dˆz/db. We note that when perturbing b we change ˆf by changing the underlying mode ˆz as well as by changing the parameter b which is used to compute ˆf from ˆz. Suppressing the detailed computations, the derivative of the marginal log likelihood with respect to b is d log q(y|x) db = (y −ˆπ)⊤d ˆf db −dˆz db ⊤ K−1ˆz −1 2tr  ∇2J(ˆz)−1 d∇2J(ˆz) db  . 6 trp tyr ser phe glu asn leu thr his asp arg cys lys met gln ile val 0 0.2 0.4 0.6 0.8 1 Prediction rate HPC Hyp. sec. HPC Laplace GPC (a) trp tyr ser phe glu asn leu thr his asp arg cys lys met gln ile val 0 0.2 0.4 0.6 0.8 1 Prediction rate HPC Hyp. sec. HPC Laplace GPC (b) Figure 3: Rotamer prediction rates in percent in (a) sparse and (b) dense regions. Both flavors of HPC (hyperbolic secant and Laplace marginals) significantly outperform GPC in sparse regions while performing competitively in dense regions. 6 Experiments To a first approximation, the three-dimensional structure of a folded protein is defined by pairs of continuous backbone angles (Φ, Ψ), one pair for each amino-acid, as well as discrete angles, so-called rotamers, that define the conformations of the amino-acid sidechains that extend from the backbone. The geometry is outlined in Figure 2(a). There is a strong dependence between backbone angles (Φ, Ψ) and rotamer values; this is illustrated in the “Ramachandran plot” shown in Figure 2(b), which plots the backbone angles for each rotamer (indicated by the shapes/colors). The dependence is exploited in computational approaches to protein structure prediction, where estimates of rotamer probabilities given backbone angles are used as one term in an energy function that models native protein states as minima of the energy. Poor estimates of rotamer probabilities in sparse regions can derail the prediction procedure. Indeed, sparsity has been a serious problem in state-of-the-art rotamer models based on kernel density estimates (Roland Dunbrack, personal communication). Unfortunately, we have found that GPC is not immune to the sparsity problem. To evaluate our algorithm we consider rotamer-prediction tasks on the 17 amino-acids (out of 20) that have three rotamers at the first dihedral angle along the sidechain2. Our previous work thus applies with the number of classes C = 3 and the covariates being (Φ, Ψ) angle pairs. Since the input space is a torus we defined GPC and HPC using the following von Mises-inspired kernel for d-dimensional angular data: k(xi, xj) = σ2 exp ( λ d X k=1 cos(xi,k −xj,k) ! −d !) , where xi,k, xj,k ∈[0, 2π] and σ2, λ ≥03. To find good GPC kernel parameters we optimize an ℓ2-regularized version of the Laplace approximation to the log marginal likelihood reported in Eq. 3.44 of [12]. For HPC we let Gb be either the centered Laplace distribution or the hyperbolic secant distribution with scale parameter b. We estimate HPC kernel parameters as well as b by similarly maximizing an ℓ2-regularized form of Eq. (11). In both cases we restricted the algorithms to training sets of only 100 datapoints. Since good regularization parameters for the objectives are not known a priori we train with and test them on a grid for each of the 17 rotameric residues in ten-fold cross-validation. To find good regularization parameters for a particular residue we look up that combination which, averaged over the ten folds of the remaining 16 residues, produced the best test results. Having chosen the regularization constants we report average test results computed in ten-fold cross validation. We evaluate the algorithms on predefined sparse and dense regions in the Ramachandran plot, as indicated by the background shading in Figure 2(b). Across 17 residues the sparse regions usually contained more than 70 measurements (and often more than 150), each of which appears in one of the 10 cross validations. Figure 3 compares the label prediction rates on the dense and sparse 2Residues alanine and glycine are non-discrete while proline has two rotamers at the first dihedral angle. 3The function cos(xi,k −xj,k) = [cos(xi.k), sin(xi,k)][cos(xj.k), sin(xj,k)]⊤is a symmetric positive semi-definite kernel. By Propositions 3.22 (i) and (ii) and Proposition 3.25 in Shawe-Taylor and Cristianini [14], so is k(xi, xj) above. 7 155 246 390 618 980 1554 2463 3906 0.45 0.5 0.55 0.6 0.65 ’Density of test data’ Prediction rate HPC Hyp. sec. HPC Laplace CTGP GPC Figure 4: Average rotamer prediction rate in the sparse region for two flavors of HPC, standard GPC well as CTGP [1] as a function of the average number of points per residue in the sparse region. regions. Averaged over all 17 residues HPC outperforms GPC by 5.79% with Laplace and 7.89% with hyperbolic secant marginals. With Laplace marginals HPC underperforms GPC on only two residues in sparse regions: by 8.22% on glutamine (gln), and by 2.53% on histidine (his). On dense regions HPC lies within 0.5% on 16 residues and only degrades once by 3.64% on his. Using hyperbolic secant marginals HPC often improves GPC by more than 10% on sparse regions and degrades by more than 5% only on cysteine (cys) and his. On dense regions HPC usually performs within 1.5% of GPC. In Figure 4 we show how the average rotamer prediction rate across 17 residues changes for HPC, GPC, as well as CTGP [1] as we grow the sparse region to include more measurements from dense regions. The growth of the sparse region is indicated by progressively lighter shadings in Figure 2(b). As more points are included the significant advantage of HPC lessens. Eventually GPC does marginally better than HPC and much better than CTGP. The values reported in Figure 3 correspond to the dark shaded region, with an average of 155 measurements. 7 Related research Copulas [10] allow convenient modelling of multivariate correlation structures as separate from marginal distributions. Early work by Song [16] used the Gaussian copula to generate complex multivariate distributions by complementing a simple copula form with marginal distributions of choice. Popularity of the Gaussian copula in the financial literature is generally credited to Li [8] who used it to model correlation structure for pairs of random variables with known marginals. More recently, the Gaussian process has been modified in a similar way to ours by Snelson et al. [15]. They demonstrate that posterior distributions can better approximate the true noise distribution if the transformation defining the warped process is learned. Jaimungal and Ng [7] have extended this work to model multiple parallel time series with marginally non-Gaussian stochastic processes. Their work uses a “binding copula” to combine several subordinate copulas into a joint model. Bayesian approaches focusing on estimation of the Gaussian copula covariance matrix for a given dataset are given in [4, 11]. Research also focused on estimation in high-dimensional settings [9]. 8 Conclusions This paper analyzed learning scenarios where outliers are observed in the input space, rather than the output space as commonly discussed in the literature. We illustrated heavy-tailed processes as a straightforward extension of GPs and an economical way to improve the robustness of estimators in sparse regions beyond those of GP-based methods. Importantly, because these processes are based on a GP, they inherit many of its favorable computational properties; predictive inference in regression, for instance, is straightforward. Moreover, because heavy-tailed processes have a parsimonious representation, they can be used as building blocks in more complicated models where currently GPs are used. In this way the benefits of heavy-tailed processes extend to any GP-based model that struggles with covariate shift. Acknowledgements We thank Roland Dunbrack for helpful discussions and providing access to the rotamer datasets. 8 References [1] Tamara Broderick and Robert B. Gramacy. Classification and Categorical Inputs with Treed Gaussian Process Models. Journal of Classification. To appear. [2] Wei Chu and Zoubin Ghahramani. Gaussian Processes for Ordinal Regression. Journal of Machine Learning Research, 6:1019–1041, 2005. [3] Doris Damian, Paul D. Sampson, and Peter Guttorp. Bayesian Estimation of Semi-Parametric Non-Stationary Spatial Covariance Structures. Environmetrics, 12:161–178. [4] Adrian Dobra and Alex Lenkoski. Copula Gaussian Graphical Models. Technical report, Department of Statistics, University of Washington, 2009. [5] Paul W. Goldberg, Christopher K. I. Williams, and Christopher M. Bishop. Regression with Input-dependent Noise: A Gaussian Process Treatment. In Advances in Neural Information Processing Systems, volume 10, pages 493–499. MIT Press, 1998. [6] Robert B. Gramacy and Herbert K. H. Lee. Bayesian Treed Gaussian Process Models with an Application to Computer Modeling. Journal of the American Statistical Association, 2007. [7] Sebastian Jaimungal and Eddie K. Ng. Kernel-based Copula Processes. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases, pages 628–643. Springer-Verlag, 2009. [8] David X. Li. On Default Correlation: A Copula Function Approach. Technical Report 99-07, Riskmetrics Group, New York, April 2000. [9] Han Liu, John Lafferty, and Larry Wasserman. The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:1–37, 2009. [10] Roger B. Nelsen. An Introduction to Copulas. Springer, 1999. [11] Michael Pitt, David Chan, and Robert J. Kohn. Efficient Bayesian Inference for Gaussian Copula Regression Models. Biometrika, 93(3):537–554, 2006. [12] Carl E. Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [13] Alexandra M. Schmidt and Anthony O’Hagan. Bayesian Inference for Nonstationary Spatial Covariance Structure via Spatial Deformations. Journal of the Royal Statistical Society, 65(3):743–758, 2003. Ser. B. [14] John Shawe-Taylor and Nello Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, 2004. [15] Ed Snelson, Carl E. Rasmussen, and Zoubin Ghahramani. Warped Gaussian Processes. In Advances in Neural Information Processing Systems, volume 16, pages 337–344, 2004. [16] Peter Xue-Kun Song. Multivariate Dispersion Models Generated From Gaussian Copula. Scandinavian Journal of Statistics, 27(2):305–320, 2000. 9
2010
175
3,938
A New Probabilistic Model for Rank Aggregation Tao Qin Microsoft Research Asia taoqin@microsoft.com Xiubo Geng Chinese Academy of Sciences xiubogeng@gmail.com Tie-Yan Liu Microsoft Research Asia tyliu@microsoft.com Abstract This paper is concerned with rank aggregation, which aims to combine multiple input rankings to get a better ranking. A popular approach to rank aggregation is based on probabilistic models on permutations, e.g., the Luce model and the Mallows model. However, these models have their limitations in either poor expressiveness or high computational complexity. To avoid these limitations, in this paper, we propose a new model, which is defined with a coset-permutation distance, and models the generation of a permutation as a stagewise process. We refer to the new model as coset-permutation distance based stagewise (CPS) model. The CPS model has rich expressiveness and can therefore be used in versatile applications, because many different permutation distances can be used to induce the coset-permutation distance. The complexity of the CPS model is low because of the stagewise decomposition of the permutation probability and the efficient computation of most coset-permutation distances. We apply the CPS model to supervised rank aggregation, derive the learning and inference algorithms, and empirically study their effectiveness and efficiency. Experiments on public datasets show that the derived algorithms based on the CPS model can achieve state-ofthe-art ranking accuracy, and are much more efficient than previous algorithms. 1 Introduction Rank aggregation aims at combining multiple rankings of objects to generate a better ranking. It is the key problem in many applications. For example, in meta search [1], when users issue a query, the query is sent to several search engines and the rankings given by them are aggregated to generate more comprehensive ranking results. Given the underlying correspondence between ranking and permutation, probabilistic models on permutations, originated in statistics [19, 5, 4], have been widely applied to solve the problems of rank aggregation. Among different models, the Mallows model [15, 6] and the Luce model [14, 18] are the most popular ones. The Mallows model is a distance-based model, which defines the probability of a permutation according to its distance to a location permutation. Due to many applicable permutation distances, the Mallows model has very rich expressiveness, and therefore can be potentially used in many different applications. Its weakness lies in the high computational complexity. In many cases, it requires a time complexity of O(n!) to compute the probability of a single permutation of n objects. This is clearly intractable when we need to rank a large number of objects in real applications. The Luce model is a stagewise model, which decomposes the process of generating a permutation of n objects into n sequential stages. At the k-th stage, an object is selected and assigned to position k 1 according to a probability based on the scores of the unassigned objects. The product of the selection probabilities at all the stages defines the probability of the permutation. The Luce model is highly efficient (with a polynomial time complexity) due to the decomposition. The expressiveness of the Luce model, however, is limited because it is defined on the scores of individual objects and cannot leverage versatile distance measures between permutations. In this paper, we propose a new probabilistic model on permutations, which inherits the advantages of both the Luce model and the Mallows model and avoids their limitations. We refer to the model as coset-permutation distance based stagewise (CPS) model. Different from the Mallows model, the CPS model is a stagewise model. It decomposes the generative process of a permutation π into sequential stages, which makes the efficient computation possible. At the k-th stage, an object is selected and assigned to position k with a certain probability. Different from the Luce model, the CPS model defines the selection probability based on the distance between a location permutation σ and the right coset of π (referred to as coset-permutation distance) at each stage. In this sense, it is also a distance-based model. Because many different permutation distances can be used to induce the coset-permutation distance, the CPS model also has rich expressiveness. Furthermore, the coset-permutation distances induced by many popular permutation distances can be computed with polynomial time complexity, which further ensures the efficiency of the CPS model. We then apply the CPS model to supervised rank aggregation and derive corresponding algorithms for learning and inference of the model. Experiments on public datasets show that the CPS model based algorithms can achieve state-of-the-art ranking accuracy, and are much more efficient than baseline methods based on previous probabilistic models. 2 Background 2.1 Rank Aggregation There are mainly two kinds of rank aggregation, i.e., score-based rank aggregation [17, 16] and order-based rank aggregation [2, 7, 3]. In the former, objects in the input rankings are associated with scores, while in the latter, only the order information of these objects is available. In this work, we focus on the order-based rank aggregation, because it is more popular in real applications [7], and score-based rank aggregation can be easily converted to order-based rank aggregation by ignoring the additional score information [7]. Early methods for rank aggregation are heuristic based. For example, BordaCount [2, 7] and median rank aggregation [8] are simply based on average rank positions or the number of pairwise wins. In the recent literature, probabilistic models on permutations, such as the Mallows model and the Luce model, have been introduced to solve the problem of rank aggregation. Previous studies have shown that the probabilistic model based algorithms can outperform the heuristic methods in many settings. For example, the Mallows model has been shown very effective in both supervised rank aggregation and unsupervised rank aggregation, and the effectiveness of the Luce model has been demonstrated in the context of unsupervised rank aggregation. In the next subsection, we will describe these two models in more detail. 2.2 Probabilistic Models on Permutations In order to better illustrate the probabilistic models on permutations, we first introduce some concepts and notations. Let {1, 2, . . . , n} be a set of objects to be ranked. A ranking/permutation1 π is a bijection from {1, 2, . . . , n} to itself. We use π(i) to denote the position given to object i and π−1(i) to denote the object assigned to position i. We usually write π and π−1 as vectors whose i-th component is π(i) and π−1(i), respectively. We also use the bracket alternative notation to represent a permutation, i.e., π = ⟨π−1(1), π−1(2), . . . , π−1(n)⟩. The collection of all permutations of n objects forms a non-abelian group under composition, called the symmetric group of order n, denoted as Sn. Let Sn−k denote the subgroup of Sn consisting of 1We will interchangeably use the two terms in the paper. 2 all permutations whose first k positions are fixed: Sn−k = {π ∈Sn|π(i) = i, ∀i = 1, . . . , k}. (1) The right coset Sn−kπ = {σπ|σ ∈Sn−k} is a subset of permutations whose top-k objects are exactly the same as in π. In other words, Sn−kπ = {σ|σ ∈Sn, σ−1(i) = π−1(i), ∀i = 1, . . . , k}. We also use Sn−k(⟨i1, i2, . . . , ik⟩) to denote the right coset with object i1 in position 1, i2 in position 2, . . . , and ik in position k. The Mallows model is a distance based probabilistic model on permutations. It uses a permutation distance d on the symmetric group Sn to define the probability of a permutation: P(π|θ, σ) = 1 Z(θ, σ) exp(−θd(π, σ)), (2) where σ ∈Sn is the location permutation, θ ∈R is a dispersion parameter, and Z(θ, σ) = ∑ π∈Sn exp(−θd(π, σ)). (3) There are many well-defined metrics to measure the distance between two permutations, such as Spearman’s rank correlation dr(π, σ) = ∑n i=1(π(i) −σ(i))2, Spearman’s footrule df(π, σ) = ∑n i=1 |π(i) −σ(i)|, and Kendall’s tau dt(π, σ) = ∑n i=1 ∑ j>i 1{πσ−1(i)>πσ−1(j)}, where 1{x} = 1 if x is true and 0 otherwise. One can (and sometimes should) choose different distances for different applications. In this regard, the Mallows model has rich expressiveness. Note that there are n! permutations in Sn. The computation of Z(θ, σ) involves the sum of n! items. Although for some specific distances (such as dt), there exist efficient ways for parameter estimation in the Mallows model, for many other distances (such as dr and df), there is no known efficient method to compute Z(θ, σ) and one has to pay for the high computational complexity of O(n!) [9]. This has greatly limited the application of the Mallows model in real problems. Usually, one has to employ sampling methods such as MCMC to reduce the complexity [12, 11]. This, however, will affect the effectiveness of the model. The Luce model is a stagewise probabilistic model on permutations. It assumes that there is a (hidden) score ωi, i = 1, . . . , n, for each individual object i. To generate a permutation π, firstly the object π−1(1) is assigned to position 1 with probability exp(ωπ−1(1)) ∑n i=1 exp(ωπ−1(i)); secondly the object π−1(2) is assigned to position 2 with probability exp(ωπ−1(2)) ∑n i=2 exp(ωπ−1(i)); the assignment is continued until a complete permutation is formed. In this way, we obtain the permutation probability of π as follows, P(π) = n ∏ i=1 exp(ωπ−1(i)) ∑n j=i exp(ωπ−1(j)). (4) The computation of permutation probability in the Luce model is very efficient, as shown above. Actually the corresponding complexity is in the polynomial order of the number of objects. This is a clear advantage over the Mallows model. However, the Luce model is defined as a specific function of the scores of the objects, and therefore cannot make use of versatile permutation distances. As a result, its expressiveness is not as rich as the Mallows model, which may limit its applications. 3 A New Probabilistic Model As discussed in the above section, both the Mallows and the Luce model have certain advantages and limitations. In this section, we propose a new probabilistic model on permutations, which can inherit their advantages and avoid their limitations. We call this model the coset-permutation distance based stagewise (CPS) model. 3 3.1 The CPS Model As indicated by the name, the CPS model is defined on the basis of the so-called coset-permutation distance. A coset-permutation distance is induced from a permutation distance, as shown in the following definition. Definition 1. Given a permutation distance d, the coset-permutation distance ˆd from a coset Sn−kπ to a target permutation σ is defined as the average distance between the permutations in the coset and the target permutation: ˆd(Sn−kπ, σ) = 1 |Sn−kπ| ∑ τ∈Sn−kπ d(τ, σ), (5) where |Sn−kπ| is the number of permutations in set Sn−kπ. It is easy to verify that if the permutation distance d is right invariant, then the induced cosetpermutation distance ˆd is also right invariant. With the concept of coset-permutation distance, given a dispersion parameter θ ∈R and a location permutation σ ∈Sn, we can define the CPS model as follows. Specifically, the generative process of a permutation π of n objects is decomposed into n sequential stages. As an initialization, all the objects are placed in a working set. At the k-th stage, the task is to select the k-th object in the original permutation π out of the working set. The probability of this selection is defined with the coset-permutation distance between the right coset Sn−kπ and the location permutation σ: exp(−θ ˆd(Sn−kπ, σ)) ∑n j=k exp(−θ ˆd(Sn−k(π, k, j), σ)) , (6) where Sn−k(π, k, j) denotes the right coset including all the permutations that rank objects π−1(1), . . . , π−1(k −1), and π−1(j) in the top k positions respectively. From Eq. (6), we can see that the closer the coset Sn−kπ is to the location permutation σ, the larger the selection probability is. Considering all the n stages, we will obtain the overall probability of generating π, which is shown in the following definition. Definition 2. The CPS model defines the probability of a permutation π conditioned on a dispersion parameter θ and a location permutation σ as: P(π|θ, σ) = n ∏ k=1 exp(−θ ˆd(Sn−kπ, σ)) ∑n j=k exp(−θ ˆd(Sn−k(π, k, j), σ)) , (7) where Sn−k(π, k, j) is defined in the sentence after Eq. (6). It is easy to verify that the probabilities P(π|θ, σ), π ∈Sn defined in the CPS model naturally form a distribution over Sn. That is, for each π ∈Sn, we always have P(π|θ, σ) ≥0, and ∑ π∈Sn P(π|θ, σ) = 1. In rank aggregation, one usually needs to combine multiple input rankings. To deal with this scenario, we further extend the CPS model, following the methodology used in [12]. P(π|θ, σ) = n ∏ i=1 e−∑M m=1 θm ˆd(Sn−iπ,σm) ∑n j=i e−∑M m=1 θm ˆd(Sn−i(π,i,j),σm) , (8) where θ= {θ1, . . . , θM} and σ= {σ1, . . . , σM}. The CPS model defined as above can be computed in a highly efficient manner, as discussed in the following subsection. 3.2 Computational Complexity According to the definition of the CPS model, at the k-th stage, one needs to compute (n −k) coset-permutation distances. At first glance, the complexity of computing each coset-permutation 4 distance is about O((n −k)!), since the coset contains this number of permutations. This is clearly intractable. The good news is that the real complexity for computing the coset-permutation distance induced by several popular permutation distances is much lower than O((n −k)!). Actually, they can be as low as O(n2), according to the following theorem. Theorem 1. The coset-permutation distances induced from Spearman’s rank correlation dr, Spearman’s footrule df, and Kendall’s tau dt can all be computed with a complexity of O(n2). More specifically, for k = 1, 2, . . . , n −2, we have2 ˆdr(Sn−kπ, σ) = k ∑ i=1 (σ(π−1(i)) −i)2 + 1 n −k n ∑ i=k+1 n ∑ j=k+1 (σ(π−1(i)) −j)2, (9) ˆdf(Sn−kπ, σ) = k ∑ i=1 |σ(π−1(i)) −i| + 1 n −k n ∑ i=k+1 n ∑ j=k+1 |σ(π−1(i)) −j|, (10) ˆdt(Sn−kπ, σ) = 1 4(n −k)(n −k −1) + k ∑ i=1 n ∑ j=i+1 1{σ(π−1(i))>σ(π−1(j))}. (11) According to the above theorem, each induced coset-permutation distance can be computed with a time complexity of O(n2). If we compute the CPS model according to Eq. (7), the time complexity will then be O(n4). This is clearly much more efficient than O((n −k)!). Moreover, with careful implementations, the time complexity of O(n4) can be further reduced to O(n2), as indicated by the following theorem. Theorem 2. For the coset distances induced from dr, df and dt, the CPS model in Eq. (7) can be computed with a time complexity of O(n2). 3.3 Relationship with Previous Models The CPS model as defined above has strong connections with both the Luce model and the Mallows model, as shown below. The similarity between the CPS model and the Luce model is that they are both defined in a stagewise manner. This stagewise definition enables efficient inference for both models. The difference between the CPS model and the Luce model lies in that the CPS model has a much richer expressiveness than the Luce model. This is mainly because the CPS model is a distance based model while the Luce model is not. Our experiments in Section 5 show that different distances may be appropriate for different applications and datasets, which means a model with rich expressiveness has the potential to be applied for versatile applications. The similarity between the CPS model and the Mallows model is that they are both based on distances. Actually when the coset-permutation distance in the CPS model is induced by the Kendall’s tau dt, the CPS model is even mathematically equivalent to the Mallows model defined with dt. The major difference between the CPS model and the Mallows model lies in the computational efficiency. The CPS model can be computed efficiently with a polynomial time complexity, as discussed in the previous sub section. However, for most permutation distances, the complexity of the Mallows model is as huge as O(n!).3 According to the above discussions, we can see that the CPS model inherits the advantages of both the Luce model and the Mallows model, and avoids their limitations. 4 Algorithms for Rank Aggregation In this section, we show how to apply the extended CPS model to solve the problem of rank aggregation. Here we take meta search as an example, and consider the supervised case of rank aggregation. That is, given a set of training queries, we need to learn the parameters θ in the CPS model and apply the model with the learned parameters to aggregate rankings for new test queries. 2Note that ˆd(Sn−kπ, σ) = d(π, σ) for k = n −1, n. 3An exception is that for Kendall’s tau distance, the Mallows model can be as efficient as the CPS model because they are mathematically equivalent. 5 Algorithm 1 Sequential inference Input: parameters θ, input rankings σ Inference: 1: Initialize the set of n objects: D = {1, 2, . . . , n}. 2: π−1(1) = arg minj∈D ∑ m θm ˆd(Sn−1(< j >), σm). 3: Remove object π−1(1) from set D. 4: for k = 2 to n (4.1): π−1(k) = arg minj∈D ∑ m θm ˆd ( Sn−k(< π−1(1), . . . , π−1(k −1), j >), σm ) , (4.2): Remove object π−1(k) from set D. 5: end Output: the final ranking π. 4.1 Learning Let D = {(π(l),σ(l))} be the set of training queries, in which π(l) is the ground truth ranking for query ql, and σ(l) is the set of M input rankings. In order to learn the parameters θ in Eq. (8), we employ maximum likelihood estimation. Specifically, the log likelihood of the training data for the CPS model can be written as below, L(θ) = log ∏ l P(π(l)|θ, σ(l)) = ∑ l log P(π(l)|θ, σ(l)) = ∑ l n ∑ k=1   − M ∑ m=1 θm ˆd(Sn−kπ(l), σ(l) m ) −log n ∑ j=k e−∑M m=1 θm ˆ d(Sn−k(π(l),k,j),σ(l) m )   (12) It is not difficult to prove that L(θ) is concave with respect to θ. Therefore, we can use simple optimization techniques like gradient ascent to find the globally optimal θ. 4.2 Inference In the test phase, given a new query and its associated M input rankings, we need to infer a final ranking with the learned parameters θ. A straightforward method is to find the permutation with the largest probability conditioned on the M input rankings, just as the widely-used inference algorithm for the Mallows model [12]. We call the method global inference since it finds the globally most likely one from all possible permutations. The problem with global inference lies in that its complexity is as high as O(n!). As a consequence, it cannot handle applications with a large number of objects to rank. Considering the stagewise definition of the CPS model, we propose a sequential inference algorithm. The algorithm decomposes the inference into n steps. At the k-th step, we select the object j that can minimize the coset-permutation distance ∑ m θm ˆd(Sn−k(⟨π−1(1), . . . , π−1(k −1), j⟩, σm), and put it at the k-th position. The procedure is listed in Algorithm 1. In fact, sequential inference is an approximation of global inference, with a much lower complexity. Theorem 3 shows that the complexity of sequential inference is just O(Mn2). Our experiments in the next section indicate that such an approximation does not hurt the ranking accuracy by much, while significantly speeds up the inference process. Theorem 3. For the coset distance induced from dr, df, and dt, the stagewise inference as shown in Algorithm 1 can be conducted with a time complexity of O(Mn2) . 5 Experimental Results We have performed experiments to test the efficiency and effectiveness of the proposed CPS model. 6 5.1 Settings We take meta search as the target application, and use the LETOR [13] benchmark datasets in the experiments. LETOR is a public collection created for ranking research.4 There are two meta search datasets in LETOR, MQ2007-agg and MQ2008-agg. In addition to using them, we also composed a smaller dataset from MQ2008-agg, referred to as MQ2008-small, by selecting queries with no more than 8 documents from the MQ2008-agg dataset. This small dataset is used to perform detailed investigations on the CPS model and other baseline models. There are three levels of relevance labels in all the datasets: highly relevant, relevant, and irrelevant. We used NDCG [10] as the evaluation measure in our experiments. NDCG is a widely-used IR measure for multi-level relevance judgments. The larger the NDCG value, the better the aggregation accuracy. The 5-fold cross validation strategy was adopted for all the datasets. All the results reported in this section are the average results over the five folds. For the CPS model, we tested two inference methods: global inference (denoted as CPS-G) and sequential inference (denoted as CPS-S). For comparison, we implemented the Mallows model. When applied to supervised rank aggregation, the learning process of the Mallows model is also maximum likelihood estimation. For inference, we chose the permutation with the maximal probability as the final aggregated ranking. The time complexity of both learning and inference of the Mallows model with distance dr and df is O(n!). We also implemented an approximate algorithm as suggested by [12] using MCMC sampling to speed up the learning process. We refer to this approximate algorithm as MallApp. Note that the time complexity of the inference of MallApp is still O(n!) for distance dr and df. Furthermore, as a reference, we also tested a traditional method, BordaCount [1], which is based on majority voting. We did not compare with the Luce model because it is not straightforward to be applied to supervised rank aggregation, as far as we know. Note that Mallows, MallApp and CPS-G cannot handle the large datasets MQ2007-agg and MQ2008-agg, and were only tested on the small dataset MQ2008-small. 5.2 Results First, we report the results of these algorithms on the MQ2008-small dataset. The aggregation accuracies in terms of NDCG are listed in Table 1(a). Note that the accuracy of Mallows(dt) is the same as that of CPS-G(dt) because of the mathematical equivalence of the two models. Therefore, we omit Mallows(dt) in the table. We did not implement the samplingbased learning algorithm for the Mallows model with distance dt, because in this case the learning algorithm has already been efficient enough. From the table, we have the following observations. • For the Mallows model, exact learning is a little better than the approximate learning, especially for distance df. This is in accordance with our intuition. Sampling can improve the efficiency of the algorithm, but also miss some information contained in the original permutation probability space. • For the CPS model, the sequential inference does not lead to much accuracy drop as compared to global inference. For distances df and dr, the CPS model outperforms the Mallows model. For example, when df is used, the CPS model wins the Mallows model by about 0.04 in terms of NDCG@2, which corresponds to a relative improvement of 10%. • For the same model, with different distance functions, the performances differ significantly. This indicates that one should select the most suitable distance for a given application. • All the probabilistic model based methods are better than BordaCount, the heuristic method. In addition to the comparison of aggregation accuracy, we have also logged the running time of each model. For example, on our test machine (with 2.13Ghz CPU and 4GB memory), it took about 12 4The datasets can be downloaded from http://research.microsoft.com/˜letor. 7 Table 1: Results (a) Results on MQ2008-small NDCG @2 @4 @6 @8 BordaCount 0.335 0.421 0.479 0.420 CPS-G(df) 0.392 0.471 0.518 0.446 CPS-S(df) 0.389 0.471 0.517 0.444 Mallows(df) 0.350 0.449 0.490 0.422 MallApp(df) 0.343 0.440 0.491 0.420 CPS-G(dr) 0.387 0.476 0.519 0.443 CPS-S(dr) 0.388 0.478 0.519 0.441 Mallows(dr) 0.333 0.442 0.491 0.420 MallApp(dr) 0.343 0.440 0.490 0.419 CPS-G(dt) 0.414 0.485 0.530 0.451 CPS-S(dt) 0.419 0.489 0.534 0.454 (b) Results on MQ2008-agg and MQ2007-agg on MQ2008-agg NDCG @2 @4 @6 @8 BordaCount 0.281 0.343 0.389 0.372 CPS-S(dt) 0.312 0.379 0.420 0.403 CPS-S(dr) 0.314 0.376 0.419 0.398 CPS-S(df) 0.276 0.352 0.399 0.383 on MQ2007-agg NDCG @2 @4 @6 @8 BordaCount 0.201 0.213 0.225 0.238 CPS-S(dt) 0.298 0.311 0.322 0.335 CPS-S(dr) 0.332 0.341 0.352 0.362 CPS-S(df) 0.298 0.312 0.323 0.336 seconds for CPS-G(df),5 30 seconds for MallApp(df), and 12 hours for Mallows(df) to finish the training process. The inference of the Mallows model based algorithms and the global inference of the CPS model based algorithms took more time than sequential inference of the CPS model, although the difference was not significant (this is mainly because n ≤8 for MQ2008-small). From these results, we can see that the proposed CPS model plus sequential inference is the most efficient one, and its accuracy is also very good as compared to other methods. Second, we report the results on MQ2008-agg and MQ2007-agg in Table 1(b). Note that the results of the Mallows model based algorithms and that of the CPS model with global inference are not available because of the high computational complexity for their learning or inference. The results show that the CPS model with sequential inference outperforms BordaCount, no matter which distance is used. Moreover, the CPS model with dt performs the best on MQ2008-agg, and the model with dr performs the best on MQ2007-agg. This indicates that we can achieve good ranking performance by choosing the most suitable distances for different datasets (and so applications). This provides a side evidence that it is beneficial for a probabilistic model on permutations to have rich expressiveness. To sum up, the experimental results indicate that the CPS model based learning and sequential inference algorithms can achieve state-of-the-art ranking accuracy and are more efficient than other algorithms. 6 Conclusions and Future Work In this paper, we have proposed a new probabilistic model, named the CPS model, on permutations for rank aggregation. The model is based on coset-permutation distance and defined in a stagewise manner. It inherits the advantages of the Luce model (high efficiency) and the Mallows model (rich expressiveness), and avoids their limitations. We have applied the model to supervised rank aggregation and investigated how to perform learning and inference. Experiments on public datasets demonstrate the effectiveness and efficiency of the CPS model. As future work, we plan to investigate the following issues. (1) We have shown that three induced coset-permutation distances can be computed efficiently. We will explore whether other distances also have such properties. (2) We have applied the CPS model to the supervised case of rank aggregation. We will study the unsupervised case. (3) We will investigate other applications of the model, and discuss how to select the most suitable distance for a given application. 5The training process of CPS-G and CPS-S is exactly the same. 8 References [1] J. Aslam and M. Montague. Models for metasearch. In Proceedings of the 24th SIGIR, pages 276–284, 2001. [2] J. A. Aslam and M. Montague. Models for metasearch. In SIGIR ’01: Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval, pages 276–284, New York, NY, USA, 2001. ACM. [3] M. Beg. Parallel Rank Aggregation for the World Wide Web. World Wide Web. Kluwer Academic Publishers, 6(1):5–22, 2004. [4] D. Critchlow. Metric methods for analyzing partially ranked data. 1980. [5] H. Daniels. Rank correlation and population models. Journal of the Royal Statistical Society. Series B (Methodological), pages 171–191, 1950. [6] P. Diaconis. Group representations in probability and statistics. Institute of Mathematical Statistics Hayward, CA, 1988. [7] C. Dwork, R. Kumar, M. Naor, and D. Sivakumar. Rank aggregation methods for the web. In WWW ’01: Proceedings of the 10th international conference on World Wide Web, pages 613–622, New York, NY, USA, 2001. ACM. [8] R. Fagin, R. Kumar, and D. Sivakumar. Efficient similarity search and classification via rank aggregation. In SIGMOD ’03: Proceedings of the 2003 ACM SIGMOD international conference on Management of data, pages 301–312, New York, NY, USA, 2003. ACM. [9] M. Fligner and J. Verducci. Distance based ranking models. Journal of the Royal Statistical Society. Series B (Methodological), 48(3):359–369, 1986. [10] J. Kalervo and K. Kek¨al¨ainen. Cumulated gain-based evaluation of ir techniques. ACM Trans. Inf. Syst., 20(4):422–446, 2002. [11] A. Klementiev, D. Roth, and K. Small. Unsupervised rank aggregation with distance-based models. In Proceedings of the 25th ICML, pages 472–479, 2008. [12] G. Lebanon and J. Lafferty. Cranking: Combining rankings using conditional probability models on permutations. In ICML2002, pages 363–370, 2002. [13] T. Liu, J. Xu, T. Qin, W. Xiong, and H. Li. LETOR: Benchmark dataset for research on learning to rank for information retrieval. In SIGIR2007 Workshop on Learning to Rank for Information Retrieval, pages 3–10, 2007. [14] R. D. Luce. Individual Choice Behavior. Wiley, 1959. [15] C. L. Mallows. Non-null ranking models. Biometrika, 44:114–130, 1957. [16] R. Manmatha, T. Rath, and F. Feng. Modeling score distributions for combining the outputs of search engines. In SIGIR ’01: Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval, pages 267–275, New York, NY, USA, 2001. ACM. [17] M. Montague and J. A. Aslam. Relevance score normalization for metasearch. In CIKM ’01: Proceedings of the tenth international conference on Information and knowledge management, pages 427–433, New York, NY, USA, 2001. ACM. [18] R. L. Plackett. The analysis of permutations. Applied Statistics, 24(2):193–202, 1975. [19] L. Thurstone. A law of comparative judgment. Psychological review, 34(4):273–286, 1927. 9
2010
176
3,939
Learning Networks of Stochastic Differential Equations Jos´e Bento Department of Electrical Engineering Stanford University Stanford, CA 94305 jbento@stanford.edu Morteza Ibrahimi Department of Electrical Engineering Stanford University Stanford, CA 94305 ibrahimi@stanford.edu Andrea Montanari Department of Electrical Engineering and Statistics Stanford University Stanford, CA 94305 montanari@stanford.edu Abstract We consider linear models for stochastic dynamics. To any such model can be associated a network (namely a directed graph) describing which degrees of freedom interact under the dynamics. We tackle the problem of learning such a network from observation of the system trajectory over a time interval T. We analyze the ℓ1-regularized least squares algorithm and, in the setting in which the underlying network is sparse, we prove performance guarantees that are uniform in the sampling rate as long as this is sufficiently high. This result substantiates the notion of a well defined ‘time complexity’ for the network inference problem. keywords: Gaussian processes, model selection and structure learning, graphical models, sparsity and feature selection. 1 Introduction and main results Let G = (V, E) be a directed graph with weight A0 ij ∈R associated to the directed edge (j, i) from j ∈V to i ∈V . To each node i ∈V in this network is associated an independent standard Brownian motion bi and a variable xi taking values in R and evolving according to dxi(t) = X j∈∂+i A0 ijxj(t) dt + dbi(t) , where ∂+i = {j ∈V : (j, i) ∈E} is the set of ‘parents’ of i. Without loss of generality we shall take V = [p] ≡{1, . . . , p}. In words, the rate of change of xi is given by a weighted sum of the current values of its neighbors, corrupted by white noise. In matrix notation, the same system is then represented by dx(t) = A0x(t) dt + db(t) , (1) with x(t) ∈Rp, b(t) a p-dimensional standard Brownian motion and A0 ∈Rp×p a matrix with entries {A0 ij}i,j∈[p] whose sparsity pattern is given by the graph G. We assume that the linear system ˙x(t) = A0x(t) is stable (i.e. that the spectrum of A0 is contained in {z ∈C : Re(z) < 0}). Further, we assume that x(t = 0) is in its stationary state. More precisely, x(0) is a Gaussian random variable 1 independent of b(t), distributed according to the invariant measure. Under the stability assumption, this a mild restriction, since the system converges exponentially to stationarity. A portion of time length T of the system trajectory {x(t)}t∈[0,T ] is observed and we ask under which conditions these data are sufficient to reconstruct the graph G (i.e., the sparsity pattern of A0). We are particularly interested in computationally efficient procedures, and in characterizing the scaling of the learning time for large networks. Can the network structure be learnt in a time scaling linearly with the number of its degrees of freedom? As an example application, chemical reactions can be conveniently modeled by systems of nonlinear stochastic differential equations, whose variables encode the densities of various chemical species [1, 2]. Complex biological networks might involve hundreds of such species [3], and learning stochastic models from data is an important (and challenging) computational task [4]. Considering one such chemical reaction network in proximity of an equilibrium point, the model (1) can be used to trace fluctuations of the species counts with respect to the equilibrium values. The network G would represent in this case the interactions between different chemical factors. Work in this area focused so-far on low-dimensional networks, i.e. on methods that are guaranteed to be correct for fixed p, as T →∞, while we will tackle here the regime in which both p and T diverge. Before stating our results, it is useful to stress a few important differences with respect to classical graphical model learning problems: (i) Samples are not independent. This can (and does) increase the sample complexity. (ii) On the other hand, infinitely many samples are given as data (in fact a collection indexed by the continuous parameter t ∈[0, T]). Of course one can select a finite subsample, for instance at regularly spaced times {x(i η)}i=0,1,.... This raises the question as to whether the learning performances depend on the choice of the spacing η. (iii) In particular, one expects that choosing η sufficiently large as to make the configurations in the subsample approximately independent can be harmful. Indeed, the matrix A0 contains more information than the stationary distribution of the above process (1), and only the latter can be learned from independent samples. (iv) On the other hand, letting η →0, one can produce an arbitrarily large number of distinct samples. However, samples become more dependent, and intuitively one expects that there is limited information to be harnessed from a given time interval T. Our results confirm in a detailed and quantitative way these intuitions. 1.1 Results: Regularized least squares Regularized least squares is an efficient and well-studied method for support recovery. We will discuss relations with existing literature in Section 1.3. In the present case, the algorithm reconstructs independently each row of the matrix A0. The rth row, A0 r, is estimated by solving the following convex optimization problem for Ar ∈Rp minimize L(Ar; {x(t)}t∈[0,T ]) + λ∥Ar∥1 , (2) where the likelihood function L is defined by L(Ar; {x(t)}t∈[0,T ]) = 1 2T Z T 0 (A∗ rx(t))2 dt −1 T Z T 0 (A∗ rx(t)) dxr(t) . (3) (Here and below M ∗denotes the transpose of matrix/vector M.) To see that this likelihood function is indeed related to least squares, one can formally write ˙xr(t) = dxr(t)/dt and complete the square for the right hand side of Eq. (3), thus getting the integral R (A∗ rx(t) −˙xr(t))2dt − R ˙xr(t)2 dt. The first term is a sum of square residuals, and the second is independent of A. Finally the ℓ1 regularization term in Eq. (2) has the role of shrinking to 0 a subset of the entries Aij thus effectively selecting the structure. Let S0 be the support of row A0 r, and assume |S0| ≤k. We will refer to the vector sign(A0 r) as to the signed support of A0 r (where sign(0) = 0 by convention). Let λmax(M) and λmin(M) stand for 2 the maximum and minimum eigenvalue of a square matrix M respectively. Further, denote by Amin the smallest absolute value among the non-zero entries of row A0 r. When stable, the diffusion process (1) has a unique stationary measure which is Gaussian with covariance Q0 ∈Rp×p given by the solution of Lyapunov’s equation [5] A0Q0 + Q0(A0)∗+ I = 0. (4) Our guarantee for regularized least squares is stated in terms of two properties of the covariance Q0 and one assumption on ρmin(A0) (given a matrix M, we denote by ML,R its submatrix ML,R ≡ (Mij)i∈L,j∈R): (a) We denote by Cmin ≡λmin(Q0 S0,S0) the minimum eigenvalue of the restriction of Q0 to the support S0 and assume Cmin > 0. (b) We define the incoherence parameter α by letting |||Q0 (S0)C,S0 Q0 S0,S0 −1 |||∞= 1 −α, and assume α > 0. (Here ||| · |||∞is the operator sup norm.) (c) We define ρmin(A0) = −λmax((A0 + A0∗)/2) and assume ρmin(A0) > 0. Note this is a stronger form of stability assumption. Our main result is to show that there exists a well defined time complexity, i.e. a minimum time interval T such that, observing the system for time T enables us to reconstruct the network with high probability. This result is stated in the following theorem. Theorem 1.1. Consider the problem of learning the support S0 of row A0 r of the matrix A0 from a sample trajectory {x(t)}t∈[0,T ] distributed according to the model (1). If T > 104k2(k ρmin(A0)−2 + A−2 min) α2ρmin(A0)C2 min log 4pk δ  , (5) then there exists λ such that ℓ1-regularized least squares recovers the signed support of A0 r with probability larger than 1 −δ. This is achieved by taking λ = p 36 log(4p/δ)/(Tα2ρmin(A0)) . The time complexity is logarithmic in the number of variables and polynomial in the support size. Further, it is roughly inversely proportional to ρmin(A0), which is quite satisfying conceptually, since ρmin(A0)−1 controls the relaxation time of the mixes. 1.2 Overview of other results So far we focused on continuous-time dynamics. While, this is useful in order to obtain elegant statements, much of the paper is in fact devoted to the analysis of the following discrete-time dynamics, with parameter η > 0: x(t) = x(t −1) + ηA0x(t −1) + w(t), t ∈N0 . (6) Here x(t) ∈Rp is the vector collecting the dynamical variables, A0 ∈Rp×p specifies the dynamics as above, and {w(t)}t≥0 is a sequence of i.i.d. normal vectors with covariance η Ip×p (i.e. with independent components of variance η). We assume that consecutive samples {x(t)}0≤t≤n are given and will ask under which conditions regularized least squares reconstructs the support of A0. The parameter η has the meaning of a time-step size. The continuous-time model (1) is recovered, in a sense made precise below, by letting η →0. Indeed we will prove reconstruction guarantees that are uniform in this limit as long as the product nη (which corresponds to the time interval T in the previous section) is kept constant. For a formal statement we refer to Theorem 3.1. Theorem 1.1 is indeed proved by carefully controlling this limit. The mathematical challenge in this problem is related to the fundamental fact that the samples {x(t)}0≤t≤n are dependent (and strongly dependent as η →0). Discrete time models of the form (6) can arise either because the system under study evolves by discrete steps, or because we are subsampling a continuous time system modeled as in Eq. (1). Notice that in the latter case the matrices A0 appearing in Eq. (6) and (1) coincide only to the zeroth order in η. Neglecting this technical complication, the uniformity of our reconstruction guarantees as η →0 has an appealing interpretation already mentioned above. Whenever the samples spacing is not too large, the time complexity (i.e. the product nη) is roughly independent of the spacing itself. 3 1.3 Related work A substantial amount of work has been devoted to the analysis of ℓ1 regularized least squares, and its variants [6, 7, 8, 9, 10]. The most closely related results are the one concerning high-dimensional consistency for support recovery [11, 12]. Our proof follows indeed the line of work developed in these papers, with two important challenges. First, the design matrix is in our case produced by a stochastic diffusion, and it does not necessarily satisfies the irrepresentability conditions used by these works. Second, the observations are not corrupted by i.i.d. noise (since successive configurations are correlated) and therefore elementary concentration inequalities are not sufficient. Learning sparse graphical models via ℓ1 regularization is also a topic with significant literature. In the Gaussian case, the graphical LASSO was proposed to reconstruct the model from i.i.d. samples [13]. In the context of binary pairwise graphical models, Ref. [11] proves high-dimensional consistency of regularized logistic regression for structural learning, under a suitable irrepresentability conditions on a modified covariance. Also this paper focuses on i.i.d. samples. Most of these proofs builds on the technique of [12]. A naive adaptation to the present case allows to prove some performance guarantee for the discrete-time setting. However the resulting bounds are not uniform as η →0 for nη = T fixed. In particular, they do not allow to prove an analogous of our continuous time result, Theorem 1.1. A large part of our effort is devoted to producing more accurate probability estimates that capture the correct scaling for small η. Similar issues were explored in the study of stochastic differential equations, whereby one is often interested in tracking some slow degrees of freedom while ‘averaging out’ the fast ones [14]. The relevance of this time-scale separation for learning was addressed in [15]. Let us however emphasize that these works focus once more on system with a fixed (small) number of dimensions p. Finally, the related topic of learning graphical models for autoregressive processes was studied recently in [16, 17]. The convex relaxation proposed in these papers is different from the one developed here. Further, no model selection guarantee was proved in [16, 17]. 2 Illustration of the main results It might be difficult to get a clear intuition of Theorem 1.1, mainly because of conditions (a) and (b), which introduce parameters Cmin and α. The same difficulty arises with analogous results on the high-dimensional consistency of the LASSO [11, 12]. In this section we provide concrete illustration both via numerical simulations, and by checking the condition on specific classes of graphs. 2.1 Learning the laplacian of graphs with bounded degree Given a simple graph G = (V, E) on vertex set V = [p], its laplacian ∆G is the symmetric p × p matrix which is equal to the adjacency matrix of G outside the diagonal, and with entries ∆G ii = −deg(i) on the diagonal [18]. (Here deg(i) denotes the degree of vertex i.) It is well known that ∆G is negative semidefinite, with one eigenvalue equal to 0, whose multiplicity is equal to the number of connected components of G. The matrix A0 = −m I + ∆G fits into the setting of Theorem 1.1 for m > 0. The corresponding model (1.1) describes the over-damped dynamics of a network of masses connected by springs of unit strength, and connected by a spring of strength m to the origin. We obtain the following result. Theorem 2.1. Let G be a simple connected graph of maximum vertex degree k and consider the model (1.1) with A0 = −m I + ∆G where ∆G is the laplacian of G and m > 0. If T ≥2 · 105k2 k + m m 5 (k + m2) log 4pk δ  , (7) then there exists λ such that ℓ1-regularized least squares recovers the signed support of A0 r with probability larger than 1 −δ. This is achieved by taking λ = p 36(k + m)2 log(4p/δ)/(Tm3). In other words, for m bounded away from 0 and ∞, regularized least squares regression correctly reconstructs the graph G from a trajectory of time length which is polynomial in the degree and logarithmic in the system size. Notice that once the graph is known, the laplacian ∆G is uniquely determined. Also, the proof technique used for this example is generalizable to other graphs as well. 4 0 50 100 150 200 250 300 350 400 450 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 T = n η Probability of success p = 16 p = 32 p = 64 p = 128 p = 256 p = 512 10 1 10 2 10 3 1200 1400 1600 1800 2000 2200 2400 2600 2800 p Min. # of samples for success prob. = 0.9 Figure 1: (left) Probability of success vs. length of the observation interval nη. (right) Sample complexity for 90% probability of success vs. p. 2.2 Numerical illustrations In this section we present numerical validation of the proposed method on synthetic data. The results confirm our observations in Theorems 1.1 and 3.1, below, namely that the time complexity scales logarithmically with the number of nodes in the network p, given a constant maximum degree. Also, the time complexity is roughly independent of the sampling rate. In Fig. 1 and 2 we consider the discrete-time setting, generating data as follows. We draw A0 as a random sparse matrix in {0, 1}p×p with elements chosen independently at random with P(A0 ij = 1) = k/p, k = 5. The process xn 0 ≡{x(t)}0≤t≤n is then generated according to Eq. (6). We solve the regularized least square problem (the cost function is given explicitly in Eq. (8) for the discrete-time case) for different values of n, the number of observations, and record if the correct support is recovered for a random row r using the optimum value of the parameter λ. An estimate of the probability of successful recovery is obtained by repeating this experiment. Note that we are estimating here an average probability of success over randomly generated matrices. The left plot in Fig.1 depicts the probability of success vs. nη for η = 0.1 and different values of p. Each curve is obtained using 211 instances, and each instance is generated using a new random matrix A0. The right plot in Fig.1 is the corresponding curve of the sample complexity vs. p where sample complexity is defined as the minimum value of nη with probability of success of 90%. As predicted by Theorem 2.1 the curve shows the logarithmic scaling of the sample complexity with p. In Fig. 2 we turn to the continuous-time model (1). Trajectories are generated by discretizing this stochastic differential equation with step δ much smaller than the sampling rate η. We draw random matrices A0 as above and plot the probability of success for p = 16, k = 4 and different values of η, as a function of T. We used 211 instances for each curve. As predicted by Theorem 1.1, for a fixed observation interval T, the probability of success converges to some limiting value as η →0. 3 Discrete-time model: Statement of the results Consider a system evolving in discrete time according to the model (6), and let xn 0 ≡{x(t)}0≤t≤n be the observed portion of the trajectory. The rth row A0 r is estimated by solving the following convex optimization problem for Ar ∈Rp minimize L(Ar; xn 0) + λ∥Ar∥1 , (8) where L(Ar; xn 0) ≡ 1 2η2n n−1 X t=0 {xr(t + 1) −xr(t) −η A∗ rx(t)}2 . (9) Apart from an additive constant, the η →0 limit of this cost function can be shown to coincide with the cost function in the continuous time case, cf. Eq. (3). Indeed the proof of Theorem 1.1 will amount to a more precise version of this statement. Furthermore, L(Ar; xn 0) is easily seen to be the log-likelihood of Ar within model (6). 5 0 50 100 150 200 250 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 T = n η Probability of success η = 0.04 η = 0.06 η = 0.08 η = 0.1 η = 0.14 η = 0.18 η = 0.22 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 η Probability of success Figure 2: (right)Probability of success vs. length of the observation interval nη for different values of η. (left) Probability of success vs. η for a fixed length of the observation interval, (nη = 150) . The process is generated for a small value of η and sampled at different rates. As before, we let S0 be the support of row A0 r, and assume |S0| ≤k. Under the model (6) x(t) has a Gaussian stationary state distribution with covariance Q0 determined by the following modified Lyapunov equation A0Q0 + Q0(A0)∗+ ηA0Q0(A0)∗+ I = 0 . (10) It will be clear from the context whether A0/Q0 refers to the dynamics/stationary matrix from the continuous or discrete time system. We assume conditions (a) and (b) introduced in Section 1.1, and adopt the notations already introduced there. We use as a shorthand notation σmax ≡σmax(I+η A0) where σmax(.) is the maximum singular value. Also define D ≡ 1 −σmax  /η . We will assume D > 0. As in the previous section, we assume the model (6) is initiated in the stationary state. Theorem 3.1. Consider the problem of learning the support S0 of row A0 r from the discrete-time trajectory {x(t)}0≤t≤n. If nη > 104k2(kD−2 + A−2 min) α2DC2 min log 4pk δ  , (11) then there exists λ such that ℓ1-regularized least squares recovers the signed support of A0 r with probability larger than 1 −δ. This is achieved by taking λ = p (36 log(4p/δ))/(Dα2nη). In other words the discrete-time sample complexity, n, is logarithmic in the model dimension, polynomial in the maximum network degree and inversely proportional to the time spacing between samples. The last point is particularly important. It enables us to derive the bound on the continuoustime sample complexity as the limit η →0 of the discrete-time sample complexity. It also confirms our intuition mentioned in the Introduction: although one can produce an arbitrary large number of samples by sampling the continuous process with finer resolutions, there is limited amount of information that can be harnessed from a given time interval [0, T]. 4 Proofs In the following we denote by X ∈Rn×p the matrix whose (t + 1)th column corresponds to the configuration x(t), i.e. X = [x(0), x(1), . . . , x(n −1)]. Further ∆X ∈Rn×p is the matrix containing configuration changes, namely ∆X = [x(1) −x(0), . . . , x(n) −x(n −1)]. Finally we write W = [w(1), . . . , w(n −1)] for the matrix containing the Gaussian noise realization. Equivalently, W = ∆X −ηA X . The rth row of W is denoted by Wr. In order to lighten the notation, we will omit the reference to xn 0 in the likelihood function (9) and simply write L(Ar). We define its normalized gradient and Hessian by bG = −∇L(A0 r) = 1 nη XW ∗ r , bQ = ∇2L(A0 r) = 1 nXX∗. (12) 6 4.1 Discrete time In this Section we outline our prove for our main result for discrete-time dynamics, i.e., Theorem 3.1. We start by stating a set of sufficient conditions for regularized least squares to work. Then we present a series of concentration lemmas to be used to prove the validity of these conditions, and finally we sketch the outline of the proof. As mentioned, the proof strategy, and in particular the following proposition which provides a compact set of sufficient conditions for the support to be recovered correctly is analogous to the one in [12]. A proof of this proposition can be found in the supplementary material. Proposition 4.1. Let α, Cmin > 0 be be defined by λmin(Q0 S0,S0) ≡Cmin , |||Q0 (S0)C,S0 Q0 S0,S0 −1 |||∞≡1 −α . (13) If the following conditions hold then the regularized least square solution (8) correctly recover the signed support sign(A0 r): ∥bG∥∞≤λα 3 , ∥bGS0∥∞≤AminCmin 4k −λ, (14) ||| bQ(S0)C,S0 −Q0 (S0)C,S0|||∞≤α 12 Cmin √ k , ||| bQS0,S0 −Q0 S0,S0|||∞≤α 12 Cmin √ k . (15) Further the same statement holds for the continuous model 3, provided bG and bQ are the gradient and the hessian of the likelihood (3). The proof of Theorem 3.1 consists in checking that, under the hypothesis (11) on the number of consecutive configurations, conditions (14) to (15) will hold with high probability. Checking these conditions can be regarded in turn as concentration-of-measure statements. Indeed, if expectation is taken with respect to a stationary trajectory, we have E{ bG} = 0, E{ bQ} = Q0. 4.1.1 Technical lemmas In this section we will state the necessary concentration lemmas for proving Theorem 3.1. These are non-trivial because bG, bQ are quadratic functions of dependent random variables the samples {x(t)}0≤t≤n  . The proofs of Proposition 4.2, of Proposition 4.3, and Corollary 4.4 can be found in the supplementary material provided. Our first Proposition implies concentration of bG around 0. Proposition 4.2. Let S ⊆[p] be any set of vertices and ǫ < 1/2. If σmax ≡σmax(I + η A0) < 1, then P  ∥bGS∥∞> ǫ ≤2|S| e−n(1−σmax) ǫ2/4. (16) We furthermore need to bound the matrix norms as per (15) in proposition 4.1. First we relate bounds on ||| bQJS −Q0 JS|||∞with bounds on | bQij −Q0 ij|, (i ∈J, i ∈S) where J and S are any subsets of {1, ..., p}. We have, P(||| bQJS −Q0 JS)|||∞> ǫ) ≤|J||S| max i,j∈J P(| bQij −Q0 ij| > ǫ/|S|). (17) Then, we bound | bQij −Q0 ij| using the following proposition Proposition 4.3. Let i, j ∈{1, ..., p}, σmax ≡σmax(I + ηA0) < 1, T = ηn > 3/D and 0 < ǫ < 2/D where D = (1 −σmax)/η then, P(| bQij −Q0 ij)| > ǫ) ≤2e− n 32η2 (1−σmax)3ǫ2 . (18) Finally, the next corollary follows from Proposition 4.3 and Eq. (17). Corollary 4.4. Let J, S (|S| ≤k) be any two subsets of {1, ..., p} and σmax ≡σmax(I +ηA0) < 1, ǫ < 2k/D and nη > 3/D (where D = (1 −σmax)/η) then, P(||| bQJS −Q0 JS|||∞> ǫ) ≤2|J|ke− n 32k2η2 (1−σmax)3ǫ2 . (19) 7 4.1.2 Outline of the proof of Theorem 3.1 With these concentration bounds we can now easily prove Theorem 3.1. All we need to do is to compute the probability that the conditions given by Proposition 4.1 hold. From the statement of the theorem we have that the first two conditions (α, Cmin > 0) of Proposition 4.1 hold. In order to make the first condition on bG imply the second condition on bG we assume that λα/3 ≤ (AminCmin)/(4k) −λ which is guaranteed to hold if λ ≤AminCmin/8k. (20) We also combine the two last conditions on bQ, thus obtaining the following ||| bQ[p],S0 −Q0 [p],S0|||∞≤α 12 Cmin √ k , (21) since [p] = S0 ∪(S0)C. We then impose that both the probability of the condition on bQ failing and the probability of the condition on bG failing are upper bounded by δ/2 using Proposition 4.2 and Corollary 4.4. It is shown in the supplementary material that this is satisfied if condition (11) holds. 4.2 Outline of the proof of Theorem 1.1 To prove Theorem 1.1 we recall that Proposition 4.1 holds provided the appropriate continuous time expressions are used for bG and bQ, namely bG = −∇L(A0 r) = 1 T Z T 0 x(t) dbr(t) , bQ = ∇2L(A0 r) = 1 T Z T 0 x(t)x(t)∗dt . (22) These are of course random variables. In order to distinguish these from the discrete time version, we will adopt the notation bGn, bQn for the latter. We claim that these random variables can be coupled (i.e. defined on the same probability space) in such a way that bGn →bG and bQn →bQ almost surely as n →∞for fixed T. Under assumption (5), it is easy to show that (11) holds for all n > n0 with n0 a sufficiently large constant (for a proof see the provided supplementary material). Therefore, by the proof of Theorem 3.1, the conditions in Proposition 4.1 hold for gradient bGn and hessian bQn for any n ≥n0, with probability larger than 1 −δ. But by the claimed convergence bGn →bG and bQn →bQ, they hold also for bG and bQ with probability at least 1 −δ which proves the theorem. We are left with the task of showing that the discrete and continuous time processes can be coupled in such a way that bGn →bG and bQn →bQ. With slight abuse of notation, the state of the discrete time system (6) will be denoted by x(i) where i ∈N and the state of continuous time system (1) by x(t) where t ∈R. We denote by Q0 the solution of (4) and by Q0(η) the solution of (10). It is easy to check that Q0(η) →Q0 as η →0 by the uniqueness of stationary state distribution. The initial state of the continuous time system x(t = 0) is a N(0, Q0) random variable independent of b(t) and the initial state of the discrete time system is defined to be x(i = 0) = (Q0(η))1/2(Q0)−1/2x(t = 0). At subsequent times, x(i) and x(t) are assumed are generated by the respective dynamical systems using the same matrix A0 using common randomness provided by the standard Brownian motion {b(t)}0≤t≤T in Rp. In order to couple x(t) and x(i), we construct w(i), the noise driving the discrete time system, by letting w(i) ≡(b(Ti/n) −b(T(i −1)/n)). The almost sure convergence bGn →bG and bQn →bQ follows then from standard convergence of random walk to Brownian motion. Acknowledgments This work was partially supported by a Terman fellowship, the NSF CAREER award CCF-0743978 and the NSF grant DMS-0806211 and by a Portuguese Doctoral FCT fellowship. 8 References [1] D.T. Gillespie. Stochastic simulation of chemical kinetics. Annual Review of Physical Chemistry, 58:35–55, 2007. [2] D. Higham. Modeling and Simulating Chemical Reactions. SIAM Review, 50:347–368, 2008. [3] N.D.Lawrence et al., editor. Learning and Inference in Computational Systems Biology. MIT Press, 2010. [4] T. Toni, D. Welch, N. Strelkova, A. Ipsen, and M.P.H. Stumpf. Modeling and Simulating Chemical Reactions. J. R. Soc. Interface, 6:187–202, 2009. [5] K. Zhou, J.C. Doyle, and K. Glover. Robust and optimal control. Prentice Hall, 1996. [6] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), 58(1):267–288, 1996. [7] D.L. Donoho. For most large underdetermined systems of equations, the minimal l1-norm near-solution approximates the sparsest near-solution. Communications on Pure and Applied Mathematics, 59(7):907–934, 2006. [8] D.L. Donoho. For most large underdetermined systems of linear equations the minimal l1norm solution is also the sparsest solution. Communications on Pure and Applied Mathematics, 59(6):797–829, 2006. [9] T. Zhang. Some sharp performance bounds for least squares regression with L1 regularization. Annals of Statistics, 37:2109–2144, 2009. [10] M.J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using l1constrained quadratic programming (Lasso). IEEE Trans. Information Theory, 55:2183–2202, 2009. [11] M.J. Wainwright, P. Ravikumar, and J.D. Lafferty. High-Dimensional Graphical Model Selection Using l-1-Regularized Logistic Regression. Advances in Neural Information Processing Systems, 19:1465, 2007. [12] P. Zhao and B. Yu. On model selection consistency of Lasso. The Journal of Machine Learning Research, 7:2541–2563, 2006. [13] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432, 2008. [14] K. Ball, T.G. Kurtz, L. Popovic, and G. Rempala. Modeling and Simulating Chemical Reactions. Ann. Appl. Prob., 16:1925–1961, 2006. [15] G.A. Pavliotis and A.M. Stuart. Parameter estimation for multiscale diffusions. J. Stat. Phys., 127:741–781, 2007. [16] J. Songsiri, J. Dahl, and L. Vandenberghe. Graphical models of autoregressive processes. pages 89–116, 2010. [17] J. Songsiri and L. Vandenberghe. Topology selection in graphical models of autoregressive processes. Journal of Machine Learning Research, 2010. submitted. [18] F.R.K. Chung. Spectral Graph Theory. CBMS Regional Conference Series in Mathematics, 1997. [19] P. Ravikumar, M.J. Wainwright, and J. Lafferty. High-dimensional Ising model selection using l1-regularized logistic regression. Annals of Statistics, 2008. 9
2010
177
3,940
Predictive Subspace Learning for Multi-view Data: a Large Margin Approach Ning Chen†‡ Jun Zhu‡ Eric P. Xing‡ †chenn07@mails.tsinghua.edu.cn, ‡{ningchen,junzhu,epxing}@cs.cmu.edu †Dept. of CS & T, TNList Lab, State Key Lab of ITS, Tsinghua University, Beijing 100084 China ‡School of Computer Science, Carnegie Mellon University, Pittsburgh, PA 15213 USA Abstract Learning from multi-view data is important in many applications, such as image classification and annotation. In this paper, we present a large-margin learning framework to discover a predictive latent subspace representation shared by multiple views. Our approach is based on an undirected latent space Markov network that fulfills a weak conditional independence assumption that multi-view observations and response variables are independent given a set of latent variables. We provide efficient inference and parameter estimation methods for the latent subspace model. Finally, we demonstrate the advantages of large-margin learning on real video and web image data for discovering predictive latent representations and improving the performance on image classification, annotation and retrieval. 1 Introduction In many scientific and engineering applications, such as image annotation [28] and web-page classification [6], the available data usually come from diverse domains or are extracted from different aspects, which will be referred to as views. Standard predictive methods, such as support vector machines, are built with all the variables available, without taking into consideration the presence of distinct views. These methods would sacrifice the predictive performance [7] and may also be incapable of performing view-level analysis [12], such as predicting the tags for image annotation and analyzing the underlying relationships amongst views. Different from the existing work that has been done on exploring multi-view information to alleviate the difficult semi-supervised learning [6, 12, 2, 14] and unsupervised clustering [8] problems, our goal is to develop a statistical framework that learns a predictive subspace representation shared by multiple views when labels are provided and perform view-level analysis, particularly view-level predictions. To discover a subspace representation shared by multi-view data, the unsupervised canonical correlation analysis (CCA) [17] and its kernelized version [1] ignore the widely available supervised information, such as image categories. Therefore, they could discover a subspace with weak predictive ability. The multi-view fisher discriminant analysis (FDA) [13] provides a supervised approach to finding such a projected subspace. However, this deterministic approach cannot provide viewlevel predictions, such as image annotation; and it would also need a density estimator in order to apply the information criterion [9] to detect view disagreement. In this paper, we consider a probabilistic approach to model multi-view data, which can perform both the response-level predictions (e.g., image classification) and view-level predictions (e.g., image annotation). Specifically, we propose a large-margin learning approach to discovering a predictive subspace representation for multi-view data. The approach is based on a generic multi-view latent space Markov network (MN) that fulfills a weak conditional independence assumption that the data from different views and the response variables are conditionally independent given a set of latent variables. This conditional independence is much weaker than the typical assumption (e.g., in the seminal work of 1 co-training [6]) that multi-view data are conditionally independent given the very low dimensional response variables [14]. Although directed Bayesian networks (BNs) (e.g., latent Dirichlet allocation (LDA) [5] and probabilistic CCA [3]) can also be designed to fulfill the conditional independence, the posterior inference can be hard because all the latent variables are coupled together given the input variables [26]. Therefore, we ground our approach on the undirected MNs. Undirected latent variable models have shown promising performance in many applications [26, 20]. In the multiview MN, conditioned on latent variables, each view defines a joint distribution similar to that in a conditional random field (CRF) [18] and thus it can effectively extract latent topics from structured data. For example, considering word ordering information could improve the quality of discovered latent topics [23] compared to a method (e.g., LDA) solely based on the natural bag-of-word representation, and spatial relationship among regions in an image is also useful for computer vision applications [15]. To learn the multi-view latent space MN, we develop a large-margin approach, which jointly maximizes the data likelihood and minimizes the hinge-loss on training data. The learning and inference problems are efficiently solved with a contrastive divergence method [25]. Finally, we concentrate on one special case of the large-margin mult-view MN and extensively evaluate it on real video and web image datasets for image classification, annotation and retrieval tasks. Our results show that the large-margin approach can achieve significant improvements in terms of prediction performance and discovered latent subspace representations. The paper is structured as follows. Sec 2 and Sec 3 present the multi-view latent space MN and its large-margin training. Sec 4 presents a special case. Sec 5 presents empirical results and Sec 6 concludes. 2 Multi-view Latent Space Markov Networks ... H1 HK X1 XN Z1 ZM Z2 X2 Figure 1: Multi-view Markov networks with K latent variables. The unsupervised two-view latent space Markov network is shown in Fig. 1, which consists of two views of input data X := {Xn} and Z := {Zm} and a set of latent variables H := {Hk}. For ease of presentation, we assume that the variables on each view are connected via a linear-chain. Extensions to multiple views and more complex structures on each view can be easily done, after we have presented the constructive definition of the model distribution. The model is constructed based on an underlying conditional independence assumption that given the latent variables H, the two views X and Z are independent. Graphically, we can see that both the exponential family Harmonium (EFH) [26] and its extension of dual-wing Harmonium (DWH) [28] are special cases of multi-view latent space MNs. Therefore, it is not surprising to see that multi-view MNs inherit the widely advocated property of EFH that the model distribution can be constructively defined based on local conditionals on each view. Specifically, we first define marginal distributions of the data on each view and the latent variables. For each view, we consider the first-order Markov network. By the random field theory, we have p(x) = exp n X i θ⊤ i φ(xi, xi+1) −A(θ) o , and p(z) = exp n X j η⊤ j ψ(zj, zj+1) −B(η) o , where φ and ψ are feature functions, A and B are log partition functions. For latent variables H, each component hk has an exponential family distribution and therefore the marginal distribution is: p(h) = Y k p(hk) = Y k exp n λ⊤ k ϕ(hk) −Ck(λk) o , where ϕ(hk) is the feature vector of hk, Ck is another log-partition function. Next, the joint model distribution is defined by combining the above components in the log-domain and introducing additional terms that couple the random variables X, Z and H. Specifically, we have p(x, z, h) ∝exp nX i θ⊤ i φ(xi, xi+1)+ X j η⊤ j ψ(zj, zj+1)+ X k λ⊤ k ϕ(hk) + X ik φ(xi, xi+1)⊤Wk i ϕ(hk)+ X jk ψ(zj, zj+1)⊤Uk j ϕ(hk) o . (1) Then, we can directly write the conditional distributions on each view with shifted parameters, p(x|h)=exp nP i ˆθ⊤ i φ(xi, xi+1)−A(ˆθ) o , where ˆθi =θi+P k Wk i ϕ(hk); p(z|h)=exp nP j ˆη⊤ j ψ(zj, zj+1) −B(ˆη) o , where ˆηj =ηj +P k Uk j ϕ(hk); and p(h|x, z)=Q kexp n ˆλ⊤ k ϕ(hk)−Ck(ˆλk) o , where ˆλk =λk+P i Wk i φ(xi, xi+1)+P j Uk j ψ(zj, zj+1). 2 We can see that conditioned on the latent variables, both p(x|h) and p(z|h) are defined in the exponential form with a pairwise potential function, which is very similar to conditional random fields [18]. Reversely, we can start with defining the local conditional distributions as above and directly write the compatible joint distribution, which is of the log-linear form as in (1). We will use Θ to denote all the parameters (θ, η, λ, W, U). Since the latent variables are not directly connected, the complexity of inferring the posterior distribution of H is the same as in EFH when all the input data are observed, as reflected in the factorized form of p(h|x, z). Therefore, multi-view latent space MNs do not increase the complexity on testing if our task depends solely on the latent representation (i.e., expectation of H), such as information retrieval [26], classification, clustering etc. However, the complexity of parameter estimation and inferring the posterior distribution of each view (e.g., X) will be increased, depending on the structure on the view. For the simple case of linear-chain, the inference can be efficiently done with a forward-backward message passing scheme [18]. For a general model structure, which may contain many loops, approximate inference such as variational methods [22] is needed to perform the task. We will provide more details when presenting the learning problem. Up to now, we have sticken on unsupervised multi-view latent space MNs, which are of wide use in discovering latent subspace representations shared by multi-view data. In this paper, however, we are more interested in the supervised setting where each input sample is associated with a supervised response variable, such as image categories. Accordingly, our goal is to discover a predictive subspace by exploring the supervised information. The supervised multi-view latent space MNs are defined similarly as above, but with an additional view of response variables Y . Now, the conditional independence is: X, Z and Y are independent if H is given. As we have stated, this assumption is much weaker than the typical conditional independence assumption that X and Z are independent given Y . Based on the constructive definition, we only need to specify the conditional distribution of Y given H. In principle, Y can be continuous or discrete. Here, we consider the discrete case, where y ∈{1, · · · , T }, and define p(y|h) = exp{V⊤f(h, y)} P y′ exp{V⊤f(h, y′)}, (2) where f(h, y) is the feature vector whose elements from (y −1)K + 1 to yK are those of h and all others are 0. Accordingly, V is a stacking parameter vector of T sub-vectors Vy, of which each one corresponds to a class label y. Then, the joint distribution p(x, z, h, y) has the same form as in Eq. (1), but with an additional term of V⊤f(h, y) = V⊤ y h in the exponential. We note that a supervised version of DWH, which will be denoted by TWH (i.e., triple wing Harmonium), was proposed in [29], and the parameter estimation was done by maximizing the joint data likelihood. However, the resultant TWH model does not yield improved performance compared to the naive method that combines an unsupervised DWH for discovering latent representations and an SVM for classification. This observation further motivates us to develop a more discriminative learning approach to exploring the supervised information for discovering predictive latent subspace representations. As we shall see, integrating the large-margin principle into one objective function for joint latent subspace model and prediction model learning can yield much better results, in terms of prediction performance and predictiveness of discovered latent subspace representations. 3 Parameter Estimation: a Large Margin Approach To learn the supervised multi-view latent space MNs, a natural method is the maximum likelihood estimation (MLE), which has been widely used to train directed [24, 30] and undirected latent variable models [26, 20, 28, 29]. However, likelihood-based parameter estimation pays additional efforts in defining a normalized probabilistic model as in Eq. (2), of which the normalization factor can make the inference hard, especially in directed models [24]. Moreover, the standard MLE could result in non-conclusive results, as reported in [29] and verified in our experiments. These have been motivating us to develop a more discriminative learning approach. An arguably more discriminative way to learn a classification model is to directly estimate the decision boundary, which is the essential idea underlying the very successful large-margin classifiers (e.g., SVMs). Here, we integrate the large-margin idea into the learning of supervised multi-view latent space MNs for multi-view data analysis, analogous to the development of MedLDA [31], which is directed and has single-view. For brevity, we consider the general multi-class classification, as defined above. 3 3.1 Problem Definition As in the log-linear model in Eq. (2), we assume that the discriminant function F(y, h; V) is linear, that is, F(y, h; V) = V⊤f(h, y), where f and V are defined the same as above. For prediction, we take the expectation over the latent variable H and define the prediction rule as y∗:= arg max y Ep(h|x,z)[F(H, y; V)] = arg max y V⊤Ep(h|x,z)[f(H, y)], (3) where the expectation can be efficiently computed with the factorized form of p(h|x, z) when x and z are fully observed. If missing values exist in x or z, an inference procedure is needed to compute the expectation of the missed components, as detailed below in Eq. (5). Then, learning is to find an optimal V∗that minimizes a loss function. Here, we minimize the hinge loss, as used in SVMs. Given training data D = {(xd, zd, yd)}D d=1, the hinge loss of the predictive rule (3) is Rhinge(V) := 1 D X d max y [∆ℓd(y) −V⊤Ep(h|x,z)[∆fd(y)]], where ∆ℓd(y) is a loss function that measures how different the prediction y is compared to the true label yd, and Ep(h|x,z)[∆fd(y)] = Ep(h|x,z)[f(Hd, yd)] −Ep(h|x,z)[f(Hd, y)]. It can be proved that the hinge loss is an upper bound of the empirical loss Remp := 1 D P d ∆ℓ(y∗ d). Applying the principle of regularized risk minimization, we define the learning problem as solving min Θ,V L(Θ) + 1 2C1∥V∥2 2 + C2Rhinge(V), (4) where L(Θ) := −P d log p(xd, zd) is the negative data likelihood and C1 and C2 are non-negative constants, which can be selected via cross-validation. Note that Rhinge is also a function of Θ. Since problem (4) jointly maximizes the data likelihood and minimizes a training loss, it can be expected that by solving this problem we can find a predictive latent space representation p(h|x, z) and a prediction model parameter V, which on the one hand tend to predict as accurate as possible on training data, while on the other hand tend to explain the data well. 3.2 Optimization Variational approximation with Contrastive Divergence: Since the data likelihood L(Θ) is generally intractable to compute, our method is based on the efficient contrastive divergence technique [16, 25, 26, 28]. Specifically, we derive a variational approximation Lv(q0, q1) of the negative log-likelihood L(Θ) , that is: Lv(q0, q1) := R(q0(x, z, h), p(x, z, h)) −R(q1(x, z, h), p(x, z, h)), where R(q, p) is the relative entropy, and q0 is a variational distribution with x and z clamped to their observed values while q1 is a distribution with all variables free. For q(q0 or q1) in general, we make the structured mean field assumption [27] that 1 q(x, z, h) = q(x)q(z)q(h). Solving the approximate problem: Applying the variational approximation Lv in problem (4), we get an approximate objective function L(Θ, V, q0, q1). Then, we can develop an alternating minimization method, which iteratively minimizes L(Θ, V, q0, q1) over q0 and (Θ, V). The distribution q1 is reconstructed once the optimal q0 is achieved, see [25] for details. The problem of solving q0 and q1 is the posterior inference problem. Specifically, for a variational distribution q (can be q0 or q1) in general, we keep (Θ, V) fixed and update each marginal as q(x) = p(x|Eq(H)[H]), q(z) = p(z|Eq(H)[H]), and q(h) = Y k p(hk|Eq(X)[X], Eq(Z)[Z]). (5) For q0, (x, z) are clamped at their observed values, and only q0(h) is updated, which can be very efficiently done because of its factorized form. The distribution q1 is achieved by performing the above updates starting from q0. Several iterations can yield a good q1. Again, we can see that both q(x) and q(z) are CRFs, with the expectation of H as the condition. Therefore, for linear-chain models, we can use a message passing scheme [18] to infer their marginal distributions, as needed for parameter estimation and view-level prediction (e.g., image annotation), as we shall see. For generally structured models, approximate inference techniques [22] can be applied. After we have inferred q0 and q1, parameter estimation can be done by alternating between (1) estimating V with Θ fixed: this problem is learning a multi-class SVM [11], which can be 1The parametric form assumptions of q, as made in previous work [28, 29], are not needed. 4 efficiently done with existing solvers; and (2) estimating Θ with V fixed: this can be solved with sub-gradient descent, where the sub-gradient is computed as: ∇θi=−Eq0[φ(xi, xi+1)] + Eq1[φ(xi, xi+1)], ∇ηj=−Eq0[ψ(zj, zj+1)] + Eq1[ψ(zj, zj+1)], ∇λk=−Eq0[ϕ(hk)] + Eq1[ϕ(hk)], ∇Wk i =−Eq0[φ(xi, xi+1)ϕ(hk)⊤]+Eq1[φ(xi, xi+1)ϕ(hk)⊤]−C2 1 D P d(V¯ydk −Vydk) ∂Eq0 [hk] ∂Wk i , ∇Uk j =−Eq0[ψ(zj, zj+1)ϕ(hk)⊤]+Eq1[ψ(zj, zj+1)ϕ(hk)⊤]−C2 1 D P d(V¯ydk −Vydk) ∂Eq0 [hk] ∂Uk j , where ¯yd = arg maxy[∆ℓd(y)+V⊤Eq0[f(Hd, y)] is the loss-augmented prediction, and the expectation Eq0[φ(xi, xi+1)] is actually the count frequency of φ(xi, xi+1), likewise for Eq0[ψ(zj, zj+1)]. Note that in our integrated max-margin formulation, the sub-gradients of W and U contain an additional term (i.e., the third term) compared to the standard DWH [28] with contrastive divergence approximation. This additional term introduces a regularization effect to the latent subspace model. If the prediction label yd differs from the true label ¯yd, this term will be non-zero and it biases the model towards discovering a better representation for prediction. 4 Application to Image Classification, Annotation and Retrieval We have developed the large-margin framework with a generic multi-view latent space MN to model structured data. In order to carefully examine the basic learning principle and compare with existing work, in this paper, we concentrate on a simplified but very rich case that the data on each view are not structured, which has been extensively studied in EFH [26, 28, 29] for image classification, annotation and retrieval. We denote the specialized model by MMH (max-margin Harmonium). In theory, extensions to model structured multi-view data can be easily done under the general framework, and the only needed change is on the step of inferring q1, which can be treated as a black box, given the wide literature on approximate inference [22]. We defer the systematical study in this direction to the full extension of this work. Specifically, we consider two-views, where x is a vector of discrete word features (e.g., image tags) and z is a vector of real-valued features (e.g., color histograms). Each xi is a Bernoulli variable that denotes whether the ith term of a dictionary appears or not in an image, and each zj is a real number that denotes the normalized color histogram of an image. We assume that each real-valued hk follows a univariate Gaussian distribution. Therefore, we define the conditional distributions as p(xi=1|h)= 1 1 + e−(αi+Wi·h) , p(zj|h)=N(zj|σ2 j (βj+Uj·h), σ2 j ), p(hk|x, z)=N(hk|x⊤W·k+z⊤U·k, 1), where Wi· and W·k denote the ith row and kth column of W, respectively. Alike for Ui· and U·k. With the above definitions, we can follow exactly the same procedure as above to do parameter estimation. For the step of inferring q0 and q1, the distributions of x, z and h are all fully factorized. Therefore, the sub-gradients can be easily computed. Details are deferred to the Appendix. Testing: For classification and retrieval, we need to infer the posterior distribution of H and its expectation. In this case, we have Ep(h|x,z)[H] = v, where vk = x⊤W·k + z⊤U·k, ∀1 ≤k ≤K. Therefore, the classification rule is y∗= arg maxy V⊤f(v, y). For retrieval, the expectation v of each image is used to compute a similarity (e.g., cosine) between images. For annotation, we use x to represent tags, which are observed in training. In testing, we infer the posterior distribution p(x|z), which can be approximately computed by running the update equations (5) with z clamped at its observed values. Then, tags with high probabilities are selected as annotation. 5 Experiments We report empirical results on TRECVID2003 and flickr image datasets. Our results demonstrate that the large-margin approach can achieve significantly better performance on discovering predictive subspace representations and the tasks of image classification, annotation and retrieval. 5.1 Datasets and Features The first dataset is the TRECVID2003 video dataset [28], which contains 1078 manually labeled video shots that belong to 5 categories. Each shot is represented as a 1894-dim vector of text features 5 −50 −40 −30 −20 −10 0 10 20 30 40 −80 −60 −40 −20 0 20 40 60 1 2 3 4 5 Avg-KL = 0.605 −80 −60 −40 −20 0 20 40 60 −50 −40 −30 −20 −10 0 10 20 30 40 50 1 2 3 4 5 Avg-KL = 0.319 −40 −30 −20 −10 0 10 20 30 40 50 −80 −60 −40 −20 0 20 40 60 1 2 3 4 5 Avg-KL = 0.198 Figure 2: t-SNE 2D embedding of the discovered latent space representation by (Left) MMH, (Middle) DWH and (Right) TWH on the TRECVID video dataset (Better viewed in color). and a 165-dim vector of HSV color histogram, which is extracted from the associated keyframe. We evenly split this dataset for training and testing. The second one is a subset selected from NUSWIDE [10], which is a big image dataset constructed from flickr web images. This dataset contains 3411 images about 13 animals, including cat, tiger, etc. See Fig. 6 for example images for each category. For each image, six types of low-level features [10] are extracted, including 634-dim real valued features (i.e., 64-dim color histogram, 144-dim color correlogram, 73-dim edge direction histogram, 128-dim wavelet texture and 225-dim block-wise color moments) and 500-dim bag-ofword representation based on SIFT [19] features. We randomly select 2054 images for training and use the rest for testing. The online tags are also downloaded for evaluating image annotation. 5.2 Discovering Predictive Latent Subspace Representations We first evaluate the predictive power of the discovered latent subspace representations. Fig. 2 shows the 2D embedding of the discovered 10-dim latent representations by three models (i.e., MMH, DWH and TWH) on the video data. Here, we use the t-SNE algorithm [21] to find the embedding. We can see that clearly the latent subspace representations discovered by the largemargin based MMH show a strong grouping pattern for the images belonging to the same category, while images from different categories tend to be separated from each other on the 2D embedding space. In contrast, the latent subspace representations discovered by the likelihood-based unsupervised DWH and supervised TWH do not show a clear grouping pattern, except for the first category. Images from different categories tend to mix together. These observations suggest that the largemargin based latent subspace model can discover more predictive or discriminative latent subspace representations, which will result in better prediction performance, as we shall see. To quantitatively evaluate the predictiveness of the discovered latent subspace representations, we compute the pair-wise average KL-divergence between the per-class average distribution over latent topics2. As shown on the top of each plot in Fig. 2, the large-margin based MMH obtains a much larger average KL-divergence than the other likelihood-based methods. This again suggests that the latent subspace representations discovered by MMH are more discriminative or predictive. We obtain the similar observations and conclusions on the flickr dataset (see Fig. 3 for some example topics), where the average KL-divergence scores of 60-topic MMH, DWH and TWH are 3.23, 2.56 and 0.463, respectively. Finally, we examine the predictive power of discovered latent topics. Fig. 3 shows five example topics discovered by the large-margin MMH on the flickr image data. For each topic Hk, we show the 5 top-ranked images that yield a high expected value of Hk, together with the associated tags. Also, to qualitatively visualize the discriminative power of each topic among the 13 categories, we show the average probability of each category distributed on the particular topic. From the results, we can see that many of the discovered topics are very predictive for one or several categories. For example, topics 3 and 4 are discriminative in predicting the categories hawk and whales, respectively. Similarly, topics 1 and 5 are good at predicting squirrel and zebra, respectively. We also have some topics which are good at discriminating a subset of categories against another subset. For example, the topic 2 is good at discriminating {squirrel, wolf, rabbit} against {tiger, whales, zebra}; but it is not very discriminative between squirrel and wolf. 2To compute this score, we first turn the expected value of H to be non-negative by subtracting each element by the smallest value and then normalize it into a distribution over the K topics. The per-class average is computed by averaging the topic distributions of the images within the same class. For a pair of distributions p and q, the average KL-divergence is 1/2(R(p, q) + R(q, p)). 6 Topic 1 0.014 0.015 0.016 0.017 0.018 0.019 probability squirrel lion tiger snake rabbit wolf hawk whales cat antler elephant cow zebra squirrel, nature, animal, wildlife, rabbit, cute, bunny, interestingness Topic 2 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 probability squirrel wolf rabbit cow lion cat snake hawk antler elephant tiger whales zebra wolf, alaska, animal, nature, wildlife, africa, squirrel Topic 3 0.012 0.014 0.016 0.018 0.02 0.022 0.024 probability hawk antler cat rabbit wolf elephant squirrel lion tiger whales cow zebra snake hawk, bird, flying, wildlife, wings, nature, fabulous, texas Topic 4 0.015 0.02 0.025 0.03 0.035 0.04 0.045 probability whales zebra elephant tiger cow cat antler lion snake rabbit hawk wolf squirrel ocean, boat, animal, wildlife, diving, sea, sydney, pacific, blue Topic 5 0.005 0.01 0.015 0.02 0.025 probability zebra tiger antler squirrel rabbit cat wolf lion hawk snake cow elephant whales zebra, zoo, animal, stripes, africa, mammal, black, white, nature, eyes Figure 3: Example latent topics discovered by a 60-topic MMH on the flickr animal dataset. 5.3 Prediction Performance on Image Classification, Retrieval, and Annotation 5.3.1 Classification We first compare the MMH with SVM, DWH, TWH, Gaussian Mixture (GM-Mix), Gaussian Mixture LDA (GM-LDA), and Correspondence LDA (CorrLDA) on the TRECVID data. See [4] for the details of the last three models. We use the SV M struct 3 to solve the sub-step of learning V in MMH and build an SVM classifier, which uses both the text and color histogram features without distinguishing them in different views. For each of the unsupervised DWH, GM-Mix, GM-LDA and CorrLDA, a downstream SVM is built with the same tool based on the discovered latent representations. Fig. 4 (a) shows the classification accuracy of different models, where CorrLDA is omitted because of its too low performance. We can see that the max-margin based multi-view MMH performs consistently better than any other competitors. In contrast, the likelihood-based TWH does not show any conclusive improvements compared to the unsupervised DWH. These results show that supervised information can help in discovering predictive latent space representations that are more suitable for prediction if the model is appropriately learned, e.g., by using the large-margin method. The superior performance of MMH compared to the flat SVM demonstrates the usefulness of modeling multi-view inputs for prediction. The reasons for the inferior performance of other models (e.g., CorrLDA and GM-Mix) are analyzed in [28, 29]. Fig. 4 (b) shows the classification accuracy on the flickr animal dataset. For brevity, we compare MMH only with the best performed DWH, TWH and SVM. For these methods, we use the 500dim SIFT and 634-dim real features, which are treated as two views of inputs for MMH, DWH and TWH. Also, we compare with the single-view MedLDA [31], which uses SIFT features only. To be fair, we also evaluate a version of MMH that uses SIFT features, and denote it by MMH (SIFT). Again, we can see that the large-margin based multi-view MMH performs much better than any other methods, including SVM which ignores the presence of multi-view features. For the single-view MMH (SIFT), it performs comparably (slightly better than) with the large-margin based MedLDA, which is a directed BN. With the similar large-margin principle, MMH is an important extension of MedLDA to the undirected latent subspace models and for multi-view data analysis. 5.3.2 Retrieval For image retrieval, each test image is treated as a query and training images are ranked based on their cosine similarity with the given query, which is computed based on latent subspace representations. An image is considered relevant to the query if they belong to the same category. We evaluate the retrieval results by computing the average precision (AP) score and drawing precision-recall curves. Fig. 4 (c) compares MMH with four other models when the topic number changes. Here, 3http://svmlight.joachims.org/svm multiclass.html 7 5 10 15 20 25 30 35 40 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 # of latent topics classification accuracy MMH DWH TWH GM−Mix GM−LDA SVM (a) 10 20 30 40 50 60 0.3 0.35 0.4 0.45 0.5 0.55 0.6 # of latent topics classification accuracy MMH DWH TWH MMH(SIFT) MEDLDA(SIFT) SVM (b) 0 0.5 1 0.2 0.3 0.4 0.5 0.6 Recall Precision 0 0.5 1 0.2 0.3 0.4 0.5 0.6 Recall Precision 0 10 20 30 40 0.3 0.35 0.4 0.45 0.5 0.55 # of latent topics Average Precision MMH DWH TWH GM−Mix GM−LDA 15 topics Average Precision 20 topics (c) Figure 4: Classification accuracy on the (a) TRECVID 2003 and (b) flickr datasets and (c) the average precision curve and the two precision-recall curves for image retrieval on TRECVID data. squirrel cow cat squirrel cat cow nature cat cloudy animal rabbit nature wildlife kitten lion nature cute green elephant squirrel animal wolf animal wolf zebra tiger lion zebra animal zoo lion lion cat nature zoo tiger hawk animal wolf wildlife snake animal squirrel zoo zoo wolf wolf animal elephant whales rabbit wildlife snake ocean elephant rabbit green nature wolf water ocean bunny landscape elephant ocean marine marine macro India Australia flower snake antlers squirrel snake hawk antlers zebra squirrel rabbit nature bird animal nature nature bunny cat wildlife lion wildlife cat deer animal animal cute hawk wolf cat hawk snake nature cow cat zebra bird ocean zoo ocean kitten antlers wildlife adorable wolf wolf cats nature animal animal aquarium animal Figure 6: Example images from the 13 categories on the flickr animal dataset with predicted annotations. Tags in blue are correct annotations while red ones are wrong predictions. The other tags are neutral. we show the precision-recall curves when the topic number is set at 15 and 20. We can see that for the AP measure, MMH outperforms all other methods in most cases, and MMH consistently outperforms all the other methods in the measure of precision-recall curve. On the flickr dataset, we have similar observations. The AP scores of the 60-topic MMH, DWH, and TWH are 0.163, 0.153 and 0.158, respectively. Due to space limitation, we defer the details to a full extension. 5.3.3 Annotation MMH DWH TWH sLDA F1@1 0.165 0.144 0.145 0.077 F1@2 0.221 0.186 0.192 0.124 F1@3 0.245 0.202 0.218 0.146 F1@4 0.258 0.208 0.228 0.159 F1@5 0.262 0.210 0.236 0.169 F1@6 0.259 0.208 0.240 0.171 F1@7 0.256 0.206 0.239 0.175 Figure 5: Top-N F1-measure. Finally, we report the annotation results on the flickr dataset, with a dictionary of 1000 unique tags. The average number of tags per image is about 4.5. We compare MMH with DWH and TWH with two views of inputs–X for tag and Z for all the 634-dim real-valued features. We also compare with the sLDA annotation model [24], which uses SIFT features and tags as inputs. We use the top-N F1-measure [24], denoted by F1@N. With 60 latent topics, the top-N F-measure scores are shown in Fig. 5. We can see that the large-margin based MMH significantly outperforms all the competitors. Fig. 6 shows example images from all the 13 categories, where for each category the left image is generally of a good annotation quality and the right one is relatively worse. 6 Conclusions and Future Work We have presented a generic large-margin learning framework for discovering predictive latent subspace representations shared by structured multi-view data. The inference and learning can be efficiently done with contrastive divergence methods. Finally, we concentrate on a specialized model with applications to image classification, annotation and retrieval. Extensive experiments on real video and web image datasets demonstrate the advantages of large-margin learning for both prediction and predictive latent subspace discovery. In future work, we plan to systematically investigate the large-margin learning framework on structured multi-view data analysis, e.g., on text mining [23] and computer vision [15] applications. 8 Acknowledgments This work was done while N. Chen was a visiting researcher at CMU under a CSC fellowship and supports from Chinese NSF Grants (No. 60625304, 90716021, 61075027), the National Key Project for Basic Research of China (Grants No. G2007CB311003, 2009CB724002). J. Zhu and E. P. Xing are supported by ONR N000140910758, NSF IIS-0713379, NSF Career DBI-0546594, and an Alfred P. Sloan Research Fellowship. References [1] S. Akaho. A kernel method for canonical correlation analysis. In IMPS, 2001. [2] K. Ando and T. Zhang. Two-view feature generation model for semi-supervised learning. In ICML, 2007. [3] F. R. Bach and M. I. Jordan. A probabilistic interpretation of canonical correlation analysis. Technical report, Technical Report 688, Dept. of Statistics. University of California, 2005. [4] D. M. Blei and M. I. Jordan. Modeling annotated data. In ACM SIGIR, pages 127–134, 2003. [5] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. JMLR, 3:993–1022, 2003. [6] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-trainnig. In COLT, 1998. [7] U. Brefeld and T. Scheffer. Co-EM support vector learning. In ICML, 2004. [8] K. Chaudhuri, S. M. Kakade, K. Livescu, and K. Sridharan. Multi-view clustering via canonical correlation analysis. In ICML, 2009. [9] C. M. Christoudias, R. Urtasun, and T. Darrell. Multi-view learning in the presence of view disagreement. In UAI, 2008. [10] T.-S. Chua, J. Tang, R. Hong, H. Li, Z. Luo, and Y.-T. Zheng. NUS-WIDE: A real-world web image database from national university of singapore. In CIVR, 2009. [11] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, (2):265–292, 2001. [12] M. Culp, G. Michailidis, and K. Johnson. On multi-view learning with additive models. Annals of Applied Statistics, 3(1):292–318, 2009. [13] T. Diethe, D. R. Hardoon, and J. Shawe-Taylor. Multiview fisher discriminant analysis. In NIPS Workshop on Learning from Multiple Sources, 2008. [14] D. Foster, S. Kakade, and T. Zhang. Multi-view dimensionality reduction via canonical correlation analysis. Technical report, Technical Report TR-2008-4, TTI-Chicago, 2008. [15] D. G¨okalp and S. Aksoy. Scene classification using bag-of-regions representations. In CVPR, 2007. [16] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [17] H. Hotelling. Relations between two sets of variates. Biometrika, 28(3/4):321–377, 1936. [18] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, 2001. [19] D. G. Lowe. Object recognition from local scale-invariant features. In CVPR, 1999. [20] R. Salakhutdinov and G. E. Hinton. Replicated softmax: an undirected topic model. In NIPS, 2009. [21] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. JMLR, 9:2579–2605, 2008. [22] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1–2):1–305, 2008. [23] H. M. Wallach. Topic modeling: Beyond bag-of-words. In ICML, 2006. [24] C. Wang, D. M. Blei, and L. Fei-Fei. Simultaneous image classification and annotation. In CVPR, 2009. [25] M. Welling and G. E. Hinton. A new learning algorithm for mean field boltzmann machines. In ICANN, 2001. [26] M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application to information retrieval. In NIPS, pages 1481–1488, 2004. [27] E. P. Xing, M. I. Jordan, and S. Russell. A generalized mean field algorithm for variational inference in exponential families. In UAI, 2003. [28] E. P. Xing, R. Yan, and A. G. Hauptmann. Mining associated text and images with dual-wing harmoniums. In UAI, 2005. [29] J. Yang, Y. Liu, E. P. Xing, and A. G. Hauptmann. Harmonium models for semantic video representation and classification. In SDM, 2007. [30] J. Zhang, Z. Ghahramani, and Y. Yang. Flexible latent variable models for multi-task learning. Machine Learning, 73(3):221–242, 2008. [31] J. Zhu, A. Ahmed, and E. P. Xing. MedLDA: Maximum margin supervised topic models for regression and classification. In ICML, 2009. 9
2010
178
3,941
A Bayesian Approach to Concept Drift Stephen H. Bach Marcus A. Maloof Department of Computer Science Georgetown University Washington, DC 20007, USA {bach, maloof}@cs.georgetown.edu Abstract To cope with concept drift, we placed a probability distribution over the location of the most-recent drift point. We used Bayesian model comparison to update this distribution from the predictions of models trained on blocks of consecutive observations and pruned potential drift points with low probability. We compare our approach to a non-probabilistic method for drift and a probabilistic method for change-point detection. In our experiments, our approach generally yielded improved accuracy and/or speed over these other methods. 1 Introduction Consider a classification task, in which the objective is to assign labels Y to vectors of one or more attribute values X. To learn to perform this task, we use training data to model f : X →Y , the unknown mapping from attribute values to labels, or target concept, in hopes of maximizing classification accuracy. A common problem in online classification tasks is concept drift, which is when the target concept changes over time. Identifying concept drift is often difficult. If the correct label for some x is y1 at time step t1 and y2 at time step t2, does this indicate concept drift or that the training examples are noisy? Researchers have approached drift in a number of ways. Schlimmer and Grainger [1] searched for candidate models by reweighting training examples according to how well they fit future examples. Some have maintained and modified partially learned models, e.g., [2, 3]. Many have maintained and compared “base” models trained on blocks of consecutive examples to identify those that are the best predictors of new examples, e.g., [4, 5, 6, 7, 8]. We focus on this approach. Such methods address directly the uncertainty about the existence and location of drift. We propose using probability theory to reason about this uncertainty. A probabilistic model of drift offers three main benefits to the research community. First, our experimental results show that a probabilistic model can achieve new combinations of accuracy and speed on classification tasks. Second, probability theory is a well-developed theory that could offer new insights into the problem of concept drift. Third, probabilistic models can easily be combined in a principled way, and their use in the machine-learning field continues to grow [9]. Therefore, our model could readily and correctly share information with other probabilistic models or be incorporated into broader ones. In this paper we present a probabilistic model of the number of most-recent training examples that the active concept describes. Maximum-likelihood estimation would overfit the model by concluding that each training was generated by a different target concept. This is unhelpful for future predictions, since it eliminates all generalization from past examples to future predictions. Instead, we use Bayesian model comparison [9], or BMC, to reason about the trade-offs between model complexity (i.e., the number of target concepts) and goodness of fit. We first describe BMC and its application to detecting change points. We then describe a Bayesian approach to concept drift. Finally, we show the results of an empirical comparison among our method (pruned and unpruned), BMC for change points, and Dynamic Weighted Majority [5], an ensemble method for concept drift. 1 2 Bayesian model comparison BMC uses probability theory to assign degrees of belief to candidate models given observations and prior beliefs [9]. By Bayes’ Theorem, p(M|D) = p(D|M)p(M) p(D) , where M is the set of models under consideration and D is the set of observations. Researchers in Bayesian statistics have used BMC to look for change points in time-series data. The goal of change-point detection is to segment sequences of observations into blocks that are identically distributed and usually assumed to be independent. 2.1 Previous work on Bayesian change-point detection Barry and Hartigan [10, 11] used product partition models as distributions over possible segmentations of time-series data. Exact inference requires O(n3) time in the number of observations and may be accurately approximated in O(n) time using Markov sampling [10]. In an online task, approximate training and testing on n observations would require O(n2) time, since the model must be updated after new training data. These updates would require resampling and testing for convergence. Fearnhead [12] showed how to perform direct simulation from the posterior distribution of a class of multiple-change-point models. This method requires O(n2) time and avoids the need to use Markov sampling and to test for convergence. Again, an approximate method can be performed in approximately linear time, but the model must be regularly rebuilt in online tasks. The computational costs associated with offline methods make it difficult to apply them to online tasks. Researchers have also looked for online methods for change-point detection. Fearnhead and Liu [13] introduced an online version of Fearnhead’s simulation method [12] which uses particle filtering to quickly update the distribution over change points. Adams and MacKay [14] proposed an alternative method for online Bayesian change-point detection. We now describe it in more detail, since it will be the starting point for our own model. 2.2 A method for online Bayesian change-point detection Adams and MacKay [14] proposed maintaining a discrete distribution over lt, the length in time steps of the longest substrings of observations that are identically distributed, ending at time step t. This method therefore models the location of only the most recent change point, a cost-saving measure useful for many online problems. A conditional prior distribution p(lt|lt−1) is used, such that p(lt|lt−1) =    λ−1 if lt = 0; 1 −λ−1 if lt = lt−1 + 1; 0 otherwise. (1) In principle, a more sophisticated prior could be used. The crucial aspect is that, given that a substring is identically distributed, it assigns mass to only two outcomes: the next observation is distributed identically to the observations of the substring, or it is the first of a new substring. The algorithm is initialized at time step 0 with a single base model that is the prior distribution over observations. Initially, p(l0 = 0) = 1. Let Dt be the observation(s) made at time step t. At each time step the algorithm computes a new posterior distribution p(lt|D1:t) by marginalizing out lt−1 from p(lt, lt−1|D1:t) = p(Dt|lt, D1:t−1)p(lt|lt−1)p(lt−1|D1:t−1) p(Dt|D1:t−1) . (2) This is a straightforward summation over a discrete variable. To find p(lt, lt−1|D1:t), consider the three components in the numerator. First, p(lt−1|D1:t−1) is the distribution that was calculated at the previous time step. Next, p(lt|lt−1) is the prior distribution. Since only two outcomes are assigned any mass, each element in p(lt−1|D1:t−1) contributes mass to only two points in the posterior distribution. This keeps the algorithm linear in the size of the ensemble. Finally, p(Dt|lt, D1:t−1) = p(Dt|Dt−lt:t−1). In other words, it is the predictive probability 2 of a model trained on the observations received from time steps t −lt to t −1. The denominator then normalizes the distribution. Once this posterior distribution p(lt|D1:t) is calculated, each model in the ensemble is trained on the new observation. Then, a new model is initialized with the prior distribution over observations, corresponding to lt+1 = 0. 3 Comparing conditional distributions for concept drift We propose a new approach to coping with concept drift. Since the objective is to maximize classification accuracy, we want to model the conditional distribution p(Y |X) as accurately as possible. Using [14] as a starting point, we place a distribution over lt, which now refers to the length in time steps that the currently active concept has been active. There is now an important distinction between BMC for concept drift and BMC for change points: BMC for concept drift models changes in p(Y |X), whereas BMC for change points models changes in the joint distribution p(Y, X). We use the conditional distribution to look for drift points because we do not wish to react to changes in the marginal distribution p(X). A change point in the joint distribution p(Y, X) could correspond to a change point in p(X), a drift point in p(Y |X), or both. Reacting only to changes in p(Y |X) means that we compare models on their ability to classify unlabeled attribute values, not generate those values. In other words, we assume that neither the sequence of attribute values X1:t nor the sequence of class labels Y1:t alone provide information about lt. Therefore p(lt|lt−1, Xt) = p(lt|lt−1) and p(lt−1|Y1:t−1, X1:t) = p(lt−1|Y1:t−1, X1:t−1). We also assume that examples from different concepts are independent. We use Equation 1 as the prior distribution p(lt|lt−1) [14]. Equation 2 is replaced with p(lt, lt−1|Y1:t, X1:t) = p(Yt|lt, Y1:t−1, X1:t)p(lt|lt−1)p(lt−1|Y1:t−1, X1:t−1) p(Yt|Y1:t−1, X1:t) . (3) To classify unlabeled attribute values X with class label Y , the predictive distribution is p(Y |X) = t X i=1 p(Y |X, Y1:t, X1:t, lt = i)p(lt = i). (4) We call this method Bayesian Conditional Model Comparison (BCMC). If left unchecked, the size of its ensemble will grow linearly with the number of observations. In practice, this is far too computationally expensive for many online-learning tasks. We therefore prune the set of models during learning. Let φ be a user-specified threshold for the minimum posterior probability a model must have to remain in the ensemble. Then, if there exists some i such that p(lt = i|D1:t) < φ < p(lt = 0|lt−1), simply set p(lt = i|Dt) = 0 and discard the model p(D|Dt−i:t). We call this modified method Pruned Bayesian Conditional Model Comparison (PBCMC). 4 Experiments We conducted an empirical comparison using our implementations of PBCMC and BCMC. We hypothesized that looking for drift points in the conditional distribution p(Y |X) instead of change points in the joint distribution p(Y, X) would lead to higher accuracy on classification tasks. To test this, we included our implementation of the method of Adams and MacKay [14], which we refer to simply as BMC. It is identical to BCMC, except that it uses Equation 2 to compute the posterior over lt, where D ≡(Y, X). We also hypothesized that PBCMC could achieve improved combinations of accuracy and speed compared to Dynamic Weighted Majority (DWM) [5], an ensemble method for concept drift that uses a heuristic weighting scheme and pruning. DWM is a top performer on the problems we considered [5]. Like the other learners, DWM maintains a dynamically-sized, weighted ensemble of models trained on blocks of examples. It predicts by taking a weighted-majority vote of the models’ predictions and multiplies the weights of those models that predict incorrectly by a constant β. It 3 then rescales the weights so that maximum weight is 1. Then if the algorithm’s global prediction was incorrect, it adds a new model to the ensemble with a weight of 1, and it removes any models with weights below a threshold θ. In the cases of models which output probabilities, DWM considers a prediction incorrect if a model did not assign the most probability to the correct label. 4.1 Test problems We conducted our experiments using four problems previously used in the literature to evaluate methods for concept drift The STAGGER concepts [1, 3] are three target concepts in a binary classification task presented over 120 time steps. Attributes and their possible values are shape ∈{triangle, circle, rectangle}, color ∈{red, green, blue}, and size ∈{small, medium, large}. For the first 40 time steps, the target concept is color = red ∧size = small. For the next 40 time steps, the target concept is color = green ∨shape = circle. Finally, for the last 40 time steps, the target concept is size = medium ∨size = large. A number of researchers have used this problem to evaluate methods for concept drift [4, 5, 3, 1]. Per the problem’s usual formulation, we evaluated each learner by presenting it with a single, random example at each time step and then testing it on a set of 100 random examples, resampled after each time step. We conducted 50 trials. The SEA concepts [8] are four target concepts in a binary classification task, presented over 50,000 time steps. The target concept changes every 12,500 time steps, and associated with each concept is a single, randomly generated test set of 2,500 examples. At each time step, a learner is presented with a randomly generated example, which has a 10% chance of being labeled as the wrong class. Every 100 time steps, the learner is tested on the active concept’s test set. Each example consists of numeric attributes xi ∈[0, 10], for i = 1, . . . , 3. The target concepts are hyperplanes, such that y = + if x1 + x2 ≤θ, where θ ∈{7, 8, 9, 9.5}, for each of the four target concepts, respectively; otherwise, y = −. Note that x3 is an irrelevant attribute. Several researchers have used a shifting hyperplane to evaluate learners for concept drift [5, 6, 7, 2, 8]. We conducted 10 trials. In this experiment, µ0 = 5. The calendar-apprentice (CAP) data sets [15, 16] is a personal-scheduling task. Using a subset of 34 symbolic attributes, the task is to predict a user’s preference for a meeting’s location, duration, start time, and day of week. There are 12 attributes for location, 11 for duration, 15 for start time, and 16 for day of week. Each learner was tested on the 1,685 examples for User 1. At each time step, the learner was presented the next example without its label. After classifying it, it was then told the correct label so it could learn. The electricity-prediction data set consists of 45,312 examples collected at 30-minute intervals between 7 May 1996 and 5 December 1998 [17]. The task is to predict whether the price of electricity will go up or down based on five numeric attributes: the day of the week, the 30-minute period of the day, the demand for electricity in New South Wales, the demand in Victoria, and the amount of electricity to be transferred between the two. About 39% of the examples have unknown values for either demand in Victoria or the transfer amount. At each time step, the learner classified the next example in temporal order before being given the correct label and using it to learn. In this experiment, µ0 = 0. 4.2 Experimental design We tested the learning methods on the four problems described. For STAGGER and SEA, we measured accuracy on the test set, then computed average accuracy and 95% confidence intervals at each time step. We also computed the average normalized area under the performance curves (AUC) with 95% confidence intervals. We used the trapezoid rule on adjacent pairs of accuracies and normalized by dividing by the total area of the region. We present both AUC under the entire curve and after the first drift point to show both a learner’s overall performance and its performance after drift occurs. For CAP and electricity prediction, we measured accuracy on the unlabeled observations. All the learning methods used a model we call Bayesian Naive Bayes, or BNB, as their base models. BNB makes the conditionally independent factor assumption (a.k.a. the “naive Bayes” assumption) that the joint distribution p(Y, X) factors into p(Y ) Qn i=1 p(Xi|Y ) [9]. It calculates values for p(Y |X) as needed using Bayes’ Theorem. It takes the Bayesian approach to probabilities (hence the additional “Bayes” in the name), meaning that it places distributions over the parameters that govern 4 Table 1: Results for (a) the STAGGER concepts and (b) the SEA concepts. (a) STAGGER concepts AUC AUC Learner and Parameters (overall) (after drift) BNB, on each concept 0.912±0.005 0.914±0.007 PBCMC, λ = 20, φ = 10−4 0.891±0.005 0.885±0.007 BCMC, λ = 20 0.891±0.005 0.885±0.007 BMC, λ = 50 0.884±0.005 0.876±0.008 DWM, β = 0.5, θ = 10−4 0.878±0.005 0.868±0.007 BNB, on all examples 0.647±0.008 0.516±0.011 (b) SEA concepts AUC AUC Learner and Parameters (overall) (after drift) BNB, on each concept 0.974±0.002 0.974±0.002 DWM, β = 0.9, θ = 10−3 0.974±0.001 0.974±0.001 BCMC, λ = 10, 000 0.970±0.002 0.969±0.002 PBCMC, λ = 10, 000, φ = 10−4 0.964±0.002 0.961±0.003 BMC, λ = 200 0.955±0.003 0.948±0.003 BNB, on all examples 0.910±0.003 0.889±0.002 the distributions p(Y ) and p(X|Y ) into which p(Y, X) factors. In our experiments, BNB predicted by marginalizing out the latent parameter variables to compute marginal likelihoods. Note that we use BNB, a generative model over p(Y, X), even though we said that we wish to model p(Y |X) as accurately as possible. This is to ensure a fair comparison with BMC which needs p(Y, X). We are more interested in the effects of looking for changes in each distribution, not which is a better model for the active concept. In our experiments, BNB placed Dirichlet distributions [9] over the parameters ⃗θ of multinomial distributions p(Y ) and p(Xi|Y ) when Xi was a discrete attribute. All Dirichlet priors assigned equal density to all valid values of ⃗θ. BNB placed Normal-Gamma distributions [9] over the parameters µ and λ of normal distributions p(Xi|Y ) when Xi was a continuous attribute. p(µ, λ) = N(µ|µ0, (βλ)−1)Gam(λ|a, b). The predictive distribution is then a Student’s t-distribution with mean µ and precision λ. In all of our experiments, β = 2 and a = b = 1. The value of µ0 is specified for each experiment with continuous attributes. We also tested BNB as a control to show the effects of not attempting to cope with drift and BNB trained using only examples from the active concept (when such information was available) to show possible accuracy given perfect information about drift. Parameter selection is difficult when evaluating methods for concept drift. Train-test-and-validate methods such as k-fold cross validation are not appropriate because the observations are ordered and not assumed to be identically distributed. We therefore tested each learner on each problem using each of a set of values for each parameter. Due to limited space, we present results for each learning method using the best parameter settings we found. We make no claim that these parameters are optimal, but they are representative of the overall trends we observed. We performed this parameter search for all the learning methods. The parameters we tested were λ ∈{10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000}, φ ∈{10−2, 10−3, 10−4}, β ∈{0.25, 0.5, 0.75, 0.9}, and θ ∈{10−2, 10−3, 10−4, 0}. 5 Table 2: Accuracy on the CAP and electricity data sets. PBCMC BCMC BMC DWM BNB λ = 10, 000, φ = 10−4 λ = 5, 000 λ = 10 β = 0.75, θ = 10−4 Location 63.74 63.92 63.15 65.76 62.14 Duration 63.15 63.03 64.10 66.35 62.37 Start Time 38.40 39.17 35.19 37.98 32.40 Day of Week 51.81 51.81 51.22 51.28 51.22 Average 54.27 54.48 53.41 55.34 52.03 λ = 10, φ = 10−2 λ = 10 λ = 10 β = 0.25, θ = 10−3 Electricity 85.32 85.33 65.37 82.31 62.44 4.3 Results and analysis Table 1 shows the top results for the STAGGER and SEA concepts. On the STAGGER concepts, PBCMC and BCMC performed almost identically and have a higher mean AUC than BMC, but their 95% confidence intervals overlap. PBCMC and BCMC outperformed DWM. On the SEA concepts, DWM was the top performer, matching the accuracy of BNB trained on each concept and outperforming all the other learner methods. BCMC was next, followed by PBCMC, then BMC, and the BNB. Table 2 shows the top results for the CAP and electricity data sets. DWM performed the best on the location and duration data sets, while BCMC performed best on the start time and day-of-week data sets. PBCMC matched the accuracy of BCMC on the day-of-week and duration data sets and came close to it on the others. DWM had the highest mean accuracy over all four tasks, followed by PBCMC and BCMC, then BMC, and finally BNB. BCMC performed the best on the electricity data set, closely followed by PBCMC. The first conclusion is clear: looking for changes in the conditional distribution p(Y |X) led to better accuracy than looking for changes in the joint distribution p(Y, X). With the close exception of the duration problem in the CAP data sets, PBCMC and BCMC outperformed BMC, sometimes dramatically so. What is less clear is the relative merits of PBCMC and DWM. We now analyze these learners to better understand address this question. 4.3.1 Reactivity versus stability The four test problems can be partitioned into two subsets: those on which PBCMC was generally more accurate (STAGGER and electricity) and those on which DWM was (SEA and CAP). We can obtain further insight into what separates these two subsets by noting that both PBCMC and DWM can be said to have “strategies,” which are determined by their parameters. For PBCMC, higher values of λ mean that it will assign less probability initially to new models. For DWM, higher values of β mean that it will penalize models less for making mistakes. For both, lower values of φ and θ respectively mean that they are slower to completely remove poorly performing models from consideration. We can thus interpret these parameters to describe how “reactive” or “stable” the learners are, i.e., the degree to which new observations can alter their hypotheses [4]. The two subsets are also partitioned by the strategy which was superior for the problems in each. For both PBCMC and DWM, some of the most reactive parameterizations we tested were optimal on STAGGER and electricity, but some of the most stable were optimal on SEA and CAP. Further, we observed generally stratified results across parameterizations. For each problem, almost all of the parameterizations of the top learner were more accurate than almost all of the parameterizations of the other. This indicates that PBCMC was generally better for the concepts which favor reactivity, whereas DWM was generally better for the concepts which favor stability. 4.3.2 Closing the performance gaps We now consider why these gaps in performance exist and how they might be closed. Figure 1 shows the average accuracies of PBCMC and DWM at each time step on the STAGGER and SEA concepts. These are for the experiments reported in Table 1, so the parameters, numbers of trials, etc. are the same. We present 95% confidence intervals at selected time steps for both. Figure 1 shows that the 6 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 120 Predictive Accuracy (%) Time Step (t) PBCMC, λ = 20, φ = 10-4 DWM, β = 0.5, θ = 10-4 (a) 86 88 90 92 94 96 98 100 0 12500 25000 37500 50000 Predictive Accuracy (%) Time Step (t) PBCMC, λ = 10000, φ = 10-4 DWM, β = 0.9, θ = 10-3 (b) Figure 1: Average accuracy on (a) the STAGGER concepts and (b) the SEA concepts. See text for details. better performing learners in each problem were faster to react to concept drift. This shows that DWM did not perform better on SEA simply by being more stable whether the concept was or not. On the SEA concepts, PBCMC did perform best with the most stable parameterization we tried, but its main problem was that it wasn’t reactive enough when drift occurred. We first consider whether the problem is one of parameter selection. Perhaps we can achieve better performances by using a more reactive parameterization of DWM on certain problems and/or a more stable parameterization of PBCMC on other problems. Our experimental results cast doubt on this proposition. For the problems on which PBCMC was superior, DWM’s best results were not obtained using the most reactive parameterization. In other words, simply using an even more reactive parameterization of DWM did not improve performance on these problems. Further, on the duration problem in the CAP data sets, PBCMC also achieved the reported accuracy using λ = 5000 and φ = 10−2, and on the location problem it acheived negligibly better accuracy using λ = 5000 and φ = 10−3 or φ = 10−4. Therefore, simply using an even more stable parameterization of PBCMC did not improve performance on these problems either. BCMC, which is just PBCMC with φ = 0, did outperform PBCMC on SEA. It reacted more quickly than PBCMC did, but not as quickly as DWM did, and at a much greater computational cost, since it had to maintain every model in order to have the one(s) which would eventually gain weight relative to the other models. BCMC also was not a significant improvement over PBCMC on the location and duration problems. We therefore theorize that the primary reason for the differences in performance between PBCMC and DWM is their approaches to updating their ensembles, which determines how they react to drift. PBCMC favors reactivity by adding a new model at every time step and decaying the weights of all models by the degree to which they are incorrect. DWM favors stability by only adding a new model after incorrect overall predictions and only decaying weights of incorrect models, and then only by a constant factor. This is supported by the results on problems favoring reactive parameterizations compared with the results on problems favoring stable parameterizations. Further, that it is difficult to close the performance gaps with better parameter selection suggests that there is a range of reactivity or stability each favors. When parameterized beyond this range, the performance of each learner degrades, or at least plateaus. To further support this theory, we consider trends in ensemble sizes. Figure 2 shows the average number of models in the ensembles of PBCMC and DWM at each time step on the STAGGER and SEA concepts. These are again for the experiments reported in Table 1, and again we present 95% confidence intervals at selected time steps for both. The figure shows that the trends in ensemble sizes were roughly interchanged between the two learners on the two problems. On both problems, one learner stayed within a relatively small range of ensemble sizes, whereas the other continued to expand the ensemble when the concept was stable, only significantly pruning soon after drift. On STAGGER, PBCMC expanded its ensemble size far more, whereas DWM did on SEA. This agrees with our expectations for the synthetic concepts. STAGGER contains no noise, whereas SEA does, which complements the designs of the two learners. When noise is more likely, DWM will update 7 0 10 20 30 40 50 60 70 0 20 40 60 80 100 120 Ensemble size Time Step (t) PBCMC, λ = 20, φ = 10-4 DWM, β = 0.5, θ = 10-4 (a) 0 200 400 600 800 1000 1200 1400 0 12500 25000 37500 50000 Ensemble size Time Step (t) PBCMC, λ = 10000, φ = 10-4 DWM, β = 0.9, θ = 10-3 (b) Figure 2: Average numbers of models on (a) the STAGGER concepts and (b) the SEA concepts. See text for details. its ensemble more than when it is not as likely. However, when noise is more likely, PBCMC will usually have difficulty preserving high weights for models which are actually useful. Conversely, PBCMC regularly updates its ensemble, and DWM will have less difficulty maintaining high weights on good models because it only decays weights by a constant factor. Therefore, it seems that each learner reaches the boundary of its favored range of reactivity or stability when further changes in that direction cause it to either be so reactive that it often assigns relatively high probability of drift to many time steps for which there was no drift, or so stable that it cannot react to actual drift. On STAGGER, PBCMC matched the performance of BNB on the first target concept (not shown), whereas DWM made more mistakes as it reacted to erroneously inferred drift. On SEA, PBCMC needs to be parameterized to be so stable that it cannot react quickly to drift. 5 Conclusion and Future Work In this paper we presented a Bayesian approach to coping with concept drift. Empirical evaluations supported our method. We showed that looking for changes in the conditional distribution p(Y |X) led to better accuracy than looking for changes in the joint distribution p(Y, X). We also showed that our Bayesian approach is competitive with one of the top ensemble methods for concept drift, DWM, sometimes beating and sometimes losing to it. Finally, we explored why each method sometimes outperforms the other. We showed that both PBCMC and DWM appear to favor a different range of reactivity or stability. Directions for future work include integrating the advantages of both PBCMC and DWM into a single learner. Related to this task is a better characterization of their relative advantages and the relationships among them, their favored ranges of reactivity or stability, and the problems to which they are applied. It also important to note that the more constrained ensemble sizes discussed above correspond to faster classification speeds. Future work could explore how to balance this desiderata with the desire for better accuracy. Finally, another direction is to integrate a Bayesian approach with other probabilistic models. With a useful probabilistic model for concept drift, such as ours, one could potentially incorporate existing probabilistic domain knowledge to guide the search for drift points or build broader models that use beliefs about drift to guide decision making. Acknowledgments The authors wish to thank the anonymous reviewers for their constructive feedback. The authors also wish to thank Lise Getoor and the Department of Computer Science at the University of Maryland, College Park. This work was supported by the Georgetown University Undergraduate Research Opportunities Program. 8 References [1] J. C. Schlimmer and R. H. Granger. Beyond incremental processing: Tracking concept drift. In Proceedings of the Fifth National Conference on Artificial Intelligence, pages 502–507, Menlo Park, CA, 1986. AAAI Press. [2] G. Hulten, L. Spencer, and P. Domingos. Mining time-changing data streams. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 97–106, New York, NY, 2001. ACM Press. [3] G. Widmer and M. Kubat. Learning in the presence of concept drift and hidden contexts. Machine Learning, 23:69–101, 1996. [4] S. H. Bach and M. A. Maloof. Paired learners for concept drift. In Proceedings of the Eighth IEEE International Conference on Data Mining, pages 23–32, Los Alamitos, CA, 2008. IEEE Press. [5] J. Z. Kolter and M. A. Maloof. Dynamic weighted majority: An ensemble method for drifting concepts. Journal of Machine Learning Research, 8:2755–2790, Dec 2007. [6] J. Z. Kolter and M. A. Maloof. Using additive expert ensembles to cope with concept drift. In Proceedings of the Twenty-second International Conference on Machine Learning, pages 449–456, New York, NY, 2005. ACM Press. [7] H. Wang, W. Fan, P. S. Yu, and J. Han. Mining concept-drifting data streams using ensemble classifiers. In Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 226–235, New York, NY, 2003. ACM Press. [8] W. N. Street and Y. Kim. A streaming ensemble algorithm (SEA) for large-scale classification. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 377–382, New York, NY, 2001. ACM Press. [9] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, Berlin-Heidelberg, 2006. [10] D. Barry and J. A. Hartigan. A Bayesian analysis for change point problems. Journal of the American Statistical Association, 88(421):309–319, 1993. [11] D. Barry and J. A. Hartigan. Product partition models for change point problems. The Annals of Statistics, 20(1):260–279, 1992. [12] Paul Fearnhead. Exact and efficient Bayesian inference for multiple changepoint problems. Statistics and Computing, 16(2):203–213, 2006. [13] P. Fearnhead and Z. Liu. On-line inference for multiple changepoint problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 69(4):589–605, September 2007. [14] R.P. Adams and D.J.C. MacKay. Bayesian online changepoint detection. Technical report, University of Cambridge, 2007. http://www.inference.phy.cam.ac.uk/rpa23/papers/rpachangepoint.pdf. [15] A. Blum. Empirical support for winnow and weighted-majority algorithms: Results on a calendar scheduling domain. Machine Learning, 26:5–23, 1997. [16] T. M. Mitchell, R. Caruana, D. Freitag, J. McDermott, and D. Zabowski. Experience with a learning personal assistant. Communications of the ACM, 37(7):80–91, July 1994. [17] M. Harries, C. Sammut, and K. Horn. Extracting hidden context. Machine Learning, 32(2):101–126, 1998. 9
2010
179
3,942
Guaranteed Rank Minimization via Singular Value Projection Prateek Jain Microsoft Research Bangalore Bangalore, India prajain@microsoft.com Raghu Meka UT Austin Dept. of Computer Sciences Austin, TX, USA raghu@cs.utexas.edu Inderjit Dhillon UT Austin Dept. of Computer Sciences Austin, TX, USA inderjit@cs.utexas.edu Abstract Minimizing the rank of a matrix subject to affine constraints is a fundamental problem with many important applications in machine learning and statistics. In this paper we propose a simple and fast algorithm SVP (Singular Value Projection) for rank minimization under affine constraints (ARMP) and show that SVP recovers the minimum rank solution for affine constraints that satisfy a restricted isometry property (RIP). Our method guarantees geometric convergence rate even in the presence of noise and requires strictly weaker assumptions on the RIP constants than the existing methods. We also introduce a Newton-step for our SVP framework to speed-up the convergence with substantial empirical gains. Next, we address a practically important application of ARMP - the problem of lowrank matrix completion, for which the defining affine constraints do not directly obey RIP, hence the guarantees of SVP do not hold. However, we provide partial progress towards a proof of exact recovery for our algorithm by showing a more restricted isometry property and observe empirically that our algorithm recovers low-rank incoherent matrices from an almost optimal number of uniformly sampled entries. We also demonstrate empirically that our algorithms outperform existing methods, such as those of [5, 18, 14], for ARMP and the matrix completion problem by an order of magnitude and are also more robust to noise and sampling schemes. In particular, results show that our SVP-Newton method is significantly robust to noise and performs impressively on a more realistic power-law sampling scheme for the matrix completion problem. 1 Introduction In this paper we study the general affine rank minimization problem (ARMP), min rank(X) s.t A(X) = b, X ∈Rm×n, b ∈Rd, (ARMP) where A is an affine transformation from Rm×n to Rd. The affine rank minimization problem above is of considerable practical interest and many important machine learning problems such as matrix completion, low-dimensional metric embedding, lowrank kernel learning can be viewed as instances of the above problem. Unfortunately, ARMP is NP-hard in general and is also NP-hard to approximate ([22]). Until recently, most known methods for ARMP were heuristic in nature with few known rigorous guarantees. In a recent breakthrough, Recht et al. [24] gave the first nontrivial results for the 1 problem obtaining guaranteed rank minimization for affine transformations A that satisfy a restricted isometry property (RIP). Define the isometry constant of A, δk to be the smallest number such that for all X ∈Rm×n of rank at most k, (1 −δk)∥X∥2 F ≤∥A(X)∥2 2 ≤(1 + δk)∥X∥2 F . (1) The above RIP condition is a direct generalization of the RIP condition used in the compressive sensing context. Moreover, RIP holds for many important practical applications of ARMP such as image compression, linear time-invariant systems. In particular, Recht et al. show that for most natural families of random measurements, RIP is satisfied even for only O(nk log n) measurements. Also, Recht et al. show that for ARMP with isometry constant δ5k < 1/10, the minimum rank solution can be recovered by the minimum trace-norm solution. In this paper we propose a simple and efficient algorithm SVP (Singular Value Projection) based on the projected gradient algorithm. We present a simple analysis showing that SVP recovers the minimum rank solution for noisy affine constraints that satisfy RIP and prove the following guarantees. (Independent of our work, Goldfarb and Ma [12] proposed an algorithm similar to SVP. However, their analysis and formulation is different from ours. They also require stronger isometry assumptions, δ3k < 1/ √ 30, than our analysis.) Theorem 1.1 Suppose the isometry constant of A satisfies δ2k < 1/3 and let b = A(X∗) for a rank-k matrix X∗. Then, SVP (Algorithm 1) with step-size ηt = 1/(1 + δ2k) converges to X∗. Furthermore, SVP outputs a matrix X of rank at most k such that ∥A(X) −b∥2 2 ≤ϵ and ∥X − X∗∥2 F ≤ϵ/(1 −δ2k) in at most ⌈ 1 log((1−δ2k)/2δ2k) log ∥b∥2 2ϵ ⌉ iterations. Theorem 1.2 (Main) Suppose the isometry constant of A satisfies δ2k < 1/3 and let b = A(X∗)+e for a rank k matrix X∗and an error vector e ∈Rd. Then, SVP with step-size ηt = 1/(1 + δ2k) outputs a matrix X of rank at most k such that ∥A(X) −b∥2 2 ≤C∥e∥2 + ϵ and ∥X −X∗∥2 F ≤ C∥e∥2+ϵ 1−δ2k , ϵ ≥0, in at most ⌈ 1 log(1/D) log ∥b∥2 2(C∥e∥2+ϵ) ⌉ iterations for universal constants C, D. As our SVP algorithm is based on projected gradient descent, it behaves as a first order methods and may require a relatively large number of iterations to achieve high accuracy, even after identifying the correct row and column subspaces. To this end, we introduce a Newton-type step in our framework (SVP-Newton) rather than using a simple gradient-descent step. Guarantees similar to Theorems 1.1, 1.2 follow easily for SVP-Newton using the proofs for SVP. In practice, SVP-Newton performs better than SVP in terms of accuracy and number of iterations. We next consider an important application of ARMP: the low-rank matrix completion problem (MCP)— given a small number of entries from an unknown low-rank matrix, the task is to complete the missing entries. Note that RIP does not hold directly for this problem. Recently, Candes and Recht [6], Candes and Tao [7] and Keshavan et al. [14] gave the first theoretical guarantees for the problem obtaining exact recovery from an almost optimal number of uniformly sampled entries. While RIP does not hold for MCP, we show that a similar property holds for incoherent matrices [6]. Given our refined RIP and a hypothesis bounding the incoherence of the iterates arising in SVP, an analysis similar to that of Theorem 1.1 immediately implies that SVP optimally solves MCP. We provide strong empirical evidence for our hypothesis and show that that both of our algorithms recover a low-rank matrix from an almost optimal number of uniformly sampled entries. In summary, our main contributions are: • Motivated by [11], we propose a projected gradient based algorithm, SVP, for ARMP and show that our method recovers the optimal rank solution when the affine constraints satisfy RIP. To the best of our knowledge, our isometry constant requirements are least stringent: we only require δ2k < 1/3 as opposed to δ5k < 1/10 by Recht et al., δ3k < 1/4 √ 3 by Lee and Bresler [18] and δ4k < 0.04 by Lee and Bresler [17]. • We introduce a Newton-type step in the SVP method which is useful if high precision is critically. SVP-Newton has similar guarantees to that of SVP, is more stable and has better empirical performance in terms of accuracy. For instance, on the Movie-lens dataset [1] and rank k = 3, SVP-Newton achieves an RMSE of 0.89, while SVT method [5] achieves an RMSE of 0.98. • As observed in [23], most trace-norm based methods perform poorly for matrix completion when entries are sampled from more realistic power-law distributions. Our method SVP-Newton is relatively robust to sampling techniques and performs significantly better than the methods of [5, 14, 23] even for power-law distributed samples. 2 • We show that the affine constraints in the low-rank matrix completion problem satisfy a weaker restricted isometry property and as supported by empirical evidence, conjecture that SVP (as well as SVP-Newton) recovers the underlying matrix from an almost optimal number of uniformly random samples. • We evaluate our method on a variety of synthetic and real-world datasets and show that our methods consistently outperform, both in accuracy and time, various existing methods [5, 14]. 2 Method In this section, we first introduce our Singular Value Projection (SVP) algorithm for ARMP and present a proof of its optimality for affine constraints satisfying RIP (1). We then specialize our algorithm for the problem of matrix completion and prove a more restricted isometry property for the same. Finally, we introduce a Newton-type step in our SVP algorithm and prove its convergence. 2.1 Singular Value Decomposition (SVP) Consider the following more robust formulation of ARMP (RARMP), min X ψ(X) = 1 2∥A(X) −b∥2 2 s.t X ∈C(k) = {X : rank(X) ≤k}. (RARMP) The hardness of the above problem mainly comes from the non-convexity of the set of low-rank matrices C(k). However, the Euclidean projection onto C(k) can be computed efficiently using singular value decomposition (SVD). Our algorithm uses this observation along with the projected gradient method for efficiently minimizing the objective function specified in (RARMP). Let Pk : Rm×n →Rm×n denote the orthogonal projection on to the set C(k). That is, Pk(X) = argminY {∥Y −X∥F : Y ∈C(k)}. It is well known that Pk(X) can be computed efficiently by computing the top k singular values and vectors of X. In SVP, a candidate solution to ARMP is computed iteratively by starting from the all-zero matrix and adapting the classical projected gradient descent update as follows (note that ∇ψ(X) = AT (A(X) −b)): Xt+1 ←Pk ( Xt −ηt∇ψ(Xt) ) = Pk ( Xt −ηtAT (A(Xt) −b) ) . (1) Figure 1 presents SVP in more detail. Note that the iterates Xt are always low-rank, facilitating faster computation of the SVD. See Section 3 for a more detailed discussion of computational issues. Algorithm 1 Singular Value Projection (SVP) Algorithm Require: A, b, tolerance ε, ηt for t = 0, 1, 2, . . . 1: Initialize: X0 = 0 and t = 0 2: repeat 3: Y t+1 ←Xt −ηtAT (A(Xt) −b) 4: Compute top k singular vectors of Y t+1: Uk, Σk, Vk 5: Xt+1 ←UkΣkV T k 6: t ←t + 1 7: until ∥A(Xt+1) −b∥2 2 ≤ε Analysis for Constraints Satisfying RIP Theorem 1.1 shows that SVP converges to an ϵ-approximate solution of RARMP in O(log ∥b∥2 ϵ ) steps. Theorem 1.2 shows a similar result for the noisy case. The theorems follow from the following lemma that bounds the objective function after each iteration. Lemma 2.1 Let X∗be an optimal solution of (RARMP) and let Xt be the iterate obtained by SVP at t-th iteration. Then, ψ(Xt+1) ≤ψ(X∗) + δ2k (1−δ2k)∥A(X∗−Xt)∥2 2, where δ2k is the rank 2k isometry constant of A. The lemma follows from elementary linear algebra, optimality of SVD (Eckart-Young theorem) and two simple applications of RIP. We refer to the supplementary material (Appendix A) for a detailed proof. We now prove Theorem 1.1. Theorem 1.2 can also be proved similarly; see supplementary material (Appendix A) for a detailed proof. Proof of Theorem 1.1 Using Lemma 2.1 and the fact that ψ(X∗) = 0, it follows that ψ(Xt+1) ≤ δ2k (1 −δ2k)∥A(X∗−Xt)∥2 2 = 2δ2k (1 −δ2k)ψ(Xt). 3 Also, note that for δ2k < 1/3, 2δ2k (1−δ2k) < 1. Hence, ψ(Xτ) ≤ ϵ where τ = ⌈ 1 log((1−δ2k)/2δ2k) log ψ(X0) ϵ ⌉ . Further, using RIP for the rank at most 2k matrix Xτ −X∗we get: ∥Xτ −X∗∥≤ψ(Xτ)/(1 −δ2k) ≤ϵ/(1 −δ2k). Now, the SVP algorithm is initialized using X0 = 0, i.e., ψ(X0) = ∥b∥2 2 . Hence, τ = ⌈ 1 log((1−δ2k)/2δ2k) log ∥b∥2 2ϵ ⌉ . 2.2 Matrix Completion We first describe the low-rank matrix completion problem formally. For Ω⊆[m] × [n], let PΩ: Rm×n →Rm×n denote the projection onto the index set Ω. That is, (PΩ(X))ij = Xij for (i, j) ∈ Ωand (PΩ(X))ij = 0 otherwise. Then, the low-rank matrix completion problem (MCP) can be formulated as follows, min X rank(X) s.t PΩ(X) = PΩ(X∗), X ∈Rm×n. (MCP) Observe that MCP is a special case of ARMP, so we can apply SVP for matrix completion. We use step-size ηt = 1/(1 + δ)p, where p is the density of sampled entries and δ is a parameter which we will explain later in this section. Using the given step-size and update (1), we get the following update for matrix-completion: Xt+1 ←Pk ( Xt − 1 (1 + δ)p(PΩ(Xt) −PΩ(X∗)) ) . (2) Although matrix completion is a special case of ARMP, the affine constraints that define MCP, PΩ, do not satisfy RIP in general. Thus Theorems 1.1, 1.2 above and the results of Recht et al. [24] do not directly apply to MCP. However, we show that the matrix completion affine constraints satisfy RIP for low-rank incoherent matrices. Definition 2.1 (Incoherence) A matrix X ∈Rm×n with singular value decomposition X = UΣV T is µ-incoherent if maxi,j |Uij| ≤ √µ √m, maxi,j |Vij| ≤ √µ √n. The above notion of incoherence is similar to that introduced by Candes and Recht [6] and also used by [7, 14]. Intuitively, high incoherence (i.e., µ is small) implies that the non-zero entries of X are not concentrated in a small number of entries. Hence, a random sampling of the matrix should provide enough global information to satisfy RIP. Using the above definition, we prove the following refined restricted isometry property. Theorem 2.2 There exists a constant C ≥0 such that the following holds for all 0 < δ < 1, µ ≥1, n ≥m ≥3: For Ω⊆[m] × [n] chosen according to the Bernoulli model with density p ≥Cµ2k2 log n/δ2m, with probability at least 1−exp(−n log n), the following restricted isometry property holds for all µ-incoherent matrices X of rank at most k: (1 −δ)p ∥X∥2 F ≤∥PΩ(X)∥2 F ≤(1 + δ)p ∥X∥2 F . (3) Roughly, our proof combines a Chernoff bound estimate for ∥PΩ(X)∥2 F with a union bound over low-rank incoherent matrices. A proof sketch is presented in Section 2.2.1. Given the above refined RIP, if the iterates arising in SVP are shown to be incoherent, the arguments of Theorem 1.1 can be used to show that SVP achieves exact recovery for low-rank incoherent matrices from uniformly sampled entries. As supported by empirical evidence, we hypothesize that the iterates Xt arising in SVP remain incoherent when the underlying matrix X∗is incoherent. Figure 1 (d) plots the maximum incoherence maxt µ(Xt) = √n maxt,i,j |U t ij|, where U t are the left singular vectors of the intermediate iterates Xt computed by SVP. The figure clearly shows that the incoherence µ(Xt) of the iterates is bounded by a constant independent of the matrix size n and density p throughout the execution of SVP. Figure 2 (c) plots the threshold sampling density p beyond which matrix completion for randomly generated matrices is solved exactly by SVP for fixed k and varying matrix sizes n. Note that the density threshold matches the optimal informationtheoretic bound [14] of Θ(k log n/n). Motivated by Theorem 2.2 and supported by empirical evidence (Figures 2 (c), (d)) we hypothesize that SVP achieves exact recovery from an almost optimal number of samples for incoherent matrices. Conjecture 2.3 Fix µ, k and δ ≤1/3. Then, there exists a constant C such that for a µincoherent matrix X∗of rank at most k and Ωsampled from the Bernoulli model with density p = Ωµ,k((log n)/m), SVP with step-size ηt = 1/(1 + δ)p converges to X∗with high probability. Moreover, SVP outputs a matrix X of rank at most k such that ∥PΩ(X) −PΩ(X∗)∥2 F ≤ϵ after Oµ,k (⌈ log ( 1 ϵ )⌉) iterations. 4 2.2.1 RIP for Matrix Completion on Incoherent Matrices We now prove the restricted isometry property of Theorem 2.2 for the affine constraints that result from the projection operator PΩ. To prove Theorem 2.2 we first show the theorem for a discrete collection of matrices using Chernoff type large-deviation bounds and use standard quantization arguments to generalize to the continuous case. We first introduce some notation and provide useful lemmas for our main proof1. First, we introduce the notion of α-regularity. Definition 2.2 A matrix X ∈Rm×n is α-regular if maxi,j |Xij| ≤ α √mn · ∥X∥F . Lemma 2.4 below relates the notion of regularity to incoherence and Lemma 2.5 proves (3) for a fixed regular matrix when the samples Ωare selected independently. Lemma 2.4 Let X ∈Rm×n be a µ-incoherent matrix of rank at most k. Then X is µ √ k-regular. Lemma 2.5 Fix a α-regular X ∈Rm×n and 0 < δ < 1. Then, for Ω⊆[m]×[n] chosen according to the Bernoulli model, with each pair (i, j) ∈Ωchosen independently with probability p, Pr [ ∥PΩ(X)∥2 F −p∥X∥2 F ≥δp∥X∥2 F ] ≤2 exp ( −δ2pmn 3 α2 ) . While the above lemma shows Equation (3) for a fixed rank k, µ-incoherent X (i.e., (µ √ k)-regular X using Lemma 2.4), we need to show Equation (3) for all such rank k incoherent matrices. To handle this problem, we discretize the space of low-rank incoherent matrices so as to be able to use the above lemma and a union bound. We now show the existence of a small set of matrices S(µ, ϵ) ⊆Rm×n such that every low-rank µ-incoherent matrix is close to an appropriately regular matrix from the set S(µ, ϵ). Lemma 2.6 For all 0 < ϵ < 1/2, µ ≥1, m, n ≥3 and k ≥1, there exists a set S(µ, ϵ) ⊆Rm×n with |S(µ, ϵ)| ≤(mnk/ϵ)3 (m+n)k such that the following holds. For any µ-incoherent X ∈Rm×n of rank k with ∥X∥2 = 1, there exists Y ∈S(µ, ϵ) s.t. ∥Y −X∥F < ϵ and Y is (4µ √ k)-regular. We now prove Theorem 2.2 by combining Lemmas 2.5, 2.6 and applying a union bound. We present a sketch of the proof but defer the details to the supplementary material (Appendix B). Proof Sketch of Theorem 2.2 Let S′(µ, ϵ) = {Y : Y ∈S(µ, ϵ), Y is 4µ √ k-regular}, where S(µ, ϵ) is as in Lemma 2.6 for ϵ = δ/9mnk. Let m ≤n. Then, by Lemma 2.5 and union bound, for any Y ∈S′(µ, ϵ), Pr [ ∥PΩ(Y )∥2 F −p∥Y ∥2 F ≥δp∥Y ∥2 F ] ≤2(mnk/ϵ)3(m+n)k exp (−δ2pmn 16µ2k ) ≤exp(C1nk log n)·exp (−δ2pmn 16µ2k ) , where C1 ≥0 is a constant independent of m, n, k. Thus, if p > Cµ2k2 log n/δ2m, where C = 16(C1 + 1), with probability at least 1 −exp(−n log n), the following holds ∀Y ∈S′(µ, ϵ), |∥PΩ(Y )∥2 F −p∥Y ∥2 F | ≤δp∥Y ∥2 F . (4) As the statement of the theorem is invariant under scaling, it is enough to show the statement for all µ-incoherent matrices X of rank at most k and ∥X∥2 = 1. Fix such a X and suppose that (4) holds. Now, by Lemma 2.6 there exists Y ∈S′(µ, ϵ) such that ∥Y −X∥F ≤ϵ. Moreover, ∥Y ∥2 F ≤(∥X∥F + ϵ)2 ≤∥X∥2 F + 2ϵ∥X∥F + ϵ2 ≤∥X∥2 F + 3ϵk. Proceeding similarly, we can show that |∥X∥2 F −∥Y ∥2 F | ≤3ϵk, |∥PΩ(Y )∥2 F −∥PΩ(X)∥2 F | ≤3ϵk. (5) Combining inequalities (4), (5) above, with probability at least 1 −exp(−n log n) we have, |∥PΩ(X)∥2 F −p∥X∥2 F | ≤|∥PΩ(X)∥2 F −∥PΩ(Y )∥2 F | + p |∥X∥2 F −∥Y ∥2 F | + |∥PΩ(Y )∥2 F −p∥Y ∥2 F | ≤2δp∥X∥2 F . The theorem follows using the above inequality. 2.3 SVP-Newton In this section we introduce a Newton-type step in our SVP method to speed up its convergence. Recall that each iteration of SVP (Equation (1)) takes a step along the gradient of the objective function and then projects the iterate to the set of low rank matrices using SVD. Now, the top k singular vectors (Uk, Vk) of Y t+1 = Xt−ηtAT (A(Xt)−b) determine the range-space and columnspace of the next iterate in SVP. Then, Σk is given by Σk = Diag(U T k (Xt−ηtAT (A(Xt)−b))Vk). 1Detailed proofs of all the lemmas in this section are provided in Appendix B of the supplementary material. 5 Hence, Σk can be seen as a product of gradient-descent step for a quadratic objective function, i.e., Σk = argminS ψ(UkSV T k ). This leads us to the following variant of SVP we call SVP-Newton:2 Compute top k-singular vectors Uk, Vk of Y t+1 = Xt −ηtAT (A(Xt) −b) Xt+1 = UkΣkVk, Σk = argmin S Ψ(UkSV T k ) = argmin S ∥A(UkΣkV T k ) −b∥2. Note that as A is an affine transformation, Σk can be computed by solving a least squares problem on k×k variables. Also, for a single iteration, given the same starting point, SVP-Newton decreases the objective function more than SVP. This observation along with straightforward modifications of the proofs of Theorems 1.1, 1.2 show that similar guarantees hold for SVP-Newton as well3. Note that the least squares problem for computing Σk has k2 variables. This makes SVP-Newton computationally expensive for problems with large rank, particularly for situations with a large number of constraints as is the case for matrix completion. To overcome this issue, we also consider the alternative where we restrict Σk to be a diagonal matrix, leading to the update Σk = argmin S,s.t.,Sij=0 for i̸=j ∥A(UkSV T k ) −b∥2 (6) We call the above method SVP-NewtonD (for SVP-Newton Diagonal). As for SVP-Newton, guarantees similar to SVP follow for SVP-NewtonD by observing that for each iteration, SVP-NewtonD decreases the objective function more than SVP. 3 Related Work and Computational Issues The general rank minimization problem with affine constraints is NP-hard and is also NP-hard to approximate [22]. Most methods for ARMP either relax the rank constraint to a convex function such as the trace-norm [8], [9], or assume a factorization and optimize the resulting non-convex problem by alternating minimization [4, 3, 15]. The results of Recht et al. [24] were later extended to noisy measurements and isometry constants up to δ3k < 1/4 √ 3 by Fazel et al. [10] and Lee and Bresler [18]. However, even the best existing optimization algorithms for the trace-norm relaxation are relatively inefficient in practice. Recently, Lee and Bresler [17] proposed an algorithm (ADMiRA) motivated by the orthogonal matching pursuit line of work in compressed sensing and show that for affine constraints with isometry constant δ4k ≤0.04, their algorithm recovers the optimal solution. However, their method is not very efficient for large datasets and when the rank of the optimal solution is relatively large. For the matrix-completion problem until the recent works of [6], [7] and [14], there were few methods with rigorous guarantees. The alternating least squares minimization heuristic and its variants [3, 15] perform the best in practice, but are notoriously hard to analyze. Candes and Recht [6], Candes and Tao [7] show that if X∗is µ-incoherent and the known entries are sampled uniformly at random with |Ω| ≥C(µ) k2n log2 n, finding the minimum trace-norm solution recovers the minimum rank solution. Keshavan et.al obtained similar results independently for exact recovery from uniformly sampled Ωwith |Ω| ≥C(µ, k) n log n. Minimizing the trace-norm of a matrix subject to affine constraints can be cast as a semi-definite program (SDP). However, algorithms for semi-definite programming, as used by most methods for minimizing trace-norm, are prohibitively expensive even for moderately large datasets. Recently, a variety of methods based mostly on iterative soft-thresholding have been proposed to solve the trace-norm minimization problem more efficiently. For instance, Cai et al. [5] proposed a Singular Value Thresholding (SVT) algorithm which is based on Uzawa’s algorithm [2]. A related approach based on linearized Bregman iterations was proposed by Ma et al. [20], Toh and Yun [25], while Ji and Ye [13] use Nesterov’s gradient descent methods for optimizing the trace-norm. While the soft-thresholding based methods for trace-norm minimization are significantly faster than SDP based approaches, they suffer from slow convergence (see Figure 2 (d)). Also, noisy measurements pose considerable computational challenges for trace-norm optimization as the rank of the intermediate iterates can become very large (see Figure 3(b)). 2We call our method SVP-Newton as the Newton method when applied to a quadratic objective function leads to the exact solution by solving the resulting least squares problem. 3As a side note, we can show a stronger result for SVP-Newton when applied to the special case of compressed-sensing, i.e., when the matrix X is restricted to be diagonal. Specifically, we can show that under certain assumptions SVP-Newton converges to the optimal solution in O(log k), improving upon the result of Maleki [21]. We give the precise statement of the theorem and proof in the supplementary material. 6 40 60 80 100 120 140 160 10 0 10 2 10 4 n (Size of Matrix) ARMP: Random Instances SVP SVT 600 800 1000 1200 1400 1600 0 2 4 6 8 10 12 ARMP: MIT Logo Number of Constraints Error (Frobenius Norm) SVP SVT 1000 2000 3000 4000 5000 0.02 0.04 0.06 0.08 0.1 n (Size of the matrix) SVP Density Threshold k = 10, threshold p k=10, Cklog(n)/n 1000 2000 3000 4000 5000 3.5 4 4.5 5 5.5 Incoherence (SVP) n (Size of the Matrix) µ p=.05 p=.15 p=.25 p=.35 (a) (b) (c) (d) Figure 1: (a) Time taken by SVP and SVT for random instances of the Affine Rank Minimization Problem (ARMP) with optimal rank k = 5. (b) Reconstruction error for the MIT logo. (c) Empirical estimates of the sampling density threshold required for exact matrix completion by SVP (here C = 1.28). Note that the empirical bounds match the information theoretically optimal bound Θ(k log n/n). (d) Maximum incoherence maxt µ(Xt) over the iterates of SVP for varying densities p and sizes n. Note that the incoherence is bounded by a constant, supporting Conjecture 2.3. 1000 2000 3000 4000 5000 −1 0 1 2 3 n (Size of Matrix) SVP−NewtonD SVP SVT ALS ADMiRA OPT 1000 2000 3000 4000 5000 0 1 2 3 4x 10 −3 n (Size of Matrix) RMSE SVP−NewtonD SVP SVT ALS ADMiRA OPT 2 4 6 8 10 10 0 10 1 10 2 10 3 k (Rank of Matrix) Time Taken (secs) SVP−NewtonD SVP SVT ALS ADMiRA OPT 1000 2000 3000 4000 5000 0 50 100 150 200 n (Size of Matrix) Number of Iterations SVP−NewtonD SVP SVT (a) (b) (c) (d) Figure 2: (a), (b) Running time (on log scale) and RMSE of various methods for matrix completion problem with sampling density p = .1 and optimal rank k = 2. (c) Running time (on log scale) of various methods for matrix completion with sampling density p = .1 and n = 1000. (d) Number of iterations needed to get RMSE 0.001. For the case of matrix completion, SVP has an important property facilitating fast computation of the main update in equation (2); each iteration of SVP involves computing the singular value decomposition (SVD) of the matrix Y = Xt + PΩ(Xt −X∗), where Xt is a matrix of rank at most k whose SVD is known and PΩ(Xt −X∗) is a sparse matrix. Thus, matrix-vector products of the form Y v can be computed in time O((m + n)k + |Ω|). This facilitates the use of fast SVD computing packages such as PROPACK [16] and ARPACK [19] that only require subroutines for computing matrix-vector products. 4 Experimental Results In this section, we empirically evaluate our methods for the affine rank minimization problem and low-rank matrix completion. For both problems we present empirical results on synthetic as well as real-world datasets. For ARMP we compare our method against the trace-norm based singular value thresholding (SVT) method [5]. Note that although Cai et al. present the SVT algorithm in the context of MCP, it can be easily adapted for ARMP. For MCP we compare against SVT, ADMiRA [17], the OptSpace (OPT) method of Keshavan et al. [14], and regularized alternating least squares minimization (ALS). We use our own implementation of SVT for ARMP and ALS, while for matrix completion we use the code provided by the respective authors for SVT, ADMiRA and OPT. We report results averaged over 20 runs. All the methods are implemented in Matlab and use mex files. 4.1 Affine Rank Minimization We first compare our method against SVT on random instances of ARMP. We generate random matrices X ∈Rn×n of different sizes n and fixed rank k = 5. We then generate d = 6kn random affine constraint matrices Ai and compute b = A(X). Figure 1(a) compares the computational time required by SVP and SVT (in log-scale) for achieving a relative error (∥A(X)−b∥2/∥b∥2) of 10−3, and shows that our method requires many fewer iterations and is significantly faster than SVT. Next we evaluate our method for the problem of matrix reconstruction from random measurements. As in Recht et al. [24], we use the MIT logo as the test image for reconstruction. The MIT logo we use is a 38 × 73 image and has rank four. For reconstruction, we generate random measurement matrices Ai and measure bi = Tr(AiX). We let both SVP and SVT converge and then compute the reconstruction error for the original image. Figure 1 (b) shows that our method incurs significantly smaller reconstruction error than SVT for the same number of measurements. Matrix Completion: Synthetic Datasets (Uniform Sampling) We now evaluate our method against various matrix completion methods for random low-rank ma7 k SVP-NewtonD SVP ALS SVT 2 0.90 1.15 0.88 1.06 3 0.89 1.14 0.87 0.98 5 0.89 1.09 0.86 0.95 7 0.89 1.08 0.86 0.93 10 0.90 1.07 0.87 0.91 12 0.91 1.08 0.88 0.90 (a) 1000 2000 3000 4000 5000 10 0 10 1 10 2 10 3 n (Size of Matrix) Time Taken (secs) SVP−NewtonD SVP SVT ALS 500 1000 1500 2000 0 0.5 1 1.5 2 2.5 n (Size of Matrix) RMSE ICMC ALS SVT SVP SVP NewtonD 500 1000 1500 2000 0 1 2 3 4 n (Size of Matrix) RMSE ICMC ALS SVT SVP SVP NewtonD (b) (c) (d) Figure 3: (a): RMSE incurred by various methods for matrix completion with different rank (k) solutions on Movie-Lens Dataset. (b): Time(on log scale) required by various methods for matrix completion with p = .1, k = 2 and 10% Gaussian noise. Note that all the four methods achieve similar RMSE. (c): RMSE incurred by various methods for matrix completion with p = 0.1, k = 10 when the sampling distribution follows Power-law distribution (Chung-Lu-Vu Model). (d): RMSE incurred for the same problem setting as plot (c) but with added Gaussian noise. trices and uniform samples. We generate a random rank k matrix X ∈Rn×n and generate random Bernoulli samples with probability p. Figure 2 (a) compares the time required by various methods (in log-scale) to obtain a root mean square error (RMSE) of 10−3 on the sampled entries for fixed k = 2. Clearly, SVP is substantially faster than the other methods. Next, we evaluate our method for increasing k. Figure 2 (b) compares the overall RMSE obtained by various methods. Note that SVP-Newton is significantly more accurate than both SVP and SVT. Figure 2 (c) compares the time required by various methods to obtain a root mean square error (RMSE) of 10−3 on the sampled entries for fixed n = 1000 and increasing k. Note that our algorithms scale well with increasing k and are faster than other methods. Next, we analyze reasons for better performance of our methods. To this end, we plot the number of iterations required by our methods as compared to SVT (Figure 2 (d)). Note that even though each iteration of SVT is almost as expensive as our methods’, our methods converge in significantly fewer iterations. Finally, we study the behavior of our method in presence of noise. For this experiment, we generate random matrices of different size and add approximately 10% Gaussian noise. Figure 2 (c) plots time required by various methods as n increases from 1000 to 5000. Note that SVT is particularly sensitive to noise. One of the reason for this is that due to noise, the rank of the intermediate iterates arising in SVT can be fairly large. Matrix Completion: Synthetic Dataset (Power-law Sampling) We now evaluate our methods against existing matrix-completion methods under more realistic power-law distributed samples. As before, we generate a random rank-k = 10 matrix X ∈Rn×n and sample the entries of X using a graph generated using Chung-Lu-Vu model with power-law distributed degrees (see [23]) for details. Figure 3 (c) plots the RMSE obtained by various methods for varying n and fixed sampling density p = 0.1. Note that SVP-NewtonD performs significantly better than SVT as well as SVP. Figure 3 (d) plots the RMSE obtained by various methods when each sampled entry is corrupted with around 1% Gaussian noise. Note that here again SVP-NewtonD performs similar to ALS and is significantly better than the other methods including the ICMC method [23] which is specially designed for power-law sampling but is quite sensitive to noise. Matrix Completion: Movie-Lens Dataset Finally, we evaluate our method on the Movie-Lens dataset [1], which contains 1 million ratings for 3900 movies by 6040 users. Figure 3 (a) shows the RMSE obtained by each method with varying k. For SVP and SVP-Newton, we fix step size to be η = 1/p √ (t), where t is the number of iterations. For SVT, we fix δ = .2p using cross-validation. Since, rank cannot be fixed in SVT, we try various values for the parameter τ to obtain the desired rank solution. Note that SVP-Newton incurs a RMSE of 0.89 for k = 3. In contrast, SVT achieves a RMSE of 0.98 for the same rank. We remark that SVT was able to achieve RMSE up to 0.89 but required rank 17 solution and was significantly slower in convergence because many intermediate iterates had large rank (up to around 150). We attribute the relatively poor performance of SVP and SVT as compared with ALS and SVP-Newton to the fact that the ratings matrix is not sampled uniformly, thus violating the crucial assumption of uniformly distributed samples. Acknowledgements: This research was supported in part by NSF grant CCF-0728879. 8 References [1] Movie lens dataset. Public dataset. URL http://www.grouplens.org/taxonomy/term/14. [2] K. Arrow, L. Hurwicz, and H. Uzawa. Studies in Linear and Nonlinear Programming. Stanford University Press, Stanford, 1958. [3] Robert Bell and Yehuda Koren. Scalable collaborative filtering with jointly derived neighborhood interpolation weights. In ICDM, pages 43–52, 2007. doi: 10.1109/ICDM.2007.90. [4] Matthew Brand. Fast online SVD revisions for lightweight recommender systems. In SIAM International Conference on Data Mining, 2003. [5] Jian-Feng Cai, Emmanuel J. Cand`es, and Zuowei Shen. A singular value thresholding algorithm for matrix completion. SIAM Journal on Optimization, 20(4):1956–1982, 2010. [6] Emmanuel J. Cand`es and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, December 2009. [7] Emmanuel J. Cand`es and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Trans. Inform. Theory, 56(5):2053–2080, 2009. [8] M. Fazel, H. Hindi, and S. Boyd. A rank minimization heuristic with application to minimum order system approximation. In American Control Conference, Arlington, Virginia, 2001. [9] M. Fazel, H. Hindi, and S. Boyd. Log-det heuristic for matrix rank minimization with applications to Hankel and Euclidean distance matrices. In American Control Conference, 2003. [10] M. Fazel, E. Candes, B. Recht, and P. Parrilo. Compressed sensing and robust recovery of low rank matrices. In Signals, Systems and Computers, 2008 42nd Asilomar Conference on, pages 1043–1047, Oct. 2008. doi: 10.1109/ACSSC.2008.5074571. [11] Rahul Garg and Rohit Khandekar. Gradient descent with sparsification: an iterative algorithm for sparse recovery with restricted isometry property. In ICML, 2009. [12] Donald Goldfarb and Shiqian Ma. Convergence of fixed point continuation algorithms for matrix rank minimization, 2009. Submitted. [13] Shuiwang Ji and Jieping Ye. An accelerated gradient method for trace norm minimization. In ICML, 2009. [14] Raghunandan H. Keshavan, Sewoong Oh, and Andrea Montanari. Matrix completion from a few entries. In ISIT’09: Proceedings of the 2009 IEEE international conference on Symposium on Information Theory, pages 324–328, Piscataway, NJ, USA, 2009. IEEE Press. ISBN 978-1-4244-4312-3. [15] Yehuda Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. In KDD, pages 426–434, 2008. doi: 10.1145/1401890.1401944. [16] R.M. Larsen. Propack: a software for large and sparse SVD calculations. Available online. URL http: //sun.stanford.edu/rmunk/PROPACK/. [17] Kiryung Lee and Yoram Bresler. Admira: Atomic decomposition for minimum rank approximation, 2009. [18] Kiryung Lee and Yoram Bresler. Guaranteed minimum rank approximation from linear observations by nuclear norm minimization with an ellipsoidal constraint, 2009. [19] Richard B. Lehoucq, Danny C. Sorensen, and Chao Yang. ARPACK Users’ Guide: Solution of LargeScale Eigenvalue Problems with Implicitly Restarted Arnoldi Methods. SIAM, Philadelphia, 1998. [20] S. Ma, D. Goldfarb, and L. Chen. Fixed point and bregman iterative methods for matrix rank minimization. To appear, Mathematical Programming Series A, 2010. [21] Arian Maleki. Coherence analysis of iterative thresholding algorithms. CoRR, abs/0904.1193, 2009. [22] Raghu Meka, Prateek Jain, Constantine Caramanis, and Inderjit S. Dhillon. Rank minimization via online learning. In ICML, pages 656–663, 2008. doi: 10.1145/1390156.1390239. [23] Raghu Meka, Prateek Jain, and Inderjit S. Dhillon. Matrix completion from power-law distributed samples. In NIPS, 2009. [24] Benjamin Recht, Maryam Fazel, and Pablo A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization, 2007. To appear in SIAM Review. [25] K.C. Toh and S. Yun. An accelerated proximal gradient algorithm for nuclear norm regularized least squares problems. Preprint, 2009. URL http://www.math.nus.edu.sg/˜matys/apg.pdf. 9
2010
18
3,943
Multivariate Dyadic Regression Trees for Sparse Learning Problems Han Liu and Xi Chen School of Computer Science, Carnegie Mellon University Pittsburgh, PA 15213 Abstract We propose a new nonparametric learning method based on multivariate dyadic regression trees (MDRTs). Unlike traditional dyadic decision trees (DDTs) or classification and regression trees (CARTs), MDRTs are constructed using penalized empirical risk minimization with a novel sparsity-inducing penalty. Theoretically, we show that MDRTs can simultaneously adapt to the unknown sparsity and smoothness of the true regression functions, and achieve the nearly optimal rates of convergence (in a minimax sense) for the class of (α, C)-smooth functions. Empirically, MDRTs can simultaneously conduct function estimation and variable selection in high dimensions. To make MDRTs applicable for large-scale learning problems, we propose a greedy heuristics. The superior performance of MDRTs are demonstrated on both synthetic and real datasets. 1 Introduction Many application problems need to simultaneously predict several quantities using a common set of variables, e.g. predicting multi-channel signals within a time frame, predicting concentrations of several chemical constitutes using the mass spectra of a sample, or predicting expression levels of many genes using a common set of phenotype variables. These problems can be naturally formulated in terms of multivariate regression. In particular, let { (x1, y1), . . . , (xn, yn) } be n independent and identically distributed pairs of data with xi ∈X ⊂Rd and yi ∈Y ⊂Rp for i = 1, . . . , n. Moreover, we denote the jth dimension of y by yj = (y1 j, . . . , yn j )T and kth dimension of x by xk = (x1 k, . . . , xn k)T . Without loss of generality, we assume X = [0, 1]d and the true model on yj is : yi j = fj(xi) + ϵi j, i = 1, . . . , n, (1) where fj : Rd →R is a smooth function. In the sequel, let f = (f1, . . . , fp), where f : Rd →Rp is a p-valued smooth function. The vector form of (1) then becomes yi = f(xi)+ϵi, i = 1, . . . , n. We also assume that the noise terms { ϵi j } i,j are independently distributed and bounded almost surely. This is a general setting of the nonparametric multivariate regression. From the minimax theory, we know that estimating f in high dimensions is very challenging. For example, when f1, . . . , fp lie in a d-dimensional Sobolev ball with order α and radius C, the best convergence rate for the minimax risk is p · n−2α/(2α+d). For a fixed α, such rate can be very slow when d becomes large. However, in many real world applications, the true regression function f may depend only on a small set of variables. In other words, the problem is jointly sparse: f(x) = f(xS) = (f1(xS), . . . , fp(xS)), where xS = (xk : k ∈S), S ⊂{1, . . . , d} is a subset of covariates with size r = |S| ≪d. If S has been given, the minimax lower bound can be improved to be p · n−2α/(2α+r), which is the best possible rate can be expected. For sparse learning problems, our task is to develop an estimator, which adaptively achieves this faster rate of convergence without knowing S in advance. 1 Previous research on these problems can be roughly divided into three categories: (i) parametric linear models, (ii) nonparametric additive models, and (iii) nonparametric tree models. The methods in the first category assume that the true models are linear and use some block-norm regularization to induce jointly sparse solutions [16, 11, 13, 5]. If the linear model assumptions are correct, accurate estimates can be obtained. However, given the increasing complexity of modern applications, conclusions inferred under these restrictive linear model assumptions can be misleading. Recently, significant progress has been made on inferring nonparametric additive models with joint sparsity constraints [7, 10]. For additive models, each fj(x) is assumed to have an additive form: fj(x) = ∑d k=1 fjk(xk). Although they are more flexible than linear models, the additivity assumptions might still be too stringent for real world applications. A family of more flexible nonparametric methods are based on tree models. One of the most popular tree methods is the classification and regression tree (CART) [2]. It first grows a full tree by orthogonally splitting the axes at locally optimal splitting points, then prunes back the full tree to form a subtree. Theoretically, CART is hard to analyze unless strong assumptions have been enforced [8]. In contrast to CART, dyadic decision trees (DDTs) are restricted to only axis-orthogonal dyadic splits, i.e. each dimension can only be split at its midpoint. For a broad range of classification problems, [15] showed that DDTs using a special penalty can attain nearly optimal rate of convergence in a minimax sense. [1] proposed a dynamic programming algorithm for constructing DDTs when the penalty term has an additive form, i.e. the penalty of the tree can be written as the sum of penalties on all terminal nodes. Though intensively studied for classification problems, the dyadic decision tree idea has not drawn much attention in the regression settings. One of the closest results we are aware of is [4], in which a single response dyadic regression procedure is considered for non-sparse learning problems. Another interesting tree model, “Bayesian Additive Regression Trees (BART)”, is proposed under Bayesian framework [6], which is essentially a “sum-of-trees” model. Most of the existing work adopt the number of terminal nodes as the penalty. Such penalty cannot lead to sparse models since a tree with a small number of terminal nodes might still involve too many variables. To obtain sparse models, we propose a new nonparametric method based on multivariate dyadic regression trees (MDRTs). Similar to DDTs, MDRTs are constructed using penalized empirical risk minimization. The novelty of MDRT is to introduce a sparsity-inducing term in the penalty, which explicitly induces sparse solutions. Our contributions are two-fold: (i) Theoretically, we show that MDRTs can simultaneously adapt to the unknown sparsity and smoothness of the true regression functions, and achieve the nearly optimal rate of convergence for the class of (α, C)smooth functions. (ii) Empirically, to avoid computationally prohibitive exhaustive search in high dimensions, we propose a two-stage greedy algorithm and its randomized version that achieve good performance in both function estimation and variable selection. Note that our theory and algorithm can be straightforwardly adapted to univariate sparse regression problem, which is a special case of the multivariate one. To the best of our knowledge, this is the first time such a sparsity-inducing penalty is equipped to tree models for solving sparse regression problems. The rest of this paper is organized as follows. Section 2 presents MDRTs in detail. Section 3 studies the statistical properties of MDRTs. Section 4 presents the algorithms which approximately compute the MDRT solutions. Section 5 reports empirical results of MDRTs and their comparison with CARTs. Conclusions are made in Section 6. 2 Multivariate Dyadic Regression Trees We adopt the notations in [15]. A MDRT T is a multivariate regression tree that recursively divides the input space X by means of axis-orthogonal dyadic splits. The nodes of T are associated with hyperrectangles (cells) in X = [0, 1]d. The root node corresponds to X itself. If a node is associated to the cell B = ∏d j=1[aj, bj], after being dyadically split on the dimension k, the two children are associated to the subcells Bk,1 and Bk,2: Bk,1 = { xi ∈B | xi k ≤ak + bk 2 } and Bk,2 = B \ Bk,1. The set of terminal nodes of a MDRT T is denoted as term(T). Let Bt be the cell in X induced by a terminal node t, the partition induced by term(T) can be denoted as π(T) = {Bt|t ∈term(T)}. 2 For each terminal node t, we can fit a multivariate m-th order polynomial regression on data points falling in Bt. Instead of using all covariates, such a polynomial regression is only fitted on a set of active variables, which is denoted as A(t). For each node b ∈T (not necessarily a terminal node), A(b) can be an arbitrary subset of {1, . . . , d} satisfying two rules: 1. If a node is dyadically split perpendicular to the axis k, k must belong to the active sets of its two children. 2. For any node b, let par(b) be its parent node, then A(par(b)) ⊂A(b). For a MDRT T, we define Fm T to be the class of p-valued measurable m-th order polynomials corresponding to π(T). Furthermore, for a dyadic integer N = 2L, let TN be the collection of all MDRTs such that no terminal cell has a side length smaller than 2−L. Given integers M and N, let FM,N be defined as FM,N = ∪0≤m≤M ∪T ∈TN Fm T . The final MDRT estimator with respect to FM,N, denoted as bf M,N, can then be defined as bf M,N = arg min f∈FM,N 1 n n ∑ i=1 ∥yi −f(xi)∥2 2 + pen(f). (2) To define in detail pen(f) for f ∈FM,N, let T and m be the MDRT and the order of polynomials corresponding to f, pen(f) then takes the following form: pen(f) = λ · p n ( log n(rT + 1)m(NT + 1)rT + |π(T)| log d ) , (3) where λ > 0 is a regularization parameter, rT = | ∪t∈term(T ) A(t)| corresponds to the number of relevant dimensions and NT = min{s ∈{1, 2, . . . , N} | T ∈Ts}. There are two terms in (3) within the parenthesis. The latter one penalizing the number of terminal nodes |π(T)| has been commonly adopted in the existing tree literature. The former one is novel. Intuitively, it penalizes non-sparse models since the number of relevant dimensions rT appears in the exponent term. In the next section, we will show that this sparsity-inducing term is derived by bounding the VC-dimension of the underlying subgraph of regression functions. Thus it has a very intuitive interpretation. 3 Statistical Properties In this section, we present theoretical properties of the MDRT estimator. Our main technical result is Theorem 1, which provides the nearly optimal rate of the MDRT estimator. To evaluate the algorithm performance, we use the L2-risk with respect to the Lebesgue measure µ(·), which is defined as R( bf, f) = E ∑p j=1 ∫ X | bfj(x) −fj(x)|2dµ(x), where bf is the function estimate constructed from n observed samples. Note that all the constants appear in this section are generic constants, i.e. their values can change from one line to another in the analysis. Let N0 = {0, 1, . . .} be the set of natural number, we first define the class of (α, C)-smooth functions. Definition 1 ((α, C)-smoothness) Let α = q + β for some q ∈N0, 0 < β ≤1, and let C > 0. A function g : Rd →R is called (α, C)-smooth if for every α = (α1, . . . , αd), αi ∈N0, ∑d j=1 αj = q, the partial derivative ∂qg ∂xα1 1 ...∂x αd d exists and satisfies, for all x, z ∈Rd, ∂qg(x) ∂xα1 1 . . . ∂xαd d − ∂qg(z) ∂xα1 1 . . . ∂xαd d ≤C · ∥x −z∥β 2. In the following, we denote the class of (α, C)-smooth functions by D(α, C). Assumption 1 We assume f1, . . . , fp ∈D(α, C) for some α, C > 0 and for all j ∈{1, . . . , p}, fj(x) = fj(xS) with r = |S| ≪d. Theorem 3.2 of [9] shows that the lower minimax rate of convergence for class D(α, C) is exactly the same as that for class of d-dimensional Sobolev ball with order α and radius C. 3 Proposition 1 The proof of this proposition can be found in [9]. lim inf n→∞ 1 p · n2α/(2α+d) inf b f sup f1,...,fp∈D(α,C) R( bf, f) > 0. Therefore, the lower minimax rate of convergence is p · n−2α/(2α+d). Similarly, if the problem is jointly sparse with the index set S and r = |S| ≪d, the best rate of convergence can be improved to p · n−2α/(2α+r) when S is given. The following is another technical assumption needed for the main theorem. Assumption 2 Let 1 ≤γ < ∞, we assume that max 1≤j≤p sup x |fj(x)| ≤γ and max 1≤i≤n ∥yi∥∞≤γ a.s. This condition is mild. Indeed, we can even allow γ to increase with the sample size n at a certain rate. This will not affect the final result. For example, when {ϵi j}i,j are i.i.d. Gaussian random variables, this assumption easily holds with γ = O(√log n), which only contributes a logarithmic term to the final rate of convergence. The next assumption specifies the scaling of the relevant dimension r and ambient dimension d with respect to the sample size n. Assumption 3 r = O(1) and d = O(exp(nξ)) for some 0 < ξ < 1. Here, r = O(1) is crucial, since even if r increases at a logarithmic rate with respect to n, i.e. r = O(log n), it is hopeless to get any consistent estimator for the class D(α, C) since n−(1/ log n) = 1/e. On the other hand, the ambient dimension d can increase exponentially fast with the sample size, which is a realistic scaling for high dimensional settings. The following is the main theorem. Theorem 1 Under Assumptions 1 to 3, there exist a positive number λ that only depends on α, γ and r, such that pen(f) = λ · p n ( (log n)(rT + 1)m(NT + 1)rT + |π(T)| log d ) , (4) For large enough M, N, the solution bf M,N obtained from (2) satisfies R( bf M,N, f) ≤c · p · (log n + log d n )2α/(2α+r) , (5) where c is some generic constant. Remark 1 As discussed in Proposition 1, the obtained rate of convergence in (5) is nearly optimal up to a logarithmic term. Remark 2 Since the estimator defined in (2) does not need to know the smoothness α and the sparsity level r in advance, MDRTs are simultaneously adaptive to the unknown smoothness and sparsity level. Proof of Theorem 1: To find an upper bound of R( bf M,N, f), we need to analyze and control the approximation and estimation errors separately. Our analysis closely follows the least squares regression analysis in [9] and some specific coding scheme of trees in [15]. Without loss of generality, we always assume bf M,N obtained from (2) satisfies the condition that max1≤j≤p supx |f M,N j (x)| ≤γ. if this is not true, we can always truncate bf M,N at the rate γ and obtain the desired result in Theorem 1. Let Sm T be the class of scalar-valued measurable m-th order polynomials corresponding to π(T), and let Gm T be the class of all subgraphs of functions of Sm T , i.e. Gm T = { (z, t) ∈Rd × R; t ≤g(z); g ∈Sm T } . Let VGm T be the VC-dimension of Gm T , we have the following lemma: 4 Lemma 1 Let rT and NT be defined as in (3), we know that VGm T ≤(rT + 1)m · (NT + 1)rT . (6) Sketch of Proof: From Theorem 9.5 of [9], we only need to show the dimension of Gm T is upper bounded by the R.H.S. of (6). By the definition of rT and NT , the result follows from a straightforward combinatorial analysis. □ The next lemma provides an upper bound of the approximation error for the class D(α, C). Lemma 2 Let f = (f1, . . . , fp) be the true regression function, there exists a set of piecewise polynomials h1, . . . , hp ∈∪T ∈TKSm T ∀j ∈{1, . . . , p}, sup x∈X |fj(x) −hj(x)| ≤cK−α where K ≤N, c is a generic constant depends on r. Sketch of Proof: This is a standard approximation result using multivariate piecewise polynomials. The main idea is based on a multivariate Taylor expansion of the function fj at a given point x0. Then try to utilize Definition 1 to bound the remainder terms. For the sake of brevity, we omit the technical details. □ The next lemma is crucial, it provides an oracle inequality to bound the risk using an approximation term and an estimation term. Its analysis follows from a simple adaptation of Theorem 12.1 on page 227 of [9]. First, we define eR(g, f) = ∑p j=1 ∫ X |gj(x) −fj(x)|2dµ(x), Lemma 3 [9] Choose pen(f) ≥5136 · pγ4 n ( log(120eγ4n)VGm T + [[T]] log 2 2 ) (7) for some prefix code [[T]] > 0 satisfying ∑ T ∈TN 2−[[T ]] ≤1. Then, we have R( bf M,N, f) ≤12840 · p · γ4 n + 2 inf T ∈TN inf g∈FM,N { p · pen(g) + eR(g, f) } . (8) One appropriate prefix code [[T]] for each MDRT T is proposed in [15], which specifies that [[T]] = 3|π(T)| −1 + (|π(T)| −1) log d/ log 2. A simpler upper bound for [[T]] is [[T]] ≤ (3 + log d/ log 2)|π(T)|. Remark 3 The derived constants in the Lemma 3 will be pessimistic due to the very large numerical values. This may result in selecting oversimplified tree structures. In practice, we always use crossvalidation to choose the tuning parameters. To prove Theorem 1, first, using Assumption 1 and Lemma 2, we know that for any K ≤N, there must exists generic constants c1, c2, c3 and a function f ′ that is conformal with a MDRT T ′ ∈TK, satisfying f ′(x) = f ′(xS) and |π(T ′)| ≤(K + 1)r such that eR(f ′, f) ≤c1 · p · K−2α, (9) and pen(f ′) ≤ c2 (log n)(r + 1)M(K + 1)r n + c3 log d(K + 1)r n . (10) The desired result then follows by plugging (9) and (10) into (8) and balancing these three terms. 4 Computational Algorithm Exhaustive search of bf M,N in the MDRT space has similar complexity as that of DDTs and could be computationally very expansive. To make MDRTs scalable for high dimensional massive datasets, using similar ideas as CARTs, we propose a two-stage procedure: (1) we grow a full tree in a greedy manner; (2) we prune back the full tree to from the final tree. Before going to the detail of the algorithm, we firstly introduce some necessary notations. Given a MDRT T, denote the corresponding multivariate m-th order polynomial fit on π(T) by bf m T = { bf m t }t∈π(T ), where bf m t is the m-th order polynomial regression fit on the partition Bt. For 5 each xi falling in Bt, let bf m t (xi, A(t)) be the predicted function value for xi. We denote the the local squared error (LSE) on node t by bRm(t, A(t)): bRm(t, A(t)) = 1 n ∑ xi∈Bt ∥yi −bf m t (xi, A(t))∥2 2. It is worthwhile noting that bRm(t, A(t)) is calculated as the average with respect to the total sample size n, instead of the number of data points contained in Bt. The total MSE of the tree bR(T) can then be computed by the following equation: bR(T) = ∑ t∈term(T ) bRm(t, A(t)). The total cost of T, which is defined as the the right hand side of (2), then can be written as: bC(T) = bR(T) + pen( bf m T ). (11) Our goal is to find the tree structure with the polynomial regression on each terminal node that can minimize the total cost. The first stage is tree growing, in which a terminal node t is first selected in each step. We then perform one of two actions a1 and a2: a1: adding another dimension k ̸∈A(t) to A(t), and refit the regression model on all data points falling in Bt; a2: dyadically splitting t perpendicular to the dimension k ∈A(t). In each tree growing step, we need to decide which action to perform. For action a1, we denote the drop in LSE as: ∆bRm 1 (t, k) = bRm(t, A(t)) −bRm(t, A(t) ∪{k}). (12) For action a2, let sl(t(k)) be the side length of Bt on dimension k ∈A(t). If sl(t(k)) > 2−L, the dimension k of Bt can then be dyadically split. In this case, let t(k) L and t(k) R be the left and right child of node t. The drop in LSE takes the following form: ∆bRm 2 (t, k) = bRm(t, A(t)) −bRm(t(k) L , A(t) −bRm(t(k) R , A(t)). (13) For each terminal node t, we greedily perform the action a∗on the dimension k∗, which are determined by (a∗, k∗) = argmax a∈{1,2},k∈{1...d} ∆bRm a (t, k). (14) In high dimensional setting, the above greedy procedure may not lead to the optimal tree since successively locally optimal splits cannot guarantee the global optimum. Once an irrelevant dimension has been added in or split, the greedy procedure can never fix the mistake. To make the algorithm more robust, we propose a randomized scheme. Instead of greedily performing the action on the dimension that leads the maximum drop in LSE, we randomly choose which action to perform according to a multinomial distribution. In particular, we normalize ∆bR such that: 2 ∑ a=1 ∑ k ∆bRm a (t, k) = 1. (15) And a sample (a∗, k∗) is drawn from multinomial(1, ∆bR). The action a∗is then performed on the dimension k∗. In general, when the randomized scheme is adopted, we need to repeat our algorithm many times to pick the best tree. The second stage is cost complexity pruning. For each step, we either merge a pair of terminal nodes or remove a variable from the active set of a terminal node such that the resulted tree has the smaller cost. We repeat this process until the tree becomes a single root node with an empty active set. The tree with the minimum cost in this process is returned as the final tree. The pseudocode for the growing stage and cost complexity pruning stage are presented in the Appendix. Moreover, to avoid a cell with too few data points, we pre-define a quantity nmax. Let n(t) be the the number of data points fall into Bt, if n(t) ≤nmax, Bt will no longer be split. It is worthwhile noting that we ignore those actions that lead to ∆R = 0. In addition, whenever we perform the mth order polynomial regression on the active set of a node, we need to make sure it is not rank deficient. 6 5 Experimental Results In this section, we present numerical results for MDRTs applied to both synthetic and real datasets. We compare five methods: [1] Greedy MDRT with M = 1 (MDRT(G, M=1)); [2] Randomized MDRT with M = 1 (MDRT(R, M=1)); [3] Greedy MDRT with M = 0 (MDRT(G, M=0)); [4] Randomized MDRT with M = 0 (MDRT(R, M=0)); [5] CART. For randomized scheme, we run 50 random trials and pick the minimum cost tree. As for CART, we adopt the MATLAB package from [12], which fits piecewise constant on each terminal node with the cost complexity criterion: bC(T) = bR(T) + ρ p n|π(T)|, where ρ is the tuning parameter playing the same role as λ in (3). Synthetic Data: For the synthetic data experiment, we consider the high dimensional compound symmetry covariance structure of the design matrix with n = 200 and d = 100. Each dimension xj is generated according to xj = Wj + tU 1 + t , j = 1, . . . , d, where W1, . . . , Wd and U are i.i.d. sampled from Uniform(0,1). Therefore the correlation between xj and xk is t2/(1 + t2) for j ̸= k. We study three models as shown below: the first one is linear; the second one is nonlinear but additive; the third one is nonlinear with three-way interactions. All these models only involve four relevant variables. The noise terms, denoted as ϵ , are independently drawn from a standard normal distribution. Model 1: yi 1 = 2xi 1 + 3xi 2 + 4xi 3 + 5xi 4 + ϵi 1 yi 2 = 5xi 1 + 4xi 2 + 3xi 3 + 2xi 4 + ϵi 2 Model 2: yi 1 = exp(xi 1) + (xi 2)2 + 3xi 3 + 2xi 4 + ϵi 1 yi 2 = (xi 1)2 + 2xi 2 + exp(xi 3) + 3xi 4 + ϵi 2 Model 3: yi 1 = exp(2xi 1xi 2 + xi 3) + xi 4 + ϵi 1 yi 2 = sin(xi 1xi 2) + (xi 3)2 + 2xi 4 + ϵi 2 We compare the performances of different methods using two criteria: (i) variable selection and (ii) function estimation. For each model, we generate 100 designs and an equal-sized validation set per design. For more detailed experiment protocols, we set nmax = 5 and L = 6. By varying the values of λ or ρ from large to small, we obtain a full regularization path. The tree with the minimum MSE on the validation set is then picked as the best tree. For criterion (i), if the variables involved in the best tree are exactly the first four variables, the variable selection task for this design is deemed as successful. The numerical results are presented in Table 1. For each method, the three quantities reported in order are the number of success out of 100 designs, the mean and standard deviation of the MSE on the validation set. Note that we omit “MDRT” in Table 1 due to space limitations. From Table 1, the performance of MDRT with M = 1 is dominantly better in both variable selection and estimation than those of the others. For linear models, MDRT with M = 1 always select the correct variables even for large ts. For variable selection, MDRT with M = 0 has a better performance compared with CART due to its sparsity-inducing penalty. In contrast, CART is more flexible in the sense that its splits are not necessarily dyadic. As a consequence, they are comparable in function estimation. Moreover, the performance of randomized scheme is slightly better than its deterministic version in variable selection. Another observation is that, when t becomes larger, although the performance of variable selection decreases on all methods, the estimation performance becomes slightly better. This might be counter-intuitive at the first sight. In fact, with the increase of t, all methods tend to select more variables. Due to the high correlations, even the irrelevant variables are also helpful in predicting the responses. This is an expected effect. Real Data: In this subsection, we compare these methods on three real datasets. The first dataset is the Chemometrics data (Chem for short), which has been extensively studied in [3]. The data are from a simulation of a low density tubular polyethylene reactor with n = 56, d = 22 and p = 6. Following the same procedures in [3], we log-transformed the responses because they are skewed. The second dataset is Boston Housing 1 with n = 506, d = 10 and p = 1. We add 10 irrelevant variables randomly drawn from Uniform(0,1) to evaluate the variable selection performance. The third one, Space ga2, is an election data with spatial coordinates on 3107 US counties. Our task is to predict the x, y coordinates of each county given 5 variables regarding voting information. 1Available from UCI Machine Learning Database Repository: http:archive.ics.uci.edu/ml 2Available from StatLib: http:lib.stat.cmu.edu/datasets/ 7 Table 1: Comparison of Variable Selection and Function Estimation on Synthetic Datasets Model 1 R, M=1 G, M=1 R, M=0 G, M=0 CART t = 0 100 2.03 (0.14) 100 2.08 (0.15) 100 5.84 (0.51) 97 5.74 (0.54) 52 6.17 (0.55) t = 0.5 100 2.05 (0.14) 100 2.06 (0.15) 76 5.42 (0.53) 68 5.36 (0.60) 29 5.48 (0.51) t = 1 100 2.05 (0.13) 100 2.05 (0.16) 19 5.40 (0.60) 20 5.56 (0.69) 3 5.30 (0.58) Model 2 R, M=1 G, M=1 R, M=0 G, M=0 CART t = 0 100 2.07 (0.13) 100 2.06 (0.15) 39 3.21 (0.26) 31 3.22 (0.28) 25 3.52 (0.31) t = 0.5 96 2.05 (0.15) 93 2.09 (0.17) 17 3.10 (0.25) 11 3.15 (0.26) 5 3.20 (0.27) t = 1 76 2.09 (0.14) 68 2.21 (0.19) 2 3.17 (0.30) 2 3.16 (0.26) 1 3.16 (0.27) Model 3 R, M=1 G, M=1 R, M=0 G, M=0 CART t = 0 98 2.68 (0.31) 95 2.67 (0.47) 75 3.90 (0.47) 63 4.03 (0.54) 29 4.35 (0.73) t = 0.5 84 2.56 (0.21) 86 2.52 (0.25) 32 3.63 (0.47) 32 3.60 (0.40) 15 3.69 (0.38) t = 1 65 2.51 (0.26) 50 2.62 (0.23) 3 3.75 (0.45) 4 3.88 (0.51) 2 3.66 (0.38) For Space ga, we normalize the responses to [0, 1]. Similarly, we add other 15 irrelevant variables randomly drawn from Uniform(0,1). For all these datasets, we scale the input variables into a unit cube. For evaluation purpose, each dataset is randomly split such that half data are used for training and the other half for testing. We run a 5-fold cross-validation on the training set to pick the best tuning parameter λ∗and ρ∗. We then train MDRTs and CART on the entire training data using λ∗and ρ∗. We repeat this process 20 times and report the mean and standard deviation of the testing MSE in Table 2. nmax is set to be 5 for the first dataset and 20 for the latter two. For all datasets, we set L = 6. Moreover, for randomized scheme, we run 50 random trials and pick the minimum cost tree. Table 2: Testing MSE on Real Datasets R, M=1 G, M=1 R, M=0 G, M=0 CART Chem 0.15 (0.09) 0.18 (0.12) 0.38 (0.18) 0.52 (0.06) 0.40 (0.09) Housing 20.18 (2.94) 21.60 (2.83) 24.67 (2.05) 29.46 (1.95) 25.91 (3.05) Space ga 0.054 (7.8e-4) 0.055 (8.0e-4) 0.068 (7.2e-4) 0.068 (9.2e-4) 0.064 (8.3e-4) From Table 2, we see that MDRT with M = 1 has the best estimation performance. Moreover, randomized scheme does improve the performance compared to the deterministic counterpart. In particularly, such an improvement is quite significant when M = 0. The performance of MDRT(G, M=0) is always worse than CART since CART can have more flexible splits. However, using randomized scheme, the performance of MDRT(R, M=0) achieves a comparable performance as CART. As for variable selection of Housing data, in all the 20 runs, MDRT(G, M=1) and MDRT(R, M=1) never select the artificially added variables. However, for the other three methods, nearly 10 out of 20 runs involve at least one extraneous variable. In particular, we compare our results with those reported in [14]. They find that there are 4 (indus, age, dis, tax) irrelevant variables in the Housing data. Our experiments confirm this result since in 15 out of the 20 trials, MDRT(G, M=1) and MDRT(R, M=1) never select these four variables. Similarly, for Space ga data, there are only 2 and 1 times that MDRT(G, M=1) and MDRT(R, M=1) involve the artificially added variables. 6 Conclusions We propose a novel sparse learning method based on multivariate dyadic regression trees (MDRTs). Our approach adopts a new sparsity-inducing penalty that simultaneously conduct function estimation and variable selection. Some theoretical analysis and practical algorithms have been developed. To the best of our knowledge, it is the first time that such a penalty is introduced in the tree literature for high dimensional sparse learning problems. 8 References [1] G. Blanchard, C. Sch¨afer, Y. Rozenholc, and K.-R. M¨uller. Optimal dyadic decision trees. Machine Learning Journal, 66(2-3):209–241, 2007. [2] Leo Breiman, Jerome Friedman, Charles J. Stone, and R.A. Olshen. Classification and regression trees. Wadsworth Publishing Co Inc, 1984. [3] Leo Breiman and Jerome H. Friedman. Predicting multivariate responses in multiple linear regression. J. Roy. Statist. Soc. B, 59:3, 1997. [4] R. Castro, R. Willett, and R. Nowak. Fast rates in regression via active learning. NIPS, 2005. [5] Xi Chen, Weike Pan, James T. Kwok, and Jamie G. Carbonell. Accelerated gradient method for multi-task sparse learning problem. In ICDM, 2009. [6] Hugh A. Chipman, Edward I. George, and Robert E. McCulloch. Bart: Bayesian additive regression trees. Technical report, Department of Mathematics and Statistics, Acadia University, Canada, 2006. [7] Jerome H. Friedman. Multivariate adaptive regression splines. The Annals of Statistics, 19:1– 67, 1991. [8] S. Gey and E. Nedelec. Model selection for cart regression trees. IEEE Tran. on Info. Theory, 51(2):658– 670, 2005. [9] L´aszl´o Gy¨orfi, Michael Kohler, Adam Krzy˙zak, and Harro Walk. A Distribution-Free Theory of Nonparametric Regression. Springer-Verlag, 2002. [10] Han Liu, John Lafferty, and Larry Wasserman. Nonparametric regression and classification with joint sparsity constraints. In NIPS. MIT Press, 2008. [11] Han Liu and Jian Zhang. On the estimation consistency of the group lasso and its applications. AISTATS, pages 376–383, 2009. [12] Wendy L. Martinez and Angel R. Martinez. Computational Statistics Handbook with MATLAB. Chapman & Hall CRC, 2 edition, 2008. [13] G. Obozinski, M. J. Wainwright, and M. I. Jordan. High-dimensional union support recovery in multivariate regression. In NIPS. MIT Press, 2009. [14] Pradeep Ravikumar, Han Liu, John Lafferty, and Larry Wasserman. Spam: Sparse additive models. In NIPS. MIT Press, 2007. [15] C. Scott and R.D. Nowak. Minimax-optimal classification with dyadic decision trees. IEEE Tran. on Info. Theory, 52(4):1335–1353, 2006. [16] B.A. Turlach, W. N. Venables, and S. J. Wright. Simultaneous variable selection. Technometrics, 27:349–363, 2005. 9
2010
180
3,944
A novel family of non-parametric cumulative based divergences for point processes Sohan Seth University of Florida Il “Memming” Park University of Texas at Austin Austin J. Brockmeier University of Florida Mulugeta Semework SUNY Downstate Medical Center John Choi, Joseph T. Francis SUNY Downstate Medical Center & NYU-Poly Jos´e C. Pr´ıncipe University of Florida Abstract Hypothesis testing on point processes has several applications such as model fitting, plasticity detection, and non-stationarity detection. Standard tools for hypothesis testing include tests on mean firing rate and time varying rate function. However, these statistics do not fully describe a point process, and therefore, the conclusions drawn by these tests can be misleading. In this paper, we introduce a family of non-parametric divergence measures for hypothesis testing. A divergence measure compares the full probability structure and, therefore, leads to a more robust test of hypothesis. We extend the traditional Kolmogorov–Smirnov and Cram´er–von-Mises tests to the space of spike trains via stratification, and show that these statistics can be consistently estimated from data without any free parameter. We demonstrate an application of the proposed divergences as a cost function to find optimally matched point processes. 1 Introduction Neurons communicate mostly through noisy sequences of action potentials, also known as spike trains. A point process captures the stochastic properties of such sequences of events [1]. Many neuroscience problems such as model fitting (goodness-of-fit), plasticity detection, change point detection, non-stationarity detection, and neural code analysis can be formulated as statistical inference on point processes [2, 3]. To avoid the complication of dealing with spike train observations, neuroscientists often use summarizing statistics such as mean firing rate to compare two point processes. However, this approach implicitly assumes a model for the underlying point process, and therefore, the choice of the summarizing statistic fundamentally restricts the validity of the inference procedure. One alternative to mean firing rate is to use the distance between the inhomogeneous rate functions, i.e. R |λ1(t) −λ2(t)| dt, as a test statistic, which is sensitive to the temporal fluctuation of the means of the point processes. In general the rate function does not fully specify a point process, and therefore, ambiguity occurs when two distinct point processes have the same rate function. Although physiologically meaningful change is often accompanied by the change in rate, there has been evidence that the higher order statistics can change without a corresponding change of rate [4, 5]. Therefore, statistical tools that capture higher order statistics, such as divergences, can improve the state-of-the-art hypothesis testing framework for spike train observations, and may encourage new scientific discoveries. 1 In this paper, we present a novel family of divergence measures between two point processes. Unlike firing rate function based measures, a divergence measure is zero if and only if the two point processes are identical. Applying a divergence measure for hypothesis testing is, therefore, more appropriate in a statistical sense. We show that the proposed measures can be estimated from data without any assumption on the underlying probability structure. However, a distribution-free (non-parametric) approach often suffers from having free parameters, e.g. choice of kernel in nonparametric density estimation, and these free parameters often need to be chosen using computationally expensive methods such as cross validation [6]. We show that the proposed measures can be consistently estimated in a parameter free manner, making them particularly useful in practice. One of the difficulties of dealing with continuous-time point process is the lack of well structured space on which the corresponding probability laws can be described. In this paper we follow a rather unconventional approach for describing the point process by a direct sum of Euclidean spaces of varying dimensionality, and show that the proposed divergence measures can be expressed in terms of cumulative distribution functions (CDFs) in these disjoint spaces. To be specific, we represent the point process by the probability of having a finite number of spikes and the probability of spike times given that number of spikes, and since these time values are reals, we can represent them in a Euclidean space using a CDF. We follow this particular approach since, first, CDFs can be easily estimated consistently using empirical CDFs without any free parameter, and second, standard tests on CDFs such as Kolmogorov–Smirnov (K-S) test [7] and Cram´er–von-Mises (C-M) test [8] are well studied in the literature. Our work extends the conventional K-S test and C-M test on the real line to the space of spike trains. The rest of the paper is organized as follows; in section 2 we introduce the measure space where the point process is defined as probability measures, in section 3 and section 4 we introduce the extended K-S and C-M divergences, and derive their respective estimators. Here we also prove the consistency of the proposed estimators. In section 5, we compare various point process statistics in a hypothesis testing framework. In section 6 we show an application of the proposed measures in selecting the optimal stimulus parameter. In section 7, we conclude the paper with some relevant discussion and future work guidelines. 2 Basic point process We define a point process to be a probability measure over all possible spike trains. Let Ωbe the set of all finite spike trains, that is, each ω ∈Ωcan be represented by a finite set of action potential timings ω = {t1 ≤t2 ≤. . . ≤tn} ∈Rn where n is the number of spikes. Let Ω0, Ω1, · · · denote the partitions of Ωsuch that Ωn contains all possible spike trains with exactly n events (spikes), hence Ωn = Rn. Note that Ω= S∞ n=0 Ωn is a disjoint union, and that Ω0 has only one element representing the empty spike train (no action potential). See Figure 1 for an illustration. Define a σ-algebra on Ωby the σ-algebra generated by the union of Borel sets defined on the Euclidean spaces; F = σ (S∞ n=0 B (Ωn)). Note that any measurable set A ∈F can be partitioned into {An = A ∩Ωn}∞ n=0, such that each An is measurable in corresponding measurable space (Ωn, B (Ωn)). Here A denotes a collection of spike trains involving varying number of action potentials and corresponding action potential timings, whereas An denotes a subset of these spike trains involving only n action potentials each. A (finite) point process is defined as a probability measure P on the measurable space (Ω, F) [1]. Let P and Q be two probability measures on (Ω, F), then we are interested in finding the divergence d(P, Q) between P and Q, where a divergence measure is characterized by d(P, Q) ≥0 and d(P, Q) = 0 ⇐⇒P = Q. 3 Extended K-S divergence A Kolmogorov-Smirnov (K-S) type divergence between P and Q can be derived from the L1 distance between the probability measures, following the equivalent representation, d1(P, Q) = Z Ω d |P −Q| ≥sup A∈F |P(A) −Q(A)| . (1) 2 5 4 3 2 0 time Inhomogeneous Poisson Firing 6 8 Figure 1: (Left) Illustration of how the point process space is stratified. (Right) Example of spike trains stratified by their respective spike count. Since (1) is difficult and perhaps impossible to estimate directly without a model, our strategy is to use the stratified spaces (Ω0, Ω1, . . .) defined in the previous section, and take the supremum only in the corresponding conditioned probability measures. Let Fi = F ∩Ωi := {F ∩Ωi|F ∈F}. Since ∪iFi ⊂F, d1(P, Q) ≥ X n∈N sup A∈Fn |P(A) −Q(A)| = X n∈N sup A∈Fn |P(Ωn)P(A|Ωn) −Q(Ωn)Q(A|Ωn)| . Since each Ωn is a Euclidean space, we can induce the traditional K-S test statistic by further reducing the search space to ˜Fn = {×i(−∞, ti]|t = (t1, . . . , tn) ∈Rn}. This results in the following inequality, sup A∈Fn |P(A) −Q(A)| ≥sup A∈˜ Fn |P(A) −Q(A)| = sup t∈Rn F (n) P (t) −F (n) Q (t) , (2) where F (n) P (t) = P[T1 ≤t1 ∧. . . ∧Tn ≤tn] is the cumulative distribution function (CDF) corresponding to the probability measure P in Ωn. Hence, we define the K-S divergence as dKS(P, Q) = X n∈N sup t∈Rn P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) . (3) Given a finite number of samples X = {xi}NP i=1 and Y = {yj}NQ j=1 from P and Q respectively, we have the following estimator for equation (3). ˆdKS(P, Q) = X n∈N sup t∈Rn ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) = X n∈N sup t∈Xn∪Yn ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) , (4) where Xn = X ∩Ωn, and ˆP and ˆFP are the empirical probability and empirical CDF, respectively. Notice that we only search the supremum over the locations of the realizations Xn ∪Yn and not the whole Rn, since the empirical CDF difference ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) only changes values at those locations. Theorem 1 (dKS is a divergence). d1(P, Q) ≥dKS(P, Q) ≥0 (5) dKS(P, Q) = 0 ⇐⇒P = Q (6) 3 Proof. The first property and the ⇐proof for the second property are trivial. From the definition of dKS and properties of CDF, dKS(P, Q) = 0 implies that P(Ωn) = Q(Ωn) and F (n) P = F (n) Q for all n ∈N. Given probability measures for each (Ωn, Fn) denoted as Pn and Qn, there exist corresponding unique extended measures P and Q for (Ω, F) such that their restrictions to (Ωn, Fn) coincide with Pn and Qn, hence P = Q. Theorem 2 (Consistency of K-S divergence estimator). As the sample size approaches infinity, dKS −ˆdKS a.u. −−→0 (7) Proof. Note that |P sup · −P sup ·| ≤P |sup · −sup ·|. Due to the triangle inequality of the supremum norm, sup t∈Rn P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) −sup t∈Rn ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) ≤sup t∈Rn P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) − ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) . Again, using the triangle inequality we can show the following: P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) − ˆP(Ωn) ˆF (n) P (t) −ˆQ(Ωn) ˆF (n) Q (t) ≤ P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) −ˆP(Ωn) ˆF (n) P (t) + ˆQ(Ωn) ˆF (n) Q (t) = P(Ωn)F (n) P (t) −P(Ωn) ˆF (n) P (t) −Q(Ωn)F (n) Q (t) + Q(Ωn) ˆF (n) Q (t) +P(Ωn) ˆF (n) P (t) −ˆP(Ωn) ˆF (n) P (t) + ˆQ(Ωn) ˆF (n) Q (t) −Q(Ωn) ˆF (n) Q (t) ≤P(Ωn) F (n) P (t) −ˆF (n) P (t) + Q(Ωn) F (n) Q (t) −ˆF (n) Q (t) + ˆF (n) P (t) P(Ωn) −ˆP(Ωn) + ˆF (n) Q (t) Q(Ωn) −ˆQ(Ωn) . Then the theorem follows from the Glivenko-Cantelli theorem, and ˆP, ˆQ a.s. −−→P, Q. Notice that the inequality in (2) can be made stricter by considering the supremum over not just the product of the segments (−∞, ti] but over the all 2n −1 possible products of the segments (−∞, ti] and [ti, ∞) in n dimensions [7]. However, the latter approach is computationally more expensive, and therefore, in this paper we only explore the former approach. 4 Extended C-M divergence We can extend equation (3) to derive a Cram´er–von-Mises (C-M) type divergence for point processes. Let µ = P + Q/2, then P, Q are absolutely continuous with respect to µ. Note that, F (n) P , F (n) Q ∈L2(Ωn, µ|n) where |n denotes the restriction on Ωn, i.e. the CDFs are L2 integrable, since they are bounded. Analogous to the relation between K-S test and C-M test, we would like to use the integrated squared deviation statistics in place of the maximal deviation statistic. By integrating over the probability measure µ instead of the supremum operation, and using L2 instead of L∞distance, we define dCM(P, Q) = X n∈N Z Rn  P(Ωn)F (n) P (t) −Q(Ωn)F (n) Q (t) 2 dµ|n(t). (8) This can be seen as a direct extension of the C-M criterion. The corresponding estimator can be derived using the strong law of large numbers, ˆdCM(P, Q) = X n∈N " 1 2 X i  ˆP(Ωn) ˆF (n) P (x(n) i ) −ˆQ(Ωn) ˆF (n) Q (x(n) i ) 2 + 1 2 X i  ˆP(Ωn) ˆF (n) P (y(n) i ) −ˆQ(Ωn) ˆF (n) Q (y(n) i ) 2 # . (9) 4 Theorem 3 (dCM is a divergence). For P and Q with square integrable CDFs, dCM(P, Q) ≥0 (10) dCM(P, Q) = 0 ⇐⇒P = Q. (11) Proof. Similar to theorem 1. Theorem 4 (Consistency of C-M divergence estimator). As the sample size approaches infinity, dCM −ˆdCM a.u. −−→0 (12) Proof. Similar to (7), we find an upper bound and show that the bound uniformly converges to zero. To simplify the notation, we define gn(x) = P(Ωn)F (n) P (x) −Q(Ωn)F (n) Q (x), and ˆgn(x) = ˆP(Ωn) ˆF (n) P (x(n)) −ˆQ(Ωn) ˆF (n) Q (x(n)). Note that ˆgn a.u. −−→g by the Glivenko-Cantelli theorem and ˆP a.s. −−→P by the strong law of large numbers. dCM −ˆdCM =1 2 X n∈N Z g2 ndP|n + X n∈N Z g2 ndQ|n − X n∈N X i ˆgn(xi)2 − X n∈N X i ˆgn(yi)2 = X n∈N Z g2 ndP|n − Z ˆg2 nd ˆP|n + Z g2 ndQ|n − Z ˆg2 nd ˆQ|n  ≤ X n∈N  Z g2 ndP|n − Z ˆg2 nd ˆP|n + Z g2 ndQ|n − Z ˆg2 nd ˆQ|n  where ˆP = P i δ(xi) and ˆQ = P i δ(yi) are the corresponding empirical measures. Without loss of generality, we only find the bound on R g2 ndP|n − R ˆg2 nd ˆP|n , then the rest is bounded similarly for Q. Z g2 ndP|n − Z ˆg2 nd ˆP|n = Z g2 ndP|n − Z ˆg2 ndP|n + Z ˆg2 ndP|n − Z ˆg2 nd ˆP|n ≤ Z g2 n −ˆg2 n  dP|n − Z ˆg2 nd  P|n −ˆP|n  Applying Glivenko-Cantelli theorem and strong law of large numbers, these two terms converges since ˆg2 n is bounded. Hence, we show that the C-M test estimator is consistent. 5 Results We present a set of two-sample problems and apply various statistics to perform hypothesis testing. As a baseline measure, we consider the widely used Wilcoxon rank-sum test (or equivalently, the Mann-Whitney U test) on the count distribution (e.g. [9]), which is a non-parametric median test for the total number of action potentials, and the integrated squared deviation statistic λL2 = R (λ1(t) −λ2(t))2 dt, where λ(t) is estimated by smoothing spike timing with a Gaussian kernel, evaluated at a uniform grid at least an order of magnitude smaller than the standard deviation of the kernel. We report the performance of the test with varying kernel sizes. All tests are quantified by the power of the test given a significance threshold (type-I error) at 0.05. The null hypothesis distribution is empirically computed by either generating independent samples or by permuting the data to create at least 1000 values. 5.1 Stationary renewal processes Renewal process is a widely used point process model that compensates the deviation from Poisson process [10]. We consider two stationary renewal processes with gamma interval distributions. Since the mean rate of the two processes are the same, the rate function statistic and Wilcoxon test does 5 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 H0 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 H1 time (sec) 10 14 18 25 33 45 61 82 111 150 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number of samples power K−S C−M λL2 10 ms λL2 100 ms λL2 1 ms N Figure 2: Gamma distributed renewal process with shape parameter θ = 3 (H0) and θ = 0.5 (H1). The mean number of action potential is fixed to 10. (Left) Spike trains from the null and alternate hypothesis. (Right) Comparison of the power of each method. The error bars are standard deviation over 20 Monte Carlo runs. not yield consistent result, while the proposed measures obtain high power with a small number of samples. The C-M test is more powerful than K-S in this case; this can be interpreted by the fact that the difference in the cumulative is not concentrated but spread out over time because of the stationarity. 5.2 Precisely timed spike trains When the same stimulation is presented to a neuronal system, the observed spike trains sometimes show a highly repeatable spatio-temporal pattern at the millisecond time scale. Recently these precisely timed spike trains (PTST) are abundantly reported both in vivo and in vitro preparations [11, 12, 13]. Despite being highly reproducible, different forms of trial-to-trial variability have also been observed [14]. It is crucial to understand this variability since for a system to utilize PTSTs as a temporal code, it should presumably be robust to its variability structure, and possibly learn to reduce it [15]. A precisely timed spike train in an interval is modeled by L number of probability density and probability pairs {(fi(t), pi)}L i=1. Each fi(t) corresponds to the temporal jitter, and pi corresponds to the probability of generating the spike. Each realization of the PTST model produces at most L spikes. The equi-intensity Poisson process has the rate function λ(t) = P i pifi(t). We test if the methods can differentiate between the PTST (H0) and equi-intensity Poisson process (H1) for L = 1, 2, 3, 4 (see Figure 3 for the L = 4 case). Note that L determines the maximum dimension for the PTST. fi(t) were equal variance Gaussian distribution on a grid sampled from a uniform random variable, and pi = 0.9. As shown in Figure 3, only the proposed methods perform well. Since the rate function profile is identical for both models, the rate function statistic λL2 fails to differentiate. The Wilcoxon test does work for intermediate dimensions, however its performance is highly variable and unpredictable. In contrast to the previous example, the K-S test is consistently better than the C-M statistic in this problem. 6 Optimal stimulation parameter selection Given a set of point processes, we can find the one which is closest to a target point process in terms of the proposed divergence. Here we use this method on a real dataset obtained from the somatosensory system of an anesthetized rat (see supplement for procedure). Specifically, we address finding 6 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 time (ms) H0 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 time (ms) H1 19 37 71 136 261 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number of samples power dCM L=1 dCM L=2 dCM L=3 dCM L=4 dKS L=1 dKS L=2 dKS L=3 dKS L=4 19 37 71 136 261 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 number of samples power N L=1 N L=2 N L=3 N L=4 Figure 3: [Top] Precisely timed spike train model (H0) versus equi-intensity Poisson process (H1). Spike trains from the null and alternate hypothesis for L = 4. [Bottom] Comparison of the power of each method for L = 1, 2, 3, 4 on precisely timed spike train model (H0) versus equi-intensity Poisson process (H1). (Left) Power comparison for methods except for N. The rate statistic λL2 are not labeled, since they are not able to detect the difference. (Right) Wilcoxon test on the number of action potentials. The error bars are standard deviation over 10 Monte Carlo runs. optimal electrical stimulation settings to produce cortical spiking patterns similar to those observed with tactile stimuli. The target process has 240 realizations elicited by tactile stimulation of the ventral side of the first digit with a mechanical tactor. We seek the closest out of 19 processes elicited by electrical stimulation in the thalamus. Each process has 140 realizations that correspond to a particular setting of electrical stimulation. The settings correspond to combinations of duration and amplitude for biphasic current injection on two adjacent channels in the thalamus. The channel of interest and the stimulating channels were chosen to have significant response to tactile stimulation. The results from applying the C-M, K-S, and λL2 measures between the tactile responses and the sets from each electrical stimulation setting are shown Figure 4. The overall trend among the measures is consistent, but the location of the minima does not coincide for λL2. 7 Conclusion In this paper, we have proposed two novel measures of divergence between point processes. The proposed measures have been derived from the basic probability law of a point process and we have shown that these measures can be efficiently estimated consistently from data. Using divergences for statistical inference transcends first and second order statistics, and enables distribution-free spike train analysis. The time complexity of both methods is O P n n  NP (n)NQ(n) + N 2 P (n) + N 2 Q(n)  where NP (n) is the number of spike trains from P that has n spikes. In practice this is often faster than 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 0.2 0.4 0.6 0.8 1 Parameter index (sorted by duration then amplitude) K−S C−M λL2 Tactile Trials sorted by count then 1st spike #15 (100uA,125µs) #17 (100uA,175µs) 0 0.02 0.04 Time (s) 0 0.02 0.04 0 0.02 0.04 0.1 0.2 0.3 0.4 Average spikes per bin Figure 4: (Left) Dissimilarity/divergences from tactile response across parameter sets. The values of each measure are shifted and scaled to be in the range of 0 to 1. λL2 uses 2.5 ms bins with no smoothing. (Right) Responses from the tactile response (left), stimulation settings selected by λL2 (center), and the realizations selected by K-S and C-M (right). Top row shows the spike trains stratified into number of spikes and then sorted by spike times. Bottom row shows the average response binned at 2.5 ms; the variance is shown as a thin green line. the binned rate function estimation which has time complexity O(BN) where B is the number of bins and N = P n n(NP (n) + NQ(n)) is the total number of spikes in all the samples. Although, we have observed that the statistic based on the L2 distance between the rate functions often outperforms the proposed method, this approach involves the search for the smoothing kernel size and bin size which can make the process slow and prohibitive. In addition, it brings the danger of multiple testing, since some smoothing kernel sizes may pickup spurious patterns that are only fluctuations due to finite samples size. A similar approach based on stratification has also been addressed in [16], where the authors have discussed the problem of estimating Hellinger distance between two point processes. Although conceptually similar, the advantage of the proposed approach is that it is parameter free, whereas the other approach requires selecting appropriate kernels and the corresponding kernel sizes for each Euclidean partitions. However, a stratification-based approach suffers in estimation when the count distributions of the point processes under consideration are flat, since in this situation the spike train realizations tend to exist in separate Euclidean partitions, and given a finite set of realizations, it becomes difficult to populate each partition sufficiently. Therefore, other methods should be investigated that allow two spike trains to interact irrespective of their spike counts. Other possible approaches include the kernel-based divergence measures as proposed in [17], since the measures can be applied to any abstract space. However, it requires desinging an appropriate strictly positive definite kernel on the space of spike trains. In this literature, we have presented the divergences in the context of spike trains generated by neurons. However, the proposed methods can be used for general point processes, and can be applied to other areas. Although we have proved consistency of the proposed measures, further statistical analysis such as small sample power analysis, rate of convergence, and asymptotic properties would be interesting to address. A MATLAB implementation is freely available on the web (http://code.google.com/p/iocane) with BSD-license. Acknowledgment This work is partially funded by NSF Grant ECCS-0856441 and DARPA Contract N66001-10-C2008. 8 References [1] D. J. Daley and D. Vere-Jones. An Introduction to the Theory of Point Processes. Springer, 1988. [2] D. H. Johnson, C. M. Gruner, K. Baggerly, and C. Seshagiri. Information-theoretic analysis of neural coding. Journal of Computational Neuroscience, 10(1):47–69, 2001. [3] J. D. Victor. Spike train metrics. Current Opinion in Neurobiology, 15:585–592, 2005. [4] A. Kuhn, A. Aertsen, and S. Rotter. Higher-order statistics of input ensembles and the response of simple model neurons. Neural Computation, 15(1):67–101, 2003. [5] F. Rieke, D. Warland, R. de Ruyter van Steveninck, and W. Bialek. Spikes: exploring the neural code. MIT Press, Cambridge, MA, USA, 1999. [6] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman and Hall, New York, 1986. [7] G. Fasano and A. Franceschini. A multidimensional version of the Kolmogorov–Smirnov test. Royal Astronomical Society, Monthly Notices, 225:155–170, 1987. [8] T. W. Anderson. On the distribution of the two-sample Cram´er–von-Mises criterion. Annals of Mathematical Statistics, 33(3):1148–1159, 1962. [9] A. Kepecs, N. Uchida, H. A. Zariwala, and Z. F. Mainen. Neural correlates, computation and behavioural impact of decision confidence. Nature, 455(7210):227–231, 2008. [10] M. P. P. Nawrot, C. Boucsein, V. R. Molina, A. Riehle, A. Aertsen, and S. Rotter. Measurement of variability dynamics in cortical spike trains. Journal of Neuroscience Methods, 169(2):374– 390, 2008. [11] P. Reinagel and R. Clay Reid. Precise firing events are conserved across neurons. Journal of Neuroscience, 22(16):6837–6841, 2002. [12] M. R. DeWeese, M. Wehr, and A. M. Zador. Binary spiking in auditory cortex. Journal of Neuroscience, 23(21):7940–7949, 2003. [13] R. S. Johansson and I. Birznieks. First spikes in ensembles of human tactile afferents code complex spatial fingertip events. Nature Neuroscience, 7(2):170–177, 2004. [14] P. Tiesinga, J. M. Fellous, and T. J. Sejnowski. Regulation of spike timing in visual cortical circuits. Nature Reviews Neuroscience, 9:97–107, 2008. [15] S. M. Bohte and M. C. Mozer. Reducing the variability of neural responses: A computational theory of spike-timing-dependent plasticity. Neural Computation, 19(2):371–403, 2007. [16] I. Park and J. C. Pr´ıncipe. Quantification of inter-trial non-stationarity in spike trains from periodically stimulated neural cultures. In Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing, 2010. Special session on Multivariate Analysis of Brain Signals: Methods and Applications. [17] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Sch¨olkopf, and A. J. Smola. A kernel method for the two-sample problem. CoRR, abs/0805.2368, 2008. 9
2010
181
3,945
Sidestepping Intractable Inference with Structured Ensemble Cascades David Weiss∗ Benjamin Sapp∗ Ben Taskar Computer and Information Science University of Pennsylvania Philadelphia, PA 19104, USA {djweiss,bensapp,taskar}@cis.upenn.edu Abstract For many structured prediction problems, complex models often require adopting approximate inference techniques such as variational methods or sampling, which generally provide no satisfactory accuracy guarantees. In this work, we propose sidestepping intractable inference altogether by learning ensembles of tractable sub-models as part of a structured prediction cascade. We focus in particular on problems with high-treewidth and large state-spaces, which occur in many computer vision tasks. Unlike other variational methods, our ensembles do not enforce agreement between sub-models, but filter the space of possible outputs by simply adding and thresholding the max-marginals of each constituent model. Our framework jointly estimates parameters for all models in the ensemble for each level of the cascade by minimizing a novel, convex loss function, yet requires only a linear increase in computation over learning or inference in a single tractable sub-model. We provide a generalization bound on the filtering loss of the ensemble as a theoretical justification of our approach, and we evaluate our method on both synthetic data and the task of estimating articulated human pose from challenging videos. We find that our approach significantly outperforms loopy belief propagation on the synthetic data and a state-of-the-art model on the pose estimation/tracking problem. 1 Introduction We address the problem of prediction in graphical models that are computationally challenging because of both high-treewidth and large state-spaces. A primary example where intractable, large state-space models typically arise is in dynamic state estimation problems, including tracking articulated objects or multiple targets [1, 2]. The complexity stems from interactions of multiple degrees-of-freedom (state variables) and fine-level resolution at which states need to be estimated. Another typical example arises in pixel-labeling problems where the model topology is typically a 2D grid and the number of classes is large [3]. In this work, we propose a novel, principled framework called Structured Ensemble Cascades for handling state complexity while learning complex models, extending our previous work on structured cascades for low-treewidth models [4]. The basic idea of structured cascades is to learn a sequence of coarse-to-fine models that are optimized to safely filter and refine the structured output state space, speeding up both learning and inference. While we previously assumed (sparse) exact inference is possible throughout the cascade [4], in this work, we apply and extend the structured cascade framework to intractable hightreewidth models. To avoid intractable inference, we decompose the desired model into an ensemble of tractable sub-models for each level of the cascade. For example, in the problem of tracking articulated human pose, each sub-model includes temporal dependency for a single body joint only. ∗These authors have contributed equally. 1 Inference Sum + Level m ￿ Thresholding Refinement Full Model Sub-models Inference Sum + Level m+1 ￿ Thresholding Refinement Full Model Sub-models Ym+2 Ym+1 Ym θ￿ m(x, yj) ≤tm(x, α) Ym+1 θ￿ m+1(x, yj) ≤tm+1(x, α) (a) (b) !"#$%&'&& !"#$%&(&& !"#$%&)&& *%+%,&!" !"#$%&'&& !"#$%&(&& !"#$%&)&& *%+%,&!#$& !"#$%"&'('")$*&+,%"&'-*.+")#/' 0'1*2',)34'' 0')$56+',)34'' 0'+")#"' Figure 1: (a) Schematic overview of structured ensemble cascades. The m’th level of the cascade takes as input a sparse set of states Ym for each variable yj. The full model is decomposed into constituent sub-models (above, the three tree models used in the pose tracking experiment) and sparse inference is run. Next, the max marginals of the sub-models are summed to produce a single max marginal for each variable assignment: θ⋆(x, yj) = P p θ⋆ p(x, yj). Note that each level and each constituent model will have different parameters as a result of the learning process. Finally, the state spaces are thresholded based on the max-marginal scores and low-scoring states are filtered. Each state is then refined according to a state hierarchy (e.g., spatial resolution, or semantic categories) and passed to the next level of the cascade. This process can be repeated as many times as desired. In (b), we illustrate two consecutive levels of the ensemble cascade on real data, showing the filtered hypotheses left for a single video example. To maintain efficiency, inference in the sub-models of the ensemble is uncoupled (unlike in dual decomposition [5]), but the decision to filter states depends on the sum of the max-marginals of the constituent models (see Figure 1). We derive a convex loss function for joint estimation of submodels in each ensemble, which provably balances accuracy and efficiency, and we propose a simple stochastic subgradient algorithm for training. The novel contributions of this work are as follows. First, we provide a principled and practical generalization of structured cascades to intractable models. Second, we present generalization bounds on the performance of the ensemble. Third, we introduce a challenging VideoPose dataset, culled from TV videos, for evaluating pose estimation and tracking. Finally, we present an evaluation of our approach on synthetic data and the VideoPose dataset. We find that our joint training of an ensemble method outperforms several competing baselines on this difficult tracking problem. 2 Structured Cascades Given an input space X, output space Y, and a training set { x1, y1 , . . . , ⟨xn, yn⟩} of n samples from a joint distribution D(X, Y ), the standard supervised learning task is to learn a hypothesis h : X 7→Y that minimizes the expected loss ED [L (h(x), y)] for some non-negative loss function L : Y×Y →R+. In structured prediction problems, Y is a ℓ-vector of variables and Y = Y1×· · ·× Yℓ, and Yi = {1, . . . , K}. In many settings, the number of random variables, ℓ, differs depending on input X, but for simplicity of notation, we assume a fixed ℓhere. The linear hypothesis class we consider is of the form h(x) = argmaxy∈Y θ(x, y), where the scoring function θ(x, y) ≜θ⊤f(x, y) is the inner product of a vector of parameters θ and a feature function f : X × Y 7→Rd mapping (x, y) pairs to a set of d real-valued features. We further assume that f decomposes over a set of cliques C over inputs and outputs, so that θ(x, y) = P c∈C θ⊤fc(x, yc). Above, yc is an assignment 2 to the subset of Y variables in the clique c and we will use Yc to refer to the set of all assignments to the clique. By considering different cliques over X and Y , f can represent arbitrary interactions between the components of x and y. Evaluating h(x) is tractable for low-treewidth (hyper)graphs but is NP-hard in general, and typically, approximate inference is used when features are not lowtreewidth. In our prior work [4], we introduced the framework of Structured Prediction Cascades (SPC) to handle problems with low-treewidth T but large node state-space K, which makes complexity of O(KT ) prohibitive. For example, for a 5-th order linear chain model for handwriting recognition or part-of-speech tagging, K is about 50, and exact inference is on the order 506 ≈15 billion times the length the sequence. In tree-structured models we have used for for human pose estimation [6], typical K for each part includes image location and orientation and is on the order of 250, 000, so even K2 in pairwise potentials is prohibitive. Rather than learning a single monolithic model, a structured cascade is a coarse-to-fine sequence of increasingly complex models, where model complexity scales with Markov order in sequence models or spatial/angular resolution in pose models, for example. The goal of each model is to filter out a large subset of assignments without eliminating the correct one, so that the next level only has to consider a much reduced state-space. The filtering process is feed-forward, and each stage uses inference to compute max-marginals which are used to eliminate low-scoring node or clique assignments. The parameters of each model in the cascade are learned using a loss function which balances accuracy (not eliminating correct assignment) and efficiency (eliminating as many other assignments as possible). More precisely, for each clique assignment yc, there is a max marginal θ⋆(x, yc), defined as the maximum score of any output y that contains the clique assignment yc: θ⋆(x, yc) ≜max y′∈Y {θ(x, y′) : y′ c = yc}. (1) For simplicitly, we will examine the case where the cliques that we filter are defined only over single variables: yc = yj (although the model may also contain larger cliques). Clique assignments are filtered by discarding any yj for which θ⋆(x, yj) ≤t(x) for a threshold t(x). We define Yj to be the set of possible states for the j’th variable. The threshold proposed in [4] is a “max mean-max” function, t(x, α) = αθ⋆(x) + (1 −α) 1 Pℓ j=1 |Yj| ℓ X j=1 X yj∈Yj θ⋆(x, yj). (2) Filtering max marginals in this fashion can be learned because of the “safe filtering” property: ensuring that θ(xi, yi) > t(xi, α) is sufficient (although not necessary) to guarantee that no marginal consistent with the true answer yi will be filtered. Thus, for fixed α, [4] proposed learning parameters θ to maximize the margin θ(xi, yi) −t(xi, α) and therefore minimize filtering errors: inf θ,ξ≥0 λ 2 ||θ||2 + 1 n X i ξi s.t. θ(xi, yi) ≥t(xi, α) + ℓi −ξi, ∀i = 1, . . . , n (3) Above, ξi are slack variables for the margin constraints, and ℓi is the size of the i’th example. 3 Structured Ensemble Cascades In this work, we tackle the problem of learning a structured cascade for problems in which inference is intractable, but in which the large node state-space has a natural hierarchy that can be exploited. For example, such hierarchies arise in pose estimation by discretizing the articulation of joints at multiple resolutions, or in image segmentation due to the semantic relationship between class labels (e.g., “grass” and “tree” can be grouped as “plants,” “horse” and “cow” can be grouped as “animal.”) Although the methods discussed in this section can be applied to more general intractable settings, and our prior work considered more general cascades that operate on graph cliques, we will assume for simplicitly that the structured cascades operate in a “node-centric” coarse-to-fine manner as follows. For each variable yj in the model, each level of the cascade filters a current set of possible states Yj, and any surviving states are passed forward to the next level of the cascade by substituting each state with its set of descendents in the hierarchy. Thus, in the pose estimation problem, surviving states are subdivided into multiple finer-resolution states; in the image segmentation problem, broader object classes are split into their constituent classes for the next level. 3 We propose a novel method for learning structured cascades when inference is intractable due to loops in the graphical structure. The key idea of our approach is to decompose the loopy model into a collection of equivalent tractable sub-models for which inference is tractable. What distinguishes our approach from other decomposition based methods (e.g., [5, 7]) is that, because the cascade’s objective is filtering and not decoding, our approach does not require enforcing the constraint that the sub-models agree on which output has maximum score. We call our approach structured ensemble cascades. 3.1 Decomposition without agreement constraints Given a loopy (intractable) graphical model, it is always possible to express the score of a given output θ(x, y) as the sum of P scores θp(x, y) under sub-models that collectively cover every edge in the loopy model: θ(x, y) = P p θp(x, y). (See Figures 2 & 3 for illustrations specific to the experiments presented in this paper.) For example, in the method of dual decomposition [5], it is possible to solve a relaxed MAP problem in the (intractable) full model by running inference in the (tractable) sub-models under the constraint that all sub-models agree on the argmax solution. Enforcing this constraint requires iteratively re-weighting unary potentials of the sub-models and repeatedly re-running inference until each sub-model convergences to the same argmax solution. However, for the purposes of a structured cascade, we are only interested in computing the max marginals θ⋆(x, yj). In other words, we are only interested in knowing whether or not a configuration y consistent with yj that scores highly in each sub-model θp(x, y) exists. We show in the remainder of this section that the requirement that a single y consistent with yj optimizes the score of each submodel (i.e, that all sub-models agree) is not necessary for the purposes of filtering. Thus, because we do not have to enforce agreement between sub-models, we can learn a structured cascade for intractable models, but pay only a linear (factor of P) increase in inference time over the tractable sub-models. Formally, we define a single level of the ensemble cascade as a set of P models such that θ(x, y) = P p θp(x, y). We let θp(x, ·), θ⋆ p(x, ·), θ⋆ p(x) and tp(x, α) be the score, max marginal, max score, and threshold of the p’th model, respectively. We define the argmax marginal or witness y⋆ p(x, yj) to be the maximizing complete assignment of the corresponding max marginal θ⋆ p(x, yj). Then, if y = y⋆ p(x, yj) is the same for each of the p’th submodels, we have that θ⋆(x, yj) = X p θ⋆ p(x, yj) (4) Note that if we do not require the sub-models to agree, then θ⋆(x, yj) is stricly less than P p θ⋆ p(x, yj). Nonetheless, as we show next, the approximation θ⋆(x, yj) ≈P p θ⋆ p(x, yj) is still useful and sufficient for filtering in a structured cascade. 3.2 Safe filtering and generalization error We first show that if a given label y has a high score in the full model, it must also have a large ensemble max marginal score, even if the sub-models do not agree on the argmax. This results in a “safe filtering” lemma similar to that given in [4], as follows: Lemma 1 (Joint Safe Filtering). If P p θp(x, y) > t, then P p θ⋆ p(x, yj) > t for all yj ⊆y. Proof. In English, this lemma states that if the global score is above a given threshold, then the sum of sub-model max-marginals is also above threshold (with no agreement constraint). The proof is straightforward. For any yj consistent with y, we have θ⋆ p(x, yj) ≥θp(x, y). Therefore P p θ⋆ p(x, yj) ≥P p θp(x, y) > t. Therefore, we see that an agreement constraint is not necessary in order to filter safely: if we ensure that the combined score P p θp(x, y) of the true label y is above threshold, then we can filter without making a mistake if we compute max marginals by running inference separately for each sub-model. However, there is still potentially a price to pay for disagreement. If the sub-models do not agree, and the truth is not above threshold, then the threshold may filter all of the states for a given variable 4 yj and therefore “break” the cascade. This results from the fact that without agreement, there is no single argmax output y⋆that is always above threshold for any α; therefore, it is not guaranteed that there exists an output y to satisfy the Joint Safe Filtering Lemma. However, we note that in our experiments, we never experienced such breakdown of the cascades due to overly aggressive filtering. In order to learn parameters that are useful for filtering, Lemma 1 suggests a natural ensemble filtering loss, which we define for any fixed α as follows, Ljoint(θ, ⟨x, y⟩) = 1 "X p θp(x, y) ≤ X p tp(x, α) # , (5) where θ = {θ1, . . . , θP } is the set of all parameters of the ensemble. (Note that this loss function is somewhat conservative because it measures whether or not a sufficient but not necessary condition for a filtering error has occured.) To conclude this section, we provide a generalization bound on the ensemble filtering loss, equivalent to the bounds in [4] for the single-model cascades. To do so, we first eliminate the dependence on x and θ by rewriting Ljoint in terms of the scores of every possible state assignment, θ · f(x, yj), according to each sub-model. Let the vector θx ∈RmP denote these scores, where m is the number of possible state assignments in the sub-models. Theorem 1. For any fixed α ∈ [0, 1), define the dominating cost function φ(y, θx) = rγ(1/P P p θp(x, y) −tp(x, α)), where rγ(·) is the ramp function with slope γ. Let ||θp||2 ≤F for all p, and ||f(x, yj)||2 ≤1 for all x and yj. Then there exists a constant C such that for any integer n and any 0 < δ < 1 with probability 1−δ over samples of size n, every θ = {θ1, . . . , θP } satisfies: E [Ljoint(Y, θx)] ≤ˆE [φ(Y, θx)] + Cm √ ℓFP γ√n + r 8 ln(2/δ) n , (6) where ˆE is the empirical expectation with respect to training data. The proof is given in the supplemental materials. 3.3 Parameter estimation with gradient descent In this section we now discuss how to minimize the loss (5) given a dataset. We rephrase the SC optimization problem (3) using the ensemble max-marginals to form the ensemble cascade learning problem, inf θ1,...,θP ,ξ≥0 λ 2 X p ||θp||2 + 1 n X i ξi s.t. X p θp(xi, yi) ≥ X p tp(xi, α) + ℓi −ξi, (7) Seeing that the constraints can be ordered to show ξi ≤P p tp(xi, α) −P p θp(xi, yi) + ℓi, we can form an equivalent unconstrained minimization problem and take the subgradient of (7) with respect to each parameter θp. This yields the following update rule for the p’th model: θp ←(1 −λ)θp + ( 0 if P p θp(xi, yi) ≥P p tp(xi, α) + ℓi, ∇θp(xi, yi) −∇tp(xi, α) otherwise. (8) This update is identical to the original SC update with the exception that we update each model individually only when the ensemble has made a mistake jointly. Thus, learning to filter with the ensemble requires only P times as many resources as learning to filter with any of the models individually. 4 Experiments We evaluated structured ensemble cascades in two experiments. First, we analyzed the “best-case” filtering performance of the summed max-marginal approximation to the true marginals on a synthetic image segmentation task, assuming the true scoring function θ(x, y) is available for inference. Second, we evaluated the real-world accuracy of our approach on a difficult, real-world human pose dataset (VideoPose). In both experiments, the max-marginal ensemble outperforms state-of-the-art baselines. 5 θ(x, y) = θ1(x, y) + θ2(x, y) + θ3(x, y) + θ4(x, y) + θ5(x, y) + θ6(x, y) (a) (b) Figure 2: (a) Example decomposition of a 3 × 3 fully connected grid into all six constituent “comb” trees. In general, a n × n grid yields 2n such trees. (b) Improvement over Loopy BP and constituent tree-models on the synthetic segmentation task. Error bars show standard error. 4.1 Asymptotic Filtering Accuracy We first evaluated the filtering accuracy of the max-marginal ensemble on a synthetic 8-class segmentation task. For this experiment, we removed variability due to parameter estimation and focused our analysis on accuracy of inference. We compared our approach to Loopy Belief Propagation (Loopy BP) [8], a state-of-the-art method for approximate inference, on a 11 × 11 two-dimensional grid MRF.∗For the ensemble, we used 22 unique “comb” tree structures to approximate the full grid model (i.e. Figure 2(a)). To generate a synthetic instance, we generated unary potentials ωi(k) uniformly on [0, 1] and pairwise potentials log-uniformly: ωij(k, k′) = exp −v, where v ∼U[−25, 25] was sampled independently for every edge and every pair of classes. (Note that for the ensemble, we normalized unary and edge potentials by dividing by the number of times that each potential was included in any model.) It is well known that inference for such grid MRFs is extremely difficult [8], and we observed that Loopy BP failed to converge for at least a few variables on most examples we generated. Ensemble outperforms Loopy BP. We evaluted our approach on 100 synthetic grid MRF instances. For each instance, we computed the accuracy of filtering using marginals from Loopy BP, the ensemble, and each individual sub-model. We determined error rates by counting the number of times “ground truth” was incorrectly filtered if the top K states were kept for each variable, where we sampled 1000 “ground truth” examples from the true joint distribution using Gibbs sampling. To obtain a good estimate of the true marginals, we restarted the chain for each sample and allowed 1000 iterations of mixing time. The result is presented in Figure 2(b) for all possible values of K (filter aggressiveness.) We found that the ensemble outperformed Loopy BP and the individual sub-models by a significant margin for all K. Effect of sub-model agreement. We next investigated the question of whether or not the ensembles were most accurate on variables for which the sub-models tended to agree. For each variable yij in each instance, we computed the mean pairwise Spearman correlation between the ranking of the 8 classes induced by the max marginals of each of the 22 sub-models. We found that complete agreement between all sub-models never occured (the median correlation was 0.38). We found that sub-model agreement was significantly correlated (p < 10−15) with the error of the ensemble for all values of K, peaking at ρ = −0.143 at K = 5. Thus, increased agreement predicted a decrease in error of the ensemble. We then asked the question: Does the effect of model agreement explain the improvement of the ensemble over Loopy BP? In fact, the improvement in error compared to Loopy BP was not correlated with sub-model agreement for any K (maximum ρ = 0.0185, p < 0.05). Thus, sub-model agreement does not explain the improvement over Loopy BP, indicating that submodel disagreement is not related to the difficulty in inference problems that causes Loopy BP to underperform relative to the ensembles (e.g., due to convergence failure.) ∗We used the UGM Matlab Toolbox by Mark Schmidt for the Loopy BP and Gibbs MCMC sections of this experiment. Publicly available at: http://people.cs.ubc.ca/ schmidtm/Software/UGM.html 6 (a) Decoding Error. (b) Top K = 4 Error. State PCP0.25 Efficiency Level Dimensions in top K=4 (%) 0 10 × 10 × 24 – – 2 20 × 20 × 24 98.8 87.5 4 40 × 40 × 24 93.8 96.9 6 80 × 80 × 24 84.6 99.2 (c) Ensemble efficiency. Figure 3: (a),(b): Prediction error for VideoPose dataset. Reported errors are the average distance from a predicted joint location to the true joint for frames that lie in the [25,75] inter-quartile range (IQR) of errors. Error bars show standard errors computed with respect to clips. All SC models outperform [9]; the “torso only” persistence cascade introduces additional error compared to a single-frame cascade, but adding arm dependencies in the ensemble yields the best performance. (c): Summary of test set filtering efficiency and accuracy for the ensemble cascade. PCP0.25 measures Oracle % of correctly matched limb locations given unfiltered states; see [6] for more details. 4.2 The VideoPose Dataset Our dataset consists of 34 video clips of approximately 50 frames each. The clips were harvested from three popular TV shows: 3 from Buffy the Vampire Slayer, 27 from Friends, and 4 from LOST. Clips were chosen to highlight a variety of situations and and movements when the camera is largely focused on a single actor. In our experiments, we use the Buffy and half of the Friends clips as training (17 clips), and the remaining Friends and LOST clips for testing. In total we test on 901 individual frames. The Friends are split so no clips from the same episode are used for both training and testing. We further set aside 4 of the Friends test clips to use as a development set. Each frame of each clip is hand-annotated with locations of joints of a full pose model: torso, upper/lower arms for both right and left, and top and bottom of head. For each joint, a binary tag indicating whether or not the joint is occluded is also included, to be used in future research.† For simplicity, we use only the torso and upper arm annotations in this work, as these have the strongest continuity across frames and strong geometric relationships. Articulated pose model. All of the models we evaluated on this dataset share the same basic structure: a variable for each limb’s (x, y) location and angle rotation (torso, left arm, and right arm) with edges between torso and arms to model pose geometry. We refer to this basic model, evaluated independently on each frame, as the “Single Frame” approach. For the VideoPose dataset, we augmented this model by adding edges between limb states in adjacent frames (Figure 1), forming an intractable, loopy model. Features: Our features in a single frame are the same as in the beginning levels of the pictorial structure cascade from [6]: unary features are discretized Histogram of Gradient part detectors scores, and pairwise terms measure relative displacement in location and angle between neighboring parts. Pairwise features connecting limbs across time also express geometric displacement, allowing our model to capture the fact that human limbs move smoothly over time. Coarse-to-Fine Ensemble Cascade. We learned a coarse-to-fine structured cascade with six levels for tracking as follows. The six levels use increasingly finer state spaces for joint locations, discretized into bins of resolution 10 × 10 up to 80 × 80, with each stage doubling one of the state space dimensions in the refinement step. All levels use an angular discretization of 24 bins. For the ensemble cascade, we learned three sub-models simultaneously (Figure 1), with each sub-model accounting for temporal consistency for a different limb by adding edges connecting the same limb in consecutive frames. Experimental Comparison. A summary of results are presented in Figure 3. We compared the single-frame cascade and the ensemble cascade to a state-of-the-art single-frame pose detector (Ferrari et al. [9]) and to one of the individual sub-models, modeling torso consistency only (“Torso †The VideoPose dataset is available online at http://vision.grasp.upenn.edu/video/. 7 Figure 4: Qualitative test results. Points shown are the position of left/right shoulders and torsos at the last level of the ensemble SC (blue square, green dot, white circle resp.). Also shown (green line segments) are the best-fitting hypotheses to groundtruth joints, selected from within the top 4 max-marginal values. Shown as dotted gray lines is the best guess pose returned by the [9]. Only”). We evaluated the method from [9] on only the first half of the test data due to computation time (taking approximately 7 minutes/frame). We found that the ensemble cascade was the most accurate for every joint in the model, that all cascades outperformed the state-of-the-art baseline, and, interestingly, that the single-frame cascade outperformed the torso-only cascade. We suspect that the poor performance of the torso-only model may arise because propagating only torso states through time leads to an over-reliance on the relatively weak torso signal to determine the location of all the limbs. Sample qualitative output from the ensemble is presented in Figure 4. 5 Discussion Related Work. Tracking with articulated body parts is challenging for two main reasons. First, body parts are hard to detect in unconstrained environments due to the enormous variability in appearance (from lighting, clothing and articulation) and occlusion. Second, the huge number of degrees of freedom makes exact modeling of the problem computationally prohibitive. In light of these two issues, many works focus on fixed-camera environments (e.g., [10, 11, 12]), some even assuming sillhouettes can be obtained (e.g., [2]), or 3d information from multiple sensors ([13]). In choices of modeling, past works reduce the large state space degrees of freedom by only modeling location and scale, or resorting to sampling methods ([1, 14], or embedding into low-dimensional latent spaces [10]. In contrast, in this work we learn to efficiently navigate an unconstrained state space in the challenging setting of a single, non-fixed camera. We adopt the same basic modeling structure as [15, 9, 16] in our work, but also model dependencies through time. We also take a discriminative approach to training rather than generative. Ferrari et al. [9] use loopy belief propagation to incorporate temporal consistency of parts, but to our knowledge we are the first to quantitatively evaluate on movie/TV show sequences. In the method of dual decomposition [5], efficient optimization of a LP relaxation of MAP inference in an intractable model is achieved by coupling the inference of a collection of tractable sub-models. This coupling is achieved by repeatedly performing inference and updating a set of dual parameters until convegence. In contrast, we perform inference independently in each sub-model only once, and reason about individual variables using the sums of max-marginals. Future Research. Several key questions remain as future directions of research. Although we presented generalization bounds for the error of the cascade, such bounds are purely “post-hoc.” We are currently investigating a priori properties of or assumptions about the data and cascade that will provably lead to efficient cascaded learning and inference. In the future, our approach on the VideoPose dataset could be easily extended to model more limbs, additionally complex features in time and geometry (e.g. [6]), and additional states such as occlusions. Successfully solving this problem is necessary in order to understand the context and consequences of interactions between actors in video; e.g., to be able to follow a pointing arm or to observe the transfer of an important object from one person to another. Acknowledgements The authors were partially supported by NSF Grant 0803256 and ARL Cooperative Agreement W911NF-102-0016. David Weiss was also supported by a NSF Graduate Research Fellowship. 8 References [1] L. Sigal, S. Bhatia, S. Roth, M.J. Black, and M. Isard. Tracking loose-limbed people. In Proc. CVPR, 2004. [2] B. Wu and R. Nevatia. Detection and tracking of multiple, partially occluded humans by bayesian combination of edgelet based part detectors. IJCV, 75(2):247–266, 2007. [3] J.D.J. Shotton, J. Winn, C. Rother, and A. Criminisi. Textonboost for image understanding: Multi-class object recognition and segmentation by jointly modeling texture, layout, and context. IJCV, 81(1), January 2009. [4] D. Weiss and B. Taskar. Structured prediction cascades. In Proc. AISTATS, 2010. [5] N. Komodakis, N. Paragios, and G. Tziritas. MRF optimization via dual decomposition: Message-passing revisited. In Proc. ICCV, 2007. [6] B. Sapp, A. Toshev, and B. Taskar. Cascaded models for articulated pose estimation. In Proc. ECCV, 2010. [7] D. P. Bertsekas. Nonlinear Programming. Athena Scientific, second edition, 1999. [8] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. The MIT Press, 2009. [9] V. Ferrari, M. Marin-Jimenez, and A. Zisserman. Progressive search space reduction for human pose estimation. In Proc. CVPR, 2008. [10] M. Andriluka, S. Roth, and B. Schiele. People-tracking-by-detection and people-detection-by-tracking. In Proc. CVPR, 2008. [11] S. Pellegrini, A. Ess, K. Schindler, and L. Van Gool. Youll Never Walk Alone: Modeling Social Behavior for Multi-target Tracking. In Proc. ICCV, 2009. [12] L. Kratz and K. Nishino. Tracking with Local Spatio-Temporal Motion Patterns in Extremely Crowded Scenes. In Proc. CVPR, 2010. [13] R. Mu˜noz-Salinas, E. Aguirre, and M. Garc´ıa-Silvente. People detection and tracking using stereo vision and color. Image and Vision Computing, 25(6):995–1007, 2007. [14] J. S. Kwon and K. M. Lee. Tracking of a non-rigid object via patch-based dynamic appearance modeling and adaptive basin hopping monte carlo sampling. In Proc. CVPR, 2009. [15] B. Sapp, C. Jordan, and B. Taskar. Adaptive pose priors for pictorial structures. In Proc. CVPR, 2010. [16] M. Andriluka, S. Roth, and B. Schiele. Pictorial structures revisited: People detection and articulated pose estimation. In Proc. CVPR, 2009. 9
2010
182
3,946
Cross Species Expression Analysis using a Dirichlet Process Mixture Model with Latent Matchings Hai-Son Le Machine Learning Department Carnegie Mellon University Pittsburgh, PA, USA hple@cs.cmu.edu Ziv Bar-Joseph Machine Learning Department Carnegie Mellon University Pittsburgh, PA, USA zivbj@cs.cmu.edu Abstract Recent studies compare gene expression data across species to identify core and species specific genes in biological systems. To perform such comparisons researchers need to match genes across species. This is a challenging task since the correct matches (orthologs) are not known for most genes. Previous work in this area used deterministic matchings or reduced multidimensional expression data to binary representation. Here we develop a new method that can utilize soft matches (given as priors) to infer both, unique and similar expression patterns across species and a matching for the genes in both species. Our method uses a Dirichlet process mixture model which includes a latent data matching variable. We present learning and inference algorithms based on variational methods for this model. Applying our method to immune response data we show that it can accurately identify common and unique response patterns by improving the matchings between human and mouse genes. 1 Introduction Researchers have been increasingly relying on cross species analysis to understand how biological systems operate. Sequence based methods have been successfully applied to identify and characterize coding and functional non coding regions in multiple species [1]. However, sequence information is static and thus provides only partial view of cellular activity. More recent studies attempt to integrate sequence and gene expression data from multiple species [2, 3, 4]. Unlike sequence, expression levels are dynamic and differ across time and conditions. By combining expression and sequence data researchers were able to identify both ”core” and ”divergent” genes. ”Core” genes are similarly expressed across species and are useful for constructing models of conserved systems, for example the cell cycle [2]. ”Divergent” genes are similar in sequence but differ in expression across species. These are useful for identifying species specific responses, for example why some pathogens are resistant to drugs while others are not [3]. While useful, cross species analysis of expression data is challenging. In addition to the regular issues with expression data (noise, missing values, etc.) when comparing expression levels across species researchers need to match genes across species. For most genes the correct match in another species (known as ortholog) is not known. A number of methods have been suggested to solve the matching problem. The first set of methods is based on a one to one deterministic assignment by relying on top sequence matches. Such an assignment can be used to concatenate the expression vectors for matched genes across species and then cluster the resulting vectors. For example, Stuart et al. [5] constructed ”metagenes” consisting of top sequence matches from four species. These were used to cluster the data from multiple species to identify conserved and divergent patterns. Bergmann et al. [6] defined one of the species (species A) as a reference and first clustered genes in A. They then used matched genes in the second species (B) as starting points for clustering 1 genes in B. When the clustering algorithm converges in B, genes that remain in the cluster are considered ”core” whereas genes that are removed are ”divergent”. Quon et al. [4] used a mixture of Gaussians model, which takes as input the expression data of orthologous genes and a phylogenetic tree connecting the species, to reconstruct the expression profiles as well as detecting divergent links in the phylogeny. The second set of methods allowed for soft matches but was either limited to analyzing binary or discrete data with very few labels. For example, Lu et al. combined experiments from multiple species by using Markov Random Fields [7] and Gaussian Random Fields [8] in which edges represent sequence similarity and potential functions constrain similar genes across species to have a similar expression pattern. While both approaches led to successful applications, they suffer from drawbacks that limit their use in practice. In many cases the top sequence match is not the correct ortholog and a deterministic assignment may lead to wrong conclusions about the conservation of genes. Methods that have used soft assignments were limited to summarization of the data (up or down regulated) and could not utilize more complex profiles. Here we present a new method that uses soft assignments to allow comparison and clustering across species of arbitrary expression data without requiring prior knowledge on the phylogeny. Our method takes as input expression datasets in two species and a prior on matches between homologous genes in these species (derived from sequence data). The method simultaneously clusters the expression values for both species while computing a posterior for the assignment of orthologs for genes. We use Dirichlet Process model to automatically detect the number of clusters. We have tested our method on simulated and immune response data. In both cases the algorithm was able to find correct matches and to improve upon methods that used a deterministic assignment. While the method was developed for, and applied to, biological data, it is general and can be used to address other problems including matchings of captions to images (see Section 5). 2 Problem definition In this section, we first describe in details the cross species analysis problem for gene expression data. Next, we formalize this as a general clustering and matching problem for cases in which the matches are not known in advance. Using microarrays or new sequencing techniques researchers can monitor the expression levels of genes under certain conditions or at specific time points. For each such measurement we obtain a vector whose elements are the expression values for all genes (there are usually thousands of entries in each vector). We assume that the input consists of microarray experiments from two species and each species has a different set of genes. While the exact matches between genes in both species are not known for most genes, we have a prior for gene pairs (one from each species) which is derived from sequence data [9]. Our goal is to simultaneously cluster the genes in both species. Such clustering can identify coherent and divergent responses between the species. In addition, we would like to infer for each gene in one species whether there exists a homolog that is similarly expressed in the other species and if so, who. The problem can also be formalized more generally in the following way. Denote by x = [x1, x2, . . . , xnx] and y = [y1, y2, . . . , yny] the datasets of samples from two different experiment settings, where xi ∈ℜpx and yj ∈ℜpy. In addition, let M be a sparse non-negative nx × ny matrix that encodes prior information regarding the matching of samples in x and y. We define the match probability between xi and yj as follows: p(xi and yj are matched) = M(i, j) Ni = πi,j p(xi is not matched) = 1 Ni = πi,0 (1) where Ni = 1 + Pny j=1 M(i, j). πi,0 is the prior probability that xi is not matched to any element in Y . We use πi to denote the vector (πi,0, . . . , πi,ny). Finally, let mi ∈{0, 1, . . . . , ny} be the latent matching variable. If mi = 1 we say that xi is matched to ymi. If mi = 0 for we say that xi has no match in y. Our goal is to infer both, the latent variables mj’s and cluster membership for pairs of samples (xi, ymi)’s. The following notations are used in the rest of the paper. Lowercase normal font, e.g x, is used for a single variable and lowercase bold font, e.g x, is used for vectors. Uppercase bold roman letters, such as M, denote matrices. Uppercase letters, e.g X, are used to represent random variables and E[X] represents the expectation of a random variable X. 2 3 Model Model selection is an important problem when analyzing real world data. Many clustering algorithms, including Gaussian mixture models, require as an input the number of clusters. In addition to domain knowledge, this model selection question can be addressed using cross validation. Bayesian nonparametric methods provide an alternative solution allowing the complexity of the model to grow based on the amount of available data. Under-fitting is addressed by the fact that the model allows for unbounded complexity while over-fitting is mitigated by the Bayesian assumption. We use this approach to develop a nonparametric model for clustering and matching cross species expression data. Our model, termed Dirichlet Process Mixture Model with Latent Matchings (DPMMLM) extends the popular Dirichlet Process Mixture Model to cases where priors are provided to matchings between vectors to be clustered. 3.1 Dirichlet Process Let G0 a probability measure on a measurable space. We write G ∼DP(α, G0) if G is a random probability measure drawn from a Dirichlet process (DP). The existence of the Dirichlet process was first proven by [10]. Furthermore, measures of G are discrete with probability one. This property can be seen from the explicit stick-breaking construction due to Sethuraman [11] as follows. Let (Vi)∞ i=1 and (ηi)∞ i=1 be independent sequences of i.i.d random variables: Vi ∼Beta(1, α) and ηi ∼G0. Then a random measure G defined as θi = Vi i−1 Y j=1 (1 −Vj) G = ∞ X i=1 θiδηi (2) where δη is a probability measure concentrated at η, is a random probability measure distributed according to DP(α, G0) as shown in [11] . 3.2 Dirichlet Process Mixture Model (DPMM) Dirichlet process has been used as a nonparametric prior on the parameters of a mixture model. This model is referred to as Dirichlet Process Mixture Model. Let z be the mixture membership indicator variables for data variables x. Using the stick-breaking construction in (2), the Dirichlet process mixture model is given by G ∼DP(α, G0) zi, ηi | G ∼G xi | zi, ηi ∼F(ηi) (3) where F(ηi) denotes the distribution of the observation xi given parameter ηi. 3.3 Dirichlet Process Mixture Model with Latent Matchings (DPMMLM) In this section, we describe the new mixture model based on DP with latent variables for data matching between x and y. We use FX(η), FY (η) to denote the marginal distribution of X and Y respectively; and FX|Y (y, η) to denote the conditional distribution of X given Y . The parameter η is a random variable of the prior distribution G0(η | λ0) with hyperparameter λ0. Also, let zi be the mixture membership of the sample pair (xi, ymi). Our model is given by: G ∼DP(α, G0) zi, ηi | G ∼G mi | πi ∼Discrete(πi) ymi | mi, zi, ηi ∼FY (ηi), if mi > 0 xi | mi, zi, ηi, y ∼ FX|Y (ymi, ηi) if mi > 0 FX(ηi) otherwise (4) The major difference between our model and a regular DPMM is the dependence of xi on y if 3 mi > 0. In other words the assignment of x to a cluster depends on both, its own expression levels and the levels of the y component to which it is matched. If x is not matched to any y component then we resort to the marginal distribution FX of the mixture. 3.4 Mean-field variational methods For probabilistic models, mean-field variational methods [12, 13] provide a deterministic and bounded approximation to the intractable joint probability of observed and hidden variables. Briefly, given a model with observed variables x and hidden variables h, we would like to compute log p(x), which requires us to marginalize over all hidden variables h. Since p(x, h) is often intractable, we can find a tractable probability q(h) that gives the best lower bound of log p(x) using Jensen ’s inequality: log p(x) ≥ Z h q(h) log p(x, h) −q(h) log q(h) dh = Eq[log p(x, h)] −Eq[log q(h)] (5) Maximizing this lower bound is equivalent to finding the distribution q(h) that minimizes the KL divergence between q(h) and p(h | x). Hence, q(h) is the best approximation model within the chosen parametric family. 3.5 Variational Inference for DPMMLM Although the DP mixture model is an ”infinite” mixture model, it is intractable to solve the optimization problem when allowing for infinitely many variables. We thus follow the truncation approach used in [14], and limit the number of cluster to K. When K is chosen to be large enough, the distribution is a drawn from the Dirichlet process [14]. To restrict the number of clusters to K, we set VK = 1 and thus obtain θi>K = 0 in (2). The likelihood of the observed data is p(x, y | α, λ0) = Z m,z,v,η p(η | λ0) p(v | α) nx Y i=1 p(zi | v) K Y k=1 nπi,0fX(xi | ηk) m0 i ny Y j=1 πi,jfX|Y (xi | yj, ηk)fY (yj | ηk) mj i ozk i (6) where p(zi | v) = vzi Qzi−1 k=1 (1 −vk) and v is the stick breaking variables given in Section 3.1. The first part of (6) p(η | λ0) p(v | α) is the likelihood of the model parameters and the second part is the likelihood of the assignments to clusters and matchings. Following the variational inference framework for conjugate-exponential graphical models [15] we choose the distribution that factorizes over {mi, zi}i=1,...,nx, {vk}k=1,...,K and {ηk}k=1,...,K−1 as follows: q(m, z, v, η) = nx Y i=1  qφi(mi) ny Y j=0 qθi,j(zi)mj i K−1 Y k=1 qγk(vk) K Y k=1 qλk(ηk) (7) where qφi(mi) and qθi,j(zi) are multinomial distributions and qγk(vk) are beta distributions. These distributions are conjugate distributions for the likelihood of the parameters in (6). qλk(ηk) requires special treatment due to the coupling of the marginal and conditional distributions in the likelihood. These issues are discussed in details in section 3.5.2. Using this variational distribution we obtain a lower bound for the log likelihood: log p(x, y | α, λ0) ≥E[log p(η | λ0)] + E[log p(V | α)] + nx X i=1 n E[log p(Zi | V)] + ny X j=0 K X k=1 E[M j i Zk i ](log πi,j + ρi,j,k) o −E[log q(M, Z, V, η)] (8) where all expectations are with respect to the distribution q(m, z, v, η) and ρi,j,k = E[log fX|Y (Xi | Yj, ηk)] + E[log fY (Yj | ηk)] if j > 0 E[log fX(Xi | ηk)] if j = 0 4 To compute the terms in (8), we note that E[M j i Zk i ] = φi,jθi,j,k = ψi,j,k E[log p(Zi | V)] = K X k=1 q(zi > k)E[log(1 −Vk)] + q(zi = k)E[log Vk] where q(zi > k) = Pny j=0 PK t=k+1 ψi,j,t and q(zi = k) = Pny j=0 ψi,j,k. 3.5.1 Coordinate ascent inference algorithm The lower bound above can be optimized by a coordinate ascent algorithm. The update rules for all terms except for the qλ(η), are presented below. These are direct applications of the variational inference for conjugate-exponential graphical models [15]. We discuss the update rule for qλ(η) in section 3.5.2. • Update for qγk(vk): γk,1 = 1 + nx X i=1 ny X j=0 ψi,j,k γk,2 = α + nx X i=1 ny X j=0 K X t=k+1 ψi,j,t • Update for qθi,j(zi) and qφi(mi): θi,j,k ∝exp ρi,j,k + k−1 X k=1 E[log(1 −Vk)] + E[log Vk]  φi,j ∝exp  log πi,j + K X k=1 θi,j,k ρi,j,k + k−1 X k=1 E[log(1 −Vk)] + E[log Vk]  3.5.2 Application of the model to multivariate Gaussians The previous sections described the model in a general terms. In the rest of this section, and in our experiments, we focus on data that is assumed to be distributed as a multivariate Gaussian with unknown mean and covariance matrix. The prior distribution G0 is then given by the conjugate prior Gaussian-Wishart distribution. In a classical DP Gaussian Mixture Model with Gaussian-Wishart prior, the posterior distribution of the parameters could be computed analytically. Unfortunately, in our model, the coupling of the conditional and marginal distribution in the likelihood makes it difficult to derive analytical formulas for the posterior distribution. Note that if (X, Y ) ∼N(µ, Σ) with µ = (µX, µY ) and Σ =  ΣX ΣXY ΣY X ΣY  then X ∼N(µX, ΣX), Y ∼N(µY , ΣY ) and X|Y = y ∼N(µX + ΣXY Σ−1 Y (y −µY ), ΣX −ΣXY Σ−1 Y ΣY X). (9) Therefore, we introduce an approximation distribution for the datasets which decouples the marginal and conditional distributions as follows: fX(x | µX, ΛX) = N(µX, Σ = Λ−1 X ) fY (y | µY , ΛY ) = N(µY , Σ = Λ−1 Y ) fX|Y (x | y, W, b, µX, ΛX) = N(µX + b −Wy, Σ = Λ−1 X ) where W is a px × py projection matrix and Λ is the precision matrix. In this approximation, we assume that the covariance matrices of X and X|Y are the same. In other words, the covariance of X is independent of Y . The matrix W models the linear correlation of X on Y , similar to −ΣXY Σ−1 Y in (9). The priors for µX, ΛX and µY , ΛY are given by Gaussian-Wishart(GW) distributions. A flat improper prior is given to W and b, p0(W) = 1, p0(b) = 1 for all W, b. These assumptions lead to decoupling of the marginal and conditional distributions. Therefore, the distribution qλk(ηk) can now be factorized into two GW distributions and a distribution of W. To avoid over-cluttering symbols, we omit the subscript k of the specific cluster k. q∗ λk(ηk) = GW(µX, ΛX) GW(µY , ΛY ) g(W) g(b) 5 Posterior distribution of µY , ΛY : The update rules follow the standard posterior distribution of Gaussian-Wishart conjugate priors. Posterior distribution of µX, ΛX and W, b: Due to the coupling of µX, ΛX with W, we do a coordinate ascent procedure to find the optimal posterior distribution. The posterior distribution of W, b is a singleton discrete distribution g such that g(W∗) = 1, g(b∗) = 1. • Update for posterior distribution of µX, ΛX: κX = κX0 + nX mX = 1 κX (κX0mX0 + nXx) S−1 X = S−1 X0 + VX + κX0nX κX0 + nX (x −mX0)(x −mX0)T νX = νX0 + nX where nX = nx X n=1 ny X j=0 ψi,j,k, x = 1 nX nx X i=1 ψi,0,kxi + ny X j=1 ψi,j,k(xi −b + W∗yj)  and VX = nx X i=1  ψi,0,k(xi−x)(xi−x)T + ny X j=1 ψi,j,k(xi−b+W∗yj −x)(xi−b+W∗yj −x)T . • Update for W∗, b∗: We find W∗, b∗that maximizes the log likelihood. Taking the derivative with respect to W∗and solving for W∗, we get W∗=  nx X i=1 ny X j=1 ψi,j,k(xi −mX −b)yT j  nx X i=1 ny X j=1 ψi,j,kyjyT j −1 b∗= −  nx X i=1 ny X j=1 ψi,j,k(xi −mX + W∗yj)  / nx X i=1 ny X j=1 ψi,j,k 4 Experiments and Results 4.1 Simulated data We demonstrate the performance of the model in identifying data matchings as well as cluster membership of datapoints using simulated data. To generate a simulated dataset, we sample 120 datapoints from a mixture of three 5-dimensional Gaussians with separation coefficient = 2 leading to well separated mixtures1. The covariance matrix was derived from the autocorrelation matrix for a first-order autoregressive process leading to highly dependent components (ρ = 0.9). From these samples, we use the first 3 dimensions to create 120 datapoints x = [x1, . . . , x120]. The last two dimensions of the first 100 datapoints are used to create y = [y1, . . . , y100] (note that there are no matches for 20 points in x). Hence, the ground truth M matrix is a diagonal 120 × 100 matrix. We selected a large value for the diagonal entries (τ = 1000) in order to place a strong prior for the correct matchings. Next, for t = 0, . . . , 20, we randomly select t entries on each row of M and set them to τ 2r, where r ∼χ2 1. We repeat the process 20 times for each t to compute the mean and standard deviation shown in Figure 1(a) and Figure 1(b). We compare the performance of our model(DPMMLM) with a standard Dirichlet Process Mixture Model where each component in x is matched based on the highest prior: {(xi, yj∗) | i = 1, . . . , 100 and j∗= argmaxjM(i, j)} (DPMM). For all models, the truncation level (K) is set to 20 and α is 1. Figure 1(a) presents the percentage of correct matchings inferred by DPMMLM and the highest prior matching. For DPMMLM, a datapoint xi is matched to the datapoint yj with the largest posterior probability φi,j. With the added noise, DPMMLM can still achieve an accuracy of 50% when the highest prior matching leads to only 25% accuracy. Figure 1(b) and 1(c) show the Normalized Mutual Information (NMI) and Adjusted Rand index [17] for the clusters inferred by the two models compared to the true clusters. As can be seen, while the percentage of correct matchings decreased with the added noise, DPMMLM still achieves high NMI of 0.8 and Adjusted Rand index of 0.92. In conclusion, by relying on matchings of points DPMMLM can still performs very well in terms of its ability to identify correct clusters even with the high noise levels. 1Following [16], a Gaussian mixture is c-separated if for each pair (i, j) of components, ∥mi −mj∥2 ≥ c2D max(λmax i , λmax j ) , where λmax denotes the maximum eigenvalue of their covariance. 6 0 5 10 15 20 20 30 40 50 60 70 80 90 100 Number of randomentries per row (t) % of correct matchings DPMMLM Top matches (a) The % of correct matchings. 0 5 10 15 20 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number of randomentries per row (t) Normalized Mutual Information DPMMLM DPMM (b) Normalized MI. 0 5 10 15 20 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number of randomentries per row (t) Adjusted Rand index DPMMLM DPMM (c) Adjusted Rand index. Figure 1: Evaluation of the result on simulated data. 4.2 Immune response dataset Cluster 1 2 4 6 8 Cluster 2 2 4 6 8 Cluster 3 2 4 6 8 Cluster 4 2 4 6 8 Cluster 5 2 4 6 8 −4 −2 0 2 4 (a) DPMMLM Cluster 1 2 4 6 8 Cluster 2 2 4 6 8 Cluster 3 2 4 6 8 −4 −2 0 2 4 (b) DPMM Figure 2: The heatmap for clusters inferred for the immune response dataset. We compared human and mouse immune response datasets to identify similar and divergent genes. We selected two experiments that studied immune response to gram negative bacteria. The first was a time series of human response to Salmonella [18]. Cells were infected with Salmonella and were profiled at: 0.5h, 1h, 2h, 3h and 4h. The second looked at mouse response to Yersinia enterocolitica with and without treatment by IFN-γ [19]. We used BLASTN to compute the sequence similarity (bit-score) between all human and mouse genes. For each species we selected the most varying 500 genes and expanded the gene list to include all matched genes in the other species with a bit score greater than 75. This led to a set of 1476 human and 1967 mouse genes which we compared using our model. The M matrix is the bit scores between human and mouse genes thresholded at 75. The resulting clusters are presented in Figure 2(a). In that figure, the first five dimensions are human expression values and each gene in human is matched to the mouse gene with the highest posterior. Human genes which are not matched to any mouse gene in the cluster have a blank line on the mouse side of the figure. The algorithm identified five different clusters. Clusters 1, 4 and 5 display a similar expression pattern in human and mouse with genes either up or down regulated in response to the infection. Genes in cluster 2 differ between the two species being mostly down regulated in humans while slightly upregulated in mouse. Human genes in cluster 3 also differ from their mouse orthologs. While they are strongly upregulated in humans, the corresponding mouse genes do not change much. 7 P value Corrected P GO term description P value Corrected P GO term description 2.86216e-10 <0.001 regulation of apoptosis 5.06685e-07 0.001 response to stimulus 4.97408e-10 <0.001 regulation of cell death 6.15795e-07 0.001 negative regulation of biological process 7.82427e-10 <0.001 protein binding 7.70651e-07 0.001 cellular process 4.14320e-10 <0.001 regulation of programmed cell death 7.78266e-07 0.002 regulation of localization 4.49332e-09 <0.001 positive regulation of cellular process 1.09778e-06 0.002 response to organic substance 4.77653e-09 <0.001 positive regulation of biological process 1.42704e-06 0.002 collagen metabolic process 8.27313e-09 <0.001 response to chemical stimulus 1.91735e-06 0.003 negative regulation of cellular process 1.17013e-07 0.001 cytoplasm 3.23244e-06 0.005 multicellular organismal macromolecule metabolic process 1.28299e-07 0.001 response to stress 3.39901e-06 0.005 interspecies interaction 2.20104e-07 0.001 cell proliferation 3.66178e-06 0.005 negative regulation of apoptosis Table 1: The GO enrichment result for cluster 1 identified by DPMMLM. We used the Gene Ontology (GO, www.geneontology.org) to calculate the enrichment of functional categories in each cluster based on the hypergeometric distribution. Genes in cluster 1 (Table 1) are associated with immune and stress responses. Interestingly the most significant category for this cluster is ”regulation of apoptosis” (corrected p-value <0.001). Indeed, both Salmonella and Yersinia are known to induce apoptosis in host cells [20]. When clustering the two datasets independently the p-value for this category is greatly reduced indicating that accurate matchings can lead to better identification of core pathways (see Appendix). Cluster 4 contains the most coherent set of upregulated genes across the two species. One of top GO categories for this cluster is ’response to molecule of bacterial origin’ (corrected p-value < 0.001) which is the most accurate description of the condition tested. See Appendix for complete GO tables of all clusters. In contrast to clusters in which mouse and human genes are similarly expressed, cluster 3 genes are strongly upregulated in human cells while not changing in mouse. This cluster is enriched for ribosomal proteins (corrected p-value <0.001). This may indicate different strategies utilized by the bacteria in the two experiments. There are studies that show that pathogens can upregulate the synthesis of ribosomal genes (which are required for translation) [21] whereas other studies indicate that ribosomal genes may not change much, or may even be reduced, following infection [22]. The results of our analysis indicate that while following Salmonella infection in human cells ribosomal genes are upregulated, they are not activated following Yarsinia infection in mouse. We have also analyzed the matchings obtained using sequence data alone (prior) and by combining sequence and expression data (posterior) using our method. The top posterior gene is the same as the top prior gene in most cases (905 of the 1476 human genes). However, there are several cases in which the prior and posterior differ. 293 human genes are not matched to any mouse gene in the cluster they are assigned to indicating that they are expressed in a species dependent manner. Additionally, for 278 human genes the top posterior and prior mouse gene differ. To test whether these differences inferred by the algorithm are biologically meaningful we compared our Dirichlet method to a method that uses deterministic assignments, as was done in the past. Using such assignments the algorithm identified only three clusters as shown in Figure 2(b). Neither of these clusters looked homogenous across species. 5 Conclusions We have developed a new model for simultaneously clustering and matching genes across species. The model uses a Dirichlet Process to infer the number of clusters. We developed an efficient variational inference method that scales to large datasets with almost 2000 datapoints. We have also demonstrated the power of our method on simulated data and immune response dataset. While the method was presented in the context of expression data it is general and can be used for other matching tasks in which a prior can be obtained. For example, when trying to determine a caption for images extracted from webpages a prior can be obtained by relying on the distance between the image and the text on the page. Next, clustering can be employed to utilize the abundance of images that are extracted and improve the matching outcome. Acknowledgments We thank the anonymous reviewers for constructive and insightful comments. This work is supported in part by NIH grant 1RO1 GM085022 and NSF grants DBI-0965316 and CAREER-0448453 to Z.B.J. 8 References [1] M. Kellis, N. Patterson, M. Endrizzi, B. Birren, and E. S. Lander. Sequencing and comparison of yeast species to identify genes and regulatory elements. Nature, 423:241–254, May 2003. [2] L. J. Jensen, T. S. Jensen, U. de Lichtenberg, S. Brunak, and P. Bork. Co-evolution of transcriptional and post-translational cell-cycle regulation. Nature, 443:594–597, Oct 2006. [3] G. Lelandais et al. Genome adaptation to chemical stress: clues from comparative transcriptomics in Saccharomyces cerevisiae and Candida glabrata. Genome Biol., 9:R164, 2008. [4] G. Quon, Y. W. Teh, E. Chan, M. Brudno, T. Hughes, and Q. D. Morris. A mixture model for the evolution of gene expression in non-homogeneous datasets. In Advances in Neural Information Processing Systems, volume 21, 2009. [5] J. M. Stuart, E. Segal, D. Koller, and S. K. Kim. A gene-coexpression network for global discovery of conserved genetic modules. Science, 302:249–255, Oct 2003. [6] Sven Bergmann, Jan Ihmels, and Naama Barkai. Similarities and differences in genome-wide expression data of six organisms. PLoS Biol, 2(1):e9, 12 2003. [7] Y. Lu, R. Rosenfeld, and Z. Bar-Joseph. Identifying cycling genes by combining sequence homology and expression data. Bioinformatics, 22:e314–322, Jul 2006. [8] Y. Lu, R. Rosenfeld, G. J. Nau, and Z. Bar-Joseph. Cross species expression analysis of innate immune response. J. Comput. Biol., 17:253–268, Mar 2010. [9] R. Sharan et al. Conserved patterns of protein interaction in multiple species. Proc. Natl. Acad. Sci. U.S.A., 102:1974–1979, Feb 2005. [10] Thomas S. Ferguson. A bayesian analysis of some nonparametric problems. The Annals of Statistics, 1(2):209–230, 1973. [11] J. Sethuraman. A constructive definition of dirichlet priors. Statistica Sinica, 4:639–650, 1994. [12] Michael I. Jordan, Zoubin Ghahramani, Tommi S. Jaakkola, and Lawrence K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, November 1999. [13] Martin J. Wainwright and Michael I. Jordan. Graphical models, exponential families, and variational inference. Found. Trends Mach. Learn., 1(1-2):1–305, 2008. [14] H. Ishwaran and James. Gibbs sampling methods for stick breaking priors. Journal of the American Statistical Association, pages 161–173, March 2001. [15] Zoubin Ghahramani and Matthew J. Beal. Propagation algorithms for variational bayesian learning. In In Advances in Neural Information Processing Systems 13, pages 507–513. MIT Press, 2001. [16] Sanjoy Dasgupta. Learning mixtures of gaussians. In FOCS ’99: Proceedings of the 40th Annual Symposium on Foundations of Computer Science, Washington, DC, USA, 1999. [17] M. Meila. Comparing clusterings by the variation of information. In Learning theory and Kernel machines: 16th Annual Conference on Learning Theory and 7th Kernel Workshop, COLT/Kernel 2003, Washington, DC, USA, August 24-27, 2003: proceedings, page 173. Springer Verlag, 2003. [18] C. S. Detweiler et al. Host microarray analysis reveals a role for the Salmonella response regulator phoP in human macrophage cell death. Proc. Natl. Acad. Sci. U.S.A., 98:5850–5855, May 2001. [19] K. van Erp et al. Role of strain differences on host resistance and the transcriptional response of macrophages to infection with Yersinia enterocolitica. Physiol. Genomics, 25:75–84, 2006. [20] D. M. Monack, B. Raupach, et al. Salmonella typhimurium invasion induces apoptosis in infected macrophages. Proc. Natl. Acad. Sci. U.S.A., 93:9833–9838, Sep 1996. [21] O. O. Zharskaia et al. [Activation of transcription of ribosome genes following human embryo fibroblast infection with cytomegalovirus in vitro]. Tsitologiia, 45:690–701, 2003. [22] J. W. Gow, S. Hagan, P. Herzyk, C. Cannon, P. O. Behan, and A. Chaudhuri. A gene signature for post-infectious chronic fatigue syndrome. BMC Med Genomics, 2:38, 2009. 9
2010
183
3,947
t-Logistic Regression Nan Ding2, S.V. N. Vishwanathan1,2 Departments of 1Statistics and 2Computer Science Purdue University ding10@purdue.edu, vishy@stat.purdue.edu Abstract We extend logistic regression by using t-exponential families which were introduced recently in statistical physics. This gives rise to a regularized risk minimization problem with a non-convex loss function. An efficient block coordinate descent optimization scheme can be derived for estimating the parameters. Because of the nature of the loss function, our algorithm is tolerant to label noise. Furthermore, unlike other algorithms which employ non-convex loss functions, our algorithm is fairly robust to the choice of initial values. We verify both these observations empirically on a number of synthetic and real datasets. 1 Introduction Many machine learning algorithms minimize a regularized risk [1]: J(θ) = Ω(θ) + Remp(θ), where Remp(θ) = 1 m m  i=1 l(xi, yi, θ). (1) Here, Ω is a regularizer which penalizes complex θ; and Remp, the empirical risk, is obtained by averaging the loss l over the training dataset {(x1, y1), . . . , (xm, ym)}. In this paper our focus is on binary classification, wherein features of a data point x are extracted via a feature map φ and the label is usually predicted via sign(φ(x), θ). If we define the margin of a training example (x, y) as u(x, y, θ) := y φ(x), θ, then many popular loss functions for binary classification can be written as functions of the margin. Examples include1 l(u) = 0 if u > 0 and 1 otherwise . (0 −1 loss) (2) l(u) = max(0, 1 −u) (Hinge Loss) (3) l(u) = exp(−u) (Exponential Loss) (4) l(u) = log(1 + exp(−u)) (Logistic Loss). (5) The 0 −1 loss is non-convex and difficult to handle; it has been shown that it is NP-hard to even approximately minimize the regularized risk with the 0 −1 loss [2]. Therefore, other loss functions can be viewed as convex proxies of the 0 −1 loss. Hinge loss leads to support vector machines (SVMs), exponential loss is used in Adaboost, and logistic regression uses the logistic loss. Convexity is a very attractive property because it ensures that the regularized risk minimization problem has a unique global optimum [3]. However, as was recently shown by Long and Servedio [4], learning algorithms based on convex loss functions are not robust to noise2. Intuitively, the convex loss functions grows at least linearly with slope |l(0)| as u ∈(−∞, 0), which introduces the overwhelming impact from the data with u 0. There has been some recent and some notso-recent work on using non-convex loss functions to alleviate the above problem. For instance, a recent manuscript by [5] uses the cdf of the Guassian distribution to define a non-convex loss. 1We slightly abuse notation and use l(u) to denote l(u(x, y, θ)). 2Although, the analysis of [4] is carried out in the context of boosting, we believe, the results hold for a larger class of algorithms which minimize a regularized risk with a convex loss function. 1 In this paper, we continue this line of inquiry and propose a non-convex loss function which is firmly grounded in probability theory. By extending logistic regression from the exponential family to the t-exponential family, a natural extension of exponential family of distributions studied in statistical physics [6–10], we obtain the t-logistic regression algorithm. Furthermore, we show that a simple block coordinate descent scheme can be used to solve the resultant regularized risk minimization problem. Analysis of this procedure also intuitively explains why tlogistic regression is able to handle label noise. Our paper is structured as follows: In section 2 we briefly review logistic regression especially in the context of exponential fam-4 -2 0 2 4 2 4 6 margin loss Hinge exp Logistic 0-1 loss Figure 1: Some commonly used loss functions for binary classification. The 0-1 loss is non-convex. The hinge, exponential, and logistic losses are convex upper bounds of the 0-1 loss. ilies. In section 3, we review t-exponential families, which form the basis for our proposed t-logistic regression algorithm introduced in section 4. In section 5 we utilize ideas from convex multiplicative programming to design an optimization strategy. Experiments that compare our new approach to existing algorithms on a number of publicly available datasets are reported in section 6, and the paper concludes with a discussion and outlook in section 7. Some technical details as well as extra experimental results can be found in the supplementary material. 2 Logistic Regression Since we build upon the probabilistic underpinnings of logistic regression, we briefly review some salient concepts. Details can be found in any standard textbook such as [11] or [12]. Assume we are given a labeled dataset (X, Y) = {(x1, y1), . . . , (xm, ym)} with the xi’s drawn from some domain X and the labels yi ∈{±1}. Given a family of conditional distributions parameterized by θ, using Bayes rule, and making a standard iid assumption about the data allows us to write p(θ | X, Y) = p(θ) m  i=1 p(yi| xi; θ)/p(Y | X) ∝p(θ) m  i=1 p(yi| xi; θ) (6) where p(Y | X) is clearly independent of θ. To model p(yi| xi; θ), consider the conditional exponential family of distributions p(y| x; θ) = exp (φ(x, y), θ −g(θ | x)) , (7) with the log-partition function g(θ | x) given by g(θ | x) = log (exp (φ(x, +1), θ) + exp (φ(x, −1), θ)) . (8) If we choose the feature map φ(x, y) = y 2φ(x), and denote u = y φ(x), θ then it is easy to see that p(y| x; θ) is the logistic function p(y| x; θ) = exp(u/2) exp(u/2) + exp(−u/2) = 1 1 + exp(−u). (9) By assuming a zero mean isotropic Gaussian prior N(0, 1 √ λI) for θ, plugging in (9), and taking logarithms, we can rewrite (6) as −log p(θ | X, Y) = λ 2 θ2 + m  i=1 log (1 + exp (−yi φ(xi), θ)) + const. . (10) Logistic regression computes a maximum a-posteriori (MAP) estimate for θ by minimizing (10) as a function of θ. Comparing (1) and (10) it is easy to see that the regularizer employed in logistic regression is λ 2 θ2, while the loss function is the negative log-likelihood −log p(y| x; θ), which thanks to (9) can be identified with the logistic loss (5). 2 3 t-Exponential family of Distributions In this section we will look at generalizations of the log and exp functions which were first introduced in statistical physics [6–9]. Some extensions and machine learning applications were presented in [13]. In fact, a more general class of functions was studied in these publications, but for our purposes we will restrict our attention to the so-called t-exponential and t-logarithm functions. The t-exponential function expt for (0 < t < 2) is defined as follows: expt(x) :=  exp(x) if t = 1 [1 + (1 −t)x]1/(1−t) + otherwise. (11) where (·)+ = max(·, 0). Some examples are shown in Figure 2. Clearly, expt generalizes the usual exp function, which is recovered in the limit as t →1. Furthermore, many familiar properties of exp are preserved: expt functions are convex, non-decreasing, non-negative and satisfy expt(0) = 1 [9]. But expt does not preserve one very important property of exp, namely expt(a + b) = expt(a) · expt(b). One can also define the inverse of expt namely logt as logt(x) := log(x) if t = 1  x1−t −1  /(1 −t) otherwise. (12) Similarly, logt(ab) = logt(a) + logt(b). From Figure 2, it is clear that expt decays towards 0 more slowly than the exp function for 1 < t < 2. This important property leads to a family of heavy tailed distributions which we will later exploit. -3 -2 -1 0 1 2 1 2 3 4 5 6 7 x expt exp(x) t = 1.5 t = 0.5 t →0 1 2 3 4 5 6 7 -3 -2 -1 0 1 2 x logt log(x) t = 1.5 t = 0.5 t →0 -4 -2 0 2 4 2 4 6 margin loss 0-1 loss t = 1 (logistic) t = 1.3 t = 1.6 t = 1.9 Figure 2: Left: expt and Middle: logt for various values of t indicated. The right figure depicts the t-logistic loss functions for different values of t. When t = 1, we recover the logistic loss Analogous to the exponential family of distributions, the t-exponential family of distributions is defined as [9, 13]: p(x; θ) := expt (φ(x), θ −gt(θ)) . (13) A prominent member of the t-exponential family is the Student’s-t distribution [14]. Just like in the exponential family case, gt the log-partition function ensures that p(x; θ) is normalized. However, no closed form solution exists for computing gt exactly in general. A closely related distribution, which often appears when working with t-exponential families is the so-called escort distribution [9, 13]: qt(x; θ) := p(x; θ)t/Z(θ) (14) where Z(θ) =  p(x; θ)tdx is the normalizing constant which ensures that the escort distribution integrates to 1. Although gt(θ) is not the cumulant function of the t-exponential family, it still preserves convexity. In addition, it is very close to being a moment generating function ∇θgt(θ) = Eqt(x;θ) [φ(x)] . (15) The proof is provided in the supplementary material. A general version of this result appears as Lemma 3.8 in Sears [13] and a version specialized to the generalized exponential families appears as Proposition 5.2 in [9]. The main difference from ∇θg(θ) of the normal exponential family is that now ∇θgt(θ) is equal to the expectation of its escort distribution qt(x; θ) instead of p(x; θ). 3 4 Binary Classification with the t-exponential Family In t-logistic regression we model p(y| x; θ) via a conditional t-exponential family distribution p(y| x; θ) = expt (φ(x, y), θ −gt(θ | x)) , (16) where 1 < t < 2, and compute the log-partition function gt by noting that expt (φ(x, +1), θ −gt(θ | x)) + expt (φ(x, −1), θ −gt(θ | x)) = 1. (17) Even though no closed form solution exists, one can compute gt given θ and x using numerical techniques efficiently. The Student’s-t distribution can be regarded as a counterpart of the isotropic Gaussian prior in the t-exponential family [14]. Recall that a one dimensional Student’s-t distribution is given by St(x|µ, σ, v) = Γ((v + 1)/2) √vπΓ(v/2)σ1/2  1 + (x −µ)2 vσ −(v+1)/2 , (18) where Γ(·) denotes the usual Gamma function and v > 1 so that the mean is finite. If we select t satisfying −(v + 1)/2 = 1/(1 −t) and denote, Ψ =  Γ((v + 1)/2) √vπΓ(v/2)σ1/2 −2/(v+1) , then by some simple but tedious calculation (included in the supplementary material) St(x|µ, σ, v) = expt(−˜λ(x −µ)2/2 −˜gt) (19) where ˜λ = 2Ψ (t −1)vσ and ˜gt = Ψ −1 t −1 . Therefore, we work with the Student’s-t prior in our setting: p(θ) = d  j=1 p(θj) = d  j=1 St(θj|0, 2/λ, (3 −t)/(t −1)). (20) Here, the degree of freedom for Student’s-t distribution is chosen such that it also belongs to the expt family, which in turn yields v = (3 −t)/(t −1). The Student’s-t prior is usually preferred to the Gaussian prior when the underlying distribution is heavy-tailed. In practice, it is known to be a robust3 alternative to the Gaussian distribution [16, 17]. As before, if we let φ(x, y) = y 2φ(x) and plot the negative log-likelihood −log p(y| x; θ), then we no longer obtain a convex loss function (see Figure 2). Similarly, −log p(θ) is no longer convex when we use the Student’s-t prior. This makes optimizing the regularized risk challenging, therefore we employ a different strategy. Since logt is also a monotonically increasing function, instead of working with log, we can equivalently work with the logt function (12) and minimize the following objective function: ˆJ(θ) = −logt p(θ) m  i=1 p(yi| xi; θ)/p(Y | X) = 1 t −1 p(θ) m  i=1 p(yi| xi; θ)/p(Y | X) 1−t + 1 1 −t, (21) where p(Y | X) is independent of θ. Using (13), (18), and (11), we can further write ˆJ(θ) ∝ d  j=1 1 + (1 −t)(−˜λθ2 j/2 −˜gt)    rj(θ) m  i=1 1 + (1 −t)( yi 2 φ(xi), θ  −gt(θ | xi))    li(θ) +const. . = d  j=1 rj(θ) m  i=1 li(θ) + const. (22) 3There is no unique definition of robustness. For example, one of the definitions is through the outlierproneness [15]: p(θ | X, Y, xn+1, yn+1) →p(θ | X, Y) as xn+1 →∞. 4 Since t > 1, it is easy to see that rj(θ) > 0 is a convex function of θ. On the other hand, since gt is convex and t > 1 it follows that li(θ) > 0 is also a convex function of θ. In summary, ˆJ(θ) is a product of positive convex functions. In the next section we will present an efficient optimization strategy for dealing with such problems. 5 Convex Multiplicative Programming In convex multiplicative programming [18] we are interested in the following optimization problem: min θ P(θ)  N  n=1 zn(θ) s.t. θ ∈Rd, (23) where zn(θ) are positive convex functions. Clearly, (22) can be identified with (23) by setting N = d+m and identifying zn(θ) = rn(θ) for n = 1, . . . , d and zn+d(θ) = ln(θ) for n = 1, . . . , m. The optimal solutions to the problem (23) can be obtained by solving the following parametric problem (see Theorem 2.1 of Kuno et al. [18]): min ξ min θ MP(θ, ξ)  N  n=1 ξnzn(θ) s.t. θ ∈Rd, ξ > 0, N  n=1 ξn ≥1. (24) The optimization problem in (24) is very reminiscent of logistic regression. In logistic regression, ln(θ) = −  yn 2 φ(xn), θ  +g(θ | xn), while here ln(θ) = 1+(1−t)  yn 2 φ(xn), θ  −gt(θ | xn)  . The key difference is that in t-logistic regression each data point xn has a weight (or influence) ξn associated with it. Exact algorithms have been proposed for solving (24) (for instance, [18]). However, the computational cost of these algorithms grows exponentially with respect to N which makes them impractical for our purposes. Instead, we apply a block coordinate descent based method. The main idea is to minimize (24) with respect to θ and ξ separately. ξ-Step: Assume that θ is fixed, and denote ˜zn = zn(θ) to rewrite (24) as: min ξ N  n=1 ξn˜zn s.t. ξ > 0, N  n=1 ξn ≥1. (25) Since the objective function is linear in ξ and the feasible region is a convex set, (25) is a convex optimization problem. By introducing a non-negative Lagrange multiplier γ ≥0, the partial Lagrangian and its gradient with respect to ξn can be written as L(ξ, γ) = N  n=1 ξn˜zn + γ · 1 − N  n=1 ξn (26) ∂ ∂ξn L(ξ, γ) = ˜zn −γ  n=n ξn. (27) Setting the gradient to 0 obtains γ = ˜zn  n=n ξn . Since ˜zn > 0, it follows that γ cannot be 0. By the K.K.T. conditions [3], we can conclude that N n=1 ξn = 1. This in turn implies that γ = ˜znξn or (ξ1, . . . , ξN) = (γ/˜z1, . . . , γ/˜zN), with γ = N  n=1 ˜z 1 N n . (28) Recall that ξn in (24) is the weight (or influence) of each term zn(θ). The above analysis shows that γ = ˜zn(θ)ξn remains constant for all n. If ˜zn(θ) becomes very large then its influence ξn is reduced. Therefore, points with very large loss have their influence capped and this makes the algorithm robust to outliers. θ-Step: In this step we fix ξ > 0 and solve for the optimal θ. This step is essentially the same as logistic regression, except that each component has a weight ξ here. min θ N  n=1 ξnzn(θ) s.t. θ ∈Rd . (29) 5 This is a standard unconstrained convex optimization problem which can be solved by any off the shelf solver. In our case we use the L-BFGS Quasi-Newton method. This requires us to compute the gradient ∇θzn(θ): for n = 1, . . . , d ∇θzn(θ) = ∇θrn(θ) = (t −1)˜λθn · en for n = 1, . . . , m ∇θzn+d(θ) = ∇θln(θ) = (1 −t) yn 2 φ(xn) −∇θgt(θ | xn) = (1 −t) yn 2 φ(xn) −Eqt(yn| xn;θ) yn 2 φ(xn)  , where en denotes the d dimensional vector with one at the n-th coordinate and zeros elsewhere (n-th unit vector). qt(y| x; θ) is the escort distribution of p(y| x; θ) (16): qt(y| x; θ) = p(y| x; θ)t p(+1| x; θ)t + p(−1| x; θ)t . (30) The objective function is monotonically decreasing and is guaranteed to converge to a stable point of P(θ). We include the proof in the supplementary material. 6 Experimental Evaluation Our experimental evaluation is designed to answer four natural questions: 1) How does the generalization capability (measured in terms of test error) of t-logistic regression compare with existing algorithms such as logistic regression and support vector machines (SVMs) both in the presence and absence of label noise? 2) Do the ξ variables we introduced in the previous section have a natural interpretation? 3) How much overhead does t-logistic regression incur as compared to logistic regression? 4) How sensitive is the algorithm to initialization? The last question is particularly important given that the algorithm is minimizing a non-convex loss. To answer the above questions empirically we use six datasets, two of which are synthetic. The Long-Servedio dataset is an artificially constructed dataset to show that algorithms which minimize a differentiable convex loss are not tolerant to label noise Long and Servedio [4]. The examples have 21 dimensions and play one of three possible roles: large margin examples (25%, x1,2,...,21 = y); pullers (25%, x1,...,11 = y, x12,...,21 = −y); and penalizers (50%, Randomly select and set 5 of the first 11 coordinates and 6 out of the last 10 coordinates to y, and set the remaining coordinates to −y). The Mease-Wyner is another synthetic dataset to test the effect of label noise. The input x is a 20-dimensional vector where each coordinate is uniformly distributed on [0, 1]. The label y is +1 if 5 j=1 xj ≥2.5 and −1 otherwise [19]. In addition, we also test on Mushroom, USPS-N (9 vs. others), Adult, and Web datasets, which are often used to evaluate machine learning algorithms (see Table 1 in supplementary material for details). For simplicity, we use the identity feature map φ(x) = x in all our experiments, and set t ∈ {1.3, 1.6, 1.9} for t-logistic regression. Our comparators are logistic regression, linear SVMs4, and an algorithm (the probit) which employs the probit loss, L(u) = 1 −erf(2u), used in BrownBoost/RobustBoost [5]. We use the L-BFGS algorithm [21] for the θ-step in t-logistic regression. L-BFGS is also used to train logistic regression and the probit loss based algorithms. Label noise is added by randomly choosing 10% of the labels in the training set and flipping them; each dataset is tested with and without label noise. We randomly select and hold out 30% of each dataset as a validation set and use the rest of the 70% for 10-fold cross validation. The optimal parameters namely λ for t-logistic and logistic regression and C for SVMs is chosen by performing a grid search over the parameter space  2−7,−6,...,7 and observing the prediction accuracy over the validation set. The convergence criterion is to stop when the change in the objective function value is less than 10−4. All code is written in Matlab, and for the linear SVM we use the Matlab interface of LibSVM [22]. Experiments were performed on a Qual-core machine with Dual 2.5 Ghz processor and 32 Gb RAM. In Figure 3, we plot the test error with and without label noise. In the latter case, the test error of t-logistic regression is very similar to logistic regression and Linear SVM (with 0% test error in 4We also experimented with RampSVM [20], however, the results are worser than the other algorithms. We therefore report these results in the supplementary material. 6 0 8 16 24 32 TestError(%) 0.0 1.5 3.0 4.5 6.0 0.0 0.3 0.6 0.9 1.2 logis. t=1.3 t=1.6 t=1.9 probit SVM 0.0 1.5 3.0 4.5 6.0 TestError(%) logis. t=1.3 t=1.6 t=1.9 probit SVM 14.4 15.2 16.0 16.8 logis. t=1.3 t=1.6 t=1.9 probit SVM 0.0 0.8 1.6 2.4 3.2 Figure 3: The test error rate of various algorithms on six datasets (left to right, top: Long-Servedio, Mease-Wyner, Mushroom; bottom: USPS-N, Adult, Web) with and without 10% label noise. All algorithms are initialized with θ = 0. The blue (light) bar denotes a clean dataset while the magenta (dark) bar are the results with label noise added. Also see Table 3 in the supplementary material. Long-Servedio and Mushroom datasets), with a slight edge on some datasets such as Mease-Wyner. When label noise is added, t-logistic regression (especially with t = 1.9) shows significantly5 better performance than all the other algorithms on all datasets except the USPS-N, where it is marginally outperformed by the probit. To obtain Figure 4 we used the noisy version of the datasets, chose one of the 10 folds used in the previous experiment, and plotted the distribution of the 1/z ∝ξ obtained after training with t = 1.9. To distinguish the points with noisy labels we plot them in cyan while the other points are plotted in red. Analogous plots for other values of t can be found in the supplementary material. Recall that ξ denotes the influence of a point. One can clearly observe that the ξ of the noisy data is much smaller than that of the clean data, which indicates that the algorithm is able to effectively identify these points and cap their influence. In particular, on the Long-Servedio dataset observe the 4 distinct spikes. From left to right, the first spike corresponds to the noisy large margin examples, the second spike represents the noisy pullers, the third spike denotes the clean pullers, while the rightmost spike corresponds to the clean large margin examples. Clearly, the noisy large margin examples and the noisy pullers are assigned a low value of ξ thus capping their influence and leading to the perfect classification of the test set. On the other hand, logistic regression is unable to discriminate between clean and noisy training samples which leads to bad performance on noisy datasets. Detailed timing experiments can be found in Table 4 in the supplementary material. In a nutshell, t-logistic regression takes longer to train than either logistic regression or the probit. The reasons are not difficult to see. First, there is no closed form expression for gt(θ | x). We therefore resort to pre-computing it at some fixed locations and using a spline method to interpolate values at other locations. Second, since the objective function is not convex several iterations of the ξ and θ steps might be needed. Surprisingly, the L-BFGS algorithm, which is not designed to optimize nonconvex functions, is able to minimize (22) directly in many cases. When it does converge, it is often faster than the convex multiplicative programming algorithm. However, on some cases (as expected) it fails to find a direction of descent and exits. A common remedy for this is the bundle L-BFGS with a trust-region approach. [21] Given that the t-logistic objective function is non-convex, one naturally worries about how different initial values affect the quality of the final solution. To answer this question, we initialized the algorithm with 50 different randomly chosen θ ∈[−0.5, 0.5]d, and report test performances of the various solutions obtained in Figure 5. Just like logistic regression which uses a convex loss and hence converges to the same solution independent of the initialization, the solution obtained 5We provide the significance test results in Table 2 of supplementary material. 7 0.0 0.2 0.4 0.6 0.8 1.0 0 60 120 180 240 300 Frequency 0.0 0.2 0.4 0.6 0.8 1.0 0 15 30 45 60 0.0 0.2 0.4 0.6 0.8 1.0 0 200 400 600 800 1000 0.0 0.2 0.4 0.6 0.8 1.0 ξ 0 150 300 450 600 Frequency 0.0 0.2 0.4 0.6 0.8 1.0 ξ 0 300 600 900 1200 0.0 0.2 0.4 0.6 0.8 1.0 ξ 0 2000 4000 6000 8000 Figure 4: The distribution of ξ obtained after training t-logistic regression with t = 1.9 on datasets with 10% label noise. Left to right, top: Long-Servedio, Mease-Wyner, Mushroom; bottom: USPSN, Adult, Web. The red (dark) bars (resp. cyan (light) bars) indicate the frequency of ξ assigned to points without (resp. with) label noise. by t-logistic regression seems fairly independent of the initial value of θ. On the other hand, the performance of the probit fluctuates widely with different initial values of θ. 0 10 20 30 logistic t = 1.3 t = 1.6 t = 1.9 probit 0 10 20 30 40 0.00 0.15 0.30 0.45 3.0 4.5 6.0 7.5 9.0 TestError(%) logistic t = 1.3 t = 1.6 t = 1.9 probit 15 18 21 24 TestError(%) 1.5 2.0 2.5 3.0 3.5 TestError(%) Figure 5: The Error rate by different initialization. Left to right, top: Long-Servedio, Mease-Wyner, Mushroom; bottom: USPS-N, Adult, Web. 7 Discussion and Outlook In this paper, we generalize logistic regression to t-logistic regression by using the t-exponential family. The new algorithm has a probabilistic interpretation and is more robust to label noise. Even though the resulting objective function is non-convex, empirically it appears to be insensitive to initialization. There are a number of avenues for future work. On Long-Servedio experiment, if the label noise is increased significantly beyond 10%, the performance of t-logistic regression may degrade (see Fig. 6 in supplementary materials). Understanding and explaining this issue theoretically and empirically remains an open problem. It will be interesting to investigate if t-logistic regression can be married with graphical models to yield t-conditional random fields. We will also focus on better numerical techniques to accelerate the θ-step, especially a faster way to compute gt. 8 References [1] Choon Hui Teo, S. V. N. Vishwanthan, Alex J. Smola, and Quoc V. Le. Bundle methods for regularized risk minimization. J. Mach. Learn. Res., 11:311–365, January 2010. [2] S. Ben-David, N. Eiron, and P.M. Long. On the difficulty of approximately maximizing agreements. J. Comput. System Sci., 66(3):496–514, 2003. [3] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, Cambridge, England, 2004. [4] Phil Long and Rocco Servedio. Random classification noise defeats all convex potential boosters. Machine Learning Journal, 78(3):287–304, 2010. [5] Yoav Freund. A more robust boosting algorithm. Technical Report Arxiv/0905.2138, Arxiv, May 2009. [6] J. Naudts. Deformed exponentials and logarithms in generalized thermostatistics. Physica A, 316:323–334, 2002. URL http://arxiv.org/pdf/cond-mat/0203489. [7] J. Naudts. Generalized thermostatistics based on deformed exponential and logarithmic functions. Physica A, 340:32–40, 2004. [8] J. Naudts. Generalized thermostatistics and mean-field theory. Physica A, 332:279–300, 2004. [9] J. Naudts. Estimators, escort proabilities, and φ-exponential families in statistical physics. Journal of Inequalities in Pure and Applied Mathematics, 5(4), 2004. [10] C. Tsallis. Possible generalization of boltzmann-gibbs statistics. J. Stat. Phys., 52, 1988. [11] Christopher Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [12] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer, New York, 2 edition, 2009. [13] Timothy D. Sears. Generalized Maximum Entropy, Convexity, and Machine Learning. PhD thesis, Australian National University, 2008. [14] Andre Sousa and Constantino Tsallis. Student’s t- and r-distributions: Unified derivation from an entropic variational principle. Physica A, 236:52–57, 1994. [15] A O’hagan. On outlier rejection phenomena in bayes inference. Royal Statistical Society, 41 (3):358–367, 1979. [16] Kenneth L. Lange, Roderick J. A. Little, and Jeremy M. G. Taylor. Robust statistical modeling using the t distribution. Journal of the American Statistical Association, 84(408):881–896, 1989. [17] J. Vanhatalo, P. Jylanki, and A. Vehtari. Gaussian process regression with student-t likelihood. In Neural Information Processing System, 2009. [18] Takahito Kuno, Yasutoshi Yajima, and Hiroshi Konno. An outer approximation method for minimizing the product of several convex functions on a convex set. Journal of Global Optimization, 3(3):325–335, September 1993. [19] David Mease and Abraham Wyner. Evidence contrary to the statistical view of boosting. J. Mach. Learn. Res., 9:131–156, February 2008. [20] R. Collobert, F.H. Sinz, J. Weston, and L. Bottou. Trading convexity for scalability. In W.W. Cohen and A. Moore, editors, Machine Learning, Proceedings of the Twenty-Third International Conference (ICML 2006), pages 201–208. ACM, 2006. [21] J. Nocedal and S. J. Wright. Numerical Optimization. Springer Series in Operations Research. Springer, 1999. [22] C.C. Chang and C.J. Lin. LIBSVM: a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/˜cjlin/libsvm. [23] Fabian Sinz. UniverSVM: Support Vector Machine with Large Scale CCCP Functionality, 2006. Software available at http://www.kyb.mpg.de/bs/people/fabee/universvm. html. 9
2010
184
3,948
Occlusion Detection and Motion Estimation with Convex Optimization Alper Ayvaci, Michalis Raptis, Stefano Soatto University of California, Los Angeles {ayvaci, mraptis, soatto}@cs.ucla.edu Abstract We tackle the problem of simultaneously detecting occlusions and estimating optical flow. We show that, under standard assumptions of Lambertian reflection and static illumination, the task can be posed as a convex minimization problem. Therefore, the solution, computed using efficient algorithms, is guaranteed to be globally optimal, for any number of independently moving objects, and any number of occlusion layers. We test the proposed algorithm on benchmark datasets, expanded to enable evaluation of occlusion detection performance. 1 Introduction Optical flow refers to the deformation of the domain of an image that results from ego- or scene motion. It is, in general, different from the motion field, that is the projection onto the image plane of the spatial velocity of the scene [28], unless three conditions are satisfied: (a) Lambertian reflection, (b) constant illumination, and (c) constant visibility properties of the scene. Most surfaces with benign reflectance properties (diffuse/specular) can be approximated as Lambertian almost everywhere under sparse illuminants (e.g., the sun). In any case, widespread violation of Lambertian reflection does not enable correspondence [23], so we will embrace (a) as customary. Similarly, (b) constant illumination is a reasonable assumption for ego-motion (the scene is not moving relative to the light source), and even for objects moving (slowly) relative to the light source.1 Assumption (c) is the most critical, as it is needed for the motion field to be defined.2 It is often taken for granted in the optical flow literature, because in the limit where two images are sampled infinitesimally close in time, there are no occluded regions, and one can focus solely on motion discontinuities. Thus, most variational motion estimation approaches provide an estimate of a dense flow field at each location on the image domain, including occluded regions. Alas, in occluded regions, the problem is not that optical flow is discontinuous, or forward-backward inconsistent; it is simply not defined. Motion in occluded regions can be hallucinated; However, whatever motion is assigned to an occluded region cannot be validated from the data. In defense of these methods, it can be argued that, even without taking the limit, for small parallax (slow-enough motion, or far-enough objects, or fast-enough temporal sampling) occluded areas are small. However, small does not mean unimportant, as occlusions are critical to perception [8] and a key for developing representations for recognition [22]. For this reason, we focus on issues of visibility in optical flow computation. We show that forgoing assumption (c) and explicitly representing occlusions is not only conceptually correct, but also algorithmically advantageous, for the resulting optimization problem can be shown to become convex once occlusions are explicitly modeled. Therefore, one can guarantee convergence to a globally 1Assumption (b) is also made for convenience, as modeling illumination changes would require modeling reflectance, which significantly complicates the picture. 2If the domain of an image portrays a portion of the scene that is not visible in another image, the two cannot be put into correspondence. 1 optimal solution regardless of initial conditions (sect. 2). We adapt Nesterov’s efficient optimization scheme to our problem (sect. 3), and test the resulting algorithm on benchmark datasets (sect. 4), including evaluation of occlusion detection (sect. 1.2). 1.1 Related Work The most common approach to handling occlusions in the optical flow literature is to define them as regions where forward and backwards motion estimates are inconsistent [19, 1]. Most approaches return estimates of motion in the occluded regions, where they cannot be invalidated: As we have already pointed out, in an occluded region one cannot determine a motion field that maps one image onto another, because the scene is not visible in one of the two. Some approaches [11, 4], while also exploiting motion symmetry, discount occlusions by weighting the data fidelity with a monotonically decreasing function. The resulting problem is non-convex, and therefore the proposed alternating minimization techniques can be prone to local minima. An alternate approach [15, 14, 25] is to formulate joint motion estimation and occlusion detection in a discrete setting, where it is NPhard. Various approximate solutions using combinatorial optimization require fine quantization and, therefore, suffer from a large number of labels which results in loose approximation bounds. Another class of methods uses the motion estimation residual to classify a location as occluded or visible wither with a direct threshold on the residual [30] or with a more elaborate probabilistic model [24]. In each case, the resulting optimization is non-convex. 1.2 Evaluation Optical flow estimation is a mature area of computer vision, and benchmark datasets have been developed, e.g., [2]. Unfortunately, no existing benchmark provides ground truth for occluded regions, nor a scoring mechanism to evaluate occlusion detection performance. Motion estimates are scored even in the occluded regions, where the data does not support them. Since our primary goal is to detect occlusions, we have produced a new benchmark by taking a subset of the training data in the Middlebury dataset, and hand-labeled occluded regions. We then use the same evaluation method of the Middlebury for the (ground truth) regions that are co-visible in at least two images. This provides a motion estimation score. Then, we provide a separate score for occlusion detection, in terms of precision-recall curves. 2 Joint Occlusion Detection and Optical Flow Estimation In this section, we show how the assumptions (a)-(b) can be used to formulate occlusion detection and optical flow estimation as a joint optimization problem. Let I : D ⊂R2 ×R+ →R+; (x, t) 7→ I(x, t) be a grayscale time-varying image defined on a domain D. Under the assumptions (a)-(b), the relation between two consecutive frames in a video {I(x, t)}T t=0 is given by I(x, t) = I(w(x, t), t + dt) + n(x, t), x ∈D\Ω(t; dt) ρ(x, t), x ∈Ω(t; dt) (1) where w : D × R+ →R2; x 7→w(x, t) .= x + v(x, t) is the domain deformation mapping I(x, t) onto I(x, t + dt) everywhere except at occluded regions. Usually optical flow denotes the incremental displacement v(x, t) .= w(x, t) −x. The occluded region Ωcan change over time depending on the temporal sampling interval dt and is not necessarily simply-connected; so even if we call Ωthe occluded region (singular), it is understood that it can be made of several disconnected portions. Inside Ω, the image can take any value ρ : Ω× R+ →R+ that is in general unrelated to I(w(x), t + dt)|x∈Ω. In the limit dt →0, Ω(t; dt) = ∅. Because of (almost-everywhere) continuity of the scene and its motion (i), and because the additive term n(x, t) compounds the effects of a large number of independent phenomena3 and therefore we can invoke the Law of Large Numbers (ii), in general we have that (i) lim dt→0 Ω(t; dt) = ∅, and (ii) n IID ∼N(0, λ) (2) 3n(x, t) collects all unmodeled phenomena including deviations from Lambertian reflection, illumination changes, quantization error, sensor noise, and later also linearization error. It does not capture occlusions, since those are explicitly modeled. 2 i.e., the additive uncertainty is normally distributed in space and time with an isotropic and small variance λ > 0. We define the residual e : D →R on the entire image domain x ∈D, via e(x, t; dt) .= I(x, t) −I(w(x, t), t + dt) = n(x, t), x ∈D\Ω ρ(x, t) −I(w(x, t), t + dt), x ∈Ω (3) which we can write as the sum of two terms, e1 : D →R and e2 : D →R, also defined on the entire domain D in such a way that e1(x, t; dt) .= ρ(x, t) −I(w(x, t), t + dt), x ∈Ω e2(x, t; dt) .= n(x, t), x ∈D\Ω. (4) Note that e2 is undefined in Ω, and e1 is undefined in D\Ω, in the sense that they can take any value there, including zero, which we will assume henceforth. We can then write, for any x ∈D, I(x, t) = I(w(x, t), t + dt) + e1(x, t; dt) + e2(x, t; dt) (5) and note that, because of (i) e1 is large but sparse,4 while because of (ii) e2 is small but dense4. We will use this as an inference criterion for w, seeking to optimize a data fidelity term that minimizes the number of nonzero elements of e1 (a proxy of the area of Ω), and the negative log-likelihood of n. ψdata(w, e1) .= ∥e1∥L0(D) + 1 λ∥e2∥L2(D) subject to (5) (6) = 1 λ∥I(x, t) −I(w(x, t), t + dt) −e1∥L2(D) + ∥e1∥L0(D) where ∥f∥L0(D) .= |{x ∈D|f(x) ̸= 0}| and ∥f∥L2(D) .= R D |f(x)|2dx. Unfortunately, we do not know anything about e1 other than the fact that it is sparse, and that what we are looking for is χ(Ω) ∝e1, where χ : D →R+ is the characteristic function that is non-zero when x ∈Ω, i.e., where the occlusion residual is non-zero. So, the data fidelity term depends on w but also on the characteristic function of the occlusion domain Ω.5 For a sufficiently small dt, we can approximate, for any x ∈D\Ω, I(x, t + dt) = I(x, t) + ∇I(x, t)v(x, t) + n(x, t) (9) where the linearization error has been incorporated into the uncertainty term n(x, t). Therefore, following the same previous steps, we have ψdata(v, e1) = ∥∇Iv + It −e1∥L2(D) + λ∥e1∥L0(D). (10) Since we typically do not know the variance λ of the process n, we will treat it as a tuning parameter, and because ψdata or λψdata yield the same minimizer, we have attributed the multiplier λ to the second term. In addition to the data term, because the unknown v is infinite-dimensional and the problem is ill-posed, we need to impose regularization, for instance by requiring that the total variation (TV) be small ψreg(v) = µ∥v1∥T V + µ∥v2∥T V (11) where v1 and v2 are the first and second components of the optical flow v, µ is a multiplier factor to weight the strength of the regularizer and the weighted isotropic TV norm is defined by ∥f∥T V (D) = Z D q (g1(x)∇xf(x))2 + (g2(x)∇yf(x))2dx, 4Sparse stands for almost everywhere zero on D. Similarly, dense stands for almost everywhere non-zero. 5In a digital image, both domains D and Ωare discretized into a lattice, and dt is fixed. Therefore, spatial and temporal derivative operators are approximated, typically, by first-order differences. We use the formal notation ∇I(x, t) .=   I  x +  1 0  , t  −I(x, t) I  x +  0 1  , t  −I(x, t)   T (7) It(x, t) .= I(x, t + dt) −I(x, t). (8) 3 where g1(x) ≈exp(−β|∇xI(x)|) and g2(x) ≈exp(−β|∇yI(x)|); β is a normalizing factor. TV is desirable in the context of occlusion detection because it does not penalize motion discontinuities significantly. The overall problem can then be written as the minimization of the cost functional ψ = ψdata + ψreg, which is ˆv1, ˆv2, ˆe1 = arg min v1,v2,e1 ∥∇Iv + It −e1∥2 L2(D) + λ∥e1∥L0(D) + µ∥v1∥T V (D) + µ∥v2∥T V (D) | {z } ψ(v1,v2,e1) (12) In a digital image, the domain D is quantized into an M × N lattice Λ, so we can write (12) in matrix form as: ˆv1, ˆv2, ˆe1 = arg min v1,v2,e1 1 2∥A[v1, v2, e1]T + b∥2 ℓ2 + λ∥e1∥ℓ0 + µ∥v1∥T V + µ∥v2∥T V (13) where e1 ∈RMN is the vector obtained from stacking the values of e1(x, t) on the lattice Λ on top of one another (column-wise), and similarly with the vector field components {v1(x, t)}x∈Λ and {v2(x, t)}x∈Λ stacked into MN-dimensional vectors v1, v2 ∈RMN. The spatial derivative matrix A is given by A = [diag(∇xI) diag(∇yI) −I], where I is the MN × MN identity matrix, and the temporal derivative values {It(x, t)}x∈Λ are stacked into b. For finitedimensional vectors u ∈RMN, ∥u∥ℓ2 = p ⟨u, u⟩, ∥u∥ℓ0 = |{ui|ui ̸= 0}| and ∥u∥T V = P p ((g1)i(ui+1 −ui))2 + ((g2)i(ui+M −ui))2 where g1 and g2 are the stacked versions of {g1(x)}x∈Λ and {g2(x)}x∈Λ. In practice, (13) is NP-hard. Therefore, as customary, we relax it by minimizing the weighted-ℓ1 norm of e1, instead of ℓ0, such that ˆv1, ˆv2, ˆe1 = arg min v1,v2,e1 1 2∥A[v1, v2, e1]T + b∥2 ℓ2 + λ∥We1∥ℓ1 + µ∥v1∥T V + µ∥v2∥T V (14) where W is a diagonal weight matrix and ∥u∥ℓ1 = P |ui|. When W is the identity, (14) becomes a standard convex relaxation of (13) and its globally optimal solution can be reached efficiently [27]. However, the ℓ0 norm can also be approximated by reweighting ℓ1, as proposed by Candes et al. [5], by setting the diagonal elements of W to wi ≈1/(|(e1)i| + ϵ), ϵ small, after each iteration of (14). The data term of the standard (unweighted) relaxation of (13) can be interpreted as a Huber norm [10]. We favor the more general (14) as the resulting estimate of e1 is more stable and sparse. The model (9) is valid to the extent in which dt is sufficiently small relative to v (or v sufficiently slow relative to dt), so the linearization error does not alter the statistics of the residual n. When this is not the case, remedies must be enacted to restore proper sampling conditions [22] and therefore differentiate contributions to the residual coming from sampling artifacts (aliasing), rather than occlusions. This can be done by solving (14) in scale-space, as customary, with coarser scales used to initialize ˆv1, ˆv2 so the increment is properly sampled, and the occlusion term e1 added at the finest scale. The residual term e1 in (5) have been characterized in some literature as modeling illumination changes [21, 16, 26, 13]. Note that, even if the model (5) appears similar, the priors on e1 are rather different: Sparsity in our case, smoothness in theirs. While sparsity is clearly motivated by (i), for illumination changes to be properly modeled, a reflectance function is necessary, which is absent in all models of the form (5) (see [23].) 3 Optimization with Nesterov’s Algorithm In this section, we describe an efficient algorithm to solve (14) based on Nesterov’s first order scheme [17] which provides O(1/k2) convergence in k iterations, whereas for standard gradient descent, it is O(1/k), a considerable advantage for a large scale problem such as (14). To simplify the notation we let (e1)i .= wi(e1)i, so that A .= [diag(∇xI) diag(∇yI) −W −1]. We then have 4 Initialize v0 1, v0 2, e0 1. For k ≥0 1. Compute ∇ψ(vk 1, vk 2, ek 1) 2. Compute αk = 1/2(k + 1), τk = 2/(k + 3) 3. Compute yk = [vk 1, vk 2, ek 1]T −(1/L)∇ψ(vk 1, vk 2, ek 1), 4. Compute zk = [v0 1, v0 2, e0 1]T −(1/L) Pk i=0 αi∇ψ(vi 1, vi 2, ei 1), 5. Update [vk 1, vk 2, ek 1]T = τkzk + (1 −τk)yk. Stop when the solution converges. In order to implement this scheme, we need to address the nonsmooth nature of ℓ1 in the computation of ∇ψ [18], a common problem in sparse optimization [3]. We write ψ(v1, v2, e1) as ψ(v1, v2, e1) = ψ1(v1, v2, e1) + λψ2(e1) + µψ3(v1) + µψ4(v2), and compute the gradient of each term separately. ∇v1,v2,e1ψ1(v1, v2, e1) is straightforward: ∇v1,v2,e1ψ1(v1, v2, e1) = AT A[v1, v2, e1]T + AT b. The other three terms require smoothing. ψ2(e1) = ∥e1∥ℓ1 can be rewritten as ψ2(e1) = max∥u∥∞≤1 ⟨u, e1⟩in terms of its conjugate. [18] proposes a smooth approximation ψσ 2 (e1) = max ∥u∥∞≤1 ⟨u, e1⟩−1 2σ∥u∥2 ℓ2, (15) and shows that (15) is differentiable and ∇e1ψσ 2 (e1) = uσ, where uσ is the solution of (15): uσ i = σ−1(e1)i, |(e1)i| < σ, sgn((e1)i), otherwise. (16) Following [3], ∇v1ψ3 is given by ∇v1ψσ 3 (v1) = GT uσwhere G = [G1, G2]T , G1 and G2 are weighted horizontal and vertical differentiation operators , and uσ has the form [u1, u2] where u1,2 i = σ−1(G1,2v1)i, ∥[(G1v1)i (G2v1)i]T ∥ℓ2 < σ, ∥[(G1v1)i (G2v1)i]T ∥−1 ℓ2 (G1,2v1)i, otherwise. (17) ∇v2ψ4 can be computed in the same way. Once we have computed each term, ∇ψ(v1, v2, e1) is ∇ψ(v1, v2, e1) = ∇ψ1 + [λ∇e1ψ2, µ∇v1ψ3, µ∇v2ψ4]T . (18) We also need the Lipschitz constant L to compute the auxiliary variables yk and zk to minimize ψ. Since ∥GT G∥2 is bounded above [7] by 8, given the coefficients λ and µ, L is given by L = max(λ, 8µ)/σ + ∥AT A∥2. A crucial element of the scheme is the selection of σ. It trades off accuracy and speed of convergence. A large σ yields a smooth solution, which is undesirable when minimizing the ℓ1 norm. A small σ causes slow convergence. We have chosen σ empirically, although the continuation algorithm proposed in [3] could be employed to adapt σ during convergence. 4 Experiments To evaluate occlusion detection (Sect. 1.2), we start from [2] and generate occlusion maps as follows: for each training sequence, the residual computed from the given ground truth motion is used as a discriminant to determine ground truth occlusions, fixing obvious errors in the occlusion maps by hand. We therefore restrict the evaluation of motion to the co-visible regions, and evaluate occlusion detection as a standard binary classification task. We compare our algorithm to [29] and [14], the former is an example of robust motion estimation and the latter is a representative of the approaches described in Sect. 1.1. In our implementation6, we first solve (14) with standard relaxation (W is the identity) and then with reweighted-ℓ1. To handle large motion, we use a pyramid with scale factor 0.5 and up to 4 levels; λ and µ are fixed at 0.002 and 0.001 (Flower Garden) and 0.0006 and 0.0003 (Middlebury) respectively. To make comparison with [29] fair, we modify the code provided online7 to include 6The source code is available at http://vision.ucla.edu/~ayvaci/occlusion-detection/ 7http://gpu4vision.icg.tugraz.at 5 anisotropic regularization (Fig. 1). Note that no occlusion is present in the residual of the motion field computed by TV-L1, and subsequently the motion estimates are less precise around occluding boundaries (top-left corner of the Flower Garden, plane in the left in Venus). Figure 1: Comparison with TV-L1 [29] on “Venus” from [2] and “Flower Garden.” The first column shows the motion estimates by TV-L1, color-coded as in [29], the second its residual I(x, t) − I(w(x), t+dt); the third shows our motion estimates, and the fourth our residual e1 defined in (14). Other frames of the Flower Garden sequence are shown in Fig. 2, where we have regularized the occluded region by minimizing a unilateral energy on e1 with graph-cuts. We have also compared Figure 2: Motion estimates for more frames of the Flower Garden sequence (left), residual e (middle), and occluded region (right). motion estimates obtained with our method and [29] in the co-visible regions for the Middlebury dataset (Table 1). Since occlusions can only be determined at the finest scale absent proper sampling conditions, in this experiment we minimize the same functional of [29] at coarse scales, and switch to (14) at the finest scale. To evaluate occlusion detection performance, we again use the Middlebury, and compare e1 to ground truth occlusions using precision/recall curves (Fig. 3) and average precision values (Table 2). We also show the improvement in detection performance when we use reweighted-ℓ1, in Table 2. We have compared our occlusion detection results to [14], using the code provided online by the authors (Table 3). Comparing motion estimates gives an unfair 6 Venus RubberWhale Hydrangea Grove2 Grove3 Urban2 Urban3 AAE (ours) 4.37 5.42 2.35 2.32 5.72 3.60 6.41 AAE (L1TV) 5.28 4.49 2.44 3.45 7.66 3.57 7.12 AEPE (ours) 0.30 0.18 0.19 0.16 0.59 0.39 0.84 AEPE (L1TV) 0.33 0.13 0.20 0.24 0.74 0.46 0.89 Table 1: Quantitative comparison of our algorithm with TV-L1 [29]. Average Angular Error (AAE) and Average End Point Error (AEPE) of motion estimates in co-visible regions. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision Venus 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision RubberWhale 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision Hydrangea 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision Grove2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision Grove3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 recall precision Urban2 Figure 3: Left to right: Representative samples of motion estimates from the Middlebury dataset, labeled ground-truth occlusions, error term estimate e1, and precision-recall curves for our occlusion detection. advantage to our algorithm because their approach is based on quantized disparity values, yielding lower accuracy. 7 Venus Rubber Whale Hydrangea Grove2 Grove3 Urban2 Urban3 ℓ1 0.67 0.48 0.55 0.70 0.60 0.72 0.80 reweighted-ℓ1 0.69 0.49 0.57 0.70 0.61 0.73 0.80 Table 2: Average precision of our approach on Middlebury data with and without re-weighting. It takes 186 seconds for a Matlab/C++ implementation of Nesterov’s algorithm to converge to a solution on a 288 × 352 frame from Flower Garden sequence. We have also compared Nesterov’s algorithm to split-Bregman’s method [9] for minimization of (14) in terms of convergence speed and reported the results in [20]. Venus RubberWhale Hydrangea Grove2 Grove3 Urban2 Urban3 Precision [14] 0.61 0.46 0.68 0.72 0.79 0.26 0.56 Recall [14] 0.66 0.20 0.20 0.55 0.45 0.50 0.51 Precision(ours) 0.69 0.91 0.96 0.96 0.86 0.95 0.94 Table 3: Comparison with [14] on Middlebury. Since Kolmogorov et al. provide a binary output, we display our precision at their same recall value. 5 Discussion We have presented an algorithm to detect occlusions and establish correspondence between two images. It leverages on a formulation that, starting from standard assumptions (Lambertian reflection, constant diffuse illumination), arrives at a convex optimization problem. Our approach does not assume a rigid scene, nor a single moving object. It also does not assume that the occluded region is simply connected: Occlusions in natural scenes can be very complex (see Fig. 3) and should therefore, in general, not be spatially regularized. The fact that occlusion detection reduces to a two-phase segmentation of the domain into either occluded (Ω) or visible (D\Ω) should not confuse the reader familiar with the image segmentation literature whereby two-phase segmentation of one object (foreground) from the background can be posed as a convex optimization problem [6], but breaks down in the presence of multiple objects, or “phases.” Note that in [6] the problem can be made convex only in e1, but not jointly in e1 and v. We focus on inter-frame occlusion detection; temporal consistency of occlusion “layers” was addressed in [12]. The limitations of our approach stand mostly in its dependency from the regularization coefficients λ and µ. In the absence of some estimate of the variance coefficient λ, one is left with tuning it by trial-and-error. Similarly, µ is a parameter that, like in any classification problem, trades off missed detections and false alarms, and therefore no single value is “optimal” in any meaningful sense. These limitations are shared by most variational optical flow estimation algorithms. Acknowledgement: This work was supported by AFOSR FA9550-09-1-0427, ARO 56765-CI, and ONR N00014-08-1-0414. References [1] L. Alvarez, R. Deriche, T. Papadopoulo, and J. S´anchez. Symmetrical dense optical flow estimation with occlusions detection. International Journal of Computer Vision, 75(3):371–385, 2007. [2] S. Baker, D. Scharstein, J. Lewis, S. Roth, M. Black, and R. Szeliski. A database and evaluation methodology for optical flow. In Proceedings of the International Conference on Computer Vision, volume 5, 2007. [3] S. Becker, J. Bobin, and E. Candes. Nesta: A fast and accurate first-order method for sparse recovery. Arxiv preprint arXiv, 904, 2009. [4] R. Ben-Ari and N. Sochen. Variational stereo vision with sharp discontinuities and occlusion handling. ICCV. IEEE Computer Society, pages 1–7, 2007. [5] E. Candes, M. Wakin, and S. Boyd. Enhancing sparsity by reweighted 1 minimization. Journal of Fourier Analysis and Applications, 14(5):877–905, 2008. [6] T. Chan, S. Esedoglu, and M. Nikolova. Algorithms for finding global minimizers of denoising and segmentation models. SIAM J. Appl. Math, 66(1632-1648):1, 2006. 8 [7] J. Dahl, P. Hansen, S. Jensen, and T. Jensen. Algorithms and software for total variation image reconstruction via first-order methods. Numerical Algorithms, pages 67–92, 2009. [8] J. J. Gibson. The ecological approach to visual perception. LEA, 1984. [9] T. Goldstein and S. Osher. The split Bregman method for L1 regularized problems. SIAM Journal on Imaging Sciences, 2(2):323–343, 2009. [10] P. Huber and E. Ronchetti. Robust statistics. John Wiley & Sons Inc, 2009. [11] S. Ince and J. Konrad. Occlusion-aware optical flow estimation. IEEE Transactions on Image Processing, 17(8):1443–1451, 2008. [12] J. Jackson, A. J. Yezzi, and S. Soatto. Dynamic shape and appearance modeling via moving and deforming layers. International Journal of Computer Vision, 2008. [13] Y. Kim, A. Mart´ınez, and A. Kak. Robust motion estimation under varying illumination. Image and Vision Computing, 23(4):365–375, 2005. [14] V. Kolmogorov and R. Zabih. Computing visual correspondence with occlusions via graph cuts. In International Conference on Computer Vision, volume 2, pages 508–515. Citeseer, 2001. [15] K. Lim, A. Das, and M. Chong. Estimation of occlusion and dense motion fields in a bidirectional Bayesian framework. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 712–718, 2002. [16] S. Negahdaripour. Revised definition of optical flow: Integration of radiometric and geometric cues for dynamic scene analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 961– 979, 1998. [17] Y. Nesterov. A method for unconstrained convex minimization problem with the rate of convergence O (1/k2). In Doklady AN SSSR, volume 269, pages 543–547, 1983. [18] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103(1):127– 152, 2005. [19] M. Proesmans, L. Van Gool, and A. Oosterlinck. Determination of optical flow and its discontinuities using a non-linear diffusion. In European Conference on Computer Vision, 1994. [20] M. Raptis, A. Ayvaci, and S. Soatto. Occlusion Detection and Motion Estimation via Convex Optimization. Technical report, UCLA CAM 10-36, June 2010. [21] D. Shulman and J. Herve. Regularization of discontinuous flow fields. In Proc. of Workshop on Visual Motion, pages 81–86, 1989. [22] S. Soatto. Steps Towards a Theory of Visual Information. Technical report, UCLA-CSD100028, September 2010. [23] S. Soatto, A. J. Yezzi, and H. Jin. Tales of shape and radiance in multiview stereo. In Intl. Conf. on Comp. Vision, pages 974–981, October 2003. [24] C. Strecha, R. Fransens, and L. Van Gool. A probabilistic approach to large displacement optical flow and occlusion detection. In ECCV Workshop SMVP, pages 71–82. Springer, 2004. [25] J. Sun, Y. Li, S. Kang, and H. Shum. Symmetric stereo matching for occlusion handling. In IEEE Conference on Computer Vision and Pattern Recognition, volume 2, page 399, 2005. [26] C. Teng, S. Lai, Y. Chen, and W. Hsu. Accurate optical flow computation under non-uniform brightness variations. Computer vision and image understanding, 97(3):315–346, 2005. [27] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), 58(1):267–288, 1996. [28] A. Verri and T. Poggio. Motion field and optical flow: Qualitative properties. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(5):490–498, 1989. [29] A. Wedel, T. Pock, C. Zach, H. Bischof, and D. Cremers. An improved algorithm for TV-L1 optical flow. In Statistical and Geometrical Approaches to Visual Motion Analysis: International Dagstuhl Seminar. Springer, 2009. [30] J. Xiao, H. Cheng, H. Sawhney, C. Rao, M. Isnardi, et al. Bilateral filtering-based optical flow estimation with occlusion detection. Lecture Notes in Computer Science, 3951:211, 2006. 9
2010
185
3,949
Exploiting weakly-labeled Web images to improve object classification: a domain adaptation approach Alessandro Bergamo Lorenzo Torresani Computer Science Department Dartmouth College Hanover, NH 03755, U.S.A. {aleb, lorenzo}@cs.dartmouth.edu Abstract Most current image categorization methods require large collections of manually annotated training examples to learn accurate visual recognition models. The time-consuming human labeling effort effectively limits these approaches to recognition problems involving a small number of different object classes. In order to address this shortcoming, in recent years several authors have proposed to learn object classifiers from weakly-labeled Internet images, such as photos retrieved by keyword-based image search engines. While this strategy eliminates the need for human supervision, the recognition accuracies of these methods are considerably lower than those obtained with fully-supervised approaches, because of the noisy nature of the labels associated to Web data. In this paper we investigate and compare methods that learn image classifiers by combining very few manually annotated examples (e.g., 1-10 images per class) and a large number of weakly-labeled Web photos retrieved using keyword-based image search. We cast this as a domain adaptation problem: given a few stronglylabeled examples in a target domain (the manually annotated examples) and many source domain examples (the weakly-labeled Web photos), learn classifiers yielding small generalization error on the target domain. Our experiments demonstrate that, for the same number of strongly-labeled examples, our domain adaptation approach produces significant recognition rate improvements over the best published results (e.g., 65% better when using 5 labeled training examples per class) and that our classifiers are one order of magnitude faster to learn and to evaluate than the best competing method, despite our use of large weakly-labeled data sets. 1 Introduction The last few years have seen a proliferation of human efforts to collect labeled image data sets for the purpose of training and evaluating visual recognition systems. Label information in these collections comes in different forms, ranging from simple object category labels to detailed semantic pixel-level segmentations. Examples include Caltech256 [14], and the Pascal VOC2010 data set [7]. In order to increase the variety and the number of labeled object classes, a few authors have designed online games and appealing software tools encouraging common users to participate in these image annotation efforts [23, 30]. Despite the tremendous research contribution brought by such attempts, even the largest labeled image collections today [6] are limited to a number of classes that is at least one order of magnitude smaller than the number of object categories that humans can recognize [3]. In order to overcome this limitation and in an attempt to build classifiers for arbitrary object classes, several authors have proposed systems that learn from weakly-labeled Internet photos [10, 9, 29, 20]. Most of these approaches rely on keyword-based image search engines to retrieve image examples of specified object classes. Unfortunately, while image search engines provide training examples 1 without the need of any human intervention, it is sufficient to type a few example keywords in Google or Bing image search to verify that often the majority of the retrieved images are only loosely related with the query concept. Most prior work has attempted to address this problem by means of outlier rejection mechanisms discarding irrelevant images from the retrieved results. However, despite the dynamic research activity in this area, weakly-supervised approaches today still yield significantly lower recognition accuracy than fully supervised object classifiers trained on clean data (see, e.g., results reported in [9, 29]). In this paper we argue that the poor performance of models learned from weakly-labeled Internet data is not only due to undetected outliers contaminating the training data, but it is also a consequence of the statistical differences often present between Web images and the test data. Figure 1 shows sample images for some of the Caltech256 object categories versus the top six images retrieved by Bing using the class names as keywords1. Although a couple of outliers are indeed present in the Bing sets, the striking difference between the two collections is that even the relevant results in the Bing groups appear to be visually less homogeneous. For example, in the case of the classes shown in figure 1(a,b), while the Caltech256 groups contain only real photographs, the Bing counterparts include several cartoon drawings. In figure 1(c,d), each Caltech256 image contains only the object of interest while the pictures retrieved by Bing include extraneous items, such as people or faces, which act as distractors in the learning (this is particularly true when evaluating the classifiers on Caltech256, given that ”faces” and ”people” are separate categories in the data set). Furthermore, even when ”irrelevant” results do occur in the retrieved images, they are rarely outliers detectable via simple coherence tests as there is often some consistency even among such photos. For example, polysemy — the capacity of one word to have multiple meanings — causes multiple visual clusters (as opposed to individual outliers) to appear in the Bing sets of figure 1(e,f) (the two clusters in (e) are due to the fact that the word ”hawksbill” denotes both a crag in Arkansas as well as a type of sea turtle, while in the case of (f) the keyword ”tricycle” retrieves images of both bicycles as well as motorcycles with three wheels; note, again, that Caltech256 contains for both classes only images corresponding to one of the words meanings and that ”motorcycle” appears as a separate additional category). Finally, in some situations, different shooting distances or angles may produce completely unrelated views of the same object or scene: for example, the Bing set in 1(g) includes both aerial and ground views of Mars, which have very little in common visually. Note that for most of the classes in figure 1 it is not clear a priori which are the “relevant” Internet images to be used for training until we compare them to the photos in the corresponding Caltech256 categories. In this paper we show that a few strongly-labeled examples from the test domain (e.g. a few Caltech256 images for the class of interest) are indeed sufficient to disambiguate this relevancy problem and to model the distribution differences between the weakly-labeled Internet data and the test application data, so as to significantly improve recognition performance on the test set. The situation where the test data is drawn from a distribution that is related, but not identical, to the distribution of the training data has been widely studied in the field of machine learning and it is traditionally addressed using so-called ”domain adaptation” methods. These techniques exploit ample availability of training data from a source domain to learn a model that works effectively in a related target domain for which only few training examples are available. More formally, let pt(X, Y ) and ps(X, Y ) be the distributions generating the target and the source data, respectively. Here, X denotes the input (a random feature vector) and Y the class (a discrete random variable). The domain adaptation problem arises whenever pt(X, Y ) differs from ps(X, Y ). In covariance shift, it is assumed that only the distributions of the input features differ in the two domain, i.e., pt(Y |X) = ps(Y |X) but pt(X) ̸= ps(X). Note that, without adaptation, this may lead to poor classification in the target domain since a model learned from a large source training set will be trained to perform well in the dense source regions of X which, under the covariance shift assumption, will generally be different from the dense regions of the target domain. Typically, covariance shift algorithms (e.g., [16]) address this problem by modeling the ratio pt(X)/ps(X). Unfortunately, the much more common and challenging case is when the conditional distributions are different, i.e., pt(Y |X) ̸= ps(Y |X). When such differences are relatively small, however, knowledge gained by analyzing data in the source domain may still yield valuable information to perform prediction for test target data. This is precisely the scenario considered in this paper. 1Note that image search results may have changed since these examples were captured. 2 Caltech256 Bing (a) (b) (c) (d) (e) (f) (g) Figure 1: Images in Caltech256 for several categories and top results retrieved by Bing image search for the corresponding keywords. The Bing sets are both semantically and visually less coherent: presence of multiple objects in the same image, polysemy, caricaturization, as well as variations in viewpoints are some of the visual effects present in Internet images which cause significant data distribution differences between the Bing sets and the corresponding Caltech256 groups. 3 2 Relationship to other methods Most of the prior work on learning visual models from image search has focused on the task of “cleaning up” Internet photos. For example, in the pioneering work of Fergus et al. [10], visual filters learned from image search were used to rerank photos on the basis of visual consistency. Subsequent approaches [2, 25, 20] have employed similar outlier rejection schemes to automatically construct clean(er) data sets of images for training and testing object classifiers. Even techniques aimed at learning explicit object classifiers from image search [9, 29] have identified outlier removal as the key-ingredient to improve recognition. In our paper we focus on another fundamental, yet largely ignored, aspect of the problem: we argue that the current poor performance of classification models learned from the Web is due to the distribution differences between Internet photos and image test examples. To the best of our knowledge we propose the first systematic empirical analysis of domain adaptation methods to address sample distribution differences in object categorization due to the use of weakly-labeled Web images as training data. We note that in work concurrent to our own, Saenko et al. [24] have also analyzed cross-domain adaptation of object classifiers. However, their work focuses on the statistical differences caused by varying lighting conditions (uncontrolled versus studio setups) and by images taken with different camera types (a digital SLR versus a webcam). Transfer learning, also known as multi-task learning, is related to domain adaptation. In computer vision, transfer learning has been applied to a wide range of problems including object categorization (see, e.g., [21, 8, 22]). However, transfer learning addresses a different problem. In transfer learning there is a single distribution of the inputs p(X) but there are multiple output variables Y1, . . . , YT , associated to T distinct tasks (e.g., learning classifiers for different object classes). Typically, it is assumed that some relations exist among the tasks; for example, some common structure when learning classifiers p(Y1|X, θ1), . . . , p(YT |X, θT ) can be enforced by assuming that the parameters θ1, . . . , θT are generated from a shared prior p(θ). The fundamental difference is that in domain adaptation we have a single task but different domains, i.e., different sources of data. As our approach relies on a mix of labeled and weakly-labeled images, it is loosely related to semisupervised methods for object classification [15, 19]. Within this genre, the algorithm described in [11] is perhaps the closest to our work as it also relies on weakly-labeled Internet images. However, unlike our approach, these semi-supervised methods are designed to work in cases where the test examples and the training data are generated from the same distribution. 3 Approach overview 3.1 Experimental setup Our objective is to evaluate domain adaptations methods on the task of object classification, using photos from a human-labeled data set as target domain examples and images retrieved by a keywordbased image search engine as examples of the source domain. We used Caltech256 as the data set for the target domain since it is an established benchmark for object categorization and it contains a large number of classes (256) thus allowing us to average out performance variations due to especially easy or difficult categories. From each class, we randomly sampled nT images as target training examples, and other mT images as target test examples. We formed the weakly-labeled source data by collecting the top nS images retrieved by Bing image search for each of the Caltech256 category text labels. Although it may have been possible to improve the relevancy of the image results for some of the classes by manually selecting less ambiguous search keywords, we chose to issue queries on the unchanged Caltech256 text class labels to avoid subjective alteration of the results. However, in order to ensure valid testing, we removed near duplicates of Caltech256 images from the source training set by a human-supervised process. 3.2 Feature representation and classification model In order to study the effect of large weakly-labeled training sets on object recognition performance, we need a baseline system that achieves good performance on object categorization and that supports efficient learning and test evaluation. The current best published results on Caltech256 were obtained by a kernel combination classifier using 39 different feature kernels, one for each feature type [13]. However, since both training as well testing are computationally very expensive with this classifier, this model is unsuitable for our needs. 4 Instead, in this work we use as image representation the classeme features recently proposed by Torresani et al. [28]. This descriptor is particularly suitable for our task as it has been shown to yield near state-of-the-art results with simple linear support vector machines, which can be learned very efficiently even for large training sets. The descriptor measures the closeness of an image to a basis set of classes and can be used as an intermediate representation to learn classifiers for new classes. The basis classifiers of the classeme descriptor are learned from weakly-labeled data collected for a large and semantically broad set of attributes (the final descriptor contains 2659 attributes). To eliminate the risk of the test classes being already explicitely represented in the feature vector, in this work we removed from the descriptor 34 attributes, corresponding to categories related to Caltech256 classes. We use a binarized version of this descriptor obtained by thresholding to 0 the output of the attribute classifiers: this yields for each image a 2625-dimensional binary vector describing the predicted presence/absence of visual attributes in the photo. This binarization has been shown to yield very little degradation in recognition performance (see [28] for further details). We denote with f(x) ∈{0, 1}F the binary attribute vector extracted from image x with F = 2625. Object class recognition is traditionally formulated as a multiclass classification problem: given a test image x, predict the class label y ∈{1, . . ., K} of the object present in it, where K is the number of possible classes (in the case of Caltech256, K = 256). In this paper we implement multi-class classification using K binary classifiers trained using the one-versus-the-rest scheme and perform prediction according to the winner-take-all strategy. The k-th binary classifier (distinguishing between class k and the other classes) is trained on a target training set Dt k and a collection Ds k of weakly-labeled source training examples. Dt k is formed by aggregating the Caltech256 training images of all classes, using the data from the k-th class as positive examples and the data from the remaining classes as negative examples, i.e. Dt k = {(f t i, yt i,k)}Nt i=1 where f t i = f(xt i) denotes the feature vector of the i-th image, Nt = (K · nt) is the total number of images in the stronglylabeled data set, and yt i,k ∈{−1, 1} is 1 iff example i belongs to class k. The source training set Ds k = {f s i,k}ns i=1 is the collection of ns images retrieved by Bing using the category name of the k-th class as keyword. As discussed in the next section, different methods will make different assumptions on the labels of the source examples. We adopt a linear SVM as the model for the binary one-vs-the-rest classifiers. This choice is primarily motivated by the availability of several simple yet effective domain adaptation variants of SVM [5, 26], in addition to the aforementioned reasons of good performance and efficiency. 4 Methods We now present the specific domain adaptation SVM algorithms. For brevity, we drop the subscript k indicating dependence on the specific class. The hyperparameters C of all classifiers are selected so as to minimize the multiclass cross validation error on the target training data. For all algorithms, we cope with the largely unequal number of positive and negative examples by normalizing the cost entries in the loss function by the respective class sizes. 4.1 Baselines: SVMs, SVMt, SVMs∪t We include in our evaluation three algorithms not based on domain adaptation and use them as comparative baselines. We indicate with SVMt a linear SVM learned exclusively from the target examples. SVMs denotes an SVM learned from the source examples using the one-versus-the-rest scheme and assuming no outliers are present in the image search results. SVMs∪t is a linear SVM trained on the union of the target and source examples. Specifically, for each class k, we train a binary SVM on the data obtained by merging Dt k with Ds k, where the data in the latter set is assumed to contain only positive examples, i.e., no outliers. The hyperparameter C is kept the same for all K binary classifiers but tuned distinctly for each of the three methods by selecting the hyperparameter value yielding the best multiclass performance on the target training set (we used hold out validation on Dt k for SVMs and 5-fold cross validation for both SVMt as well SVMs∪t). 4.2 Mixture of source and target hypotheses: MIXSVM One of the simplest possible strategies for domain adaptation consists of using as final classifier a convex combination of the two SVM hypotheses learned independently from the source and target data. Despite its simplicity, this classifier has been shown to yield good empirical results [26]. 5 Let us represent the source and target multiclass hypotheses as vector-valued functions hs(f) → RK, ht(f) →RK, where the k-th outputs are the respective SVM scores for class k. MIXSVM computes a convex combination h(f) = βhs(f)+(1−β)ht(f) and predicts the class k∗associated to the largest output, i.e. k∗= arg maxk∈{1,...,K} hk(f). The parameter β ∈[0, 1] is determined via grid search by optimizing multiclass error on the target training set. We avoid biased estimates resulting from learning the hypothesis ht and β on the same training set by applying a two-stage procedure: we learn 5 distinct hypotheses ht using 5-fold cross validation (with the hyperpameter value found for SVMt) and compute prediction ht(f t i) at each training sample f t i using the cross validation hypothesis that was not trained on that example; we then use these predicted outputs to determine the optimal β. Last, we learn the final hypothesis ht using the entire target training set. 4.3 Domain weighting: DWSVM Another straightforward yet popular domain adaptation approach is to train a classifier using both the source and the target examples by weighting differently the two domains in the learning objective [5, 12, 4]. We follow the implementation proposed in [26] and weight the loss function values differently for the source and target examples by using two distinct SVM hyperparameters, Cs and Ct, encoding the relative importance of the two domains. The values of these hyperparameters are selected by minimizing the multiclass 5-fold cross validation error on the target training set. 4.4 Feature augmentation: AUGSVM We denote with AUGSVM the domain adaptation method described in [5]. The key-idea of this approach is to create a feature-augmented version of each individual example f, where distinct feature augmentation mappings φs, φt are used for the source and target data, respectively: φs(f) = h f T f T 0T iT and φt(f) = h f T 0T f T iT , (1) where 0 indicates a F-dimensional vector of zeros. A linear SVM is then trained on the union of the feature-augmented source and target examples (using a single hyperparameter). The principle behind this mapping is that the SVM trained in the feature-augmented space has the ability to distinguish features having common behavior in the two domains (associated to the first F SVM weights) from features having different properties in the two domains. 4.5 Transductive learning: TSVM The previous methods implement different strategies to adjust the relative importance of the source and the training examples in the learning process. However, all these techniques assume that the source data is fully and correctly labeled. Unfortunately, in our practical problem this assumption is violated due to outliers and irrelevant results being present in the images retrieved by keyword search. To tackle this problem we propose to perform transductive inference on the label of the source data during the learning: the key-idea is to exploit the availability of strongly-labeled target training data to simultaneously determine the correct labels of the source training examples and incorporate this labeling information to improve the classifier. To address this task we employ the transductive SVM model introduced in [17]. Although this method is traditionally used to infer the labels of unlabeled data available at learning time, it outputs a proper inductive hypothesis and therefore can be used also to predict labels of unseen test examples. The problem of learning a transductive SVM in our context can be formulated as follows: min w,ys 1 2||w||2 + Ct N t X i=1 ct i l(yt iwT f t i) + Cs ns ns X j=1 l(ys jwT f s j) subject to 1 ns ns X j=1 max[0, sign(wT f s j)] = ρ (2) where l() denotes the loss function, w is the vector of SVM weights, ys contains the labels of the source examples, and the ct i are scalar coefficients used to counterbalance the effect of the unequal number of positive and negative examples: we set ct i = 1/nt if yt i = 1, ct i = 1/((K −1)nt) otherwise. The scalar parameter ρ defines the fraction of source examples that we expect to be positive and is tuned via cross validation. Note that TSVM solves jointly for the separating hyperplane and the labels of the source examples by trading off maximization of the margin and minimization of the 6 0 10 20 30 40 50 5 10 15 20 25 30 35 40 Number of target training images (nt) Accuracy (%) TSVM DWSVM MIXSVM AUGSVM SVMs SVMt SVMs ∪ t Figure 2: Recognition accuracy obtained with ns = 300 Web photos and a varying number of Caltech256 target training examples. 0 5 10 15 20 25 30 0 5 10 15 20 25 # target training examples in TSVM # additional examples needed by SVMt to match accuracy Figure 3: Manual annotation saving: the plot shows for a varying number of labeled examples given to TSVM the number of additional labeled images that would be needed by SVMt to achieve the same accuracy. prediction errors on both source and target data. This optimization can be interpreted as implementing the cluster assumption, i.e., the expectation that points in a data cluster have the same label. We solve the optimization problem in Eq. 2 for a quadratic soft-margin loss function l (i.e., l is chosen to be the square of the hinge loss) using the minimization algorithm proposed in [27], which computes an efficient primal solution using the modified finite Newton method of [18]. This minimization approach is ideally suited to large-scale sparse data sets such as ours (about 70% of our features are zero). We used the same values of hyperparameters (Ct, Cs, and ρ) for all classes k = 1, . . . , K and selected them by minimizing the multiclass cross validation error. We also tried letting ρ vary for each individual class but that led to slightly inferior results, possibly due to overfitting. 5 Experimental results We now present the experimental results. Figure 2 shows the accuracy achieved by the different algorithms when using ns = 300 and a varying number of training target examples (nt). The accuracy is measured as the average of the mean recognition rate per class, using mt = 25 test examples for each class. The best accuracy is achieved by the domain adaptation methods TSVM and DWSVM, which produce significant improvements over the SVM trained using only target examples (SVMt), particularly for small values of nt. For nt = 5, TSVM yields a 65% improvement over the best published results on this benchmark (for the same number of examples, an accuracy of 16.7% is reported in [13]). Our method achieves this performance by analyzing additional images, the Internet photos, but since these are collected automatically and do not require any human supervision, the gain we achieve is effectively ”human-cost free”. It is interesting to note that while using solely source training images yields very low accuracy (14.5% for SVMs), adding even just a single labeled target image produces a significant improvement (TSVM achieves 18.5% accuracy with nt = 1, and 27.1% with nt = 5): this indicates that the method can indeed adapt the classifier to work effectively on the target domain given a small amount of strongly-labeled data. It is interesting to note that while TSVM implements a form of outlier rejection as it solves for the labels of the source examples, DWSVM assumes that all source images in Ds k are positive examples for class k. Yet, DWSVM achieves results similar to those of TSVM: this suggests that domain adaptation rather than outlier rejection is the key-factor contributing to the improvement with respect to the baselines. By analyzing the performance of the baselines in figure 2 we observe that training exclusively with Web images (SVMs) yields much lower accuracy than using strongly-labeled data (SVMt): this is consistent with prior work [9, 29]. Furthermore, the poor accuracy of SVMs∪t compared to SVMt suggests that na¨ıvely adding a large number of source examples to the target training set without consideration of the domain differences not only does not help but actually worsens the recognition. Figure 3 illustrates the significant manual annotation saving produced by our approach: the x-axis is the number of target labeled images provided to TSVM while the y-axis shows the number of additional labeled examples that would be needed by SVMt to achieve the same accuracy. 7 0 50 100 150 200 250 300 10 15 20 25 30 Number of source training images (ns) Accuracy (%) TSVM DWSVM MIXSVM AUGSVM SVMs SVMt SVMs ∪ t Figure 4: Classification accuracy of the different methods using nt = 10 target training images and a varying number of source examples. 5 10 15 20 25 30 35 40 0 50 100 150 200 250 300 350 400 450 Number of target training images (nt) Training time (in minutes) for TSVM ns=50 ns=300 Figure 5: Training time: time needed to learn a multiclass classifier for Caltech256 using TSVM. The setting ns = 300 in the results above was chosen by studying the recognition accuracy as a function of the number of source examples: we carried out an experiment where we fixed the number nt of target training example for each category to an intermediate value (nt = 10), and varied the number ns of top image results used as source training examples for each class. Figure 4 summarizes the results. We notice that the performance of the SVM trained only on source images (SVMs) peaks at ns = 100 and decreases monotonically after this value. This result can be explained by observing that image search engines provide images sorted according to estimated relevancy with respect to the keyword. It is conceivable to assume that images far down in the ranking list will often tend to be outliers, which may lead to degradation of recognition particularly for non-robust models. Despite this, we see that the domain adaptation methods TSVM and DWSVM exhibit a monotonically non-decreasing accuracy as ns grows: this indicates that these methods are highly robust to outliers and can make effective use of source data even when increasing ns causes a likely decrease of the fraction of inliers and relevant results. Contrast these robust performances with the accuracy of SVMs∪t, which grows as we begin adding source examples but then decays rapidly after ns = 10 and approaches the poor recognition of SVMs for large values of ns. Our approach compares very favorably with competing algorithms also in terms of computational complexity: training TSVM (without cross validation) on Caltech256 with nt = 5 and ns = 300 takes 84 minutes on a AMD Opteron Processor 280 2.4GHz; training the multiclass method of [13] using 5 labeled examples per class takes about 23 hours on the same machine (for fairness of comparison, we excluded cross validation even for this method). A detailed analysis of training time as a function of the number of labeled training examples is reported in figure 5. Evaluation of our model on a test example takes 0.18ms, while the method of [13] requires 37ms. 6 Discussion and future work In this work we have investigated the application of domain adaptation methods to object categorization using Web photos as source data. Our analysis indicates that, while object classifiers learned exclusively from Web data are inferior to fully-supervised models, the use of domain adaptation methods to combine Web photos with small amounts of strongly labeled data leads to state-of-theart results. The proposed strategy should be particularly useful in scenarios where labeled data is scarce or expensive to acquire. Future work will include application of our approach to combine data from multiple source domains (e.g., images obtained from different search engines or photo sharing sites) and different media (e.g., text and video). Additional material including software and our source training data may be obtained from [1]. Acknowledgments We are grateful to Andrew Fitzgibbon and Martin Szummer for discussion. We thank Vikas Sindhwani for providing code. This research was funded in part by NSF CAREER award IIS-0952943. 8 References [1] http://vlg.cs.dartmouth.edu/projects/domainadapt. [2] T. L. Berg and D. A. Forsyth. Animals on the web. In CVPR, pages 1463–1470, 2006. [3] I. Bierderman. Recognition-by-components: A theory of human image understanding. Psychological Review, 94(2):115–147, 1987. [4] J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. Wortman. Learning bounds for domain adaptation. In NIPS, 2007. [5] H. Daume III. Frustratingly easy domain adaptation. In ACL, 2007. [6] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR, 2009. [7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2010 (VOC2010) Results. [8] L. Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. IEEE Trans. Pattern Anal. Mach. Intell., 28(4):594–611, 2006. [9] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning object categories from google’s image search. In ICCV, pages 1816–1823, 2005. [10] R. Fergus, P. Perona, and A. Zisserman. A visual category filter for google images. In ECCV, 2004. [11] R. Fergus, Y. Weiss, and A. Torralba. Semi-supervised learning in gigantic image collections. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, NIPS 22, 2009. [12] J. R. Finkel and C. D. Manning. Hierarchical bayesian domain adaptation. In Proceedings of the North American Association of Computational Linguistics (NAACL 2009), 2009. [13] P. V. Gehler and S. Nowozin. On feature combination for multiclass object classification. In IEEE International Conference on Computer Vision (ICCV), 2009. [14] G. Griffin, A. Holub, and P. Perona. Caltech-256 object category dataset. Technical Report 7694, California Institute of Technology, 2007. [15] A. Holub, M. Welling, and P. Perona. Exploiting unlabelled data for hybrid object classification. In NIPS, Interclass transfer workshop, 2005. [16] J. Huang, A. J. Smola, A. Gretton, K. M. Borgwardt, and B. Sch¨olkopf. Correcting sample selection bias by unlabeled data. In NIPS, pages 601–608, 2006. [17] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, pages 200–209, 1999. [18] S. S. Keerthi and D. DeCoste. A modified finite newton method for fast solution of large scale linear svms. Journal of Machine Learning Research, 6:341–361, 2005. [19] C. Leistner, H. Grabner, and H. Bischof. Semi-supervised boosting using visual similarity learning. In CVPR, 2008. [20] L. Li and L. Fei-Fei. Optimol: Automatic online picture collection via incremental model learning. Intl. Jrnl. of Computer Vision, 88(2):147–168, 2010. [21] E. G. Miller, N. E. Matsakis, and P. A. Viola. Learning from one example through shared densities on transforms. In CVPR, 2000. [22] A. Quattoni, M. Collins, and T. Darrell. Transfer learning for image classification with sparse prototype representations. In CVPR, 2008. [23] B. C. Russell, A. B. Torralba, K. P. Murphy, and W. T. Freeman. Labelme: A database and web-based tool for image annotation. International Journal of Computer Vision, 77(1-3):157–173, 2008. [24] K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In European Conference on Computer Vision (ECCV), Sept. 2010. [25] F. Schroff, A. Criminisi, and A. Zisserman. Harvesting image databases from the web. In ICCV, 2007. [26] G. Schweikert, C. Widmer, B. Sch¨olkopf, and G. R¨atsch. An empirical analysis of domain adaptation algorithms for genomic sequence analysis. In NIPS, pages 1433–1440, 2008. [27] V. Sindhwani and S. S. Keerthi. Large scale semi-supervised linear svms. In SIGIR, pages 477–484, 2006. [28] L. Torresani, M. Szummer, and A. Fitzgibbon. Efficient object category recognition using classemes. In European Conference on Computer Vision (ECCV), pages 776–789, Sept. 2010. [29] S. Vijayanarasimhan and K. Grauman. Keywords to visual categories: Multiple-instance learning forweakly supervised object categorization. In CVPR, 2008. [30] L. von Ahn. Games with a purpose. IEEE Computer, 39(6):92–94, 2006. 9
2010
186
3,950
Predicting Execution Time of Computer Programs Using Sparse Polynomial Regression Ling Huang Intel Labs Berkeley ling.huang@intel.com Jinzhu Jia UC Berkeley jzjia@stat.berkeley.edu Bin Yu UC Berkeley binyu@stat.berkeley.edu Byung-Gon Chun Intel Labs Berkeley byung-gon.chun@intel.com Petros Maniatis Intel Labs Berkeley petros.maniatis@intel.com Mayur Naik Intel Labs Berkeley mayur.naik@intel.com Abstract Predicting the execution time of computer programs is an important but challenging problem in the community of computer systems. Existing methods require experts to perform detailed analysis of program code in order to construct predictors or select important features. We recently developed a new system to automatically extract a large number of features from program execution on sample inputs, on which prediction models can be constructed without expert knowledge. In this paper we study the construction of predictive models for this problem. We propose the SPORE (Sparse POlynomial REgression) methodology to build accurate prediction models of program performance using feature data collected from program execution on sample inputs. Our two SPORE algorithms are able to build relationships between responses (e.g., the execution time of a computer program) and features, and select a few from hundreds of the retrieved features to construct an explicitly sparse and non-linear model to predict the response variable. The compact and explicitly polynomial form of the estimated model could reveal important insights into the computer program (e.g., features and their non-linear combinations that dominate the execution time), enabling a better understanding of the program’s behavior. Our evaluation on three widely used computer programs shows that SPORE methods can give accurate prediction with relative error less than 7% by using a moderate number of training data samples. In addition, we compare SPORE algorithms to state-of-the-art sparse regression algorithms, and show that SPORE methods, motivated by real applications, outperform the other methods in terms of both interpretability and prediction accuracy. 1 Introduction Computing systems today are ubiquitous, and range from the very small (e.g., iPods, cellphones, laptops) to the very large (servers, data centers, computational grids). At the heart of such systems are management components that decide how to schedule the execution of different programs over time (e.g., to ensure high system utilization or efficient energy use [11,15]), how to allocate to each program resources such as memory, storage and networking (e.g., to ensure a long battery life or fair resource allocation), and how to weather anomalies (e.g., flash crowds or attacks [6,17,24]). These management components typically must make guesses about how a program will perform under given hypothetical inputs, so as to decide how best to plan for the future. For example, consider a simple scenario in a data center with two computers, fast computer A and slow computer B, and a program waiting to run on a large file f stored in computer B. A scheduler is often faced 1 with the decision of whether to run the program at B, potentially taking longer to execute, but avoiding any transmission costs for the file; or moving the file from B to A but potentially executing the program at A much faster. If the scheduler can predict accurately how long the program would take to execute on input f at computer A or B, he/she can make an optimal decision, returning results faster, possibly minimizing energy use, etc. Despite all these opportunities and demands, uses of prediction have been at best unsophisticated in modern computer systems. Existing approaches either create analytical models for the programs based on simplistic assumptions [12], or treat the program as a black box and create a mapping function between certain properties of input data (e.g., file size) and output response [13]. The success of such methods is highly dependent on human experts who are able to select important predictors before a statistical modeling step can take place. Unfortunately, in practice experts may be hard to come by, because programs can get complex quickly beyond the capabilities of a single expert, or because they may be short-lived (e.g., applications from the iPhone app store) and unworthy of the attention of a highly paid expert. Even when an expert is available, program performance is often dependent not on externally visible features such as command-line parameters and input files, but on the internal semantics of the program (e.g., what lines of code are executed). To address this problem (lack of expert and inherent semantics), we recently developed a new system [7] to automatically extract a large number of features from the intermediate execution steps of a program (e.g., internal variables, loops, and branches) on sample inputs; then prediction models can be built from those features without the need for a human expert. In this paper, we propose two Sparse POlynomial REgression (SPORE) algorithms that use the automatically extracted features to predict a computer program’s performance. They are variants of each other in the way they build the nonlinear terms into the model – SPORE-LASSO first selects a small number of features and then entertains a full nonlinear polynomial expansion of order less than a given degree; while SPORE-FoBa chooses adaptively a subset of the full expanded terms and hence allows possibly a higher order of polynomials. Our algorithms are in fact new general methods motivated by the computer performance prediction problem. They can learn a relationship between a response (e.g., the execution time of a computer program given an input) and the generated features, and select a few from hundreds of features to construct an explicit polynomial form to predict the response. The compact and explicit polynomial form reveals important insights in the program semantics (e.g., the internal program loop that affects program execution time the most). Our approach is general, flexible and automated, and can adapt the prediction models to specific programs, computer platforms, and even inputs. We evaluate our algorithms experimentally on three popular computer programs from web search and image processing. We show that our SPORE algorithms can achieve accurate predictions with relative error less than 7% by using a small amount of training data for our application, and that our algorithms outperform existing state-of-the-art sparse regression algorithms in the literature in terms of interpretability and accuracy. Related Work. In prior attempts to predict program execution time, Gupta et al. [13] use a variant of decision trees to predict execution time ranges for database queries. Ganapathi et al. [11] use KCCA to predict time and resource consumption for database queries using statistics on query texts and execution plans. To measure the empirical computational complexity of a program, Trendprof [12] constructs linear or power-law models that predict program execution counts. The drawbacks of such approaches include their need for expert knowledge about the program to identify good features, or their requirement for simple input-size to execution time correlations. Seshia and Rakhlin [22,23] propose a game-theoretic estimator of quantitative program properties, such as worst-case execution time, for embedded systems. These properties depend heavily on the target hardware environment in which the program is executed. Modeling the environment manually is tedious and error-prone. As a result, they formulate the problem as a game between their algorithm (player) and the program’s environment (adversary), where the player seeks to accurately predict the property of interest while the adversary sets environment states and parameters. Since expert resource is limited and costly, it is desirable to automatically extract features from program codes. Then machine learning techniques can be used to select the most important features to build a model. In statistical machine learning, feature selection methods under linear regression models such as LASSO have been widely studied in the past decade. Feature selection with 2 non-linear models has been studied much less, but has recently been attracting attention. The most notable are the SpAM work with theoretical and simulation results [20] and additive and generalized forward regression [18]. Empirical studies with data of these non-linear sparse methods are very few [21]. The drawback of applying the SpAM method in our execution time prediction problem is that SpAM outputs an additive model and cannot use the interaction information between features. But it is well-known that features of computer programs interact to determine the execution time [12]. One non-parametric modification of SpAM to replace the additive model has been proposed [18]. However, the resulting non-parametric models are not easy to interpret and hence are not desirable for our execution time prediction problem. Instead, we propose the SPORE methodology and propose efficient algorithms to train a SPORE model. Our work provides a promising example of interpretable non-linear sparse regression models in solving real data problems. 2 Overview of Our System Our focus in this paper is on algorithms for feature selection and model building. However we first review the problem within which we apply these techniques to provide context [7]. Our goal is to predict how a given program will perform (e.g., its execution time) on a particular input (e.g., input files and command-line parameters). The system consists of four steps. First, the feature instrumentation step analyzes the source code and automatically instruments it to extract values of program features such as loop counts (how many times a particular loop has executed), branch counts (how many times each branch of a conditional has executed), and variable values (the k first values assigned to a numerical variable, for some small k such as 5). Second, the profiling step executes the instrumented program with sample input data to collect values for all created program features and the program’s execution times. The time impact of the data collection is minimal. Third, the slicing step analyzes each automatically identified feature to determine the smallest subset of the actual program that can compute the value of that feature, i.e., the feature slice. This is the cost of obtaining the value of the feature; if the whole program must execute to compute the value, then the feature is expensive and not useful, since we can just measure execution time and we have no need for prediction, whereas if only a little of the program must execute, the feature is cheap and therefore possibly valuable in a predictive model. Finally, the modeling step uses the feature values collected during profiling along with the feature costs computed during slicing to build a predictive model on a small subset of generated features. To obtain a model consisting of low-cost features, we iterate over the modeling and slicing steps, evaluating the cost of selected features and rejecting expensive ones, until only low-cost features are selected to construct the prediction model. At runtime, given a new input, the selected features are computed using the corresponding slices, and the model is used to predict execution time from the feature values. The above description is minimal by necessity due to space constraints, and omits details on the rationale, such as why we chose the kinds of features we chose or how program slicing works. Though important, those details have no bearing in the results shown in this paper. At present our system targets a fixed, overprovisioned computation environment without CPU job contention or network bandwidth fluctuations. We therefore assume that execution times observed during training will be consistent with system behavior on-line. Our approach can adapt to modest change in execution environment by retraining on different environments. In our future research, we plan to incorporate candidate features of both hardware (e.g., configurations of CPU, memory, etc) and software environment (e.g., OS, cache policy, etc) for predictive model construction. 3 Sparse Polynomial Regression Model Our basic premise for predictive program analysis is that a small but relevant set of features may explain the execution time well. In other words, we seek a compact model—an explicit form function of a small number of features—that accurately estimates the execution time of the program. 3 To make the problem tractable, we constrain our models to the multivariate polynomial family, for at least three reasons. First, a “good program” is usually expected to have polynomial execution time in some (combination of) features. Second, a polynomial model up to certain degree can approximate well many nonlinear models (due to Taylor expansion). Finally, a compact polynomial model can provide an easy-to-understand explanation of what determines the execution time of a program, providing program developers with intuitive feedback and a solid basis for analysis. For each computer program, our feature instrumentation procedure outputs a data set with n samples as tuples of {yi, xi}n i=1, where yi ∈R denotes the ith observation of execution time, and xi denotes the ith observation of the vector of p features. We now review some obvious alternative methods to modeling the relationship between Y = [yi] and X = [xi], point out their drawbacks, and then we proceed to our SPORE methodology. 3.1 Sparse Regression and Alternatives Least square regression is widely used for finding the best-fitting f(x, β) to a given set of responses yi by minimizing the sum of the squares of the residuals [14]. Regression with subset selection finds for each k ∈{1, 2, . . ., m} the feature subset of size k that gives the smallest residual sum of squares. However, it is a combinatorial optimization and is known to be NP-hard [14]. In recent years a number of efficient alternatives based on model regularization have been proposed. Among them, LASSO [25] finds the selected features with coefficients ˆβ given a tuning parameter λ as follows: ˆβ = arg min β 1 2∥Y −Xβ∥2 2 + λ X j |βj|. (1) LASSO effectively enforces many βj’s to be 0, and selects a small subset of features (indexed by non-zero βj’s) to build the model, which is usually sparse and has better prediction accuracy than models created by ordinary least square regression [14] when p is large. Parameter λ controls the complexity of the model: as λ grows larger, fewer features are selected. Being a convex optimization problem is an important advantage of the LASSO method since several fast algorithms exist to solve the problem efficiently even with large-scale data sets [9, 10, 16, 19]. Furthermore, LASSO has convenient theoretical and empirical properties. Under suitable assumptions, it can recover the true underlying model [8, 25]. Unfortunately, when predictors are highly correlated, LASSO usually cannot select the true underlying model. The adaptive-LASSO [29] defined below in Equation (2) can overcome this problem ˆβ = arg min β 1 2∥Y −Xβ∥2 2 + λ X j | βj wj |, (2) where wj can be any consistent estimate of β. Here we choose wj to be a ridge estimate of β: wj = (XT X + 0.001I)−1XT Y, where I is the identity matrix. Technically LASSO can be easily extended to create nonlinear models (e.g., using polynomial basis functions up to degree d of all p features). However, this approach gives us p+d d  terms, which is very large when p is large (on the order of thousands) even for small d, making regression computationally expensive. We give two alternatives to fit the sparse polynomial regression model next. 3.2 SPORE Methodology and Two Algorithms Our methodology captures non-linear effects of features—as well as non-linear interactions among features—by using polynomial basis functions over those features (we use terms to denote the polynomial basis functions subsequently). We expand the feature set x = {x1 x2 . . . xk}, k ≤p to all the terms in the expansion of the degree-d polynomial (1 + x1 + . . . + xk)d, and use the terms to construct a multivariate polynomial function f(x, β) for the regression. We define expan(X, d) as the mapping from the original data matrix X to a new matrix with the polynomial expansion terms up to degree d as the columns. For example, using a degree-2 polynomial with feature set 4 x = {x1 x2}, we expand out (1 + x1 + x2)2 to get terms 1, x1, x2, x2 1, x1x2, x2 2, and use them as basis functions to construct the following function for regression: expan ([x1, x2], 2) = [1, [x1], [x2], [x2 1], [x1x2], [x2 2]], f(x, β) = β0 + β1x1 + β2x2 + β3x2 1 + β4x1x2 + β5x2 2. Complete expansion on all p features is not necessary, because many of them have little contribution to the execution time. Motivated by this execution time application, we propose a general methodology called SPORE which is a sparse polynomial regression technique. Next, we develop two algorithms to fit our SPORE methodology. 3.2.1 SPORE-LASSO: A Two-Step Method For a sparse polynomial model with only a few features, if we can preselect a small number of features, applying the LASSO on the polynomial expansion of those preselected features will still be efficient, because we do not have too many polynomial terms. Here is the idea: Step 1: Use the linear LASSO algorithm to select a small number of features and filter out (often many) features that hardly have contributions to the execution time. Step 2: Use the adaptive-LASSO method on the expanded polynomial terms of the selected features (from Step 1) to construct the sparse polynomial model. Adaptive-LASSO is used in Step 2 because of the collinearity of the expanded polynomial features. Step 2 can be computed efficiently if we only choose a small number of features in Step 1. We present the resulting SPORE-LASSO algorithm in Algorithm 1 below. Algorithm 1 SPORE-LASSO Input: response Y , feature data X, maximum degree d, λ1, λ2 Output: Feature index S, term index St, weights ˆβ for d-degree polynomial basis. 1: ˆα = arg minα 1 2∥Y −Xα∥2 2 + λ1∥α∥1 2: S = {j : ˆαj ̸= 0} 3: Xnew = expan(X(S), d) 4: w = (XT newXnew + 0.001I)−1XT newY 5: ˆβ = arg minβ 1 2∥Y −Xnewβ∥2 2 + λ2 P j | βj wj | 6: St = {j : ˆβj ̸= 0} X(S) in Step 3 of Algorithm 1 is a sub-matrix of X containing only columns from X indexed by S. For a new observation with feature vector X = [x1, x2, . . . , xp], we first get the selected feature vector X(S), then obtain the polynomial terms Xnew = expan(X(S), d), and finally we compute the prediction: ˆY = Xnew × ˆβ. Note that the prediction depends on the choice of λ1, λ2 and maximum degree d. In this paper, we fix d = 3. λ1 and λ2 are chosen by minimizing the Akaike Information Criterion (AIC) on the LASSO solution paths. The AIC is defined as n log(∥Y −ˆY ∥2 2)+ 2s, where ˆY is the fitted Y and s is the number of polynomial terms selected in the model. To be precise, for the linear LASSO step (Step 1 of Algorithm 1), a whole solution path with a number of λ1 can be obtained using the algorithm in [10]. On the solution path, for each fixed λ1, we compute a solution path with varied λ2 for Step 5 of Algorithm 1 to select the polynomial terms. For each λ2, we calculate the AIC, and choose the (λ1, λ2) with the smallest AIC. One may wonder whether Step 1 incorrectly discards features required for building a good model in Step 2. We next show theoretically this is not the case. Let S be a subset of {1, 2, . . ., p} and its complement Sc = {1, 2, . . ., p} \ S. Write the feature matrix X as X = [X(S), X(Sc)]. Let response Y = f(X(S)) + ǫ, where f(·) is any function and ǫ is additive noise. Let n be the number of observations and s the size of S. We assume that X is deterministic, p and s are fixed, and ǫ′ is are i.i.d. and follow the Gaussian distribution with mean 0 and variance σ2. Our results also hold for zero mean sub-Gaussian noise with parameter σ2. More general results regarding general scaling of n, p and s can also be obtained. Under the following conditions, we show that Step 1 of SPORE-LASSO, the linear LASSO, selects the relevant features even if the response Y depends on predictors X(S) nonlinearly: 5 1. The columns (Xj, j = 1, . . . , p) of X are standardized: 1 nXT j Xj = 1, for all j; 2. Λmin( 1 nX(S)T X(S)) ≥c with a constant c > 0; 3. min |(X(S)T X(S))−1X(S)T f(X(S))| > α with a constant α > 0; 4. XT Sc[I−XS(XT S XS)−1XT S ]f(XS) n < ηαc 2√s+1, for some 0 < η < 1; 5. ∥XT ScXS(XT S XS)−1∥∞≤1 −η; where Λmin(·) denotes the minimum eigenvalue of a matrix, ∥A∥∞is defined as maxi hP j |Aij| i and the inequalities are defined element-wise. Theorem 3.1. Under the conditions above, with probability →1 as n →∞, there exists some λ, such that ˆβ = (ˆβS, ˆβSc) is the unique solution of the LASSO (Equation (1)), where ˆβj ̸= 0, for all j ∈S and ˆβSc = 0. Remark. The first two conditions are trivial: Condition 1 can be obtained by rescaling while Condition 2 assumes that the design matrix composed of the true predictors in the model is not singular. Condition 3 is a reasonable condition which means that the linear projection of the expected response to the space spanned by true predictors is not degenerated. Condition 4 is a little bit tricky; it says that the irrelevant predictors (XSc) are not very correlated with the “residuals” of E(Y ) after its projection onto XS. Condition 5 is always needed when considering LASSO’s model selection consistency [26,28]. The proof of the theorem is included in the supplementary material. 3.2.2 Adaptive Forward-Backward: SPORE-FoBa Using all of the polynomial expansions of a feature subset is not flexible. In this section, we propose the SPORE-FoBa algorithm, a more flexible algorithm using adaptive forward-backward searching over the polynomially expanded data: during search step k with an active set T (k), we examine one new feature Xj, and consider a small candidate set which consists of the candidate feature Xj, its higher order terms, and the (non-linear) interactions between previously selected features (indexed by S) and candidate feature Xj with total degree up to d, i.e., terms with form Xd1 j Πl∈SXdl l , with d1 > 0, dl ≥0, and d1 + X dl ≤d. (3) Algorithm 2 below is a short description of the SPORE-FoBa, which uses linear FoBa [27] at step 5and 6. The main idea of SPORE-FoBa is that a term from the candidate set is added into the model if and only if adding this term makes the residual sum of squares (RSS) decrease a lot. We scan all of the terms in the candidate set and choose the one which makes the RSS drop most. If the drop in the RSS is greater than a pre-specified value ǫ, we add that term to the active set, which contains the currently selected terms by the SPORE-FoBa algorithm. When considering deleting one term from the active set, we choose the one that makes the sum of residuals increase the least. If this increment is small enough, we delete that term from our current active set. Algorithm 2 SPORE-FoBa Input: response Y , feature columns X1, . . . , Xp, the maximum degree d Output: polynomial terms and the weights 1: Let T = ∅ 2: while true do 3: for j = 1, . . . , p do 4: Let C be the candidate set that contains non-linear and interaction terms from Equation (3) 5: Use Linear FoBa to select terms from C to form the new active set T . 6: Use Linear FoBa to delete terms from T to form a new active set T . 7: if no terms can be added or deleted then 8: break 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.05 0.1 0.15 0.2 Prediction Error Percentage of Training data SPORE−LASSO SPORE−FoBa 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.05 0.1 0.15 0.2 Prediction Error Percentage of Training data SPORE−LASSO SPORE−FoBa 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0.05 0.1 0.15 0.2 Prediction Error Percentage of Training data SPORE−LASSO SPORE−FoBa (a) Lucene (b) Find Maxima (c) Segmentation Figure 1: Prediction errors of our algorithms across the three data sets varying training-set fractions. 4 Evaluation Results We now experimentally demonstrate that our algorithms are practical, give highly accurate predictors for real problems with small training-set sizes, compare favorably in accuracy to other state-ofthe-art sparse-regression algorithms, and produce interpretable, intuitive models. To evaluate our algorithms, we use as case studies three programs: the Lucene Search Engine [4], and two image processing algorithms, one for finding maxima and one for segmenting an image (both of which are implemented within the ImageJ image processing framework [3]). We chose all three programs according to two criteria. First and most importantly, we sought programs with high variability in the predicted measure (execution time), especially in the face of otherwise similar inputs (e.g., image files of roughly the same size for image processing). Second, we sought programs that implement reasonably complex functionality, for which an inexperienced observer would not be able to trivially identify the important features. Our collected datasets are as follows. For Lucene, we used a variety of text input queries from two corpora: the works of Shakespeare and the King James Bible. We collected a data set with n = 3840 samples, each of which consists of an execution time and a total of p = 126 automatically generated features. The time values are in range of (0.88, 1.13) with standard deviation 0.19. For the Find Maxima program within the ImageJ framework, we collected n = 3045 samples (from an equal number of distinct, diverse images obtained from three vision corpora [1,2,5]), and a total of p = 182 features. The execution time values are in range of (0.09, 2.99) with standard deviation 0.24. Finally, from the Segmentation program within the same ImageJ framework on the same image set, we collected again n = 3045 samples, and a total of p = 816 features for each. The time values are in range of (0.21, 58.05) with standard deviation 3.05. In all the experiments, we fix degree d = 3 for polynomial expansion, and normalized each column of feature data into range [0, 1]. Prediction Error. We first show that our algorithms predict accurately, even when training on a small number of samples, in both absolute and relative terms. The accuracy measure we use is the relative prediction error defined as 1 nt P | ˆyi−yi yi |, where nt is the size of the test data set, and ˆyi’s and yi’s are the predicted and actual responses of test data, respectively. We randomly split every data set into a training set and a test set for a given training-set fraction, train the algorithms and measure their prediction error on the test data. For each training fraction, we repeat the “splitting, training and testing” procedure 10 times and show the mean and standard deviation of prediction error in Figure 1. We see that our algorithms have high prediction accuracy, even when training on only 10% or less of the data (roughly 300 - 400 samples). Specifically, both of our algorithms can achieve less than 7% prediction error on both Lucene and Find Maxima datasets; on the segmentation dataset, SPORE-FoBa achieves less than 8% prediction error, and SPORE-LASSO achieves around 10% prediction error on average. Comparisons to State-of-the-Art. We compare our algorithms to several existing sparse regression methods by examining their prediction errors at different sparsity levels (the number of features used in the model), and show our algorithms can clearly outperform LASSO, FoBa and recently proposed non-parametric greedy methods [18] (Figure 2). As a non-parametric greedy algorithm, we use Additive Forward Regression (AFR), because it is faster and often achieves better prediction accuracy than Generalized Forward Regression (GFR) algorithms. We use the Glmnet Matlab implementa7 tion of LASSO and to obtain the LASSO solution path [10]. Since FoBa and SPORE-FoBa naturally produce a path by adding or deleting features (or terms), we record the prediction error at each step. When two steps have the same sparsity level, we report the smallest prediction error. To generate the solution path for SPORE-LASSO, we first use Glmnet to generate a solution path for linear LASSO; then at each sparsity level k, we perform full polynomial expansion with d = 3 on the selected k features, obtain a solution path on the expanded data, and choose the model with the smallest prediction error among all models computed from all active feature sets of size k. From the figure, we see that our SPORE algorithms have comparable performance, and both of them clearly achieve better prediction accuracy than LASSO, FoBa, and AFR. None of the existing methods can build models within 10% of relative prediction error. We believe this is because execution time of a computer program often depends on non-linear combinations of different features, which is usually not well-handled by either linear methods or the additive non-parametric methods. Instead, both of our algorithms can select 2-3 high-quality features and build models with non-linear combinations of them to predict execution time with high accuracy. 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 0.5 Prediction Error Sparsity LASSO FoBa AFR SPORE−LASSO SPORE−FoBa 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 0.5 Prediction Error Sparsity LASSO FoBa AFR SPORE−LASSO SPORE−FoBa 1 2 3 4 5 6 7 0 0.1 0.2 0.3 0.4 0.5 Prediction Error Sparsity LASSO FoBa AFR SPORE−LASSO SPORE−FoBa (a) Lucene (b) Find Maxima (c) Segmentation Figure 2: Performance of the algorithms: relative prediction error versus sparsity level. Model Interpretability. To gain better understanding, we investigate the details of the model constructed by SPORE-FoBa for Find Maxima. Our conclusions are similar for the other case studies, but we omit them due to space. We see that with different training set fractions and with different sparsity configurations, SPORE-FoBa can always select two high-quality features from hundreds of automatically generated ones. By consulting with experts of the Find Maxima program, we find that the two selected features correspond to the width (w) and height (h) of the region of interest in the image, which may in practice differ from the actual image width and height. Those are indeed the most important factors for determining the execution time of the particular algorithm used. For a 10% training set fraction and ǫ = 0.01, SPORE-FoBa obtained f(w, h) = 0.1 + 0.22w + 0.23h + 1.93wh + 0.24wh2 which uses non-linear feature terms(e.g., wh, wh2) to predict the execution time accurately (around 5.5% prediction error). Especially when Find Maxima is used as a component of a more complex image processing pipeline, this model would not be the most obvious choice even an expert would pick. On the contrary, as observed in our experiments, neither the linear nor the additive sparse methods handle well such nonlinear terms, and result in inferior prediction performance. A more detailed comparison across different methods is the subject of our on-going work. 5 Conclusion In this paper, we proposed the SPORE (Sparse POlynomial REgression) methodology to build the relationship between execution time of computer programs and features of the programs. We introduced two algorithms to learn a SPORE model, and showed that both algorithms can predict execution time with more than 93% accuracy for the applications we tested. For the three test cases, these results present a significant improvement (a 40% or more reduction in prediction error) over other sparse modeling techniques in the literature when applied to this problem. Hence our work provides one convincing example of using sparse non-linear regression techniques to solve real problems. Moreover, the SPORE methodology is a general methodology that can be used to model computer program performance metrics other than execution time and solve problems from other areas of science and engineering. 8 References [1] Caltech 101 Object Categories. http://www.vision.caltech.edu/Image_Datasets/ Caltech101/Caltech101.html. [2] Event Dataset. http://vision.stanford.edu/lijiali/event_dataset/. [3] ImageJ. http://rsbweb.nih.gov/ij/. [4] Mahout. lucene.apache.org/mahout. [5] Visual Object Classes Challenge 2008. http://pascallin.ecs.soton.ac.uk/challenges/ VOC/voc2008/. [6] S. Chen, K. Joshi, M. A. Hiltunen, W. H. Sanders, and R. D. Schlichting. Link gradients: Predicting the impact of network latency on multitier applications. In INFOCOM, 2009. [7] B.-G. Chun, L. Huang, S. Lee, P. Maniatis, and M. Naik. Mantis: Predicting system performance through program analysis and modeling. Technical Report, 2010. arXiv:1010.0019v1 [cs.PF]. [8] D. Donoho. For most large underdetermined systems of equations, the minimal 1-norm solution is the sparsest solution. Communications on Pure and Applied Mathematics, 59:797829, 2006. [9] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. Annals of Statistics, 32(2):407–499, 2002. [10] J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1), 2010. [11] A. Ganapathi, H. Kuno, U. Dayal, J. L. Wiener, A. Fox, M. Jordan, and D. Patterson. Predicting multiple metrics for queries: Better decisions enabled by machine learning. In ICDE, 2009. [12] S. Goldsmith, A. Aiken, and D. Wilkerson. Measuring empirical computational complexity. In FSE, 2007. [13] C. Gupta, A. Mehta, and U. Dayal. PQR: Predicting query execution times for autonomous workload management. In ICAC, 2008. [14] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. Springer, 2009. [15] M. Isard, V. Prabhakaran, J. Currey, U. Wieder, K. Talwar, and A. Goldberg. Quincy: fair scheduling for distributed computing clusters. In Proceedings of SOSP’09, 2009. [16] S.-J. Kim, K. Koh, M. Lustig, S. Boyd, and D. Gorinevsky. An interior-point method for large-scale l1-regularized least squares. IEEE Journal on Selected Topics in Signal Processing, 1(4):606–617, 2007. [17] Z. Li, M. Zhang, Z. Zhu, Y. Chen, A. Greenberg, and Y.-M. Wang. WebProphet: Automating performance prediction for web services. In NSDI, 2010. [18] H. Liu and X. Chen. Nonparametric greedy algorithm for the sparse learning problems. In NIPS 22, 2009. [19] M. Osborne, B. Presnell, and B. Turlach. On the lasso and its dual. Journal of Computational and Graphical Statistics, 9(2):319–337, 2000. [20] P. Ravikumar, J. Lafferty, H. Liu, and L. Wasserman. Sparse additive models. Journal of the Royal Statistical Society: Series B(Statistical Methodology), 71(5):1009–1030, 2009. [21] P. Ravikumar, V. Vu, B. Yu, T. Naselaris, K. Kay, J. Gallant, and C. Berkeley. Nonparametric sparse hierarchical models describe v1 fmri responses to natural images. Advances in Neural Information Processing Systems (NIPS), 21, 2008. [22] S. A. Seshia and A. Rakhlin. Game-theoretic timing analysis. In Proceedings of the IEEE/ACM International Conference on Computer-Aided Design (ICCAD), pages 575–582. IEEE Press, Nov. 2008. [23] S. A. Seshia and A. Rakhlin. Quantitative analysis of systems using game-theoretic learning. ACM Transactions on Embedded Computing Systems (TECS), 2010. To appear. [24] M. Tariq, A. Zeitoun, V. Valancius, N. Feamster, and M. Ammar. Answering what-if deployment and configuration questions with wise. In ACM SIGCOMM, 2008. [25] R. Tibshirani. Regression shrinkage and selection via the lasso. J. Royal. Statist. Soc B., 1996. [26] M. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using l1-constrained quadratic programming (Lasso). IEEE Trans. Information Theory, 55:2183–2202, 2009. [27] T. Zhang. Adaptive forward-backward greedy algorithm for sparse learning with linear models. Advances in Neural Information Processing Systems, 22, 2008. [28] P. Zhao and B. Yu. On model selection consistency of Lasso. The Journal of Machine Learning Research, 7:2563, 2006. [29] H. Zou. The adaptive lasso and its oracle properties. Journal of the American Statistical Association, 101(476):1418–1429, 2006. 9
2010
187
3,951
Humans Learn Using Manifolds, Reluctantly Bryan R. Gibson, Xiaojin Zhu, Timothy T. Rogers∗, Charles W. Kalish†, Joseph Harrison∗ Department of Computer Sciences, ∗Psychology, and †Educational Psychology University of Wisconsin-Madison, Madison, WI 53706 USA {bgibson, jerryzhu}@cs.wisc.edu {ttrogers, cwkalish, jcharrison}@wisc.edu Abstract When the distribution of unlabeled data in feature space lies along a manifold, the information it provides may be used by a learner to assist classification in a semi-supervised setting. While manifold learning is well-known in machine learning, the use of manifolds in human learning is largely unstudied. We perform a set of experiments which test a human’s ability to use a manifold in a semisupervised learning task, under varying conditions. We show that humans may be encouraged into using the manifold, overcoming the strong preference for a simple, axis-parallel linear boundary. 1 Introduction Consider a classification task where a learner is given training items x1, . . . , xl ∈Rd, represented by d-dimensional feature vectors. The learner is also given the corresponding class labels y1, . . . , yl ∈ Y. In this paper, we focus on binary labels Y ∈{−1, 1}. In addition, the learner is given some unlabeled items xl+1, . . . , xl+u ∈Rd without the corresponding labels. Importantly, the labeled and unlabeled items x1 . . . xl+u are distributed in a peculiar way in the feature space: they lie on smooth, lower dimension manifolds, such as those schematically shown in Figure 1(a). The question is: given this knowledge of labeled and unlabeled data, how will the learner classify xl+1, . . . , xl+u? Will the learner ignore the distribution information of the unlabeled data, and simply use the labeled data to form a decision boundary as in Figure 1(b)? Or will the learner propagate labels along the nonlinear manifolds as in Figure 1(c)? (a) the data (b) supervised learning (c) manifold learning Figure 1: On a dataset with manifold structure, supervised learning and manifold learning make dramatically different predictions. Large symbols represent labeled items, dots unlabeled items. When the learner is a machine learning algorithm, this question has been addressed by semisupervised learning [2, 11]. The designer of the algorithm can choose to make the manifold assumption, also known as graph-based semi-supervised learning, which states that the labels vary slowly along the manifolds or the discrete graph formed by connecting nearby items. Consequently, the learning algorithm will predict Figure 1(c). The mathematics of manifold learning is wellunderstood [1, 6, 9, 10]. Alternatively, the designer can choose to ignore the unlabeled data and perform supervised learning, which results in Figure 1(b). 1 When the learner is a human being, however, the answer is not so clear. Consider that the human learner does not directly see how the items are distributed in the feature space (such as Figure 1(a)), but only a set of items (such as those in Figure 2(a)). The underlying manifold structure of the data may not be immediately obvious. Thus there are many possibilities for how the human learner will behave: 1) They may completely ignore the manifold structure and perform supervised learning; 2) They may discover the manifold under some learning conditions and not others; or 3) They may always learn using the manifold. For readers not familiar with manifold learning, the setting might seem artificial. But in fact, many natural stimuli we encounter in everyday life are distributed on manifolds. An important example is face recognition, where different poses (viewing angles) of the same face produce different 2D images. These images can be quite different, as in the frontal and profile views of a person. However, if we continuously change the viewing angle, these 2D images will form a one-dimensional manifold in a very high dimensional image space. This example illustrates the importance of a manifold to facilitate learning: if we can form and maintain such a face manifold, then with a single label (e.g., the name) on one of the face images, we can recognize all other poses of that person by propagating the label along the manifold. The same is true for visual object recognition in general. Other more abstract stimuli form manifolds, or the discrete analogue, graphs. For example, text documents in a corpus occupy a potentially nonlinear manifold in the otherwise very high dimensional space used to represent them, such as the “bag of words” representation. There exists little empirical evidence addressing the question of whether human beings can learn using manifolds when classifying objects, and the few studies we are aware of come to opposing conclusions. For instance, Wallis and B¨ulthoff created artificial image sequences where a frontal face is morphed into the profile face of a different person. When participants were shown such sequences during training, their ability to match frontal and profile faces during testing was impaired [8]. This might be evidence that people depend on manifold structure stemming from temporal and spatial proximity to perform face recognition. On the other hand, Vandist et al. conducted a categorization experiment where the true decision boundary is at 45 degrees in a 2D stimulus space (i.e., an information integration task). They showed that when the two classes are elongated Gaussian, which are parallel to, and on opposite sides of, the decision boundary, unlabeled data does not help learning [7]. If we view these two elongated Gaussian as linear manifolds, this result suggests that people do not generally learn using manifolds. This study seeks to understand under what conditions, if any, people are capable of manifold learning in a semi-supervised setting. The study has important implications for cognitive psychology: first, if people are capable of learning manifolds, this suggests that manifold-learning models that have been developed in machine learning can provide hypotheses about how people categorize objects in natural domains like face recognition, where manifolds appear to capture the true structure of the domain. Second, if there are reliable methods for encouraging manifold learning in people, these methods can be employed to aid learning in other domains that are structured along manifolds. For machine learning, our study will help in the design of algorithms which can decide when to invoke the manifold learning assumption. 2 Human Manifold Learning Experiments We designed and conducted a set of experiments to study manifold learning in humans, with the following design considerations. First, the task was a “batch learning” paradigm in which participants viewed all labeled and unlabeled items at once (in contrast to “online” or sequential learning paradigm where items appear one at a time). Batch learning allows us to compare human behavior against well-established machine learning models that typically operate in batch mode. Second, we avoided using faces or familiar 3D objects as stimuli, despite their natural manifold structures as discussed above, because we wished to avoid any bias resulting from strong prior real-world knowledge. Instead, we used unfamiliar stimuli, from which we could add or remove a manifold structure easily. This design should allow our experiments to shed light on people’s intrinsic ability to learn using a manifold. Participants and Materials. In the first set of experiments, 139 university undergraduates participated for partial course credit. A computer interface was created to represent a table with three bins, as shown in Figure 2(a). Unlabeled cards were initially placed in a central white bin, with bins to 2 either side colored red and blue to indicate the two classes y ∈{−1, 1}. Each stimulus is a card. Participants sorted cards by clicking and dragging with a mouse. When a card was clicked, other similar cards could be “highlighted” in gray (depending on condition). Labeled cards were pinned down in their respective red or blue bins and could not be moved, indicated by a “pin” in the corner of the card. The layout of the cards was such that all cards remained visible at all times. Unlabeled cards could be re-categorized at any time by dragging from any bin to any other bin. Upon sorting all cards, participants would click a button to indicating completion. Two sets of stimuli were created. The first, used solely to acquaint the participants with the interface, consisted of a set of 20 cards with animal line drawings on a white background. The images were chosen to approximate a linear continuum between fish and mammal, with shark, dolphin, and whale at the center. The second set of stimuli used for the actual experiment was composed of 82 “crosshair” cards, each with a pair of perpendicular, axis-parallel lines, all of equal length, crossing on a white background. Four examples are shown in Figure 2(b). Each card therefore can be encoded as x ∈[0, 1]2, whose two features representing the positions of the vertical and horizontal lines, respectively. (a) Card sorting interface (b) x1 = (0, 0.1), x2 = (1, 0.9), x3 = (0.39, 0.41), x4 = (0.61, 0.59) Figure 2: Experimental interface (with highlighting shown), and example crosshair stimuli. Procedure. Each participant was given two tasks to complete. Task 1 was a practice task to familiarize the participant with the interface. The participant was asked to sort the set of 20 animal cards into two categories, with the two ends of the continuum (a clown fish and a dachshund) labeled. Participants were told that when they clicked on a card, highlighting of similar cards might occur. In reality, highlighting was always shown for the two nearest-neighboring cards (on the defined continuum) of a clicked card. Importantly, we designed the dataset so that, near the middle of the continuum, cards from opposite biological classes would be highlighted together. For example, when a dolphin was clicked, both a shark and a whale would be highlighted. The intention was to indicate to the participant that highlighting is not always a clear give-away for class labels. At the end of task 1 their fish vs. mammal classification accuracy was presented. No time limit was enforced. Task 2 asked the participant to sort a set of 82 crosshair cards into two categories. The set of cards, the number of labeled cards, and the highlighting of cards depended on condition. The participant was again told that some cards might be highlighted, whether the condition actually provided for highlighting or not. The participant was also told that cards that shared highlighting may not all have the same classification. Again, no time limit was enforced. After they completed this task, a follow up questionnaire was administered. Conditions. Each of the 139 participants was randomly assigned to one of 6 conditions, shown in Figure 3, which varied according to three manipulations: The number of labeled items l can be 2 or 4 (2l vs. 4l). For conditions with two labeled items, the labeled items are always (x1, y1 = −1), (x2, y2 = 1); with four labeled items, they are always (x1, y1 = −1), (x2, y2 = 1), (x3, y3 = 1), (x4, y4 = −1). The features of x1 . . . x4 are those given in Figure 2(b). We chose these four labeled points by maximizing the prediction differences made by seven machine learning models, as discussed in the next section. 3 Unlabeled items are distributed on a uniform grid or manifolds (gridU vs. moonsU). The items x5 . . . x82 were either on a uniform grid in the 2D feature space, or along two “half-moons”, which is a well-studied dataset in the semi-supervised learning community. No linear boundary can separate the two moons in feature space. x3 and x4, if unlabeled, are the same as in Figure 2(b). Highlighting similar items or not (the suffix h). For the moonsUconditions, the neighboring cards of any clicked card may be highlighted. The neighborhood is defined as within a radius of ǫ = 0.07 in the Euclidean feature space. This value was chosen as it includes at least two neighbors for each point in the moonsUdataset. To form the unweighted graph shown in Figure 3, an edge is placed between all neighboring points. The rationale for comparing these different conditions will become apparent as we consider how different machine-learning models perform on these datasets. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 2lgridU 2lmoonsU 2lmoonsUh 4lgridU 4lmoonsU 4lmoonsUh 8 participants 8 participants 8 participants 22 participants 24 participants 23 participants Figure 3: The six experimental conditions. Large symbols indicate labeled items, dots unlabeled items. Highlighting is represented as graph edges. 3 Model Predictions We hypothesize that human participants consider a set of models ranging from simple to sophisticated, and that they will perform model selection based on the training data given to them. We start by considering seven typical machine learning models to motivate our choice, and present the models we actually use later on. The seven models are: (graph) Graph-based semi-supervised learning [1, 10], which propagates labels along the graph. It reverts to supervised learning when there is no graph (i.e., no highlighting). (1NN,ℓ2) 1-nearest-neighbor classifier with ℓ2 (Euclidean) distance. (1NN,ℓ1) 1-nearest-neighbor classifier with ℓ1 (Manhattan) distance. These two models are similar to exemplar models in psychology [3]. (multi-v) multiple vertical linear boundaries. (multi-h) multiple horizontal linear boundaries. (single-v) a single vertical linear boundary. (single-h) a single horizontal linear boundary. We plot the label predictions by these 7 models on four of the six conditions in Figure 4. Their predictions on 2lmoonsUare identical to 2lmoonsUh, and on 4lmoonsUare identical to 4lmoonsUh, except that “(graph)” is not available. For conceptual simplicity and elegance, instead of using these disparate models we adopt a single model capable of making all these predictions. In particular, we use a Gaussian Process (GP) with different kernels (i.e., covariance functions) k to simulate the seven models. For details on GPs see standard textbooks such as [4]. In particular, we find seven different kernels k to match GP classification to each of the seven model predictions on all 6 conditions. This is somewhat unusual in that our GPs are not learned from data, but by matching other model predictions. Nonetheless, it is a valid procedure to create seven different GPs which will later be compared against human data. For models (1NN,ℓ2), (multi-v), (multi-h), (single-v), and (single-h), we use diagonal RBF kernels diag(σ2 1, σ2 2) and tune σ1, σ2 on a coarse parameter grid to minimize classification disagreement w.r.t. the corresponding model prediction on all 6 conditions. For model (1NN,ℓ1) we use a Laplace kernel and tune its bandwidth. For model (graph), we produce a graph kernel ˜k following the Reproducing Kernel Hilbert Space trick in [6]. That is, we extend a base RBF kernel k with a graph component: ˜k(x, z) = k(x, z) −k⊤ x (I + cLK)−1cLkz (1) where x, z are two arbitrary items (not necessarily on the graph), kx = (k(x, x1), . . . , k(x, xl+u))⊤ is the kernel vector between x and all l +u points x1 . . . xl+u in the graph, K is the (l +u)×(l +u) Gram matrix with Kij = k(xi, xj), L is the unnormalized graph Laplacian matrix derived from unweighted edges on the ǫNN graph defined earlier for highlighting, and c is the parameter that we tune. We take the base RBF kernel k to be the tuned kernel for model (1NN,ℓ2). It can be shown that 4 ˜k is a valid kernel formed by warping the base kernel k along the graph, see [6] for technical details. We used the GP classification implementation with Expectation Propagation approximation [5]. In the end, our seven GPs were able to exactly match the predictions made by the seven models in Figure 4. We will use these GPs in the rest of the paper. (graph) (1NN,ℓ2) (1NN,ℓ1) (multi-v) (multi-h) (single-v) (single-h) 2lgridU 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 2lmoonsUh 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 4lgridU 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 4lmoonsUh 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 Figure 4: Predictions made by the seven models on 4 of the 6 conditions. 4 Behavioral Experiment Results We now compare human categorization behaviors to model predictions. We first consider the aggregate behavior for all participants within each condition. One way to characterize this aggregate behavior is the “majority vote” of the participants on each item. That is, if more than half of the participants classified an item as y = 1, the majority vote classification for that item is y = 1, and so on. The first row in Figure 5 shows the majority vote for each condition. In these and all further plots, blue circles indicate y = −1, red pluses y = 1, and green stars ambiguous, meaning the classification into positive or negative is half-half. We also compute how well the seven GPs predict human majority votes. The accuracies of these GP models are shown in Table 11. 2lgridU 2lmoonsU 2lmoonsUh 4lgridU 4lmoonsU 4lmoonsUh 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 Figure 5: Human categorization results. (First row) the majority vote of participants within each condition. (Bottom three rows) a sample of responses from 18 different participants. Of course, a majority vote only reveals average behavior. We have observed that there are wide participant variabilities. Participants appeared to find the tasks difficult, as their self-reported confidence scores were fairly low in all conditions. It was also noted that strategies for completing the 1The condition 4lmoonsUhR will be explained later in Section 5. 5 (graph) (1NN,ℓ2) (1NN,ℓ1) (multi-v) (multi-h) (single-v) (single-h) 2lgridU 0.81 0.94 0.84 0.86 0.58 0.85 0.61 2lmoonsU 0.47 0.84 0.62 0.74 0.42 0.79 0.45 2lmoonsUh 0.50 0.78 0.56 0.76 0.36 0.76 0.39 4lgridU 0.54 0.61 0.64 0.64 0.50 0.60 0.51 4lmoonsU 0.64 0.62 0.60 0.69 0.47 0.38 0.45 4lmoonsUh 0.97 0.76 0.54 0.64 0.31 0.65 0.26 4lmoonsUhR 0.68 0.63 0.44 0.56 0.40 0.59 0.42 Table 1: GP model accuracy in predicting human majority vote for each condition. task varied widely, with some participant simply categorizing cards in the order they appeared on the screen, while others took a much longer, studied approach. Most interestingly, different participants seem to use different models, as the individual participant plots in the bottom three rows of Figure 5 suggest. We would like to be able to make a claim about what model, from our set of models, each participant used for classification. In order to do this, we compute per participant accuracies of the seven models on that participant’s classification. We then find the model M with the highest accuracy for the participant, out of the seven models. If this highest accuracy is above 0.75, we declare that the participant is potentially using model M; otherwise no model is deemed a good fit and we say the participant is using some “other” model. We show the proportion of participants in each condition attributed to each of our seven models, plus “other”, in Table 2. (graph) (1NN,ℓ2) (1NN,ℓ1) (multi-v) (multi-h) (single-v) (single-h) other 2lgridU 0.12 0.00 0.12 0.25 0.25 0.12 0.00 0.12 2lmoonsU 0.00 0.12 0.00 0.25 0.25 0.25 0.00 0.12 2lmoonsUh 0.12 0.00 0.00 0.38 0.25 0.00 0.00 0.25 4lgridU 0.00 0.05 0.09 0.00 0.00 0.18 0.09 0.59 4lmoonsU 0.25 0.25 0.12 0.12 0.00 0.04 0.08 0.38 4lmoonsUh 0.39 0.09 0.09 0.04 0.04 0.00 0.13 0.22 4lmoonsUhR 0.13 0.03 0.07 0 0 0.07 0.03 0.67 Table 2: Percentage of participants potentially using each model Based on Figure 5, Table 1, and Table 2, we make some observations: 1. When there are only two labeled points, the unlabeled distribution does not encourage humans to perform manifold learning (comparing 2lgridU vs. 2lmoonsU). That is, they do not follow the possible implicit graph structure (2lmoonsU). Instead, in both conditions they prefer a simple single vertical or horizontal decision boundary, as Table 2 shows2. 2. With two labeled points, even if they are explicitly given the graph structure in the form of highlighting, participants still do not perform manifold learning (comparing 2lmoonsU vs. 2lmoonsUh). It seems they are “blocked” by the simpler vertical or horizontal hypothesis, which perfectly explains the labeled data. 3. When there are four labeled points but no highlighting, the distribution of unlabeled data still does not encourage people to perform manifold learning (comparing 4lgridU vs. 4lmoonsU). This further suggests that people can not easily extract manifold structure from unlabeled data in order to learn, when there is no hint to do so. However, most participants have given up the simple single vertical or horizontal decision boundary, because it contradicts with the four labeled points. 4. Finally, when we provide the graph structure, there is a marked switch to manifold learning (comparing 4lmoonsU vs. 4lmoonsUh). This suggests that a combination of the elimination of preferred, simpler hypotheses, together with a stronger graph hint, finally gives the originally less preferred manifold learning model a chance of being used. It is under this condition that we observed human manifold learning behavior. 2The two rows in Table 1 for these two conditions are therefore misleading, as it averages classification made with vertical and horizontal decision boundaries. Also note that in the 2lconditions (multi-v) and (multi-h) are effectively single linear boundary models (see Figure 4) and differ from (single-v) and (single-h) only slightly due to the training method used. 6 5 Humans do not Blindly Follow the Highlighting Do humans really learn using manifolds? Could they have adopted a “follow-the-highlighting” procedure to label the manifolds 100% correctly: in the beginning, click on a labeled card x to highlight its neighboring unlabeled cards; pick one such neighbor x′ and classify it with the label of x; now click on (the now labeled) x′ to find one of its unlabeled neighbors x′′, and repeat? Because our graph has disconnected components with consistently labeled seeds, this procedure will succeed. The procedure is known as propagating-1NN in semi-supervised learning (Algorithm 2.7, [11]). In this section we present three arguments that humans are not blindly following the highlighting. First, participants in 2lmoonsUh did not learn the manifold while those in 4lmoonsUh did, even though the two conditions have the same ǫNN highlighting. Second, a necessary condition for follow-the-highlighting is to always classify an unlabeled x′ according to a labeled highlighted neighbor x. Conversely, if a participant classifies x′ as class y′, while all neighbors of x′ are either still unlabeled or have labels other than y′, she could not have been using follow-the-highlighting on x′. We say she has taken a leap-of-faith on x′. The 4lmoonsUh participants had an average of 17 leaps-of-faith among about 78 classifications3, while strict follow-the-highlighting procedure would yield zero leaps-of-faith. Third, the basic challenge of follow-the-highlighting is that the underlying manifold structure of the stimuli may have been irrelevant. Would participants have shown the same behavior, following the highlighting, regardless of the actual stimuli? We therefore designed the following experiment. Take the 4lmoonsUh graph which has 4 labeled nodes, 78 unlabeled nodes, and an adjacency matrix (i.e., edges) defined by ǫNN, as shown in Figure 3. Take a random permutation π = (π1, . . . , π78). Map the feature vector of the ith unlabeled point to xπi, while keeping the adjacency matrix the same. This creates the random-looking graph in Figure 6(a) which we call 4lmoonsUhR condition (the suffix R stands for random), which is equivalent to the 4lmoonsUh graph in structure. In particular, there are two connected components with consistent labeled seeds. However, now the highlighted neighbors may look very different than the clicked card. If we assume humans blindly follow the highlighting (perhaps noisily), then we predict that they are more likely to classify those unlabeled points nearer (in shortest path length on the graph, not Euclidean distance) a labeled point with the latter’s label; and that this correlation should be the same under 4lmoonsUhR and 4lmoonsUh. This prediction turns out to be false. 30 additional undergraduates participated in the new 4lmoonsUhR condition. Figure 6(b) shows the above behavioral evaluation, which does not exhibit the predicted correlation, and is clearly different from the same evaluation for 4lmoonsUh in Figure 6(c). Again, this is evidence that humans are not just following the highlighting. In fact, human behavior in 4lmoonsUhR is similar to 4lmoonsU. That is, having random highlighting is similar to having no highlighting in how it affects human categorization. This can be seen from the last rows of Tables 1 and 2, and Figure 6(d)4. 6 Discussion We have presented a set of experiments exploring human manifold learning behaviors. Our results suggest that people can perform manifold learning, but only when there is no alternative, simpler explanation of the data, and people need strong hints about the graph structure. We propose that Bayesian model selection is one possible way to explain these human behaviors. Recall we defined seven Gaussian Processes, each with a different kernel. For a given GP with kernel k, the evidence p(y1:l | x1:l, k) is the marginal likelihood on labeled data, integrating out the hidden discriminant function sampled from the GP. With multiple candidate GP models, one may perform model selection by selecting the one with the largest marginal likelihood. From the absence of manifold learning in conditions without highlighting or with random highlighting, we speculate that the GP with the graph-based kernel ˜k (1) is special: it is accessible in a participant’s repertoire 3The individual number of leaps-of-faith are 0, 1, 2, 4, 10, 13, 13, 14, 14, 15, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 33, 36, and 36 respectively, for the 23 participants. 4In addition, if we create a GP from the Laplacian of the random highlighting graph, the GP accuracy in predicting 4lmoonsUhR human majority vote is 0.46, and the percentage of participants in 4lmoonsUhR who can be attributed to this model is 0. 7 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 shortest path length empirical accuracy 0 2 4 6 8 10 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 shortest path length empirical accuracy 0 0.5 1 0 0.5 1 (a) (b) (c) (d) Figure 6: The 4lmoonsUhR experiment with 30 participants. (a) The 4lmoonsUhR condition. (b) The behavioral evaluation for 4lmoonsUhR, where the x-axis is the shortest path length of an unlabeled point to a labeled point, and the y-axis is the fraction of participants who classified that unlabeled point consistent with the nearest labeled point. (c) The same behavioral evaluation for 4lmoonsUh. (d) The majority vote in 4lmoonsUhR. only when strong hints (highlighting) exists and agrees with the underlying unlabeled data manifold structure. Under this assumption, we can then explain the contrast between the lack of manifold learning in 2lmoonsUh, and the presence of manifold learning in 4lmoonsUh. On one hand, for the 2lmoonsUh condition, the evidence for the seven GP models on the two labeled points are: (graph) 0.249, (1NN,ℓ2) 0.250, (1NN,ℓ1) 0.250, (multi-v) 0.250, (multi-h) 0.250, (single-v) 0.249, (singleh) 0.249. The graph-based GP has slightly lower evidence than several other GPs, which may be due to our specific choice of kernel parameters in (1). In any case, there is no reason to prefer the GP with a graph kernel, and we do not expect humans to learn on manifold in 2lmoonsUh. On the other hand, for 4lmoonsUh, the evidence for the seven GP models on those four labeled points are: (graph) 0.0626, (1NN,ℓ2) 0.0591, (1NN,ℓ1) 0.0625, (multi-v) 0.0625, (multi-h) 0.0625, (single-v) 0.0341, (single-h) 0.0342. The graph-based GP has a small lead over other GPs. In particular, it is better than the evidence 1/16 for kernels that treat the four labeled points essentially independently. The graph-based GP obtains this lead by warping the space along the two manifolds so that the two positive (resp. negative) labeled points tend to co-vary. Thus, there is a reason to prefer the GP with a graph kernel, and we do expect humans to learn on manifold in 4lmoonsUh. We also explore the convex combination of the seven GPs as a richer model for human behavior: k(λ) = P7 i=1 λiki, where λi ≥0, P i λi = 1. This allows a weighted combination of kernels to be used, and is more powerful than selecting a single kernel. Again, we optimize the mixing weights λ by maximizing the evidence p(y1:l | x1:l, k(λ)). This is a constrained optimization problem, and can be easily solved up to local optimum (because evidence is in general non-convex) with a projected gradient method, given the gradient of the log evidence. For the 2lmoonsUh condition, in 100 trials with random starting λ values, the maximum evidence always converges to 1/4, while the optimum λ is not unique and occupies a subspace (0, λ2, λ3, λ4, λ5, 0, 0) with λ2+λ3+λ4+λ5 = 1 and mean (0, 0.27, 0.25, 0.22, 0.26, 0, 0). Note the weight for the graph-based kernel λ1 is zero. In contrast, for the 4lmoonsUh condition, in 100 trials λ overwhelmingly converges to (1, 0, 0, 0, 0, 0, 0) with evidence 0.0626. i.e., it again suggests that people would perform manifold learning in 4lmoonsUh. Of course, this Bayesian model selection analysis is over-simplified. For instance, we did not consider people’s prior p(λ) on GP models, i.e., which model they would prefer before seeing the data. It is possible that humans favor models which produce axis-parallel decision boundaries. Defining and incorporating non-uniform p(λ) priors is a topic for future research. Acknowledgments We thank Rob Nowak and the anonymous reviewers for their valuable comments that motivated us to conduct the new experiments discussed in Section 5 after initial review. This work is supported in part by NSF IIS-0916038, NSF IIS-0953219, NSF DRM/DLS-0745423, and AFOSR FA9550-09-1-0313. References [1] Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of Machine Learning Research, 7:2399–2434, November 2006. [2] Olivier Chapelle, Bernhard Sch¨olkopf, and Alexander Zien, editors. Semi-supervised learning. MIT Press, 2006. 8 [3] R. M. Nosofsky. Attention, similarity, and the identification-categorization relationship. Journal of Experimental Psychology: General, 115(1):39–57, 1986. [4] Carl E. Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [5] Carl E. Rasmussen and Christopher K. I. Williams. GPML matlab code, 2007. http://www.gaussianprocess.org/gpml/code/matlab/doc/, accessed May, 2010. [6] Vikas Sindhwani, Partha Niyogi, and Mikhail Belkin. Beyond the point cloud: from transductive to semi-supervised learning. In ICML05, 22nd International Conference on Machine Learning, 2005. [7] Katleen Vandist, Maarten De Schryver, and Yves Rosseel. Semisupervised category learning: The impact of feedback in learning the information-integration task. Attention, Perception, & Psychophysics, 71(2):328–341, 2009. [8] Guy Wallis and Heinrich H. B¨ulthoff. Effects of temporal association on recognition memory. Proceedings of the National Academy of Sciences, 98(8):4800–4804, 2001. [9] Dengyong Zhou, Olivier Bousquet, Thomas Lal, Jason Weston, and Bernhard Sch¨lkopf. Learning with local and global consistency. In Advances in Neural Information Processing System 16, 2004. [10] Xiaojin Zhu, Zoubin Ghahramani, and John Lafferty. Semi-supervised learning using Gaussian fields and harmonic functions. In The 20th International Conference on Machine Learning (ICML), 2003. [11] Xiaojin Zhu and Andrew B. Goldberg. Introduction to Semi-Supervised Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, San Rafael, CA, 2009. 9
2010
188
3,952
Sphere Embedding: An Application to Part-of-Speech Induction Yariv Maron Michael Lamar Gonda Brain Research Center Department of Mathematics and Computer Science Bar-Ilan University Saint Louis University Ramat-Gan 52900, Israel St. Louis, MO 63103, USA syarivm@yahoo.com mlamar@slu.edu Elie Bienenstock Division of Applied Mathematics And Department of Neuroscience Brown University Providence, RI 02912, USA elie@brown.edu Abstract Motivated by an application to unsupervised part-of-speech tagging, we present an algorithm for the Euclidean embedding of large sets of categorical data based on co-occurrence statistics. We use the CODE model of Globerson et al. but constrain the embedding to lie on a highdimensional unit sphere. This constraint allows for efficient optimization, even in the case of large datasets and high embedding dimensionality. Using k-means clustering of the embedded data, our approach efficiently produces state-of-the-art results. We analyze the reasons why the sphere constraint is beneficial in this application, and conjecture that these reasons might apply quite generally to other large-scale tasks. 1 Introduction The embedding of objects in a low-dimensional Euclidean space is a form of dimensionality reduction that has been used in the past mostly to create 2D representations of data for the purpose of visualization and exploratory data analysis [10, 13]. Most methods work on objects of a single type, endowed with a measure of similarity. Other methods, such as [3], embed objects of heterogeneous types, based on their co-occurrence statistics. In this paper we demonstrate that the latter can be successfully applied to unsupervised part-of-speech (POS) induction, an extensively studied, challenging, problem in natural language processing [1, 4, 5, 6, 7]. The problem we address is distributional POS tagging, in which words are to be tagged based on the statistics of their immediate left and right context in a corpus (ignoring morphology and other features). The induction task is fully unsupervised, i.e., it uses no annotations. This task has been addressed in the past using a variety of methods. Some approaches, such as [1], combine a Markovian assumption with clustering. Many recent works use HMMs, perhaps due to their excellent performance on the supervised version of the task [7, 2, 5]. Using a latent-descriptor clustering approach, [15] obtain the best results to date for distributional-only unsupervised POS tagging of the widely-used WSJ corpus. Using a heterogeneous-data embedding approach for this task, we define separate embedding functions for the objects "left word" and "right word" based on their co-occurrence statistics, i.e., based on bigram frequencies. We are interested in modeling the statistical interactions between left words and right words, as relevant to POS tagging, rather than their joint distribution. Indeed, modeling the joint distribution directly results in models that do not handle rare words well. We use the CODE (Co-Occurrence Data Embedding) model of [3], where statistical interaction is modeled as the negative exponential of the Euclidean distance between the embedded points. This embedding model incorporates the marginal probabilities, or unigram frequencies, in a way that results in appropriate handling of both frequent and rare words. The size of the dataset (number of points to embed) and the embedding dimensionality are several-fold larger than in the applications studied in [3], making the optimization methods used by these authors impractical. Instead, we use a simple and intuitive stochastic-gradient procedure. Importantly, in order to handle both the large dataset and the relatively high dimensionality of the embedding needed for this application, we constrain the embedding to lie on the unit sphere. We therefore refer to this method as Spherical CODE, or S-CODE. The spherical constraint causes the regularization term—the partition function—to be nearly constant and also makes the stochastic gradient ascent smoother; this allows a several-fold computational improvement, and yields excellent performance. After convergence of the embedding model, we use a k-means algorithm to cluster all the words of the corpus, based on their embeddings. The induced POS labels are evaluated using the standard setting for this task, yielding state-of-the-art tagging performance. 2 Methods 2.1 Model We represent a bigram, i.e., an ordered pair of adjacent words in the corpus, as joint random variables (X,Y), each taking values in W, the set of word types occurring in the corpus. Since X and Y, the first and second words in a bigram, play different roles, we build a heterogeneous model, i.e., use two embedding functions, and . Both map W into S, the unit sphere in the r-dimensional Euclidean space. We use for the word-type frequencies: is the number of word tokens of type x divided by the total number of tokens in the corpus. We refer to as the empirical marginal distribution, or unigram frequency. We use for the empirical joint distribution of X and Y, i.e., the distribution of bigrams (X,Y). Because our ultimate goal is the clustering of word types for POS tagging, we want the embedding to be insensitive to the marginals: two word types with similar context distributions should be mapped to neighboring points in S even if their unigram frequencies are very different. We therefore use the marginal-marginal model of [3], defined by: (1) (2) (3) The log-likelihood, , of the corpus of bigrams is the expected value, under the empirical bigram distribution, of the log of the model bigram probability: (4) The model is parameterized by 2×|W| points on the unit sphere S in r dimensions: and . These points are initialized randomly, i.e., independently and uniformly on S. To maximize the likelihood, we use a gradient-ascent approach. The gradient of the log likelihood is as follows (observe that the last term in (4) does not depend on the model, hence does not contribute to the gradient): (5) (6) For sufficiently large problems such as POS tagging of a large corpus, computing the partition function, Z, after each gradient step or even once every fixed number of steps can be impractical. Instead, it turns out (see Discussion) that, thanks to the sphere constraint, we can approximate this dynamic variable, Z, using a constant, , which arises from a coarse approximation in which all pairs of embedded variables are distributed uniformly and independently on the sphere. Thus, we set with and i.i.d. uniformly on S, and get our estimate as the expected value of the resulting random variable, : . (7) Numerical evaluation of (7) yields for the 25-dimensional sphere. An even coarser approximation can be obtained by noting that, for large r, the random variable is fairly peaked around 2 (the random variable is close to a Student's t with r degrees of freedom, compressed by a factor of ). This yields the estimate . For the present application, we find that performance does not suffer from using a constant rather than recomputing Z often during gradient-ascent. It is also fairly robust to the choice of . We observe only minor changes in performance for ranging over [0.1, 0.5]. We use sampling to compute a stochastic approximation of the gradient. To implement the first sum in (5) and (6) − representing an attraction force between the embeddings of the words in a bigram − we sample bigrams from the empirical joint . Given a sample , only the and parameter vectors are updated. The partial updates that emerge from these two sums are: (8) , (9) where is the step size. In order to speed up the convergence process, we use a learning rate that decreases as word types are repeatedly observed. If is the number of times word type w has been previously encountered, we use: . (10) The model is very robust to the choice of the function (C), as long as it decreases smoothly. This modified learning rate also reduces the variability of the tagging accuracy, while slightly increasing its mean. The second sum in (5) and in (6) − representing a repulsion force − involves not the empirical joint but the product of the empirical marginals. Thus, the complete update is: (11) , (12) where is sampled from the joint , and x2 and y2 are sampled from the marginal independently from each other and independently from x1 and y1. After each step, the updated vectors are projected back onto the sphere S. After convergence, for any word w, we have two embedded vectors, and . These vectors are concatenated to form a single geometric description of word type w. The collection of all these vectors is then clustered using a weighted k-means clustering algorithm: in each iteration, a cluster’s centroid is updated as the weighted mean of its currently assigned constituent vectors, with the weight of the vector for word w equal to . The number of clusters chosen depends on whether evaluation is to be done against the PTB45 or the PTB17 tagset (see below, Section 2.2).1 2.2 Evaluation and data The resulting assignment of cluster labels to word types is used to label the corpus. The standard practice for evaluating the performance of the induced labels is to either map them to the gold-standard tags, or to use an information-theoretic measure. We use the three evaluation criteria that are most common in the recent literature. The first criterion maps each cluster to the POS tag that it best matches according to the hand-annotated labels. The match is determined by finding the tag that is most frequently assigned to any token of any word type in the cluster. Because the criterion is free to assign several clusters to the same POS tag, this evaluation technique is called many-to-one mapping, or MTO. Once the map is constructed, the accuracy score is obtained as the fraction of all tokens whose inferred tag under the map matches the hand-annotated tag. The second criterion, 1-to-1 mapping, is similar to the first, but the mapping is restricted from assigning multiple clusters to a single tag; hence it is called one-to-one mapping, or 1to-1. Most authors construct the 1-to-1 mapping greedily, assigning maximal-score label-totag matches first; some authors, e.g. [15], use the optimal map. Once the map is constructed, the accuracy is computed just as in MTO. The third criterion, variation of information, or VI, is a map-free information-theoretic metric [9, 2]. We note that we and other authors found the most reliable criterion for comparing unsupervised POS taggers to be MTO. However, we include all three criteria for completeness. We use the Wall Street Journal part of the Penn Treebank [8] (1,173,766 tokens). We ignore capitalization, leaving 43,766 word types, to compare performance with other models consistently. Evaluation is done against the full tag set (PTB45), and against a coarse tag set (PTB17) [12]. For PTB45 evaluation, we use either 45 or 50 clusters, in order for our results to be comparable to all recent works. For PTB17 evaluation, we use 17 clusters, as do all other authors. 3 Results Figure 1 shows the model performance when evaluated with several measures. MTO17 and MTO50 refer to the number of tokens tagged correctly under the many-to-1 mapping for the PTB45 and PTB17 tagsets respectively. The type-accuracy curves use the same mapping 1 Source code is available at the author’s website: faculty.biu.ac.il/~marony. and tagsets, but record the fraction of word types whose inferred tag matches their "modal" annotated tag, i.e., the annotated tag co-occurring most frequently with this word type. We also show the scaled log likelihood, to illustrate its convergence. These results were produced using a constant, pre-computed, . Using this constant value allows the model to run in a matter of minutes rather than the hours or days required by HMMs and MRFs. Figure 2 shows the model performance for different dimensionalities r. As r increases, so does the performance. Unlike previous applications of CODE [3] (which often emphasize Figure 2: Comparison of models with different dimensionalities: r = 2, 5, 10, 25. MTO17 is the Many-to-1 score based on 17 induced labels mapped to PTB17 tags. 0 10 20 30 40 50 60 0.5 0.55 0.6 0.65 0.7 0.75 bigram updates (times 100,000) MTO17,r=25 MTO17,r=10 MTO17,r=5 MTO17,r=2 Figure 1: Scores against number of iterations (bigram updates). Scores are averaged over 10 sessions, and shown with 1-std error bars. MTO17 is the Many-to-1 tagging accuracy score based on 17 induced labels mapped to 17 tags. MTO50 is the Many-to-1 score based on 50 induced labels mapped to 45 tags. Type Accuracy 17 (50) is the average accuracy per word type, where the gold-standard tag of a word type is the modal annotated tag of that type (see text). All runs used = 0.154, r=25. 0 20 40 60 80 100 120 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 bigram updates (times 100,000) log-likelihood MTO17 MTO50 Type Accuracy 17 Type Accuracy 50 visualization of data and thus require a low dimension), this unsupervised POS-tagging application benefits from high values of r. Larger values of r cause both the tagging accuracy to improve and the variability during convergence to decrease. Table 1 compares our model, S-CODE, to previous state-of-the-art approaches. Under the Many-to-1 criterion, which we find to be the most appropriate of the three for the evaluation of unsupervised POS taggers, S-CODE is superior to HMM results, and scores comparably to [15], the highest-performing model to date on this task. We find that the model is very robust to the choice of within the range 0.1 to 0.5. This robustness lends promise for the usefulness of this method for other applications in which the partition function is impractical to compute. This point is discussed further in the next section. 4 Discussion The problem of embedding heterogeneous categorical data (X,Y) based on their cooccurrence statistics may be formulated as the task of finding a pair of maps and such that, for any pair (x,y), the distance between the images of x and y reflects the statistical interaction between them. Such embeddings have been used mostly for the purpose of visualization and exploratory data analysis. Here we demonstrate that embedding can be successfully applied to a well-studied computational-linguistics task, achieving state-of-theart performance. 4.1 S-CODE v. CODE The approach proposed here, S-CODE, is a variant of the CODE model of [3]. In the task at hand, the sets X and Y to be embedded are large (43K), making most conventional Many-to-1 1-to-1 VI Model PTB17 PTB45 -45 PTB45 -50 PTB17 PTB45 -45 PTB45 -50 PTB17 PTB45 -45 PTB45 -50 S-CODE (Z=0.1456) 73.8 (0.5) 68.8 (0.16) 70.4 (0.5) 52.2 50.0 50.0 2.93 3.46 3.46 S-CODE (Z=0.3) 74.5 (0.2) 68.6 (0.16) 71.5 (0.6) 54.9 48.7 48.8 2.80 3.38 3.39 LDC 75.1 (0.04) 68.1 (0.2) 71.2 (0.06) 59.3 48.3 Brown 67.8 70.5 50.1 51.3 3.47 3.45 HMM-EM 64.7 62.1 43.1 40.5 3.86 4.48 HMM-VB 63.7 60.5 51.4 46.1 3.44 4.28 HMM-GS 67.4 66.0 44.6 49.9 3.46 4.04 HMMSparse(32) 70.2 65.4 49.5 44.5 VEM (10-1,10-1) 68.2 54.6 52.8 46.0 Table 1: Comparison to other models, under three different evaluation measures. S-CODE uses r = 25 dimensions. It was run 10 times, each with 12·106 update steps. LDC is from [15]; Brown shows the best results from [14] and website mentioned therein; HMM-EM, HMM-VB and HMM-GS show the best results from [2]; HMM-Sparse(32) and VEM show the best results from [5]. The numbers in parentheses are standard deviations. For the VI criterion, lower values are better. PTB45-45 maps 45 induced labels to 45 tags, while PTB45-50 maps 50 induced labels to 45 tags. embedding approaches, including CODE (as implemented in [3]), impractical. As explained below, S-CODE overcomes the large-dataset challenge by constraining the maps to lie on the unit sphere. It uses stochastic gradient ascent to maximize the likelihood of the model. The gradient of the log-likelihood w.r.t. a given includes two components, each with a simple intuitive meaning. The first component embodies an attraction force, pulling toward in proportion to the empirical joint . The second component, the gradient of the regularization term, , embodies a repulsion force; it keeps the solution away from the trivial state where all x's and y's are mapped to the same point, and more generally attempts to keep Z small. The repulsion force pushes away from in proportion to the product of the empirical marginals and , and is scaled by . The computational complexity of Z, the partition function, is . In the application studied here, the use of the spherical constraint of S-CODE has two important consequences. First, it makes the computation of Z unnecessary. Indeed, when using the spherical constraint, we observed that Z, when actually computed and updated every 106 steps, does not deviate much from its initial value. For example, for r = 25, Z rises smoothly from 0.145 to 0.182. Note that the absolute minimum of Z—obtained for a that maps all of W to a single point on S and a that maps all of W to the opposite point—is ; the absolute maximum of Z, obtained for and that map all of W to the same point, is 1. We also observed that replacing Z, in the update algorithm, by any constant in the range [.1 .5] does not dramatically alter the behavior of the model. We nevertheless note that larger values of tend to yield a slightly higher performance of the POS tagger built from the model. Note that the only effect of changing in the stochastic gradient algorithm is to change the relative strength of the attraction and repulsion terms. We compared the performance of S-CODE with CODE. The original CODE implementation [3] could not support the size of our data set. To overcome this limitation, we used the stochastic-gradient method described above, but without projecting to the sphere. This required us to compute the partition function, which is highly computationally intensive. We therefore computed the partition function only once every q update steps (where one update step is the sampling of one bigram). We found that for q = 105 the partition function and likelihood changed smoothly enough and converged, and the embeddings yielded tagging performances that did not differ significantly from those obtained with S-CODE. The second important consequence of imposing the spherical constraint is that it makes the stochastic gradient-ascent procedure markedly smoother. As a result, a relatively large step size can be used, achieving convergence and excellent tagging performance in about 10 minutes of computation time on a desktop machine. CODE requires a smaller step size as well as the recomputation of the partition function, and, as a result, computation time in this application was 6 times longer than with S-CODE. When gauging the applicability of S-CODE to different large-scale embedding problems, one should try to gain some understanding of why the spherical constraint stabilizes the partition function, and whether Z will stabilize around the same value for other problems. The answer to the first question appears to be that the regularization term is not so strong as to prevent clusters from forming—this is demonstrated by the excellent performance of the model when used for POS tagging—yet it is strong enough to enforce a fairly uniform distribution of these clusters on the sphere—resulting in a fairly stable value of Z. One may reasonably conjecture that this behavior will generalize to other problems. To answer the second question, we note that the order of magnitude of Z is essentially set by the coarsest of the two estimates derived in Section 2, namely 0.135, and that this estimate is problem-independent. As a result, S-CODE is, in principle, applicable to datasets of much larger size than the present problem. The computational complexity of the algorithm is O(Nr), and the memory requirement is O(|W|r) where N is the number of word tokens, and |W| is the number of word types. In contrast, and as mentioned above, CODE, even in our stochastic-gradient version, is considerably more computationally intensive; it would clearly be completely impractical for much larger datasets. 4.2 Comparison to other POS induction models Even though embedding models have been studied extensively, they are not widely used for POS tagging (see however [18]). For the unsupervised POS tagging task, HMMs have until recently dominated the field. Here we show that an embedding model substantially outperforms HMMs, and achieves the same level of performance as the best distributionalonly model to date [15]. Models that use features, e.g. morphological, achieve higher tagging precision [11, 14]. Incorporating features into S-CODE can easily be done, either directly or in a two-step approach as in [14]; this is left for future work. One of the widely-acknowledged challenges in applying HMMs to the unsupervised POS tagging problem is that these models do not afford a convenient vehicle to modeling an important sparseness property of natural languages, namely the fact that any given word type admits of only a small number of POS tags—often only one (see in particular [7, 2, 4]). In contrast, the approach presented here maps each word type to a single point in . Hence, it assigns a single tag to each word type, like a number of other recent approaches [15, 16, 17]. These approaches are incapable of disambiguating, i.e., of assigning different tags to the same word depending on context, as in "I long to see a long movie." HMMs are, in principle, capable of doing so, but at the cost of over-parameterization. In view of the superior performance of S-CODE and of other type-level approaches, it appears that underparameterization might be the better choice for this task. Another difference between our model and HMMs previously applied to this problem is that our model is symmetric, thereby modeling right and left context distributions. In contrast, HMMs are asymmetric in that they typically model a left-to-right transition and would find a different solution if a right-to-left transition were modeled. We argue that using both distributions in a symmetric way better captures the important linguistic information. In the past, left and right distributions were extracted by factoring the bigram matrix and using the left and right eigenvectors. Such a linear method does not handle rare words well. Instead, we choose to learn the ratio . This approach allows words with similar contexts but different unigram frequencies to be embedded near each other. Like HMMs, CODE provides a model of the distribution of the data at hand. S-CODE departs slightly from this framework. Since it does not use the exact partition function in the stochastic gradient ascent procedure—and was actually found to perform best when replacing Z, in the update rule, by a constant that is substantially larger than the true value of Z—it only approximately converges to a local maximum of a likelihood function. In future work, and as a more radical deviation from the CODE model, one may then give up altogether modeling the distribution of X and Y, instead relying on a heuristically motivated objective function of sphere-constrained embeddings and , to be maximized. Preliminary studies using a number of alternative functional forms for the regularization term yielded promising results. Although S-CODE and LDC [15] achieve essentially the same level of performance on taggings that induce 17, 45, or 50 labels (Table 1), S-CODE proves superior for the induction of very fine-grained taggings. Thus, we compared the performances of S-CODE and LDC on the task of inducing 300 labels. Under the MTO criterion, LDC achieved 80.9% (PTB45) and 87.9% (PTB17). S-CODE significantly outperformed it, with 83.5% (PTB45) and 89.8% (PTB17). The appeal of S-CODE lies not only in its strong performance on the unsupervised POS tagging problem, but also in its simplicity, its robustness, and its mathematical grounding. The mathematics underlying CODE, as developed in [3], are intuitive and relatively simple. Modeling the joint probability of word type co-occurrence through distances between Euclidean embeddings, without relying on discrete categories or states, is a novel and promising approach for POS tagging. The spherical constraint introduced here permits the approximation of the partition function by a constant, which is the key to the efficiency of the algorithm for large datasets. The stochastic-gradient procedure produces two competing forces with intuitive meaning, familiar from the literature on learning in generative models. While the accuracy and computational efficiency of S-CODE is matched by the recent LDC algorithm [15], S-CODE is more robust, showing very little change in performance over a wide range of implementation choices. We expect that this improved robustness will allow S-CODE to be easily and successfully applied to other large-scale tasks, both linguistic and non-linguistic. References [1] Alexander Clark. 2003. Combining distributional and morphological information for part of speech induction. In 10th Conference of the European Chapter of the Association for Computational Linguistics, pages 59–66. [2] Jianfeng Gao and Mark Johnson. 2008. A comparison of bayesian estimators for unsupervised Hidden Markov Model POS taggers. In Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing, pages 344–352. [3] Amir Globerson, Gal Chechik, Fernando Pereira, and Naftali Tishby. 2007. Euclidean embedding of cooccurrence data. Journal of Machine Learning Research, 8:2265–2295. [4] Sharon Goldwater and Tom Griffiths. 2007. A fully Bayesian approach to unsupervised part-of-speech tagging. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pages 744–751. [5] João V. Graça, Kuzman Ganchev, Ben Taskar, and Fernando Pereira. 2009. Posterior vs. Parameter Sparsity in Latent Variable Models. In Neural Information Processing Systems Conference (NIPS). [6] Aria Haghighi and Dan Klein. 2006. Prototype-driven learning for sequence models. In Proceedings of the Human Language Technology Conference of the NAACL, Main Conference, pages 320–327. [7] Mark Johnson. 2007. Why doesn’t EM find good HMM POS-taggers? In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pages 296–305. [8] M.P. Marcus, M.A. Marcinkiewicz, and B. Santorini. 1993. Building a large annotated corpus of English: The Penn Treebank. Computational linguistics, 19(2):313–330. [9] Marina Meilă. 2003. Comparing clusterings by the variation of information. In Bernhard Schölkopf and Manfred K. Warmuth, editors, COLT 2003: The Sixteenth Annual Conference on Learning Theory, volume 2777 of Lecture Notes in Computer Science, pages 173–187. Springer. [10] Sam T. Roweis and Lawrence K. Saul. 2000. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326. [11] Taylor Berg-Kirkpatrick, Alexandre Bouchard-Côté, John DeNero, and Dan Klein. 2010. Painless Unsupervised Learning with Features. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 582-590. [12] Noah A. Smith and Jason Eisner. 2005. Contrastive estimation: Training log-linear models on unlabeled data. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL’05), pages 354–362. [13] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford. 2000. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319–2323. [14] Christos Christodoulopoulos, Sharon Goldwater and Mark Steedman. 2010. Two Decades of Unsupervised POS induction: How far have we come? In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing (EMNLP 2010), pages 575–584. [15] Michael Lamar, Yariv Maron and Elie Bienenstock. 2010. Latent-Descriptor Clustering for Unsupervised POS Induction. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pages 799–809. [16] Yoong Keok Lee, Aria Haghighi, and Regina Barzilay. 2010. Simple Type-Level Unsupervised POS Tagging. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pages 853-861. [17] Michael Lamar, Yariv Maron, Mark Johnson, Elie Bienenstock. 2010. SVD and clustering for unsupervised POS tagging. In Proceedings of the ACL 2010 Conference Short Papers, pages 215-219. [18] Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the Twenty-fifth International Conference on Machine Learning (ICML 2008), pages 160–167.
2010
189
3,953
Double Q-learning Hado van Hasselt Multi-agent and Adaptive Computation Group Centrum Wiskunde & Informatica Abstract In some stochastic environments the well-known reinforcement learning algorithm Q-learning performs very poorly. This poor performance is caused by large overestimations of action values. These overestimations result from a positive bias that is introduced because Q-learning uses the maximum action value as an approximation for the maximum expected action value. We introduce an alternative way to approximate the maximum expected value for any set of random variables. The obtained double estimator method is shown to sometimes underestimate rather than overestimate the maximum expected value. We apply the double estimator to Q-learning to construct Double Q-learning, a new off-policy reinforcement learning algorithm. We show the new algorithm converges to the optimal policy and that it performs well in some settings in which Q-learning performs poorly due to its overestimation. 1 Introduction Q-learning is a popular reinforcement learning algorithm that was proposed by Watkins [1] and can be used to optimally solve Markov Decision Processes (MDPs) [2]. We show that Q-learning’s performance can be poor in stochastic MDPs because of large overestimations of the action values. We discuss why this occurs and propose an algorithm called Double Q-learning to avoid this overestimation. The update of Q-learning is Qt+1(st, at) = Qt(st, at) + αt(st, at)  rt + γ max a Qt(st+1, a) −Qt(st, at)  . (1) In this equation, Qt(s, a) gives the value of the action a in state s at time t. The reward rt is drawn from a fixed reward distribution R : S×A×S →R, where E{rt|(s, a, s′) = (st, at, st+1)} = Rs′ sa. The next state st+1 is determined by a fixed state transition distribution P : S × A × S →[0, 1], where P s′ sa gives the probability of ending up in state s′ after performing a in s, and P s′ P s′ sa = 1. The learning rate αt(s, a) ∈[0, 1] ensures that the update averages over possible randomness in the rewards and transitions in order to converge in the limit to the optimal action value function. This optimal value function is the solution to the following set of equations [3]: ∀s, a : Q∗(s, a) = X s′ P s′ sa  Rs′ sa + γ max a Q∗(s′, a)  . (2) The discount factor γ ∈[0, 1) has two interpretations. First, it can be seen as a property of the problem that is to be solved, weighing immediate rewards more heavily than later rewards. Second, in non-episodic tasks, the discount factor makes sure that every action value is finite and therefore welldefined. It has been proven that Q-learning reaches the optimal value function Q∗with probability one in the limit under some mild conditions on the learning rates and exploration policy [4–6]. Q-learning has been used to find solutions on many problems [7–9] and was an inspiration to similar algorithms, such as Delayed Q-learning [10], Phased Q-learning [11] and Fitted Q-iteration [12], to name some. These variations have mostly been proposed in order to speed up convergence rates 1 compared to the original algorithm. The convergence rate of Q-learning can be exponential in the number of experiences [13], although this is dependent on the learning rates and with a proper choice of learning rates convergence in polynomial time can be obtained [14]. The variants named above can also claim polynomial time convergence. Contributions An important aspect of the Q-learning algorithm has been overlooked in previous work: the use of the max operator to determine the value of the next state can cause large overestimations of the action values. We show that Q-learning can suffer a large performance penalty because of a positive bias that results from using the maximum value as approximation for the maximum expected value. We propose an alternative double estimator method to find an estimate for the maximum value of a set of stochastic values and we show that this sometimes underestimates rather than overestimates the maximum expected value. We use this to construct the new Double Q-learning algorithm. The paper is organized as follows. In the second section, we analyze two methods to approximate the maximum expected value of a set of random variables. In Section 3 we present the Double Q-learning algorithm that extends our analysis in Section 2 and avoids overestimations. The new algorithm is proven to converge to the optimal solution in the limit. In Section 4 we show the results on some experiments to compare these algorithms. Some general discussion is presented in Section 5 and Section 6 concludes the paper with some pointers to future work. 2 Estimating the Maximum Expected Value In this section, we analyze two methods to find an approximation for the maximum expected value of a set of random variables. The single estimator method uses the maximum of a set of estimators as an approximation. This approach to approximate the value of the maximum expected value is positively biased, as discussed in previous work in economics [15] and decision making [16]. It is a bias related to the Winner’s Curse in auctions [17, 18] and it can be shown to follow from Jensen’s inequality [19]. The double estimator method uses two estimates for each variable and uncouples the selection of an estimator and its value. We are unaware of previous work that discusses it. We analyze this method and show that it can have a negative bias. Consider a set of M random variables X = {X1, . . . , XM}. In many problems, one is interested in the maximum expected value of the variables in such a set: max i E{Xi} . (3) Without knowledge of the functional form and parameters of the underlying distributions of the variables in X, it is impossible to determine (3) exactly. Most often, this value is approximated by constructing approximations for E{Xi} for all i. Let S = SM i=1 Si denote a set of samples, where Si is the subset containing samples for the variable Xi. We assume that the samples in Si are independent and identically distributed (iid). Unbiased estimates for the expected values can be obtained by computing the sample average for each variable: E{Xi} = E{µi} ≈µi(S) def = 1 |Si| P s∈Si s, where µi is an estimator for variable Xi. This approximation is unbiased since every sample s ∈Si is an unbiased estimate for the value of E{Xi}. The error in the approximation thus consists solely of the variance in the estimator and decreases when we obtain more samples. We use the following notations: fi denotes the probability density function (PDF) of the ith variable Xi and Fi(x) = R x −∞fi(x) dx is the cumulative distribution function (CDF) of this PDF. Similarly, the PDF and CDF of the ith estimator are denoted f µ i and F µ i . The maximum expected value can be expressed in terms of the underlying PDFs as maxi E{Xi} = maxi R ∞ −∞x fi(x) dx . 2.1 The Single Estimator An obvious way to approximate the value in (3) is to use the value of the maximal estimator: max i E{Xi} = max i E{µi} ≈max i µi(S) . (4) Because we contrast this method later with a method that uses two estimators for each variable, we call this method the single estimator. Q-learning uses this method to approximate the value of the next state by maximizing over the estimated action values in that state. 2 The maximal estimator maxi µi is distributed according to some PDF f µ max that is dependent on the PDFs of the estimators f µ i . To determine this PDF, consider the CDF F µ max(x), which gives the probability that the maximum estimate is lower or equal to x. This probability is equal to the probability that all the estimates are lower or equal to x: F µ max(x) def = P(maxi µi ≤x) = QM i=1 P(µi ≤x) def = QM i=1 F µ i (x). The value maxi µi(S) is an unbiased estimate for E{maxj µj} = R ∞ −∞x f µ max(x) dx , which can thus be given by E{max j µj} = Z ∞ −∞ x d dx M Y i=1 F µ i (x) dx = M X j Z ∞ −∞ x f µ j (s) M Y i̸=j F µ i (x) dx . (5) However, in (3) the order of the max operator and the expectation operator is the other way around. This makes the maximal estimator maxi µi(S) a biased estimate for maxi E{Xi}. This result has been proven in previous work [16]. A generalization of this proof is included in the supplementary material accompanying this paper. 2.2 The Double Estimator The overestimation that results from the single estimator approach can have a large negative impact on algorithms that use this method, such as Q-learning. Therefore, we look at an alternative method to approximate maxi E{Xi}. We refer to this method as the double estimator, since it uses two sets of estimators: µA = {µA 1 , . . . , µA M} and µB = {µB 1 , . . . , µB M}. Both sets of estimators are updated with a subset of the samples we draw, such that S = SA∪SB and SA ∩SB = ∅and µA i (S) = 1 |SA i | P s∈SA i s and µB i (S) = 1 |SB i | P s∈SB i s. Like the single estimator µi, both µA i and µB i are unbiased if we assume that the samples are split in a proper manner, for instance randomly, over the two sets of estimators. Let MaxA(S) def =  j | µA j (S) = maxi µA i (S) be the set of maximal estimates in µA(S). Since µB is an independent, unbiased set of estimators, we have E{µB j } = E{Xj} for all j, including all j ∈MaxA. Let a∗be an estimator that maximizes µA: µA a∗(S) def = maxi µA i (S). If there are multiple estimators that maximize µA, we can for instance pick one at random. Then we can use µB a∗as an estimate for maxi E{µB i } and therefore also for maxi E{Xi} and we obtain the approximation max i E{Xi} = max i E{µB i } ≈µB a∗. (6) As we gain more samples the variance of the estimators decreases. In the limit, µA i (S) = µB i (S) = E{Xi} for all i and the approximation in (6) converges to the correct result. Assume that the underlying PDFs are continuous. The probability P(j = a∗) for any j is then equal to the probability that all i ̸= j give lower estimates. Thus µA j (S) = x is maximal for some value x with probability QM i̸=j P(µA i < x). Integrating out x gives P(j = a∗) = R ∞ −∞P(µA j = x) QM i̸=j P(µA i < x) dx def = R ∞ −∞f A j (x) QM i̸=j F A i (x) dx , where f A i and F A i are the PDF and CDF of µA i . The expected value of the approximation by the double estimator can thus be given by M X j P(j = a∗)E{µB j } = M X j E{µB j } Z ∞ −∞ f A j (x) M Y i̸=j F A i (x) dx . (7) For discrete PDFs the probability that two or more estimators are equal should be taken into account and the integrals should be replaced with sums. These changes are straightforward. Comparing (7) to (5), we see the difference is that the double estimator uses E{µB j } in place of x. The single estimator overestimates, because x is within integral and therefore correlates with the monotonically increasing product Q i̸=j F µ i (x). The double estimator underestimates because the probabilities P(j = a∗) sum to one and therefore the approximation is a weighted estimate of unbiased expected values, which must be lower or equal to the maximum expected value. In the following lemma, which holds in both the discrete and the continuous case, we prove in general that the estimate E{µB a∗} is not an unbiased estimate of maxi E{Xi}. 3 Lemma 1. Let X = {X1, . . . , XM} be a set of random variables and let µA = {µA 1 , . . ., µA M} and µB = {µB 1 , . . . , µB M} be two sets of unbiased estimators such that E{µA i } = E{µB i } = E{Xi}, for all i. Let M def = {j | E{Xj} = maxi E{Xi}} be the set of elements that maximize the expected values. Let a∗be an element that maximizes µA: µA a∗= maxi µA i . Then E{µB a∗} = E{Xa∗} ≤ maxi E{Xi}. Furthermore, the inequality is strict if and only if P(a∗/∈M) > 0. Proof. Assume a∗∈M. Then E{µB a∗} = E{Xa∗} def = maxi E{Xi}. Now assume a∗/∈M and choose j ∈M. Then E{µB a∗} = E{Xa∗} < E{Xj} def = maxi E{Xi}. These two possibilities are mutually exclusive, so the combined expectation can be expressed as E{µB a∗} = P(a∗∈M)E{µB a∗|a∗∈M} + P(a∗/∈M)E{µB a∗|a∗/∈M} = P(a∗∈M) max i E{Xi} + P(a∗/∈M)E{µB a∗|a∗/∈M} ≤P(a∗∈M) max i E{Xi} + P(a∗/∈M) max i E{Xi} = max i E{Xi} , where the inequality is strict if and only if P(a∗/∈M) > 0. This happens when the variables have different expected values, but their distributions overlap. In contrast with the single estimator, the double estimator is unbiased when the variables are iid, since then all expected values are equal and P(a∗∈M) = 1. 3 Double Q-learning We can interpret Q-learning as using the single estimator to estimate the value of the next state: maxa Qt(st+1, a) is an estimate for E{maxa Qt(st+1, a)}, which in turn approximates maxa E{Qt(st+1, a)}. The expectation should be understood as averaging over all possible runs of the same experiment and not—as it is often used in a reinforcement learning context—as the expectation over the next state, which we will encounter in the next subsection as E{·|Pt}. Therefore, maxa Qt(st+1, a) is an unbiased sample, drawn from an iid distribution with mean E{maxa Qt(st+1, a)}. In the next section we show empirically that because of this Q-learning can indeed suffer from large overestimations. In this section we present an algorithm to avoid these overestimation issues. The algorithm is called Double Q-learning and is shown in Algorithm 1. Double Q-learning stores two Q functions: QA and QB. Each Q function is updated with a value from the other Q function for the next state. The action a∗in line 6 is the maximal valued action in state s′, according to the value function QA. However, instead of using the value QA(s′, a∗) = maxa QA(s′, a) to update QA, as Q-learning would do, we use the value QB(s′, a∗). Since QB was updated on the same problem, but with a different set of experience samples, this can be considered an unbiased estimate for the value of this action. A similar update is used for QB, using b∗and QA. It is important that both Q functions learn from separate sets of experiences, but to select an action to perform one can use both value functions. Therefore, this algorithm is not less data-efficient than Q-learning. In our experiments, we calculated the average of the two Q values for each action and then performed ǫ-greedy exploration with the resulting average Q values. Double Q-learning is not a full solution to the problem of finding the maximum of the expected values of the actions. Similar to the double estimator in Section 2, action a∗may not be the action that maximizes the expected Q function maxa E{QA(s′, a)}. In general E{QB(s′, a∗)} ≤ maxa E{QA(s′, a∗)}, and underestimations of the action values can occur. 3.1 Convergence in the Limit In this subsection we show that in the limit Double Q-learning converges to the optimal policy. Intuitively, this is what one would expect: Q-learning is based on the single estimator and Double Q-learning is based on the double estimator and in Section 2 we argued that the estimates by the single and double estimator both converge to the same answer in the limit. However, this argument does not transfer immediately to bootstrapping action values, so we prove this result making use of the following lemma which was also used to prove convergence of Sarsa [20]. 4 Algorithm 1 Double Q-learning 1: Initialize QA,QB,s 2: repeat 3: Choose a, based on QA(s, ·) and QB(s, ·), observe r, s′ 4: Choose (e.g. random) either UPDATE(A) or UPDATE(B) 5: if UPDATE(A) then 6: Define a∗= arg maxa QA(s′, a) 7: QA(s, a) ←QA(s, a) + α(s, a) r + γQB(s′, a∗) −QA(s, a)  8: else if UPDATE(B) then 9: Define b∗= arg maxa QB(s′, a) 10: QB(s, a) ←QB(s, a) + α(s, a)(r + γQA(s′, b∗) −QB(s, a)) 11: end if 12: s ←s′ 13: until end Lemma 2. Consider a stochastic process (ζt, ∆t, Ft), t ≥0, where ζt, ∆t, Ft : X →R satisfy the equations: ∆t+1(xt) = (1 −ζt(xt))∆t(xt) + ζt(xt)Ft(xt) , (8) where xt ∈X and t = 0, 1, 2, . . .. Let Pt be a sequence of increasing σ-fields such that ζ0 and ∆0 are P0-measurable and ζt, ∆t and Ft−1 are Pt-measurable, t = 1, 2, . . . . Assume that the following hold: 1) The set X is finite. 2) ζt(xt) ∈[0, 1] , P t ζt(xt) = ∞, P t(ζt(xt))2 < ∞w.p.1 and ∀x ̸= xt : ζt(x) = 0. 3) ||E{Ft|Pt}|| ≤κ||∆t|| + ct, where κ ∈[0, 1) and ct converges to zero w.p. 1. 4) Var{Ft(xt)|Pt} ≤K(1 + κ||∆t||)2, where K is some constant. Here || · || denotes a maximum norm. Then ∆t converges to zero with probability one. We use this lemma to prove convergence of Double Q-learning under similar conditions as Qlearning. Our theorem is as follows: Theorem 1. Assume the conditions below are fulfilled. Then, in a given ergodic MDP, both QA and QB as updated by Double Q-learning as described in Algorithm 1 will converge to the optimal value function Q∗as given in the Bellman optimality equation (2) with probability one if an infinite number of experiences in the form of rewards and state transitions for each state action pair are given by a proper learning policy. The additional conditions are: 1) The MDP is finite, i.e. |S × A| < ∞. 2) γ ∈[0, 1). 3) The Q values are stored in a lookup table. 4) Both QA and QB receive an infinite number of updates. 5) αt(s, a) ∈[0, 1], P t αt(s, a) = ∞, P t(αt(s, a))2 < ∞w.p.1, and ∀(s, a) ̸= (st, at) : αt(s, a) = 0. 6) ∀s, a, s′ : Var{Rs′ sa} < ∞. A ‘proper’ learning policy ensures that each state action pair is visited an infinite number of times. For instance, in a communicating MDP proper policies include a random policy. Sketch of the proof. We sketch how to apply Lemma 2 to prove Theorem 1 without going into full technical detail. Because of the symmetry in the updates on the functions QA and QB it suffices to show convergence for either of these. We will apply Lemma 2 with Pt = {QA 0 , QB 0 , s0, a0, α0, r1, s1, . . ., st, at}, X = S × A, ∆t = QA t −Q∗, ζ = α and Ft(st, at) = rt + γQB t (st+1, a∗) − Q∗ t (st, at), where a∗= arg maxa QA(st+1, a). It is straightforward to show the first two conditions of the lemma hold. The fourth condition of the lemma holds as a consequence of the boundedness condition on the variance of the rewards in the theorem. This leaves to show that the third condition on the expected contraction of Ft holds. We can write Ft(st, at) = F Q t (st, at) + γ QB t (st+1, a∗) −QA t (st+1, a∗)  , where F Q t = rt + γQA t (st+1, a∗) −Q∗ t (st, at) is the value of Ft if normal Q-learning would be under consideration. It is well-known that E{F Q t |Pt} ≤γ||∆t||, so to apply the lemma we identify ct = γQB t (st+1, a∗) −γQA t (st+1, a∗) and it suffices to show that ∆BA t = QB t −QA t converges to zero. Depending on whether QB or QA is updated, the update of ∆BA t at time t is either ∆BA t+1(st, at) = ∆BA t (st, at) + αt(st, at)F B t (st, at) , or ∆BA t+1(st, at) = ∆BA t (st, at) −αt(st, at)F A t (st, at) , 5 where F A t (st, at) = rt + γQB t (st+1, a∗) −QA t (st, at) and F B t (st, at) = rt + γQA t (st+1, b∗) − QB t (st, at). We define ζBA t = 1 2αt. Then E{∆BA t+1(st, at)|Pt} = ∆BA t (st, at) + E{αt(st, at)F B t (st, at) −αt(st, at)F A t (st, at)|Pt} = (1 −ζBA t (st, at))∆BA t (st, at) + ζBA t (st, at)E{F BA t (st, at)|Pt} , where E{F BA t (st, at)|Pt} = γE  QA t (st+1, b∗) −QB t (st+1, a∗)|Pt . For this step it is important that the selection whether to update QA or QB is independent on the sample (e.g. random). Assume E{QA t (st+1, b∗)|Pt} ≥E{QB t (st+1, a∗)|Pt}. By definition of a∗as given in line 6 of Algorithm 1 we have QA t (st+1, a∗) = maxa QA t (st+1, a) ≥QA t (st+1, b∗) and therefore E{F BA t (st, at)|Pt} = γE  QA t (st+1, b∗) −QB t (st+1, a∗)|Pt ≤γE  QA t (st+1, a∗) −QB t (st+1, a∗)|Pt ≤γ ∆BA t . Now assume E{QB t (st+1, a∗)|Pt} > E{QA t (st+1, b∗)|Pt} and note that by definition of b∗we have QB t (st+1, b∗) ≥QB t (st+1, a∗). Then E{F BA t (st, at)|Pt} = γE  QB t (st+1, a∗) −QA t (st+1, b∗)|Pt ≤γE  QB t (st+1, b∗) −QA t (st+1, b∗)|Pt ≤γ ∆BA t . Clearly, one of the two assumptions must hold at each time step and in both cases we obtain the desired result that |E{F BA t |Pt}| ≤γ∥∆BA t ∥. Applying the lemma yields convergence of ∆BA t to zero, which in turn ensures that the original process also converges in the limit. 4 Experiments This section contains results on two problems, as an illustration of the bias of Q-learning and as a first practical comparison with Double Q-learning. The settings are simple to allow an easy interpretation of what is happening. Double Q-learning scales to larger problems and continuous spaces in the same way as Q-learning, so our focus here is explicitly on the bias of the algorithms. The settings are the gambling game of roulette and a small grid world. There is considerable randomness in the rewards, and as a result we will see that indeed Q-learning performs poorly. The discount factor was 0.95 in all experiments. We conducted two experiments on each problem. The learning rate was either linear: αt(s, a) = 1/nt(s, a), or polynomial αt(s, a) = 1/nt(s, a)0.8. For Double Q-learning nt(s, a) = nA t (s, a) if QA is updated and nt(s, a) = nB t (s, a) if QB is updated, where nA t and nB t store the number of updates for each action for the corresponding value function. The polynomial learning rate was shown in previous work to be better in theory and in practice [14]. 4.1 Roulette In roulette, a player chooses between 170 betting actions, including betting on a number, on either of the colors black or red, and so on. The payoff for each of these bets is chosen such that almost all bets have an expected payout of 1 38$36 = $0.947 per dollar, resulting in an expected loss of -$0.053 per play if we assume the player bets $1 every time.1 We assume all betting actions transition back to the same state and there is one action that stops playing, yielding $0. We ignore the available funds of the player as a factor and assume he bets $1 each turn. Figure 1 shows the mean action values over all actions, as found by Q-learning and Double Qlearning. Each trial consisted of a synchronous update of all 171 actions. After 100,000 trials, Q-learning with a linear learning rate values all betting actions at more than $20 and there is little progress. With polynomial learning rates the performance improves, but Double Q-learning converges much more quickly. The average estimates of Q-learning are not poor because of a few poorly estimated outliers. After 100,000 trials Q-learning valued all non-terminating actions between $22.63 and $22.67 for linear learning rates and between $9.58 to $9.64 for polynomial rates. In this setting Double Q-learning does not suffer from significant underestimations. 1Only the so called ‘top line’ which pays $6 per dollar when 00, 0, 1, 2 or 3 is hit has a slightly lower expected value of -$0.079 per dollar. 6 Figure 1: The average action values according to Q-learning and Double Q-learning when playing roulette. The ‘walk-away’ action is worth $0. Averaged over 10 experiments. Figure 2: Results in the grid world for Q-learning and Double Q-learning. The first row shows average rewards per time step. The second row shows the maximal action value in the starting state S. Averaged over 10,000 experiments. 4.2 Grid World Consider the small grid world MDP as show in Figure 2. Each state has 4 actions, corresponding to the directions the agent can go. The starting state is in the lower left position and the goal state is in the upper right. Each time the agent selects an action that walks off the grid, the agent stays in the same state. Each non-terminating step, the agent receives a random reward of −12 or +10 with equal probability. In the goal state every action yields +5 and ends an episode. The optimal policy ends an episode after five actions, so the optimal average reward per step is +0.2. The exploration was ǫ-greedy with ǫ(s) = 1/ p n(s) where n(s) is the number of times state s has been visited, assuring infinite exploration in the limit which is a theoretical requirement for the convergence of both Q-learning and Double Q-learning. Such an ǫ-greedy setting is beneficial for Q-learning, since this implies that actions with large overestimations are selected more often than realistically valued actions. This can reduce the overestimation. Figure 2 shows the average rewards in the first row and the maximum action value in the starting state in the second row. Double Q-learning performs much better in terms of its average rewards, but this does not imply that the estimations of the action values are accurate. The optimal value of the maximally valued action in the starting state is 5γ4 −P3 k=0 γk ≈0.36, which is depicted in the second row of Figure 2 with a horizontal dotted line. We see Double Q-learning does not get much closer to this value in 10, 000 learning steps than Q-learning. However, even if the error of the action values is comparable, the policies found by Double Q-learning are clearly much better. 5 Discussion We note an important difference between the well known heuristic exploration technique of optimism in the face of uncertainty [21, 22] and the overestimation bias. Optimism about uncertain events can be beneficial, but Q-learning can overestimate actions that have been tried often and the estimations can be higher than any realistic optimistic estimate. For instance, in roulette our initial action value estimate of $0 can be considered optimistic, since no action has an actual expected value higher than this. However, even after trying 100,000 actions Q-learning on average estimated each gambling action to be worth almost $10. In contrast, although Double Q-learning can underestimate 7 the values of some actions, it is easy to set the initial action values high enough to ensure optimism for actions that have experienced limited updates. Therefore, the use of the technique of optimism in the face of uncertainty can be thought of as an orthogonal concept to the over- and underestimation that is the topic of this paper. The analysis in this paper is not only applicable to Q-learning. For instance, in a recent paper on multi-armed bandit problems, methods were proposed to exploit structure in the form of the presence of clusters of correlated arms in order to speed up convergence and reduce total regret [23]. The value of such a cluster in itself is an estimation task and the proposed methods included taking the mean value, which would result in an underestimation of the actual value, and taking the maximum value, which is a case of the single estimator and results in an overestimation. It would be interesting to see how the double estimator approach fares in such a setting. Although the settings in our experiments used stochastic rewards, our analysis is not limited to MDPs with stochastic reward functions. When the rewards are deterministic but the state transitions are stochastic, the same pattern of overestimations due to this noise can occur and the same conclusions continue to hold. 6 Conclusion We have presented a new algorithm called Double Q-learning that uses a double estimator approach to determine the value of the next state. To our knowledge, this is the first off-policy value based reinforcement learning algorithm that does not have a positive bias in estimating the action values in stochastic environments. According to our analysis, Double Q-learning sometimes underestimates the action values, but does not suffer from the overestimation bias that Q-learning does. In a roulette game and a maze problem, Double Q-learning was shown to reach good performance levels much more quickly. Future work Interesting future work would include research to obtain more insight into the merits of the Double Q-learning algorithm. For instance, some preliminary experiments in the grid world showed that Q-learning performs even worse with higher discount factors, but Double Q-learning is virtually unaffected. Additionally, the fact that we can construct positively biased and negatively biased off-policy algorithms raises the question whether it is also possible to construct an unbiased off-policy reinforcement-learning algorithm, without the high variance of unbiased on-policy Monte-Carlo methods [24]. Possibly, this can be done by estimating the size of the overestimation and deducting this from the estimate. Unfortunately, the size of the overestimation is dependent on the number of actions and the unknown distributions of the rewards and transitions, making this a non-trivial extension. More analysis on the performance of Q-learning and related algorithms such as Fitted Q-iteration [12] and Delayed Q-learning [10] is desirable. For instance, Delayed Q-learning can suffer from similar overestimations, although it does have polynomial convergence guarantees. This is similar to the polynomial learning rates: although performance is improved from an exponential to a polynomial rate [14], the algorithm still suffers from the inherent overestimation bias due to the single estimator approach. Furthermore, it would be interesting to see how Fitted Double Q-iteration, Delayed Double Q-learning and other extensions of Q-learning perform in practice when they are applied to Double Q-learning. Acknowledgments The authors wish to thank Marco Wiering and Gerard Vreeswijk for helpful comments. This research was made possible thanks to grant 612.066.514 of the dutch organization for scientific research (Nederlandse Organisatie voor Wetenschappelijk Onderzoek, NWO). References [1] C. J. C. H. Watkins. Learning from Delayed Rewards. PhD thesis, King’s College, Cambridge, England, 1989. [2] C. J. C. H. Watkins and P. Dayan. Q-learning. Machine Learning, 8:279–292, 1992. 8 [3] R. Bellman. Dynamic Programming. Princeton University Press, 1957. [4] T. Jaakkola, M. I. Jordan, and S. P. Singh. On the convergence of stochastic iterative dynamic programming algorithms. Neural Computation, 6:1185–1201, 1994. [5] J. N. Tsitsiklis. Asynchronous stochastic approximation and Q-learning. Machine Learning, 16:185–202, 1994. [6] M. L. Littman and C. Szepesv´ari. A generalized reinforcement-learning model: Convergence and applications. In L. Saitta, editor, Proceedings of the 13th International Conference on Machine Learning (ICML-96), pages 310–318, Bari, Italy, 1996. Morgan Kaufmann. [7] R. H. Crites and A. G. Barto. Improving elevator performance using reinforcement learning. In D. S. Touretzky, M. C. Mozer, and M. E. Hasselmo, editors, Advances in Neural Information Processing Systems 8, pages 1017–1023, Cambridge MA, 1996. MIT Press. [8] W. D. Smart and L. P. Kaelbling. Effective reinforcement learning for mobile robots. In Proceedings of the 2002 IEEE International Conference on Robotics and Automation (ICRA 2002), pages 3404–3410, Washington, DC, USA, 2002. [9] M. A. Wiering and H. P. van Hasselt. Ensemble algorithms in reinforcement learning. IEEE Transactions on Systems, Man, and Cybernetics, Part B, 38(4):930–936, 2008. [10] A. L. Strehl, L. Li, E. Wiewiora, J. Langford, and M. L. Littman. PAC model-free reinforcement learning. In Proceedings of the 23rd international conference on Machine learning, pages 881–888. ACM, 2006. [11] M. J. Kearns and S. P. Singh. Finite-sample convergence rates for Q-learning and indirect algorithms. In Neural Information Processing Systems 12, pages 996–1002. MIT Press, 1999. [12] D. Ernst, P. Geurts, and L. Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(1):503–556, 2005. [13] C. Szepesv´ari. The asymptotic convergence-rate of Q-learning. In NIPS ’97: Proceedings of the 1997 conference on Advances in neural information processing systems 10, pages 1064– 1070, Cambridge, MA, USA, 1998. MIT Press. [14] E. Even-Dar and Y. Mansour. Learning rates for Q-learning. Journal of Machine Learning Research, 5:1–25, 2003. [15] E. Van den Steen. Rational overoptimism (and other biases). American Economic Review, 94(4):1141–1151, September 2004. [16] J. E. Smith and R. L. Winkler. The optimizer’s curse: Skepticism and postdecision surprise in decision analysis. Management Science, 52(3):311–322, 2006. [17] E. Capen, R. Clapp, and T. Campbell. Bidding in high risk situations. Journal of Petroleum Technology, 23:641–653, 1971. [18] R. H. Thaler. Anomalies: The winner’s curse. Journal of Economic Perspectives, 2(1):191– 202, Winter 1988. [19] J. L. W. V. Jensen. Sur les fonctions convexes et les in´egalit´es entre les valeurs moyennes. Journal Acta Mathematica, 30(1):175–193, 1906. [20] S. P. Singh, T. Jaakkola, M. L. Littman, and C. Szepesv´ari. Convergence results for single-step on-policy reinforcement-learning algorithms. Machine Learning, 38(3):287–308, 2000. [21] L. P. Kaelbling, M. L. Littman, and A. W. Moore. Reinforcement learning: A survey. Journal of Artificial Intelligence Research, 4:237–285, 1996. [22] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. The MIT press, Cambridge MA, 1998. [23] S. Pandey, D. Chakrabarti, and D. Agarwal. Multi-armed bandit problems with dependent arms. In Proceedings of the 24th international conference on Machine learning, pages 721– 728. ACM, 2007. [24] W. K. Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, pages 97–109, 1970. 9
2010
19
3,954
Tight Sample Complexity of Large-Margin Learning Sivan Sabato1 Nathan Srebro2 Naftali Tishby1 1 School of Computer Science & Engineering, The Hebrew University, Jerusalem 91904, Israel 2 Toyota Technological Institute at Chicago, Chicago, IL 60637, USA {sivan sabato,tishby}@cs.huji.ac.il, nati@ttic.edu Abstract We obtain a tight distribution-specific characterization of the sample complexity of large-margin classification with L2 regularization: We introduce the γ-adapted-dimension, which is a simple function of the spectrum of a distribution’s covariance matrix, and show distribution-specific upper and lower bounds on the sample complexity, both governed by the γ-adapted-dimension of the source distribution. We conclude that this new quantity tightly characterizes the true sample complexity of large-margin classification. The bounds hold for a rich family of sub-Gaussian distributions. 1 Introduction In this paper we tackle the problem of obtaining a tight characterization of the sample complexity which a particular learning rule requires, in order to learn a particular source distribution. Specifically, we obtain a tight characterization of the sample complexity required for large (Euclidean) margin learning to obtain low error for a distribution D(X, Y ), for X ∈Rd, Y ∈{±1}. Most learning theory work focuses on upper-bounding the sample complexity. That is, on providing a bound m(D, ǫ) and proving that when using some specific learning rule, if the sample size is at least m(D, ǫ), an excess error of at most ǫ (in expectation or with high probability) can be ensured. For instance, for large-margin classification we know that if PD[∥X∥≤B] = 1, then m(D, ǫ) can be set to O(B2/(γ2ǫ2)) to get true error of no more than ℓ∗ γ + ǫ, where ℓ∗ γ = min∥w∥≤1 PD(Y ⟨w, X⟩≤γ) is the optimal margin error at margin γ. Such upper bounds can be useful for understanding positive aspects of a learning rule. But it is difficult to understand deficiencies of a learning rule, or to compare between different rules, based on upper bounds alone. After all, it is possible, and often the case, that the true sample complexity, i.e. the actual number of samples required to get low error, is much lower than the bound. Of course, some sample complexity upper bounds are known to be “tight” or to have an almostmatching lower bound. This usually means that the bound is tight as a worst-case upper bound for a specific class of distributions (e.g. all those with PD[∥X∥≤B] = 1). That is, there exists some source distribution for which the bound is tight. In other words, the bound concerns some quantity of the distribution (e.g. the radius of the support), and is the lowest possible bound in terms of this quantity. But this is not to say that for any specific distribution this quantity tightly characterizes the sample complexity. For instance, we know that the sample complexity can be much smaller than the radius of the support of X, if the average norm p E[∥X∥2] is small. However, E[∥X∥2] is also not a precise characterization of the sample complexity, for instance in low dimensions. The goal of this paper is to identify a simple quantity determined by the distribution that does precisely characterize the sample complexity. That is, such that the actual sample complexity for the learning rule on this specific distribution is governed, up to polylogarithmic factors, by this quantity. 1 In particular, we present the γ-adapted-dimension kγ(D). This measure refines both the dimension and the average norm of X, and it can be easily calculated from the covariance matrix of X. We show that for a rich family of “light tailed” distributions (specifically, sub-Gaussian distributions with independent uncorrelated directions – see Section 2), the number of samples required for learning by minimizing the γ-margin-violations is both lower-bounded and upper-bounded by ˜Θ(kγ). More precisely, we show that the sample complexity m(ǫ, γ, D) required for achieving excess error of no more than ǫ can be bounded from above and from below by: Ω(kγ(D)) ≤m(ǫ, γ, D) ≤˜O(kγ(D) ǫ2 ). As can be seen in this bound, we are not concerned about tightly characterizing the dependence of the sample complexity on the desired error [as done e.g. in 1], nor with obtaining tight bounds for very small error levels. In fact, our results can be interpreted as studying the sample complexity needed to obtain error well below random, but bounded away from zero. This is in contrast to classical statistics asymptotic that are also typically tight, but are valid only for very small ǫ. As was recently shown by Liang and Srebro [2], the quantities on which the sample complexity depends on for very small ǫ (in the classical statistics asymptotic regime) can be very different from those for moderate error rates, which are more relevant for machine learning. Our tight characterization, and in particular the distribution-specific lower bound on the sample complexity that we establish, can be used to compare large-margin (L2 regularized) learning to other learning rules. In Section 7 we provide two such examples: we use our lower bound to rigorously establish a sample complexity gap between L1 and L2 regularization previously studied in [3], and to show a large gap between discriminative and generative learning on a Gaussian-mixture distribution. In this paper we focus only on large L2 margin classification. But in order to obtain the distributionspecific lower bound, we develop novel tools that we believe can be useful for obtaining lower bounds also for other learning rules. Related work Most work on “sample complexity lower bounds” is directed at proving that under some set of assumptions, there exists a source distribution for which one needs at least a certain number of examples to learn with required error and confidence [4, 5, 6]. This type of a lower bound does not, however, indicate much on the sample complexity of other distributions under the same set of assumptions. As for distribution-specific lower bounds, the classical analysis of Vapnik [7, Theorem 16.6] provides not only sufficient but also necessary conditions for the learnability of a hypothesis class with respect to a specific distribution. The essential condition is that the ǫ-entropy of the hypothesis class with respect to the distribution be sub-linear in the limit of an infinite sample size. In some sense, this criterion can be seen as providing a “lower bound” on learnability for a specific distribution. However, we are interested in finite-sample convergence rates, and would like those to depend on simple properties of the distribution. The asymptotic arguments involved in Vapnik’s general learnability claim do not lend themselves easily to such analysis. Benedek and Itai [8] show that if the distribution is known to the learner, a specific hypothesis class is learnable if and only if there is a finite ǫ-cover of this hypothesis class with respect to the distribution. Ben-David et al. [9] consider a similar setting, and prove sample complexity lower bounds for learning with any data distribution, for some binary hypothesis classes on the real line. In both of these works, the lower bounds hold for any algorithm, but only for a worst-case target hypothesis. Vayatis and Azencott [10] provide distribution-specific sample complexity upper bounds for hypothesis classes with a limited VC-dimension, as a function of how balanced the hypotheses are with respect to the considered distributions. These bounds are not tight for all distributions, thus this work also does not provide true distribution-specific sample complexity. 2 Problem setting and definitions Let D be a distribution over Rd × {±1}. DX will denote the restriction of D to Rd. We are interested in linear separators, parametrized by unit-norm vectors in Bd 1 ≜{w ∈Rd | ∥w∥2 ≤1}. 2 For a predictor w denote its misclassification error with respect to distribution D by ℓ(w, D) ≜ P(X,Y )∼D[Y ⟨w, X⟩≤0]. For γ > 0, denote the γ-margin loss of w with respect to D by ℓγ(w, D) ≜P(X,Y )∼D[Y ⟨w, X⟩≤γ]. The minimal margin loss with respect to D is denoted by ℓ∗ γ(D) ≜minw∈Bd 1 ℓγ(w, D). For a sample S = {(xi, yi)}m i=1 such that (xi, yi) ∈Rd × {±1}, the margin loss with respect to S is denoted by ˆℓγ(w, S) ≜1 m|{i | yi⟨xi, w⟩≤γ}| and the misclassification error is ˆℓ(w, S) ≜1 m|{i | yi⟨xi, w⟩≤0}|. In this paper we are concerned with learning by minimizing the margin loss. It will be convenient for us to discuss transductive learning algorithms. Since many predictors minimize the margin loss, we define: Definition 2.1. A margin-error minimization algorithm A is an algorithm whose input is a margin γ, a training sample S = {(xi, yi)}m i=1 and an unlabeled test sample ˜SX = {˜xi}m i=1, which outputs a predictor ˜w ∈argminw∈Bd 1 ˆℓγ(w, S). We denote the output of the algorithm by ˜w = Aγ(S, ˜SX). We will be concerned with the expected test loss of the algorithm given a random training sample and a random test sample, each of size m, and define ℓm(Aγ, D) ≜ES, ˜S∼Dm[ˆℓ(A(S, ˜SX), ˜S)], where S, ˜S ∼Dm independently. For γ > 0, ǫ ∈[0, 1], and a distribution D, we denote the distributionspecific sample complexity by m(ǫ, γ, D): this is the minimal sample size such that for any marginerror minimization algorithm A, and for any m ≥m(ǫ, γ, D), ℓm(Aγ, D) −ℓ∗ γ(D) ≤ǫ. Sub-Gaussian distributions We will characterize the distribution-specific sample complexity in terms of the covariance of X ∼ DX. But in order to do so, we must assume that X is not too heavy-tailed. Otherwise, X can have even infinite covariance but still be learnable, for instance if it has a tiny probability of having an exponentially large norm. We will thus restrict ourselves to sub-Gaussian distributions. This ensures light tails in all directions, while allowing a sufficiently rich family of distributions, as we presently see. We also require a more restrictive condition – namely that DX can be rotated to a product distribution over the axes of Rd. A distribution can always be rotated so that its coordinates are uncorrelated. Here we further require that they are independent, as of course holds for any multivariate Gaussian distribution. Definition 2.2 (See e.g. [11, 12]). A random variable X is sub-Gaussian with moment B (or B-sub-Gaussian) for B ≥0 if ∀t ∈R, E[exp(tX)] ≤exp(B2t2/2). (1) We further say that X is sub-Gaussian with relative moment ρ = B/ p E[X2]. The sub-Gaussian family is quite extensive: For instance, any bounded, Gaussian, or Gaussianmixture random variable with mean zero is included in this family. Definition 2.3. A distribution DX over X ∈Rd is independently sub-Gaussian with relative moment ρ if there exists some orthonormal basis a1, . . . , ad ∈Rd, such that ⟨X, ai⟩are independent sub-Gaussian random variables, each with a relative moment ρ. We will focus on the family Dsg ρ of all independently ρ-sub-Gaussian distributions in arbitrary dimension, for a small fixed constant ρ. For instance, the family Dsg 3/2 includes all Gaussian distributions, all distributions which are uniform over a (hyper)box, and all multi-Bernoulli distributions, in addition to other less structured distributions. Our upper bounds and lower bounds will be tight up to quantities which depend on ρ, which we will regard as a constant, but the tightness will not depend on the dimensionality of the space or the variance of the distribution. 3 The γ-adapted-dimension As mentioned in the introduction, the sample complexity of margin-error minimization can be upperbounded in terms of the average norm E[∥X∥2] by m(ǫ, γ, D) ≤O(E[∥X∥2]/(γ2ǫ2)) [13]. Alternatively, we can rely only on the dimensionality and conclude m(ǫ, γ, D) ≤˜O(d/ǫ2) [7]. Thus, 3 although both of these bounds are tight in the worst-case sense, i.e. they are the best bounds that rely only on the norm or only on the dimensionality respectively, neither is tight in a distributionspecific sense: If the average norm is unbounded while the dimensionality is small, an arbitrarily large gap is created between the true m(ǫ, γ, D) and the average-norm upper bound. The converse happens if the dimensionality is arbitrarily high while the average-norm is bounded. Seeking a distribution-specific tight analysis, one simple option to try to tighten these bounds is to consider their minimum, min(d, E[∥X∥2]/γ2)/ǫ2, which, trivially, is also an upper bound on the sample complexity. However, this simple combination is also not tight: Consider a distribution in which there are a few directions with very high variance, but the combined variance in all other directions is small. We will show that in such situations the sample complexity is characterized not by the minimum of dimension and norm, but by the sum of the number of high-variance dimensions and the average norm in the other directions. This behavior is captured by the γ-adapted-dimension: Definition 3.1. Let b > 0 and k a positive integer. (a). A subset X ⊆Rd is (b, k)-limited if there exists a sub-space V ⊆Rd of dimension d −k such that X ⊆{x ∈Rd | ∥x′P∥2 ≤b}, where P is an orthogonal projection onto V . (b). A distribution DX over Rd is (b, k)-limited if there exists a sub-space V ⊆Rd of dimension d −k such that EX∼DX[∥X′P∥2] ≤b, with P an orthogonal projection onto V . Definition 3.2. The γ-adapted-dimension of a distribution or a set, denoted by kγ, is the minimum k such that the distribution or set is (γ2k, k) limited. It is easy to see that kγ(DX) is upper-bounded by min(d, E[∥X∥2]/γ2). Moreover, it can be much smaller. For example, for X ∈R1001 with independent coordinates such that the variance of the first coordinate is 1000, but the variance in each remaining coordinate is 0.001 we have k1 = 1 but d = E[∥X∥2] = 1001. More generally, if λ1 ≥λ2 ≥· · · λd are the eigenvalues of the covariance matrix of X, then kγ = min{k | Pd i=k+1 λi ≤γ2k}. A quantity similar to kγ was studied previously in [14]. kγ is different in nature from some other quantities used for providing sample complexity bounds in terms of eigenvalues, as in [15], since it is defined based on the eigenvalues of the distribution and not of the sample. In Section 6 we will see that these can be quite different. In order to relate our upper and lower bounds, it will be useful to relate the γ-adapted-dimension for different margins. The relationship is established in the following Lemma , proved in the appendix: Lemma 3.3. For 0 < α < 1, γ > 0 and a distribution DX, kγ(DX) ≤kαγ(DX) ≤2kγ(DX) α2 + 1. We proceed to provide a sample complexity upper bound based on the γ-adapted-dimension. 4 A sample complexity upper bound using γ-adapted-dimension In order to establish an upper bound on the sample complexity, we will bound the fat-shattering dimension of the linear functions over a set in terms of the γ-adapted-dimension of the set. Recall that the fat-shattering dimension is a classic quantity for proving sample complexity upper bounds: Definition 4.1. Let F be a set of functions f : X →R, and let γ > 0. The set {x1, . . . , xm} ⊆X is γ-shattered by F if there exist r1, . . . , rm ∈R such that for all y ∈{±1}m there is an f ∈F such that ∀i ∈[m], yi(f(xi) −ri) ≥γ. The γ-fat-shattering dimension of F is the size of the largest set in X that is γ-shattered by F. The sample complexity of γ-loss minimization is bounded by ˜O(dγ/8/ǫ2) were dγ/8 is the γ/8fat-shattering dimension of the function class [16, Theorem 13.4]. Let W(X) be the class of linear functions restricted to the domain X. For any set we show: Theorem 4.2. If a set X is (B2, k)-limited, then the γ-fat-shattering dimension of W(X) is at most 3 2(B2/γ2 + k + 1). Consequently, it is also at most 3kγ(X) + 1. Proof. Let X be a m × d matrix whose rows are a set of m points in Rd which is γ-shattered. For any ǫ > 0 we can augment X with an additional column to form the matrix ˜X of dimensions m×(d+1), such that for all y ∈{−γ, +γ}m, there is a wy ∈Bd+1 1+ǫ such that e Xwy = y (the details 4 can be found in the appendix). Since X is (B2, k)-limited, there is an orthogonal projection matrix ˜P of size (d + 1) × (d + 1) such that ∀i ∈[m], ∥˜X′ iP∥2 ≤B2 where ˜Xi is the vector in row i of ˜X. Let ˜V be the sub-space of dimension d −k spanned by the columns of ˜P. To bound the size of the shattered set, we show that the projected rows of ˜X on V are ‘shattered’ using projected labels. We then proceed similarly to the proof of the norm-only fat-shattering bound [17]. We have ˜X = ˜X ˜P + ˜X(I −˜P). In addition, ˜Xwy = y. Thus y −˜X ˜Pwy = ˜X(I −˜P)wy. I −˜P is a projection onto a k + 1-dimensional space, thus the rank of ˜X(I −˜P) is at most k + 1. Let T be an m × m orthogonal projection matrix onto the subspace orthogonal to the columns of ˜X(I −˜P). This sub-space is of dimension at most l = m −(k + 1), thus trace(T) = l. T(y −˜X ˜Pwy) = T ˜X(I −˜P)wy = 0(d+1)×1. Thus Ty = T ˜X ˜Pwy for every y ∈{−γ, +γ}m. Denote row i of T by ti and row i of T ˜X ˜P by zi. We have ∀i ≤m, ⟨zi, w1 y⟩= tiy = P j≤m ti[j]y[j]. Therefore ⟨P i ziy[i], w1 y⟩= P i≤m P j≤(l+k) ti[j]y[i]y[j]. Since ∥w1 y∥≤1 + ǫ, ∀x ∈Rd+1, (1 + ǫ)∥x∥≥∥x∥∥w1 y∥≥⟨x, w1 y⟩. Thus ∀y ∈{−γ, +γ}m, (1 + ǫ)∥P i ziy[i]∥≥ P i≤m P j≤m ti[j]y[i]y[j]. Taking the expectation of y chosen uniformly at random, we have (1 + ǫ)E[∥ X i ziy[i]∥] ≥ X i,j E[ti[j]y[i]y[j]] = γ2 X i ti[i] = γ2trace(T) = γ2l. In addition, 1 γ2 E[∥P i ziy[i]∥2] = Pl i=1 ∥zi∥2 = trace( ˜P ′ ˜X′T 2 ˜X ˜P) ≤trace( ˜P ′ ˜X′ ˜X ˜P) ≤B2m. From the inequality E[X2] ≤E[X]2, it follows that l2 ≤(1 + ǫ)2 B2 γ2 m. Since this holds for any ǫ > 0, we can set ǫ = 0 and solve for m. Thus m ≤(k + 1) + B2 2γ2 + q B4 4γ4 + B2 γ2 (k + 1) ≤ (k + 1) + B2 γ2 + q B2 γ2 (k + 1) ≤3 2( B2 γ2 + k + 1). Corollary 4.3. Let D be a distribution over X × {±1}, X ⊆Rd. Then m(ǫ, γ, D) ≤eO kγ/8(X) ǫ2  . The corollary above holds only for distributions with bounded support. However, since sub-Gaussian variables have an exponentially decaying tail, we can use this corollary to provide a bound for independently sub-Gaussian distributions as well (see appendix for proof): Theorem 4.4 (Upper Bound for Distributions in Dsg ρ ). For any distribution D over Rd ×{±1} such that DX ∈Dsg ρ , m(ǫ, γ, D) = ˜O(ρ2kγ(DX) ǫ2 ). This new upper bound is tighter than norm-only and dimension-only upper bounds. But does the γ-adapted-dimension characterize the true sample complexity of the distribution, or is it just another upper bound? To answer this question, we need to be able to derive sample complexity lower bounds as well. We consider this problem in following section. 5 Sample complexity lower bounds using Gram-matrix eigenvalues We wish to find a distribution-specific lower bound that depends on the γ-adapted-dimension, and matches our upper bound as closely as possible. To do that, we will link the ability to learn with a margin, with properties of the data distribution. The ability to learn is closely related to the probability of a sample to be shattered, as evident from Vapnik’s formulations of learnability as a function of the ǫ-entropy. In the preceding section we used the fact that non-shattering (as captured by the fat-shattering dimension) implies learnability. For the lower bound we use the converse fact, presented below in Theorem 5.1: If a sample can be fat-shattered with a reasonably high probability, then learning is impossible. We then relate the fat-shattering of a sample to the minimal eigenvalue of its Gram matrix. This allows us to present a lower-bound on the sample complexity using a lower bound on the smallest eigenvalue of the Gram-matrix of a sample drawn from the data distribution. We use the term ‘γ-shattered at the origin’ to indicate that a set is γ-shattered by setting the bias r ∈Rm (see Def. 4.1) to the zero vector. 5 Theorem 5.1. Let D be a distribution over Rd × {±1}. If the probability of a sample of size m drawn from Dm X to be γ-shattered at the origin is at least η, then there is a margin-error minimization algorithm A, such that ℓm/2(Aγ, D) ≥η/2. Proof. For a given distribution D, let A be an algorithm which, for every two input samples S and ˜SX, labels ˜SX using the separator w ∈argminw∈Bd 1 ˆℓγ(w, S) that maximizes E ˜SY ∈Dm Y [ˆℓγ(w, ˜S)]. For every x ∈Rd there is a label y ∈{±1} such that P(X,Y )∼D[Y ̸= y | X = x] ≥1 2. If the set of examples in SX and ˜SX together is γ-shattered at the origin, then A chooses a separator with zero margin loss on S, but loss of at least 1 2 on ˜S. Therefore ℓm/2(Aγ, D) ≥η/2. The notion of shattering involves checking the existence of a unit-norm separator w for each labelvector y ∈{±1}m. In general, there is no closed form for the minimum-norm separator. However, the following Theorem provides an equivalent and simple characterization for fat-shattering: Theorem 5.2. Let S = (X1, . . . , Xm) be a sample in Rd, denote X the m×d matrix whose rows are the elements of S. Then S is 1-shattered iff X is invertible and ∀y ∈{±1}m, y′(XX′)−1y ≤1. The proof of this theorem is in the appendix. The main issue in the proof is showing that if a set is shattered, it is also shattered with exact margins, since the set of exact margins {±1}m lies in the convex hull of any set of non-exact margins that correspond to all the possible labelings. We can now use the minimum eigenvalue of the Gram matrix to obtain a sufficient condition for fat-shattering, after which we present the theorem linking eigenvalues and learnability. For a matrix X, λn(X) denotes the n’th largest eigenvalue of X. Lemma 5.3. Let S = (X1, . . . , Xm) be a sample in Rd, with X as above. If λm(XX′) ≥m then S is 1-shattered at the origin. Proof. If λm(XX′) ≥m then XX′ is invertible and λ1((XX′)−1) ≤1/m. For any y ∈{±1}m we have ∥y∥= √m and y′(XX′)−1y ≤∥y∥2λ1((XX′)−1) ≤m(1/m) = 1. By Theorem 5.2 the sample is 1-shattered at the origin. Theorem 5.4. Let D be a distribution over Rd×{±1}, S be an i.i.d. sample of size m drawn from D, and denote XS the m × d matrix whose rows are the points from S. If P[λm(XSX′ S) ≥mγ2] ≥η, then there exists a margin-error minimization algorithm A such that ℓm/2(Aγ, D) ≥η/2. Theorem 5.4 follows by scaling XS by γ, applying Lemma 5.3 to establish γ-fat shattering with probability at least η, then applying Theorem 5.1. Lemma 5.3 generalizes the requirement for linear independence when shattering using hyperplanes with no margin (i.e. no regularization). For unregularized (homogeneous) linear separation, a sample is shattered iff it is linearly independent, i.e. if λm > 0. Requiring λm > mγ2 is enough for γ-fat-shattering. Theorem 5.4 then generalizes the simple observation, that if samples of size m are linearly independent with high probability, there is no hope of generalizing from m/2 points to the other m/2 using unregularized linear predictors. Theorem 5.4 can thus be used to derive a distribution-specific lower bound. Define: mγ(D) ≜1 2 min  m PS∼Dm[λm(XSX′ S) ≥mγ2] < 1 2  Then for any ǫ < 1/4 −ℓ∗ γ(D), we can conclude that m(ǫ, γ, D) ≥mγ(D), that is, we cannot learn within reasonable error with less than mγ examples. Recall that our upper-bound on the sample complexity from Section 4 was ˜O(kγ). The remaining question is whether we can relate mγ and kγ, to establish that the our lower bound and upper bound tightly specify the sample complexity. 6 A lower bound for independently sub-Gaussian distributions As discussed in the previous section, to obtain sample complexity lower bound we require a bound on the value of the smallest eigenvalue of a random Gram-matrix. The distribution of this eigenvalue has been investigated under various assumptions. The cleanest results are in the case where m, d → ∞and m d →β < 1, and the coordinates of each example are identically distributed: 6 Theorem 6.1 (Theorem 5.11 in [18]). Let Xi be a series of mi ×di matrices whose entries are i.i.d. random variables with mean zero, variance σ2 and finite fourth moments. If limi→∞mi di = β < 1, then limi→∞λm( 1 dXiX′ i) = σ2(1 −√β)2. This asymptotic limit can be used to calculate mγ and thus provide a lower bound on the sample complexity: Let the coordinates of X ∈Rd be i.i.d. with variance σ2 and consider a sample of size m. If d, m are large enough, we have by Theorem 6.1: λm(XX′) ≈dσ2(1 − p m/d)2 = σ2( √ d −√m)2 Solving σ2( √ d −p2mγ)2 = 2mγγ2 we get mγ ≈1 2d/(1 + γ/σ)2. We can also calculate the γadapted-dimension for this distribution to get kγ ≈d/(1 + γ2/σ2), and conclude that 1 4kγ ≤mγ ≤ 1 2kγ. In this case, then, we are indeed able to relate the sample complexity lower bound with kγ, the same quantity that controls our upper bound. This conclusion is easy to derive from known results, however it holds only asymptotically, and only for a highly limited set of distributions. Moreover, since Theorem 6.1 holds asymptotically for each distribution separately, we cannot deduce from it any finite-sample lower bounds for families of distributions. For our analysis we require finite-sample bounds for the smallest eigenvalue of a random Grammatrix. Rudelson and Vershynin [19, 20] provide such finite-sample lower bounds for distributions with identically distributed sub-Gaussian coordinates. In the following Theorem we generalize results of Rudelson and Vershynin to encompass also non-identically distributed coordinates. The proof of Theorem 6.2 can be found in the appendix. Based on this theorem we conclude with Theorem 6.3, stated below, which constitutes our final sample complexity lower bound. Theorem 6.2. Let B > 0. There is a constant β > 0 which depends only on B, such that for any δ ∈(0, 1) there exists a number L0, such that for any independently sub-Gaussian distribution with covariance matrix Σ ≤I and trace(Σ) ≥L0, if each of its independent sub-Gaussian coordinates has moment B, then for any m ≤β · trace(Σ) P[λm(XmX′ m) ≥m] ≥1 −δ, Where Xm is an m × d matrix whose rows are independent draws from DX. Theorem 6.3 (Lower bound for distributions in Dsg ρ ). For any ρ > 0, there are a constant β > 0 and an integer L0 such that for any D such that DX ∈Dsg ρ and kγ(DX) > L0, for any margin γ > 0 and any ǫ < 1 4 −ℓ∗ γ(D), m(ǫ, γ, D) ≥βkγ(DX). Proof. The covariance matrix of DX is clearly diagonal. We assume w.l.o.g. that Σ = diag(λ1, . . . , λd) where λ1 ≥. . . ≥λd > 0. Let S be an i.i.d. sample of size m drawn from D. Let X be the m × d matrix whose rows are the unlabeled examples from S. Let δ be fixed, and set β and L0 as defined in Theorem 6.2 for δ. Assume m ≤β(kγ −1). We would like to use Theorem 6.2 to bound the smallest eigenvalue of XX′ with high probability, so that we can then apply Theorem 5.4 to get the desired lower bound. However, Theorem 6.2 holds only if all the coordinate variances are bounded by 1, and it requires that the moment, and not the relative moment, be bounded. Thus we divide the problem to two cases, based on the value of λkγ+1, and apply Theorem 6.2 separately to each case. Case I: Assume λkγ+1 ≥γ2. Then ∀i ∈[kγ], λi ≥γ2. Let Σ1 = diag(1/λ1, . . . , 1/λkγ, 0, . . . , 0). The random matrix X√Σ1 is drawn from an independently sub-Gaussian distribution, such that each of its coordinates has sub-Gaussian moment ρ and covariance matrix Σ · Σ1 ≤Id. In addition, trace(Σ · Σ1) = kγ ≥L0. Therefore Theorem 6.2 holds for X√Σ1, and P[λm(XΣ1X′) ≥m] ≥ 1 −δ. Clearly, for any X, λm( 1 γ2 XX′) ≥λm(XΣ1X′). Thus P[λm( 1 γ2 XX′) ≥m] ≥1 −δ. Case II: Assume λkγ+1 < γ2. Then λi < γ2 for all i ∈{kγ + 1, . . . , d}. Let Σ2 = diag(0, . . . , 0, 1/γ2, . . . , 1/γ2), with kγ zeros on the diagonal. Then the random matrix X√Σ2 is drawn from an independently sub-Gaussian distribution with covariance matrix Σ · Σ2 ≤Id, such that all its coordinates have sub-Gaussian moment ρ. In addition, from the properties of kγ (see discussion in Section 2), trace(Σ · Σ2) = 1 γ2 Pd i=kγ+1 λi ≥kγ −1 ≥L0 −1. Thus Theorem 6.2 holds for X√Σ2, and so P[λm( 1 γ2 XX′) ≥m] ≥P[λm(XΣ2X′) ≥m] ≥1 −δ. 7 In both cases P[λm( 1 γ2 XX′) ≥m] ≥1 −δ for any m ≤β(kγ −1). By Theorem 5.4, there exists an algorithm A such that for any m ≤β(kγ −1) −1, ℓm(Aγ, D) ≥1 2 −δ/2. Therefore, for any ǫ < 1 2 −δ/2 −ℓ∗ γ(D), we have m(ǫ, γ, D) ≥β(kγ −1). We get the theorem by setting δ = 1 4. 7 Summary and consequences Theorem 4.4 and Theorem 6.3 provide an upper bound and a lower bound for the sample complexity of any distribution D whose data distribution is in Dsg ρ for some fixed ρ > 0. We can thus draw the following bound, which holds for any γ > 0 and ǫ ∈(0, 1 4 −ℓ∗ γ(D)): Ω(kγ(DX)) ≤m(ǫ, γ, D) ≤˜O(kγ(DX) ǫ2 ). (2) In both sides of the bound, the hidden constants depend only on the constant ρ. This result shows that the true sample complexity of learning each of these distributions is characterized by the γadapted-dimension. An interesting conclusion can be drawn as to the influence of the conditional distribution of labels DY |X: Since Eq. (2) holds for any DY |X, the effect of the direction of the best separator on the sample complexity is bounded, even for highly non-spherical distributions. We can use Eq. (2) to easily characterize the sample complexity behavior for interesting distributions, and to compare L2 margin minimization to learning methods. Gaps between L1 and L2 regularization in the presence of irrelevant features. Ng [3] considers learning a single relevant feature in the presence of many irrelevant features, and compares using L1 regularization and L2 regularization. When ∥X∥∞≤1, upper bounds on learning with L1 regularization guarantee a sample complexity of O(log(d)) for an L1-based learning rule [21]. In order to compare this with the sample complexity of L2 regularized learning and establish a gap, one must use a lower bound on the L2 sample complexity. The argument provided by Ng actually assumes scale-invariance of the learning rule, and is therefore valid only for unregularized linear learning. However, using our results we can easily establish a lower bound of Ω(d) for many specific distributions with ∥X∥∞≤1 and Y = X[1] ∈{±1}. For instance, when each coordinate is an independent Bernoulli variable, the distribution is sub-Gaussian with ρ = 1, and k1 = ⌈d/2⌉. Gaps between generative and discriminative learning for a Gaussian mixture. Consider two classes, each drawn from a unit-variance spherical Gaussian in a high dimension Rd and with a large distance 2v >> 1 between the class means, such that d >> v4. Then PD[X|Y = y] = N(yv · e1, Id), where e1 is a unit vector in Rd. For any v and d, we have DX ∈Dsg 1 . For large values of v, we have extremely low margin error at γ = v/2, and so we can hope to learn the classes by looking for a large-margin separator. Indeed, we can calculate kγ = ⌈d/(1 + v2 4 )⌉, and conclude that the sample complexity required is ˜Θ(d/v2). Now consider a generative approach: fitting a spherical Gaussian model for each class. This amounts to estimating each class center as the empirical average of the points in the class, and classifying based on the nearest estimated class center. It is possible to show that for any constant ǫ > 0, and for large enough v and d, O(d/v4) samples are enough in order to ensure an error of ǫ. This establishes a rather large gap of Ω(v2) between the sample complexity of the discriminative approach and that of the generative one. To summarize, we have shown that the true sample complexity of large-margin learning of a rich family of specific distributions is characterized by the γ-adapted-dimension. This result allows true comparison between this learning algorithm and other algorithms, and has various applications, such as semi-supervised learning and feature construction. The challenge of characterizing true sample complexity extends to any distribution and any learning algorithm. We believe that obtaining answers to these questions is of great importance, both to learning theory and to learning applications. Acknowledgments The authors thank Boaz Nadler for many insightful discussions, and Karthik Sridharan for pointing out [14] to us. Sivan Sabato is supported by the Adams Fellowship Program of the Israel Academy of Sciences and Humanities. This work was supported by the NATO SfP grant 982480. 8 References [1] I. Steinwart and C. Scovel. Fast rates for support vector machines using Gaussian kernels. Annals of Statistics, 35(2):575–607, 2007. [2] P. Liang and N. Srebro. On the interaction between norm and dimensionality: Multiple regimes in learning. In ICML, 2010. [3] A.Y. Ng. Feature selection, l1 vs. l2 regularization, and rotational invariance. In ICML, 2004. [4] A. Antos and G. Lugosi. Strong minimax lower bounds for learning. Mach. Learn., 30(1):31–56, 1998. [5] A. Ehrenfeucht, D. Haussler, M. Kearns, and L. Valiant. A general lower bound on the number of examples needed for learning. In Proceedings of the First Anuual Workshop on Computational Learning Theory, pages 139–154, August 1988. [6] C. Gentile and D.P. Helmbold. Improved lower bounds for learning from noisy examples: an informationtheoretic approach. In COLT, pages 104–115, 1998. [7] V.N. Vapnik. The Nature of Statistical Learning Theory. Springer, 1995. [8] Gyora M. Benedek and Alon Itai. Learnability with respect to fixed distributions. Theoretical Computer Science, 86(2):377–389, September 1991. [9] S. Ben-David, T. Lu, and D. P´al. Does unlabeled data provably help? In Proceedings of the Twenty-First Annual Conference on Computational Learning Theory, pages 33–44, 2008. [10] N. Vayatis and R. Azencott. Distribution-dependent vapnik-chervonenkis bounds. In EuroCOLT ’99, pages 230–240, London, UK, 1999. Springer-Verlag. [11] D.J.H. Garling. Inequalities: A Journey into Linear Analysis. Cambrige University Press, 2007. [12] V.V. Buldygin and Yu. V. Kozachenko. Metric Characterization of Random Variables and Random Processes. American Mathematical Society, 1998. [13] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. In COLT 2001, volume 2111, pages 224–240. Springer, Berlin, 2001. [14] O. Bousquet. Concentration Inequalities and Empirical Processes Theory Applied to the Analysis of Learning Algorithms. PhD thesis, Ecole Polytechnique, 2002. [15] B. Sch¨olkopf, J. Shawe-Taylor, A. J. Smola, and R.C. Williamson. Generalization bounds via eigenvalues of the gram matrix. Technical Report NC2-TR-1999-035, NeuroCOLT2, 1999. [16] M. Anthony and P. L. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. [17] N. Christianini and J. Shawe-Taylor. An Introduction to Support Vector Machines. Cambridge University Press, 2000. [18] Z. Bai and J.W. Silverstein. Spectral Analysis of Large Dimensional Random Matrices. Springer, second edition edition, 2010. [19] M. Rudelson and R. Vershynin. The smallest singular value of a random rectangular matrix. Communications on Pure and Applied Mathematics, 62:1707–1739, 2009. [20] M. Rudelson and R. Vershynin. The littlewoodofford problem and invertibility of random matrices. Advances in Mathematics, 218(2):600–633, 2008. [21] T. Zhang. Covering number bounds of certain regularized linear function classes. Journal of Machine Learning Research, 2:527–550, 2002. [22] G. Bennett, V. Goodman, and C. M. Newman. Norms of random matrices. Pacific J. Math., 59(2):359– 365, 1975. [23] F.L. Nazarov and A. Podkorytov. Ball, haagerup, and distribution functions. Operator Theory: Advances and Applications, 113 (Complex analysis, operators, and related topics):247–267, 2000. [24] R.E.A.C. Paley and A. Zygmund. A note on analytic functions in the unit circle. Proceedings of the Cambridge Philosophical Society, 28:266272, 1932. 9
2010
190
3,955
Minimum Average Cost Clustering Kiyohito Nagano Institute of Industrial Science University of Tokyo, Japan nagano@sat.t.u-tokyo.ac.jp Yoshinobu Kawahara The Institute of Scientific and Industrial Research Osaka University, Japan kawahara@ar.sanken.osaka-u.ac.jp Satoru Iwata Research Institute for Mathematical Sciences Kyoto University, Japan iwata@kurims.kyoto-u.ac.jp Abstract A number of objective functions in clustering problems can be described with submodular functions. In this paper, we introduce the minimum average cost criterion, and show that the theory of intersecting submodular functions can be used for clustering with submodular objective functions. The proposed algorithm does not require the number of clusters in advance, and it will be determined by the property of a given set of data points. The minimum average cost clustering problem is parameterized with a real variable, and surprisingly, we show that all information about optimal clusterings for all parameters can be computed in polynomial time in total. Additionally, we evaluate the performance of the proposed algorithm through computational experiments. 1 Introduction A clustering of a finite set V of data points is a partition of V into subsets (called clusters) such that data points in the same cluster are similar to each other. Basically, a clustering problem asks for a partition P of V such that the intra-cluster similarity is maximized and/or the inter-cluster similarity is minimized. The clustering of data is one of the most fundamental unsupervised learning problems. We use a criterion function defined on all partitions of V , and the clustering problem becomes that of finding a partition of V that minimizes the clustering cost under some constraints. Suppose that the inhomogeneity of subsets of the data set is measured by a nonnegative set function f : 2V →R with f(∅) = 0, where 2V denotes the set of all subsets of V , and the clustering cost of a partition P = {S1, S2, . . . , Sk} is defined by f[P] = f(S1) + · · · + f(Sk). A number of set functions that represent the inhomogeneity, including cut functions of graphs and entropy functions, are known to be submodular [3, 4]. Throughout of this paper, we suppose that f is submodular, that is, f(S) + f(T) ≥f(S ∪T) + f(S ∩T) for all S, T ⊆V . A submodular function is known to be a discrete counterpart of a convex function, and in recent years, its importance has been recognized in the field of machine learning. For any given integer k with 1 ≤k ≤n, where n is the number of points in V , a partition P of V is called a k-partition if there are exactly k nonempty elements in P, and is called an optimal k-clustering if P is a k-partition that minimizes the cost f[P] among all k-partitions. A problem of finding an optimal k-clustering is widely studied in combinatorial optimization and various fields, and it is recognized as a natural formulation of a clustering problem [8, 9, 10]. Even if f is a cut function of a graph, which is submodular and symmetric, that is, f(V −S) = f(S) for all S ⊆V , this problem is known to be NP-hard unless k can be regarded as a constant [5]. Zhao et al. [17] and Narasimhan et al. [10] dealt with the case when f is submodular and symmetric. Zhao et al. [17] gave a 2(1−1/k)-approximation algorithm using Queyranne’s symmetric submodular function minimization algorithm [13]. Narasimhan et al. [10] showed that Queyranne’s algorithm can be used 1 for clustering problems with some specific natural criteria. For a general submodular function and a small constant k, constant factor approximation algorithms for optimal k-clusterings are designed in [12, 18]. In addition, balanced clustering problems with submodular costs are studied in [8, 9]. Generally speaking, it is difficult to find an optimal k-clustering for any given k because the optimization problem is NP-hard even for simple special cases. Furthermore, the number of clusters has to be determined in advance, regardless of the property of the data points, or an additional computation is required to find a proper number of clusters via some method like cross-validation. In this paper, we introduce a new clustering criterion to resolve the above shortcomings of previous approaches [10]. In the minimum average cost (MAC) clustering problem we consider, the objective function is the average cost of a partition P which combines the clustering cost f[P] and the number of clusters |P|. Now the number of clusters is not pre-determined, but it will be determined automatically by solving the combinatorial optimization problem. We argue that the MAC clustering problem represents a natural clustering criterion. In this paper, we show that the Dilworth truncation of an intersecting submodular function [2] (see also Chapter II of Fujishige [4] and Chapter 48 of Schrijver [14]) can be used to solve the clustering problem exactly and efficiently. To the best of our knowledge, this is the first time that the theory of intersecting submodular functions is used for clustering. The MAC clustering problem can be parameterized with a real-valued parameter β ≥0, and the problem with respect to β asks for a partition P of V that minimizes the average cost under a constraint |P| > β. The main contribution of this paper is a polynomial time algorithm that solves the MAC clustering problem exactly for any given parameter β. This result is in stark contrast to the NP-hardness of the optimal k-clustering problems. Even more surprisingly, our algorithm computes all information about MAC clusterings for all parameters in polynomial time in total. In the case where f is a cut function of a graph, there are some related works. If f is a cut function and β = 1, the optimal value of the MAC clustering problem coincides with the strength of a graph [1]. In addition, the computation of the principal sequence of partitions of a graph [7] is a special case of the parametrized MAC clustering problem in an implicit way. This paper is organized as follows. In Section 2, we formulate the minimum average cost clustering problem, and show a structure property of minimum average cost clusterings. In Section 3, we propose a framework of our algorithm for the minimum average cost clustering problem. In Section 4, we explain the basic results on the theory of intersecting submodular functions, and describe the Dilworth truncation algorithm which is used in Section 3 as a subroutine. Finally, we show the result of computational experiments in Section 5, and give concluding remarks in Section 6. 2 Minimum Average Cost Clustering In this section, we give a definition of minimum average cost clusterings. After that, we show a structure property of them. Let V be a given set of n data points, and let f : 2V →R be a nonnegative submodular function with f(∅) = 0, which is not necessarily symmetric. For each subset S ⊆V , the value f(S) represents the inhomogeneity of data points in S. For a partition P = {S1, . . . , Sk}, the clustering cost is defined by f[P] = f(S1) + · · · + f(Sk). We will introduce the minimum average cost criterion in order to make consideration of both the clustering cost f[P] and the number of clusters |P|. 2.1 Definition Consider a k-partition P of V with k > 1, and compare P with a trivial partition {V } of V . Then, the number of clusters has increased by k −1 and the clustering cost has increased by f[P] + c, where c is a constant. Therefore, it is natural to define an average cost of P by f[P]/(|P| −1). Suppose that P∗is a partition of V that minimizes the average cost among all partitions P of V with |P| > 1. Remark that the number of clusters of P∗is determined not by us, but by the property of the given data set. Therefore, it may be said that P∗is a natural clustering. More generally, using a parameter β ∈[0, n) = {τ ∈R : 0 ≤τ < n}, we define an extended average cost by f[P]/(|P| −β). For any parameter β ∈[0, n), we consider the minimum average cost (MAC) clustering problem λ(β) := min P {f[P]/(|P| −β) : P is a partition of V , |P| > β} . (1) 2 Let us say that a partition P is a β-MAC clustering if P is optimal for the problem (1) with respect to β ∈[0, n). Naturally, the case where β = 1 is fundamental. Furthermore, we can expect finer clusterings for relatively large parameters. The problem (1) and the optimal k-clustering problem [10] are closely related. Proposition 1. Let P be a β-MAC clustering for some β ∈[0, n), and set k := |P|. Then we have f[P] ≤f[Q] for any k-partition Q of V . In other words, P is an optimal k-clustering. Proof. By definition, we have k > β and f[P]/(k −β) ≤f[Q]/(k −β) for any k-partition Q. We will show that all information about β-MAC clusterings for all parameters β can be computed in polynomial time in total. Our algorithm requires the help of the theory of intersecting submodular functions [4, 14]. Proposition 1 says that if there exists a β-MAC clustering P satisfying |P| = k, then we obtain an optimal k-clustering. Note that this fact is consistent with the NP-hardness of the optimal k-clustering problem because the information about MAC clusterings just gives a portion of the information about optimal k-clusterings (k = 1, . . . , n). 2.2 Structure property We will investigate the structure of all β-MAC clusterings. Denote by R+ the set of nonnegative real values. Let us choose a parameter β ∈[0, n). If P is a partition of V satisfying |P| ≤β, we have −βλ ≤−|P|λ ≤f[P] −|P|λ for all λ ∈R+. Hence the minimum average cost λ(β) defined in (1) is represented as λ(β) = max{λ ∈R+ : λ ≤f[P]/(|P| −β) for all partition P of V with |P| > β} = max{λ ∈R+ : −βλ ≤f[P] −|P|λ for all partition P of V } = max{λ ∈R+ : −βλ ≤h(λ)}, (2) where h : R+ →R is defined by h(λ) = min P {f[P] −|P|λ : P is a partition of V } (λ ≥0). (3) The function h does not depend on the parameter β. For λ ≥0, we say that a partition P determines h at λ if f[P] −|P|λ = h(λ). Apparently, the minimization problem (3) is difficult to solve for any given λ ≥0. This point will be discussed in Section 4 in detail. Let us examine properties of the function h. For each partition P of V , define a linear function hP : R+ →R as hP(λ) = f[P] −|P|λ. Since h is the minimum of these linear functions, h is a piecewise-linear concave function on R+. The function h is illustrated in Figure 1 by the thick curve. We have h(0) = f(V ) because f[{V }] ≤f[P] for any partition P of V . Moreover, it is easy to see that the set of singletons {{1}, {2}, . . . , {n}} determines h at a sufficiently large λ. In view of (2), the minimum average cost λ(β) can be obtained by solving the equation −βλ = h(λ) (see also Figure 1). In addition, a β-MAC clustering can be characterized as follows. Lemma 2. Given a parameter β ∈[0, n), let P be a partition of V such that |P| > β and h(λ(β)) = f[P] −|P|λ(β). Then P is a β-MAC clustering. Proof. Since −βλ(β) = h(λ(β)) = f[P] −|P|λ(β), we have λ(β) = f[P]/(|P| −β). For any partition Q of V with |Q| > β, we have −βλ(β) ≤f[Q] −|Q|λ(β), and thus λ(β) ≤ f[Q]/(|Q| −β). Therefore, P is a β-MAC clustering. 0 λ ( β ) h (λ) λ − β λ hP (λ) = f [P] - |P| λ f (V ) Figure 1: The function h 0 h (λ) I1 I2 I3 B1 B3 B2 I4 λ λ (0) 0 h (λ) Ps1 λ Ps2 Ps3 Ps4 Ps5 (a) (b) Figure 2: The structure of h Now, we will present a structure property of the MAC problem (1). Suppose that the slopes of h take values −s1 > −s2 > · · · > −sd. As {s1, s2, . . . , sd} ⊆{1, . . . , n}, we have d ≤n. The 3 interval R+ is split into d subintervals R1 = [0, λ1), R2 = [λ1, λ2), . . . , Rd = [λd−1, +∞) such that, for each j = 1, . . . , d, the function h is linear and its slope is −sj on Rj. Let Ps1, Ps2, . . . , Psd be partitions of V such that, for each j = 1, . . . , d, the partition Psj determines h at all λ ∈Rj (see Figure 2 (a)). In particular, sd = n and the last partition Psd is the set of singletons {{1}, {2}, . . . , {n}}. Observe that the range I of the minimum average costs λ(β) is I = [λ(0), +∞). Suppose that j∗is an index such that λ(0) ∈Rj∗. Let d∗= d −j∗+ 1, and let λ∗ j = λj+j∗−1 and s∗ j = sj+j∗−1 for each j = 1, . . . , d∗. The interval I is split into d∗subintervals I1 = [λ(0), λ∗ 1), I2 = [λ∗ 1, λ∗ 2), . . . , Id∗= [λ∗ d∗−1, +∞). Accordingly, the domain of β is split into d∗subintervals B1 = [0, β1), B2 = [β1, β2), . . . , Bd = [βd∗−1, n), where βj = −h(λ∗ j)/λ∗ j for each j = 1, . . . , d∗−1. Figure 2 (b) illustrates these two sets of subintervals {I1, . . . , Id∗} and {B1, . . . , Bd∗}. By Lemma 2, we directly obtain the structure property of the MAC problem (1): Lemma 3. Let j ∈{1, . . . , d∗}. For any β ∈Bj, the partition Ps∗ j is a β-MAC clustering. Lemma 3 implies that if we can find the collection {Ps1, Ps2, . . . , Psd}, then the MAC problem (1) will be completely solved. In the subsequent sections, we will give an algorithm that computes the collection {Ps1, Ps2, . . . , Psd} in polynomial time in total. 3 The clustering algorithm In this section, we present a framework of a polynomial time algorithm that finds the collection {Ps1, Ps2, . . . , Psd} defined in §2.2. That is, our algorithm computes all the breakpoints of the piecewise linear concave function h defined in (3). By Lemma 3, we can immediately construct a polynomial time algorithm that solves the MAC problem (1) completely. The proposed algorithm uses the following procedure FINDPARTITION, which will be described in Section 4 precisely. Procedure FINDPARTITION(λ): For any given λ ≥0, this procedure computes the value h(λ) and finds a partition P of V that determines h at λ. We will use SFM(n) to denote the time required to minimize a general submodular function defined on 2V , where n = |V |. Submodular function minimization can be solved in polynomial time (see [6]). Although the minimization problem (3) is apparently hard, we show that the procedure FINDPARTITION can be designed to run in polynomial time. Lemma 4. For any λ ≥0, the procedure FINDPARTITION(λ) runs in O(n · SFM(n)). The proof of Lemma 4, which will be given in §4, utilizes the Dilworth truncation of an intersecting submodular function [4, 14]. Let us call a partition P of V supporting if there exists λ ≥0 such that h(λ) = hP(λ). By definition, each Psj is supporting. In addition, for any λ ≥0, FINDPARTITION(λ) returns a supporting partition of V . Set Q1 := {V } and Qn := {{1}, {2}, . . . , {n}}. Q1 is a supporting partition of V because h(0) = f[{V }] = hQ1(0), and Qn is also supporting because Qn = Psd. For a supporting partition P of V , if |P| = sj for some j ∈{1, . . . , d}, then we can put Psj = P. For integers 1 ≤k < ℓ≤n, define R(k, ℓ) = {λ ∈R+ : −k ≥∂+h(λ), and ∂−h(λ) ≥−ℓ}, where ∂+h and ∂−h are the right and left derivatives of h, respectively, and we set ∂−h(0) = 0. Observe that R(k, ℓ) is an interval in R+. All breakpoints of h are included in R(1, n) = R+. Suppose that we are given two supporting partitions Qk and Qℓsuch that |Qk| = k, |Qℓ| = ℓ and k < ℓ. We describe the algorithm SPLIT(Qk, Qℓ), which computes the information about all breakpoints of h on the interval R(k, ℓ). This algorithm is a recursive one. First of all, the algorithm SPLIT decides whether “k = sj and ℓ= sj+1 for some j ∈{1, . . . , d −1}” or not. Besides, if the decision is negative, the algorithm finds a supporting partition Qm such that |Qm| = m and k < m < ℓ. If the decision is positive, there is exactly one breakpoint on the interior of R(k, ℓ), which can be given by Qk and Qℓ. Now we show how to execute these operations. For two linear functions hQk(λ) and hQℓ(λ), the equality hQk(λ) = hQℓ(λ) holds at λ = (f[Qℓ]−f[Qk])/(ℓ−k). Set h = hQk(λ) = (ℓf[Qk] −kf[Qℓ])/(ℓ−k). Clearly, we have h(λ) ≤h. The algorithm SPLIT performs the procedure FINDPARTITION(λ). Consider the case where h(λ) = h (see Figure 3 (a)). Then algorithm gives an affirmative answer, returns Qk and Qℓ, and stops. Next, consider the case where h(λ) < h (see Figure 3 (b)). Then the algorithm gives a negative answer, and the partition 4 P returned by FINDPARTITION is supporting and satisfies k < |P| < ℓ. We set m = |P| and Qm = P. Finally, the algorithm performs SPLIT(Qk, Qm) and SPLIT(Qm, Qℓ). 0 h (λ) λ 0 h (λ) λ (a) (b) (λ, h) (λ, h) hQk (λ) hQk (λ) hQℓ(λ) hQℓ(λ) Figure 3: Two different situations in SPLIT(Qk, Qℓ) The algorithm SPLIT can be summarized as follows. Algorithm SPLIT(Qk, Qℓ) Input : Supporting partitions of V , Qk and Qℓsuch that |Qk| = k, |Qℓ| = ℓand k < ℓ. Output : The information about all breakpoints of h on the interval R(k, ℓ). 1: Set λ := (f[Qℓ]−f[Qk])/(ℓ−k), and set h := (ℓf[Qk]−kf[Qℓ])/(ℓ−k). By performing FINDPARTITION(λ), compute h(λ) and a partition P of V that determines h(λ). 2: If h(λ) = h (positive case), return Qk and Qℓ, and stop. 3: If h(λ) < h (negative case), set m := |P|, Qm := P, and perform SPLIT(Qk, Qm) and SPLIT(Qm, Qℓ). By performing the algorithm SPLIT(Q1, Qn), where Q1 := {V } and Qn := {{1}, {2}, . . . , {n}}, the information of all breakpoints of h is obtained. Therefore, the collection {Ps1, Ps2, . . . , Psd} defined in §2.2 can be obtained. Let us show that this algorithm runs in polynomial time. Theorem 5. The collection {Ps1, Ps2, . . . , Psd} can be computed in O(n2 · SFM(n)) time. In other words, the information of all breakpoints of h can be computed in O(n2 · SFM(n)) time. Proof. By Lemma 4, it suffices to show that the number of calls of the procedure FINDPARTITION in the execution of SPLIT(Q1, Qn) is O(n). In the algorithm, after one call of FINDPARTITION, (i) we can obtain the information about one breakpoint of h, or (ii) a new supporting partition Qm can be obtained. Clearly, the number of breakpoints of h is at most n. Throughout the execution of SPLIT(Q1, Qn), the algorithm computes a supporting k-partition at most once for each k ∈ {1, . . . , n}. Therefore, FINDPARTITION is called at most 2n times in total. The main theorem of this paper directly follows from Lemma 3 and Theorem 5. Theorem 6. All information of optimal solutions to the minimum average cost clustering problem (1) for all parameters β ∈[0, n) can be computed in O(n2 · SFM(n)) time in total. 4 Finding a partition In the clustering algorithm of Section 3, we iteratively call the procedure FINDPARTITION, which computes h(λ) defined in (3) and a partition P that determines h(λ) for any given λ ≥0. In this section, we will see that the procedure FINDPARTITION can be implemented to run in polynomial time with the aid of the Dilworth truncation of an intersecting submodular function [2], and give a proof of Lemma 4. The Dilworth truncation algorithm is sketched in the proof of Theorem 48.4 of Schrijver [14], and the algorithm described in §4.2 is based on that algorithm. 4.1 The Dilworth truncation of an intersecting submodular function We start with definitions of an intersecting submodular function and the Dilworth truncation. Subsets S, T ⊆V are intersecting if S ∩T ̸= ∅, S \ T ̸= ∅, and T \ S ̸= ∅. A set function g : 2V →R is intersecting submodular if g(S) + g(T) ≥g(S ∪T) + g(S ∩T) for all intersecting subsets S, T ⊆V . Clearly, the fully submodular function1 f is also intersecting submodular. For any λ ≥0, 1To emphasize the difference between submodular and intersecting submodular functions, in what follows we refer to a submodular function as a fully submodular function. 5 define fλ : 2V →R as follows: fλ(S) = 0 if S = ∅, and fλ(S) = f(S) −λ otherwise. It is easy to see that fλ is an intersecting submodular function. For a fully submodular function f with f(∅) = 0, consider a polyhedron P(f) = {x ∈Rn : x(S) ≤ f(S), ∅̸= ∀S ⊆V }, where x(S) = P i∈S xi. The polyhedron P(f) is called a submodular polyhedron. In the same manner, for an intersecting submodular function g with g(∅) = 0, define P(g) = {x ∈Rn : x(S) ≤g(S), ∅̸= ∀S ⊆V }. As for P(f), for each nonempty subset S ⊆V , there exists a vector x ∈P(f) such that x(S) = f(S) by the validity of the greedy algorithm of Edmonds [3]. On the other hand, the polyhedron P(g) does not necessarily satisfy such a property. Alternatively, the following property is known. Theorem 7 (Refer to Theorems 2.5, 2.6 of [4]). Given an intersecting submodular function g : 2V →R with g(∅) = 0, there exists a fully submodular function bg : 2V →R such that bg(∅) = 0 and P(bg) = P(g). Furthermore, the function bg can be represented as bg(S) = min{P S∈P g(S) : P is a partition of S}. (4) The function bg in Theorem 7 is called the Dilworth truncation of g. If g is fully submodular, for each S ⊆V , {S} is an optimal solution to the RHS of (4) and we have bg(S) = g(S). For a general intersecting submodular function g, however, the computation of bg(S) is a nontrivial task. Let us see a small example. Suppose that a fully submodular function f : 2{1, 2} →R satisfies f(∅) = 0, f({1}) = 12, f({2}) = 8, and f({1, 2}) = 19. Set λ = 2. There is no vector x ∈P(fλ) such that x({1, 2}) = fλ({1, 2}). The Dilworth truncation bfλ : 2V →R defined by (4) satisfies bfλ(S) = fλ(S) for S ∈{∅, {1}, {2}}, and bfλ({1, 2}) = fλ({1}) + fλ({2}) = 16. Observe that bfλ is fully submodular and P( bfλ) = P(fλ). Figure 4 illustrates these polyhedra. 12 10 10 8 19 0 6 17 0 6 16 0 x1 x2 x1 x2 x1 x2 P(f) P(fλ) P( b fλ) Figure 4: Polyhedra P(f), P(fλ), and P( bfλ) 0 6 10 x1 x0 x2 10 e1 x1 0 6 10 x1 x0 x2 x1 6 e2 x2 Figure 5: The greedy algorithm [3] 4.2 Algorithm that finds a partition Let us fix λ ≥0, and describe FINDPARTITION(λ). In view of equations (3), (4) and the definition of bfλ, we obtain h(λ) = bfλ(V ) using the Dilworth truncation of fλ. We ask for a partition P of V satisfying bfλ(V ) = fλ[P] (= P T ∈P fλ(T)) because such a partition P of V determines h at λ. We know that bfλ : 2V →R is submodular, but bfλ(S) = min{fλ[P] : P is a partition of S} cannot be obtained directly for each S ⊆V . To evaluate bfλ(V ), we will use the greedy algorithm of Edmonds [3]. Denote the set of all extreme points of P( bfλ) ⊆Rn by ex(P( bfλ)). In the example of §4.1, we have ex(P( bfλ)) = {(10, 6)}. We set x0 ∈Rn in such a way that x0 ≤y for all y ∈ex(P( bfλ)). For example, set x0 i := −M for each i ∈V , where M = λ + P j∈V {|f({j})| + |f(V ) −f(V −{j})|}. For each i ∈V , let ei denote the i-th unit vector in Rn. Let L = (i1, . . . , in) be any ordering of V , and let V ℓ= {i1, . . . , iℓ} for each ℓ= 1, . . . , n. Now we describe the framework of the greedy algorithm [3]. In the ℓ-th iteration (ℓ= 1, . . . , n), we compute αℓ:= max{α : xℓ−1 + α · eiℓ∈P( bfλ)} and set xℓ:= xℓ−1 + αℓ· eiℓ. Finally, the algorithm returns z := xn. Figure 5 illustrates this process. By the following property, we can use the greedy algorithm to evaluate the value h(λ) = bfλ(V ). Theorem 8 ([3]). For each ℓ= 1, . . . , n, we have bfλ(V ℓ) = xℓ(V ℓ) = z(V ℓ). 6 Let us see that the greedy algorithm with bfλ can be implemented to run in polynomial time. We discuss how to compute αℓin each iteration. Since xℓ−1 ∈P( bfλ) and P( bfλ) = P(fλ), we have αℓ= max{α : xℓ−1 + α · eiℓ∈P(fλ)} = max{α : xℓ−1(S) + α ≤fλ(S), iℓ∈∀S ⊆V } = min{f(S) −xℓ−1(S) −λ : iℓ∈∀S ⊆V } = min{f(S) −xℓ−1(S) −λ : iℓ∈∀S ⊆V ℓ}, (5) where the last equality holds because of the choice of the initial vector x0 (remark that xℓ−1 i = x0 i for all i ∈V −V ℓ). Hence, the value αℓcan be computed by minimizing a fully submodular function. It follows from Theorem 8 that the value h(λ) = bfλ(V ) can be computed in O(n · SFM(n)) time. In addition to the value h(λ), a partition P of V such that f[P] −λ|P| = h(λ) is also required. For this purpose, we modify the above greedy algorithm, and obtain the procedure FINDPARTITION. Procedure FINDPARTITION(λ) Input : A nonnegative real value λ ≥0. Output : A real value hλ and a partition Pλ of V . 1: Set P0 := ∅. 2: For each ℓ= 1, . . . , n, do: Compute αℓ= min{f(S) −xℓ−1(S) −λ : iℓ∈∀S ⊆V ℓ}; Find a subset T ℓsuch that iℓ∈T ℓ⊆V ℓand f(T ℓ) −xℓ−1(T ℓ) −λ = αℓ; Set xℓ:= xℓ−1 + αℓ· eiℓ, set U ℓ:= T ℓ∪[ ∪{S : S ∈Pℓ−1, T ℓ∩S ̸= ∅}], and set Pℓ:= {U ℓ} ∪{S : S ∈Pℓ−1, T ℓ∩S = ∅}. 3: Return hλ := z(V ) and Pλ := Pn. Basically, this procedure FINDPARTITION(λ) is the same algorithm as the above greedy algorithm. But now, we compute Pℓin each iteration. Figure 6 shows the computation of Pℓin the ℓ-th iteration of the procedure FINDPARTITION(λ). For each ℓ= 1, . . . , n, Pℓis a partition of V ℓ= {i1, . . . , iℓ}. Thus, Pλ is a partition of V . iℓ Pℓ−1 Pℓ T ℓ U ℓ Figure 6: Computation of Pℓ Let x be a vector in P(fλ). We say that a subset S ⊆V is x-tight (with respect to fλ) if fλ(S) = x(S). By the intersecting submodularity of fλ, if S and T are intersecting and both S and T are x-tight, then S ∪T is also x-tight. Using this property, we obtain the following property. Lemma 9. For each ℓ= 1, . . . , n, we have bfλ(V ℓ) = xℓ(V ℓ) = fλ[Pℓ]. Proof. (Sketch) For each ℓ= 1, . . . , n, observe that T ℓis xℓ-tight. Thus, we can show by induction that any cluster in Pℓis xℓ-tight for each ℓ= 1, . . . , n. Thus, fλ[Pℓ] = P S∈Pℓfλ(S) = P S∈Pℓxℓ(S) = xℓ(V ℓ). Moreover, the equality bfλ(V ℓ) = xℓ(V ℓ) follows from Theorem 8. The procedure FINDPARTITION(λ) returns hλ ∈R and Pλ. By Theorem 8, we have hλ = h(λ), and by Lemma 9, we have bfλ(V ) = fλ[Pλ], and thus the partition Pλ of V determines h(λ). Clearly, the procedure runs in O(n · SFM(n)) time. So, in the end, we completed the proof of Lemma 4. 5 Experimental results 5.1 Illustrative example We first illustrate the proposed algorithm using two artificial datasets depicted in Figure 7. The above dataset is generated from four Gaussians with unit variance (whose centers are located at (3,3), (3,3), (-3,3) and (-3,-3), respectively), and the below one consists of three cycles with different radii with a line. The numbers of samples in these examples are 100 and 310, respectively. Figure 7 shows the typical examples of partitions calculated through Algorithm SPLIT given in Section 3. Now the function f is a cut function of a complete graph and the weight of each edge of that graph is determined by the Gaussian similarity function [15]. The values of λ above the figures are the 7 λ = 0.19 ̻ ̻ ̻     ̻ ̻ ̻     λ = 0.54 ̻ ̻ ̻     ̻ ̻ ̻     λ = 5.21 ̻ ̻ ̻     ̻ ̻ ̻     λ = 0.87 ̻ ̻ ̻     ̻ ̻ ̻     λ = 3.22 ̻ ̻ ̻     ̻ ̻ ̻     λ = 4.90 ̻ ̻ ̻     ̻ ̻ ̻     Figure 7: Illustrative examples with datasets from four Gaussians (above) and three circles (below). ones identified as breakpoints. Note several partitions other than shown in the figures were obtained through one execution of Algorithm SPLIT. As can be seen, the algorithm produced several different sizes of clusters with inclusive relations. 5.2 Empirical comparison Next, in this subsection, we empirically compare the performance of the algorithm with the existing algorithms using several synthetic and real world datasets from the UCI repository. The compared algorithms are k-means method, spectral-clustering method with normalized-cut [11] and maximum-margin clustering [16], and we used cut functions as the objective functions for the MAC clustering algorithm. The three UCI datasets used in this experiment are ’Glass’, ’Iris’ and ’Libras’ which respectively consist of 214, 150 and 360 samples, respectively. For the existing algorithms, the number of clusters was selected through 5-fold cross-validation (again note that our algorithm needs no such hyper-parameter tuning). Table 1 shows the clustering accuracy when applying the algorithms to two artificial (stated in Subsection 5.1 and three UCI datasets. For our algorithm, the results with the best performance between among several partitions are shown. As can be seen, our algorithm seems to be competitive with the existing leading algorithms for these datasets. Gaussian Circle Iris Libras Glass k-means 1.0 0.88 0.79 0.85 0.93 normalized cut 0.88 0.86 0.84 0.87 0.93 maximum margin 0.99 1.0 0.96 0.90 0.97 minimum average 0.99 1.0 0.99 0.97 0.97 Table 1: Clustering accuracy for the proposed and existing algorithms. 6 Concluding remarks We have introduced the new concept, the minimum average cost clustering problem. We have shown that the set of minimum average cost clusterings has a compact representation, and if the clustering cost is given by a submodular function, we have proposed a polynomial time algorithm that compute all information about minimum average cost clusterings. This result contrasts sharply with the NPhardness of the optimal k-clustering problem [5]. The present paper reinforced the importance of the theory of intersecting submodular functions from the viewpoint of clustering. Acknowledgments This work is supported in part by JSPS Global COE program “Computationism as a Foundation for the Sciences”, KAKENHI (20310088, 22700007, and 22700147), and JST PRESTO program. We would also like to thank Takuro Fukunaga for his helpful comments. 8 References [1] W. H. Cunningham: Optimal attack and reinforcement of a network. Journal of the ACM 32 (1985), pp. 549–561. [2] R. P. Dilworth: Dependence relations in a semimodular lattice. Duke Mathematical Journal, 11 (1944), pp. 575–587. [3] J. Edmonds: Submodular functions, matroids, and certain polyhedra. Combinatorial Structures and Their Applications, R. Guy, H. Hanani, N. Sauer, and J. Sch¨onheim, eds., Gordon and Breach, 1970, pp. 69–87. [4] S. Fujishige: Submodular Functions and Optimization (Second Edition). Elsevier, Amsterdam, 2005. [5] O. Goldschmidt and D. S. Hochbaum: A polynomial algorithm for the k-cut problem for fixed k, Mathematics of Operations Research, 19 (1994), pp. 24–37. [6] S. Iwata: Submodular function minimization. Mathematical Programming, 112 (2008), pp. 45–64. [7] V. Kolmogorov: A faster algorithm for computing the principal sequence of partitions of a graph. Algorithmica 56, pp. 394-412. [8] Y. Kawahara, K. Nagano, and Y. Okamoto: Submodular fractional programming for balanced clustering. Pattern Recognition Letters, to appear. [9] M. Narasimhan and J. Bilmes: Local search for balanced submodular clusterings. In Proceedings of the 12th International Joint Conference on Artificial Intelligence (IJCAI 2007), pp. 981–986. [10] M. Narasimhan, N. Jojic, and J. Bilmes: Q-clustering. In Advances in Neural Information Processing Systems, 18 (2006), pp. 979–986. Cambridge, MA: MIT Press. [11] A. Y. Ng, M. I. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. [12] K. Okumoto, T. Fukunaga, and H. Nagamochi: Divide-and-conquer algorithms for partitioning hypergraphs and submodular systems. In Proceedings of the 20th International Symposium on Algorithms and Computation (ISAAC 2009), LNCS 5878, 2009, pp. 55–64. [13] M. Queyranne: Minimizing symmetric submodular functions, Mathematical Programming, 82 (1998), pp. 3–12. [14] A. Schrijver: Combinatorial Optimization — Polyhedra and Efficiency. Springer-Verlag, 2003. [15] U. von Luxburg: Tutorial on spectral clustering. Statistics and Computing 17 (2007), pp. 395– 416. [16] L. Xu, J. Neufeld, B. Larson, and D. Schuurmans. Maximum margin clustering. Advances in neural information processing systems, 17:1537–1544, 2005. [17] L. Zhao, H. Nagamochi, and T. Ibaraki: Approximating the minimum k-way cut in a graph via minimum 3-way cuts. Journal of Combinatorial Optimization, 5 (2001), pp. 397–410. [18] L. Zhao, H. Nagamochi, and T. Ibaraki: A unified framework for approximating multiway partition problems. In Proceedings of the 12th International Symposium on Algorithms and Computation (ISAAC 2001), LNCS 2223, 2001, pp. 682–694. 9
2010
191
3,956
Online Classification with Specificity Constraints Andrey Bernstein Department of Electrical Engineering Technion - Israel Institute of Technology Haifa, 32000, Israel andreyb@tx.technion.ac.il Shie Mannor Department of Electrical Engineering Technion - Israel Institute of Technology Haifa, 32000, Israel shie@ee.technion.ac.il Nahum Shimkin Department of Electrical Engineering Technion - Israel Institute of Technology Haifa, 32000, Israel shimkin@ee.technion.ac.il Abstract We consider the online binary classification problem, where we are given m classifiers. At each stage, the classifiers map the input to the probability that the input belongs to the positive class. An online classification meta-algorithm is an algorithm that combines the outputs of the classifiers in order to attain a certain goal, without having prior knowledge on the form and statistics of the input, and without prior knowledge on the performance of the given classifiers. In this paper, we use sensitivity and specificity as the performance metrics of the meta-algorithm. In particular, our goal is to design an algorithm that satisfies the following two properties (asymptotically): (i) its average false positive rate (fp-rate) is under some given threshold; and (ii) its average true positive rate (tp-rate) is not worse than the tp-rate of the best convex combination of the m given classifiers that satisfies fprate constraint, in hindsight. We show that this problem is in fact a special case of the regret minimization problem with constraints, and therefore the above goal is not attainable. Hence, we pose a relaxed goal and propose a corresponding practical online learning meta-algorithm that attains it. In the case of two classifiers, we show that this algorithm takes a very simple form. To our best knowledge, this is the first algorithm that addresses the problem of the average tp-rate maximization under average fp-rate constraints in the online setting. 1 Introduction Consider the binary classification problem, where each input is classified into +1 or −1. A classifier is an algorithm which, for every input, classifies that input. In general, classifiers may produce the probability of the input to belong to class 1. There are several metrics for the performance of the classifier in the offline setting, where a training set is given in advance. These include error (or mistake) count, true positive rate, and false positive rate; see [6] for a discussion. In particular, the true positive rate (tp-rate) is given by the fraction of the number of positive instances correctly classified out of the total number of the positive instances, while false positive rate (fp-rate) is given by the fraction of the number of negative instances incorrectly classified out of the total number of the negative instances. A receiver operating characteristics (ROC) graph then depicts different classifiers using their tp-rate on the Y axis, while fp-rate on the X axis (see [6]). We note that there are alternative names for these metrics in the literature. In particular, the tp-rate is also called sensitivity, while one minus the fp-rate is usually called specificity. In what follows, we prefer to use the terms tp-rate and fp-rate, as we think that they are self-explaining. 1 In this paper we focus on the online classification problem, where no training set is given in advance. We are given m classifiers, which at each stage n = 1, 2, ... map the input instance to the probability of the instance to belong to the positive class. An online classification meta-algorithm (or a selection algorithm) is an algorithm that combines the outputs of the given classifiers in order to attain a certain goal, without prior knowledge on the form and statistics of the input, and without prior knowledge on the performance of the given classifiers. The assumption is that the observed sequence of classification probabilities and labels comes from some unknown source and, thus, can be arbitrary. Therefore, it is convenient to formulate the online classification problem as a repeated game between an agent and some abstract opponent that stands for the collective behavior of the classifiers and the realized labels. We note that, in this formulation, we can identify the agent with a corresponding online classification meta-algorithm. There is a rich literature that deals with the online classification problem, in the competitive ratio framework, such as [5, 1]. In these works, the performance guarantees are usually expressed in terms of the mistake bound of the algorithm. In this paper, we take a different approach. Our performance metrics will be the average tp-rate and fp-rate of the meta-algorithm, while the performance guarantees will be expressed in the regret minimization framework. In a seminal paper, Hannan [8] introduced the optimal reward-in-hindsight r∗ n with respect to the empirical distribution of opponent’s actions, as a performance goal of an online algorithm. In our case, r∗ n is in fact the maximal tp-rate the agent could get at time n by knowing the classification probabilities and actual labels beforehand, using the best convex combination of the classifiers. The regret is then defined as the difference between r∗ n and the actual average tp-rate obtained by the agent. Hannan showed in [8] that there exist online algorithms whose regret converges to zero (or below) as time progresses, regardless of the opponent’s actions, at 1/√n rate. Such algorithms are often called no-regret, Hannan-consistent, or universally consistent algorithms. Additional no-regret algorithms were proposed in the literature over the years, such as Blackwell’s approachability-based algorithm [2] and weighted majority schemes [10, 7] (see [4] for an overview of these and other related algorithms). These algorithms can be directly applied to the problem of online classification when the goal is only to obtain no-regret with respect to the optimal tp-rate in hindsight. However, in addition to tp-rate maximization, some performance guarantees in terms of the fprate are usually required. In particular, it is reasonable to require (following the Neyman-Pearson approach) that, in the long term, the average fp-rate of the agent will be below some given threshold 0 < γ < 1. In this case the tp-rate can be considered as the average reward obtained by the agent, while fp-rate – as the average cost. This is in fact a special case of the regret minimization problem with constraints whose study was initiated by Mannor et al. in [11]. They defined the constrained reward-in-hindsight with respect to the empirical distribution of opponent’s actions, as a performance goal of an online algorithm. This quantity is the maximal average reward the agent could get in hindsight, had he known the opponent’s actions beforehand, by using any fixed (mixed) action, while satisfying the average cost constraints. The desired online algorithm then has to satisfy two requirements: (i) it should have a vanishing regret (with respect to the constrained reward-in-hindsight); and (ii) it should asymptotically satisfy the average cost constraints. It is shown in [11] that such algorithms do not exist in general. The positive result is that a relaxed goal, which is defined in terms of the convex hull of the constrained reward-in-hindsight over an appropriate space, is attainable. The two no-regret algorithms proposed in [11] explicitly involve either the convex hull or a calibrated forecast of the opponent’s actions. Both of these algorithms may not be computationally feasible, since there are no efficient (polynomial time) procedures for the computation of both the convex hull and a calibrated forecast. In this paper, we take an alternative approach to that of [11]. Instead of examining the constrained tp-rate in hindsight (or its convex hull), our starting point is the “standard” regret with respect to the optimal (unconstrained) tp-rate, and we consider a certain relaxation thereof. In particular, we define a simple relaxed form of the optimal tp-rate in-hindsight, by subtracting a positive constant from the latter. We then find the minimal constant needed in order to have a vanishing regret (with respect to this relaxed goal) while asymptotically satisfying the average fp-rate constraint. The motivation for this approach is as follows. We know that if the constraints are always satisfied, then the optimal tp-rate in-hindsight is attainable (using relatively simple no-regret algorithms). On the other hand, when the constraints need to be actively satisfied, we should “pay” some penalty in terms of the attainability of the tp-rate in-hindsight. In our case, we express this penalty in terms of the relaxation constant mentioned above. One of the main contributions of this paper is a computationally 2 feasible online algorithm, the Constrained Regret Matching (CRM) algorithm, that attains the posed performance goal. We note that although we focus in this paper on the online classification problem, our algorithm can be easily extended to the general case of regret minimization under average cost constraints. The paper is structured as follows. In Section 2 we formally define the online classification problem and the goal of the meta-algorithm. In Section 3 we present the general problem of constrained regret minimization, and show that the online classification problem is its special case. In Section 4 we define our relaxed goal in terms of the unconstrained optimal tp-rate in-hindsight, propose the CRM algorithm, and show that it can be implemented efficiently. Section 5 discusses the special case of two classifiers and corresponding experimental results. We conclude in Section 6 with some final remarks. 2 Online Classification We consider the online binary classification problem from an abstract space to {1, −1}. We are given m classifiers that map an input instance to the probability that the instance belongs to the positive class. We denote by A = {1, ...m} the set of indices of the classifiers. An online classification metaalgorithm is an algorithm that combines the outputs of the given classifiers in order to attain a certain goal, without prior knowledge on the form and statistics of the input, and without prior knowledge on the performance of the given classifiers. In what follows, we identify the meta-algorithm with an agent, and use both these notions interchangeably. The time axis is discrete, with index n = 1, 2, .... At stage n, the following events occur: (i) the input instance is presented to the classifiers (but not to the agent); (ii) each classifier a ∈A outputs fn(a) ∈[0, 1], which is the probability of the input to belong to class 1, and simultaneously the agent chooses a classifier an; and (iii) the correct label of the instance, bn ∈{1, −1}, is revealed. There are several standard performance metrics of classifiers. These include error count, truepositive rate (which is also termed recall or sensitivity), and false-positive rate (one minus the fp-rate is usually termed specificity). As discussed in [6], tp-rate and fp-rate metrics have some attractive properties, such as that they are insensitive to changes in class distribution, and thus we focus on these metrics in this paper. In the online setting, no training set is given in advance, and therefore these rates have to be updated online, using the obtained data at each stage. Observe that this data is expressed in terms of the vector zn ≜ {fn(a)}a∈A , bn  ∈[0, 1]m × {−1, 1}. We let rn = r(an, zn) ≜fn(an) I {bn = 1} and cn = c(an, zn) ≜fn(an) I {bn = 0} denote the reward and the cost of the agent at time n. Note that rn is the probability that the instance with positive label at time n will be classified correctly by the agent, while cn is the probability that the instance with negative label will be classified incorrectly. Then, ¯βtp(n) ≜Pn k=1 rk/ Pn k=1 I {bn = 1} and ¯βfp(n) ≜Pn k=1 ck/ Pn k=1 I {bn = −1} are the average tp-rate and fp-rate of the agent at time n, respectively. Our aim is to design a meta-algorithm that will have ¯βtp(n) not worse than the tp-rate of the best convex combination of the m given classifiers (in hindsight), while satisfying ¯βfp(n) ≤γ, for some 0 < γ < 1 (asymptotically, almost surely, for any possible sequence z1, z2, ...). In fact, this problem is a special case of the regret minimization problem with constraints. In the next section we thus present the general constrained regret minimization framework, and discuss its applicability to the case of online classification. 3 Constrained Regret Minimization 3.1 Model Definition We consider the problem of an agent facing an arbitrary varying environment. We identify the environment with some abstract opponent, and therefore obtain a repeated game formulation between the agent and the opponent. The constrained game is defined by a tuple (A, Z, r, c, Γ) where A denotes the finite set of possible actions of the agent; Z denotes the compact set of possible outcomes (or actions) of the environment; r : A × Z →R is the reward function; c : A × Z →Rℓ is the vector-valued cost function; and Γ ⊆Rℓis a convex and closed set within which the average 3 cost vector should lie in order to satisfy the constraints. An important special case is that of linear constraints, that is Γ =  c ∈Rℓ: ci ≤γi, i = 1, ..., ℓ for some vector γ ∈Rℓ. The time axis is discrete, with index n = 1, 2, .... At time step n, the following events occur: (i) The agent chooses an action an, and the opponent chooses an action zn, simultaneously; (ii) the agent observes zn; and (iii) the agent receives a reward rn = r(an, zn) ∈R and a cost cn = c(an, zn) ∈ Rℓ. We let ¯rn ≜1 n Pn k=1 rk and ¯cn ≜1 n Pn k=1 ck denote the average reward and cost of the agent at time n, respectively. Let Hn ≜Zn−1 ×An−1 denote the set of all possible histories of actions till time n. At time n, the agent chooses an action an according to the decision rule πn : Hn →∆(A), where ∆(A) is the set of probability distributions over the set A. The collection π = {πn}∞ n=1 is the strategy of the agent. That is, at each time step, a strategy prescribes some mixed action p ∈∆(A), based on the observed history. A strategy for the opponent is defined similarly. We denote the mixed action of the opponent by q ∈∆(Z), which is the probability density over Z. In what follows, we will use the shorthand notation r(p, q) ≜P a∈A p(a) R z∈Z q(z)r(a, z) for the expected reward under mixed actions p ∈ ∆(A) and q ∈ ∆(Z). The notation r(a, q), c(p, q), c(p, z), c(a, q) will be interpreted similarly. We make the following assumption that the agent can satisfy the constraints in expectation against any mixed action of the opponent. Assumption 3.1 (Satisfiability of Constraints). For every q ∈∆(Z), there exists p ∈∆(A), such that c(p, q) ∈Γ. Assumption 3.1 is essential, since otherwise the opponent can violate the average-cost constraints simply by playing the corresponding stationary strategy q. Let ¯qn(z) ≜Pn k=1 δ {z −zk} /n denote the empirical density of the opponent’s actions at time n, so that ¯qn ∈∆(Z). The optimal reward-in-hindsight is then given by r∗ n(z1, ..., zn) ≜1 n max a∈A n X k=1 r(a, zk) = max a∈A Z z∈Z r(a, z) 1 n n X k=1 δ {z −zk} = max a∈A r(a, ¯qn), implying that r∗ n = r∗(¯qn). In what follows, we will use the term “reward envelope” in order to refer to functions ρ : ∆(Z) →R. The simplest reward envelope is the (unconstrained) bestresponse envelope (BE) ρ = r∗. The n-stage regret of the algorithm (with respect to the BE) is then r∗(¯qn) −¯rn. The no-regret algorithm must ensure that the regret vanishes as n →∞regardless of the opponent’s actions. However, in our case, in addition to vanishing regret, we need to satisfy the cost constraints. Obviously, the BE need not be attainable in the presence of constraints, and therefore other reward envelopes should be considered. Hence, we use the following definition (introduced in [11]) in order to assess the online performance of the agent. Definition 3.1 (Attainability and No-Regret). A reward envelope ρ : ∆(Z) →R is Γ-attainable if there exists a strategy π for the agent such that, almost surely, (i) lim supn→∞(ρ(¯qn) −¯rn) ≤0 , and (ii) limn→∞d(¯cn, Γ) = 0, for every strategy of the opponent. Here, d(·, Γ) is Euclidean set-topoint distance. Such a strategy π is called constrained no-regret strategy with respect to ρ. A natural extension of the BE to the constrained setting was defined in [11], by noting that if the agent knew in advance that the empirical distribution of the opponents actions is ¯qn = q, he could choose the constrained best response mixed action p, which is a solution of the corresponding optimization problem: r∗ Γ(q) ≜max p∈∆(A) {r(p, q) : so that c(p, q) ∈Γ} . (1) We refer to r∗ Γ as the constrained best-response envelope (CBE). The first positive result that appeared in the literature was that of Shimkin [12], which showed that the value vΓ ≜minq∈∆(Z) r∗ Γ(q) of the constrained game is attainable by the agent. The algorithm which attains the value is based on Blackwell’s approachability theory [3], and is computationally efficient provided that vΓ can be computed offline. Unfortunately, it was shown in [11] that r∗ Γ(q) itself is not attainable in general. However, the (lower) convex hull of r∗ Γ(q), conv (r∗ Γ), is attainable1. Two no-regret algorithms with respect to conv (r∗ Γ) are suggested in [11]. To our best knowledge, 1The (lower) convex hull of a function f : X →R is the largest convex function which is nowhere larger than f. 4 these algorithms are inefficient (i.e., not polynomial); these are the only existing constrained noregret algorithms in the literature. It should be noted that the problem that is considered here can not be formulated as an instance of online convex optimization [13, 9] – see [11] for a discussion on this issue. 3.2 Application to the Online Classification Problem For the model described in Section 2, A = {1, ..., m} denotes the set of possible classifiers and Z denotes the set of possible outputs of the classifiers and the true labels, that is: z = {f(a)}a∈A , b  ∈ [0, 1]m × {−1, 1} ≜Z. The reward at time n is rn = r(an, zn) = fn(an) I {bn = 1} and the cost is cn = c(an, zn) = fn(an) I {bn = −1}. Note that in this case, the mixed action of the opponent q ∈∆(Z) is q(f, b) = q(f|b)q(b), where q(f|b) is the conditional density of the predictions of the classifiers and q(b) is the probability of the label b. It is easy to check that r(p, q) = q(1) X a∈A p(a)βtp(q; a), (2) where βtp(q; a) ≜ R f f(a)q(f|1) is the tp-rate of classifier a under distribution q. Regarding the cost, the goal is to keep it under a given threshold 0 < γ < 1. Since the regret minimization framework requires additive rewards and costs, we define the following modified cost function: cγ(a, z) ≜c(a, z) −γ I {b = −1} , and similarly to the reward above, we have that cγ(p, q) = q(−1) X a∈A p(a)βfp(q; a) −γ ! , (3) where βfp(q; a) ≜ R f q(f| −1)f(a) is the fp-rate of classifier a under distribution q. We note that keeping the average fp-rate of the agent ¯βfp(n) ≤ γ is equivalent to keeping (1/n) Pn k=1 cγ(ak, zk) ≤0. Since our goal is to keep the fp-rate below γ, some assumption on classifiers should be imposed in order to satisfy Assumption 3.1. We assume here that the classifiers’ single-stage falsepositive probability is such that it allows satisfying the constraint. In particular, we redefine2 Z ≜{z = (f, b) ∈[0, 1]m × {−1, 1} : if b = −1, f(a) ≤γa} , where 0 ≤γa ≤1, and there exists a∗such that γa∗< γ. Under this assumption, it is clear that for every q ∈∆(Z), there exists p ∈∆(A), such that cγ(p, q) ≤0; in fact this p is the probability mass concentrated on a∗. If additional prior information is available on the single-stage performance of the given classifiers, this may be usefully used to further restrict the set Z. For example, we can also restrict z = (f, 1) by f(a) ≥λa for some 0 < λa < 1. Such additional restrictions will generally contribute to reducing the value of the optimal relaxation parameter α∗(see (7) below). This effect will be explicitly demonstrated in Section 5. We proceed to compute the BE and CBE. Using (2), the BE is r∗(q) ≜max a∈A r(a, q) = q(1) max a∈{1,...,m} {βtp(q; a)} ≜q(1)β∗(q), (4) where β∗(q) is the optimal (unconstrained) tp-rate in hindsight under distribution q. Now, using (1), (2), and (3) we have that r∗ γ(q) = q(1)β∗ γ(q), where β∗ γ(q) ≜max p∈∆(A) (X a∈A p(a)βtp(q; a) : so that X a∈A p(a)βfp(q; a) ≤γ ) , (5) is the optimal constrained tp-rate in hindsight under distribution q. Finally, note that the value of the constrained game vγ ≜minq∈∆(Z) r∗ γ(q) = 0 in this case. As a consequence of this formulation, the algorithms proposed in [11] can be in principle used in order to attain the convex hull of r∗ γ. However, given the implementation difficulties associated with these algorithms, we are motivated to examine more carefully the problem of regret minimization with constraints and provide more practical no-regret algorithms with formal guarantees. 2This assumption can always be satisfied by adding a fictitious classifier a0 that always outputs a fixed f(a0) < γ, irrespectively of the data. However, such an addition might adversely affect the value of the optimal relaxation parameter α∗(see (7) below), and should be avoided if possible. 5 4 Constrained Regret Matching We next define a relaxed reward envelope for the online classification problem. The proposed is in fact applicable to the problem of constrained regret minimization in general. However, due to space limitation, we present it directly for our classification problem. Our starting point here in defining an attainable reward envelope will be the BE r∗(q) = q(1)β∗(q). Clearly, r∗is in general not attainable in the presence of fp-constraints, and we thus consider a relaxed version thereof. For α ≥0, set r∗ α(q) ≜q(1)(β∗(q) −α). Obviously, r∗ α is a convex function, and we can always pick α ≥0 large enough, such that r∗ α is attainable. Furthermore, recall that the value vγ of the constrained game is attainable by the agent. Observe that, generally, r∗ α(q) can be smaller than vγ = 0. We thus introduce the following modification: rSR α (q) ≜q(1) max {0, β∗(q) −α} . (6) We refer to rSR α as the scalar-relaxed best-response envelope (SR-BE). Now, let3 α∗≜max q∈∆(Z) β∗(q) −β∗ γ(q)  . (7) We note that rSR α∗(q) is strictly above 0 at some point, unless the game is in some sense trivial (see the supplementary material for a proof). According to Definition 3.1, we are seeking for a strategy π that is: (i) an α-relaxed no-regret strategy for the average reward, and (ii) ensures that the cost constraints are asymptotically satisfied. Thus, at each time step, we need to balance between the need of maximizing the average tp-rate and satisfying the average fp-rate constraint. Below we propose an algorithm which solves this trade-off for α ≥α∗. We introduce some further notation. Let Rα k (a) ≜[fk(a) −fk(ak) −α] I {bk = 1} , a ∈A, Lk ≜cγ(ak, zk), (8) denote the instantaneous α-regret and the instantaneous constraint violation (respectively) at time k. We have that the average α-regret and constraints violation at time n are R α n(a) = ¯qn(1)  βtp(¯qn; a) −¯βtp(n) −α  , a ∈A; Ln = ¯qn(0)[¯βfp(n) −γ]. (9) Using this notation, the Constrained Regret Matching (CRM) algorithm is given in Algorithm 1. We then have the following result. Theorem 4.1. Suppose that the CRM algorithm is applied with parameter α ≥α∗, where α∗is given in (7). Then, under Assumption 3.1, it attains rSR α (6) in the sense of Definition 3.1. That is, (i) lim infn→∞ ¯βtp(n) −max {0, maxa∈A βtp(¯qn; a) −α}  ≥0 , and (ii) lim supn→∞¯βfp(n) ≤0, for every strategy of the opponent, almost surely. The proof of this Theorem is based on Blackwell’s approachability theory [3], and is given in the supplementary material. We note that the mixed action required by the CRM algorithm always exists provided that α ≥α∗. It can be easily shown (see the supplementary material) that whenever P a∈A h R α n−1(a) i + > 0, this action can be computed by solving the following linear program: min p∈Bn X a∈A:pα n(a)>p(a) (pα n(a) −p(a)) , (10) where Bn ≜ n p ∈∆(A) :  Ln−1  + P a′∈A p(a′)f(a′) −γ  ≤0, ∀z = (f, −1) ∈Z o and pα n(a) = h R α n−1(a) i + / P a′∈A h R α n−1(a′) i + is the α-regret matching strategy. Note also that when the average constraints violation Ln−1 is non-positive, the minimum in (10) is obtained by p = pα n. Finally, when P a∈A h R α n−1(a) i + = 0, any action p ∈Bn can be chosen. It is worth mentioning that our algorithm, and in particular the program (10), can not be formulated in the Online Convex Programming (OCP) framework [13, 9], since the equivalent reward functions in our case are trajectory-dependent, while in the OCP it is assumed that these functions are arbitrary, but fixed (i.e., they should not depend on the agent’s actions). 3In general, the parameter α∗may be difficult to compute analytically. See the supplementary material for a discussion on computational aspects. Also, in the supplementary material we propose an adaptive algorithm which avoids this computation (see a remark at the end of Section 4). Finally, in Section 5 we show that in the case of two classifiers this computation is trivial. 6 Algorithm 1 CRM Algorithm Parameter: α ≥0. Initialization: At time n = 0 use arbitrary action a0. At times n = 1, 2, ... find a mixed action p ∈∆(A) such that    P a∈A h R α n−1(a) i + f(a) −P a′∈A p(a′)f(a′) −α  ≤0, ∀z = (f, 1) ∈Z,  Ln−1  + P a′∈A p(a′)f(a′) −γ  ≤0, ∀z = (f, −1) ∈Z, (11) where R α n(a) and Ln,i are given in (9). Draw classifier an from p. Remark. In practice, it may be possible to attain rSR α with α < α∗if the opponent is not entirely adversarial. In order to capitalize on this possibility, an adaptive algorithm can be used that adjusts the value of α online. The idea is to start from some small initial value α0 ≥0 (possibly α0 = 0). At each time step n, we would like to use a parameter α = αn for which inequality (11) can be satisfied. This inequality is always satisfied when α ≥α∗. If however α < α∗, the inequality may or may not be satisfied. In the latter case, α can be increased so that the condition is satisfied. In addition, once in a while, α can be reset to α0, in order to obtain better results. In the supplementary material we further discuss the adaptive scheme, and prove a convergence rate for it. We note that the adaptive scheme does not require the computation of the optimal α∗, as it discovers it online. 5 The Special Case of Two Classifiers If m = 2, we can obtain explicit expressions for the reward envelopes and for the algorithm. In particular, we have two classifiers, and we assume that the outputs of these classifiers lie in the set Z ≜  z ∈(f, b) ∈[0, 1]2 × {−1, 1} : if b = −1, f(1) ≤γ1, f(2) ≤γ2; if b = 1, f(2) ≥λ such that γ1 > γ, γ2 < γ, and λ ≥0. Observe that under this assumption, classifier 2 has one-stage performance guarantees that will allow to obtain better guarantees of the meta-algorithm. By computing explicitly the CBE, we obtain r∗ γ(q) = q(1)              γ−βfp(q;2) βfp(q;1)−βfp(q;2)βtp(q; 1) + βfp(q;1)−γ βfp(q;1)−βfp(q;2)βtp(q; 2), if βtp(q; 1) > βtp(q; 2) and βfp(q; 1) > γ, βtp(q; 1), if βtp(q; 1) > βtp(q; 2) and βfp(q; 1) ≤γ, βtp(q; 2), otherwise. Therefore, the relaxation parameter is α = max q: βtp(q;1)>βtp(q;2),βfp(q;1)>γ  βtp(q; 1) −βtp(q; 2) βfp(q; 1) −βfp(q; 2) (βfp(q; 1) −γ)  = (1 −λ)(γ1 −γ) γ1 −γ2 . Finally, it is easy to check using (10) that Algorithm 1 reduces in this case to the following simple rule: (i) if P a∈A h R α n−1(a) i + > 0, choose p(1) = min n pα n(1), γ−γ2 γ1−γ2 o , where pα n(1) = h R α n−1(1) i + / P a∈A h R α n−1(a) i + denotes the α-regret matching strategy; (ii) otherwise, choose arbitrary action with p(1) ≤ γ−γ2 γ1−γ2 . We simulated the CRM algorithm with the following parameters: γ = 0.3, γ1 = 0.4, γ2 = 0.2, λ = 0.7. This gives the relaxation parameter of α = 0.15. Half of the input instances were positives and the other half were negatives (on average). The time was divided into episodes with exponentially growing lengths. At each odd episode, both classifiers had similar tp-rate and both of them satisfied the constraints, while in each even episode, classifier 1 was perfect in positives’ classification, but did not satisfy the constraints. The results are shown in Figure 1. We compared the performance of the CRM algorithm to a simple unconstrained no-regret algorithm that treats both the true-positive and false positive probabilities similarly, but with different weight. In particular, the reward at stage n of this algorithm is gn(w) = fn(an) I {bn = 1} −wfn(an) I {bn = −1} for some weight parameter 7 n fp-rate n γ = w = 1.1 w = 1.3 w = 1.33 w = 1.4 w = 1.1 w = 1.3 w = 1.33 w = 1.4 β∗(¯qn) β∗ γ(¯qn) CRM NR(w) tp-rate Figure 1: Experimental results for the case of two classifiers. w ≥0. Given w, this is simply a no-regret algorithm with respect to gn(w). When w = 0, the algorithm performs tp-rate maximization, while if w is large, it performs fp-rate minimization. We call this algorithm NR(w). As can be seen from Figure 1, the CRM algorithm outperforms NR(w) for any fixed parameter w. For w = 1.1, NR(w) has a better tp-rate, but the fp-rate constraint is violated most of the time. For w = 1.4, the constraints are always satisfied, but the tp-rate is always dominated by that of the CRM algorithm. For w = 1.3, 1.33 it can be seen that the constraints are satisfied (or almost satisfied), but the tp-rate is usually dominated by that of the CRM algorithm. 6 Conclusion We studied regret minimization with average-cost constraints, with the focus on computationally feasible algorithm for the special case of online classification problem with specificity constraints. We defined a relaxed version of the best-response reward envelope and showed that it can be attained by the agent while satisfying the constraints, provided that the relaxation parameter is above a certain threshold. A polynomial no-regret algorithm was provided. This algorithm generally solves a linear program at each time step, while in some special case the algorithm’s mixed action reduces to the simple α-regret matching strategy. To the best of our knowledge, this is the first algorithm that addresses the problem of the average tp-rate maximization under average fp-rate constraints in the online setting. In addition, an adaptive scheme that adapts the relaxation parameter online was briefly discussed. Finally, the special case of two classifiers was discussed, and the experimental results for this case show that our algorithm outperforms a simple no-regret algorithm which takes as the reward function a weighted sum of the tp-rate and fp-rate. Some remarks about our algorithm and results follow. First, the guaranteed convergence rate of the algorithm is of O(1/√n) since it is based on Blackwell’s approachability theorem4. Second, additional constraints can be easily incorporated in the presented framework, since the general regret minimization framework assumes a vector of constraints. Third, it seems that there is an inherent trade-off between complexity and performance in the studied problem. In particular, in case of a single constraint, the maximal attainable relaxed goal is the convex hull of the CBE (see [11]) but no polynomial algorithms are known that attain this goal. Our results show that, by further relaxing the goal, it is possible to devise attaining polynomial algorithms. Finally, we note that the assumption on the single-stage fp-rates of the classifiers can be weakened by assuming that, in each sufficiently large period of time, the average fp-rate of each classifier a is bounded by γa. Our approach and results can be then extended to this case, by treating each such period as a single stage. 4A straightforward application of this theorem also gives √m dependence of the rate on the number of classifiers. We note that it is possible to improve the dependence to log(m) by using a potential based Blackwell’s approachability strategy (see for example [4], Chapter 7.8) 8 References [1] Y. Amit, S. Shalev-Shwartz, and Y. Singer. Online classification for complex problems using simultaneous projections. In NIPS 2006. [2] D. Blackwell. Controlled random walks. In Proceedings of the International Congress of Mathematicians, volume III, pages 335–338, 1954. [3] D. Blackwell. An analog of the minimax theorem for vector payoffs. Pacific Journal of Mathematics, 6:1–8, 1956. [4] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [5] K. Crammer, O. Dekel, J. Keshet, S. Shalev-Shwartz, and Y. Singer. Online passive-aggressive algorithms. Journal of Machine Learning Research, 7:551–585, 2006. [6] T. Fawcett. An introduction to ROC analysis. Pattern Recognition Letters, 27(8):861–874, 2006. [7] Y. Freund and R.E. Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29(12):79–103, 1999. [8] J. Hannan. Approximation to Bayes risk in repeated play. Contributions to the Theory of Games, 3:97–139, 1957. [9] E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [10] N. Littlestone and M. K. Warmuth. The weighted majority algorithm. Information and Computation, 108(2):212–261, 1994. [11] S. Mannor, J. N. Tsitsiklis, and J. Y. Yu. Online learning with sample path constraints. Journal of Machine Learning Research, 10:569–590, 2009. [12] N. Shimkin. Stochastic games with average cost constraints. Annals of the International Society of Dynamic Games, Vol. 1: Advances in Dynamic Games and Applications, 1994. [13] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning (ICML ’03), pages 928–936, 2003. 9
2010
192
3,957
Construction of Dependent Dirichlet Processes based on Poisson Processes Dahua Lin CSAIL, MIT dhlin@mit.edu Eric Grimson CSAIL, MIT welg@csail.mit.edu John Fisher CSAIL, MIT fisher@csail.mit.edu Abstract We present a novel method for constructing dependent Dirichlet processes. The approach exploits the intrinsic relationship between Dirichlet and Poisson processes in order to create a Markov chain of Dirichlet processes suitable for use as a prior over evolving mixture models. The method allows for the creation, removal, and location variation of component models over time while maintaining the property that the random measures are marginally DP distributed. Additionally, we derive a Gibbs sampling algorithm for model inference and test it on both synthetic and real data. Empirical results demonstrate that the approach is effective in estimating dynamically varying mixture models. 1 Introduction As the cornerstone of Bayesian nonparametric modeling, Dirichlet processes (DP) [22] have been applied to a wide variety of inference and estimation problems [3, 10, 20] with Dirichlet process mixtures (DPMs) [15, 17] being one of the most successful. DPMs are a generalization of finite mixture models that allow an indefinite number of mixture components. The traditional DPM model assumes that each sample is generated independently from the same DP. This assumption is limiting in cases when samples come from many, yet dependent, DPs. HDPs [23] partially address this modeling aspect by providing a way to construct multiple DPs implicitly depending on each other via a common parent. However, their hierarchical structure may not be appropriate in some problems (e.g. temporally varying DPs). Consider a document model where each document is generated under a particular topic and each topic is characterized by a distribution over words. Over time, topics change: some old topics fade while new ones emerge. For each particular topic, the word distribution may evolve as well. A natural approach to model such topics is to use a Markov chain of DPs as a prior, such that the DP at each time is generated by varying the previous one in three possible ways: creating a new topic, removing an existing topic, and changing the word distribution of a topic. Since MacEachern introduced the notion of dependent Dirichlet processes (DDP) [12], a variety of DDP constructions have been developed, which are based on either weighted mixtures of DPs [6,14,18], generalized Chinese restaurant processes [4,21,24], or the stick breaking construction [5, 7]. Here, we propose a fundamentally different approach, taking advantage of the intrinsic relationship between Dirichlet processes and Poisson processes: a Dirichlet process is a normalized Gamma process, while a Gamma process is essentially a compound Poisson process. The key idea is motivated by the following: observations that preserve complete randomness when applied to Poisson processes result in a new process that remains Poisson. Consequently, one can obtain a Dirichlet process which is dependent on other DPs by applying such operations to their underlying compound Poisson processes. In particular, we discuss three specific operations: superposition, subsampling, and point transition. We develop a Markov chain of DPs by combining these operations, leading to a framework that allows creation, removal, and location variation of particles. This 1 construction inherently comes with an elegant property that the random measure at each time is marginally DP distributed. Our approach relates to previous efforts in constructing dependent DPs while overcoming inherent limitations. A detailed comparison is given in section 4. 2 Poisson, Gamma, and Dirichlet Processes Our construction of dependent Dirichlet processes rests upon the connection between Poisson, Gamma, and Dirichlet processes, as well as the concept of complete randomness. We briefly review these concepts; Kingman [9] provides a detailed exposition of the relevant theory. Let (Ω, FΩ) be a measurable space, and Π be a random point process on Ω. Each realization of Π uniquely corresponds to a counting measure NΠ defined by NΠ(A) ≜#(Π ∩A) for each A ∈FΩ. Hence, NΠ is a measure-valued random variable or simply a random measure. A Poisson process Π on Ωwith mean measure µ, denoted Π ∼PoissonP(µ), is defined to be a point process such that NΠ(A) has a Poisson distribution with mean µ(A) and that for any disjoint measurable sets A1, . . . , An, NΠ(A1), . . . , NΠ(An) are independent. The latter property is referred to as complete randomness. Poisson processes are the only point process that satisfies this property [9]: Theorem 1. A random point process Π on a regular measure space is a Poisson process if and only if NΠ is completely random. If this is true, the mean measure is given by µ(A) = E(NΠ(A)). Consider Π∗∼PoissonP(µ∗) on a product space Ω× R+. For each realization of Π∗, We define Σ∗: FΩ→[0, +∞] as Σ∗≜ X (θ,wθ)∈Π∗ wθδθ (1) Intuitively, Σ∗(A) sums up the values of wθ with θ ∈A. Note that Σ∗is also a completely random measure (but not a point process in general), and is essentially a generalization of the compound Poisson process. As a special case, if we choose µ∗to be µ∗= µ × γ with γ(dw) = w−1e−wdw, (2) Then the random measure as defined in Eq.(1) is called a Gamma process with base measure µ, denoted by G ∼ΓP(µ). Normalizing any realization of G ∼ΓP(µ) yields a sample of a Dirichlet process, as D ≜G/G(Ω) ∼DP(µ). (3) In conventional parameterization, µ is often decomposed into two parts: a base distribution pµ ≜ µ/µ(Ω), and a concentration parameter αµ ≜µ(Ω). 3 Construction of Dependent Dirichlet Processes Motivated by the relationship between Poisson and Dirichlet processes, we develop a new approach for constructing dependent Dirichlet processes (DDPs). Our approach can be described as follows: given a collection of Dirichlet processes, one can apply operations that preserve the complete randomness of their underlying Poisson processes. This yields a new Poisson process (due to theorem 1) and a related DP which depends on the source. In particular, we consider three such operations: superposition, subsampling, and point transition. Superposition of Poisson processes: Combining a set of independent Poisson processes yields a Poisson process whose mean measure is the sum of mean measures of the individual ones. Theorem 2 (Superposition Theorem [9]). Let Π1, . . . , Πm be independent Poisson processes on Ω with Πk ∼PoissonP(µk), then their union has Π1 ∪· · · ∪Πm ∼PoissonP(µ1 + · · · + µm). (4) Given a collection of independent Gamma processes G1, . . . , Gm, where for each k = 1, . . . , m, Gk ∼ΓP(µk) with underlying Poisson process Π∗ k ∼PoissonP(µk × γ). By theorem 2, we have m [ k=1 Π∗ k ∼PoissonP m X k=1 (µk × γ) ! = PoissonP m X k=1 µk ! × γ ! . (5) 2 Due to the relationship between Gamma processes and their underlying Poisson processes, such a combination is equivalent to the direct superposition of the Gamma processes themselves, as G′ := G1 + · · · + Gm ∼ΓP(µ1 + · · · + µm). (6) Let Dk = Gk/Gk(Ω), and gk = Gk(Ω), then Dk is independent of gk, and thus D′ := G′/G′(Ω) = (g1D1 + · · · + gmDm)/(g1 + · · · + gm) = c1D1 + · · · + cmDm. (7) Here, ck = gk/ Pm l=1 gl, which has (c1, . . . , cm) ∼Dir(µ1(Ω), . . . , µm(Ω)). Consequently, one can construct a Dirichlet process through a random convex combination of independent Dirichlet processes. This result is summarized by the following theorem: Theorem 3. Let D1, . . . , Dm be independent Dirichlet processes on Ωwith Dk ∼DP(µk), and (c1, . . . , cm) ∼Dir(µ1(Ω), . . . , µm(Ω)) be independent of D1, . . . , Dm, then D1 ⊕· · · ⊕Dm := c1D1 + · · · cmDm ∼DP(µ1 + · · · + µm). (8) Here, we use the symbol ⊕to indicate superposition via a random convex combination. Let αk = µk(Ω) and α′ = Pm k=1 αk, then for each measurable subset A, E(D′(A)) = m X k=1 αk α′ E(Dk(A)), and Cov(D′(A), Dk(A)) = αk α′ Var(Dk(A)). (9) Subsampling Poisson processes: Random subsampling of a Poisson process via independent Bernoulli trials yields a new Poisson process. Theorem 4 (Subsampling Theorem). Let Π ∼PoissonP(µ) be a Poisson process on the space Ω, and q : Ω→[0, 1] be a measurable function. If we independently draw zθ ∈{0, 1} for each θ ∈Π0 with P(zθ = 1) = q(θ), and let Πk = {θ ∈Π : zθ = k} for k = 0, 1, then Π0 and Π1 are independent Poisson processes on Ω, with Π0 ∼PoissonP((1 −q)µ) and Π1 ∼PoissonP(qµ)1. We emphasize that subsampling is via independent Bernoulli trials rather than choosing a fixed number of particles. We use Sq(Π) := Π1 to denote the result of subsampling, where q is referred to as the acceptance function. Note that subsampling the underlying Poisson process of a Gamma process G is equivalent to subsampling the terms of G. Let G = P∞ i=1 wiδθi, and for each i, we draw zi with P(zi = 1) = q(θi). Then, we have G′ = Sq(G) := X i:zi=1 wiδθi ∼ΓP(qµ). (10) Let D be a Dirichlet process given by D = G/G(Ω), then we can construct a new Dirichlet process D′ = G′/G′(Ω) by subsampling the terms of D and renormalizing their coefficients. This is summarized by the following theorem. Theorem 5. Let D ∼DP(µ) be represented by D = Pn i=1 riδθi and q : Ω→[0, 1] be a measurable function. For each i we independently draw zi with P(zi = 1) = q(θi), then D′ = Sq(D) := X i:zi=1 r′ iδθi ∼DP(qµ), (11) where r′ i := ri/ P j:zj=1 rj are the re-normalized coefficients for those i with zi = 1. Let α = µ(Ω) and α′ = (qµ)(Ω), then for each measurable subset A, E(D′(A)) = (qµ)(A) (qµ)(Ω) = R A qdµ R Ωqdµ, and Cov(D′(A), D(A)) = α′ α Var(D′(A)). (12) Point transition of Poisson processes: The third operation moves each point independently following a probabilistic transition. Formally, a probabilistic transition is defined to be a function T : Ω× FΩ→[0, 1] such that for each θ ∈FΩ, T(θ, ·) is a probability measure on Ωthat describes the distribution of where θ moves, and for each A ∈FΩ, T(·, A) is integrable. T can be considered as a transformation of measures over Ω, as (Tµ)(A) := Z Ω T(θ, A)µ(dθ). (13) 1qµ is a measure on Ωgiven by (qµ)(A) = R A qdµ, or equivalently (qµ)(dθ) = q(θ)µ(dθ). 3 Theorem 6 (Transition Theorem). Let Π ∼PoissonP(µ) and T be a probabilistic transition, then T(Π) := {T(θ) : θ ∈Π} ∼PoissonP(Tµ). (14) With a slight abuse of notation, we use T(θ) to denote an independent sample from T(θ, ·). As a consequence, we can derive a Gamma process and thus a Dirichlet process by applying the probabilistic transition to the location of each term, leading to the following: Theorem 7. Let D = P∞ i=1 riδθi ∼DP(µ) be a Dirichlet process on Ω, then T(D) := ∞ X i=1 riδT (θi) ∼DP(Tµ). (15) Theorems 1 and 2 are immediate consequences of the results in [9]. We derive Theorems 3 to Theorem 7 independently as part of the proposed approach. Detailed explanation of relevant concepts and the proofs of Theorem 2 to Theorem 7 are provided in the supplement. 3.1 A Markov Chain of Dirichlet Processes Integrating these three operations, we construct a Markov chain of DPs formulated as Dt = T (Sq(Dt−1)) ⊕Ht, with Ht ∼DP(ν). (16) The model can be explained as follows: given Dt−1, we choose a subset of terms by subsampling, then move their locations via a probabilistic transition T, and finally superimpose a new DP Ht on the resultant process to form Dt. Hence, creating new particles, removing existing particles, and varying particle locations are all allowed, respectively, via superposition, subsampling, and point transition. Note that while they are based on the operations of the underlying Poisson processes, due to theorems 3, 5, and 7, we operate directly on the DPs, without the need of explicitly instantiating the associated Poisson processes or Gamma processes. Let µt be the base measure of Dt, then µt = T(qµt−1) + ν. (17) Particularly, if the acceptance probability q is a constant, then αt = qαt−1 + αν. Here, αt = µt(Ω) and αν = ν(Ω) are the concentration parameters. One may hold αt fixed over time by choosing appropriate values for q and αν. Furthermore, it can be shown that Cov(Dt+n(A), Dt(A)) ≤qnVar(Dt(A)). (18) The covariance with previous DPs decays exponentially when q < 1. This is often a desirable property in practice. Moreover, we note that ν and q play different roles in controlling the process. Generally, ν determines how frequently new terms appear; while q governs the life span of a term which has a geometric distribution with mean (1 −q)−1. We aim to use the Markov chain of DPs as a prior of evolving mixture models. This provides a mechanism with which new component models can be brought in, existing components can be removed, and the model parameters can vary smoothly over time. 4 Comparison with Related Work In his pioneering work [12], MacEachern proposed the “single-p DDP model”. It considers DDP as a collection of stochastic processes, but does not provide a natural mechanism to change the collection size over time. M¨uller et al [14] formulated each DP as a weighted mixture of a common DP and an independent DP. This formulation was extended by Dunson [6] in modeling latent trait distributions. Zhu et al [24] presented the Time-sensitive DP, in which the contribution of each DP decays exponentially. Teh et al [23] proposed the HDP where each child DP takes its parent DP as the base measure. Ren [18] combines the weighted mixture formulation with HDP to construct the dynamic HDP. In contrast to the model proposed here, a fundamental difference of these models is that the marginal distribution at each node is generally not a DP. Caron et al [4] developed a generalized Polya Urn scheme while Ahmed and Xing [1] developed the recurrent Chinese Restaurant process (CRP). Both generalize the CRP to allow time-variation, while 4 retaining the property of being marginally DP. The motivation underlying these methods fundamentally differs from ours, leading to distinct differences in the sampling algorithm. In particular, [4] supports innovation and deletion of particles, but does not support variation of locations. Moreover, its deletion scheme is based on the distribution in history, but not on whether a component model fits the new observation. While [1] does support innovation and point transition, there is no explicit way to delete old particles. It can be considered a special case of the proposed framework in which subsampling operation is not incorporated. We note that [1] is motivated from an algorithmic rather than theoretical perspective. Grifin and Steel [7] present the πDDP based on the stick breaking construction [19], reordering the stick breaking ratios for each time so as to obtain different distributions over the particles. This work is further extended [8] to a generic stick breaking processes. Chung et al [5] propose a local DP that generalizes πDDP. Rather than reordering the stick breaking ratios, they regroup them locally such that dependent DPs can be constructed over a general covariate space. Inference in these models requires sampling a series of auxiliary variables, considerably increasing computational costs. Moreover, the local DP relies on a truncated approximation to devise the sampling scheme. Recently, Rao and Teh [16] proposed the spatially normalized Gamma process. They construct a universal Gamma process in an auxiliary space and obtain dependent DPs by normalizing it within overlapped local regions. The theoretical foundation differs in that it does not exploit the relationship between the Gamma and Poisson process which is at the heart of the proposed model. In [16], the dependency is established through region overlapping; while in our work, this is accomplished by explicitly transferring particles from one DP to another. In addition, this work does not support location variation, as it relies on a universal particle pool that is fixed over time. 5 The Sampling Algorithm We develop a Gibbs sampling procedure based on the construction of DDPs introduced above. The key idea is to derive sampling steps by exploiting the fact that our construction maintains the property of being marginally DP via connections to the underlying Poisson processes. Furthermore, the derived procedure unifies distinct aspects (innovation, removal, and transition) of our model. Let D ∼DP(µ) be a Dirichlet process on Ω. Then given a set of samples Φ ∼D, in which φi appears ci times, we have D|Φ ∼DP(µ + c1δφ1 + · · · + cnδφn). Let D′ be a Dirichlet process depending on D as in Eq.(16), α0 = (qµ)(Ω), and qi = q(θi). Given Φ ∼D, we have D′|Φ ∼DP ανpν + α0pqµ + m X k=1 qkckT(φk, ·) ! . (19) Sampling from D′. Let θ1 ∼D′. Marginalizing over D′, we get θ1|Φ ∼αν α′ 1 pν + α0 α′ 1 pqµ + m X k=1 qkck α′ 1 T(φk, ·) with α′ 1 = αν + α0 + m X k=1 qkck. (20) Thus we sample θ1 from three types of sources: the innovation distribution pν, the q-subsampled base distribution pqµ, and the transition distribution T(φk, ·). In doing so, we first sample a variable u1 that indicates which source to sample from. Specifically, when u1 = −1, u1 = 0, or u1 = l > 0, we respectively sample θ1 from pν, pqµ, or T(φl, ·). The probabilities of these cases are αν/α′ 1, α0/α′ 1, and qici/α′ 1 respectively. After u1 is obtained, we then draw θ1 from the indicated source. The next issue is how to update the posterior given θ1 and u1. The answer depends on the value of u1. When u1 = −1 or 0, θ1 is a new particle, and we have D′|θ1, {u1 ≤0} ∼DP ανpν + α0pqµ + m X k=1 qkckT(φk, ·) + δθ1 ! . (21) If u1 = l > 0, we know that the particle φl is retained in the subsampling process (i.e. the corresponding Bernoulli trial outputs 1), and the transited version T(φl) is determined to be θ1. Hence, D′|θ1, {u1 = l > 0} ∼DP  ανpν + α0pqµ + X k̸=l qkckT(θk, ·) + (cl + 1)δθ1  . (22) 5 With this posterior distribution, we can subsequently draw the second sample and so on. This process generalizes the Chinese restaurant process in several ways: (1) it allows either inheriting previous particles or drawing new ones; (2) it uses qk to control the chance that we sample a previous particle; (3) the transition T allows smooth variation when we inherit a previous particle. Inference with Mixture Models. We use the Markov chain of DPs as the prior of evolving mixture models. The generation process is formulated as θ1, . . . , θn ∼D′ i.i.d., and xi ∼L(θi), i = 1, . . . , n. (23) Here, L(θi) is the observation model parameterized by θi. According to the analysis above, we derive an algorithm to sample θ1, . . . , θn conditioned on the observations x1, . . . , xn as follows. Initialization. (1) Let ˜m denote the number of particles, which is initialized to be m and will increase as we draw new particles from pν or pqµ. (2) Let wk denote the prior weights of different sampling sources which may also change during the sampling. Particularly, we set wk = qkck for k > 0, w−1 = αν, and w0 = α0. (3) Let ψk denote the particles, whose value is decided when a new particle or the transited version of a previous one is sampled. (4) The label li indicates to which particle θi corresponds and the counter rk records the number of times that ψk has been sampled (set to 0 initially). (5) We compute the expected likelihood, as given by F(k, i) := Epk(f(xi|θ)). Here, f(xi|θ) is the likelihood of xj with respect to the parameter θ, and pk is pν, pqµ or T(φk, ·) respectively when k = −1, k = 0 and k ≥1. Sequential Sampling. For each i = 1, . . . , n, we first draw the indicator ui with probability P(ui = k) ∝wkF(k, i). Depending on the value of ui, we sample θi from different sources. For brevity, let p|x to denote the posterior distribution derived from the prior distribution p conditioned on the observation x. (1) If ui = −1 or 0, we draw θi from pν|xi or pqµ|xi, respectively, and then add it as a new particle. Concretely, we increase ˜m by 1, let ψ ˜m = θj, r ˜m = w ˜m = 1, and set li = ˜m. Moreover, we compute F(m, i) = f(xi|ψ ˜m) for each i. (2) Suppose ui = k > 0. If rk = 0 then it is the first time we have drawn ui = k. Since ψk has not been determined, we sample θi ∼T(φk, ·)|xi, then set ψk = θi. If rk > 0, the k-th particle has been sampled before. Thus, we can simply set θi = ψk. In both cases, we set the label li = k, increase the weight wi and the counter ri by 1, and update F(k, i) to f(xi|ψk) for each i. Note that this procedure is inefficient in that it samples each particle φk merely based on the first observation with label k. Therefore, we use this procedure for bootstrapping, and then run a Gibbs sampling scheme that iterates between parameter update and label update. (Parameter update): We resample each particle ψk from its source distribution conditioned on all samples with label k. In particular, for k ∈[1, m] with rk > 0, we draw ψk ∼T(φk, ·)|{xi : li = k}, and for k ∈[m + 1, ˜m], we draw ψk ∼p|{xi : li = k}, where p = pqµ or pν, depending which source ψk was initially sampled from. After updating ψk, we need to update F(k, i) accordingly. (Label update): The label updating is similar to the bootstrapping procedure described above. The only difference is that when we update a label from k to k′, we need to decrease the weight and counter for k. If rk decreases to zero, we remove ψk, and reset wk to qkck when k ≤m. At the end of each phase t, we sample ψk ∼T(φk, ·) for each k with rk = 0. In addition, for each such particle, we update the acceptance probability as qk ←qk ·q(φk), which is the prior probability that the particle φk will survive in next phase. MATLAB code is available in the following website: http://code.google.com/p/ddpinfer/. 6 Experimental Results Here we present experimental results on both synthetic and real data. In the synthetic case, we compare our method with dynamic FMM in modeling mixtures of Gaussians whose number and centers evolve over time. For real data, we test the approach in modeling the motion of people in crowded scenes and the trends of research topics reflected in index terms. 6.1 Simulations on Synthetic Data The data for simulations were synthesized as follows. We initialized the model with two Gaussian components, and added new components following a temporal Poisson process (one per 20 phases 6 0 10 20 30 40 50 60 70 80 0 0.05 0.1 0.15 0.2 median distance D−DPMM D−FMM (K = 2) D−FMM (K = 3) D−FMM (K = 5) 0 10 20 30 40 50 60 70 80 0 5 t actual # comp. (a) Comparison with D-FMM 0 50 100 150 200 0 0.05 0.1 0.15 0.2 # samples/component median distance q=0.1 q=0.9 q=1 (b) For different acceptance prob. 0 50 100 150 200 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 # samples/component median distance var=0.0001 var=0.1 var=100 (c) For different diffusion var. Figure 1: The simulation results: (a) compares the performance between D-DPMM and D-FMM with differing numbers of components. The upper graph shows the median of distance between the resulting clusters and the ground truth at each phase. The lower graph shows the actual numbers of clusters. (b) shows the performance of D-DPMM with different values of acceptance probability, under different data sizes. (c) shows the performance of D-DPMM with different values of diffusion variance, under different data sizes. on average). For each component, the life span has a geometric distribution with mean 40, the mean evolves independently as a Brownian motion, and the variance is fixed to 1. We performed the simulation for 80 phases, and at each phase, we drew 1000 samples for each active component. At each phase, we sample for 5000 iterations, discarding the first 2000 for burn-in, and collecting a sample every 100 iterations for performance evaluation. The particles of the last iteration at each phase were incorporated into the model as a prior for sampling in the next phase. We obtained the label for each observation by majority voting based on the collected samples, and evaluated the performance by measuring the dissimilarity between the resultant clusters and the ground truth using the variation of information [13] criterion. Under each parameter setting, we repeated the experiment 20 times, utilizing the median of the dissimilarities for comparison. We compare our approach (D-DPMM) with dynamic finite mixtures (D-FMM), which assumes a fixed number of Gaussians whose centers vary as Brownian motion. From Figure 1(a), we observe that when the fixed number K of components equals the actual number, they yield comparable performance; while when they are not equal, the errors of D-FMM substantially increase. Particularly, K less than the actual number results in significant underfitting (e.g. D-FMM with K = 2 or 3 at phases 30−50 and 66−76); when K is greater than the actual number, samples from the same component are divided into multiple groups and assigned to different components (e.g. D-FMM with K = 5 at phases 1 −10 and 30 −50). In all cases, D-DPMM consistently outperforms D-FMM due to its ability to adjust the number of components to adapt to the change of observations. We also studied how design parameters impact performance. In Figure 1(b), we see that an acceptance probability q to 0.1 creates new components rather than inheriting from previous phases, leading to poor performance when the number of samples is limited. If we set q = 0.9, the components in previous phases have a higher survival rate, resulting in more reliable estimation of the component parameters from multiple phases. Figure 1(c) shows the effect of the diffusion variance that controls the parameter variation. When it is small, the parameter in the next phase is tied tightly with the previous value; when it is large, the estimation basically relies on new observations. Both cases lead to performance degradation on small datasets, which indicates that it is important to maintain a balance between inheritance and innovation. Our framework provides the flexibility to attain such a balance. Cross-validation can be used to set these parameters automatically. 6.2 Real Data Applications Modeling People Flows. It was observed [11] that the majority of people walking in crowded areas such as a rail station tend to follow motion flows. Typically, there are several flows at a time, and each flow may last for a period. In this experiment, we apply our approach to extract the flows. The test was conducted on video acquired in New York Grand Central Station, which comprises 90, 000 frames for one hour (25 fps). A low level tracker was used to obtain the tracks of people, which were then processed by a rule-based filter that discards obviously incorrect tracks. We adopt the flow model described in [11], which uses an affine field to capture the motion patterns of each flow. The observation for this model is in the form of location-velocity pairs. We divided the entire 7 0 10 20 30 40 50 60 0 2 4 6 8 10 12 14 16 18 20 time index flow 1 flow 2 (a) People flows 1990 1995 2000 2005 2010 0 1 2 3 4 5 6 7 8 9 10 11 time index 1 motion estimation, video sequences 2 pattern recognition, pattern clustering 3 statistical models, optimization problem 4 discriminant analysis, information theory 5 image segmentation, image matching 6 face recognition, biological 7 image representation, feature extraction 8 photometry, computational geometry 9 neural nets, decision theory 10 image registration, image color analysis (b) PAMI topics Figure 2: The experiment results on real data. (a) left: the timelines of the top 20 flows; right: illustration of first two flows. (Illustrations of larger sizes are in the supplement.) (b) left: the timelines of the top 10 topics; right: the two leading keywords for these topics. (A list with more keywords is in the supplement.) sequence into 60 phases (each for one minute), extract location-velocity pairs from all tracks, and randomly choose 3000 pairs for each phase for model inference. The algorithm infers 37 flows in total, while at each phase, the numbers of active flows range from 10 to 18. Figure 2(a) shows the timelines of the top 20 flows (in terms of the numbers of assigned observations). We compare the performance of our method with D-FMM by measuring the average likelihood on a disjoint dataset. The value for our method is −3.34, while those for D-FMM are −6.71, −5.09, −3.99, −3.49, and −3.34, when K are respectively set to 10, 20, 30, 40, and 50. Consequently, with a much smaller number of components (12 active components on average), our method attains a similar modeling accuracy as a D-FMM with 50 components. Modeling Paper Topics. Next we analyze the evolution of paper topics for IEEE Trans. on PAMI. By parsing the webpage of IEEE Xplore, we collected the index terms for 3014 papers published in PAMI from Jan, 1990 to May, 2010. We first compute the similarity between each pair of papers in terms of relative fraction of overlapped index terms. We derive a 12-dimensional feature vector using spectral embedding [2] over the similarity matrix for each paper. We run our algorithm on these features with each phase corresponding to a year. Each cluster of papers is deemed a topic. We compute the histogram of index terms and sorted them in decreasing order of frequency for each topic. Figure 2(b) shows the timelines of top 10 topics, and together with the top two index terms for each of them. Not surprisingly, we see that topics such as “neural networks” arise early and then diminish while “image segmentation” and “motion estimation” persist. 7 Conclusion and Future Directions We developed a principled framework for constructing dependent Dirichlet processes. In contrast to most DP-based approaches, our construction is motivated by the intrinsic relation between Dirichlet processes and compound Poisson processes. In particular, we discussed three operations: superposition, subsampling, and point transition, which produce DPs depending on others. We further combined these operations to derive a Markov chain of DPs, leading to a prior of mixture models that allows creation, removal, and location variation of component models under a unified formulation. We also presented a Gibbs sampling algorithm for inferring the models. The simulations on synthetic data and the experiments on modeling people flows and paper topics clearly demonstrate that the proposed method is effective in estimating mixture models that evolve over time. This framework can be further extended along different directions. The fact that each completely random point process is a Poisson process suggests that any operation that preserves the complete randomness can be applied to obtain dependent Poisson processes, and thus dependent DPs. Such operations are definitely not restricted to the three ones discussed in this paper. For example, random merging and random splitting of particles also possess this property, which would lead to an extended framework that allows merging and splitting of component models. Furthermore, while we focused on Markov chain in this paper, the framework can be straightforwardly generalized to any acyclic network of DPs. It is also interesting to study how it can be generalized to the case with undirected network or even continuous covariate space. We believe that as a starting point, this paper would stimulate further efforts to exploit the relation between Poisson processes and Dirichlet processes. 8 References [1] A. Ahmed and E. Xing. Dynamic Non-Parametric Mixture Models and The Recurrent Chinese Restaurant Process : with Applications to Evolutionary Clustering. In Proc. of SDM’08, 2008. [2] F. R. Bach and M. I. Jordan. Learning spectral clustering. In Proc. of NIPS’03, 2003. [3] J. Boyd-Graber and D. M. Blei. Syntactic Topic Models. In Proc. of NIPS’08, 2008. [4] F. Caron, M. Davy, and A. Doucet. Generalized Polya Urn for Time-varying Dirichlet Process Mixtures. In Proc. of UAI’07, number 6, 2007. [5] Y. Chung and D. B. Dunson. The local Dirichlet Process. Annals of the Inst. of Stat. Math., (October 2007), January 2009. [6] D. B. Dunson. Bayesian Dynamic Modeling of Latent Trait Distributions. Biostatistics, 7(4), October 2006. [7] J. E. Griffin and M. F. J. Steel. Order-Based Dependent Dirichlet Processes. Journal of the American Statistical Association, 101(473):179–194, March 2006. [8] J. E. Griffin and M. F. J. Steel. Time-Dependent Stick-Breaking Processes. Technical report, 2009. [9] J. F. C. Kingman. Poisson Processes. Oxford University Press, 1993. [10] J. J. Kivinen, E. B. Sudderth, and M. I. Jordan. Learning Multiscale Representations of Natural Scenes Using Dirichlet Processes. In Proc. of ICCV’07, 2007. [11] D. Lin, E. Grimson, and J. Fisher. Learning Visual Flows: A Lie Algebraic Approach. In Proc. of CVPR’09, 2009. [12] S. N. MacEachern. Dependent Nonparametric Processes. In Proceedings of the Section on Bayesian Statistical Science, 1999. [13] M. Meila. Comparing clusterings - An Axiomatic View. In Proc. of ICML’05, 2005. [14] P. Muller, F. Quintana, and G. Rosner. A Method for Combining Inference across Related Nonparametric Bayesian Models. J. R. Statist. Soc. B, 66(3):735–749, August 2004. [15] R. M. Neal. Markov Chain Sampling Methods for Dirichlet Process Mixture Models. Journal of computational and graphical statistics, 9(2):249–265, 2000. [16] V. Rao and Y. W. Teh. Spatial Normalized Gamma Processes. In Proc. of NIPS’09, 2009. [17] C. E. Rasmussen. The Infinite Gaussian Mixture Model. In Proc. of NIPS’00, 2000. [18] L. Ren, D. B. Dunson, and L. Carin. The Dynamic Hierarchical Dirichlet Process. In Proc. of ICML’08, New York, New York, USA, 2008. ACM Press. [19] J. Sethuraman. A Constructive Definition of Dirichlet Priors. Statistica Sinica, 4(2):639–650, 1994. [20] K.-a. Sohn and E. Xing. Hidden Markov Dirichlet process: modeling genetic recombination in open ancestral space. In Proc. of NIPS’07, 2007. [21] N. Srebro and S. Roweis. Time-Varying Topic Models using Dependent Dirichlet Processes, 2005. [22] Y. W. Teh. Dirichlet Process, 2007. [23] 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. [24] X. Zhu and J. Lafferty. Time-Sensitive Dirichlet Process Mixture Models, 2005. 9
2010
193
3,958
Practical Large-Scale Optimization for Max-Norm Regularization Jason Lee Institute of Computational and Mathematical Engineering Stanford University email: jl115@yahoo.com Benjamin Recht Department of Computer Sciences University of Wisconsin-Madison email: brecht@cs.wisc.edu Ruslan Salakhutdinov Brain and Cognitive Sciences and CSAIL Massachusetts Institute of Technology email: rsalakhu@mit.edu Nathan Srebro Toyota Technological Institute at Chicago email: nati@ttic.edu Joel A. Tropp Computing and Mathematical Sciences California Institute of Technology email: jtropp@acm.caltech.edu Abstract The max-norm was proposed as a convex matrix regularizer in [1] and was shown to be empirically superior to the trace-norm for collaborative filtering problems. Although the max-norm can be computed in polynomial time, there are currently no practical algorithms for solving large-scale optimization problems that incorporate the max-norm. The present work uses a factorization technique of Burer and Monteiro [2] to devise scalable first-order algorithms for convex programs involving the max-norm. These algorithms are applied to solve huge collaborative filtering, graph cut, and clustering problems. Empirically, the new methods outperform mature techniques from all three areas. 1 Introduction A foundational concept in modern machine learning is to construct models for data by balancing the complexity of the model against fidelity to the measurements. In a wide variety of applications, such as collaborative filtering, multi-task learning, multi-class learning and clustering of multivariate observations, matrices offer a natural way to tabulate data. For such matrix models, the matrix rank provides an intellectually appealing way to describe complexity. The intuition behind this approach holds that many types of data arise from a noisy superposition of a small number of simple (i.e., rank-one) factors. Unfortunately, optimization problems involving rank constraints are computationally intractable except in a few basic cases. To address this challenge, researchers have searched for alternative complexity measures that can also promote low-rank models. A particular example of a low-rank regularizer that has received a huge amount of recent attention is the trace-norm, equal to the sum of the matrix’s singular values (See the comprehensive survey [3] and its bibliography). The tracenorm promotes low-rank decompositions because it minimizes the ℓ1 norm of the vector of singular values, which encourages many zero singular values. Although the trace-norm is a very successful regularizer in many applications, it does not seem to be widely known or appreciated that there are many other interesting norms that promote low rank. The 1 paper [4] is one of the few articles in the machine learning literature that pursues this idea with any vigor. The current work focuses on another rank-promoting regularizer, sometimes called the maxnorm, that has been proposed as an alternative to the rank for collaborative filtering problems [1, 5]. The max-norm can be defined via matrix factorizations: ∥X∥max := inf n ∥U∥2,∞∥V ∥2,∞: X = UV ′o (1) where ∥·∥2,∞denotes the maximum ℓ2 row norm of a matrix: ∥A∥2,∞:= maxj X k A2 jk 1/2 . For general matrices, the computation of the max-norm can be rephrased as a semidefinite program; see (4) below. When X is positive semidefinite, we may force U = V and then verify that ∥X∥max = maxj xjj, which should explain the terminology. The fundamental result in the metric theory of tensor products, due to Grothendieck, states that the max-norm is comparable with a nuclear norm (see Chapter 10 of [6]): ∥X∥max ≈inf n ∥σ∥1 : X = X j σjujv′ j where ∥uj∥∞= 1 and ∥vj∥∞= 1 o . The factor of equivalence 1.676 ≤κG ≤1.783 is called Grothendieck’s constant. The trace-norm, on the other hand, is equal to ∥X∥tr := inf n ∥σ∥1 : X = X j σjujv′ j where ∥uj∥2 = 1 and ∥vj∥2 = 1 o . This perspective reveals that the max-norm promotes low-rank decompositions with factors in ℓ∞, rather than the ℓ2 factors produced by the trace-norm! Heuristically, we expect max-norm regularization to be effective for uniformly bounded data, such as preferences. The literature already contains theoretical and empirical evidence that the max-norm is superior to the trace-norm for certain types of problems. Indeed, the max-norm offers better generalization error bounds for collaborative filtering [5], and it outperforms the trace-norm in small-scale experiments [1]. The paper [7] provides further evidence that the max-norm serves better for collaborative filtering with nonuniform sampling patterns. We believe that the max-norm has not achieved the same prominence as the trace-norm because of an apprehension that it is challenging to solve optimization problems involving a max-norm regularizer. The goal of this paper is to refute this misconception. We provide several algorithms that are effective for very large scale problems, and we demonstrate the power of the max-norm regularizer using examples from a variety of applications. In particular, we study convex programs of the form min f(X) + µ ∥X∥max (2) where f is a smooth function and µ is a positive penalty parameter. Section 4 outlines a proximalpoint method, based on the work of Fukushima and Mine [8], for approaching (2). We also study the bound-constrained problem min f(X) subject to ∥X∥max ≤B. (3) Of course, (2) and (3) are equivalent for appropriate choices of µ and B, but we describe scenarios where there may be a preference for one versus the other. Section 3 provides a projected gradient method for (3), and Section 5 develops a stochastic implementation that is appropriate for decomposable loss functions. These methods can be coded up in a few lines of numerical python or Matlab, and they scale to huge instances, even on a standard desktop machine. In Section 6, we apply these new algorithms to large-scale collaborative filtering problems, and we demonstrate performance superior to methods based on the trace-norm. We apply the algorithms to solve enormous instances of graph cut problems, and we establish that clustering based on these cuts outperforms spectral clustering on several data sets. 2 2 The SDP and Factorization Approaches The max-norm of an m × n matrix X can be expressed as the solution to a semidefinite program: ∥X∥max = min t subject to  W1 X X′ W2  ⪰0, diag(W1) ≤t, diag(W2) ≤t. (4) Unfortunately, standard interior-point methods for this problem do not scale to matrices with more than a few hundred rows or columns. For large-scale problems, we use an alternative formulation suggested by (1) that explicitly works with a factorization of the decision variable X. We employ an idea of Burer and Monteiro [2] that has far reaching consequences. The positive definite constraint in the SDP formulation above is trivially satisfied if we define L and R via  W1 X X′ W2  =  L R   L R ′ . Burer and Monteiro showed that as long as L and R have sufficiently many columns, then the global optimum of (4) is equal to that of ∥X∥max = min (L,R) : LR′=X max{∥L∥2 2,∞, ∥R∥2 2,∞} . (5) In particular, we may assume that the number of columns is less than m+n. This formulation of the max-norm is nonconvex because it involves a constraint on the product LR′, but Burer and Monteiro proved that each local minimum of the reformulated problem is also a global optimum [9]. If we select L and R to have a very small number of columns, say r, then the number of real decision variables in the optimization problems (2) and (3) is reduced from mn to r(m + n), a dramatic improvement in the dimensionality of the problem. On the other hand, the new formulation is nonconvex with respect to L and R so it might not be efficiently solvable. In what follows, we present fast, first-order methods for solving (2) and (3) via this low-dimensional factored representation. 3 Projected Gradient Method The constrained formulation (3) admits a simple projected gradient algorithm. We replace X with the product LR′ and use the factored form of the max-norm (5) to obtain minimize(L,R)f(LR′) subject to max{∥L∥2 2,∞, ∥R∥2 2,∞} ≤B. (6) The projected gradient descent method fixes a step size τ and computes updates with the rule  L R  ←PB  L −τ∇f(LR)R R −τ∇f(LR)′L  where PB denotes the Euclidean projection onto the set {(L, R) : max(∥L∥2 2,∞, ∥R∥2 2,∞) ≤B}. This projection can be computed by re-scaling the rows of the current iterate whose norms exceed √ B so their norms equal √ B. Rows with norms less than √ B are unchanged by the projection. The projected gradient algorithm is elegant and simple, and it has an online implementation, described below. Moreover, using an Armijo line search rule to guarantee sufficient decrease of the cost function, we can guarantee convergence to a stationary point of (3); see [10, Sec. 2.3]. 4 Proximal Point Method for Penalty Formulation Solving (2) is slightly more complicated than its constrained counterpart. We employ a classical proximal point method, proposed by Fukushima and Mine [8], which forms the algorithmic foundation of many popular first-order methods of for ℓ1-norm minimization [11, 12] and trace-norm minimization [13, 14]. The key idea is that our cost function is the sum of a smooth term plus a convex term. At each iteration, we replace the smooth term by a linear approximation. The new cost function can then be minimized in closed form. Before describing the proximal point algorithm in detail, we first discuss how a simple max-norm problem (the Frobenius norm plus a max-norm penalty) admits an explicit formula for its unique optimal solution. Consider the simple regularization problem minimizeW ∥W −V ∥2 F + β ∥W ∥2 2,∞ (7) 3 Algorithm 1 Compute W = squash(V , β) Require: A d × D matrix V , a positive scalar β. Ensure: A d × D matrix W ∈arg minZ ∥Z −V ∥2 F + β ∥Z∥2 2,∞. 1: for k = 1 to d set nk ←∥vk∥2 2: sort {nk} in descending order. Let π denote the sorting permutation such that nπ(j) is the jth largest element in the sequence. 3: for k = 1 to d set sk ←Pk i=1 nπ(i). 4: q ←max{k : nπ(k) ≥ sk k+β } 5: η ← sq q+β 6: for k = 1 to d, if k ≤q, set wπ(k) ←ηvπ(k)/∥vπ(k)∥2. otherwise set wπ(k) ←vπ(k) where W and V are d × D matrices. Just as with ℓ1-norm and trace-norm regularization, this problem can be solved in closed form. An efficient algorithm to solve (7) is given by Algorithm 1. We call this procedure squash because the rows of V with large norm have their magnitude clipped at a critical value η = η(V , β). Proposition 4.1 squash(V , β) is an optimal solution of (7) The proof of this proposition follows from an analysis of the KKT conditions for the regularized problem. We include a full derivation in the appendix. Note that squash can be computed in O(d max{log(d), D}) flops. Computing the row norms requires O(dD) flops, and then the sort requires O(d log d) flops. Computing η and q require O(d) operations. Constructing W then requires O(dD) operations. With the squash function in hand, we can now describe our proximal-point algorithm. Replace the decision variable X in (2) with LR′. With this substitution and the factored form of the maxnorm, (5), Problem (2) reduces to minimize(L,R)f(LR′) + µ max{∥L∥2 2,∞, ∥R∥2 2,∞} . (8) For ease of notation, define A to be the matrix of factors stacked on top of one another A =  L R  . With this notation, we have ∥A∥2 2,∞= max{∥L∥2 2,∞, ∥R∥2 2,∞}. Also let ˜f(A) denote f(LR′), and ϕ(A) := ˜f(A) + µ ∥A∥2 2,∞. Using the squash algorithm, we can solve minimize⟨∇˜f(Ak), A⟩+ τ −1 k ∥A −Ak∥2 F + µ ∥A∥2 2,∞ (9) in closed form. To see this, complete the square and multiply by τk. Then (9) is equivalent to (7) with the identifications W = A, V = Ak −τk∇˜f(Ak), β = τkµ. That is, the optimal solution of (9) is squash  Ak −τk∇˜f(Ak), τkµ  . We can now directly apply the proximal-point algorithm of Fukushima and Mine, detailed in Algorithm 2. Step 2 is the standard linearized proximal-point method that is prevalent in convex algorithms like Mirror Descent and Nesterov’s optimal method. The cost function ˜f is replaced with a quadratic approximation localized at the previous iterate Ak, and the resulting approximation (9) can be solved in closed form. Step 3 is a backtracking line search that looks for a step that obeys an Armijo step rule. This linesearch guarantees that the algorithm produces a sufficiently large decrease of the cost function at each iteration, but it may require several function evaluations to find l. This algorithm is guaranteed to converge to a critical point of (8) as long as the step sizes are chosen commensurate with the norm of the Hessian [8]. In particular, Nesterov has recently shown that if ˜f has a Lipschitz-continuous gradient with Lipschitz constant L, then the algorithm will converge at a rate of 1/k where k is the iteration counter [15]. 4 Algorithm 2 A proximal-point method for max-norm regularization Require: Algorithm parameters α > 0, 1 > γ > 0, ϵtol > 0. A sequence of positive numbers {τk}. An initial point A0 = (L0, R0) and a counter k set to 0. Ensure: A critical point of (8). 1: repeat 2: Solve (9) to find ˆ Ak. That is, ˆ Ak ←squash  Ak −τk∇˜f(Ak), τkµ  . 3: Compute the smallest nonnegative integer l such that ϕ(Ak + γl( ˆ Ak −Ak)) ≤ϕ(Ak) −αγl∥Ak −ˆ Ak∥2 F . 4: set Ak+1 ←(1 −γl)Ak + γl ˆ Ak, k ←k + 1. 5: until ∥Ak−ˆ Ak∥2 F ∥Ak∥2 F < ϵtol 5 Stochastic Gradient For many problems, including matrix completion and max-cut problems, the cost function decomposes over the individual entries in the matrix, so the function f(LR′) takes the particularly simple form: f(L, R) = X i,j∈S ℓ(Yij, L′ iRj) (10) where ℓis some fixed loss function, S is a set of row-column indices, Yij are some real numbers, and Li and Rj denote the ith row of L and jth row of R respectively. When dealing with very large datasets, S may consist of hundreds of millions of pairs, and there are algorithmic advantages to utilizing stochastic gradient methods that only query a very small subset of S at each iteration. Indeed, the above decomposition for f immediately suggests a stochastic gradient method: pick one training pair (i, j) at random at each iteration, take a step in the direction opposite the gradient of ℓ(Yi,j, L′ iRj) and then either apply the projection PB described in Section 3 or the squash function described in 4. The projection PB is particularly easy to compute in the stochastic setting. Namely, if ∥Li∥2 > B, we project it back so that ∥Li∥= √ B, otherwise we do not do anything (and similarly for Rj). We need not look at any other rows of L and R. As we demonstrate in experimental results section, this simple algorithm is computationally as efficient as optimization with the trace-norm. We can also implement an efficient algorithm for stochastic gradient descent for problem (2). If we wanted to apply the squash algorithm to such a stochastic gradient step, only the norms corresponding to Li and Rj would be modified. Hence, in Algorithm 1, if the set of row norms of L and R is sorted from the previous iteration, we can implement a balanced-tree data structure that allows us to perform individual updates in amortized logarithmic time. We leave such an implementation to future work. In the experiments, however, we demonstrate that the proximal point method is still quite efficient and fast when dealing with stochastic gradient updates corresponding to medium-size batches {(i, j)} selected from S, even if a full sort is performed at each squash operation. 6 Numerical Experiments Matrix Completion. We tested our proximal point and projected gradient methods on the Netflix dataset, which is the largest publicly available collaborative filtering dataset. The training set contains 100,480,507 ratings from 480,189 anonymous users on 17,770 movie titles. Netflix also provides a qualification set, containing 1,408,395 ratings. The “qualification set” pairs were selected by Netflix from the most recent ratings for a subset of the users. As a baseline, Netflix provided the test score of its own system trained on the same data, which is 0.9514. This dataset is interesting for several reasons. First, it is very large, and very sparse (98.8% sparse). Second, the dataset is very imbalanced, with highly nonuniform samples. It includes users with over 10,000 ratings as well as users who rated fewer than 5 movies. 5 0 5 10 15 20 25 30 35 40 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 Number of epochs RMSE Training Qualification Proximal Point Projected Gradient Training RMSE Qual Algorithm f(X) ∥X∥max f(X) + f(X) + µ ∥X∥max Proximal Point 0.7676 2.5549 0.7689 0.9150 Projected Gradient 0.7728 2.2500 0.7739 0.9138 Trace-norm 0.9235 Weighted Trace-norm 0.9105 Figure 1: Performance of regularization methods on the Netflix dataset. For the netflix dataset, we will evaluate our algorithms based on the root mean squared error (RMSE) of their predictions. To this end, the objective we seek to minimize takes the following form: minimizeL,R 1 |S| X (i,j)∈S (Yij −L′ iRj)2 + µ max{∥L∥2 2,∞, ∥R∥2 2,∞} where S here represents the set of observed user-movie pairs and Yij denote the provided ratings. For all of our experiments, we learned a factorization L′R with k = 30 dimensions (factors). In our experiments, all ratings were normalized to be zero-mean by subtracting 3.6. To speed up learning, we subdivided the Netflix dataset into minibatches, each containing 100,000 user/movie/rating triplets. Both proximal-point and projected gradient methods performed 40 epochs (or passes through the training set), with parameters {L, R} updated after each minibatch. For both algorithms we used momentum of 0.9, and a step size of 0.005, which was decreased by a factor of 0.8 after each epoch. For the proximal-point method, µ was set to 5×10−4, and for the projected gradient algorithm, B was set to 2.25. The running times of both algorithms on this large-scale Netflix dataset is comparable. On a 2.5 GHz Intel Xeon, our implementation of projected gradient takes 20.1 minutes per epoch, whereas the proximal-point method takes about 19.6 minutes. Figure 1 shows predictive performance of both the proximal-point and projected gradient algorithms on the training and qualification set. Observe that the proximal-point algorithm converges considerably faster than projected gradient, but both algorithms achieve a similar RMSE of 0.9150 (proximal point) and 0.9138 (projected gradient) on the qualification set. Figure 1, left panel, further shows that the max-norm based regularization significantly outperforms the corresponding trace-norm based regularization, which is widely used in many large-scale collaborative filtering applications. We also note that the differences between the max-norm and the weighted trace-norm [7] are rather small, with the weighted trace-norm slightly outperforming max-norm. Gset Max-Cut Experiments. In the MAX-CUT problem, we are given a graph G = (V, E), and we aim to solve the problem minimize X (i,j)∈E (1 −xixj) subject to x2 i = 1 ∀i ∈V The heralded Goemans-Williamson relaxation [16] converts this problem into a constrained, symmetric max-norm problem: minimize X (i,j)∈E (1 −Xij) subject to ∥X∥max ≤1, X ⪰0 . In our nonconvex formulation, this optimization becomes minimize X (i,j)∈E (1 −A′ iAj) subject to ∥A∥2 2,∞≤1 . Since the decision variable is symmetric and positive definite, we only need one factor A of size |V | × r. In all of our experiments with MAX-CUT type problems, we fixed r = 20. We used a diminishing step size rule of τk = τ0 √ k where k is the iteration counter. 6 Primal Time Iterations Time Iterations SDPLR SDPLR Obj. (.1%) (.1%) (1%) (1%) Obj. Time |V | |E| G22 14128.5 0.6 150 0.4 100 14135.7 3 2000 19990 G35 8007.4 0.5 200 0.3 100 8014.6 4 2000 11778 G36 7998.3 0.5 200 0.3 100 8005.9 7 2000 11766 G58 20116.6 2 300 .7 100 20135.90 29 5000 29570 G60 15207.0 2.1 400 0.29 50 15221.9 6 7000 17148 G67 7736.4 21.4 2050 1.3 100 7744.1 15 10000 20000 G70 9851.51 8.7 1700 .5 100 9861.2 21 10000 9999 G72 7800.4 13.8 2250 .6 100 7808.2 15 10000 20000 G77 11034.1 18.6 2150 .9 100 11045.1 20 14000 28000 G81 15639.6 28.4 2200 1.35 100 15655.2 33 20000 40000 Table 1: Performance of projected gradient on Gset graphs. Columns show primal objective within .1% of optimal, running time for .1% of optimal, number of iterations to reach .1% of optimal, running time for 1% of optimal, number of iterations to reach 1% of optimal, primal objective using SDPLR, running time of SDPLR, number of vertices, and number of edges. In our experiments, we set τ0 = 1. (a) Spectral Clustering (b) Max-cut clustering Figure 2: Comparison of spectral clustering (left) with MAX-CUT clustering (right). We tested our projected gradient algorithm on graphs drawn from the Gset, a collection of graphs designed for testing the efficacy of max-cut algorithms [17]. The results for a subset of these appears in Table 1 along with a comparison against a C implementation of Burer’s SDPLR code which has been optimized for the particular structure of the MAX-CUT problem [18]. On the same modern hardware, a Matlab implementation of our projected gradient method can reach .1% of the optimal value faster than the optimized and compiled SDPLR code. 2-class Clustering Experiments. For the 2-class clustering problem, we first build a K-nearest neighbor graph with K = 10 and weights wij defined as wij = max(si(j), sj(i)), with si(j) = exp  −||xi−xj||2 2σ2 i  and σi equal to the distance from xi to its Kth closest neighbor. We then choose a scalar δ > 0 and define an inverse similarity adjacency matrix Q by Qij = δ−Wij. The parameter δ controls the balancing of the clusters, a large value of δ forces the clusters to be of equal size. We solve the MAX-CUT problem on the graph Q to find our cluster assignments. As a synthetic example, we generated a “two moons” dataset consisting of two half-circles in R2 with the bottom half circle shifted to the right by 1/2 and shifted up by 1/2. The data is then embedded into RD and each embedded component is corrupted with Gaussian noise with variance σ2. For the two moons experiments, we fix D = 100, n = 2000 and σ = √ .02 as done in [19]. The parameters are set to δ = .01 and τ0 = 3/2; the algorithm was executed for 1500 iterations. For the clustering experiments, we repeat the randomized rounding technique [16] for 100 trials, and we choose the rounding with highest primal objective. We compare our MAX-CUT clusterings with the spectral clustering method [20] and the Total Variation Graph Cut algorithm [19]. Figure 2 shows the clustering results for spectral clustering and maxcut clustering. In all the trials, spectral clustering incorrectly clustered the two ends of both half-circles. For the clustering problems, the two measures of performance we consider are misclassification error rate (number of misclassified points divided by n) and cut cost. The cut cost is defined as P i∈V1,j∈V2 Wij. The MAX-CUT clustering obtained smaller misclassification error in 98 of the 100 trials we performed and smaller cut cost in every trial. On the MNIST database, we build the 10-NN graph described above on the digits 4 and 9, where we set δ = .001 and r = 8. The NN-graph is of size 14, 000 and the MAX-CUT algorithm takes 7 max-cut spectral TV Error Rate Cost Time min(|V1|,|V2|) |V1|+|V2| Error Rate Cost Error Rate Two Moons 0.053 311.9 13 .495 0.171 387.8 0.082 MNIST 4 and 9 0.021 1025.5 90 .493 0.458 1486.5 N/A MNIST 3 and 5 0.016 830.9 53 .476 0.092 2555.1 N/A Table 2: Clustering results. Error rate, cut cost, and running time comparison for MAX-CUT, spectral, and total variation (TV) algorithms. The balance of the cut is computed as min(|V1|,|V2|) |V1|+|V2| . The two moons results are averaged over 100 trials. approximately 1 minute to run 1,000 iterations. The same procedure is repeated for the digits 3 and 5. The results are shown in Table 2. Our MAX-CUT clustering algorithm again performs substantially better than the spectral method. 7 Summary In this paper we presented practical methods for solving very large scale optimization problems involving a max-norm constraint or regularizer. Using this approaches, we showed evidence that the max-norm can often be superior to established techniques such as trace-norm regularization and spectral clustering, supplementing previous evidence on small-scale problems. We hope that the increasing evidence of the utility of max-norm regularization, combined with the practical optimization techniques we present here, will reignite interest in using the max-norm for various machine learning applications. Acknowledgements RS supported by NSERC, Shell, and NTT Communication Sciences Laboratory. JAT supported by ONR award N00014-08-1-0883, DARPA award N66001-08-1-2065, and AFOSR award FA955009-1-0643. JL thanks TTI Chicago for hosting him while this work was completed. A Proof of the correctness of squash Rewrite (7) as the constrained optimization minimizeW ,t Pd i=1 ∥wi −vi∥2 + βt subject to ∥wi∥2 ≤t for 1 ≤i ≤d Forming a Lagrangian with a vector of Lagrange multipliers p ≥0 L(W , t, p) = d X i=1 ∥wi −vi∥2 + βt + d X i=1 pi(∥wi∥2 −t) , the KKT conditions for this problem thus read (a) wi = 1 1+pi vi, (b) p ≥0, (c) Pd i=1 pi = β, (d) ∥wi∥2 ≤t for 1 ≤i ≤d, (e) pi > 0 =⇒∥wi∥2 = t, and (f) ∥wi∥2 < t =⇒pi = 0. With our candidate W = squash(V , β), we need only find t and p to verify the optimality conditions. Let π be as in Algorithm 1 and set t = η2 and pk = ( ∥vk∥ η −1 1 ≤π(k) ≤q 0 otherwise This definition of p immediately gives (a). For (b), note that by the definition of q, ∥vk∥≥η for 1 ≤π(k) ≤q. Thus, p ≥0. Moreover, d X k=1 pk = P 1≤π(k)≤q ∥vk∥ η −q = q + β −q = β , yielding (c). Also, by construction, ∥wk∥= η if π(k) ≤q verifying (e). Finally, again by the definition of q, we have ∥vπ(q+1)∥< 1 β + q + 1 q+1 X k=1 ∥vπ(k)∥= 1 β + q + 1∥vπ(q+1)∥+ β + q β + q + 1η which implies ∥vπ(q+1)∥< η. Since ∥vk∥≤∥vπ(q+1)∥for π(k) > q, this gives (d) and the slackness condition (f). 8 References [1] Nathan Srebro, Jason Rennie, and Tommi Jaakkola. Maximum margin matrix factorization. In Advances in Neural Information Processing Systems, 2004. [2] Samuel Burer and R. D. C. Monteiro. A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming (Series B), 95:329–357, 2003. [3] Benjamin Recht, Maryam Fazel, and Pablo Parrilo. Guaranteed minimum rank solutions of matrix equations via nuclear norm minimization. SIAM Review, 2007. To appear. Preprint Available at http://pages.cs.wisc.edu/˜brecht/publications.html. [4] Francis R. Bach, Julien Marial, and Jean Ponce. Convex sparse matrix factorizations. Preprint available at arxiv.org/abs/0812.1869, 2008. [5] Nathan Srebro and Adi Shraibman. Rank, trace-norm and max-norm. In 18th Annual Conference on Learning Theory (COLT), 2005. [6] G. J. O. Jameson. Summing and Nuclear Norms in Banach Space Theory. Number 8 in London Mathematical Society Student Texts. Cambridge University Press, Cambridge, UK, 1987. [7] Ruslan Salakhutdinov and Nathan Srebro. Collaborative filtering in a non-uniform world: Learning with the weighted trace norm. Preprint available at arxiv.org/abs/1002.2780, 2010. [8] Masao Fukushima and Hisashi Mine. A generalized proximal point algorithm for certain non-convex minimization problems. International Journal of Systems Science, 12(8):989–1000, 1981. [9] Samuel Burer and Changhui Choi. Computational enhancements in low-rank semidefinite programming. Optimization Methods and Software, 21(3):493–512, 2006. [10] Dimitri P. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont, MA, 2nd edition, 1999. [11] T Hale, W Yin, and Y Zhang. A fixed-point continuation method for l 1-regularized minimization with applications to compressed sensing. Dept. Computat. Appl. Math., Rice Univ., Houston, TX, Tech. Rep. TR07-07, 2007. [12] Stephen J. Wright, Robert Nowak, and M´ario A. T. Figueiredo. Sparse reconstruction by separable approximation. Journal version, to appear in IEEE Transactions on Signal Processing. Preprint available at http:http://www.optimization-online.org/DB_HTML/2007/10/1813.html, 2007. [13] Jian-Feng Cai, Emmanuel J. Cand`es, and Zuowei Shen. A singular value thresholding algorithm for matrix completion. To appear in SIAM J. on Optimization. Preprint available at http://arxiv.org/ abs/0810.3286, 2008. [14] Shiqian Ma, Donald Goldfarb, and Lifeng Chen. Fixed point and Bregman iterative methods for matrix rank minimization. Preprint available at http://www.optimization-online.org/DB_HTML/ 2008/11/2151.html, 2008. [15] Yurii Nesterov. Gradient methods for minimizing composite objective function. To appear. Preprint Available at http://www.optimization-online.org/DB_HTML/2007/09/1784.html, September 2007. [16] M. X. Goemans and D. P. Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM, 42:1115–1145, 1995. [17] The Gset is available for download at http://www.stanford.edu/˜yyye/yyye/Gset/. [18] Samuel Burer. Sdplr. Software available at http://dollar.biz.uiowa.edu/˜sburer/www/ doku.php?id=software#sdplr. [19] Arthur Szlam and Xavier Bresson. A total variation-based graph clustering algorithm for cheeger ratio cuts. To appear in ICML 2010. Preprint available at ftp://ftp.math.ucla.edu/pub/ camreport/cam09-68.pdf, 2010. [20] Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, 2000. 9
2010
194
3,959
Deciphering subsampled data: adaptive compressive sampling as a principle of brain communication Guy Isely Redwood Center for Theoretical Neuroscience University of California, Berkeley guyi@berkeley.edu Christopher J. Hillar Mathematical Sciences Research Institute chillar@msri.org Friedrich T. Sommer University of California, Berkeley fsommer@berkeley.edu Abstract A new algorithm is proposed for a) unsupervised learning of sparse representations from subsampled measurements and b) estimating the parameters required for linearly reconstructing signals from the sparse codes. We verify that the new algorithm performs efficient data compression on par with the recent method of compressive sampling. Further, we demonstrate that the algorithm performs robustly when stacked in several stages or when applied in undercomplete or overcomplete situations. The new algorithm can explain how neural populations in the brain that receive subsampled input through fiber bottlenecks are able to form coherent response properties. 1 Introduction In the nervous system, sensory and motor information, as well as internal brain states, are represented by action potentials in populations of neurons. Most localized structures, such as sensory organs, subcortical nuclei and cortical regions, are functionally specialized and need to communicate through fiber projections to produce coherent brain function [14]. Computational studies of the brain usually investigate particular functionally and spatially defined brain structures. Our scope here is different as we are not concerned with any particular brain region or function. Rather, we study the following fundamental communication problem: How can a localized neural population interpret a signal sent to its synaptic inputs without knowledge of how the signal was sampled or what it represents? We consider the generic case that information is encoded in the activity of a local population (e.g. neurons of a sensory organ or a peripheral sensory area) and then communicated to the target region through an axonal fiber projection. Any solution of this communication problem is constrained by the following known properties of axonal fiber projections: Exact point-to-point connectivity genetically undefined: During development, genetically informed chemical gradients coarsely guide the growth of fiber projections but are unlikely to specify the precise synaptic patterns to target neurons [17]. Thus, learning mechanisms and synaptic plasticity seem necessary to form the precise wiring patterns from projection fibers to target neurons. Fiber projections constitute wiring bottlenecks: The number of axons connecting a pair of regions is often significantly smaller than the number of neurons encoding the representation within each region [10]. Thus, communication across fiber projections seems to rely on a form of compression. 1 Sizes of origin and target regions may differ: In general, the sizes of the region sending the fibers and the region targeted by them will be different. Thus, communication across fiber projections will often involve a form of recoding. We present a new algorithm for establishing and maintaining communication that satisfies all three constraints above. To model imprecise wiring, we assume that connections between regions are configured randomly and that the wiring scheme is unknown to the target region. To account for the bottleneck, we assume these connections contain only subsampled portions of the information emanating from the sender region; i.e., learning in the target region is based on subsampled data and not the original. Our work suggests that axon fiber projections can establish interfaces with other regions according to the following simple strategy: Connect to distant regions randomly, roughly guided by chemical gradients, then use local unsupervised learning at the target location to form meaningful representations of the input data. Our results can explain experiments in which retinal projections were redirected neonatally to the auditory thalamus and the rerouting produced visually responsive cells in auditory thalamus and cortex, with properties that are typical of cells in visual cortex [12]. Further, our model makes predictions about the sparsity of neural representations. Specifically, we predict that neuronal firing is sparser in locally projecting neurons (upper cortical layers) and less sparse in neurons with nonlocal axonal fiber projections. In addition to the neurobiological impact, we also address potential technical applications of the new algorithm and relations to other methods in the literature. 2 Background Sparse signals: It has been shown that many natural signals falling onto sensor organs have a higherorder structure that can be well-captured by sparse representations in an adequate basis; see [9, 6] for visual input and [1, 11] for auditory. The following definitions are pivotal to this work. Definition 1: An ensemble of signals X within Rn has sparse underlying structure if there is a dictionary Ω∈Rn×p so that any point x ∈Rn drawn from X can be expressed as x = Ωv for a sparse vector v ∈Rp. Definition 2: An ensemble of sparse vectors V within Rp is a sparse representation of a signal ensemble X in Rn if there exists a dictionary Ω∈Rn×p such that the random variable X satisfies X = ΩV . For theoretical reasons, we consider ensembles of random vectors (i.e. random variables) which arise from an underlying probability distribution on some measure space, although for real data sets (e.g. natural image patches) we cannot guarantee this to be the case. Nonetheless, the theoretical consequences of this assumption (e.g. Theorem 4.2) appear to match what happens in practice for real data (figures 2-4). Compressive sampling with a fixed basis: Compressive sampling (CS) [2] is a recent method for representing data with sparse structure using fewer samples than required by the Nyquist-Shannon theorem. In one formulation [15], a signal x ∈Rn is assumed to be k-sparse in an n × p dictionary matrix Ψ; that is, x = Ψa for some vector a ∈Rp with at most k nonzero entries. Next, x is subsampled using an m × n incoherent matrix Φ to give noisy measurements y = Φx + w with m ≪n and independent noise w ∼N(0, σ2Im×m). To recover the original signal, the following convex optimization problem (called Lasso in the literature) is solved: bb(y) := arg min a  1 2n||y −ΦΨb||2 2 + λ|b|1  , (1) and then bx := Ψbb is set to be the approximate recovery of x. Remarkably, as can be shown using [15, Theorem 1], the preceding algorithm determines a unique bb and is guaranteed to be exact within the noise range: ||x −bx||2 = O(σ) (2) with high probability (exponential in m/k) as long as the matrix ΦΨ satisfies mild incoherence hypotheses, λ = Θ(σ p (log p)/m), and the sparsity is on the order k = O(m/ log p). 2 Typically, the matrix Ψ is p × p orthogonal, and the incoherence conditions reduce to deterministic constraints on Φ only. Although in general it is very difficult to decide whether a given Φ satisfies these conditions, it is known that many random ensembles, such as i.i.d. Φij ∼N(0, 1/m), satisfy them with high probability. In particular, compression ratios on the order (k log p)/p are achievable for k-sparse signals using a random Φ chosen this way. Dictionary learning by sparse coding: For some natural signals there are well-known bases (e.g. Gabor wavelets, the DCT) in which those signals are sparse or nearly sparse. However, an arbitrary class of signals can be sparse in unknown bases, some of which give better encodings than others. It is compelling to learn a sparse dictionary for a class of signals instead of specifying one in advance. Sparse coding methods [6] learn dictionaries by minimizing the empirical mean of an energy function that combines the ℓ2 reconstruction error with a sparseness penalty on the encoding: E(x, a, Ψ) = ||x −Ψa||2 2 + λS(a). (3) A common choice for the sparsity penalty S(a) that works well in practice is the ℓ1 penalty S(a) = |a|1. Fixing Ψ and x and minimizing (3) with respect to a produces a vector ba(x) that approximates a sparse encoding for x.1 For a fixed set of signals x and encodings a, minimizing the mean value of (3) with respect to Ψ and renormalizing columns produces an improved sparse dictionary. Alternating optimization steps of this form, one can learn a dictionary that is tuned to the statistics of the class of signals studied. Sparse coding on natural stimuli has been shown to learn basis vectors that resemble the receptive fields of neurons in early sensory areas [6, 7, 8]. Notice that once an (incoherent) sparsity-inducing dictionary Ψ is learned, inferring sparse vectors ba(x) from signals x is an instance of the Lasso convex optimization problem. Blind Compressed Sensing: With access to an uncompressed class of sparse signals, dictionary learning can find a sparsity-inducing basis which can then be used for compressive sampling. But what if the uncompressed signal is unavailable? Recently, this question was investigated in [4] using the following problem statement. Blind compressed sensing (BCS): Given a measurement matrix Φ and measurements {y1, . . . , yN} of signals {x1, . . . , xN} drawn from an ensemble X, find a dictionary Ψ and k-sparse vectors {b1, . . . , bN} such that xi = Ψbi for each i = 1, . . . , N. It turns out that the BCS problem is ill-posed in the general case [4]. The difficulty is that though it is possible to learn a sparsity-inducing dictionary Θ for the measurements Y , there are many decompositions of this dictionary into Φ and a matrix Ψ since Φ has a nullspace. Thus, without additional assumptions, one cannot uniquely recover a dictionary Ψ that can reconstruct x as Ψb. 3 Adaptive Compressive Sampling It is tantalizing to hypothesize that a neural population in the brain could combine the principles of compressive sampling and dictionary learning to form sparse representations of inputs arriving through long-range fiber projections. Note that information processing in the brain should rely on faithful representations of the original signals but does not require a solution of the ill-posed BCS problem which involves the full reconstruction of the original signals. Thus, the generic challenge a neural population embedded in the brain might have to solve can be captured by the following problem. Adaptive compressive sampling (ACS): Given measurements Y = ΦX generated from an unknown Φ and unknown signal ensemble X with sparse underlying structure, find signals B(Y ) which are sparse representations of X. Note the two key differences between the ACS and the BCS problem. First, the ACS problem asks only for sparse representations b of the data, not full reconstruction. Second, the compression matrix Φ is unknown in the ACS problem but is known in the BCS problem. Since it is unrealistic to assume that a brain region could have knowledge of how an efferent fiber bundle subsamples the brain region it originates from, the second difference is also crucial. We propose a relatively simple algorithm for potentially solving the ACS problem: use sparse coding for dictionary learning in the 1As a convention in this paper, a vs. b denotes a sparse representation inferred from full vs. compressed signals. 3 y b Θ Φ x a Ψ RM Figure 1: ACS schematic. A signal x with sparse structure in dictionary Ψ is sampled by a compressing measurement matrix Φ, constituting a transmission bottleneck. The ACS coding circuit learns a dictionary Θ for y in the compressed space, but can be seen to form sparse representations b of the original data x as witnessed by the matrix RM in (6). compressed space. The proposed ACS objective function is defined as: E(y, b, Θ) = ||y −Θb||2 2 + λS(b). (4) Iterated minimization of the empirical mean of this function first with respect to b and then with respect to Θ will produce a sparsity dictionary Θ for the compressed space and sparse representations bb(y) of the y. Our results verify theoretically and experimentally that once the dictionary matrix Θ has converged, the objective (4) can be used to infer sparse representations of the original signals x from the compressed data y. As has been shown in the BCS work, one cannot uniquely determine Ψ with access only to the compressed signals y. But this does not imply that no such matrix exists. In fact, given a separate set of uncompressed signals x′, we calculate a reconstruction matrix RM demonstrating that the bb are indeed sparse representations of the original x. Importantly, the x′ are not used to solve the ACS problem, but rather to demonstrate that a solution was found. The process for computing RM using the x′ is analogous to the process used by electrophysiologists to measure the receptive fields of neurons. Electrophysiologists are interested in characterizing how neurons in a region respond to different stimuli. They use a simple approach to determine these stimulus-response properties: probe the neurons with an ensemble of stimuli and compute stimulusresponse correlations. Typically it is assumed that a neural response b is a linear function of the stimulus x; that is, b = RFx for some receptive field matrix RF. One may then calculate an RF by minimizing the empirical mean of the prediction error: E(RF) = ∥b −RFx∥2 2. As shown in [13], the closed-form solution to this minimization is RF = C−1 ss Csr, in which Css is the stimulus autocorrelation matrix ⟨xx⊤⟩X, and Csr is the stimulus-response cross-correlation matrix ⟨xb⊤⟩X. In contrast to the assumption of a linear response typically made in electrophysiology, here we assume a linear generative model: x = Ψa. Thus, instead of minimizing the prediction error, we ask for the reconstruction matrix RM that minimizes the empirical mean of the reconstruction error: E(RM) = ∥x −RMb∥2 2. (5) In this case, the closed form solution of this minimization is given by RM = CsrC−1 rr , (6) in which Csr is the stimulus-response cross-correlation matrix as before and Crr is the response autocorrelation matrix ⟨bb(y(x))bb(y(x))⊤⟩X. As we show below, calculating (6) from a set of uncompressed signals x′ yields an RM that reconstructs the original signal x from bb as x = RM bb. Thus, we can conclude that encodings bb computed by ACS are sparse representations of the original signals. 4 Theoretical Results The following hold for ACS under mild hypotheses (we postpone details for a future work). Theorem 4.1 Suppose that an ensemble of signals is compressed with a random projection Φ. If ACS converges on a sparsity-inducing dictionary Θ and Crr is invertible, then Θ = Φ · RM. Theorem 4.2 Suppose that an ensemble of signals has a sparse representation with dictionary Ψ. If ACS converges on a sparsity-inducing dictionary, then the outputs of ACS are a sparse representation for the original signals in the dictionary of the reconstruction matrix RM given by (6). Moreover, there exists a diagonal matrix D and a partial permutation matrix P such that Ψ = RM ·DP. 4 (a) (b) (c) Figure 2: Subsets of the reconstruction matrices RM for the ACS networks trained on synthetic sparse data generated using bases (a) standard 2D, (b) 2D DCT, (c) learned by sparse coding on natural images. The components of RM in (a) and (b) are arranged by spatial location and spatial frequency respectively to help with visual interpretation. 5 Experimental results To demonstrate that the ACS algorithm solves the ACS problem in practice, we train ACS networks on synthetic and natural image patches. We use 16 × 16 image patches which are compressed by an i.i.d. gaussian measurement matrix before ACS sees them. Unless otherwise stated we use a compression factor of 2; that is, the 256 dimensional patches were captured by 128 measurements sent to the ACS circuit (current experiments are successful with a compression factor of 10). The feature sign algorithm developed in [5] is used for inference of b in (4). After the inference step, Θ is updated using gradient decent in (4). The matrix Θ is initialized randomly and renormalized to have unit length columns after each learning step. Learning is performed until the ACS circuit converges on a sparsity basis for the compressed space. To assess whether the sparse representations formed by the ACS circuit are representations of the original data, we estimate a reconstruction matrix RM as in (6) by correlating a set of 10,000 uncompressed image patches with their encodings b in the ACS circuit. Using RM and the ACS circuit, we reconstruct original data from compressed data. Reconstruction performance is evaluated on a test set of 1000 image patches by computing the signal-to-noise ratio of the reconstructed signals bx: SNR = 10 log10  ⟨||x||2 2⟩X ⟨||x−bx||2 2⟩X  . For comparison, we also performed CS using the feature sign algorithm to solve (1) using a fixed sparsity basis Ψ and reconstruction given by bx = Ψbb. Synthetic Data: To assess ACS performance on data of known sparsity we first generate synthetic image patches with sparse underlying structure in known bases. We test with three different bases: the standard 2D basis (i.e. single pixel images), the 2D DCT basis, and a Gabor-like basis learned by sparse coding on natural images. We generate random sparse binary vectors with k = 8, multiply these vectors by the chosen basis to get images, and then compress these images to half their original lengths to get training data. For each type of synthetic data, a separate ACS network is trained with λ = .1 and reconstruction matrix RM is computed. The RM corresponding to each generating basis type is shown in Figure 2(a)-(c). We can see that RM closely resembles a permutation of generating basis as predicted by Theorem 4.2. The mean SNR of the reconstructed signals in each case is 34.05 dB, 47.05 dB, and 36.38 dB respectively. Further, most ACS encodings are exact in the sense that they exactly recovered the components used to synthesize the original image. Specifically, for the DCT basis 95.4% of ACS codes have the same eight active basis vectors as were used to generate the original image patch. Thresholding to remove small coefficients (coring) makes it 100%. To explore how ACS performs in cases where the signals cannot be modeled exactly with sparse representations, we generate sparse synthetic data (k = 8) with the 2D DCT basis and add gaussian noise. Figure 3(a) compares reconstruction fidelity of ACS and CS for increasing levels of noise. 5 (a) (c) (b) (d) Figure 3: Mean SNR of reconstructions. (a) compares ACS performance to CS performance with true generating basis (DCT) for synthetic images with increasing amounts of gaussian noise. (b) and (c) compare the performances of ACS, CS with a basis learned by sparse coding on natural images and CS with the DCT basis. Performances plotted against the compression factor (b) and the value of λ used for encoding. (d) shows ACS performance on natural images vs. the completeness factor. (a) (b) Figure 4: (a) RM for an ACS network trained on natural images with compression factor of 2, (b) ACS reconstruction of a 128 × 128 image using increasing compression factors. Clockwise from the top left: the original image, ACS with compression factors of 2, 4, and 8. For pure sparse data (noise σ2 = 0) CS outperforms ACS significantly. Without noise, CS is limited by machine precision and reaches a mean SNR which is off the chart at 308.22 dB whereas ACS is limited by inaccuracies in the learning process as well as inaccuracies in computing RM. For a large range of noise levels CS and ACS performance become nearly identical. For very high levels of noise CS and ACS performances begin to diverge as the advantage of knowing the true sparsity basis becomes apparent again. Natural Images: Natural image patches have sparse underlying structure in the sense that they can be well approximated by sparse linear combinations of fixed bases, but they cannot be exactly reconstructed at a level of sparsity required by the theorems of CS and ACS. Thus, CS and ACS cannot be 6 expected to produce exact reconstructions of natural image patches. To explore the performance of ACS on natural images we train ACS models on compressed image patches from whitened natural images. The RM matrix for an ACS network using the default compression factor of 2 is shown in Figure 4(a). Next we explore how the fidelity of ACS reconstructions varies with the compression factor. Figure 4(b) shows an entire image portion reconstructed patch-wise by ACS for increasing compression factors. Figure 3(b) compares the SNR of these reconstructions to CS reconstructions. Since there is no true sparsity basis for natural images, we perform CS either with a dictionary learned from uncompressed natural images using sparse coding or with the 2D DCT. Both the ACS sparsity basis and sparse coding basis used with CS are learned with λ fixed at .1 in eq. (3). 3(b) demonstrates that CS performs much better with the learned dictionary than with the standard 2D DCT. Further, the plot shows that ACS reconstructions produces slightly higher fidelity reconstructions than CS. However, the comparison between CS and ACS might be confounded by the sensitivity of these algorithms to the value of λ used during encoding. In the context of CS, there is a sweet spot for the sparsity of representations. More sparse encodings have a better chance of being accurately recovered from the measurements because they obey conditions of the CS theorems better. At the same time, these are less likely to be accurate encodings of the original signal since they are limited to fewer of the basis vectors for their reconstructions. As a result, reconstruction fidelity as a function of λ has a maximum at the sweet spot of sparsity for CS (decreasing the value of λ leads to sparser representations). Values of λ below this point produce representations that are not sparse enough to be accurately recovered from the compressed measurements, while values of λ above it produce representations that are too sparse to accurately model the original signal even if they could be accurately recovered. To explore how the performance of CS and ACS depends on the sparseness of their representations, we vary the value of λ used while encoding. Figure 3(c) compares ACS, CS with a sparse coding basis, and CS with the 2D DCT basis. Once again we see that ACS performs slightly better than CS with a learned dictionary, and much better than CS with the DCT basis. However, the shape of the curves with respect to the choice of λ while encoding suggests that our choice of value for λ while learning (.1 for both ACS and the sparse coding basis used with CS) may be suboptimal. Additionally, the optimal value of λ for CS may differ from the optimal value of λ for ACS. For these reasons, it is unclear if ACS exceeds the SNR performance of CS with dictionary learning when in the optimal regime for both approaches. Most likely, as 3(b) suggests, their performances are not significantly different. However, one reason ACS might perform better is that learning a sparsity basis in compressed space tunes the sparsity basis with respect to the measurement matrix whereas performing dictionary learning for CS estimates the sparsity basis independently of the measurement matrix. Additionally, having its sparsity basis in the compressed space means that ACS is more efficient in terms of runtime than dictionary learning for CS because the lengths of basis vectors are reduced by the compression factor. ACS in brain communication: When considering ACS as a model of communication in the brain, one important question is whether it works when the representational dimensions vary from region to region. Typically in CS, the number of basis functions is chosen to equal the dimension of the original space. To demonstrate how ACS could model the communication between regions with different representation dimensions, we train ACS networks whose encoding dimensions are larger or smaller than the dimension of the original space (overcomplete or undercomplete). As shown in figure 3(d), the reconstruction fidelity decreases in the undercomplete case because representations in that space either have fewer total active coding vectors or are significantly less sparse. Interestingly, the reconstruction fidelity increases in the overcomplete case. We suspect that this gain from overcompleteness also applies in standard CS with an overcomplete dictionary, but this has not been tested so far. Figure 5: A subset of RM from each stage of our multistage ACS model. 7 Another issue to consider for ACS as a model of communication in the brain is whether signal fidelity is preserved through repeated communications. To investigate this question we simulated multiple stages of communication using ACS. In our model the input of compressed natural image patches is encoded as a sparse representation in the first region, transmitted as a compressed signal to a second region where it is encoded sparsely, and compressively transmitted once again to a third region that performs the final encoding. Obviously, this is a vacuous model of neural computation since there is little use in simply retransmitting the same signal. A meaningful model of cortical processing would involve additional local computations on the sparse representations before retransmission. However, this basic model can help us explore the effects of repeated communication by ACS. Using samples from the uncompressed space, we compute RM for each stage just as for a single stage model. Figure 5 shows subsets of the components of RM for each stage. Notice that meaningful gabor-like structure is preserved between stages. 6 Discussion In this paper, we propose ACS, a new algorithm for learning meaningful sparse representations of compressively sampled signals without access to the full signals. Two crucial differences set ACS apart from traditional CS. First, the ACS coding circuit is formed by unsupervised learning on subsampled signals and does not require knowledge of the sparsity basis of the signals nor of the measurement matrix used for subsampling. Second, the information in the fully trained ACS coding circuit is insufficient to reconstruct the original signals. To assess the usefulness of the representations formed by ACS, we developed a second estimation procedure that probes the trained ACS coding circuit with the full signals and correlates signal with encoding. Similarly to the electrophysiological approach of computing receptive fields, we computed a reconstruction matrix RM. Theorem 4.2 proves that after convergence, ACS produces representations of the full data and that the estimation procedure finds a reconstruction matrix which can reproduce the full data. Further, our simulation experiments revealed that the RM matrix contained smooth receptive fields resembling oriented simple cells (Figures 2 and 4), suggesting that the ACS learning scheme can explain the formation of receptive fields even when the input to the cell population is undersampled (and thus conventional sparse coding would falter). In addition, the combination of ACS circuit and RM matrix can be used in practice for data compression and be directly compared with traditional CS. Interestingly, ACS is fully on par with CS in terms of reconstruction quality (Figure 3). At the same time it is both flexible and stackable, and it works in overcomplete and undercomplete cases. The recent work on BCS [4] addressed a similar problem where the sparsity basis of compressed samples is unknown. A main difference between BCS and ACS is that BCS aims for full reconstruction of the original signals from compressed signals whereas ACS does not. As a consequence, BCS is generally ill-posed [4], whereas ACS permits a solution, as we have shown. We have argued that full data reconstruction is not a prerequisite for communication between brain regions. However, note that ACS can be made a full reconstruction algorithm if there is limited access to uncompressed signal. Thus, neither ACS nor practical applications of BCS are fully blind learning algorithms, as both rely on further constraints [4] inferred from the original data. An alternative to ACS / BCS for introducing learning in CS was to adapt the measurement matrix to data [3, 16]. The engineering implications of ACS merit further exploration. In particular, our compression results with overcomplete ACS indicate that the reconstruction quality was significantly higher than with standard CS. Additionally, the unsupervised learning with ACS may have advantages in situations where access to uncompressed signals is limited or very expensive to acquire. With ACS it is possible to do the heavy work of learning a good sparsity basis entirely in the compressed space and only a small number of samples from the uncompressed space are required to reconstruct with RM. Perhaps the most intriguing implications of our work concern neurobiology. Our results clearly demonstrate that meaningful sparse representations can be learned on the far end of wiring bottlenecks, fully unsupervised, and without any knowledge of the subsampling scheme. In addition, ACS with overcomplete or undercomplete codes suggests how sparse representations can be communicated between neural populations of different sizes. From our study, we predict that firing patterns of neurons sending long-range axons might be less sparse than those involved in local connectivity, a hypothesis that could be experimentally verified. It is intriguing to think that the elegance and simplicity of compressive sampling and sparse coding could be exploited by the brain. 8 References [1] A. Bell and T. Sejnowski. Learning the higher-order structure of a natural sound. Network: Computation in Neural Systems, 7(2):261–266, 1996. [2] E.J. Cand`es. Compressive sampling. In Proceedings of the International Congress of Mathematicians, volume 3, pages 1433–1452. Citeseer, 2006. [3] M. Elad. Optimized projections for compressed sensing. IEEE Transactions on Signal Processing, 55(12):5695–5702, 2007. [4] S. Gleichman and Y.C. Eldar. Blind Compressed Sensing. preprint, 2010. [5] H. Lee, A. Battle, R. Raina, and A.Y. Ng. Efficient sparse coding algorithms. Advances in neural information processing systems, 19:801, 2007. [6] B.A. Olshausen and D.J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607–609, 1996. [7] M. Rehn and F.T. Sommer. A network that uses few active neurones to code visual input predicts the diverse shapes of cortical receptive fields. Journal of Computational Neuroscience, 22(2):135–146, 2007. [8] C.J. Rozell, D.H. Johnson, R.G. Baraniuk, and B.A. Olshausen. Sparse coding via thresholding and local competition in neural circuits. Neural computation, 20(10):2526–2563, 2008. [9] D.L. Ruderman and W. Bialek. Statistics of natural images: Scaling in the woods. Physical Review Letters, 73(6):814–817, 1994. [10] A. Sch¨uz, D. Chaimow, D. Liewald, and M. Dortenman. Quantitative aspects of corticocortical connections: a tracer study in the mouse. Cerebral Cortex, 16(10):1474, 2006. [11] E.C. Smith and M.S. Lewicki. Efficient auditory coding. Nature, 439(7079):978–982, 2006. [12] M. Sur, P.E. Garraghty, and A.W. Roe. Experimentally induced visual projections into auditory thalamus and cortex. Science(Washington), 242(4884):1437–1437, 1988. [13] F.E. Theunissen, S.V. David, N.C. Singh, A. Hsu, W.E. Vinje, and J.L. Gallant. Estimating spatio-temporal receptive fields of auditory and visual neurons from their responses to natural stimuli. Network: Computation in Neural Systems, 12(3):289–316, 2001. [14] D.C. Van Essen, C.H. Anderson, and D.J. Felleman. Information processing in the primate visual system: an integrated systems perspective. Science, 255(5043):419–423, 1992. [15] M.J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ell1-constrained quadratic programming (Lasso). IEEE Trans. Information Theory, pages 2183–2202, 2009. [16] Y. Weiss, H. Chang, and W. Freeman. Learning compressed sensing. In Snowbird Learning Workshop, Allerton, CA. Citeseer, 2007. [17] R.J. Wyman and J.B. Thomas. What genes are necessary to make an identified synapse? In Cold Spring Harbor Symposia on Quantitative Biology, volume 48, page 641. Cold Spring Harbor Laboratory Press, 1983. 9
2010
195
3,960
Learning Convolutional Feature Hierarchies for Visual Recognition Koray Kavukcuoglu1, Pierre Sermanet1, Y-Lan Boureau2,1, Karol Gregor1, Micha¨el Mathieu1, Yann LeCun1 1 Courant Institute of Mathematical Sciences, New York University 2 INRIA - Willow project-team∗ {koray,sermanet,ylan,kgregor,yann}@cs.nyu.edu, mmathieu@clipper.ens.fr Abstract We propose an unsupervised method for learning multi-stage hierarchies of sparse convolutional features. While sparse coding has become an increasingly popular method for learning visual features, it is most often trained at the patch level. Applying the resulting filters convolutionally results in highly redundant codes because overlapping patches are encoded in isolation. By training convolutionally over large image windows, our method reduces the redudancy between feature vectors at neighboring locations and improves the efficiency of the overall representation. In addition to a linear decoder that reconstructs the image from sparse features, our method trains an efficient feed-forward encoder that predicts quasisparse features from the input. While patch-based training rarely produces anything but oriented edge detectors, we show that convolutional training produces highly diverse filters, including center-surround filters, corner detectors, cross detectors, and oriented grating detectors. We show that using these filters in multistage convolutional network architecture improves performance on a number of visual recognition and detection tasks. 1 Introduction Over the last few years, a growing amount of research on visual recognition has focused on learning low-level and mid-level features using unsupervised learning, supervised learning, or a combination of the two. The ability to learn multiple levels of good feature representations in a hierarchical structure would enable the automatic construction of sophisticated recognition systems operating, not just on natural images, but on a wide variety of modalities. This would be particularly useful for sensor modalities where our lack of intuition makes it difficult to engineer good feature extractors. The present paper introduces a new class of techniques for learning features extracted though convolutional filter banks. The techniques are applicable to Convolutional Networks and their variants, which use multiple stages of trainable convolutional filter banks, interspersed with non-linear operations, and spatial feature pooling operations [1, 2]. While ConvNets have traditionally been trained in supervised mode, a number of recent systems have proposed to use unsupervised learning to pretrain the filters, followed by supervised fine-tuning. Some authors have used convolutional forms of Restricted Boltzmann Machines (RBM) trained with contrastive divergence [3], but many of them have relied on sparse coding and sparse modeling [4, 5, 6]. In sparse coding, a sparse feature vector z is computed so as to best reconstruct the input x through a linear operation with a learned dictionary matrix D. The inference procedure produces a code z∗by minimizing an energy function: L(x, z, D) = 1 2||x −Dz||2 2 + |z|1, z∗= arg min z L(x, z, D) (1) ∗Laboratoire d’Informatique de l’Ecole Normale Sup´erieure (INRIA/ENS/CNRS UMR 8548) 1 Figure 1: Left: A dictionary with 128 elements, learned with patch based sparse coding model. Right: A dictionary with 128 elements, learned with convolutional sparse coding model. The dictionary learned with the convolutional model spans the orientation space much more uniformly. In addition it can be seen that the diversity of filters obtained by convolutional sparse model is much richer compared to patch based one. The dictionary is obtained by minimizing the energy 1 wrt D: minz,D L(x, z, D) averaged over a training set of input samples. There are two problems with the traditional sparse modeling method when training convolutional filter banks: 1: the representations of whole images are highly redundant because the training and the inference are performed at the patch level; 2: the inference for a whole image is computationally expensive. First problem. In most applications of sparse coding to image analysis [7, 8], the system is trained on single image patches whose dimensions match those of the filters. After training, patches in the image are processed separately. This procedure completely ignores the fact that the filters are eventually going to be used in a convolutional fashion. Learning will produce a dictionary of filters that are essentially shifted versions of each other over the patch, so as to reconstruct each patch in isolation. Inference is performed on all (overlapping) patches independently, which produces a very highly redundant representation for the whole image. To address this problem, we apply sparse coding to the entire image at once, and we view the dictionary as a convolutional filter bank: L(x, z, D) = 1 2||x − K X k=1 Dk ∗zk||2 2 + |z|1, (2) where Dk is an s × s 2D filter kernel, x is a w × h image (instead of an s × s patch), zk is a 2D feature map of dimension (w + s −1) × (h + s −1), and “∗” denotes the discrete convolution operator. Convolutional Sparse Coding has been used by several authors, notably [6]. To address the second problem, we follow the idea of [4, 5], and use a trainable, feed-forward, nonlinear encoder module to produce a fast approximation of the sparse code. The new energy function includes a code prediction error term: L(x, z, D, W) = 1 2||x − K X k=1 Dk ∗zk||2 2 + K X k=1 ||zk −f(W k ∗x)||2 2 + |z|1, (3) where z∗= arg minz L(x, z, D, W) and W k is an encoding convolution kernel of size s × s, and f is a point-wise non-linear function. Two crucially important questions are the form of the non-linear function f, and the optimization method to find z∗. Both questions will be discussed at length below. The contribution of this paper is to address both issues simultaneously, thus allowing convolutional approaches to sparse coding to scale up, and opening the road to real-time applications. 2 Algorithms and Method In this section, we analyze the benefits of convolutional sparse coding for object recognition systems, and propose convolutional extensions to the coordinate descent sparse coding (CoD) [9] algorithm and the dictionary learning procedure. 2.1 Learning Convolutional Dictionaries The key observation for modeling convolutional filter banks is that the convolution of a signal with a given kernel can be represented as a matrix-vector product by constructing a special Toeplitzstructured matrix for each dictionary element and concatenating all such matrices to form a new 2 dictionary. Any existing sparse coding algorithm can then be used. Unfortunately, this method incurs a cost, since the size of the dictionary then depends on the size of the input signal. Therefore, it is advantageous to use a formulation based on convolutions rather than following the naive method outlined above. In this work, we use the coordinate descent sparse coding algorithm [9] as a starting point and generalize it using convolution operations. Two important issues arise when learning convolutional dictionaries: 1. The boundary effects due to convolutions need to be properly handled. 2. The derivative of equation 2 should be computed efficiently. Since the loss is not jointly convex in D and z, but is convex in each variable when the other one is kept fixed, sparse dictionaries are usually learned by an approach similar to block coordinate descent, which alternatively minimizes over z and D (e.g., see [10, 8, 4]). One can use either batch [7] (by accumulating derivatives over many samples) or online updates [8, 6, 5] (updating the dictionary after each sample). In this work, we use a stochastic online procedure for updating the dictionary elements. The updates to the dictionary elements, calculated from equation 2, are sensitive to the boundary effects introduced by the convolution operator. The code units that are at the boundary might grow much larger compared to the middle elements, since the outermost boundaries of the reconstruction take contributions from only a single code unit, compared to the middle ones that combine s×s units. Therefore the reconstruction error, and correspondingly the derivatives, grow proportionally larger. One way to properly handle this situation is to apply a mask on the derivatives of the reconstruction error wrt z: DT ∗(x−D∗z) is replaced by DT ∗(mask(x)−D∗z), where mask is a term-by-term multiplier that either puts zeros or gradually scales down the boundaries. Algorithm 1 Convolutional extension to coordinate descent sparse coding[9]. A subscript index (set) of a matrix represent a particular element. For slicing the 4D tensor S we adopt the MATLAB notation for simplicity of notation. function ConvCoD(x, D, α) Set: S = DT ∗D Initialize: z = 0; β = DT ∗mask(x) Require: hα : smooth thresholding function. repeat ¯z = hα(β) (k, p, q) = arg maxi,m,n |zimn −¯zimn| (k : dictionary index, (p.q) : location index) bi = βkpq β = β + (zkpq −¯zkpq) × align(S(:, k, :, :), (p, q)) zkpq = ¯zkpq, βkpq = bi until change in z is below a threshold end function The second important point in training convolutional dictionaries is the computation of the S = DT ∗D operator. For most algorithms like coordinate descent [9], FISTA [11] and matching pursuit [12], it is advantageous to store the similarity matrix (S) explicitly and use a single column at a time for updating the corresponding component of code z. For convolutional modeling, the same approach can be followed with some additional care. In patch based sparse coding, each element (i, j) of S equals the dot product of dictionary elements i and j. Since the similarity of a pair of dictionary elements has to be also considered in spatial dimensions, each term is expanded as “full” convolution of two dictionary elements (i, j), producing 2s−1×2s−1 matrix. It is more convenient to think about the resulting matrix as a 4D tensor of size K × K × 2s −1 × 2s −1. One should note that, depending on the input image size, proper alignment of corresponding column of this tensor has to be applied in the z space. One can also use the steepest descent algorithm for finding the solution to convolutional sparse coding given in equation 2, however using this method would be orders of magnitude slower compared to specialized algorithms like CoD [9] and the solution would never contain exact zeros. In algorithm 1 we explain the extension of the coordinate descent algorithm [9] for convolutional inputs. Having formulated convolutional sparse coding, the overall learning procedure is simple stochastic (online) gradient descent over dictionary D: ∀xi ∈X training set : z∗= arg min z L(xi, z, D), D ←D −η ∂L(xi, z∗, D) ∂D (4) The columns of D are normalized after each iteration. A convolutional dictionary with 128 elements which was trained on images from Berkeley dataset [13] is shown in figure 1. 3 Figure 2: Left: Smooth shrinkage function. Parameters β and b control the smoothness and location of the kink of the function. As β →∞it converges more closely to soft thresholding operator. Center: Total loss as a function of number of iterations. The vertical dotted line marks the iteration number when diagonal hessian approximation was updated. It is clear that for both encoder functions, hessian update improves the convergence significantly. Right: 128 convolutional filters (W) learned in the encoder using smooth shrinkage function. The decoder of this system is shown in image 1. 2.2 Learning an Efficient Encoder In [4], [14] and [15] a feedforward regressor was trained for fast approximate inference. In this work, we extend their encoder module training to convolutional domain and also propose a new encoder function that approximates sparse codes more closely. The encoder used in [14] is a simple feedforward function which can also be seen as a small convolutional neural network: ˜z = gk × tanh(x ∗W k) (k = 1..K). This function has been shown to produce good features for object recognition [14], however it does not include a shrinkage operator, thus its ability to produce sparse representations is very limited. Therefore, we propose a different encoding function with a shrinkage operator. The standard soft thresholding operator has the nice property of producing exact zeros around the origin, however for a very wide region, the derivatives are also zero. In order to be able to train a filter bank that is applied to the input before the shrinkage operator, we propose to use an encoder with a smooth shrinkage operator ˜z = shβk,bk(x ∗W k) where k = 1..K and : shβk,bk(s) = sign(s) × 1/βk log(exp(βk × bk) + exp(βk × |s|) −1) −bk (5) Note that each βk and bk is a singleton per each feature map k. The shape of the smooth shrinkage operator is given in figure 2 for several different values of β and b. It can be seen that β controls the smoothness of the kink of shrinkage operator and b controls the location of the kink. The function is guaranteed to pass through the origin and is antisymmetric. The partial derivatives ∂sh ∂β and ∂sh ∂b can be easily written and these parameters can be learned from data. Updating the parameters of the encoding function is performed by minimizing equation 3. The additional cost term penalizes the squared distance between optimal code z and prediction ˜z. In a sense, training the encoder module is similar to training a ConvNet. To aid faster convergence, we use stochastic diagonal Levenberg-Marquardt method [16] to calculate a positive diagonal approximation to the hessian. We update the hessian approximation every 10000 samples and the effect of hessian updates on the total loss is shown in figure 2. It can be seen that especially for the tanh encoder function, the effect of using second order information on the convergence is significant. 2.3 Patch Based vs Convolutional Sparse Modeling Natural images, sounds, and more generally, signals that display translation invariance in any dimension, are better represented using convolutional dictionaries. The convolution operator enables the system to model local structures that appear anywhere in the signal. For example, if k ×k image patches are sampled from a set of natural images, an edge at a given orientation may appear at any location, forcing local models to allocate multiple dictionary elements to represent a single underlying orientation. By contrast, a convolutional model only needs to record the oriented structure once, since dictionary elements can be used at all locations. Figure 1 shows atoms from patch-based and convolutional dictionaries comprising the same number of elements. The convolutional dictionary does not waste resources modeling similar filter structure at multiple locations. Instead, it models more orientations, frequencies, and different structures including center-surround filters, double center-surround filters, and corner structures at various angles. In this work, we present two encoder architectures, 1. steepest descent sparse coding with tanh encoding function using gk × tanh(x ∗W k), 2. convolutional CoD sparse coding with shrink 4 encoding function using shβ,b(x ∗W k). The time required for training the first system is much higher than for the second system due to steepest descent sparse coding. However, the performance of the encoding functions are almost identical. 2.4 Multi-stage architecture Our convolutional encoder can be used to replace patch-based sparse coding modules used in multistage object recognition architectures such as the one proposed in our previous work [14]. Building on our previous findings, for each stage, the encoder is followed by and absolute value rectification, contrast normalization and average subsampling. Absolute Value Rectification is a simple pointwise absolute value function applied on the output of the encoder. Contrast Normalization is the same operation used for pre-processing the images. This type of operation has been shown to reduce the dependencies between components [17, 18] (feature maps in our case). When used in between layers, the mean and standard deviation is calculated across all feature maps with a 9 × 9 neighborhood in spatial dimensions. The last operation, average pooling is simply a spatial pooling operation that is applied on each feature map independently. One or more additional stages can be stacked on top of the first one. Each stage then takes the output of its preceding stage as input and processes it using the same series of operations with different architectural parameters like size and connections. When the input to a stage is a series of feature maps, each output feature map is formed by the summation of multiple filters. In the next sections, we present experiments showing that using convolutionally trained encoders in this architecture lead to better object recognition performance. 3 Experiments We closely follow the architecture proposed in [14] for object recognition experiments. As stated above, in our experiments, we use two different systems: 1. Steepest descent sparse coding with tanh encoder: SDtanh. 2. Coordinate descent sparse coding with shrink encoder: CDshrink. In the following, we give details of the unsupervised training and supervised recognition experiments. 3.1 Object Recognition using Caltech 101 Dataset The Caltech-101 dataset [19] contains up to 30 training images per class and each image contains a single object. We process the images in the dataset as follows: 1. Each image is converted to gray-scale and resized so that the largest edge is 151. 2. Images are contrast normalized to obtain locally zero mean and unit standard deviation input using a 9 × 9 neighborhood. 3. The short side of each image is zero padded to 143 pixels. We report the results in Table 1 and 2. All results in these tables are obtained using 30 training samples per class and 5 different choices of the training set. We use the background class during training and testing. Architecture : We use the unsupervised trained encoders in a multi-stage system identical to the one proposed in [14]. At first layer 64 features are extracted from the input image, followed by a second layers that produces 256 features. Second layer features are connected to fist layer features through a sparse connection table to break the symmetry and to decrease the number of parameters. Unsupervised Training : The input to unsupervised training consists of contrast normalized grayscale images [20] obtained from the Berkeley segmentation dataset [13]. Contrast normalization consists of processing each feature map value by removing the mean and dividing by the standard deviation calculated around 9 × 9 region centered at that value over all feature maps. First Layer: We have trained both systems using 64 dictionary elements. Each dictionary item is a 9 × 9 convolution kernel. The resulting system to be solved is a 64 times overcomplete sparse coding problem. Both systems are trained for 10 different sparsity values ranging between 0.1 and 3.0. Second Layer: Using the 64 feature maps output from the first layer encoder on Berkeley images, we train a second layer convolutional sparse coding. At the second layer, the number of feature maps is 256 and each feature map is connected to 16 randomly selected input features out of 64. Thus, we aim to learn 4096 convolutional kernels at the second layer. To the best of our knowledge, none of the previous convolutional RBM [3] and sparse coding [6] methods have learned such a large number of dictionary elements. Our aim is motivated by the fact that using such large number of elements and using a linear classifier [14] reports recognition results similar to [3] and [6]. In both of these studies a more powerful Pyramid Match Kernel SVM classifier [21] is used to match the same level of performance. Figure 3 shows 128 filters that connect to 8 first layer features. Each 5 Figure 3: Second stage filters. Left: Encoder kernels that correspond to the dictionary elements. Right: 128 dictionary elements, each row shows 16 dictionary elements, connecting to a single second layer feature map. It can be seen that each group extracts similar type of features from their corresponding inputs. row of filters connect a particular second layer feature map. It is seen that each row of filters extract similar features since their output response is summed together to form one output feature map. Logistic Regression Classifier SDtanh CDshrink PSD [14] U 57.1 ± 0.6% 57.3 ± 0.5% 52.2% U+ 57.6 ± 0.4% 56.4 ± 0.5% 54.2% Table 1: Comparing SDtanh encoder to CDshrink encoder on Caltech 101 dataset using a single stage architecture. Each system is trained using 64 convolutional filters. The recognition accuracy results shown are very similar for both systems. One Stage System: We train 64 convolutional unsupervised features using both SDtanh and CDshrink methods. We use the encoder function obtained from this training followed by absolute value rectification, contrast normalization and average pooling. The convolutional filters used are 9 × 9. The average pooling is applied over a 10 × 10 area with 5 pixel stride. The output of first layer is then 64 × 26 × 26 and fed into a logistic regression classifier and Lazebnik’s PMK-SVM classifier [21] (that is, the spatial pyramid pipeline is used, using our features to replace the SIFT features). Two Stage System: We train 4096 convolutional filters with SDtanh method using 64 input feature maps from first stage to produce 256 feature maps. The second layer features are also 9 × 9, producing 256 × 18 × 18 features. After applying absolute value rectification, contrast normalization and average pooling (on a 6 × 6 area with stride 4), the output features are 256 × 4 × 4 (4096) dimensional. We only use multinomial logistic regression classifier after the second layer feature extraction stage. We denote unsupervised trained one stage systems with U, two stage unsupervised trained systems with UU and “+” represents supervised training is performed afterwards. R stands for randomly initialized systems with no unsupervised training. Logistic Regression Classifier PSD [14] (UU) 63.7 PSD [14] (U+U+) 65.5 SDtanh (UU) 65.3 ± 0.9% SDtanh (U+U+) 66.3 ± 1.5% PMK-SVM [21] Classifier: Hard quantization + multiscale pooling + intersection kernel SVM SIFT [21] 64.6 ± 0.7% RBM [3] 66.4 ± 0.5% DN [6] 66.9 ± 1.1% SDtanh (U) 65.7 ± 0.7% Table 2: Recognition accuracy on Caltech 101 dataset using a variety of different feature representations using two stage systems and two different classifiers. Comparing our U system using both SDtanh and CDshrink (57.1% and 57.3%) with the 52.2% reported in [14], we see that convolutional training results in significant improvement. With two layers of purely unsupervised features (UU, 65.3%), we even achieve the same performance as the patchbased model of Jarrett et al. [14] after supervised fine-tuning (63.7%). Moreover, with additional supervised fine-tuning (U +U +) we match or perform very close to (66.3%) similar models [3, 6] 6 10 −2 10 −1 10 0 10 1 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91 false positives per image miss rate R+R+ (14.8%) U+U+ (11.5%) 10 −2 10 −1 10 0 10 1 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 false positives per image miss rate U+U+−bt0 (23.6%) U+U+−bt1 (16.5%) U+U+−bt2 (13.8%) U+U+−bt6 (12.4%) U+U+−bt3 (11.9%) U+U+−bt5 (11.7%) U+U+−bt4 (11.5%) Figure 4: Results on the INRIA dataset with per-image metric. Left: Comparing two best systems with unsupervised initialization (UU) vs random initialization (RR). Right: Effect of bootstrapping on final performance for unsupervised initialized system. with two layers of convolutional feature extraction, even though these models use the more complex spatial pyramid classifier (PMK-SVM) instead of the logistic regression we have used; the spatial pyramid framework comprises a codeword extraction step and an SVM, thus effectively adding one layer to the system. We get 65.7% with a spatial pyramid on top of our single-layer U system (with 256 codewords jointly encoding 2×2 neighborhoods of our features by hard quantization, then max pooling in each cell of the pyramid, with a linear SVM, as proposed by authors in [22]). Our experiments have shown that sparse features achieve superior recognition performance compared to features obtained using a dictionary trained by a patch-based procedure as shown in Table 2. It is interesting to note that the improvement is larger when using feature extractors trained in a purely unsupervised way, than when unsupervised training is followed by a supervised training phase (57.1 to 57.6). Recalling that the supervised tuning is a convolutional procedure, this last training step might have the additional benefit of decreasing the redundancy between patch-based dictionary elements. On the other hand, this contribution would be minor for dictionaries which have already been trained convolutionally in the unsupervised stage. 3.2 Pedestrian Detection We train and evaluate our architecture on the INRIA Pedestrian dataset [23] which contains 2416 positive examples (after mirroring) and 1218 negative full images. For training, we also augment the positive set with small translations and scale variations to learn invariance to small transformations, yielding 11370 and 1000 positive examples for training and validation respectively. The negative set is obtained by sampling patches from negative full images at random scales and locations. Additionally, we include samples from the positive set with larger and smaller scales to avoid false positives from very different scales. With these additions, the negative set is composed of 9001 training and 1000 validation samples. Architecture and Training A similar architecture as in the previous section was used, with 32 filters, each 7 × 7 for the first layer and 64 filters, also 7 × 7 for the second layer. We used 2 × 2 average pooling between each layer. A fully connected linear layer with 2 output scores (for pedestrian and background) was used as the classifier. We trained this system on 78 × 38 inputs where pedestrians are approximately 60 pixels high. We have trained our system with and without unsupervised initialization, followed by fine-tuning of the entire architecture in supervised manner. Figure 5 shows comparisons of our system with other methods as well as the effect of unsupervised initialization. After one pass of unsupervised and/or supervised training, several bootstrapping passes were performed to augment the negative set with the 10 most offending samples on each full negative image and the bigger/smaller scaled positives. We select the most offending sample that has the biggest opposite score. We limit the number of extracted false positives to 3000 per bootstrapping pass. As [24] showed, the number of bootstrapping passes matters more than the initial training set. We find that the best results were obtained after four passes, as shown in figure 5 improving from 23.6% to 11.5%. Per-Image Evaluation Performance on the INRIA set is usually reported with the per-window methodology to avoid postprocessing biases, assuming that better per-window performance yields better per-image perfor7 10 −2 10 −1 10 0 10 1 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 false positives per image miss rate Shapelet−orig (90.5%) PoseInvSvm (68.6%) VJ−OpenCv (53.0%) PoseInv (51.4%) Shapelet (50.4%) VJ (47.5%) FtrMine (34.0%) Pls (23.4%) HOG (23.1%) HikSvm (21.9%) LatSvm−V1 (17.5%) MultiFtr (15.6%) R+R+ (14.8%) U+U+ (11.5%) MultiFtr+CSS (10.9%) LatSvm−V2 (9.3%) FPDW (9.3%) ChnFtrs (8.7%) Figure 5: Results on the INRIA dataset with per-image metric. These curves are computed from the bounding boxes and confidences made available by [25]. Comparing our two best systems labeled (U +U + and R+R+)with all the other methods. mance. However [25] empirically showed that the per-window methodology fails to predict the performance per-image and therefore is not adequate for real applications. Thus, we evaluate the per-image accuracy using the source code available from [25], which matches bounding boxes with the 50% PASCAL matching measure ( intersection union > 0.5). In figure 5, we compare our best results (11.5%) to the latest state-of-the-art results (8.7%) gathered and published on the Caltech Pedestrians website1. The results are ordered by miss rate (the lower the better) at 1 false positive per image on average (1 FPPI). The value of 1 FPPI is meaningful for pedestrian detection because in real world applications, it is desirable to limit the number of false alarms. It can be seen from figure 4 that unsupervised initialization significantly improves the performance (14.8%vs11.5%). The number of labeled images in INRIA dataset is relatively small, which limits the capability of supervised learning algorithms. However, an unsupervised method can model large variations in pedestrian pose, scale and clutter with much better success. Top performing methods [26], [27], [28], [24] also contain several components that our simplistic model does not contain. Probably, the most important of all is color information, whereas we have trained our systems only on gray-scale images. Another important aspect is training on multiresolution inputs [26], [27], [28]. Currently, we train our systems on fixed scale inputs with very small variation. Additionally, we have used much lower resolution images than top performing systems to train our models (78 × 38 vs 128 × 64 in [24]). Finally, some models [28] use deformable body parts models to improve their performance, whereas we rely on a much simpler pipeline of feature extraction and linear classification. Our aim in this work was to show that an adaptable feature extraction system that learns its parameters from available data can perform comparably to best systems for pedestrian detection. We believe by including color features and using multi-resolution input our system’s performance would increase. 4 Summary and Future Work In this work we have presented a method for learning hierarchical feature extractors. Two different methods were presented for convolutional sparse coding, it was shown that convolutional training of feature extractors reduces the redundancy among filters compared with those obtained from patch based models. Additionally, we have introduced two different convolutional encoder functions for performing efficient feature extraction which is crucial for using sparse coding in real world applications. We have applied the proposed sparse modeling systems using a successful multi-stage architecture on object recognition and pedestrian detection problems and performed comparably to similar systems. In the pedestrian detection task, we have presented the advantage of using unsupervised learning for feature extraction. We believe unsupervised learning significantly helps to properly model extensive variations in the dataset where a pure supervised learning algorithm fails. We aim to further improve our system by better modeling the input by including color and multi-resolution information. 1http://www.vision.caltech.edu/Image Datasets/CaltechPedestrians/files/data-INRIA 8 References [1] LeCun, Y, Bottou, L, Bengio, Y, and Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, November 1998. [2] Serre, T, Wolf, L, and Poggio, T. Object recognition with features inspired by visual cortex. In CVPR’05 - Volume 2, pages 994–1000, Washington, DC, USA, 2005. IEEE Computer Society. [3] Lee, H, Grosse, R, Ranganath, R, and Ng, A. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In ICML’09, pages 609–616. ACM, 2009. [4] Ranzato, M, Poultney, C, Chopra, S, and LeCun, Y. Efficient learning of sparse representations with an energy-based model. In NIPS’07. MIT Press, 2007. [5] Kavukcuoglu, K, Ranzato, M, Fergus, R, and LeCun, Y. Learning invariant features through topographic filter maps. In CVPR’09. IEEE, 2009. [6] Zeiler, M, Krishnan, D, Taylor, G, and Fergus, R. Deconvolutional Networks. In CVPR’10. IEEE, 2010. [7] Aharon, M, Elad, M, and Bruckstein, A. M. K-SVD and its non-negative variant for dictionary design. In Papadakis, M, Laine, A. F, and Unser, M. A, editors, Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, volume 5914, pages 327–339, August 2005. [8] Mairal, J, Bach, F, Ponce, J, and Sapiro, G. Online dictionary learning for sparse coding. In ICML’09, pages 689–696. ACM, 2009. [9] Li, Y and Osher, S. Coordinate Descent Optimization for l1 Minimization with Application to Compressed Sensing; a Greedy Algorithm. CAM Report, pages 09–17. [10] Olshausen, B. A and Field, D. J. Sparse coding with an overcomplete basis set: a strategy employed by v1? Vision Research, 37(23):3311–3325, 1997. [11] Beck, A and Teboulle, M. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Img. Sci., 2(1):183–202, 2009. [12] Mallat, S and Zhang, Z. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397:3415, 1993. [13] Martin, D, Fowlkes, C, Tal, D, and Malik, J. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV’01, volume 2, pages 416–423, July 2001. [14] Jarrett, K, Kavukcuoglu, K, Ranzato, M, and LeCun, Y. What is the best multi-stage architecture for object recognition? In ICCV’09. IEEE, 2009. [15] Gregor, K and LeCun, Y. Learning fast approximations of sparse coding. In Proc. International Conference on Machine learning (ICML’10), 2010. [16] LeCun, Y, Bottou, L, Orr, G, and Muller, K. Efficient backprop. In Orr, G and K., M, editors, Neural Networks: Tricks of the trade. Springer, 1998. [17] Schwartz, O and Simoncelli, E. P. Natural signal statistics and sensory gain control. Nature Neuroscience, 4(8):819–825, August 2001. [18] Lyu, S and Simoncelli, E. P. Nonlinear image representation using divisive normalization. In CVPR’08. IEEE Computer Society, Jun 23-28 2008. [19] Fei-Fei, L, Fergus, R, and Perona, P. Learning generative visual models from few training examples: an incremental Bayesian approach tested on 101 object categories. In Workshop on Generative-Model Based Vision, 2004. [20] Pinto, N, Cox, D. D, and DiCarlo, J. J. Why is real-world visual object recognition hard? PLoS Comput Biol, 4(1):e27, 01 2008. [21] Lazebnik, S, Schmid, C, and Ponce, J. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. CVPR’06, 2:2169–2178, 2006. [22] Boureau, Y, Bach, F, LeCun, Y, and Ponce, J. Learning mid-level features for recognition. In CVPR’10. IEEE, 2010. [23] Dalal, N and Triggs, B. Histograms of oriented gradients for human detection. In Schmid, C, Soatto, S, and Tomasi, C, editors, CVPR’05, volume 2, pages 886–893, June 2005. [24] Walk, S, Majer, N, Schindler, K, and Schiele, B. New features and insights for pedestrian detection. In CVPR 2010, San Francisco, California. [25] Doll´ar, P, Wojek, C, Schiele, B, and Perona, P. Pedestrian detection: A benchmark. In CVPR’09. IEEE, June 2009. [26] Doll´ar, P, Tu, Z, Perona, P, and Belongie, S. Integral channel features. In BMVC 2009, London, England. [27] Doll´ar, P, Belongie, S, and Perona, P. The fastest pedestrian detector in the west. In BMVC 2010, Aberystwyth, UK. [28] Felzenszwalb, P, Girshick, R, McAllester, D, and Ramanan, D. Object detection with discriminatively trained part based models. In PAMI 2010. 9
2010
196
3,961
Multiple Kernel Learning and the SMO Algorithm S. V. N. Vishwanathan, Zhaonan Sun, Nawanol Theera-Ampornpunt Purdue University vishy@stat.purdue.edu, sunz@stat.purdue.edu, ntheeraa@cs.purdue.edu Manik Varma Microsoft Research India manik@microsoft.com Abstract Our objective is to train p-norm Multiple Kernel Learning (MKL) and, more generally, linear MKL regularised by the Bregman divergence, using the Sequential Minimal Optimization (SMO) algorithm. The SMO algorithm is simple, easy to implement and adapt, and efficiently scales to large problems. As a result, it has gained widespread acceptance and SVMs are routinely trained using SMO in diverse real world applications. Training using SMO has been a long standing goal in MKL for the very same reasons. Unfortunately, the standard MKL dual is not differentiable, and therefore can not be optimised using SMO style co-ordinate ascent. In this paper, we demonstrate that linear MKL regularised with the p-norm squared, or with certain Bregman divergences, can indeed be trained using SMO. The resulting algorithm retains both simplicity and efficiency and is significantly faster than state-of-the-art specialised p-norm MKL solvers. We show that we can train on a hundred thousand kernels in approximately seven minutes and on fifty thousand points in less than half an hour on a single core. 1 Introduction Research on Multiple Kernel Learning (MKL) needs to follow a two pronged approach. It is important to explore formulations which lead to improvements in prediction accuracy. Recent trends indicate that performance gains can be achieved by non-linear kernel combinations [7,18,21], learning over large kernel spaces [2] and by using general, or non-sparse, regularisation [6, 7, 12, 18]. Simultaneously, efficient optimisation techniques need to be developed to scale MKL out of the lab and into the real world. Such algorithms can help in investigating new application areas and different facets of the MKL problem including dealing with a very large number of kernels and data points. Optimisation using decompositional algorithms such as Sequential Minimal Optimization (SMO) [15] has been a long standing goal in MKL [3] as the algorithms are simple, easy to implement and efficiently scale to large problems. The hope is that they might do for MKL what SMO did for SVMs – allow people to play with MKL on their laptops, modify and adapt it for diverse real world applications and explore large scale settings in terms of number of kernels and data points. Unfortunately, the standard MKL formulation, which learns a linear combination of base kernels subject to l1 regularisation, leads to a dual which is not differentiable. SMO can not be applied as a result and [3] had to resort to expensive Moreau-Yosida regularisation to smooth the dual. State-ofthe-art algorithms today overcome this limitation by solving an intermediate saddle point problem rather than the dual itself [12,16]. Our focus, in this paper, is on training p-norm MKL, with p > 1, using the SMO algorithm. More generally, we prove that linear MKL regularised by certain Bregman divergences, can also be trained 1 using SMO. We shift the emphasis firmly back towards solving the dual in such cases. The lpMKL dual is shown to be differentiable and thereby amenable to co-ordinate ascent. Placing the p-norm squared regulariser in the objective lets us efficiently solve the core reduced two variable optimisation problem analytically in some cases and algorithmically in others. Using results from [4, 9], we can compute the lp-MKL Hessian, which brings into play second order variable selection methods which tremendously speed up the rate of convergence [8]. The standard decompositional method proof of convergence [14] to the global optimum holds with minor modifications. The resulting optimisation algorithm, which we call SMO-MKL, is straight forward to implement and efficient. We demonstrate that SMO-MKL can be significantly faster than the state-of-the-art specialised p-norm solvers [12]. We empirically show that the SMO-MKL algorithm is robust with the desirable property that it is not greatly affected within large operating ranges of p. This implies that our algorithm is well suited for learning both sparse, and non-sparse, kernel combinations. Furthermore, SMO-MKL scales well to large problems. We show that we can efficiently combine a hundred thousand kernels in approximately seven minutes or train on fifty thousand points in less than half an hour using a single core on standard hardware where other solvers fail to produce results. The SMO-MKL code can be downloaded from [20]. 2 Related Work Recent trends indicate that there are three promising directions of research for obtaining performance improvements using MKL. The first involves learning non-linear kernel combinations. A framework for learning general non-linear kernel combinations subject to general regularisation was presented in [18]. It was demonstrated that, for feature selection, the non-linear GMKL formulation could perform significantly better not only as compared to linear MKL but also state-of-the-art wrapper methods and filter methods with averaging. Very significant performance gains in terms of pure classification accuracy were reported in [21] by learning a different kernel combination per data point or cluster. Again, the results were better not only as compared to linear MKL but also baselines such as averaging. Similar trends were observed for regression while learning polynomial kernel combinations [7]. Other promising directions which have resulted in performance gains are sticking to standard MKL but combining an exponentially large number of kernels [2] and linear MKL with p-norm regularisers [6, 12]. Thus MKL based methods are beginning to define the state-of-the-art for very competitive applications, such as object recognition on the Caltech 101 database [21] and object detection on the PASCAL VOC 2009 challenge [19]. In terms of optimisation, initial work on MKL leveraged general purpose SDP and QCQP solvers [13]. The SMO+M.-Y. regularisation method of [3] was one of the first techniques that could efficiently tackle medium scale problems. This was superseded by the SILP technique of [17] which could, very impressively, train on a million point problem with twenty kernels using parallelism. Unfortunately, the method did not scale well with the number of kernels. In response, many two-stage wrapper techniques came up [2, 10, 12, 16, 18] which could be significantly faster when the number of training points was reasonable but the number of kernels large. SMO could indirectly be used in some of these cases to solve the inner SVM optimisation. The primary disadvantage of these techniques was that they solved the inner SVM to optimality. In fact, the solution needed to be of high enough precision so that the kernel weight gradient computation was accurate and the algorithm converged. In addition, Armijo rule based step size selection was also very expensive and could involve tens of inner SVM evaluations in a single line search. This was particularly expensive since the kernel cache would be invalidated from one SVM evaluation to the next. The one big advantage of such two-stage methods for l1-MKL was that they could quickly identify, and discard, the kernels with zero weights and thus scaled well with the number of kernels. Most recently, [12] have come up with specialised p-norm solvers which make substantial gains by not solving the inner SVM to optimality and working with a small active set to better utilise the kernel cache. 3 The lp-MKL Formulation The objective in MKL is to jointly learn kernel and SVM parameters from training data {(xi, yi)}. Given a set of base kernels {Kk} and corresponding feature maps {φk}, linear MKL aims to learn a linear combination of the base kernels as K = P k dkKk. If the kernel weights are restricted to 2 be non-negative, then the MKL task corresponds to learning a standard SVM in the feature space formed by concatenating the vectors √dkφk. The primal can therefore be formulated as min w,b,ξ≥0,d≥0 1 2 X k wt kwk+C X i ξi+ λ 2 ( X k dp k) 2 p s. t. yi( X k p dkwt kφk(xi)+b) ≥1−ξi (1) The regularisation on the kernel weights is necessary to prevent them from shooting off to infinity. Which regulariser one uses depends on the task at hand. In this Section, we limit ourselves to the p-norm squared regulariser with p > 1. If it is felt that certain kernels are noisy and should be discarded then a sparse solution can be obtained by letting p tend to unity from above. Alternatively, if the application demands dense solutions, then larger values of p should be selected. Note that the primal above can be made convex by substituting wk for √dkwk to get min w,b,ξ≥0,d≥0 1 2 X k wt kwk/dk +C X i ξi + λ 2 ( X k dp k) 2 p s. t. yi( X k wt kφk(xi)+b) ≥1−ξi (2) We first derive an intermediate saddle point optimisation problem obtained by minimising only w, b and ξ. The Lagrangian is L = 1 2 X k wt kwk/dk + X i (C −βi)ξi + λ 2 ( X k dp k) 2 p − X i αi[yi( X k wt kφk(xi)+b)−1+ξi] (3) Differentiating with respect to w, b and ξ to get the optimality conditions and substituting back results in the following intermediate saddle point problem min d≥0 max α∈A 1tα −1 2 X k dkαtHkα + λ 2 ( X k dp k) 2 p (4) where A = {α|0 ≤α ≤C1, 1tY α = 0}, Hk = Y KkY and Y is a diagonal matrix with the labels on the diagonal. Note that most MKL methods end up optimising either this, or a very similar, saddle point problem. To now eliminate d we again form the Lagrangian L = 1tα −1 2 X k dkαtHkα + λ 2 ( X k dp k) 2 p − X k γkdk (5) ∂L ∂dk = 0 ⇒λ( X k dp k) 2 p −1dp−1 k = γk + 1 2αtHkα (6) ⇒λ( X k dp k) 2 p = X k dk(γk + 1 2αtHkα) (7) ⇒L = 1tα −λ 2 ( X k dp k) 2 p = 1tα −1 2λ( X k (γk + 1 2αtHkα)q) 2 q (8) where 1 p + 1 q = 1. Since Hk is positive semi-definite, αtHkα ≥0 and since γk ≥0 it is clear that the optimal value of γk is zero. Our lp-MKL dual therefore becomes D ≡max α∈A 1tα −1 8λ( X k (αtHkα)q) 2 q (9) and the kernel weights can be recovered from the dual variables as dk = 1 2λ X k (αtHkα)q ! 1 q −1 p (αtHkα) q p (10) Note that our dual objective, unlike the objective in [3], is differentiable with respect to α. The SMO algorithm can therefore be brought to bear where two variables are selected and optimised using gradient or Newton methods and the process repeated until convergence. Also note that it has sometimes been observed that l2 regularisation can provide better results than l1 [6, 7, 12, 18]. For this special case, when p = q = 2, the reduced two variable problem can be solved analytically. This was one of the primary motivations for choosing the p-norm squared regulariser and placing it in the primal objective (the other was to be consistent with other p-norm formulations [9, 11]). Had we included the regulariser as a primal constraint then the dual would have the q-norm rather than the q-norm squared. Our dual would then be near identical to Eq. (9) in [12]. However, it would then no longer have been possible to solve the two variable reduced problem analytically for the 2-norm special case. 3 4 SMO-MKL Optimisation We now develop the SMO-MKL algorithm for optimising the lp MKL dual. The algorithm has three main components: (a) reduced variable optimisation; (b) working set selection and (c) stopping criterion and kernel caching. We build the SMO-MKL algorithm around the LibSVM code base [5]. 4.1 The Reduced Variable Optimisation The SMO algorithm works by repeatedly choosing two variables (assumed to be α1 and α2 without loss of generality in this Subsection) and optimising them while holding all other variables constant. If α1 ←α1 + ∆and α2 ←α2 + s∆, the dual simplifies to ∆∗= argmax L≤∆≤U (1 + s)∆−1 8λ( X k (ak∆2 + 2bk∆+ ck)q) 2 q (11) where s = −y1y2, L = (s == +1) ? max(−α1, −α2) : max(−α1, α2 −C), U = (s == +1) ? min(C −α1, C −α2) : min(C −α1, α2), ak = H11k + H22k + 2sH12k, bk = αt(H:1k + sH:2k) and ck = αtHkα. Unlike as in SMO, ∆∗can not be found analytically for arbitrary p. Nevertheless, since this is a simple one dimensional concave optimisation problem, we can efficiently find the global optimum using a variety of methods. We tried bisection search and Brent’s algorithm but the Newton-Raphson method worked best – partly because the one dimensional Hessian was already available from the working set selection step. 4.2 Working Set Selection The choice of which two variables to select for optimisation can have a big impact on training time. Very simple strategies, such as random sampling, can have very little cost per iteration but need many iterations to converge. First and second order working set selection techniques are more expensive per iteration but converge in far fewer iterations. We implement the greedy second order working set selection strategy of [8]. We do not give the variable selection equations due to lack of space but refer the interested reader to the WSS2 method of [8] and our source code [20]. The critical thing is that the selection of the first (second) variable involves computing the gradient (Hessian) of the dual. These are readily derived to be ∇αD = 1 − X k dkHkα = 1 −Hα (12) ∇2 αD = −H −1 λ X k ∇θkf −1(θ)(Hkα)(Hkα)t (13) where ∇θkf −1(θ) = (2 −q)θ2−2q q θ2q−2 k + (q −1)θ2−q q θq−2 k and θk = 1 2λαtHkα (14) where D has been overloaded to now refer to the dual objective. Rather than compute the gradient ∇αD repeatedly, we speed up variable selection by caching, separately for each kernel, Hkα. The cache needs to be updated every time we change α in the reduced variable optimisation. However, since only two variables are changed, Hkα can be updated by summing along just two columns of the kernel matrix. This involves only O(M) work in all, where M is the number of kernels, since the column sums can be pre-computed for each kernel. The Hessian is too expensive to cache and is recomputed on demand. 4.3 Stopping Criterion and Kernel Caching We terminate the SMO-MKL algorithm when the duality gap falls below a pre-specified threshold. Kernel caching strategies can have a big impact on performance since kernel computations can dominate everything else in some cases. While a few different kernel caching techniques have been explored for SVMs, we stick to the standard one used in LibSVM [5]. A Least Recently Used (LRU) cache is implemented as a circular queue. Each element in the queue is a pointer to a recently accessed (common) row of each of the individual kernel matrices. 4 5 Special Cases and Extensions We briefly discuss a few special cases and extensions which impact our SMO-MKL optimisation. 5.1 2-Norm MKL As we noted earlier, 2-norm MKL has sometimes been found to outperform MKL trained with l1 regularisation [6, 7, 12, 18]. For this special case, when p = q = 2, our dual and reduced variable optimisation problems simplify to polynomials of degree four D2 ≡max α∈A 1tα −1 8λ X k (αtHkα)2 (15) ∆∗= argmax L≤∆≤U (1 + s)∆−1 8λ X k (ak∆2 + 2bk∆+ ck)2 (16) Just as in standard SMO, ∆∗can now be found analytically by using the expressions for the roots of a cubic. This makes our SMO-MKL algorithm particularly efficient for p = 2 and our code defaults to the analytic solver for this special case. 5.2 The Bregman Divergence as a Regulariser The Bregman divergence generalises the squared p-norm. It is not a metric as it is not symmetric and does not obey the triangle inequality. In this Subsection, we demonstrate that our MKL formulation can also incorporate the Bregman divergence as a regulariser. Let F be any differentiable, strictly convex function and f = ∇F represent its gradient. The Bregman divergence generated by F is given by rF (d) = F(d) −F(d0) −(d −d0)tf(d0). Note that ∇rF (d) = f(d) −f(d0). Incorporating the Bregman divergence as a regulariser in our primal objective leads to the following intermediate saddle point problem and Lagrangian IB ≡min d≥0 max α∈A 1tα −1 2 X k dkαtHkα + λrF (d) (17) LB = 1tα − X k dk(γk + 1 2αtHkα) + λrF (d) (18) ∇dLB = 0 ⇒f(d) −f(d0) = g(α, γ)/λ (19) ⇒d = f −1 (f(d0) + g(α, γ)/λ) = f −1(θ(α, γ)) (20) where g is a vector with entries gk(α, γ) = γk + 1 2αtHkα and θ(α, γ) = f(d0) + g(α, γ)/λ. Substituting back in the Lagrangian and discarding terms dependent on just d0 results in the dual DR ≡ max α∈A,γ≥0 1tα + λ(F(f −1(θ)) −θtf −1(θ)) (21) In many cases the optimal value of γ will turn out to be zero and the optimisation can efficiently be carried out over α using our SMO-MKL algorithm. Generalised KL Divergence To take a concrete example, different from the p-norm squared used thus far, we investigate the use of the generalised KL divergence as a regulariser. Choosing F(d) = P k dk(log(dk) −1) leads to the generalised KL divergence between d and d0 rKL(d) = X k dk log(dk/d0 k) − X k dk + X k d0 k (22) Plugging in rKL in IB and following the steps above leads to the following dual problem max α∈A 1tα −λ X k d0 ke 1 2λ αtHkα (23) which can be optimised straight forwardly using our SMO-MKL algorithm once we plug in the gradient and hessian information. However, discussing this further would take us too far out of the scope of this paper. We therefore stay focused on lp-MKL for the remainder of this paper. 5 5.3 Regression and Other Loss Functions While we have discussed MKL based classification so far we can easily adapt our formulation to handle other convex loss functions such as regression, novelty detection, etc. We demonstrate this for the ǫ-insensitive loss function for regression. The primal, intermediate saddle point and final dual problems are given by PR ≡ min w,b,ξ±≥0,d≥0 1 2 X k wt kwk/dk + C X i (ξ+ i + ξ− i ) + λ 2 ( X k dp k) 2 p (24) such that ± ( X k wt kφk(xi) + b −yi) ≤ǫ + ξ± i (25) IR ≡min d≥0 max ≤|α|≤C1, 1tα=01t(Y α −ǫ|α|) −1 2 X k dkαtKkα + λ 2 ( X k dp k) 2 p (26) DR ≡ max 0≤|α|≤C1, 1tα=01t(Y α −ǫ|α|) −1 8λ( X k (αtKkα)q) 2 q (27) SMO has a slightly harder time optimising DR due to the |α| term which, though in itself not differentiable, can be gotten around by substituting α = α+ −α−at the cost of doubling the number of dual variables. 6 Experiments In this Section, we empirically compare the performance of our proposed SMO-MKL algorithm against the specialised lp-MKL solver of [12] which is referred to as Shogun. Code, scripts and parameter settings were helpfully provided by the authors and we ensure that our stopping criteria are compatible. All experiments are carried out on a single core of an AMD 2380 2.5 GHz processor with 32 Gb RAM. Our focus in these experiments is purely on training time and speed of optimisation as the prediction accuracy improvements of lp-MKL have already been documented [12]. We carry out two sets of experiments. The first, on small scale UCI data sets, are carried out using pre-computed kernels. This performs a direct comparison of the algorithmic components of SMOMKL and Shogun. We also carry out a few large scale experiments with kernels computed on the fly. This experiment compares the two methods in totality. In this case, kernel caching can have an effect, but not a significant one as the two methods have very similar caching strategies. For each UCI data set we generated kernels as recommended in [16]. We generated RBF kernels with ten bandwidths for each individual dimension of the feature vector as well as the full feature vector itself. Similarly, we also generated polynomial kernels of degrees 1, 2 and 3. All kernels matrices were pre-computed and normalised to have unit trace. We set C = 100 as it gives us a reasonable accuracy on the test set. Note that for some value of λ, SMO-MKL and Shogun will converge to exactly the same solution [12]. Since this value is not known a priori we arbitrarily set λ = 1. Training times on the UCI data sets are presented in Table 1. Means and standard deviations are reported for five fold cross-validation. As can be seen, SMO-MKL is significantly faster than Shogun at converging to similar solutions and obtaining similar test accuracies. In many cases, SMO-MKL is more than four times as fast and in some case more than ten or twenty times as fast. Note that our test classification accuracy on Liver is a lot lower than Shogun’s. This is due to the arbitrary choice of λ. We can vary our λ on Liver to recover the same accuracy and solution as Shogun with a further decrease in our training time. Another very positive thing is that SMO-MKL appears to be relatively stable across a large operating range of p. The code is, in most of the cases as expected, fastest when p = 2 and gets slower as one increases or decreases p. Interestingly though, the algorithm doesn’t appear to be significantly slower for other values of p. Therefore, it is hoped that SMO-MKL can be used to learn sparse kernel combinations as well as non-sparse ones. Moving on to the large scale experiments with kernels computed on the fly, we first tried combining a hundred thousand RBF kernels on the Sonar data set with 208 points and 59 dimensional features. 6 Table 1: Training times on UCI data sets with N training points, D dimensional features, M kernels and T test points. Mean and standard deviations are reported for 5-fold cross validation. (a) Australian: N=552, T=138, D=13, M=195. p Training Time (s) Test Accuracy (%) # Kernels Selected SMO-MKL Shogun SMO-MKL Shogun SMO-MKL Shogun 1.10 4.89 ± 0.31 58.52 ± 16.49 85.22 ± 2.96 85.22 ± 2.81 26.4 ± 0.8 137.2 ± 53.8 1.33 4.16 ± 0.16 33.58 ± 2.58 85.36 ± 3.79 85.07 ± 2.85 40.8 ± 1.3 62.4 ± 4.7 1.66 4.31 ± 0.19 31.89 ± 1.25 85.65 ± 3.73 85.07 ± 2.85 72.2 ± 4.8 100.2 ± 3.7 2.00 4.27 ± 0.10 27.08 ± 7.18 85.80 ± 3.74 85.22 ± 2.99 126.4 ± 4.3 134.4 ± 5.6 2.33 4.88 ± 0.18 24.92 ± 6.46 85.80 ± 3.74 85.07 ± 2.85 162.8 ± 3.6 177.8 ± 8.3 2.66 5.19 ± 0.05 26.90 ± 2.05 85.80 ± 3.68 85.22 ± 2.85 188.2 ± 4.7 188.8 ± 5.1 3.00 5.48 ± 0.21 27.06 ± 2.20 85.51 ± 3.69 85.22 ± 2.85 192.0 ± 2.6 194.4 ± 1.2 (b) Ionosphere: N=280, T=71, D=33, M=442. p Training Time (s) Test Accuracy (%) # Kernels Selected SMO-MKL Shogun SMO-MKL Shogun SMO-MKL Shogun 1.10 2.85 ± 0.16 19.82 ± 4.02 92.60 ± 1.35 92.03 ± 1.68 50.0 ± 2.7 125.2 ± 7.3 1.33 2.78 ± 1.18 8.49 ± 0.61 92.03 ± 1.42 92.60 ± 1.86 120.8 ± 6.0 217.0 ± 23.4 1.66 2.42 ± 0.28 10.49 ± 2.27 91.74 ± 2.08 91.74 ± 1.37 200.8 ± 4.4 291.4 ± 33.0 2.00 2.16 ± 0.16 13.99 ± 4.68 92.03 ± 1.68 91.17 ± 2.45 328.0 ± 6.6 364.2 ± 15.4 2.33 2.35 ± 0.25 24.90 ± 9.43 92.03 ± 1.68 91.74 ± 2.08 413.6 ± 5.6 412.2 ± 6.6 2.66 2.50 ± 0.32 33.05 ± 3.66 92.03 ± 1.68 92.03 ± 1.68 430.6 ± 4.6 436.6 ± 4.3 3.00 3.03 ± 0.99 36.23 ± 3.62 92.31 ± 1.41 91.75 ± 2.05 434.4 ± 4.8 442.0 ± 0.0 (c) Liver: N=276, T=69, D=5, M=91. p Training Time (s) Test Accuracy (%) # Kernels Selected SMO-MKL Shogun SMO-MKL Shogun SMO-MKL Shogun 1.10 0.53 ± 0.03 2.15 ± 0.12 62.90 ± 9.81 66.67 ± 9.91 9.40 ± 1.02 39.40 ± 1.50 1.33 0.54 ± 0.03 0.92 ± 0.05 66.09 ± 8.48 71.59 ± 8.92 24.40 ± 2.06 43.60 ± 2.42 1.66 0.56 ± 0.04 1.14 ± 0.23 66.96 ± 7.53 70.72 ± 9.28 44.20 ± 2.23 57.00 ± 3.29 2.00 0.54 ± 0.04 1.72 ± 0.57 66.96 ± 7.06 72.17 ± 6.94 71.00 ± 5.29 78.00 ± 2.28 2.33 0.63 ± 0.03 2.35 ± 0.36 66.38 ± 7.36 73.33 ± 6.71 82.40 ± 2.42 88.20 ± 1.72 2.66 0.65 ± 0.02 2.53 ± 0.44 65.22 ± 6.80 72.75 ± 7.96 83.20 ± 2.32 90.80 ± 0.40 3.00 0.67 ± 0.03 3.40 ± 0.55 65.22 ± 6.74 73.91 ± 7.28 85.20 ± 3.37 91.00 ± 0.00 (d) Sonar: N=166, T=42, D=59, M=793. p Training Time (s) Test Accuracy (%) # Kernels Selected SMO-MKL Shogun SMO-MKL Shogun SMO-MKL Shogun 1.10 4.95 ± 0.29 47.19 ± 3.85 85.15 ± 7.99 81.25 ± 8.71 91.2 ± 6.9 258.0 ± 24.8 1.33 4.00 ± 0.76 18.28 ± 1.63 84.65 ± 9.37 87.03 ± 6.85 247.8 ± 7.7 374.2 ± 20.9 1.66 4.48 ± 1.63 20.27 ± 8.84 88.47 ± 6.68 87.51 ± 6.28 383.0 ± 5.7 451.6 ± 12.0 2.00 3.31 ± 0.31 31.52 ± 5.07 88.94 ± 6.00 88.95 ± 6.33 661.2 ± 10.2 664.8 ± 35.2 2.33 3.54 ± 0.35 51.83 ± 17.96 88.94 ± 4.97 88.94 ± 5.41 770.8 ± 4.4 763.0 ± 7.0 2.66 3.83 ± 0.38 64.59 ± 9.19 88.94 ± 4.97 88.94 ± 4.97 782.0 ± 3.4 789.4 ± 2.8 3.00 3.96 ± 0.45 70.08 ± 9.18 88.94 ± 4.97 89.92 ± 5.13 786.0 ± 4.1 792.2 ± 1.1 Note that these kernels do not form any special hierarchy so approaches such as [2] are not applicable. Timing results on a log-log scale are given in Figure (1a). As can be seen, SMO-MKL appears to be scaling linearly with the number of kernels and we converge in less than half an hour on all hundred thousand kernels for both p = 2 and p = 1.33. If we were to run the same experiment using pre-computed kernels then we converge in approximately seven minutes (see Fig (1b)). On the other hand, Shogun took six hundred seconds to combine just ten thousand kernels computed on the fly. The trend was the same when we increased the number of training points. Figure (1c) and (1d) plot timing results on a log-log scale as the number of training points is varied on the Adult and Web data sets (please see [1] for data set details and downloads). We used 50 kernels computed on the 7 9 9.5 10 10.5 11 11.5 12 4.5 5 5.5 6 6.5 7 7.5 log(# Kernels) log(Time) (s) Sonar SMO−MKL p=1.33 SMO−MKL p=2.00 (a) Sonar 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 log(# Kernels) log(Time) (s) Sonar SMO−MKL p=1.33 SMO−MKL p=2.00 (b) Sonar Pre-computed 7 7.5 8 8.5 9 9.5 10 10.5 1 2 3 4 5 6 7 8 9 10 log(# Training Points) log(Time) (s) Adult SMO−MKL p=1.33 SMO−MKL p=2.00 Shogun p=1.33 Shogun p=2.00 (c) Adult 7.5 8 8.5 9 9.5 10 10.5 11 1 2 3 4 5 6 7 8 log(# Training Points) log(Time) (s) Web SMO−MKL p=1.33 SMO−MKL p=2.00 (d) Web Figure 1: Large scale experiments varying the number of kernels and points. See text for details. fly for these experiments. On Adult, till about six thousand points, SMO-MKL is roughly 1.5 times faster than Shogun for p = 1.33 and 5 times faster for p = 2. However, on reaching eleven thousand points, Shogun starts taking more and more time to converge and we could not get results for sixteen thousand points or more. SMO-MKL was unaffected and converged on the full data set with 32,561 points in 9245.80 seconds for p = 1.33 and 8511.12 seconds for p = 2. We tried the Web data set to see whether the SMO-MKL algorithm would scale beyond 32K points. Training on all 49,749 points and 50 kernels took 1574.73 seconds (i.e. less than half an hour) with p = 1.33 and 2023.35 seconds with p = 2. 7 Conclusions We developed the SMO-MKL algorithm for efficiently optimising the lp-MKL formulation. We placed the emphasis firmly back on optimising the MKL dual rather than the intermediate saddle point problem on which all state-of-the-art MKL solvers are based. We showed that the lp-MKL dual is differentiable and that placing the p-norm squared regulariser in the primal objective lets us analytically solve the reduced variable problem for p = 2. We could also solve the convex, onedimensional reduced variable problem when p ̸= 2 by the Newton-Raphson method. A second-order working set selection algorithm was implemented to speed up convergence. The resulting algorithm is simple, easy to implement and efficiently scales to large problems. We also showed how to generalise the algorithm to handle not just p-norms squared but also certain Bregman divergences. In terms of empirical performance, we compared the SMO-MKL algorithm to the specialised lpMKL solver of [12] referred to as Shogun. It was demonstrated that SMO-MKL was significantly faster than Shogun on both small and large scale data sets – sometimes by an order of magnitude. SMO-MKL was also found to be relatively stable for various values of p and could therefore be used to learn both sparse, and non-sparse, kernel combinations. We demonstrated that the algorithm could combine a hundred thousand kernels on Sonar in approximately seven minutes using precomputed kernels and in less than half an hour using kernels computed on the fly. This is significant as many non-linear kernel combination forms, which lead to performance improvements but are non-convex, can be recast as convex linear MKL with a much larger set of base kernels. The SMOMKL algorithm can now be used to tackle such problems as long as an appropriate regulariser can be found. We were also able to train on the entire Web data set with nearly fifty thousand points and fifty kernels computed on the fly in less than half an hour. Other solvers were not able to return results on these problems. All experiments were carried out on a single core and therefore, we believe, redefine the state-of-the-art in terms of MKL optimisation. The SMO-MKL code is available for download from [20]. Acknowledgements We are grateful to Saurabh Gupta, Marius Kloft and Soren SSonnenburg for helpful discussions, feedback and help with Shogun. References [1] http://www.csie.ntu.edu.tw/ cjlin/libsvmtools/datasets/binary.html. 8 [2] F. R. Bach. Exploring large feature spaces with hierarchical multiple kernel learning. In NIPS, pages 105–112, 2008. [3] F. R. Bach, G. R. G. Lanckriet, and M. I. Jordan. Multiple kernel learning, conic duality, and the SMO algorithm. In ICML, pages 6–13, 2004. [4] A. Ben-Tal, T. Margalit, and A. Nemirovski. The ordered subsets mirror descent optimization method with applications to tomography. SIAM Journal of Opimization, 12(1):79–108, 2001. [5] C.-C. Chang and C.-J. Lin. LIBSVM: a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/˜cjlin/libsvm. [6] C. Cortes, M. Mohri, and A. Rostamizadeh. L2 regularization for learning kernels. In UAI, 2009. [7] C. Cortes, M. Mohri, and A. Rostamizadeh. Learning non-linear combinations of kernels. In NIPS, 2009. [8] R. E. Fan, P. H. Chen, and C. J. Lin. Working set selection using second order information for training SVM. JMLR, 6:1889–1918, 2005. [9] C. Gentile. Robustness of the p-norm algorithms. ML, 53(3):265–299, 2003. [10] M. Gonen and E. Alpaydin. Localized multiple kernel learning. In ICML, 2008. [11] J. Kivinen, M. K. Warmuth, and B. Hassibi. The p-norm generaliziation of the LMS algorithm for adaptive filtering. IEEE Trans. Signal Processing, 54(5):1782–1793, 2006. [12] M. Kloft, U. Brefeld, S. Sonnenburg, P. Laskov, K.-R. Muller, and A. Zien. Efficient and accurate lp-norm Multiple Kernel Learning. In NIPS, 2009. [13] G. R. G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. I. Jordan. Learning the kernel matrix with semidefinite programming. JMLR, 5:27–72, 2004. [14] C. J. Lin, S. Lucidi, L. Palagi, A. Risi, and M. Sciandrone. Decomposition algorithm model for singly linearly-constrained problems subject to lower and upper bounds. JOTA, 141(1):107–126, 2009. [15] J. Platt. Fast training of support vector machines using sequential minimal optimization. In Advances in Kernel Methods – Support Vector Learning, pages 185–208, 1999. [16] A. Rakotomamonjy, F. Bach, Y. Grandvalet, and S. Canu. SimpleMKL. JMLR, 9:2491–2521, 2008. [17] S. Sonnenburg, G. Raetsch, C. Schaefer, and B. Schoelkopf. Large scale multiple kernel learning. JMLR, 7:1531–1565, 2006. [18] M. Varma and B. R. Babu. More generality in efficient multiple kernel learning. In ICML, 2009. [19] A. Vedaldi, V. Gulshan, M. Varma, and A. Zisserman. Multiple kernels for object detection. In ICCV, 2009. [20] S. V. N. Vishwanathan, Z. Sun, N. Theera-Ampornpunt, and M. Varma, 2010. The SMO-MKL code http://research.microsoft.com/˜manik/code/SMO-MKL/download.html. [21] J. Yang, Y. Li, Y. Tian, L. Duan, and W. Gao. Group-sensitive multiple kernel learning for object categorization. In ICCV, 2009. 9
2010
197
3,962
Segmentation as Maximum-Weight Independent Set William Brendel and Sinisa Todorovic School of Electrical Engineering and Computer Science Oregon State University Corvallis, OR 97331 brendelw@onid.orst.edu, sinisa@eecs.oregonstate.edu Abstract Given an ensemble of distinct, low-level segmentations of an image, our goal is to identify visually “meaningful” segments in the ensemble. Knowledge about any specific objects and surfaces present in the image is not available. The selection of image regions occupied by objects is formalized as the maximum-weight independent set (MWIS) problem. MWIS is the heaviest subset of mutually non-adjacent nodes of an attributed graph. We construct such a graph from all segments in the ensemble. Then, MWIS selects maximally distinctive segments that together partition the image. A new MWIS algorithm is presented. The algorithm seeks a solution directly in the discrete domain, instead of relaxing MWIS to a continuous problem, as common in previous work. It iteratively finds a candidate discrete solution of the Taylor series expansion of the original MWIS objective function around the previous solution. The algorithm is shown to converge to an optimum. Our empirical evaluation on the benchmark Berkeley segmentation dataset shows that the new algorithm eliminates the need for hand-picking optimal input parameters of the state-of-the-art segmenters, and outperforms their best, manually optimized results. 1 Introduction This paper presents: (1) a new formulation of image segmentation as the maximum-weight independent set (MWIS) problem; and (2) a new algorithm for solving MWIS. Image segmentation is a fundamental problem, and an area of active research in computer vision and machine learning. It seeks to group image pixels into visually “meaningful” segments, i.e., those segments that are occupied by objects and other surfaces occurring in the scene. The literature abounds with diverse formulations. For example, normalized-cut [1], and dominant set [2] formulate segmentation as a combinatorial optimization problem on a graph representing image pixels. “Meaningful” segments may give rise to modes of the pixels’ probability distribution [3], or minimize the Mumford-Shah energy [4]. Segmentation can also be done by: (i) integrating edge and region detection [5], (ii) learning to detect and close object boundaries [6, 7], and (iii) identifying segments which can be more easily described by their own parts than by other image parts [8, 9, 10]. From prior work, we draw the following two hypotheses. First, surfaces of real-world objects are typically made of a unique material, and thus their corresponding segments in the image are characterized by unique photometric properties, distinct from those of other regions. To capture this distinctiveness, it seems beneficial to use more expressive, mid-level image features (e.g., superpixels, regions) which will provide richer visual information for segmentation, rather than start from pixels. Second, it seems that none of a host of segmentation formulations are able to correctly delineate every object boundary present. However, an ensemble of distinct segmentations is likely to contain a subset of segments that provides accurate spatial support of object occurrences. Based on these two hypotheses, below, we present a new formulation of image segmentation. 1 Given an ensemble of segments, extracted from the image by a number of different low-level segmenters, our goal is to select those segments from the ensemble that are distinct, and together partition the image area. Suppose all segments from the ensemble are represented as nodes of a graph, where node weights capture the distinctiveness of corresponding segments, and graph edges connect nodes whose corresponding segments overlap in the image. Then, the selection of maximally distinctive and non-overlapping segments that will partition the image naturally lends itself to the maximum-weight independent set (MWIS) formulation. The MWIS problem is to find the heaviest subset of mutually non-adjacent nodes of an attributed graph. It is a well-researched combinatorial optimization problem that arises in many applications. It is known to be NP-hard, and hard to approximate [11]. Numerous heuristic approaches exist. For example, iterated tabu search [12] and branch-and-price [13] use a trial-and-error, greedy search in the space of possible solutions, with an optimistic complexity estimate of O(n3), where n is the number of nodes in the graph. The message passing [14] relaxes MWIS into a linear program (LP), and solves it using loopy belief propagation with no guarantees of convergence for general graphs; the “tightness” of this relaxation holds only for bipartite graphs [15]. The semi-definite programming formulation of MWIS [16] provides an upper bound of the sum of weights of all independent nodes in MWIS. However, this is done by reformulating MWIS as a large LP of a new graph with n2 nodes, which is unsuitable for large-scale problems as ours. Finally, the replicator dynamics [17, 18] converts the original graph into its complement, and solves MWIS as a continuous relaxation of the maximum weight clique (MWC) problem. But in some domains, including ours, important hard constraints captured by edges of the original graph may be lost in this conversion. In this paper, we present a new MWIS algorithm, which represents a fixed-point iteration, guaranteed to converge to an optimum. It goes back and forth between the discrete and continuous domains. It visits a sequence of points {y(t)}t=1,2,..., defined in the continuous domain, y(t)∈[0, 1]n. Around each of these points, the algorithm tries to maximize the objective function of MWIS in the discrete domain. Each iteration consists of two steps. First, we use the Taylor expansion to approximate the objective function around y(t). Maximization in the discrete domain of the approximation gives a candidate discrete solution, ˜x∈{0, 1}n. Second, if ˜x increases the original objective, then this candidate is taken as the current solution ˜x, and the algorithm visits that point in the next iteration, y(t+1)=˜x; else, the algorithm visits the interpolation point, y(t+1)=y(t)+η(˜x−y(t)), which can be shown to be a local maximizer of the original objective for a suitably chosen η. The algorithm always improves the objective, finally converging to a maximum. For non-convex objective functions, our method tends to pass either through or near discrete solutions, and the best discrete one x∗encountered along the path is returned. Our algorithm has relatively low complexity, O(|E|), where, in our case, |E| ≪n2 is the number of edges in the graph, and converges in only a few steps. Contributions: To the best of our knowledge, this paper presents the first formulation of image segmentation as MWIS. We derive a new MWIS algorithm that has low complexity, and prove that it converges to a maximum. Selecting segments from an ensemble so they cover the entire image and minimize a total energy has been used for supervised object segmentation [19]. They estimate “good” segments by using classifiers of a pre-selected number of object classes. In contrast, our input, and our approach are genuinely low-level, i.e., agnostic about any particular objects in the image. Our MWIS algorithm has lower complexity, and is arguably easier to implement than the dual decomposition they use for energy minimization. Our segmentation outperforms the state of the art on the benchmark Berkeley segmentation dataset, and our MWIS algorithm runs faster and yields on average more accurate solutions on benchmark datasets than other existing MWIS algorithms. Overview: Our approach consists of the following steps (see Fig.1). Step 1: The image is segmented using a number of different, off-the-shelf, low-level segmenters, including meanshift [3], Ncuts [1], and gPb-OWT-UCM [7]. Since the right scale at which objects occur in the image is unknown, each of these segmentations is conducted at an exhaustive range of scales. Step 2: The resulting segments are represented as nodes of a graph whose edges connect only those segments that (partially) overlap in the image. A small overlap between two segments, relative to their area, may be ignored, for robustness. A weight is associated with each node capturing the distinctiveness of the corresponding segment from the others. Step 3: We find the MWIS of this graph. Step 4: The segments selected in the MWIS may not be able to cover the entire image, or may slightly overlap (holes and overlaps are marked red in Fig.1). The final segmentation is obtained by using standard morphological operators on region boundaries to eliminate these holes and overlaps. Note that there is no need for Step 4 if 2 (a) (b) (c) (d) Figure 1: Our main steps: (a) Input segments extracted at multiple scales by different segmentation algorithms; (b) Constructing a graph of all segments, and finding its MWIS (marked green); (c) Segments selected by our MWIS algorithm (red areas indicate overlaps and holes); (d) Final segmentation after region-boundary refinement (actual result using Meanshift and NCuts as input). the input low-level segmentation is strictly hierarchical, as gPb-OWT-UCM [7]. The same holds if we added the intersections of all input segments to the input ensemble, as in [19], because our MWIS algorithm will continue selecting non-overlapping segments until the entire image is covered. Paper Organization: Sec. 2 formulates MWIS, and presents our MWIS algorithm and its theoretical analysis. Sec. 3 formulates image segmentation as MWIS, and describes how to construct the segmentation graph. Sec. 4 and Sec. 5 present our experimental evaluation and conclusions. 2 MWIS Formulation and Our Algorithm Consider a graph G = (V, E, ω), where V and E are the sets of nodes and undirected edges, with cardinalities |V |=n and |E|, and ω : V →R+ associates positive weights wi to every node i ∈V , i=1, . . ., n. A subset of V can be represented by an indicator vector x=(xi)∈{0, 1}n, where xi=1 means that i is in the subset, and xi=0 means that i is not in the subset. A subset x is called an independent set if no two nodes in the subset are connected by an edge, ∀(i, j)∈E : xixj=0. We are interested in finding a maximum-weight independent set (MWIS), denoted as x∗. MWIS can be naturally posed as the following integer program (IP): IP: x∗= argmaxx wTx, s.t. ∀i ∈V : xi ∈{0, 1}, and ∀(i, j)∈E: xixj = 0 (1) The non-adjacency constraint in (1) can be equivalently formalized as P (i,j)∈E xixj=0. The latter expression can be written as a quadratic constraint, xTAx=0, where A=(Aij) is the adjacency matrix, with Aij=1 if (i, j)∈E, and Aij=0 if (i, j)/∈E. Consequently, IP can be reformulated as the following integer quadratic program (IQP): x∗= argmaxx wTx, s.t. ∀i ∈V : xi ∈{0, 1}, xTAx = 0 ⇒ ∃α∈R IQP: x∗= argmaxx[wTx −1 2αxTAx] s.t. ∀i ∈V : xi ∈{0, 1} (2) where there exists a positive regularization parameter α>0 such that the problem on the implication in (2) holds. Next, we present our new algorithm for solving MWIS. 2.1 The Algorithm As reviewed in Sec. 1, to solve IQP in (2), the integer constraint is usually either ignored, or relaxed to a continuous QP, e.g., by ∀i∈V : xi≥0 and ∥x∥=1. For example, when ℓ1 norm is used as relaxation, the solution x∗of (2) can be found using the replicator dynamics in the continuous domain [17]. Also, when only ∀i∈V : xi≥0 is used as relaxation, then the IP of (1) can be solved via message passing [14]. Usually, the solution found in the continuous domain is binarized to obtain a discrete solution. This may lead to errors, especially if the relaxed QP is nonconvex [20]. In this paper, we present a new MWIS algorithm that iteratively seeks a solution directly in the discrete domain. A discrete solution is computed by maximizing the first-order Taylor series approximation 3 of the quadratic objective in (2) around a solution found in the previous iteration. This is similar to the method of [20], which, however, makes the restrictive assumptions that the matrix of the quadratic term (analog of our A) is “close” to positive-semi-definite (PSD), or that it is rank-1 with non-negative elements. These assumptions are not suitable for image segmentation. Graduated assignment [21] also iteratively maximizes a Taylor series expansion of a continuous QP around the previous solution; but this is done in the continuous domain. Since A in (2) is not PSD, our algorithm guarantees convergence only to a local maximum, as most state-of-the-art MWIS algorithms [12, 13, 14, 17, 18]. Below, we describe the main steps of our MWIS algorithm. Let f(x) = wTx −1 2αxTAx denote the objective function of IQP in (2). Also, in our notation, x, ˜x, x∗∈{0, 1}n denote a point, candidate solution, and solution, respectively, in the discrete domain; and y ∈[0, 1]n denotes a point in the continuous domain. Our algorithm is a fixed-point iteration that solves a sequence of integer programs which are convex approximations of f, around a solution found in the previous iteration. The key intuition is that the approximations are simpler functions than f, and thus facilitate computing the candidate discrete solutions in each iteration. The algorithm increases f in every iteration until convergence. Our algorithm visits a sequence of continuous points {y(1), . . . , y(t), . . . }, y(t) ∈[0, 1]n, in iterations t = 1, 2, . . . , and finds discrete candidate solutions ˜x ∈{0, 1}n in their respective neighborhoods, until convergence. Each iteration t consists of two steps. First, for any point y ∈[0, 1]n in the neighborhood of y(t), we find the first-order Taylor series approximation of f(y) as f(y) ≈h(y, y(t)) = f(y(t)) + (y −y(t)) T(w −αAy(t)) = yT(w −αAy(t)) + const, (3) where ‘const’ does not depend on y. Note that the approximation h(y, y(t)) is convex in y, and simpler than f(y), which allows us to easily compute a discrete maximizer of h(·) as ˜x = argmax x∈{0,1}n h(x, y(t)) ⇔ ˜xi =  1 , if ith element of (w −αAy(t))i ≥0 0 , otherwise. (4) To avoid the trivial discrete solution, when ˜x = 0 we instead set ˜x = [0, . . . , 0, 1, 0, . . ., 0]T, with ˜xi = 1 where i is the index of the minimum element of (w −αAy(t)). In the second step of iteration t, the algorithm verifies if ˜x can be accepted as a new, valid discrete solution. This will be possible only if f is non-decreasing, i.e., if f(˜x)≥f(y(t)). In this case, the algorithm visits point y(t+1)=˜x, in the next iteration. In case f(˜x)<f(y(t)), this means that there must be a local maximum of f in the neighborhood of points y(t) and ˜x. We estimate this local maximizer of f in the continuous domain by linear interpolation, y(t+1)=y(t)+η(˜x−y(t)). The optimal value of the interpolation parameter η∈[0, 1] is computed such that ∂f(y(t+1))/∂η ≥0, which ensures that f is non-decreasing in the next iteration. As shown in Sec. 2.2, the optimal η has a closed-form solution: η = min max (w −αAy(t)) T(˜x −y(t)) α(˜x −y(t)) TA(˜x −y(t)) , 0 ! , 1 ! . (5) Having computed y(t+1), the algorithm starts the next iteration by finding a Taylor series approximation in the neighborhood of point y(t+1). After convergence, the latest discrete solution ˜x is taken to represent the final solution of MWIS, x∗=˜x. Our MWIS algorithm is summarized in Alg. 1 2.2 Theoretical Analysis This section presents the proof that our MWIS algorithm converges to a maximum. We also show that its complexity is O(|E|). We begin by stating a lemma that pertains to linear interpolation y(t+1)=y(t)+η(˜x−y(t)) such that the IQP objective function f is non-decreasing at y(t+1). Lemma 1 Suppose that the IQP objective function f is increasing at point y1 ∈[0, 1]n, and decreasing at point y2 ∈[0, 1]n, y1 ̸= y2. Then, there exists a point, y = y1 + η(y2 −y1), and y ∈[0, 1]n, such that f is increasing at y, where η is an interpolation parameter, η ∈[0, 1]. Proof: It is straightforward to show that if η ∈[0, 1] ⇒y ∈[0, 1]n. For η = 0, we obtain y = y1, where f is said to be increasing. For η ̸= 0, y can be found by estimating η such 4 that ∂f y1+η(y2−y1)  /∂η≥0. It follows: (w−αAy1)T(y2−y1)−ηα(y2−y1)TA(y2−y1)≥0. Define auxiliary terms c = (w −αAy1)T(y2 −y1) and d = α(y2 −y1)TA(y2 −y1). Since A is not PSD, we obtain η ≤ c d, for d > 0, and η ≥ c d, for d < 0. Since η ∈[0, 1], we compute η = min(max( c d, 0), 1), which is equivalent to (5), for y1 = y(t) and y2 = ˜x. □ In the following, we define the notion of maximum, and prove that Alg. 1 converges to a maximum. Definition We refer to point y∗as a maximum of a real, differentiable function g(y), defined over domain D, g : D →R, if there exists a neighborhood of y∗, N(y∗) ⊆D, such that ∀y ∈N(y∗) : g(y∗) ≥g(y). Proposition 1 Alg. 1 increases f in every iteration, and converges to a maximum. Proof: In iteration t of Alg. 1, if f(˜x) ≥f(y(t)) then the next point visited by Alg. 1 is y(t+1) = ˜x. Thus, f increases in this case. Else, y(t+1) = y(t) + η(˜x −y(t)), yielding f(y(t+1))=f(y(t))+η(w−αAy(t)) T(˜x−y(t)) + η2 1 2α(˜x−y(t)) TA(˜x−y(t)). (6) Since ˜x maximizes h, given by (3), we have h(˜x, y(t))−h(y(t), y(t))=(w−αAy(t)) T(˜x−y(t))≥0. Also, from Lemma 1, η is non-negative. Consequently, the second term in (6) is non-negative. Regarding the third term in (6), from (5) we have ηα(˜x−y(t)) TA(˜x−y(t))=(w−αAy(t)) T(˜x−y(t)) which we have already proved to be non-negative. Thus, f also increases in this second case. Since f ≤wT1, and f increases in every iteration, then f converges to a maximum. □ Complexity: Alg. 1 has complexity O(|E|) per iteration. Complexity depends only on a few matrixvector multiplications with A, where each takes O(|E|). This is because A is sparse and binary, where each element Aij=1 iff (i, j) ∈E. Thus, any computation in Alg. 1 pertaining to particular node i∈V depends on the number of positive elements in ith row Ai·, i.e., on the branching factor of i. Computing ˜x in (4) has complexity O(n), where n < |E|, and thus does not affect the final complexity. For the special case of balanced graphs, Alg. 1 has complexity O(|E|) = O(n log n). In our experiments, Alg. 1 converges in 5-10 iterations on graphs with about 300 nodes. 3 Formulating Segmentation as MWIS We formulate image segmentation as the MWIS of a graph of image regions obtained from different segmentations. Below, we explain how to construct this graph. Given a set of all segments, V , extracted from the image by a number of distinct segmenters, we construct a graph, G = (V, E, ω), where V and E are the sets of nodes and undirected edges, and ω : V →R+ assigns positive weights wi to every node i ∈V , i=1, . . ., n. Two nodes i and j are adjacent, (i, j) ∈E, if their respective segments Si and Sj overlap in the image, Si ∩Sj ̸= ∅. This can be conceptualized by the adjacency matrix A = (Aij), where Aij = 1 iff Si ∩Sj ̸= ∅, and Aij = 0 iff Si ∩Sj = ∅. For robustness in our experiments, we tolerate a relatively small amount of overlap by setting a tolerance threshold θ, such that Aij = 1 if |Si∩Sj| min(|Si|,|Sj|) > θ, and Aij = 0 otherwise. (In our experiments we use θ = 0.2). Note that the IQP in (2) also permits a “soft” definition of A which is beyond our scope. The weights wi should be larger for more “meaningful” segments Si, so that these segments are more likely included in the MWIS of G. Following the compositionality-based approaches of [8, 9], we define that a “meaningful” segment can be easily described in terms of its own parts, but difficult to describe via other parts of the image. Note that this definition is suitable for identifying both: (i) distinct textures in the image, since texture can be defined as a spatial repetition of elementary 2D patterns; and (ii) homogeneous regions with smooth variations of brightness. To define wi, we use the formalism of [8], where the easiness and difficulty of describing Si is evaluated by its description length in terms of visual codewords. Specifically, given a dictionary of visual codewords, and the histogram of occurrence of the codewords in Si, we define wi = |Si|KL(Si, ¯Si), where KL denotes the Kullback Leibler divergence, I is the input image, and ¯Si = I\Si. All the weights w are normalized by maxi wi. Below, we explain how to extract the dictionary of codewords. Similar to [22], we describe every pixel with an 11-dimensional descriptor vector consisting of the Lab colors and filter responses of the rotationally invariant, nonlinear MR8 filter bank, along with 5 the Laplacian of Gaussian filters. The pixel descriptors are then clustered using K-means (with K = 100). All pixels grouped within one cluster are labeled with a unique codeword id of that cluster. Then, the histogram of their occurrence in every region Si is estimated. Given G, as described in this section, we use our MWIS algorithm to select “meaningful” segments, and thus partition the image. Note that the selected segments will optimally cover the entire image, otherwise any uncovered image areas will be immediately filled out by available segments in V that do not overlap with already selected ones, because this will increase the IQP objective function f. In the case when the input segments do not form a strict hierarchy and intersections of the input segments have not been added to V , we eliminate holes (or “soft” overlaps) between the selected segments by applying the standard morphological operations (e.g., thinning and dilating of regions). 4 Results This section presents qualitative and quantitative evaluation of our segmentation on 200 images from the benchmark Berkeley segmentation dataset (BSD) [23]. BSD images are challenging for segmentation, because they contain complex layouts of distinct textures (e.g., boundaries of several regions meet at one point), thin and elongated shapes, and relatively large illumination changes. We also evaluate the generality and execution time of our MWIS algorithm on a synthetic graph from benchmark OR-Library [24], and the problem sets from [12]. Our MWIS algorithm is evaluated for the following three types of input segmentations. The first type is a hierarchy of segments produced by the gPb-OWT-UCM method of [7]. gPb-OWT-UCM uses the perceptual significance of a region boundary, Pb ∈[0, 100], as an input parameter. To obtain the hierarchy, we vary Pb = 20:5:70. The second type is a hierarchy of segments produced by the multiscale algorithm of [5]. This method uses pixel-intensity contrast, σ ∈[0, 255], as an input parameter. To obtain the hierarchy, we vary σ = 30:20:120. Finally, the third type is a union of NCut [1] and Meanshift [3] segments. Ncut uses one input parameter – namely, the total number of regions, N, in the image. Meanshift uses three input parameters: feature bandwidth bf, spatial bandwidth bs, and minimum region area Smin. We vary these parameters as N = 10:10:100, bf = 5.5:0.5:8.5, bs = 4:2:10, and Smin = 100:200:900. The variants [7]+Ours and [5]+Ours serve to test whether our approach is capable of extracting “meaningful” regions from a multiscale segmentation. The variant ([3]+[1])+Ours evaluates our hypothesis that reasoning over an ensemble of distinct segmentations improves each individual one. Segmentation of BSD images is used for a comparison with replicator dynamics approach of [17], which transforms the MWIS problem into the maximum weight clique problem, and then relaxes it into a continuous problem, denoted as MWC. In addition, we also use data from other domains – specifically, OR-Library [24] and the problem sets from [12] – for a comparison with other state-ofthe-art MWIS algorithms. Qualitative evaluation: Fig. 3 and Fig. 4 show the performance of our variant [7]+Ours on example images from BSD. Fig. 4 also shows the best segmentations of [7] and [25], obtained by an exhaustive search for the optimal values of their input parameters. As can be seen in Fig. 4, the method of [7] misses to segment the grass under the tiger, and oversegments the starfish and the camel, which we correct. Our approach eliminates the need for hand-picking the optimal input parameters in [7], and yields results that are good even in cases when objects have complex textures (e.g. tiger and starfish), or when the boundaries are blurred or jagged (e.g. camel). Quantitative evaluation: Table 1 presents segmentations of BSD images using our three variants: [7]+Ours, [5]+Ours, and ([3]+[1])+Ours. We consider the standard metrics: Probabilistic Rand Index (PRI), and Variation of Information (V I) [26]. PRI between estimated and ground-truth segmentations, S and G, is defined as the sum of the number of pairs of pixels that have the same label in S and G, and those that have different labels in both segmentations, divided by the total number of pairs of pixels. V I measures the distance between S and G in terms of their average conditional entropy. PRI should be large, and V I small. For all variants of our approach, we run the MWIS algorithm 10 times, starting from different initial points, and report the average PRI and V I values. For [7], we report their best results obtained by an exhaustive search for the optimal value of their input parameter Pb. As can be seen, [7]+Ours does not hand-pick the optimal input parameters, and outperforms the best results of original [7]. Surprisingly, when working with 6 Algorithm 1: Our MWIS Algorithm Input: Graph G including w and A, convergence threshold δ, regularization parameter α = 2 Output: The MWIS of G denoted as x∗ Define IQP objective: f(x) ≜wTx −1 2αxTAx ; 1 Initialize t=0, and x∗=0, y(0)∈{0, 1}n, y(0)̸=0; 2 repeat 3 Find h(y, y(t)) as in (3); 4 Use (4) for ˜x= argmaxx∈{0,1}n h(x, y(t)) ; 5 if f(˜x) ≥f(y(t)) then 6 y(t+1) = ˜x ; 7 else 8 Use (5) for 9 η= argmax η∈[0,1] f y(t)+η(˜x−y(t))  y(t+1) = y(t) + η(˜x −y(t)) ; 10 end 11 if f(˜x) ≥f(x∗) then 12 x∗= ˜x ; 13 end 14 until y(t+1) −y(t) < δ ; 15 Method PRI V I Human 0.87 1.16 [7] 0.81 1.68 ([3]+[1])+MWC 0.78 1.75 [5]+Ours 0.79 1.69 ([3]+[1])+Ours 0.80 1.71 [7]+Ours 0.83 1.59 Table 1: A comparison on BSD. Probabilistic Rand Index (PRI) should be large, and Variation of Information (V I) small. Input segments are generated by the methods of [7, 5, 3, 1], and then selected by the maximum weight clique formulation (MWC) of [17], or by our algorithm. For [7], we report their best results obtained by an exhaustive search for the optimal value of their input parameter Pb. segments generated by Meanshift, Ncuts, and [5], the performances of [5]+Ours and ([3]+[1])+Ours come very close to those of [7]. This is unexpected, because Meanshift, Ncuts, and the method of [5] are known to produce poor performance in terms of PRI and V I values, relative to [7]. Also, note that ([3]+[1])+Ours outperforms the relaxation-based method ([3]+[1])+MWC. Fig. 2 shows the sensitivity of the convergence rate of our approach to a specific choice of α. The penalty term αyTAy of the IQP objective function is averaged over all 200 graphs, each with about 300 nodes, obtained from 200 BSD images. As can be seen, for α ≥2, the penalty term αyTAy converges to 0 with some initial oscillations. Experimentally, the convergence rate is maximum when α = 2. We use this value in all our experiments. Figure 2: Convergence rate vs. a specific choice of α, averaged over 200 BSD images: α < 2 is marked red, and α ≥2 is marked blue. Method b2500 [24] p3000-7000 [12] [12] avg 2 175 sec 74 1650 Ours avg 0 62 sec 21 427 Table 2: Average of solution difference, and computation time in seconds for problem sets from [24] and [12]. MWIS performance: We also test our Alg. 1 on two sets of problems beyond image segmentation. As input we use a graph constructed from data from the OR-Library [24], and from the problem sets presented in [12]. For the first set of problems (b2500), we only consider the largest graphs. We use ten instances, called b2500-1 to b2500-10, of size 2500 and with density 10%. For the second set of problem (p3000 to p7000), we take into account graphs of size 4000, 5000, 6000 and 7000. Five graph instances per size are used. Tab. 2 shows the average difference between the estimated and ground-truth solution, and computation time in seconds. The presented comparison with Iterative Tabu Search (ITS) [12] demonstrates that, on average, we achieve better performance, under much smaller running times. 7 Figure 3: Segmentation of BSD images. (top) Original images. (bottom) Results using our variant [7]+Ours. Failures, such as the painters’ shoulder, the bird’s lower body part, and the top left fish, occur simply because these regions are not present in the input segmentations. Figure 4: Comparison with the state-of-the-art segmentation algorithms on BSD images. (top row) Original images. (middle row) The three left results are from [7], and the rightmost result is from [25]. (bottom row) Results of [7]+Ours. By extracting “meaningful” segments from a segmentation hierarchy produced by [7] we correct the best, manually optimized results of [7]. 5 Conclusion To our knowledge, this is the first attempt to formulate image segmentation as MWIS. Our empirical findings suggest that this is a powerful framework that permits good segmentation performance regardless of a particular MWIS algorithm used. We have presented a new fixed point algorithm that efficiently solves MWIS, with complexity O(|E|), on a graph with |E| edges, and proved that the algorithm converges to a maximum. Our MWIS algorithm seeks a solution directly in the discrete domain, instead of resorting to the relaxation, as is common in the literature. We have empirically observed that our algorithm runs faster and outperforms the other competing MWIS algorithms on benchmark datasets. Also, we have shown a comparison with the state-of-the-art segmenter [7] on the benchmark Berkeley segmentation dataset. Our selection of “meaningful” regions from a segmentation hierarchy produced by [7] outperforms the manually optimized best results of [7], in terms of Probabilistic Rand Index and Variation of Information. 8 References [1] J. Shi and J. Malik, “Normalized cuts and image segmentation,” IEEE TPAMI, vol. 22, no. 8, pp. 888–905, 2000. [2] M. Pavan and M. Pelillo, “Dominant sets and pairwise clustering,” IEEE TPAMI, vol. 29, no. 1, pp. 167– 172, 2007. [3] D. Comaniciu and P. Meer, “Meanshift: a robust approach toward feature space analysis,” IEEE TPAMI, vol. 24, no. 5, pp. 603–619, 2002. [4] M. Kass, A. Witkin, and D. Terzopoulos, “Snakes: Active contour models,” IJCV, vol. V1, no. 4, pp. 321–331, 1988. [5] N. Ahuja, “A transform for multiscale image segmentation by integrated edge and region detection,” IEEE TPAMI, vol. 18, no. 12, pp. 1211–1235, 1996. [6] X. Ren, C. Fowlkes, and J. Malik, “Learning probabilistic models for contour completion in natural images,” IJCV, vol. 77, no. 1-3, pp. 47–63, 2008. [7] P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik, “From contours to regions: An empirical evaluation,” in CVPR, 2009. [8] S. Bagon, O. Boiman, and M. Irani, “What is a good image segment? A unified approach to segment extraction,” in ECCV, 2008. [9] S. Todorovic and N. Ahuja, “Texel-based texture segmentation,” in ICCV, 2009. [10] B. Russell, A. Efros, J. Sivic, B. Freeman, and A. Zisserman, “Segmenting scenes by matching image composites,” in NIPS, 2009. [11] L. Trevisan, “Inapproximability of combinatorial optimization problems,” Electronic Colloquium on Computational Complexity, Tech. Rep. TR04065, 2004. [12] G. Palubeckis, “Iterated tabu search for the unconstrained binary quadratic optimization problem,” Informatica, vol. 17, no. 2, pp. 279–296, 2006. [13] D. Warrier, W. E. Wilhelm, J. S. Warren, and I. V. Hicks, “A branch-and-price approach for the maximum weight independent set problem,” Netw., vol. 46, no. 4, pp. 198–209, 2005. [14] S. Sanghavi, D. Shah, and A. S. Willsky, “Message-passing for max-weight independent set,” in NIPS, 2007. [15] M. Groetschel, L. Lovasz, and A. Schrijver, “Polynomial algorithms for perfect graphs,” in Topics on Perfect Graphs, C. Berge and V. Chvatal, Eds. North-Holland, 1984, vol. 88, pp. 325 – 356. [16] M. Todd, “Semidefinite optimization,” Acta Numerica, vol. 10, pp. 515–560, 2001. [17] I. M. Bomze, M. Pelillo, and V. Stix, “Approximating the maximum weight clique using replicator dynamics,” IEEE Trans. Neural Net., vol. 11, no. 6, pp. 1228–1241, 2000. [18] S. Busygin, C. Ag, S. Butenko, and P. M. Pardalos, “A heuristic for the maximum independent set problem based on optimization of a quadratic over a sphere,” Journal of Combinatorial Optimization, vol. 6, pp. 287–297, 2002. [19] M. P. Kumar and D. Koller, “Efficiently selecting regions for scene understanding,” in CVPR, 2010. [20] M. Leordeanu, M. Hebert, and R. Sukthankar, “An integer projected fixed point method for graph matching and MAP inference,” in NIPS, 2009. [21] S. Gold and A. Rangarajan, “A graduated assignment algorithm for graph matching,” IEEE TPAMI, vol. 18, no. 4, pp. 377–388, 1996. [22] M. Varma and R. Garg, “Locally invariant fractal features for statistical texture classification,” in ICCV, 2007. [23] D. Martin, C. Fowlkes, D. Tal, and J. Malik, “A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics,” in ICCV, 2001. [24] J. E. Beasley, “Obtaining test problems via internet,” Journal of Global Optimization, vol. 8, no. 4, pp. 429–433, 1996. [25] M. Galun, E. Sharon, R. Basri, and A. Brandt, “Texture segmentation by multiscale aggregation of filter responses and shape elements,” in ICCV, 2003, pp. 716–723. [26] R. Unnikrishnan, C. Pantofaru, and M. Hebert, “Toward objective evaluation of image segmentation algorithms,” IEEE TPAMI, vol. 29, no. 6, pp. 929–944, 2007. 9
2010
198
3,963
Static Analysis of Binary Executables Using Structural SVMs Nikos Karampatziakis∗ Department of Computer Science Cornell University Ithaca, NY 14853 nk@cs.cornell.edu Abstract We cast the problem of identifying basic blocks of code in a binary executable as learning a mapping from a byte sequence to a segmentation of the sequence. In general, inference in segmentation models, such as semi-CRFs, can be cubic in the length of the sequence. By taking advantage of the structure of our problem, we derive a linear-time inference algorithm which makes our approach practical, given that even small programs are tens or hundreds of thousands bytes long. Furthermore, we introduce two loss functions which are appropriate for our problem and show how to use structural SVMs to optimize the learned mapping for these losses. Finally, we present experimental results that demonstrate the advantages of our method against a strong baseline. 1 Introduction In this work, we are interested in the problem of extracting the CPU instructions that comprise a binary executable file. Solving this problem is an important step towards verifying many simple properties of a given program. In particular we are motivated by a computer security application, in which we want to detect whether a previously unseen executable contains malicious code. This is a task that computer security experts have to solve many times every day because in the last few years the volume of malicious software has witnessed an exponential increase (estimated at 50000 new malicious code samples every day). However, the tools that analyze binary executables require a lot of manual effort in order to produce a correct analysis. This happens because the tools themselves are based on heuristics and make many assumptions about the way a binary executable is structured. But why is it hard to find the instructions inside a binary executable? After all, when running a program the CPU always knows which instructions it is executing. The caveat here is that we want to extract the instructions from the executable without running it. On one hand, running the executable will in general reveal little information about all possible instructions in the program, and on the other hand it may be dangerous or even misguiding.1 Another issue that makes this task challenging is that binary executables contain many other things except the instructions they will execute.2 Furthermore, the executable does not contain any demarcations about the locations of instructions in the file.3 Nevertheless, an executable file is organized into sections such as a code section, a section with constants, a section containing global variables etc. But even inside the code section, there is a lot more than just a stream of instructions. We will ∗http://www.cs.cornell.edu/∼nk 1Many malicious programs try to detect whether they are running under a controlled environment. 2Here, we are focusing on Windows executables for the Intel x86 architecture, though everything carries over to any other modern operating system and any other architecture with a complex instruction set. 3Executables that contain debugging information are an exception, but most software is released without it 1 refer to all instructions as code and to everything else as data. For example, the compiler may, for performance reasons, prefer to pad a function with up to 3 data bytes so that the next function starts at an address that is a multiple of 4. Moreover, data can appear inside functions too. For example, a “switch” statement in C is usually implemented in assembly using a table of addresses, one for each “case” statement. This table does not contain any instructions, yet it can be stored together with the instructions that make up the function in which the “switch” statement appears. Apart from the compiler, the author of a malicious program can also insert data bytes in the code section of her program. The ultimate goal of this act is to confuse the heuristic tools via creative uses of data bytes. 1.1 A text analogy To convey more intuition about the difficulties in our task we will use a text analogy. The following is an excerpt from a message sent to General Burgoyne during the American revolutionary war [1]: You will have heard, Dr Sir I doubt not long before this can have reached you that Sir W. Howe is gone from hence. The Rebels imagine that he is gone to the Eastward. By this time however he has filled Chesapeak bay with surprize and terror. Washington marched the greater part of the Rebels to Philadelphia in order to oppose Sir Wm’s. army. The sender also sent a mask via a different route that, when placed on top of the message, revealed only the words that are shown here in bold. Our task can be thought as learning what needs to be masked so that the hidden message is revealed. In this sense, words play the role of instructions and letters play the role of bytes. For complex instruction sets like the Intel x86, instructions are composed of a variable number of bytes, as words are composed of a variable number of letters. There are also some minor differences. For example, programs have control logic (i.e. execution can jump from one point to another), while text is read sequentially. Moreover, programs do not have spaces while most written languages do (exceptions are Chinese, Japanese, and Thai). This analogy motivates tackling our problem as predicting a segmentation of the input sequence into blocks of code and blocks of data. An obvious first approach for this task would be to treat it as a sequence labeling problem and train, for example, a linear chain conditional random field (CRF) [2] to tag each byte in the sequence as being the beginning, inside, or outside of a data block. However this approach ignores much of the problem’s structure, most importantly that transitions from code to data can only occur at specific points. Instead, we will use a more flexible model which, in addition to sequence labeling features, can express features of whole code blocks. Inference in our model is as fast as for sequence labeling and we show a connection to weighted interval scheduling. This strikes a balance between efficient but simple sequence labeling models such as linear chain CRFs, and expressive but slow4 segmentation models such as semi-CRFs [3] and semi-Markov SVMs [4]. To learn the parameters of the model, we will use structural SVMs to optimize performance according to loss functions that are appropriate for our task, such as the sum of incorrect plus missed CPU instructions induced by the segmentation. Before explaining our model in detail, we present some background on the workings of widely used tools for binary code analysis in section 2, which allows us to easily explain our approach in section 3. We empirically demonstrate the effectiveness of our model in section 4 and discuss related work and other applications in section 5. Finally, section 6 discusses future work and states our conclusions. 2 Heuristic tools for analyzing binary executables Tools for statically analyzing binary executables differ in the details of their workings but they all share the same high level logic, which is called recursive disassembly.5 The tool starts by obtaining the address of the first instruction from a specific location inside the executable. It then places this address on a stack and executes the following steps while the stack is non-empty. It takes the next 4More specifically, inference needs O(nL2) time where L is an a priori bound on the lengths of the segments (L = 2800 in our data) and n is the length of the sequence. With additional assumptions on the features, [5] gives an O(nM) algorithm where M is the maximum span of any edge in the CRF. 5Two example tools are IdaPro (http://www.hex-rays.com/idapro) and OllyDbg (http://www.ollydbg.de) 2 address from the stack and disassembles (i.e. decompiles to assembly) the sequence starting from that address. All the disassembled instructions would execute one after the other until we reach an instruction that changes the flow of execution. These control flow instructions, are conditional and unconditional jumps, calls, and returns. After the execution of an unconditional jump the next instruction to be executed is at the address specified by the jump’s argument. Other control flow instructions are similar to the unconditional jump. A conditional jump also specifies a condition and does nothing if the condition is false. A call saves the address of the next instruction and then jumps. A return jumps to the address saved by a call (and does not need an address as an argument). The tool places the arguments of control flow instructions it encounters on the stack. If the control flow instruction is a conditional jump or a call, it continues disassembling, otherwise it takes the next address, that has not yet been disassembled, from the stack and repeats. Even though recursive disassembly seems like a robust way of extracting the instructions from a program, there are many reasons that can make it fail [6]. Most importantly, the arguments of the control flow instructions do not have to be constants, they can be registers whose values are generally not available during static analysis. Hence, recursive disassembly can ran out of addresses much before all the instructions have been extracted. After this point, the tool has to resort to heuristics to populate its stack. For example, a heuristic might check for positions in the sequence that match a hand-crafted regular expression. Furthermore, some heuristics have to be applied on multiple passes over the sequence. According to its documentation, OllyDbg does 12 passes over the sequence. Recursive disassembly can also fail because of its assumptions. Recall that after encountering a call instruction, it continues disassembling the next instruction, assuming that the call will eventually return to execute it. Similarly for a conditional jump it assumes that both branches can potentially execute. Though these assumptions are reasonable for most programs, malicious programs can exploit them to confuse the static analysis tools. For example, the author of a malicious program can write a function that, say, adds 3 to the return address that was saved by the call instruction. This means that if the call instruction was spanning positions a, . . . , a + ℓ−1 of the sequence, upon the function’s return the next instruction will be at position a + ℓ+ 3, not at a + ℓ. This will give a completely different decoding of the sequence and is called disassembly desynchronization. To return to a text analogy, recursive disassembly parses the sequence “driverballetterrace” as [driver, ballet, terrace] while the actual parsing, obtained by starting three positions down, is [xxx, verbal, letter, race], where x denotes junk data. 3 A structured prediction model In this section we will combine ideas from recursive disassembly and structured prediction to derive an expressive and efficient model for predicting the instructions inside a binary executable. As in recursive disassembly, if we are certain that code begins at position i we can unambiguously disassemble the byte sequence starting from position i until we reach a control flow instruction. But unlike recursive disassembly, we maintain a trellis graph, a directed graph that succinctly represents all possibilities. The trellis graph has vertices bi that denote the possibility that a code block starts at position i. It also has vertices ej and edges (bi, ej) which denote that disassembling from position i yields a possible code block that spans positions i, . . . , j. Furthermore, vertices di denote the possibility that the i-th position is part of a data block. Edges (ej, bj+1) and (ej, dj+1) encode that the next byte after a code block can either be the beginning of another code block, or a data byte respectively. For data blocks no particular structure is assumed and we just use edges (dj, dj+1) and (dj, bj+1) to denote that a data byte can be followed either by another data byte or by the beginning of a code block respectively. Finally, we include vertices s and t and edges (s, b1), (s, d1), (dn, t) and (en, t) to encode that sequences can start and end either with code or data. An example is shown in Figure 1. The graph encodes all possible valid6 segmentations of the sequence. In fact, there is a simple bijection P from any valid segmentation y to an s −t path P(y) in this graph. For example, the sequence in Figure 1 contains three code blocks that span positions 1–7, 8–8, and 10–12. This segmentation can be encoded by the path s, b1, e7, b8, e8, d9, b10, e12, t. 6Some subsequences will produce errors while decoding to assembly because some bytes may not correspond to any instructions. These could never be valid code blocks because they would crash the program. Also the program cannot do something interesting and crash in the same code block; interesting things can only happen with system calls which, being call instructions, have to be at the end of their code block 3 d1 d2 83 c7 04 3b fe 72 11 c3 90 40 75 10 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 e7 e8 e12 s t add edi 4 cmp edi esi jb 0x401018 ret inc eax jnz 0x40101c inc eax jnz 0x40101c inc eax jnz 0x40101c mov [ebx+edi] 0xc31172fe nop nop adc ebx eax Figure 1: The top line shows an example byte sequence in hexadecimal. Below this, we show the actual x86 instructions with position 9 being a data byte. We show both the mnemonic instructions as well as the bytes they are composed of. Some alternative decodings of the sequence are shown on the bottom. The decoding that starts from the second position is able to skip over two control flow instructions. In the middle we show the graph that captures all possible decodings of the sequence. Disassembling from positions 3, 5, and 12 leads to decoding errors. As usual for predicting structured outputs [2] [7], we define the score of a segmentation y for a sequence x to be the inner product w⊤Ψ(x, y) where w ∈Rd are the parameters of our model and Ψ(x, y) ∈Rd is a vector of features that captures the compatibility of the segmentation y and the sequence x. Given a sequence x and a vector of parameters w, the inference task is to find the highest scoring segmentation ˆy = argmax y∈Y w⊤Ψ(x, y) (1) where Y is the space of all valid segmentations of x. We will assume that Ψ(x, y) decomposes as Ψ(x, y) := X (u,v)∈P (y) Φ(u, v, x) where Φ(u, v, x) is a vector of features that can be computed using only the endpoints of edge (u, v) and the byte sequence. This assumption allows efficient inference because (1) can be rewritten as ˆy = argmax y∈Y X (u,v)∈P (y) w⊤Φ(u, v, x) which we recognize as computing the heaviest path in the trellis graph with edge weights given by w⊤Φ(u, v, x). This problem can be solved efficiently with dynamic programming by visiting each vertex in topological order and updating the longest path to each of its neighbors. The inference task can be viewed as a version of the weighted interval scheduling problem. Disassembling from position i in the sequence yields an interval [i, j] where j is the position where the first encountered control flow instruction ends. In weighted interval scheduling we want to select a subset of non-overlapping intervals with maximum total weight. Our inference problem is the same except we also have a cost for switching to the next interval, say the one that starts at position j + 2, which is captured by the cost of the path ej, dj+1, bj+2. Finally, the dynamic programming algorithm for solving this version is a simple modification of the classic weighted interval scheduling algorithm. Section 5 discusses other setups where this inference problem arises. 3.1 Loss functions Now we introduce loss functions that measure how close an inferred segmentation ˆy is to the real one y. First, we argue that Hamming loss, how well the bytes of the blocks in ˆy overlap with with the bytes of the blocks in y, is not appropriate for this task because, as we recall from the text 4 analogy at the end of section 2, two blocks may be overlapping very well but they may lead to completely different decodings of the sequence. Hence, we introduce two loss functions which are more appropriate for our task. The first loss function, which we call block loss, comes from the observation that the beginnings of the code blocks are necessary and sufficient to describe the segmentation. Therefore, we let y and ˆy be the sets of positions where the code blocks start in the two segmentations and the block loss counts how well these two sets overlap using the cardinality of their symmetric difference ∆B(y, ˆy) = |y| + |ˆy| −2|y ∩ˆy| The second loss function, which we call instruction loss, is a little less stringent. In the case where the inferred ˆy identifies, say, the second instruction in a block as its start, we would like to penalize this less, since the disassembly is still synchronized, and only missed one instruction. Formally, we let y and ˆy be the sets of positions where the instructions start in the two segmentations and we define the instruction loss ∆I(y, ˆy) to be the cardinality of their symmetric difference. As an example, consider the segmentation which corresponds to path s, d1, b2, e12, t in Figure 1. Therefore ˆy = {2} and from the figure we see that the segmentation in the top line has to pass through b1, b8, b10 i.e. y = {1, 8, 10}. Hence its block loss is 4 because it misses b1, b8, b10 and it introduces b2. For the instruction loss, the positions of the real instructions are y = {1, 4, 6, 8, 10, 11} while the proposed segmentation has ˆy = {2, 9, 10, 11}. Taking the symmetric difference of these sets, we see that the instruction loss has value 6. Finally a variation of these loss functions occurs when we aggregate the losses over a set of sequences. If we simply sum the losses for each sequence then the losses in longer executables may overshadow the losses on shorter ones. To represent each executable equally in the final measure we can normalize our loss functions, for example we can define the normalized instruction loss to be ∆NI(y, ˆy) = |y| + |ˆy| −2|y ∩ˆy| |y| and we similarly define a normalized block loss ∆NB. If |ˆy| = |y|, ∆NI and ∆NB are scaled versions of a popular loss function 1 −F1, where F1 is the harmonic mean of precision and recall. 3.2 Training Given a set of training pairs (xi, yi) i = 1, . . . , n of sequences and segmentations we can learn a vector of parameters w, that assigns a high score to segmentation yi and a low score to all other possible segmentations of xi. For this we will use the structural SVM formulation with margin rescaling [7] that solves the following problem: min w,ξi 1 2||w||2 + C n n X i=1 ξi s.t. ∀i ∀¯y ∈Yi : w⊤Ψ(xi, yi) −w⊤Ψ(xi, ¯y) ≥∆(yi, ¯y) −ξi The constraints of this optimization problem enforce that the difference in score between the correct segmentation y and any incorrect segmentation ¯y is at least as large as the loss ∆(yi, ¯y). If ˆyi is the inferred segmentation then the slack variable ξi upper bounds ∆(yi, ˆyi). Hence, the objective is a tradeoff between a small upper bound of the average training loss and a low-complexity hypothesis w. The tradeoff is controlled by C which is set using cross-validation. Since the sets of valid segmentations Yi are exponentially large, we solve the optimization problem with a cutting plane algorithm [7]. We start with an empty set of constraints and in each iteration we find the most violated constraint for each example. We add these constraints in our optimization problem and re-optimize. We do this until there are no constraints which are violated by more than a prespecified tolerance ϵ. This procedure will terminate after O( 1 ϵ ) iterations [8]. For a training pair (xi, yi) the most violated constraint is: ˆy = argmax ¯y∈Yi w⊤Ψ(xi, ¯y) + ∆(yi, ¯y) (2) Apart from the addition of ∆(yi, ¯y), this is the same as the inference problem. For the losses we introduced, we can solve the above problem with the same inference algorithm in a slightly modified 5 Bytes Blocks Block length (bytes) Block length (instructions) Maximum 49152 3502 2794 1009 Average 16712 887 13 4 Table 1: Some statistics about the executable sections of the programs in the dataset trellis graph. More precisely, for every vertex v we can define a cost c(v) for visiting it (this can be absorbed into the costs of v’s incoming edges) and find the longest path in this modified graph. This is possible because our losses decompose over the vertices of the graph. This is not true for losses such 1 −F1 for which (2) seems to require time quadratic in the length of the sequence. For the block loss, the costs are defined as follows. If bi ∈y then c(di) = 1. This encodes that using di instead of bi misses the beginning of one block. If bi /∈y then bi defines an incorrect code block which spans bytes i, . . . , j and c(bi) = 1 + |{k|bk ∈y ∧i < k ≤j}|, capturing that we will introduce one incorrect block and we will skip all the blocks that begin between positions i and j. All other vertices in the graph have zero cost. In Figure 1 vertices d1, d8 and d10 have a cost of 1, while b2, b4, b6, b7, b9, and b11 have costs 3, 1, 1, 3, 2, and 1 respectively. For the instruction loss, y is a set of instruction positions. Similarly to the block loss if i ∈y then c(di) = 1. If i /∈y then bi is the beginning of an incorrect block that spans bytes i, . . . , j and produces instructions in a set of positions ˜yi. Let s be the first position in this block that gets synchronized with the correct decoding i.e. s = min(˜yi ∩y) with s = j if the intersection is empty. Then c(bi) = |{k|k ∈˜yi ∧i ≤k < s}| + |{k|k ∈y ∧i < k < s}|. The first term captures the number of incorrect instructions produced by treating bi as the start of a code block, while the second term captures the number of missed real instructions. All other vertices in the graph have zero cost. In Figure 1 vertices d1, d4, d6, d8, d10 and d11 have a cost of 1, while b2, b7, and b9 have costs 5, 3, and 1 respectively. For the normalized losses, we simply divide the costs by |y|. 4 Experiments To evaluate our model we tried two different ways of collecting data, since we could not find a publicly available set of programs together with their segmentations. First, we tried using debugging information, i.e. compile a program with and without debugging information and use the debug annotations to identify the code blocks. This approach could not discover all code blocks, especially when the compiler was automatically inserting code that did not exist in the source, such as the calls to destructors generated by C++ compilers. Therefore we resorted to treating the output of OllyDbg, a heuristic tool, as the ground truth. Since the executables we used were 200 common programs from a typical installation of Windows XP, we believe that the outputs of heuristic tools should have little noise. For a handful of programs we manually verified that another heuristic tool, IdaPro, mostly agreed with OllyDbg. Of course, our model is a general statistical model and given an expressive feature map, it can learn any ground truth. In this view the experiments suggest the relative performance of the compared models. The dataset, and an implementation of our model, is available at http://www.cs.cornell.edu/∼nk/svmwis. Table 1 shows some statistics of the dataset. We use two kinds of features, byte-level and instruction-level features. For each edge in the graph, the byte-level features are extracted from an 11 byte window around the source of the edge (so if the source vertex is at position i, the window spans positions i −5, . . . , i + 5). The features are which bytes and byte pairs appear in which position inside the window. An example feature is “does byte c3 appear in position i −1?”. In x86 architectures, when the previous instruction is a return instruction this feature fires. Of course, it also fires in other cases and that is why we need instruction-level features. These are obtained from histograms of instructions that occur in candidate code blocks (i.e. edges of the form (bi, ej)). We use two kinds of histograms, one where we abstract the values of the arguments of the instructions but keep their type (register, memory location or constant), and one where we completely discard all information about the arguments. An example of the former type of feature would be “number of times the instruction [add register, register] appears in this block”. An example of the latter type of feature would be “number of times the instruction [mov] appears in this block”. In total, we have 2.3 million features. Finally, we normalize the features by dividing them by the length of the sequence. 6 ∆H ¯L · ∆NH ∆I ¯I · ∆NI ∆B ¯B · ∆NB Greedy 1623.6 1916.6 2164.3 7045.2 1564.9 4747.2 SVMhmm 236.2 201.3 — — 45.1 46.9 SVMwis ∆I 98.8 115.6 44.6 98.0 26.1 41.1 SVMwis ∆NI 104.3 103.7 45.5 79.7 30.5 35.5 SVMwis ∆B 86.5 98.2 39.6 80.2 21.5 32.1 SVMwis ∆NB 85.2 87.2 40.6 75.4 23.4 29.8 Table 2: Empirical results. ∆H is Hamming loss. Normalized losses (∆NX) are multiplied with the average number of bytes (¯L), instructions (¯I), or blocks ( ¯B) to bring all numbers to a similar scale. We compare our model SVMwis (standing for weighted interval scheduling, to underscore that it is not a general segmentation model), trained to minimize the losses we introduced, with a very strong baseline, a discriminatively trained HMM (using SVMhmm). This model uses only the bytelevel features since it cannot express the instruction-level features. It tags each byte as being the beginning, inside or outside of a code block using Viterbi and optimizes Hamming loss. Running a general segmentation model [4] was impractical since inference depends quadratically on the maximum length of the code blocks, which was 2800 in our data. Finally, it would be interesting to compare with [5], but we could not find their inference algorithm available as a ready to use software. For all experiments we use five fold cross-validation where three folds are used for training one fold for validation (selecting C) and one fold for testing. Table 2 shows the results of our comparison for different loss functions (columns): Hamming loss, instruction loss, block loss, and their normalized counterparts. Results for normalized losses have been multiplied with the average number of bytes (¯L), instructions (¯I), or blocks ( ¯B) to bring all numbers to a similar scale. To highlight the stregth of our main baseline, SVMhmm, we have included a very simple baseline which we call greedy. Greedy starts decoding from the begining of the sequence and after decoding a block (bi, ej) it repeats at position j + 1. It only marks a byte as data if the decoding fails, in which case it starts decoding from the next byte in the sequence. The results suggest that just treating our task as a simple sequence labeling problem at the level of bytes already goes a long way in terms of Hamming loss and block loss. SVMhmm sometimes predicts as the beginning of a code block a position that leads to a decoding error. Since it is not clear how to compute the instruction loss in this case, we do not report instruction losses for this model. The last four rows of the table show the results for our model, trained to minimize the loss indicated on each line. We observe a further reduction in loss for all of our models. To assess this reduction, we used paired Wilcoxon signed rank tests between the losses of SVMhmm’s predictions and the losses of our model’s predictions (200 pairs). For all four models the tests suggest a statistically significant improvement over SVMhmm at the 1% level. For the block loss and its normalized version ∆NB, we see that the best performance is obtained for the model trained to minimize the respective loss. However this is not true for the other loss functions. For the Hamming loss, this is expected since the SVMwis models are more expressive and a small block loss or instruction loss implies a small Hamming loss, but not vice versa. For the instruction loss, we believe this occurs because of two reasons. First our data consists of benign programs and for them learning to identify the code blocks may be enough. Second it may be harder to learn with the instruction loss since its value depends on how quickly each decoding synchronizes with another (the correct) decoding of the stream, something that is not modeled in the feature map we are using. The end result is that the models trained for block loss also attain the smallest losses for all other loss functions. 5 Related work and other applications There are two lines of research which are relevant to this work: one is structured prediction approaches for segmenting sequences and the other is research on static analysis techniques for finding code and data blocks in executables. Segmentation of sequences can be done via sequence labeling e.g. [9]. If features of whole segments are needed then more expressive models such as semi-CRFs [3] or semi-Markov SVMs [4] can be used. The latter work introduced training of segmentation models for specific losses. However, if the segments are allowed to be long enough, these models have polynomial but impractical inference complexity. With additional assumptions on the features 7 [5] gives an efficient, though somewhat complicated, inference algorithm. In our model inference takes linear time, is simple to implement, and does not depend on the length of the segments. Previous techniques for identifying code blocks in executables have used no or very little statistical learning. For example, [10] and [11] use recursive disassembly and pattern heuristics similarly to currently used tools such as OllyDbg and IdaPro. These heuristics make many assumptions about the data which are lucidly explained in [6]. In this work, the authors use simple statistical models based on unigram and bigram instruction models in addition to the pattern heuristics. However, these approaches make independent decisions for every candidate code block and they have a less principled way of dealing with equally plausible but overlapping code blocks. Our work is most similar to [12] which uses a CRF to locate the entry points of functions. They use features that induce pairwise interactions between all possible positions in the executable which makes their formulation intractable. They perform approximate inference with a custom iterative algorithm but this is still slow. Our model can capture all the types of features that were used in that model except one. This feature encodes whether an address that is called by a function is not marked as a function and including this in our structure would make exact inference NP-hard. One way to approximate this feature would be to count how many candidate code blocks have instructions that jump to or call the current position in the sequence. For their task, compiling with debugging information was enough to get real labels and they showed that, according to these labels, heuristic tools are outperformed by their learning approach. Finally, we conclude this section with a discussion on the broader impact of this work. Our model is a general structured learning model and can be used in many sequence labeling problems. First, it can encode all features of a linear chain CRF and can simulate it by specifying a structure where each block is required to end at the same position where it starts. Furthermore, it can be used for any application where each position can yield at most one or a small number of arbitrarily long possible intervals and still have linear time inference, while inference in segmentation models depends on the length of the segments. Applications of this form can arise in any kind of scheduling problem where we want to learn a scheduler from example schedules. For example, a news website may decide to show an ad in their front page together with their news stories. Each advertiser submits an ad along with the times on which they want the ad to be shown. The news website can train a model like the one we proposed based on past schedules and the observed total profit for each of those days. The profit may not be directly observable for each individual ad depending on who serves the ads. When one or more ads change in the future, the model can still create a good schedule because its decisions depend on the features of the ads (such as the words in each ad), the time selected for displaying the ad as well as the surrounding ads. 6 Conclusions In this work we proposed a code segmentation model SVMwis that can help security experts in the static analysis of binary executables. We showed that inference in this model is as fast as for sequence labeling, even though our model can have features that can be computed from entire blocks of code. Moreover, our model is trained for the loss functions that are appropriate for the task. We also compared our model with a very strong baseline, a sequence labeling approach using a discriminatively trained HMM, and showed that we consistently outperform it. In the future we would like to use data annotated with real segmentations which might be possible to extract via a closer look at the compilation and linking process. We also want to look into richer features such as some approximation of call consistency (since the actual constraints give rise to NPhard inference), so that addresses which are targets of call or jump instructions from a code block do not lie inside data blocks. Finally, we plan to extend our model to allow for joint segmentation and classification of the executable as malicious or not. Acknowledgments I would like to thank Adam Siepel for bringing segmentation models to my attention and Thorsten Joachims, Dexter Kozen, Ainur Yessenalina, Chun-Nam Yu, and Yisong Yue for helpful discussions. 8 References [1] F. B. Wrixon Codes, Ciphers, Secrets and Cryptic Communication. page 490, Black Dog & Leventhal Publishers, 2005. [2] John D. Lafferty, Andrew McCallum, and Fernando C. N. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML ’01: Proceedings of the Eighteenth International Conference on Machine Learning, pages 282–289, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. [3] S. Sarawagi and W.W. Cohen. Semi-markov conditional random fields for information extraction. Advances in Neural Information Processing Systems, 17:1185–1192, 2005. [4] Q. Shi, Y. Altun, A. Smola, and SVN Vishwanathan. Semi-Markov Models for Sequence Segmentation. In Proceedings of the 2007 EMNLP-CoNLL. [5] S. Sarawagi. Efficient inference on sequence segmentation models. In Proceedings of the 23rd international conference on Machine learning, page 800. ACM, 2006. [6] C. Kruegel, W. Robertson, F. Valeur, and G. Vigna. Static disassembly of obfuscated binaries. In Proceedings of the 13th conference on USENIX Security Symposium-Volume 13, page 18. USENIX Association, 2004. [7] I. Tsochantaridis, T. Joachims, T. Hofmann, and Y. Altun. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6(2):1453, 2006. [8] T. Joachims, T. Finley, and C-N. Yu. Cutting-Plane Training of Structural SVMs. Machine Learning, 77(1):27, 2009. [9] F. Sha and F. Pereira. Shallow parsing with conditional random fields. In Proceedings of HLT-NAACL, pages 213–220, 2003. [10] H. Theiling. Extracting safe and precise control flow from binaries. In Seventh International Conference on Real-Time Computing Systems and Applications, pages 23–30, 2000. [11] C. Cifuentes and M. Van Emmerik. UQBT: Adaptable binary translation at low cost. Computer, 33(3):60–66, 2000. [12] N. Rosenblum, X. Zhu, B. Miller, and K. Hunt. Learning to analyze binary computer code. In Conference on Artificial Intelligence (AAAI 2008), Chicago, Illinois, 2008. 9
2010
199
3,964
A Dirty Model for Multi-task Learning Ali Jalali University of Texas at Austin alij@mail.utexas.edu Pradeep Ravikumar University of Texas at Asutin pradeepr@cs.utexas.edu Sujay Sanghavi University of Texas at Austin sanghavi@mail.utexas.edu Chao Ruan University of Texas at Austin ruan@cs.utexas.edu Abstract We consider multi-task learning in the setting of multiple linear regression, and where some relevant features could be shared across the tasks. Recent research has studied the use of ℓ1/ℓq norm block-regularizations with q > 1 for such blocksparse structured problems, establishing strong guarantees on recovery even under high-dimensional scaling where the number of features scale with the number of observations. However, these papers also caution that the performance of such block-regularized methods are very dependent on the extent to which the features are shared across tasks. Indeed they show [8] that if the extent of overlap is less than a threshold, or even if parameter values in the shared features are highly uneven, then block ℓ1/ℓq regularization could actually perform worse than simple separate elementwise ℓ1 regularization. Since these caveats depend on the unknown true parameters, we might not know when and which method to apply. Even otherwise, we are far away from a realistic multi-task setting: not only do the set of relevant features have to be exactly the same across tasks, but their values have to as well. Here, we ask the question: can we leverage parameter overlap when it exists, but not pay a penalty when it does not ? Indeed, this falls under a more general question of whether we can model such dirty data which may not fall into a single neat structural bracket (all block-sparse, or all low-rank and so on). With the explosion of such dirty high-dimensional data in modern settings, it is vital to develop tools – dirty models – to perform biased statistical estimation tailored to such data. Here, we take a first step, focusing on developing a dirty model for the multiple regression problem. Our method uses a very simple idea: we estimate a superposition of two sets of parameters and regularize them differently. We show both theoretically and empirically, our method strictly and noticeably outperforms both ℓ1 or ℓ1/ℓq methods, under high-dimensional scaling and over the entire range of possible overlaps (except at boundary cases, where we match the best method). 1 Introduction: Motivation and Setup High-dimensional scaling. In fields across science and engineering, we are increasingly faced with problems where the number of variables or features p is larger than the number of observations n. Under such high-dimensional scaling, for any hope of statistically consistent estimation, it becomes vital to leverage any potential structure in the problem such as sparsity (e.g. in compressed sensing [3] and LASSO [14]), low-rank structure [13, 9], or sparse graphical model structure [12]. It is in such high-dimensional contexts in particular that multi-task learning [4] could be most useful. Here, 1 multiple tasks share some common structure such as sparsity, and estimating these tasks jointly by leveraging this common structure could be more statistically efficient. Block-sparse Multiple Regression. A common multiple task learning setting, and which is the focus of this paper, is that of multiple regression, where we have r > 1 response variables, and a common set of p features or covariates. The r tasks could share certain aspects of their underlying distributions, such as common variance, but the setting we focus on in this paper is where the response variables have simultaneously sparse structure: the index set of relevant features for each task is sparse; and there is a large overlap of these relevant features across the different regression problems. Such “simultaneous sparsity” arises in a variety of contexts [15]; indeed, most applications of sparse signal recovery in contexts ranging from graphical model learning, kernel learning, and function estimation have natural extensions to the simultaneous-sparse setting [12, 2, 11]. It is useful to represent the multiple regression parameters via a matrix, where each column corresponds to a task, and each row to a feature. Having simultaneous sparse structure then corresponds to the matrix being largely “block-sparse” – where each row is either all zero or mostly non-zero, and the number of non-zero rows is small. A lot of recent research in this setting has focused on ℓ1/ℓq norm regularizations, for q > 1, that encourage the parameter matrix to have such blocksparse structure. Particular examples include results using the ℓ1/ℓ∞norm [16, 5, 8], and the ℓ1/ℓ2 norm [7, 10]. Dirty Models. Block-regularization is “heavy-handed” in two ways. By strictly encouraging sharedsparsity, it assumes that all relevant features are shared, and hence suffers under settings, arguably more realistic, where each task depends on features specific to itself in addition to the ones that are common. The second concern with such block-sparse regularizers is that the ℓ1/ℓq norms can be shown to encourage the entries in the non-sparse rows taking nearly identical values. Thus we are far away from the original goal of multitask learning: not only do the set of relevant features have to be exactly the same, but their values have to as well. Indeed recent research into such regularized methods [8, 10] caution against the use of block-regularization in regimes where the supports and values of the parameters for each task can vary widely. Since the true parameter values are unknown, that would be a worrisome caveat. We thus ask the question: can we learn multiple regression models by leveraging whatever overlap of features there exist, and without requiring the parameter values to be near identical? Indeed this is an instance of a more general question on whether we can estimate statistical models where the data may not fall cleanly into any one structural bracket (sparse, block-sparse and so on). With the explosion of dirty high-dimensional data in modern settings, it is vital to investigate estimation of corresponding dirty models, which might require new approaches to biased high-dimensional estimation. In this paper we take a first step, focusing on such dirty models for a specific problem: simultaneously sparse multiple regression. Our approach uses a simple idea: while any one structure might not capture the data, a superposition of structural classes might. Our method thus searches for a parameter matrix that can be decomposed into a row-sparse matrix (corresponding to the overlapping or shared features) and an elementwise sparse matrix (corresponding to the non-shared features). As we show both theoretically and empirically, with this simple fix we are able to leverage any extent of shared features, while allowing disparities in support and values of the parameters, so that we are always better than both the Lasso or block-sparse regularizers (at times remarkably so). The rest of the paper is organized as follows: In Sec 2. basic definitions and setup of the problem are presented. Main results of the paper is discussed in sec 3. Experimental results and simulations are demonstrated in Sec 4. Notation: For any matrix M, we denote its jth row as Mj, and its k-th column as M (k). The set of all non-zero rows (i.e. all rows with at least one non-zero element) is denoted by RowSupp(M) and its support by Supp(M). Also, for any matrix M, let ∥M∥1,1 := P j,k |M (k) j |, i.e. the sums of absolute values of the elements, and ∥M∥1,∞:= P j ∥Mj∥∞where, ∥Mj∥∞:= maxk |M (k) j |. 2 2 Problem Set-up and Our Method Multiple regression. We consider the following standard multiple linear regression model: y(k) = X(k)¯θ(k) + w(k), k = 1, . . . , r, where y(k) ∈Rn is the response for the k-th task, regressed on the design matrix X(k) ∈Rn×p (possibly different across tasks), while w(k) ∈Rn is the noise vector. We assume each w(k) is drawn independently from N(0, σ2). The total number of tasks or target variables is r, the number of features is p, while the number of samples we have for each task is n. For notational convenience, we collate these quantities into matrices Y ∈Rn×r for the responses, ¯Θ ∈Rp×r for the regression parameters and W ∈Rn×r for the noise. Dirty Model. In this paper we are interested in estimating the true parameter ¯Θ from data by leveraging any (unknown) extent of simultaneous-sparsity. In particular, certain rows of ¯Θ would have many non-zero entries, corresponding to features shared by several tasks (“shared” rows), while certain rows would be elementwise sparse, corresponding to those features which are relevant for some tasks but not all (“non-shared rows”), while certain rows would have all zero entries, corresponding to those features that are not relevant to any task. We are interested in estimators bΘ that automatically adapt to different levels of sharedness, and yet enjoy the following guarantees: Support recovery: We say an estimator bΘ successfully recovers the true signed support if sign(Supp(bΘ)) = sign(Supp(¯Θ)). We are interested in deriving sufficient conditions under which the estimator succeeds. We note that this is stronger than merely recovering the row-support of ¯Θ, which is union of its supports for the different tasks. In particular, denoting Uk for the support of the k-th column of ¯Θ, and U = S k Uk. Error bounds: We are also interested in providing bounds on the elementwise ℓ∞norm error of the estimator bΘ, ∥bΘ −¯Θ∥∞= max j=1,...,p max k=1,...,r bΘ(k) j −¯Θ(k) j . 2.1 Our Method Our method explicitly models the dirty block-sparse structure. We estimate a sum of two parameter matrices B and S with different regularizations for each: encouraging block-structured row-sparsity in B and elementwise sparsity in S. The corresponding “clean” models would either just use blocksparse regularizations [8, 10] or just elementwise sparsity regularizations [14, 18], so that either method would perform better in certain suited regimes. Interestingly, as we will see in the main results, by explicitly allowing to have both block-sparse and elementwise sparse component, we are able to outperform both classes of these “clean models”, for all regimes ¯Θ. Algorithm 1 Dirty Block Sparse Solve the following convex optimization problem: (bS, bB) ∈arg min S,B 1 2n r X k=1 y(k) −X(k)  S(k) + B(k) 2 2 + λs∥S∥1,1 + λb∥B∥1,∞. (1) Then output bΘ = bB + bS. 3 Main Results and Their Consequences We now provide precise statements of our main results. A number of recent results have shown that the Lasso [14, 18] and ℓ1/ℓ∞block-regularization [8] methods succeed in recovering signed supports with controlled error bounds under high-dimensional scaling regimes. Our first two theorems extend these results to our dirty model setting. In Theorem 1, we consider the case of deterministic design matrices X(k), and provide sufficient conditions guaranteeing signed support recovery, and elementwise ℓ∞norm error bounds. In Theorem 2, we specialize this theorem to the case where the 3 rows of the design matrices are random from a general zero mean Gaussian distribution: this allows us to provide scaling on the number of observations required in order to guarantee signed support recovery and bounded elementwise ℓ∞norm error. Our third result is the most interesting in that it explicitly quantifies the performance gains of our method vis-a-vis Lasso and the ℓ1/ℓ∞block-regularization method. Since this entailed finding the precise constants underlying earlier theorems, and a correspondingly more delicate analysis, we follow Negahban and Wainwright [8] and focus on the case where there are two-tasks (i.e. r = 2), and where we have standard Gaussian design matrices as in Theorem 2. Further, while each of two tasks depends on s features, only a fraction α of these are common. It is then interesting to see how the behaviors of the different regularization methods vary with the extent of overlap α. Comparisons. Negahban and Wainwright [8] show that there is actually a “phase transition” in the scaling of the probability of successful signed support-recovery with the number of observations. Denote a particular rescaling of the sample-size θLasso(n, p, α) = n s log(p−s). Then as Wainwright [18] show, when the rescaled number of samples scales as θLasso > 2 + δ for any δ > 0, Lasso succeeds in recovering the signed support of all columns with probability converging to one. But when the sample size scales as θLasso < 2−δ for any δ > 0, Lasso fails with probability converging to one. For the ℓ1/ℓ∞-reguralized multiple linear regression, define a similar rescaled sample size θ1,∞(n, p, α) = n s log(p−(2−α)s). Then as Negahban and Wainwright [8] show there is again a transition in probability of success from near zero to near one, at the rescaled sample size of θ1,∞= (4 −3α). Thus, for α < 2/3 (“less sharing”) Lasso would perform better since its transition is at a smaller sample size, while for α > 2/3 (“more sharing”) the ℓ1/ℓ∞regularized method would perform better. As we show in our third theorem, the phase transition for our method occurs at the rescaled sample size of θ1,∞= (2 −α), which is strictly before either the Lasso or the ℓ1/ℓ∞regularized method except for the boundary cases: α = 0, i.e. the case of no sharing, where we match Lasso, and for α = 1, i.e. full sharing, where we match ℓ1/ℓ∞. Everywhere else, we strictly outperform both methods. Figure 3 shows the empirical performance of each of the three methods; as can be seen, they agree very well with the theoretical analysis. (Further details in the experiments Section 4). 3.1 Sufficient Conditions for Deterministic Designs We first consider the case where the design matrices X(k) for k = 1, · · ·, r are deterministic, and start by specifying the assumptions we impose on the model. We note that similar sufficient conditions for the deterministic X(k)’s case were imposed in papers analyzing Lasso [18] and block-regularization methods [8, 10]. A0 Column Normalization X(k) j 2 ≤ √ 2n for all j = 1, . . . , p, k = 1, . . . , r. Let Uk denote the support of the k-th column of ¯Θ, and U = S k Uk denote the union of supports for each task. Then we require that A1 Incoherence Condition γb := 1 −max j∈Uc r X k=1  X(k) j , X(k) Uk D X(k) Uk , X(k) Uk E−1 1 > 0. We will also find it useful to define γs := 1−max1≤k≤r maxj∈Uc k D X(k) j , X(k) Uk E D X(k) Uk , X(k) Uk E−1 1 . Note that by the incoherence condition A1, we have γs > 0. A2 Eigenvalue Condition Cmin := min 1≤k≤r λmin  1 n D X(k) Uk , X(k) Uk E > 0. A3 Boundedness Condition Dmax := max 1≤k≤r  1 n D X(k) Uk , X(k) Uk E−1 ∞,1 < ∞. Further, we require the regularization penalties be set as λs > 2(2 −γs)σ p log(pr) γs √n and λb > 2(2 −γb)σ p log(pr) γb √n . (2) 4 0.5 1 1.5 1.7 2 2.5 3 3.1 3.5 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Control Parameter θ Probability of Success p=128 p=256 p=512 Dirty Model LASSO L1/Linf Reguralizer (a) α = 0.3 0.5 1 1.333 1.5 2 2.5 3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Control Parameter θ Probability of Success p=128 p=256 p=512 Dirty Model L1/Linf Reguralizer LASSO (b) α = 2 3 0.5 1 1.2 1.5 1.6 2 2.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Control Parameter θ Probability of Success p=128 p=256 p=512 Dirty Model L1/Linf Reguralizer LASSO (c) α = 0.8 Figure 1: Probability of success in recovering the true signed support using dirty model, Lasso and ℓ1/ℓ∞ regularizer. For a 2-task problem, the probability of success for different values of feature-overlap fraction α is plotted. As we can see in the regimes that Lasso is better than, as good as and worse than ℓ1/ℓ∞regularizer ((a), (b) and (c) respectively), the dirty model outperforms both of the methods, i.e., it requires less number of observations for successful recovery of the true signed support compared to Lasso and ℓ1/ℓ∞regularizer. Here s = ⌊p 10⌋always. Theorem 1. Suppose A0-A3 hold, and that we obtain estimate bΘ from our algorithm with regularization parameters chosen according to (2). Then, with probability at least 1 −c1 exp(−c2n) →1, we are guaranteed that the convex program (1) has a unique optimum and (a) The estimate bΘ has no false inclusions, and has bounded ℓ∞norm error so that Supp(bΘ) ⊆Supp(¯Θ), and ∥bΘ −¯Θ∥∞,∞≤ r 4σ2 log (pr) n Cmin + λsDmax | {z } bmin . (b) sign(Supp(bΘ)) = sign Supp(¯Θ)  provided that min (j,k)∈Supp( ¯Θ) ¯θ(k) j > bmin. Here the positive constants c1, c2 depend only on γs, γb, λs, λb and σ, but are otherwise independent of n, p, r, the problem dimensions of interest. Remark: Condition (a) guarantees that the estimate will have no false inclusions; i.e. all included features will be relevant. If in addition, we require that it have no false exclusions and that recover the support exactly, we need to impose the assumption in (b) that the non-zero elements are large enough to be detectable above the noise. 3.2 General Gaussian Designs Often the design matrices consist of samples from a Gaussian ensemble. Suppose that for each task k = 1, . . . , r the design matrix X(k) ∈Rn×p is such that each row X(k) i ∈Rp is a zero-mean Gaussian random vector with covariance matrix Σ(k) ∈Rp×p, and is independent of every other row. Let Σ(k) V,U ∈R|V|×|U| be the submatrix of Σ(k) with rows corresponding to V and columns to U. We require these covariance matrices to satisfy the following conditions: C1 Incoherence Condition γb := 1 −max j∈Uc r X k=1 Σ(k) j,Uk,  Σ(k) Uk,Uk −1 1 > 0 5 C2 Eigenvalue Condition Cmin := min 1≤k≤r λmin  Σ(k) Uk,Uk  > 0 so that the minimum eigenvalue is bounded away from zero. C3 Boundedness Condition Dmax :=  Σ(k) Uk,Uk −1 ∞,1 < ∞. These conditions are analogues of the conditions for deterministic designs; they are now imposed on the covariance matrix of the (randomly generated) rows of the design matrix. Further, defining s := maxk |Uk|, we require the regularization penalties be set as λs > 4σ2Cmin log(pr) 1/2 γs √nCmin − p 2s log(pr) and λb > 4σ2Cminr(r log(2) + log(p)) 1/2 γb √nCmin − p 2sr(r log(2) + log(p)) . (3) Theorem 2. Suppose assumptions C1-C3 hold, and that the number of samples scale as n > max  2s log(pr) Cminγ2 s , 2sr r log(2)+log(p)  Cminγ2 b  . Suppose we obtain estimate bΘ from algorithm (3). Then, with probability at least 1 −c1 exp (−c2 (r log(2) + log(p))) −c3 exp(−c4 log(rs)) →1 for some positive numbers c1 −c4, we are guaranteed that the algorithm estimate bΘ is unique and satisfies the following conditions: (a) the estimate bΘ has no false inclusions, and has bounded ℓ∞norm error so that Supp(bΘ) ⊆Supp(¯Θ), and ∥bΘ −¯Θ∥∞,∞≤ r 50σ2 log(rs) nCmin + λs  4s Cmin √n + Dmax  | {z } gmin . (b) sign(Supp(bΘ)) = sign Supp(¯Θ)  provided that min (j,k)∈Supp( ¯Θ) ¯θ(k) j > gmin. 3.3 Sharp Transition for 2-Task Gaussian Designs This is one of the most important results of this paper. Here, we perform a more delicate and finer analysis to establish precise quantitative gains of our method. We focus on the special case where r = 2 and the design matrix has rows generated from the standard Gaussian distribution N(0, In×n), so that C1 −C3 hold, with Cmin = Dmax = 1. As we will see both analytically and experimentally, our method strictly outperforms both Lasso and ℓ1/ℓ∞-block-regularization over for all cases, except at the extreme endpoints of no support sharing (where it matches that of Lasso) and full support sharing (where it matches that of ℓ1/ℓ∞). We now present our analytical results; the empirical comparisons are presented next in Section 4. The results will be in terms of a particular rescaling of the sample size n as θ(n, p, s, α) := n (2 −α)s log (p −(2 −α)s). We will also require the assumptions that F1 λs >  4σ2(1 − p s/n)(log(r) + log(p −(2 −α)s)) 1/2 (n)1/2 −(s)1/2 −((2 −α) s (log(r) + log(p −(2 −α)s)))1/2 , F2 λb >  4σ2(1 − p s/n)r(r log(2) + log(p −(2 −α)s)) 1/2 (n)1/2 −(s)1/2 −((1 −α/2) sr (r log(2) + log(p −(2 −α)s)))1/2 . Theorem 3. Consider a 2-task regression problem (n, p, s, α), where the design matrix has rows generated from the standard Gaussian distribution N(0, In×n). Suppose maxj∈B∗ Θ∗(1) j − 6 Θ∗(2) j = o(λs), where B∗is the submatrix of Θ∗with rows where both entries are non-zero. Then the estimate bΘ of the problem (1) satisfies the following: (Success) Suppose the regularization coefficients satisfy F1 −F2. Further, assume that the number of samples scales as θ(n, p, s, α) > 1. Then, with probability at least 1−c1 exp(−c2n) for some positive numbers c1 and c2, we are guaranteed that bΘ satisfies the support-recovery and ℓ∞error bound conditions (a-b) in Theorem 2. (Failure) If θ(n, p, s, α) < 1 there is no solution ( ˆB, ˆS) for any choices of λs and λb such that sign  Supp(bΘ)  = sign Supp(¯Θ)  . We note that we require the gap Θ∗(1) j − Θ∗(2) j to be small only on rows where both entries are non-zero. As we show in a more general theorem in the appendix, even in the case where the gap is large, the dependence of the sample scaling on the gap is quite weak. 4 Empirical Results In this section, we investigate the performance of our dirty block sparse estimator on synthetic and real-world data. The synthetic experiments explore the accuracy of Theorem 3, and compare our estimator with LASSO and the ℓ1/ℓ∞regularizer. We see that Theorem 3 is very accurate indeed. Next, we apply our method to a real world datasets containing hand-written digits for classification. Again we compare against LASSO and the ℓ1/ℓ∞. (a multi-task regression dataset) with r = 2 tasks. In both of this real world dataset, we show that dirty model outperforms both LASSO and ℓ1/ℓ∞practically. For each method, the parameters are chosen via cross-validation; see supplemental material for more details. 4.1 Synthetic Data Simulation We consider a r = 2-task regression problem as discussed in Theorem 3, for a range of parameters (n, p, s, α). The design matrices X have each entry being i.i.d. Gaussian with mean 0 and variance 1. For each fixed set of (n, s, p, α), we generate 100 instances of the problem. In each instance, given p, s, α, the locations of the non-zero entries of the true ¯Θ are chosen at randomly; each nonzero entry is then chosen to be i.i.d. Gaussian with mean 0 and variance 1. n samples are then generated from this. We then attempt to estimate using three methods: our dirty model, ℓ1/ℓ∞ regularizer and LASSO. In each case, and for each instance, the penalty regularizer coefficients are found by cross validation. After solving the three problems, we compare the signed support of the solution with the true signed support and decide whether or not the program was successful in signed support recovery. We describe these process in more details in this section. Performance Analysis: We ran the algorithm for five different values of the overlap ratio α ∈ {0.3, 2 3, 0.8} with three different number of features p ∈{128, 256, 512}. For any instance of the problem (n, p, s, α), if the recovered matrix ˆΘ has the same sign support as the true ¯Θ, then we count it as success, otherwise failure (even if one element has different sign, we count it as failure). As Theorem 3 predicts and Fig 3 shows, the right scaling for the number of oservations is n s log(p−(2−α)s), where all curves stack on the top of each other at 2 −α. Also, the number of observations required by dirty model for true signed support recovery is always less than both LASSO and ℓ1/ℓ∞regularizer. Fig 1(a) shows the probability of success for the case α = 0.3 (when LASSO is better than ℓ1/ℓ∞regularizer) and that dirty model outperforms both methods. When α = 2 3 (see Fig 1(b)), LASSO and ℓ1/ℓ∞regularizer performs the same; but dirty model require almost 33% less observations for the same performance. As α grows toward 1, e.g. α = 0.8 as shown in Fig 1(c), ℓ1/ℓ∞performs better than LASSO. Still, dirty model performs better than both methods in this case as well. 7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 1.5 2 2.5 3 3.5 4 Shared Support Parameter α Phase Transition Threshold p=128 p=256 p=512 LASSO Dirty Model L1/Linf Regularizer Figure 2: Verification of the result of the Theorem 3 on the behavior of phase transition threshold by changing the parameter α in a 2-task (n, p, s, α) problem for dirty model, LASSO and ℓ1/ℓ∞regularizer. The y-axis is n s log(p−(2−α)s), where n is the number of samples at which threshold was observed. Here s = ⌊p 10⌋. Our dirty model method shows a gain in sample complexity over the entire range of sharing α. The pre-constant in Theorem 3 is also validated. n Our Model ℓ1/ℓ∞ LASSO 10 Average Classification Error 8.6% 9.9% 10.8% Variance of Error 0.53% 0.64% 0.51% Average Row Support Size B:165 B + S:171 170 123 Average Support Size S:18 B + S:1651 1700 539 20 Average Classification Error 3.0% 3.5% 4.1% Variance of Error 0.56% 0.62% 0.68% Average Row Support Size B:211 B + S:226 217 173 Average Support Size S:34 B + S:2118 2165 821 40 Average Classification Error 2.2% 3.2% 2.8% Variance of Error 0.57% 0.68% 0.85% Average Row Support Size B:270 B + S:299 368 354 Average Support Size S:67 B + S:2761 3669 2053 Table 1: Handwriting Classification Results for our model, ℓ1/ℓ∞and LASSO Scaling Verification: To verify that the phase transition threshold changes linearly with α as predicted by Theorem 3, we plot the phase transition threshold versus α. For five different values of α ∈{0.05, 0.3, 2 3, 0.8, 0.95} and three different values of p ∈{128, 256, 512}, we find the phase transition threshold for dirty model, LASSO and ℓ1/ℓ∞regularizer. We consider the point where the probability of success in recovery of signed support exceeds 50% as the phase transition threshold. We find this point by interpolation on the closest two points. Fig 2 shows that phase transition threshold for dirty model is always lower than the phase transition for LASSO and ℓ1/ℓ∞regularizer. 4.2 Handwritten Digits Dataset We use the handwritten digit dataset [1], containing features of handwritten numerals (0-9) extracted from a collection of Dutch utility maps. This dataset has been used by a number of papers [17, 6] as a reliable dataset for handwritten recognition algorithms. There are thus r = 10 tasks, and each handwritten sample consists of p = 649 features. Table 1 shows the results of our analysis for different sizes n of the training set . We measure the classification error for each digit to get the 10-vector of errors. Then, we find the average error and the variance of the error vector to show how the error is distributed over all tasks. We compare our method with ℓ1/ℓ∞reguralizer method and LASSO. Again, in all methods, parameters are chosen via cross-validation. For our method we separate out the B and S matrices that our method finds, so as to illustrate how many features it identifies as “shared” and how many as “non-shared”. For the other methods we just report the straight row and support numbers, since they do not make such a separation. Acknowledgements We acknowledge support from NSF grant IIS-101842, and NSF CAREER program, Grant 0954059. 8 References [1] A. Asuncion and D.J. Newman. UCI Machine Learning Repository, http://www.ics.uci.edu/ mlearn/MLRepository.html. University of California, School of Information and Computer Science, Irvine, CA, 2007. [2] F. Bach. Consistency of the group lasso and multiple kernel learning. Journal of Machine Learning Research, 9:1179–1225, 2008. [3] R. Baraniuk. Compressive sensing. IEEE Signal Processing Magazine, 24(4):118–121, 2007. [4] R. Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [5] C.Zhang and J.Huang. Model selection consistency of the lasso selection in high-dimensional linear regression. Annals of Statistics, 36:1567–1594, 2008. [6] X. He and P. Niyogi. Locality preserving projections. In NIPS, 2003. [7] K. Lounici, A. B. Tsybakov, M. Pontil, and S. A. van de Geer. Taking advantage of sparsity in multi-task learning. In 22nd Conference On Learning Theory (COLT), 2009. [8] S. Negahban and M. J. Wainwright. Joint support recovery under high-dimensional scaling: Benefits and perils of ℓ1,∞-regularization. In Advances in Neural Information Processing Systems (NIPS), 2008. [9] S. Negahban and M. J. Wainwright. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. In ICML, 2010. [10] G. Obozinski, M. J. Wainwright, and M. I. Jordan. Support union recovery in high-dimensional multivariate regression. Annals of Statistics, 2010. [11] P. Ravikumar, H. Liu, J. Lafferty, and L. Wasserman. Sparse additive models. Journal of the Royal Statistical Society, Series B. [12] P. Ravikumar, M. J. Wainwright, and J. Lafferty. High-dimensional ising model selection using ℓ1-regularized logistic regression. Annals of Statistics, 2009. [13] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. In Allerton Conference, Allerton House, Illinois, 2007. [14] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58(1):267–288, 1996. [15] J. A. Tropp, A. C. Gilbert, and M. J. Strauss. Algorithms for simultaneous sparse approximation. Signal Processing, Special issue on “Sparse approximations in signal and image processing”, 86:572–602, 2006. [16] B. Turlach, W.N. Venables, and S.J. Wright. Simultaneous variable selection. Techno- metrics, 27:349–363, 2005. [17] M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog. Handwritten digit recognition by combined classifiers. Kybernetika, 34(4):381–386, 1998. [18] M. J. Wainwright. Sharp thresholds for noisy and high-dimensional recovery of sparsity using ℓ1-constrained quadratic programming (lasso). IEEE Transactions on Information Theory, 55: 2183–2202, 2009. 9
2010
2
3,965
Generalized roof duality and bisubmodular functions Vladimir Kolmogorov Department of Computer Science University College London, UK v.kolmogorov@cs.ucl.ac.uk Abstract Consider a convex relaxation ˆf of a pseudo-boolean function f. We say that the relaxation is totally half-integral if ˆf(x) is a polyhedral function with halfintegral extreme points x, and this property is preserved after adding an arbitrary combination of constraints of the form xi = xj, xi = 1 −xj, and xi = γ where γ ∈{0, 1, 1 2} is a constant. A well-known example is the roof duality relaxation for quadratic pseudo-boolean functions f. We argue that total half-integrality is a natural requirement for generalizations of roof duality to arbitrary pseudo-boolean functions. Our contributions are as follows. First, we provide a complete characterization of totally half-integral relaxations ˆf by establishing a one-to-one correspondence with bisubmodular functions. Second, we give a new characterization of bisubmodular functions. Finally, we show some relationships between general totally half-integral relaxations and relaxations based on the roof duality. 1 Introduction Let V be a set of |V | = n nodes and B ⊂K1/2 ⊂K be the following sets: B = {0, 1}V K1/2 = {0, 1 2, 1}V K = [0, 1]V A function f : B →R is called pseudo-boolean. In this paper we consider convex relaxations ˆf : K →R of f which we call totally half-integral: Definition 1. (a) Function ˆf : P →R where P ⊆K is called half-integral if it is a convex polyhedral function such that all extreme points of the epigraph {(x, z) | x ∈P, z ≥ˆf(x)} have the form (x, ˆf(x)) where x ∈K1/2. (b) Function ˆf : K →R is called totally half-integral if restrictions ˆf : P →R are half-integral for all subsets P ⊆K obtained from K by adding an arbitrary combination of constraints of the form xi = xj, xi = xj, and xi = γ for points x ∈K. Here i, j denote nodes in V , γ denotes a constant in {0, 1, 1 2}, and z ≡1 −z. A well-known example of a totally half-integral relaxation is the roof duality relaxation for quadratic pseudo-boolean functions f(x) = P i cixi + P (i,j) cijxixj studied by Hammer, Hansen and Simeone [13]. It is known to possess the persistency property: for any half-integral minimizer ˆx ∈arg min ˆf(ˆx) there exists minimizer x ∈arg min f(x) such that xi = ˆxi for all nodes i with integral component ˆxi. This property is quite important in practice as it allows to reduce the size of the minimization problem when ˆx ̸= 1 2. The set of nodes with guaranteed optimal solution can sometimes be increased further using the PROBE technique [6], which also relies on persistency. The goal of this paper is to generalize the roof duality approach to arbitrary pseudo-boolean functions. The total half-integrality is a very natural requirement of such generalizations, as discussed later in this section. As we prove, total half-integrality implies persistency. 1 We provide a complete characterization of totally half-integral relaxations. Namely, we prove in section 2 that if ˆf : K →R is totally half-integral then its restriction to K1/2 is a bisubmodular function, and conversely any bisubmodular function can be extended to a totally half-integral relaxation. Definition 2. Function f : K1/2 →R is called bisubmodular if f(x ⊓y) + f(x ⊔y) ≤ f(x) + f(y) ∀x, y ∈K1/2 (1) where binary operators ⊓, ⊔: K1/2 × K1/2 →K1/2 are defined component-wise as follows: ⊓ 0 1 2 1 0 0 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 ⊔ 0 1 2 1 0 0 0 1 2 1 2 0 1 2 1 1 1 2 1 1 (2) As our second contribution, we give a new characterization of bisubmodular functions (section 3). Using this characterization, we then prove several results showing links with the roof duality relaxation (section 4). 1.1 Applications This work has been motivated by computer vision applications. A fundamental task in vision is to infer pixel properties from observed data. These properties can be the type of object to which the pixel belongs, distance to the camera, pixel intensity before being corrupted by noise, etc. The popular MAP-MRF approach casts the inference task as an energy minimization problem with the objective function of the form f(x) = P C fC(x) where C ⊂V are subsets of neighboring pixels of small cardinality (|C| = 1, 2, 3, . . .) and terms fC(x) depend only on labels of pixels in C. For some vision applications the roof duality approach [13] has shown a good performance [30, 32, 23, 24, 33, 1, 16, 17].1 Functions with higher-order terms are steadily gaining popularity in computer vision [31, 33, 1, 16, 17]; it is generally accepted that they correspond to better image models. Therefore, studying generalizations of roof duality to arbitrary pseudo-boolean functions is an important task. In such generalizations the total half-integrality property is essential. Indeed, in practice, the relaxation ˆf is obtained as the sum of relaxations ˆfC constructed for each term independently. Some of these terms can be c|xi −xj| and c|xi + xj −1|. If c is sufficiently large, then applying the roof duality relaxation to these terms would yield constraints xi = xj and x = xj present in the definition of total half-integrality. Constraints xi = γ ∈{0, 1, 1 2} can also be simulated via the roof duality, e.g. xi = xj, xi = xj for the same pair of nodes i, j implies xi = xj = 1 2. 1.2 Related work Half-integrality There is a vast literature on using half-integral relaxations for various combinatorial optimization problems. In many cases these relaxations lead to 2-approximation algorithms. Below we list a few representative papers. The earliest work recognizing half-integrality of polytopes with certain pairwise constraints was perhaps by Balinksi [3], while the persistency property goes back to Nemhauser and Trotter [28] who considered the vertex cover problem. Hammer, Hansen and Simeone [13] established that these properties hold for the roof duality relaxation for quadratic pseudo-boolean functions. Their work was generalized to arbitrary pseudo-boolean functions by Lu and Williams [25]. (The relaxation in [25] relied on converting function f to a multinomial representation; see section 4 for more details.) Hochbaum [14, 15] gave a class of integer problems with half-integral relaxations. Very recently, Iwata and Nagano [18] formulated a half-integral relaxation for the problem of minimizing submodular function f(x) under constraints of the form xi + xj ≥1. 1In many vision problems variables xi are not binary. However, such problems are often reduced to a sequence of binary minimization problems using iterative move-making algorithms, e.g. using expansion moves [9] or fusion moves [23, 24, 33, 17]. 2 In computer vision, several researchers considered the following scheme: given a function f(x) = P fC(x), convert terms fC(x) to quadratic pseudo-boolean functions by introducing auxiliary binary variables, and then apply the roof duality relaxation to the latter. Woodford et al. [33] used this technique for the stereo reconstruction problem, while Ali et al. [1] and Ishikawa [16] explored different conversions to quadratic functions. To the best of our knowledge, all examples of totally half-integral relaxations proposed so far belong to the class of submodular relaxations, which is defined in section 4. They form a subclass of more general bisubmodular relaxations. Bisubmodularity Bisubmodular functions were introduced by Chandrasekaran and Kabadi as rank functions of (poly-)pseudomatroids [10, 19]. Independently, Bouchet [7] introduced the concept of ∆-matroids which is equivalent to pseudomatroids. Bisubmodular functions and their generalizations have also been considered by Qi [29], Nakamura [27], Bouchet and Cunningham [8] and Fujishige [11]. The notion of the Lov´asz extension of a bisubmodular function introduced by Qi [29] will be of particular importance for our work (see next section). It has been shown that some submodular minimization algorithms can be generalized to bisubmodular functions. Qi [29] showed the applicability of the ellipsoid method. A weakly polynomial combinatorial algorithm for minimizing bisubmodular functions was given by Fujishige and Iwata [12], and a strongly polynomial version was given by McCormick and Fujishige [26]. Recently, we introduced strongly and weakly tree-submodular functions [22] that generalize bisubmodular functions. 2 Total half-integrality and bisubmodularity The first result of this paper is following theorem. Theorem 3. If ˆf : K →R is a totally half-integral relaxation then its restriction to K1/2 is bisubmodular. Conversely, if function f : K1/2 →R is bisubmodular then it has a unique totally halfintegral extension ˆf : K →R. This section is devoted to the proof of theorem 3. Denote L = [−1, 1]V , L1/2 = {−1, 0, 1}V . It will be convenient to work with functions ˆh : L →R and h : L1/2 →R obtained from ˆf and f via a linear change of coordinates xi 7→2xi −1. Under this change totally half-integral relaxations are transformed to totally integral relaxations: Definition 4. Let ˆh : L →R be a function of n variables. (a) ˆh is called integral if it is a convex polyhedral function such that all extreme points of the epigraph {(x, z)|x ∈L, z ≥ˆh(x)} have the form (x, ˆh(x)) where x ∈L1/2. (b) ˆh is called totally integral if it is integral and for an arbitrary ordering of nodes the following functions of n −1 variables (if n > 1) are totally integral: ˆh′(x1, . . . , xn−1) = ˆh(x1, . . . , xn−1, xn−1) ˆh′(x1, . . . , xn−1) = ˆh(x1, . . . , xn−1, −xn−1) ˆh′(x1, . . . , xn−1) = ˆh(x1, . . . , xn−1, γ) for any constant γ ∈{−1, 0, 1} The definition of a bisubmodular function is adapted as follows: function h : L1/2 →R is bisubmodular if inequality (1) holds for all x, y ∈L1/2 where operations ⊓, ⊔are defined by tables (2) after replacements 0 7→−1, 1 2 7→0, 1 7→1. To prove theorem 3, it suffices to establish a link between totally integral relaxations ˆh : L →R and bisubmodular functions h : L1/2 →R. We can assume without loss of generality that ˆh(0) = h(0) = 0, since adding a constant to the functions does not affect the theorem. A pair ω = (π, σ) where π : V →{1, . . . , n} is a permutation of V and σ ∈{−1, 1}V will be called a signed ordering. Let us rename nodes in V so that π(i) = i. To each signed ordering ω we associate labelings x0, x1, . . . , xn ∈L1/2 as follows: x0 = (0, 0, . . . , 0) x1 = (σ1, 0, . . . , 0) . . . xn = (σ1, σ2, . . . , σn) (3) 3 where nodes are ordered according to π. Consider function h : L1/2 →R with h(0) = 0. Its Lov´asz extension ˆh : RV →R is defined in the following way [29]. Given a vector x ∈RV , select a signed ordering ω = (π, σ) as follows: (i) choose π so that values |xi|, i ∈V are non-increasing, and rename nodes accordingly so that |x1| ≥. . . ≥|xn|; (ii) if xi ̸= 0 set σi = sign(xi), otherwise choose σi ∈{−1, 1} arbitrarily. It is not difficult to check that x = n X i=1 λixi (4a) where labelings xi are defined in (3) (with respect to the selected signed ordering) and λi = |xi| − |xi+1| for i = 1, . . . , n −1, λn = |xn|. The value of the Lov´asz extension is now defined as ˆh(x) = n X i=1 λih(xi) (4b) Theorem 5 ([29]). Function h is bisubmodular if and only if its Lov´asz extension ˆh is convex on L. 2 Let Lω be the set of vectors in L for which signed ordering ω = (π, σ) can be selected. Clearly, Lω = {x ∈L | |x1| ≥. . . ≥|xn|, xiσi ≥0 ∀i ∈V }. It is easy to check that Lω is the convex hull of n + 1 points (3). Equations (4) imply that ˆh is linear on Lω and coincides with h in each corner x0, . . . , xn. Lemma 6. Suppose function ˜h : L →R is totally integral. Then ˜h is linear on simplex Lω for each signed ordering ω = (π, σ). Proof. We use induction on n = |V |. For n = 1 the claim is straightforward; suppose that n ≥2. Consider signed ordering ω = (π, σ). We need to prove that ˜h is linear on the boundary ∂Lω; this will imply that ˆg is linear on Lω since otherwise ˜h would have an extreme point in the the interior Lω\∂Lω which cannot be integral. Let X = {x0, . . . , xn} be the set of extreme points of Lω defined by (3). The boundary ∂Lω is the union of n + 1 facets L0 ω, . . . , Ln ω where Li ω is the convex hull of points in X\{xi}. Let us prove that ˜h is linear on L0 ω. All points x ∈X\{x0} satisfy x1 = σ1, therefore L0 ω = {x ∈Lω | x1 = σ1}. Consider function of n −1 variables ˜h′(x2, . . . , xn) = ˜h(σ1, x2, . . . , xn), and let L′ 0 ω be the projection of L0 ω to RV \{1}. By the induction hypothesis ˜h′ is linear on L′ 0 ω , and thus ˜h is linear on L0 ω. The fact that ˜h is linear on other facets can be proved in a similar way. Note that for i = 2, . . . , n−1 there holds Li ω = {x ∈Lω | xi = σi−1σixi−1}, and for i = n we have Ln ω = {x ∈Lω | xn = 0}. Corollary 7. Suppose function ˜h : L →R with ˜h(0) = 0 is totally integral. Let h be the restriction of ˜h to L1/2 and ˆh be the Lov´asz extension of h. Then ˜h and ˆh coincide on L. Theorem 5 and corollary 7 imply the first part of theorem 3. The second part will follow from Lemma 8. If h : L1/2 →R with h(0) = 0 is bisubmodular then its Lov´asz extension ˆh : L →R is totally integral. 2Note, Qi formulates this result slightly differently: ˆh is assumed to be convex on RV rather than on L. However, it is easy to see that convexity of ˆh on L implies convexity of ˆh on RV . Indeed, it can be checked that ˆh is positively homogeneous, i.e. ˆh(γx) = γˆh(x) for any γ ≥0, x ∈RV . Therefore, for any x, y ∈RV and α, β ≥0 with α + β = 1 there holds ˆh(αx + βy) = 1 γ ˆh(αγx + βγy) ≤α γ ˆh(γx) + β γ ˆh(γy) = αˆh(x) + βˆh(y) where the inequality in the middle follows from convexity of ˆh on L, assuming that γ is a sufficiently small constant. 4 Proof. We use induction on n = |V |. For n = 1 the claim is straightforward; suppose that n ≥2. By theorem 5, ˆh is convex on L. Function ˆh is integral since it is linear on each simplex Lω and vertices of Lω belong to L1/2. It remains to show that functions ˆh′ considered in definition 4 are totally integral. Consider the following functions h′ : {−1, 0, 1}V \{n} →R: h′(x1, . . . , xn−1) = h(x1, . . . , xn−1, xn−1) h′(x1, . . . , xn−1) = h(x1, . . . , xn−1, −xn−1) h′(x1, . . . , xn−1) = h(x1, . . . , xn−1, γ) , γ ∈{−1, 0, 1} It can be checked that these functions are bisubmodular, and their Lov´asz extensions coincide with respective functions ˆh′ used in definition 4. The claim now follows from the induction hypothesis. 3 A new characterization of bisubmodularity In this section we give an alternative definition of bisubmodularity; it will be helpful later for describing a relationship to the roof duality. As is often done for bisubmodular functions, we will encode each half-integral value xi ∈{0, 1, 1 2} via two binary variables (ui, ui′) according to the following rules: 0 ↔(0, 1) 1 ↔(1, 0) 1 2 ↔(0, 0) Thus, labelings in K1/2 will be represented via labelings in the set X −= {u ∈{0, 1}V | (ui, ui′) ̸= (1, 1) ∀i ∈V } where V = {i, i′ | i ∈V } is a set with 2n nodes. The node i′ for i ∈V is called the “mate” of i; intuitively, variable ui′ corresponds to the complement of ui. We define (i′)′ = i for i ∈V . Labelings in X −will be denoted either by a single letter, e.g. u or v, or by a pair of letters, e.g. (x, y). In the latter case we assume that the two components correspond to labelings of V and V \V , respectively, and the order of variables in both components match. Using this convention, the one-to-one mapping X −→K1/2 can be written as (x, y) 7→1 2(x + y). Accordingly, instead of function f : K1/2 →R we will work with the function g : X −→R defined by g(x, y) = f x + y 2  (5) Note that the set of integer labelings B ⊂K1/2 corresponds to the set X ◦= {u ∈X −| (ui, ui′) ̸= (0, 0)}, so function g : X −→R can be viewed as a discrete relaxation of function g : X ◦→R. Definition 9. Function f : X −→R is called bisubmodular if f(u ⊓v) + f(u ⊔v) ≤ f(u) + f(v) ∀u, v ∈X − (6) where u ⊓v = u ∧v, u ⊔v = REDUCE(u ∨v) and REDUCE(w) is the labeling obtained from w by changing labels (wi, wi′) from (1, 1) to (0, 0) for all i ∈V . To describe a new characterization, we need to introduce some additional notation. We denote X = {0, 1}V to be the set of all binary labelings of V . For a labeling u ∈X, define labeling u′ by (u′)i = ui′. Labels (ui, ui′) are transformed according to the rules (0, 1) →(0, 1) (1, 0) →(1, 0) (0, 0) →(1, 1) (1, 1) →(0, 0) (7) Equivalently, this mapping can be written as (x, y)′ = (y, x). Note that u′′ = u, (u∧v)′ = u′ ∨v′ and (u ∨v)′ = u′ ∧v′ for u, v ∈X. Next, we define sets X − = {u ∈X | u ≤u′} = {u ∈X | (ui, u′ i) ̸= (1, 1) ∀i ∈V } X + = {u ∈X | u ≥u′} = {u ∈X | (ui, u′ i) ̸= (0, 0) ∀i ∈V } X ◦ = {u ∈X | u = u′} = {u ∈X | (ui, u′ i) ∈{(0, 1), (1, 0)} ∀i ∈V } = X −∩X + X ⋆ = X −∪X + Clearly, u ∈X −if and only if u′ ∈X +. Also, any function g : X −→R can be uniquely extended to a function g : X ⋆→R so that the following condition holds: g(u′) = g(u) ∀u ∈X ⋆ (8) 5 Proposition 10. Let g : X ⋆→R be a function satisfying (8). The following conditions are equivalent: (a) g is bisubmodular, i.e. it satisfies (6). (b) g satisfies the following inequalities: g(u ∧v) + g(u ∨v) ≤ g(u) + g(v) if u, v, u ∧v, u ∨v ∈X ⋆ (9) (c) g satisfies those inequalities in (6) for which u = w ∨ei, v = w ∨ej where w = u ∧v and i, j are distinct nodes in V with wi = wj = 0. Here ek for node k ∈V denotes the labeling in X with ek k = 1 and ek k′ = 0 for k′ ∈V \{k}. (d) g satisfies those inequalities in (9) for which u = w ∨ei, v = w ∨ej where w = u ∧v and i, j are distinct nodes in V with zi = zj = 0. A proof is given [20]. Note, an equivalent of characterization (c) was given by Ando et al. [2]; we state it here for completeness. Remark 1 In order to compare characterizations (b,d) to existing characterizations (a,c), we need to analyze the sets of inequalities in (b,d) modulo eq. (8), i.e. after replacing terms g(w), w ∈X + with g(w′). In can be seen that the inequalities in (a) are neither subset nor superset of those in (b)3, so (b) is a new characterization. It is also possible to show that from this point of view (c) and (d) are equivalent. 4 Submodular relaxations and roof duality Consider a submodular function g : X →R satisfying the following “symmetry” condition: g(u′) = g(u) ∀u ∈X (10) We call such function g a submodular relaxation of function f(x) = g(x, x). Clearly, it satisfies conditions of proposition 10, so g is also a bisubmodular relaxation of f. Furthermore, minimizing g is equivalent to minimizing its restriction g : X −→R; indeed, if u ∈X is a minimizer of g then so are u′ and u ∧u′ ∈X −. In this section we will do the following: (i) prove that any pseudo-boolean function f : B →R has a submodular relaxation g : X →R; (ii) show that the roof duality relaxation for quadratic pseudoboolean functions is a submodular relaxation, and it dominates all other bisubmodular relaxations; (iii) show that for non-quadratic pseudo-boolean functions bisubmodular relaxations can be tighter than submodular ones; (iv) prove that similar to the roof duality relaxation, bisubmodular relaxations possess the persistency property. Review of roof duality Consider a quadratic pseudo-boolean function f : B →R: f(x) = X i∈V fi(xi) + X (i,j)∈E fij(xi, xj) (11) where (V, E) is an undirected graph and xi ∈{0, 1} for i ∈V are binary variables. Hammer, Hansen and Simeone [13] formulated several linear programming relaxations of this function and 3Denote u =  1 0 0 0 1 0 0 0  and v =  0 0 1 0 0 1 0 0  where the top and bottom rows correspond to the labelings of V and V \V respectively, with |V | = 4. Plugging pair (u, v) into (6) gives the following inequality: g  0 0 0 0 0 0 0 0  + g  1 0 1 0 0 0 0 0  ≤g  1 0 0 0 1 0 0 0  + g  0 0 1 0 0 1 0 0  This inequality is a part of (a), but it is not present in (b): pairs (u, v) and (u′, v′) do not satisfy the RHS of (9), while pairs (u, v′) and (u′, v) give a different inequality: g  1 0 0 0 0 0 0 0  + g  0 0 1 0 0 0 0 0  ≤g  1 0 0 0 1 0 0 0  + g  0 0 1 0 0 1 0 0  where we used condition (8). Conversely, the second inequality is a part of (b) but it is not present in (a). 6 showed their equivalence. One of these formulations was called a roof dual. An efficient maxflowbased method for solving the roof duality relaxation was given by Hammer, Boros and Sun [5, 4]. We will rely on this algorithmic description of the roof duality approach [4]. The method’s idea can be summarized as follows. Each variable xi is replaced with two binary variables ui and ui′ corresponding to xi and 1 −xi respectively. The new set of nodes is V = {i, i′ | i ∈V }. Next, function f is transformed to a function g : X →R by replacing each term according to the following rules: fi(xi) 7→ 1 2[fi(ui) + fi(ui′)] (12a) fij(xi, xj) 7→ 1 2[fij(ui, uj) + fij(ui′, uj′)] if fij(·, ·) is submodular (12b) fij(xi, xj) 7→ 1 2[fij(ui, uj′) + fij(ui′, uj)] if fij(·, ·) is not submodular (12c) g is a submodular quadratic pseudo-boolean function, so it can be minimized via a maxflow algorithm. If u ∈X is a minimizer of g then the roof duality relaxation has a minimizer ˆx with ˆxi = 1 2(ui + ui′) [4]. It is easy to check that g(u) = g(u′) for all u ∈X, therefore g is a submodular relaxation. Also, f and g are equivalent when ui′ = ui for all i ∈V , i.e. g(x, x) = f(x) ∀x ∈B (13) Invariance to variable flipping Suppose that g is a (bi-)submodular relaxation of function f : B →R. Let i be a fixed node in V , and consider function f ′(x) obtained from f(x) by a change of coordinates xi 7→xi and function g′(u) obtained from g(u) by swapping variables ui and ui′. It is easy to check that g′ is a (bi-)submodular relaxation of f ′. Furthermore, if f is a quadratic pseudoboolean function and g is its submodular relaxation constructed by the roof duality approach, then applying the roof duality approach to f ′ yields function g′. We will sometimes use such “flipping” operation for reducing the number of considered cases. Conversion to roof duality Let us now consider a non-quadratic pseudo-boolean function f : B → R. Several papers [33, 1, 16] proposed the following scheme: (1) Convert f to a quadratic pseudoboolean function ˜f by introducing k auxiliary binary variables so that f(x) = minα∈{0,1}k ˜f(x, α) for all labelings x ∈B. (2) Construct submodular relaxation ˜g(x, α, y, β) of ˜f by applying the roof duality relaxation to ˜f; then ˜g(x, α, y, β) = ˜g(y, β, x, α) , ˜g(x, α, x, α) = ˜f(x, α) ∀x, y ∈B, α, β ∈{0, 1}k (3) Obtain function g by minimizing out auxiliary variables: g(x, y) = minα,β∈{0,1}k ˜g(x, α, y, β). One can check that g(x, y) = g(y, x), so g is a submodular relaxation4. In general, however, it may not be a relaxation of function f, i.e. (13) may not hold; we are only guaranteed to have g(x, x) ≤f(x) for all labelings x ∈B. Existence of submodular relaxations It is easy to check that if f : B →R is submodular then function g(x, y) = 1 2 [f(x) + f(y)] is a submodular relaxation of f.5 Thus, monomials of the form cΠi∈Axi where c ≤0 and A ⊆V have submodular relaxations. Using the “flipping” operation xi 7→xi, we conclude that submodular relaxations also exist for monomials of the form 4It is well-known that minimizing variables out preserves submodularity. Indeed, suppose that h(x) = minα ˜h(x, α) where ˜h is a submodular function. Then h is also submodular since h(x) + h(y) = ˜h(x, α) + ˜h(y, β) ≥˜h(x ∧y, α ∧β) + ˜h(x ∨y, α ∨β) ≥h(x ∧y) + h(x ∨y) 5In fact, it dominates all other bisubmodular relaxations ¯g : X −→R of f. Indeed, consider labeling (x, y) ∈X −. It can be checked that (x, y) = u ⊓v = u ⊔v where u = (x, x) and v = (y, y), therefore ¯g(x, y) ≤1 2[¯g(u) + ¯g(v)] = 1 2[f(x) + f(y)] = g(x, y). 7 cΠi∈AxiΠi∈Bxi where c ≤0 and A, B are disjoint subsets of U. It is known that any pseudoboolean function f can be represented as a sum of such monomials (see e.g. [4]; we need to represent −f as a posiform and take its negative). This implies that any pseudo-boolean function f has a submodular relaxation. Note that this argument is due to Lu and Williams [25] who converted function f to a sum of monomials of the form cΠi∈Axi and cxkΠi∈Axi, c ≤0, k /∈A. It is possible to show that the relaxation proposed in [25] is equivalent to the submodular relaxation constructed by the scheme above (we omit the derivation). Submodular vs. bisubmodular relaxations An important question is whether bisubmodular relaxations are more “powerful” compared to submodular ones. The next theorem gives a class of functions for which the answer is negative; its proof is given in [20]. Theorem 11. Let g be the submodular relaxation of a quadratic pseudo-boolean function f defined by (12), and assume that the set E does not have parallel edges. Then g dominates any other bisubmodular relaxation ¯g of f, i.e. g(u) ≥¯g(u) for all u ∈X −. For non-quadratic pseudo-boolean functions, however, the situation can be different. In [20]. we give an example of a function f of n = 4 variables which has a tight bisubmodular relaxation g (i.e. g has a minimizer in X ◦), but all submodular relaxations are not tight. Persistency Finally, we show that bisubmodular functions possess the autarky property, which implies persistency. Proposition 12. Let f : K1/2 →R be a bisubmodular function and x ∈K1/2 be its minimizer. [Autarky] Let y be a labeling in B. Consider labeling z = (y ⊔x) ⊔x. Then z ∈B and f(z) ≤f(y). [Persistency] Function f : B →R has a minimizer x∗∈B such that x∗ i = xi for nodes i ∈V with integral xi. Proof. It can be checked that zi = yi if xi = 1 2 and zi = xi if xi ∈{0, 1}. Thus, z ∈B. For any w ∈K1/2 there holds f(w ⊔x) ≤f(w) + [f(x) −f(w ⊓x)] ≤f(w). This implies that f((y ⊔x) ⊔x) ≤f(y). Applying the autarky property to a labeling y ∈arg min{f(x) | x ∈B } yields persistency. 5 Conclusions and future work We showed that bisubmodular functions can be viewed as a natural generalization of the roof duality approach to higher-order cliques. As mentioned in the introduction, this work has been motivated by computer vision applications that use functions of the form f(x) = P C fC(x). An important open question is how to construct bisubmodular relaxations ˆfC for individual terms. For terms of low order, e.g. with |C| = 3, this potentially could be done by solving a small linear program. Another important question is how to minimize such functions. Algorithms in [12, 26] are unlikely to be practical for most vision problems, which typically have tens of thousands of variables. However, in our case we need to minimize a bisubmodular function which has a special structure: it is represented as a sum of low-order bisubmodular terms. We recently showed [21] that a sum of low-order submodular terms can be optimized more efficiently using maxflow-like techniques. We conjecture that similar techniques can be developed for bisubmodular functions as well. References [1] Asem M. Ali, Aly A. Farag, and Georgy L. Gimel’Farb. Optimizing binary MRFs with higher order cliques. In ECCV, 2008. [2] Kazutoshi Ando, Satoru Fujishige, and Takeshi Naitoh. A characterization of bisubmodular functions. Discrete Mathematics, 148:299–303, 1996. [3] M. L. Balinski. Integer programming: Methods, uses, computation. Management Science, 12(3):253– 313, 1965. 8 [4] E. Boros and P. L. Hammer. Pseudo-boolean optimization. Discrete Applied Mathematics, 123(1-3):155 – 225, November 2002. [5] E. Boros, P. L. Hammer, and X. Sun. Network flows and minimization of quadratic pseudo-Boolean functions. Technical Report RRR 17-1991, RUTCOR, May 1991. [6] E. Boros, P. L. Hammer, and G. Tavares. Preprocessing of unconstrained quadratic binary optimization. Technical Report RRR 10-2006, RUTCOR, 2006. [7] A. Bouchet. Greedy algorithm and symmetric matroids. Math. Programming, 38:147–159, 1987. [8] A. Bouchet and W. H. Cunningham. Delta-matroids, jump systems and bisubmodular polyhedra. SIAM J. Discrete Math., 8:17–32, 1995. [9] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. PAMI, 23(11), November 2001. [10] R. Chandrasekaran and Santosh N. Kabadi. Pseudomatroids. Discrete Math., 71:205–217, 1988. [11] S Fujishige. Submodular Functions and Optimization. North-Holland, 1991. [12] Satoru Fujishige and Satoru Iwata. Bisubmodular function minimization. SIAM J. Discrete Math., 19(4):1065–1073, 2006. [13] P. L. Hammer, P. Hansen, and B. Simeone. Roof duality, complementation and persistency in quadratic 0-1 optimization. Mathematical Programming, 28:121–155, 1984. [14] D. Hochbaum. Instant recognition of half integrality and 2-approximations. In 3rd International Workshop on Approximation Algorithms for Combinatorial Optimization, 1998. [15] D. Hochbaum. Solving integer programs over monotone inequalities in three variables: A framework for half integrality and good approximations. European Journal of Operational Research, 140(2):291–321, 2002. [16] H. Ishikawa. Higher-order clique reduction in binary graph cut. In CVPR, 2009. [17] H. Ishikawa. Higher-order gradient descent by fusion-move graph cut. In ICCV, 2009. [18] Satoru Iwata and Kiyohito Nagano. Submodular function minimization under covering constraints. In FOCS, October 2009. [19] Santosh N. Kabadi and R. Chandrasekaran. On totally dual integral systems. Discrete Appl. Math., 26:87–104, 1990. [20] V. Kolmogorov. Generalized roof duality and bisubmodular functions. Technical Report arXiv:1005.2305v2, September 2010. [21] V. Kolmogorov. Minimizing a sum of submodular functions. Technical Report arXiv:1006.1990v1, June 2010. [22] V. Kolmogorov. Submodularity on a tree: Unifying L♮-convex and bisubmodular functions. Technical Report arXiv:1007.1229v2, July 2010. [23] Victor Lempitsky, Carsten Rother, and Andrew Blake. LogCut - efficient graph cut optimization for Markov random fields. In ICCV, 2007. [24] Victor Lempitsky, Carsten Rother, Stefan Roth, and Andrew Blake. Fusion moves for Markov random field optimization. PAMI, July 2009. [25] S. H. Lu and A. C. Williams. Roof duality for polynomial 0-1 optimization. Math. Programming, 37(3):357–360, 1987. [26] S. Thomas McCormick and Satoru Fujishige. Strongly polynomial and fully combinatorial algorithms for bisubmodular function minimization. Math. Program., Ser. A, 122:87–120, 2010. [27] M. Nakamura. A characterization of greedy sets: universal polymatroids (I). In Scientific Papers of the College of Arts and Sciences, volume 38(2), pages 155–167. The University of Tokyo, 1998. [28] G. L. Nemhauser and L. E. Trotter. Vertex packings: Structural properties and algorithms. Mathematical Programming, 8:232–248, 1975. [29] Liqun Qi. Directed submodularity, ditroids and directed submodular flows. Mathematical Programming, 42:579–599, 1988. [30] A. Raj, G. Singh, and R. Zabih. MRF’s for MRI’s: Bayesian reconstruction of MR images via graph cuts. In CVPR, 2006. [31] Stefan Roth and Michael J. Black. Fields of experts. IJCV, 82(2):205–229, 2009. [32] C. Rother, V. Kolmogorov, V. Lempitsky, and M. Szummer. Optimizing binary MRFs via extended roof duality. In CVPR, June 2007. [33] O. Woodford, P. Torr, I. Reid, and A. Fitzgibbon. Global stereo reconstruction under second order smoothness priors. In CVPR, 2008. 9
2010
20
3,966
Factorized Latent Spaces with Structured Sparsity Yangqing Jia1, Mathieu Salzmann1,2, and Trevor Darrell1 1UC Berkeley EECS and ICSI 2TTI-Chicago {jiayq,trevor}@eecs.berkeley.edu, salzmann@ttic.edu Abstract Recent approaches to multi-view learning have shown that factorizing the information into parts that are shared across all views and parts that are private to each view could effectively account for the dependencies and independencies between the different input modalities. Unfortunately, these approaches involve minimizing non-convex objective functions. In this paper, we propose an approach to learning such factorized representations inspired by sparse coding techniques. In particular, we show that structured sparsity allows us to address the multiview learning problem by alternately solving two convex optimization problems. Furthermore, the resulting factorized latent spaces generalize over existing approaches in that they allow having latent dimensions shared between any subset of the views instead of between all the views only. We show that our approach outperforms state-of-the-art methods on the task of human pose estimation. 1 Introduction Many computer vision problems inherently involve data that is represented by multiple modalities such as different types of image features, or images and surrounding text. Exploiting these multiple sources of information has proven beneficial for many computer vision tasks. Given these multiple views, an important problem therefore is that of learning a latent representation of the data that best leverages the information contained in each input view. Several approaches to addressing this problem have been proposed in the recent years. Multiple kernel learning [2, 24] methods have proven successful under the assumption that the views are independent. In contrast, techniques that learn a latent space shared across the views (Fig. 1(a)), such as Canonical Correlation Analysis (CCA) [12, 3], the shared Kernel Information Embedding model (sKIE) [23], and the shared Gaussian Process Latent Variable Model (shared GPLVM) [21, 6, 15], have shown particularly effective to model the dependencies between the modalities. However, they do not account for the independent parts of the views, and therefore either totally fail to represent them, or mix them with the information shared by all views. To generalize over the above-mentioned approaches, methods have been proposed to explicitly account for the dependencies and independencies of the different input modalities. To this end, these methods factorize the latent space into a shared part common to all views and a private part for each modality (Fig. 1(b)). This has been shown for linear mappings [1, 11], as well as for non-linear ones [7, 14, 20]. In particular, [20] proposed to encourage the shared-private factorization to be nonredundant while simultaneously discovering the dimensionality of the latent space. The resulting FOLS models were shown to yield more accurate results in the context of human pose estimation. This, however, came at the price of solving a complicated, non-convex optimization problem. FOLS also lacks an efficient inference method, and extension from two views to multiple views is not straightforward since the number of shared/latent spaces that need to be explicitly modeled grows exponentially with the number of views. In this paper, we propose a novel approach to finding a latent space in which the information is correctly factorized into shared and private parts, while avoiding the computational burden of previous techniques [14, 20]. Furthermore, our formulation has the advantage over existing shared-private factorizations of allowing shared information between any subset of the views, instead of only be1 Z X(1) X(2) (a) X(1) X(2) Zs Z1 Z2 (b) X(1) X(2) D(1) α D(2) (c) X(1) X(2) αΠs αΠ1 αΠ2 D(2) Π2 D(2) Πs D(1) Πs D(1) Π1 (d) Figure 1: Graphical models for the two-view case of (a) shared latent space models [23, 21, 6, 15], (b) shared-private factorizations [7, 14, 20], (c) the global view of our model, where the sharedprivate factorization is automatically learned instead of explicitly separated, and (d) an equivalent shared-private spaces interpretation of our model. Due to structured sparsity, rows Πs of α are shared across the views, whereas rows Π1 and Π2 are private to view 1 and 2, respectively. tween all views. In particular, we represent each view as a linear combination of view-dependent dictionary entries. While the dictionaries are specific to each view, the weights of these dictionaries act as latent variables and are the same for all the views. Thus, as shown in Fig. 1(c), the data is embedded in a latent space that generates all the views. By exploiting the idea of structured sparsity [26, 18, 4, 17, 9], we encourage each view to only use a subset of the latent variables, and at the same time encourage the whole latent space to be low-dimensional. As a consequence, and as depicted in Fig. 1(d), the latent space is factorized into shared parts which represent information common to multiple views, and private parts which model the remaining information of the individual views. Training the model can be done by alternately solving two convex optimization problems, and inference by solving a convex problem. We demonstrate the effectiveness of our approach on the problem of human pose estimation where the existence of shared and private spaces has been shown [7]. We show that our approach correctly factorizes the latent space and outperforms state-of-the-art techniques. 2 Learning a Latent Space with Structured Sparsity In this section, we first formulate the problem of learning a latent space for multi-view modeling. We then briefly review the concepts of sparse coding and structured sparsity, and finally introduce our approach within this framework. 2.1 Problem Statement and Notations Let X = {X(1), X(2), · · · , X(V )} be a set of N observations obtained from V views, where X(v) ∈ ℜPv×N contains the feature vectors for the vth view. We aim to find an embedding α ∈ℜNd×N of the data into an Nd-dimensional latent space and a set of dictionaries D = {D(1), D(2), · · · , D(V )}, with D(v) ∈ℜPv×Nd the dictionary entries for view v, such that X(v) is generated by D(v)α, as depicted in Fig. 1(c). More specifically, we seek the latent embedding α and the dictionaries that best reconstruct the data in the least square sense by solving the optimization problem min D,α V X v=1 ∥X(v) −D(v)α∥2 Fro . (1) Furthermore, as explained in Section 1, we aim to find a latent space that naturally separates the information shared among several views from the information private to each view. Our approach to addressing this problem is inspired by structured sparsity, which we briefly review below. Throughout this paper, given a matrix A, we will use the term Ai to denote its ith column vector, Ai,· to denote its ith row vector, and A·,Ω(AΩ,·) to denote the submatrix formed by taking a subset of its columns (rows), where the set Ωcontains the indices of the chosen columns (rows). 2.2 Sparse Coding and Structured Sparsity In the single-view case, sparse coding techniques [16, 25, 13] have been proposed to represent the observed data (e.g., image features) as a linear combination of dictionary entries, while encouraging each observation vector to only employ a subset of all the available dictionary entries. More 2 formally, let X ∈ℜP ×N be the matrix of training examples. Sparse coding aims to find a set of dictionary entries D ∈ℜP ×Nd and the corresponding linear combination weights α ∈ℜNd×N by solving the optimization problem min D,α 1 N ||X −Dα||2 Fro + λφ(α) (2) s.t. ||Di|| ≤1 , 1 ≤i ≤Nd , where φ is a regularizer that encourages sparsity of its input, and λ is the weight that sets the relative influence of both terms. In practice, when φ is a convex function, problem (2) is convex in D for a fixed α and vice-versa. Typically, the L1 norm is used to encourage sparsity, which yields φ(α) = N X j=1 ∥αj∥1 = N X j=1 Nd X i=1 |αi,j| . (3) While sparse coding has proven effective in many domains, it fails to account for any structure in the observed data. For instance, in classification tasks, one would expect the observations belonging to the same class to depend on the same subset of dictionary entries. This problem has been addressed by structured sparse coding techniques [26, 4, 9], which encode the structure of the problem in the regularizer. Typically, these methods rely on the notion of groups among the training examples to encourage members of the same group to rely on the same dictionary entries. This can simply be done by re-writing problem (2) as min D,α 1 N ||X −Dα||2 Fro + λ Ng X g=1 ψ(α·,Ωg) (4) s.t. ||Di|| ≤1 , 1 ≤i ≤Nd , where Ng is the total number of groups, Ωg represents the indices of the examples that belong to group g, and α·,Ωg is the matrix containing the weights associated to these examples. To keep the problem convex in α, ψ is usually taken either as the L1,2 norm, or as the L1,∞norm, which yield ψ(α·,Ωg) = Nd X i=1 ||αi,Ωg||2 , or ψ(α·,Ωg) = Nd X i=1 ||αi,Ωg||∞= Nd X i=1 max k∈Ωg |αi,k| . (5) In general, structured sparsity can lead to more meaningful latent embeddings than sparse coding. For example, [4] showed that the dictionary learned by grouping local image descriptors into images or classes achieved better accuracy than sparse coding for small dictionary sizes. 2.3 Multi-view Learning with Structured Sparsity While the previous framework has proven successful for many tasks, it has only been applied to the single-view case. Here, we propose an approach to multi-view learning inspired by structured sparse coding techniques. To correctly account for the dependencies and independencies of the views, we cast the problem as that of finding a factorization of the latent space into subspaces that are shared across several views and subspaces that are private to the individual views. In essence, this can be seen as having each view exploiting only a subset of the dimensions of the global latent space, as depicted by Fig. 1(d). Note that this definition is in fact more general than the usual definition of shared-private factorizations [7, 14, 20], since it allows latent dimensions to be shared across any subset of the views rather than across all views only. More formally, to find a shared-private factorization of the latent embedding α that represents the multiple input modalities, we adopt the idea of structured sparsity and aim to find a set of dictionaries D = {D(1), D(2), · · · , D(V )}, each of which uses only a subspace of the latent space. This can be achieved by re-formulating problem (1) as min D,α 1 N V X v=1 ∥X(v) −D(v)α∥2 Fro + λ V X v=1 ψ((D(v))T ) (6) s.t. ||α·,i|| ≤1 , 1 ≤i ≤Nd . 3 where the regularizer ψ((D(v))T ) can be defined using the L1,2 or L1,∞norm. In practice, we chose the L1,∞norm regularizer which has proven more effective than the L1,2 [18, 17]. Note that, here, we enforce structured sparsity on the dictionary entries instead of on the weights α. Furthermore, note that this sparsity encourages the columns of the individual D(v) to be zeroed-out instead of the rows in the usual formulation. The intuition behind this is that we expect each view X(v) to only depend on a subset of the latent dimensions. Since X(v) is generated by D(v)α, having zero-valued columns of D(v) removes the influence of the corresponding latent dimensions on the reconstruction. While the formulation in Eq. 6 encourages each view to only use a limited number of latent dimensions, it doesn’t guarantee that parts of the latent space will be shared across the views. With a sufficiently large number Nd of dictionary entries, the same information can be represented in several parts of the dictionary. This issue is directly related to the standard problem of finding the correct dictionary size. A simple approach would be to manually choose the dimension of the latent space, but this introduces an additional hyperparameter to tune. Instead, we propose to address this issue by trying to find the smallest size of dictionary that still allows us to reconstruct the data well. In spirit, the motivation is similar to [8, 20] that use a relaxation of rank constraints to discover the dimensionality of the latent space. Here, we further exploit structured sparsity and re-write problem (6) as min D,α 1 N V X v=1 ∥X(v) −D(v)α∥2 Fro + λ V X v=1 ψ((D(v))T ) + γψ(α) , (7) where we replaced the constraints on α by an L1,∞norm regularizer that encourages rows of α to be zeroed-out. This lets us automatically discover the dimensonality of the latent space α. Furthermore, if there is shared information between several views, this regularizer will favor representing it in a single latent dimension, instead of having redundant parts of the latent space. The optimization problem (7) is convex in D for a fixed α and vice versa. Thus, in practice, we alternate between optimizing D with a fixed α and the opposite. Furthermore, to speed up the process, after each iteration, we remove the latent dimensions whose norm is less than a pre-defined threshold. Note that efficient optimization techniques for the L1,∞norm have been proposed in the literature [17], enabling efficient optimization algorithms for the problem. 2.4 Inference At inference, given a new observation {x(1) ∗, · · · , x(V ) ∗ }, the corresponding latent embedding α∗can be obtained by solving the convex problem min α∗ V X v=1 ∥x(v) ∗ −D(v)α∗∥2 2 + γ∥α∗∥1 , (8) where the regularizer lets us deal with noise in the observations. Another advantage of our model is that it easily allows us to address the case where only a subset of the views are observed at test time. This scenario arises, for example, in human pose estimation, where view X(1) corresponds to image features and view X(2) contains the 3D poses. At inference, the goal is to estimate the pose x(2) ∗ given new image features x(1) ∗. To this end, we seek to estimate the latent variables α∗, as well as the unknown views from the available views. This is equivalent to first solving the convex problem min α∗ X v∈Va ∥x(v) ∗ −D(v)α∗∥2 2 + γ∥α∗∥1 , (9) where Va is the set of indices of available views. The remaining unobserved views x(v) ∗ , v /∈Va are then estimated as x(v) ∗ = D(v)α∗. 3 Related Work While our method is closely related to the shared-private factorization algorithms which we discussed in Section 1, it was inspired by the existing sparse coding literature and therefore is also 4 Method ψ(D) φ(α) CD or Cα PCA none none {D|DT D = I} SC (e.g. [25]) none ∥αT ∥1,1 {D|∥Di∥2 ≤1 ∀i ≤Nd} Group SC [4] ∥DT ∥1,2 P Ωg ∥α·,Ωg∥1,2 none SSPCA [9] P Ωg ∥D·,Ωg∥ξ,2 † none {α|∥αi,·∥2 ≤1 ∀i ≤Nd} Group Lasso [26] none P Ωg ∥(αΩg,·)T ∥1,2 {D|DT D = I} Our Method P Ωg ∥(DΩg,·)T ∥1,∞ ∥α∥1,∞ none † Here ξ denotes the vector lα/l1 quasi-norm. See [9] for details. Table 1: Properties of the different algorithms that can be viewed as special cases of RMF. related to it. In this section, we first show that many existing techniques can be considered as special cases of a general regularized matrix factorization (RMF) framework, and then discuss the relationships and differences between our method and the existing ones. In general, the RMF problem can be defined as that of factorizing a P ×N matrix X into the product of a P × M matrix D and an M × N matrix α so that the residual error is minimized. Furthermore, RMF exploits structured or unstructured regularizers to constrain the forms of D and α. This can be expressed as the optimization problem min D,α 1 N ∥X −Dα∥2 Fro + λψ(D) + γφ(α) (10) s.t. D ∈CD , α ∈Cα , where CD and Cα are the domains of the dictionary D and of latent embedding α, respectively. These domains allow to enforce additional constraints on those matrices. Several existing algorithms, such as PCA, sparse coding (SC), group SC, structured sparse PCA (SSPCA) and group Lasso, can be considered as special cases of this general framework. Table 1 lists the regularization terms and constraints used by these different algorithms. Algorithms relying on structured sparsity exploit different types of matrix norm1 to impose sparsity and different ways of grouping the rows or columns of D and α using algorithm-specific knowledge. Group sparse coding [4] relies on supervised information such as class labels to define the groups, while in our case, we exploit the natural separation provided by the multiple views. As a result, while group sparse coding finds dictionary entries that encode class-related information, our method finds latent spaces factorized into subspaces shared among different views and subspaces private to the individual views. Furthermore, while structured sparsity is typically enforced on α, our method employs it on the dictionary. This also is the case of [9] in their SSPCA algorithm. However, while in our approach the groups are taken as subsets of the rows of D, their method follows the more usual approach of defining the groups as subsets of its columns. Their intuition for doing so was to encourage dictionary entries to represent the variability of parts of the observation space, such as the variability of the eyes in the context of face images. Finally, it is worth noting that imposing structured sparsity regularization on both D and α naturally yields a multi-view, multi-class latent space learning algorithm that can be deemed as a generalization of several algorithms summarized here. 4 Experimental Evaluation In this section, we show the results of our approach on learning factorized latent spaces from multiview inputs. We compare our results against those obtained with state-of-the-art techniques on the task of human pose estimation. 4.1 Toy Example First, we evaluated our approach on the same toy case used by [20]. This shows our method’s ability to correctly factorize a latent space into shared and private parts. This toy example consists of two 1In our paper, we define the Lp,q norm of a matrix A to be the p-norm of the vector containing of the q-norms of the matrix rows, i.e., ∥A∥p,q = (∥A1,·∥q, ∥A2,·∥q, · · · , ∥An,·∥q) p. 5 −1 0 1 Shared −1 0 1 Private1 −1 0 1 Shared −1 0 1 Private2 −0.02 0 0.02 Correlated Noise −0.5 0 0.5 X(1) −0.5 0 0.5 X(2) (a) Generative Signal (View 1) (b) Generative Signal (View 2) (c) Observations −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 Dictionary for View 1 1 2 3 5 10 15 20 Dictionary for View 2 1 2 3 5 10 15 20 (d) CCA (e) Our Method (f) Dictionaries Figure 2: Latent spaces recovered on a toy example. (a,b) Generative signals for the two views. (c) Correlated noise and the two 20D input views. (d) First 3 dimensions recovered by CCA. (e) 3-dimensional latent space recovered with our method. Note that, as opposed to CCA, our approach correctly recovered the generative signals and discarded the noise. (f) Dictionaries learned by our algorithm for each view. Fully white columns correspond to zero-valued vectors; note that the dictionary for each view uses only the shared dimension and its own private dimension. views generated from one shared signal and one private signal per view depicted by Fig. 2(a,b). In particular, we used sinusoidal signals at different frequencies such that α(1) = [sin(2πt); cos(π2t))], α(2) = [sin(2πt); cos( √ 5πt))] , (11) where t was sampled from a uniform distribution in the interval (−1, 1). This yields a 3-dimensional ground-truth latent space, with 1 shared dimension and 2 private dimensions. The observations X(v) were generated by randomly projecting the α(v) into 20-dimensional spaces and adding Gaussian noise with variance 0.01. Finally, we added noise of the form ynoise = 0.02 sin(3.6πt) to both views to simulate highly correlated noise. The input views are depicted in Fig. 2(c) To initialize our method, we first applied PCA separately on both views, as well as on the concatenation of the views, and in each case, kept the components representing 95% of the variance. We took α as the concatenation of the corresponding weights. Note that the fact that this latent space is redundant is dealt with by our regularization on α. We then alternately optimized D and α, and let the algorithm determine the optimal latent dimensionality. Fig. 2(e,f) depicts the reconstructed latent spaces for both views, as well as the learned dictionaries, which clearly show the shared-private factorization. In Fig. 2(d), we show the results obtained with CCA. Note that our approach correctly discovered the original generative signals and discarded the noise, whereas CCA recovered the shared signal, but also the correlated noise and an additional noise. This confirms that our approach is well-suited to learn shared-private factorizations, and shows that CCA-based approaches [1, 11] tend to be sensitive to noise. 4.2 Human Pose Estimation We then applied our method to the problem of human pose estimation, in which the task is to recover 3D poses from 2D image features. It has been shown that this problem is ambiguous, and that sharedprivate factorizations helped accounting for these ambiguities. Here, we used the HumanEva dataset [22] which consists of synchronized images and motion capture data describing the 3D locations of the 19 joints of a human skeleton. These two types of observations can be seen as two views of the same problem from which we can learn a latent space. In our experiments, we compare our results with those of several regression methods that directly learn a mapping from image features to 3D poses. In particular, we used linear regression (LinReg), Gaussian Process regression with a linear kernel (GP-lin) and with an RBF kernel (GP-rbf), and nearest-neighbor in the feature space (NN). We also compare our results with those obtained with the FOLS-GPLVM [20], which also proposes a shared-private factorization of the latent space. Note that we did not compare against other shared-private factorizations [7, 14], or purely shared 6 Data Lin-Reg GP-lin GP-rbf NN FOLS Our Method Jogging 1.420 1.429 1.396 1.436 1.461 0.954 Walking 2.167 2.363 2.330 2.175 2.137 1.322 Table 2: Mean squared errors between the ground truth and the reconstructions obtained by different methods. Image Features 2 4 6 8 10 5 10 15 3D Pose 2 4 6 8 10 10 20 30 40 50 Image Features 2 4 6 8 10 12 14 5 10 15 3D Pose 2 4 6 8 10 12 14 10 20 30 40 50 (a) jogging (b) walking PHOG 5 10 15 20 20 40 RT 5 10 15 20 20 40 60 3D Pose 5 10 15 20 10 20 30 40 50 (c) walking with multiple features Figure 3: Dictionaries learned from the HumanEva data. Each column corresponds to a dictionary entry. (a) and (b) show the 2-view case, and (c) shows a three-view case. Note that in (c) our model found latent dimensions shared among all views, but also shared between the image features only. models [21, 6, 15, 23], since they were shown to be outperformed by the FOLS-GPLVM [20] for human pose estimation. To initialize the latent spaces for our model and for the FOLS-GPLVM, we proceeded similarly as for the toy example; We applied PCA on both views separately, as well as on the concatenated views, and retained the components representing 95% of the variance. In our case, we set α to be the concatenation of the corresponding PCA weights. For the FOLS-GPLVM, we initialized the shared latent space with the coefficients of the joint PCA, and the private spaces with those of the individual PCAs. We performed cross validation on the jogging data, and the optimal setting λ = 0.01 and γ = 0.1 was then fixed for all experiments. At inference for human pose estimation, only one of the views (i.e., the images) is available. As shown in Section 2.4, our model provides a natural way to deal with this case by computing the latent variables from the image features first, and then recovering the 3D coordinates using the learned dictionary. For the FOLS-GPLVM, we followed the same strategy as in [20]; we computed the nearest-neighbor among the training examples in image feature space and took the corresponding shared and private latent variables that we mapped to the pose. No special care was required for the other baselines, since they explicitly take the images as inputs and the poses as outputs. As a first case, we used hierarchical features [10] computed on the walking and jogging video sequences of the first subject seen from a single camera. As the subject moves in circles, we used the first loop to train our model, and the remaining ones for testing. Table 2 summarizes the mean squared reconstruction error for all the methods. Note that our approach yields a smaller error than the other methods. In Fig. 3(a,b), we show the factorization of the latent space obtained by our approach by displaying the learned dictionaries 2. For the jogging case our algorithm automatically found a low-dimensional latent space of 10 dimensions, with a 4D private space for the image features, a 4D shared space, and a 2D private space for the 3D pose3. For the walking case, the 2Note that the latent space per se is a dense, low-dimensional space, and whether a dimension is private or shared among multiple views is determined by the corresponding dictionary entries. 3A latent dimension is considered private if the norm of the corresponding dictionary entry in the other view is smaller than 10% of the average norm of the dictionary entries for that view. 7 Feature Lin-Reg GP-lin GP-rbf NN FOLS Our Method λ = 0 γ = 0 PHOG 1.190 1.167 0.839 1.279 1.277 0.778 2.886 0.863 RT 1.345 1.272 0.827 1.067 1.068 1.141 3.962 1.235 PHOG+RT 1.159 1.042 0.727 1.090 1.015 0.769 1.306 0.794 Table 3: Mean squared errors for different choices of image features. The last two columns show the result of our method while forcing one regularization term to be zero. See text for details. 0 20 40 60 80 100 1 1.5 2 2.5 3 3.5 Mean Squared Error with PHOG Features number of training data MSE Our Method GP−lin GP−rbf nn FOLS (a) PHOG 0 20 40 60 80 100 1 1.5 2 2.5 3 3.5 4 4.5 5 Mean Squared Error with RT Features number of training data MSE Our Method GP−lin GP−rbf nn FOLS (b) RT 0 20 40 60 80 100 1 1.5 2 2.5 3 3.5 4 Mean Squared Error with both Features number of training data MSE Our Method GP−lin GP−rbf nn FOLS (c) PHOG+RT Figure 4: Mean squared error as a function of the number of training examples using PHOG features only, RT features only, or both feature types simultaneously. private space for the image features was found to be higher-dimensional. This can partially explain why the other methods did not perform as well as in the jogging case. Next, we evaluated the performance of the same algorithms for different image features. In particular, we used randomized tree (RT) features generated by [19], and PHOG features [5]. For this case, we only considered the walking sequence and similarly trained the different methods using the first cycle and tested on the rest of the sequence. The top two rows of Table 3 show the results of the different approaches for the individual features. Note that, with the RT features that were designed to eliminate the ambiguities in pose estimation, GP regression with an RBF kernel performs slightly better than us. However, this result is outperformed by our model with PHOG features. To show the ability of our method to model more than two views, we learned a latent space by simultaneously using RT features, PHOG features and 3D poses. The last row of Table 3 shows the corresponding reconstruction errors. In this case, we used the concatenated features as input to Lin-Reg, GP-lin and NN. For GP-rbf, we relied on kernel combination to predict the pose from multiple features. For the FOLS model, we applied the following inference strategy. We computed the NN in feature space for both features individually and took the mean of the corresponding shared latent variables. We then obtained the private part by computing the NN in shared space and taking the corresponding private variables. Note that this proved more accurate than using NN on a single view, or on the concatenated views. Also, notice in Table 3 that the performance drops when structured sparsity is only imposed on either D’s or α, showing the advantage of our model over simple structured sparsity approaches. Fig. 3(c) depicts the dictionary found by our method. Note that our approach allowed us to find latent dimensions shared among all views, as well as shared among the image features only. Finally, we studied the influence of the number of training examples on the performance of the different approaches. To this end, we varied the training set size from 5 to 100, and, for each size, randomly sampled 10 different training sets on the first walking cycle. In all cases, we kept the same test set as before. Fig. 4 shows the mean squared errors averaged over the 10 different sets as a function of the number of training examples. Note that, with small training sets, our method yields more accurate results than the baselines. 5 Conclusion In this paper, we have proposed an approach to learning a latent space factorized into dimensions shared across subsets of the views and dimensions private to each individual view. To this end, we have proposed to exploit the notion of structured sparsity, and have shown that multi-view learning could be addressed by alternately solving two convex optimization problems. We have demonstrated the effectiveness of our approach on the task of estimating 3D human pose from image features. In the future, we intend to study the use of our model to other tasks, such as classification. To this end, we would extend our approach to incorporating an additional group sparsity regularizer on the latent variables to encode class membership. 8 References [1] C. Archambeau and F. Bach. Sparse probabilistic projections. In Neural Information Processing Systems, 2008. [2] F. Bach, G. Lanckriet, and M. Jordan. Multiple kernel learning, conic duality, and the SMO algorithm. In International Conference on Machine learning. ACM New York, NY, USA, 2004. [3] F. R. Bach and M. I. Jordan. A probabilistic interpretation of canonical correlation analysis. Technical Report 688, Department of Statistics, University of California, Berkeley, 2005. [4] S. Bengio, F. Pereira, Y. Singer, and D. Strelow. Group sparse coding. Neural Information Processing Systems, 2009. [5] A. Bosch, A. Zisserman, and X. Munoz. Image classification using random forests and ferns. In International Conference on Computer Vision, 2007. [6] C. H. Ek, P. Torr, and N. Lawrence. Gaussian process latent variable models for human pose estimation. In Joint Workshop on Machine Learning and Multimodal Interaction, 2007. [7] C. H. Ek, P. Torr, and N. Lawrence. Ambiguity modeling in latent spaces. In Joint Workshop on Machine Learning and Multimodal Interaction, 2008. [8] A. Geiger, R. Urtasun, and T. Darrell. Rank priors for continuous non-linear dimensionality reduction. In Conference on Computer Vision and Pattern Recognition, 2009. [9] R. Jenatton, G. Obozinski, and F. Bach. Structured sparse principal component analysis. In International Conference on Artificial Intelligence and Statistics, Sardinia, Italy, May 2010. [10] A. Kanaujia, C. Sminchisescu, and D. N. Metaxas. Semi-supervised hierarchical models for 3d human pose reconstruction. In Conference on Computer Vision and Pattern Recognition, 2007. [11] A. Klami and S. Kaski. Probabilistic approach to detecting dependencies between data sets. Neurocomputing, 72:39–46, 2008. [12] M. Kuss and T. Graepel. The geometry of kernel canonical correlation analysis. Technical Report TR-108, Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany, 2003. [13] H. Lee, A. Battle, R. Raina, and A. Y. Ng. Efficient sparse coding algorithms. In Neural Information Processing Systems, 2006. [14] G. Leen. Context assisted information extraction. PhD thesis, University the of West of Scotland, University of the West of Scotland, High Street, Paisley PA1 2BE, Scotland, 2008. [15] R. Navaratnam, A. Fitzgibbon, and R. Cipolla. The Joint Manifold Model for Semi-supervised Multivalued Regression. In International Conference on Computer Vision, Rio, Brazil, October 2007. [16] B. Olshausen and D. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381:607–609, 1996. [17] A. Quattoni, X. Carreras, M. Collins, and T. Darrell. An efficient projection for l1,infinity regularization. In International Conference on Machine Learning, 2009. [18] A. Quattoni, M. Collins, and T. Darrell. Transfer learning for image classification with sparse prototype representations. In Conference on Computer Vision and Pattern Recognition, 2008. [19] G. Rogez, J. Rihan, S. Ramalingam, C. Orrite, and P. Torr. Randomized Trees for Human Pose Detection. In Conference on Computer Vision and Pattern Recognition, 2008. [20] M. Salzmann, C.-H. Ek, R. Urtasun, and T. Darrell. Factorized orthogonal latent spaces. In International Conference on Artificial Intelligence and Statistics, Sardinia, Italy, May 2010. [21] A. P. Shon, K. Grochow, A. Hertzmann, and R. P. N. Rao. Learning shared latent structure for image synthesis and robotic imitation. In Neural Information Processing Systems, pages 1233–1240, 2006. [22] L. Sigal and M. J. Black. Humaneva: Synchronized video and motion capture dataset for evaluation of articulated human motion. Technical Report CS-06-08, Brown University, 2006. [23] L. Sigal, R. Memisevic, and D. J. Fleet. Shared kernel information embedding for discriminative inference. In Conference on Computer Vision and Pattern Recognition, 2009. [24] S. Sonnenburg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large scale multiple kernel learning. The Journal of Machine Learning Research, 7:1531–1565, 2006. [25] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1996. [26] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B, 68:49–67, 2006. 9
2010
200
3,967
A unified model of short-range and long-range motion perception Shuang Wu Department of Statistics UCLA Los Angeles , CA 90095 shuangw@stat.ucla.edu Xuming He Department of Statistics UCLA Los Angeles , CA 90095 hexm@stat.ucla.edu Hongjing Lu Department of Psychology UCLA Los Angeles , CA 90095 hongjing@ucla.edu Alan Yuille Department of Statistics, Psychology, and Computer Science UCLA Los Angeles , CA 90095 yuille@stat.ucla.edu Abstract The human vision system is able to effortlessly perceive both short-range and long-range motion patterns in complex dynamic scenes. Previous work has assumed that two different mechanisms are involved in processing these two types of motion. In this paper, we propose a hierarchical model as a unified framework for modeling both short-range and long-range motion perception. Our model consists of two key components: a data likelihood that proposes multiple motion hypotheses using nonlinear matching, and a hierarchical prior that imposes slowness and spatial smoothness constraints on the motion field at multiple scales. We tested our model on two types of stimuli, random dot kinematograms and multiple-aperture stimuli, both commonly used in human vision research. We demonstrate that the hierarchical model adequately accounts for human performance in psychophysical experiments. 1 Introduction We encounter complex dynamic scenes in everyday life. As illustrated by the motion sequence depicted in Figure 1, humans readily perceive the baseball player’s body movements and the fastermoving baseball simultaneously. However, from the computational perspective, this is not a trivial problem to solve. The difficulty is due to the large speed difference between the two objects, i.e, the displacement of the player’s body is much smaller than the displacement of the baseball between the two frames. Separate motion systems have been proposed to explain human perception in scenarios like this example. In particular, Braddick [1] proposed that there is a short-range motion system which is responsible for perceiving movements with relatively small displacements (e.g., the player’s movement), and a long-range motion system which perceives motion with large displacements (e.g., the flying baseball), which is sometimes called apparent motion. Lu and Sperling [2] have further argued for the existence of three motion systems in human vision. The first and secondorder systems conduct motion analysis on luminance and texture information respectively, while the third-order system uses a feature-tracking strategy. In the baseball example, the first-order motion system would be used to perceive the player’s movements, but the third-order system would be required for perceiving the faster motion of the baseball. Short-range motion and first-order motion appear to apply to the same class of phenomena, and can be modeled using computational theories that are based on motion energy or related techniques. However, long-range motion and third-order 1 Figure 1: Left panel: Short-range and long-range motion: two frames from a baseball sequence where the ball moves with much faster speed than the other objects. Right panel: A graphical illustration of our hierarchical model in one dimension. Each node represents motion at different location and scales. A child node can have multiple parents, and the prior constraints on motion are expressed by parent-child interactions. motion employ qualitatively different computational strategies involving tracking features over time, which may require attention-driven processes. In contrast to these previous multi-system theories [2, 3], we develop a unified single-system framework to account for these phenomena of human motion perception. We model motion estimation as an inference problem which uses flexible prior assumptions about motion flows and statistical models for quantifying the uncertainty in motion measurement. Our model differs from the traditional approaches in two aspects. First, the prior model is defined over a hierarchical graph, see Figure 1, where the nodes of the graph represent the motion at different scales. This hierarchical structure is motivated by the human visual system that is organized hierarchically [8, 9, 4]. Such a representation makes it possible to define motion priors and contextual effects at a range of different scales, and so differs from other models of motion perception based on motion priors [5, 6]. This model connects lower level nodes to multiple coarser-level nodes, resulting in a loopy graph structure, which imposes a more flexible prior than tree-structured models (eg. [7]). We define a probability distribution on this graph using potentials defined over the graph cliques to capture spatial smoothness constraints [10] at different scales and slowness constraints [5, 11, 12, 13]. Second, our data likelihood terms allow a large space of possible motions, which include both short-range and long-range motion. Locally, the motion is often highly ambiguous (e.g., the likelihood term allows many possible motions) which is resolved in our model by imposing the hierarchical motion prior. Note that we do not coarsen the image and do not rely on coarse-to-fine processing [14]. Instead we use a bottom-up compositional/hierarchical approach where local hypotheses about the motion are combined to form hypotheses for larger regions of the image. This enables us to deal simultaneously with both long-range and short-range motion. We tested our model using two types of stimuli commonly used in human vision research. The first stimulus type are random dot kinematograms (RDKs), where some of the dots (the signal) move coherently with large displacements, whereas other dots (the noise) move randomly. RDKs are one of the most important stimuli used in both physiological and psychophysical studies of motion perception. For example, electrophysiological studies have used RDKs to analyze the neuronal basis of motion perception, identifying a functional link between the activity of motion-selective neurons and behavioral judgments of motion perception [15]. Psychophysical studies have used RDKs to measure the sensitivity of the human visual system for perceiving coherent motion, and also to infer how motion information is integrated to perceive global motion under different viewing conditions [16]. We used two-frame RDKs as an example of a long-range motion stimulus. The second stimulus type are moving gratings or plaids. These stimuli have been used to study many perceptual phenomena. For example, when randomly orientated lines or grating elements drift behind apertures, the perceived direction of motion is heavily biased by the orientation of the lines/gratings, as well as by the shape and contrast of the apertures [17, 18, 19]. Multiple-aperture stimuli have also recently been used to study coherent motion perception with short-range motion stimulus [20, 21]. For both types of stimuli we compared the model predictions with human performance across various experimental conditions. 2 2 Hierarchical Model for Motion Estimation Our hierarchical model represents a motion field using a graph G = (V, E), which has L + 1 hierarchical levels, i.e., V = ν0 ∪...∪νl ∪...∪νL. The level l has a set of nodes νl = {νl(i, j), i = 1 . . . , Ml, j = 1 . . . , Nl}, forming a 2D lattice indexed by (i, j). More specifically, we start from the pixel lattice and construct the hierarchy as follows. The nodes {ν0(i, j)} at the 0th level correspond to the pixel position {x|x = (i, j)} of the image lattice. We recursively add higher levels with nodes νl (l = 1, ..., L). The level l lattice decreases by a factor of 2 along each coordinate direction from level l −1. The edges E of the graph connect nodes at each level of the hierarchy to nodes in the neighboring levels. Specifically, edges connect node νl(i, j) at level l to a set of child nodes Chl(i, j) = {νl−1(i′, j′)} at level l −1 satisfying 2i−d ≤i′ ≤2i+d, 2j −d ≤j′ ≤2j +d. Here d is a parameter controlling how many neighboring nodes in a level share child nodes. Figure 1 illustrates the graph structure of this hierarchical model in the 1-D case and with d = 2. Note that our graph G contains closed loops due to sharing of child nodes. To apply the model to motion estimation, we define state variable ul(i, j) at each node to represent the motion, and connect the 0th level nodes to two consecutive image frames, D = (It(x), It+1(x)). The problem of motion estimation is to estimate the 2D motion field u(x) at time t for every pixel site x from input D. For simplicity, we use ul i to denote the motion instead of ul(i, j) in the following sections. 2.1 Model formulation We define a probability distribution over the motion field U = {ul i}L l=0 and ul = {ul i}on the graph G conditioned on the input image pair D: P(U|D) = 1 Z exp − " Ed(D, u0) + L−1 X l=0 El u(ul, ul+1) #! (1) where Ed is the data term for the motion based on local image cues and El u are hierarchical priors on the motion which impose slow and smoothness constraints at different levels. Energy terms Ed, {El u} are defined using L1 norms to encourage robustness [22]. This robust norm helps deal with the measurement noise that often occur at motion boundary and to prevent over-smoothing at the higher levels. The details of two energy function terms are described as follows: 1) The Data Term Ed The data energy term is defined only at the bottom level of the hierarchy. It is specified in terms of the L1 norm between local image intensity values from adjacent frames. More precisely: Ed(D, u0) = X i ||It(xi) −It+1(xi + u0 i )||L1 + α||u0 i ||L1  (2) where the first term defines a difference measure between two measurements centered at xi in It and centered at xi + u0 i in It+1 respectively. We choose to use pixel values only here. The second term imposes a slowness prior on the motion which is weighted by the coefficient α. Note that the first term is a matching term that computes the similarity between It(x) and It+1(x + u) given any displacement u. These similarity scores at x gives confidence for different local motion hypotheses: higher similarity means the motion is more likely while lower means it is less likely. 2) The Hierarchical Prior {El u} We define a hierarchical prior on the slowness and spatial smoothness of motion fields. The first term of this prior is expressed by energy terms between nodes at different levels of the hierarchy and enforces a smoothness preference for their states u – that the motion of a child node is similar to the motion of its parent. We use the robust L1 norm in the energy terms so that the violation of that consistency constraint will be penalized moderately. This imposes weak smoothness on the motion field and allows abrupt change on motion boundaries. The second term is a L1 norm of motion velocities that encourages the slowness. 3 Figure 2: An illustration of our inference procedure. Left top panel: the original hierarchical graph with loops. Left bottom panel: the bottom-up process proceeds on a tree graph with multiple copies of nodes (connected by solid lines) which relaxes the problem. The top-down process enforces the consistency constraints between copies of each node (denoted by dash line connection). Right panel: An example of the inference procedure on two street scene frames. We show the estimates from minimizing ˜E(U) (bottom-up) and E(U) (top-down). The motions are color-coded and also displayed by arrows. To be specific, the energy function Eu(ul, ul+1) is defined to be: El u(ul, ul+1) = β(l) X i∈νl+1   X j∈Chl+1(i) ||ul+1 i −ul j||L1 + γ||ul+1 i ||L1  , (3) where β(l) is the weight parameter for the energy terms at the lth level and γ controls the relative weight of the slowness prior. Note that our hierarchical smoothness prior differs from conventional smoothness constraints, e.g., [10], because they impose smoothness ’sideways’ between neighboring pixels at the same resolution level, which requires that the motion is similar between neighboring sites at the pixel level only. Imposing longer range interactions sideways becomes problematic as it leads to Markov Random Field (MRF) models with a large number of edges. This structure makes it difficult to do inference using standard techniques like belief propagation and max-flow/min-cut. By contrast, we impose smoothness by requiring that child nodes have similar motions to their parent nodes. This ’hierarchical’ formulation enables us to impose smoothness interactions at different hierarchy levels while inference can be done efficiently by exploiting the hierarchy. 2.2 Motion Estimation We estimate the motion field by computing the most probable motion ˆU = arg maxU P(U|D), where P(U|D) was defined as a Gibbs distribution in equation (1). Performing inference on this model is challenging since the energy is defined over a hierarchical graph structure with many closed loops, the state variables U are continuous-valued, and the energy function is non-convex. Our strategy is to convert this into a discrete optimization problem by quantizing the motion state space. For example, we estimate the motion at an integer-valued resolution if the accuracy is sufficient for certain experimental settings. Given a discrete state space, our algorithm involves bottomup and top-down processing and is sketched in Figure 2. The algorithm is designed to be parallelizable and to only require computations between neighboring nodes. This is desirable for biological plausibility but also has the practical advantage that we can implement the algorithm using GPU type architectures which enables fast convergence. We describe our inference algorithm in detail as follows. i) Bottom-up Pass. We first approximate the hierarchial graph with a tree-structured model by making multiple copies of child nodes such that each child node has a single parent (see [23]). This enables us to perform exact inference on the relaxed model using dynamic programming. More specifically, we compute an approximate energy function ˜E(U) recursively by exploiting the tree 4 structure: ˜E(ul+1 i ) = X j∈Chl+1(i) min ul j [El u(ul+1 i , ul j) + ˜E(ul j)] where ˜E(u0 j) at the bottom level is the data energy Ed(u0 j; D). At the top level L we compute the states (ˆuL i ) which minimize ˜E(uL i ). ii) Top-down Pass. Given the top-level motion (ˆuL i ), we then compute the optimal motion configuration for other levels using the following top-down procedure. The top-down pass enforces the consistency constraints, relaxed earlier on the recursively-computed energy function ˜E, so that all copies of each node have the same optimal state. We minimize the following energy function recursively for each node: ˆul j = arg min ul j [ X i∈P al(j) El u(ˆul+1 i ; ul j) + ˜E(ul j)] where Pal(j) is the set of parents of level-l node j. In the top-down pass, the spatial smoothness is imposed to the motion estimates at higher levels which provide context information to disambiguate the motion estimated at lower levels. The intuition for this two-pass inference algorithm is that the motion estimates of the lower level nodes are typically more ambiguous than the motion estimates of the higher level nodes because the higher levels are able to integrate information from larger number of nodes at lower levels (although some information is lost due to the coarse representation of motion field). Hence the estimates from the higher-level nodes are usually less noisy and can be used to give “context” to resolve the ambiguities of the lower level nodes. From another perspective, this can be thought of as a messagepassing type algorithm which uses a specific scheduling scheme [24]. 3 Experiments with random dot kinematograms 3.1 The stimuli and simulation procedures Random dot kinematogram (RDK) stimuli consist of two image frames with N dots in each frame [1, 16, 6]. As shown in figure (3), the dots in the first frame are located at random positions. A proportion CN of dots (the signal dots) are moved coherently to the second frame with a translational motion. The remaining (1 −C)N dots (the noise dots) are moved to random positions in the second frame. The displacement of signal dots are large between the two frames. As a result, the two-frame RDK stimuli are typically considered as an example of long-range motion. The difficulty of perceiving coherent motion in RDK stimuli is due to the large correspondence uncertainty introduced by the noise dots as shown in rightmost panel in figure (3). Figure 3: The left three panels show coherent stimuli with N = 20, C = 0.1, N = 20, C = 0.5 and N = 20, C = 1.0 respectively. The closed and open circles denote dots in the first and second frame respectively. The arrows show the motion of those dots which are moving coherently. Correspondence noise is illustrated by the rightmost panel showing that a dot in the first frame has many candidate matches in the second frame. Barlow and Tripathy [16] used RDK stimuli to investigate how dot density can affect human performance in a global motion discrimination task. They found that human performance (measured by the coherence threshold) vary little with dot density. We tested our model on the same task to judge 5 Figure 4: Estimated motion fields for random dot kinematograms. First row: 50 dots in the RDK stimulus; Second row: 100 dots in the RDK stimulus; Column-wise, coherence ratio C = 0.0, 0.3, 0.6, 0.9, respectively. The arrows indicate the motion estimated for each dot. the global motion direction using RDK motion stimulus as the input image. We applied our model to estimate motion fields and used the average velocity to indicate the global motion direction (to the left or to the right). We ran 500 trials for each coherence ratio condition. The dot number varies with N = 40, 80, 100, 200, 400, 800 respectively, corresponding to a wide range of dot densities. The model performance was computed for each coherence ratio to fit psychometric functions and to find the coherence threshold at which model performance can reach 75% accuracy. 3.2 The Results Figure (4) shows examples of the estimated motion field for various values of dot number N and coherence ratio C. The model outputs provide visually coherent motion estimates when the coherence ratio was greater than 0.3, which is consistent with human perception. With the increase of coherence ratio, the estimated motion flow appears to be more coherent. To further compare with human performance [16], we examined whether model performance can be affected by dot density in the RDK display. The right plot in figure (5) shows the model performance as a function of the coherence ratio. The coherence threshold, using the criterion of 75% accuracy, showed that model performance varied little with the increase of dot density, which is consistent with human performance reported in psychophysical experiments [16, 6]. 4 Experiments with multi-aperture stimuli 4.1 The two types of stimulus The multiple-aperture stimulus consisted of a dense set of spatially isolated elements. Two types of elements were used in our simulations: (i) drifting sine-wave gratings with random orientation, and (ii) plaids which includes two gratings with orthogonal orientations. Each element was displayed through a stationary Gaussian window. Figure (6) shows examples of these two types of stimuli. The grating elements are of form Pi(⃗x, t) = G(⃗x −⃗xi, Σ)F(⃗x −⃗xi −⃗vit) where ⃗xi denotes the center of the element, and F(.) represents a grating , F(x, y) = sin(fx sin(θi)+fy cos(θi)), where f is the fixed spatial frequency and θi is the orientation of the grating. The grating stimulus is I(⃗x, t) = PN i=1 Pi(⃗x, t), where N is the number of elements (which is kept constant). For the CN signal gratings, the motion ⃗vi was set to a fixed value ⃗v. For the (1 −C)N noise gratings, we set |⃗vi| = |⃗v| and the direction of ⃗vi was sampled from a uniform distribution. The grating orientation angles θi were sampled from a uniform distribution also. 6 40 80 100 200 400 800 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 N Coherence Ratio Threshold Figure 5: Left panel: Figure 2 in [16] showing that the coherence ratio threshold varies very little with dot density. Right panel: Simulations of our model show a similar trend. N =40, 80, 100, 200, 400 and 800. Figure 6: Multi-aperture gratings and plaids. Left column: sample stimuli. Right column: stimuli with the local drifting velocity of each element indicated by arrows. The stimulus details are shown in the magnified windows at the upper right corner of each image. The plaid elements combine two gratings with orthogonal orientations (each grating has the same speed but can have a different motion direction). This leads to plaid element Qi(⃗x, t) = G(⃗x − ⃗xi, Σ){F1(⃗x −⃗xi −⃗vi,1t) + F2(⃗x −⃗xi −⃗vi,2t), where F1(x, y) = sin(fx sin θi + fy cos θi) and F2(x, y) = sin(−fx cosθi + fy sin θi). The plaid stimulus is I(⃗x, t) = PN i=1 Qi(⃗x, t). For the CN signal plaids, the motions ⃗vi,1,⃗vi,2 were set to a fixed ⃗v. For the (1 −C)N noise plaids, the directions of ⃗vi,1,⃗vi,2 were randomly assigned, but their magnitude |⃗v| was fixed. 7 0 0.02 0.04 0.06 0.08 0.1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Coherence Ratio Accuracy gratings plaids Figure 7: Left two panels: Estimated motion fields of grating and plaids stimuli. Rightmost panel: Psychometric functions of gratings and plaids stimuli. 4.2 Simulation procedures and results The left two panels in Figure (7) show the estimated motion fields for the two types of stimulus we studied with the same coherence ratios 0.7. Plaids stimuli produce more coherent estimated motion field than grating stimuli, which is understandable. because they have less ambiguous local motion cues. We tested our model in an 8-direction discrimination task for estimating global motion direction [20]. The model used raw images frames as the input. We ran 300 trials for each stimulus type, and used the direction of the average motion to predict the global motion direction. The prediction accuracy – i.e. the number of times our model predicted the correct motion direction from 8 alternatives – was calculated at different coherence ratio levels. This difference between gratings and plaids is shown in the rightmost panel of Figure (7), where the psychometric function of plaids stimuli is always above that of grating stimuli, indicating better performance. These simulation results of our model are consistent with the psychophysics experiments in [20]. 5 Discussion In this paper, we proposed a unified single-system framework that is capable of dealing with both short-range and long-range motion. It differs from traditional motion energy models because it does not use spatiotemporal filtering. Note that it was shown in [6] that motion energy models are not well suited to the long-range motion stimuli studied in this paper. The local ambiguities of motion are resolved by a novel hierarchical prior which combines slowness and smoothness at a range of different scales. Our model accounts well for human perception of both short-range and long-range motion using the two standard stimulus types (RDKs and gratings). The hierarchical structure of our model is partly motivated by known properties of cortical organization. It also has the computational motivation of being able to represent prior knowledge about motion at different scales and to allow efficient computation. Acknowledgments This research was supported by NSF grants IIS-0917141, 613563 to AY and BCS-0843880 to HL. We thank Alan Lee and George Papandreou for helpful discussions. References [1] O. Braddick. A short-range process in apparent motion. Vision Research. 14, 519-529. 1974. [2] Z. Lu, and G. Sperling. Three-systems theory of human visual motion perception: review and update. Journal of the Optical Society of America. A. 18, 2331-2369. 2001. 8 [3] L. M. Vaina, and S. Soloviev. First-order and second-order motion: neurological evidence for neuroanatomically distinct systems. Progress in Brain Research. 144, 197-212. 2004. [4] T.S. Lee and D.B. Mumford. Hierarchical Bayesian inference in the visual cortex. JOSA A, Vol. 20, Issue 7, pp. 1434-1448. 2003. [5] A.L. Yuille and N.M. Grzywacz, A computational theory for the perception of coherent visual motion. Nature 333 pp. 71-74. 1988. [6] H. Lu and A.L. Yuille. Ideal observers for detecting motion: Correspondence noise. NIPS, 2006. [7] M. R. Luettgen, W. C. Karl and A. S. Willsky. Efficient Multiscale Regularization with Applications to the Computation of Optical Flow. IEEE Transactions on image processing. Vol. 3, pp. 41-64. 1993. [8] P. Cavanagh. Short-range vs long-range motion: not a valid distinction. 5(4), pp 303-309. 1991. [9] S. Grossberg, and M. E. Rudd. Cortical dynamics of visual motion perception: short-range and long-range apparent motion. Psychological Review. 99(1), pp 78-121. 1992. [10] B.K.P. Horn and B.G. Schunck. Determining Optical Flow. Artificial Intelligence. 17(1-3), pp 185-203. 1981. [11] Y. Weiss, E.P. Simoncelli, and E.H. Adelson. Motion illusions as optimal percepts. Nature Neuroscience, 5(6):598-604, Jun 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] S. Roth and M. J. Black: On the spatial statistics of optical flow. International Journal of Computer Vision, 74(1):33-50, August 2007. [14] P. Anandan. A computational framework and an algorithm for the measurement of visual motion. Int. Journal. Computer Vision. 2. pp 283-310. 1989. [15] K. H. Britten, M. N. Shadlen, W. T. Newsom and J. A. Movshon. The analysis of visual motion: a comparison of neuronal and psychophysical performance. Journal of Neuroscience. 12(12), 4745-4765. 1992 [16] H. Barlow, and S.P. Tripathy. Correspondence noise and signal pooling in the detection of coherent visual motion. Journal of Neuroscience, 17(20), 7954-7966. 1997. [17] E. Mingolla, J.T. Todd, and J.F. Norman. The perception of globally coherent motion. Vision Research, 32(6), 1015-1031. 1992. [18] J. Lorenceau, and M. Shiffrar. The influence of terminators on motion integration across space. Vision Research, 32(2), 263-273. 1992. [19] T. Takeuchi. Effect of contrast on the perception of moving multiple Gabor patterns. Vision research, 38(20), 3069-3082. 1998. [20] K. Amano, M. Edwards, D. R. Badcock and S. Nishida. Adaptive pooling of visual motion signals by the human visual system revealed with a novel multi-element stimulus. Journal of Vision, 9(3(4)), 1-25. 2009. [21] A. Lee and H. Lu. A comparison of global motion perception using a multiple-aperture stimulus. Journal of Vision. 10(4), 9. 2010. [22] M. Black and P. Anandan. The robust estimation of multiple motions: Parametric and piecewise-smooth flow fields. CVIU 63(1), 1996. [23] A. Choi, M. Chavira and A. Darwiche. A Scheme for Generating Upper Bounds in Bayesian Networks. UAI, 2007. [24] J. Pearl. Probabilistic Reasoning in Intelligent Systems: networks of plausible inference, 1988 9
2010
201
3,968
Structural epitome: A way to summarize one’s visual experience Nebojsa Jojic Microsoft Research Alessandro Perina Microsoft Research University of Verona Vittorio Murino Italian Institute of Technology University of Verona Abstract In order to study the properties of total visual input in humans, a single subject wore a camera for two weeks capturing, on average, an image every 20 seconds. The resulting new dataset contains a mix of indoor and outdoor scenes as well as numerous foreground objects. Our first goal is to create a visual summary of the subject’s two weeks of life using unsupervised algorithms that would automatically discover recurrent scenes, familiar faces or common actions. Direct application of existing algorithms, such as panoramic stitching (e.g., Photosynth) or appearance-based clustering models (e.g., the epitome), is impractical due to either the large dataset size or the dramatic variations in the lighting conditions. As a remedy to these problems, we introduce a novel image representation, the ”structural element (stel) epitome,” and an associated efficient learning algorithm. In our model, each image or image patch is characterized by a hidden mapping T which, as in previous epitome models, defines a mapping between the image coordinates and the coordinates in the large ”all-I-have-seen” epitome matrix. The limited epitome real-estate forces the mappings of different images to overlap which indicates image similarity. However, the image similarity no longer depends on direct pixel-to-pixel intensity/color/feature comparisons as in previous epitome models, but on spatial configuration of scene or object parts, as the model is based on the palette-invariant stel models. As a result, stel epitomes capture structure that is invariant to non-structural changes, such as illumination changes, that tend to uniformly affect pixels belonging to a single scene or object part. 1 Introduction We develop a novel generative model which combines the powerful invariance properties achieved through the use of hidden variables in epitome [2] and stel (structural element) models [6, 8]. The latter set of models have a hidden stel index si for each image pixel i. The number of discrete states si can take is small, typically 4-10, as the stel indices point to a small palette of distributions over local measurements, e.g., color. The actual local measurement xi (e.g. color) for pixel i is assumed to have been generated from the appropriate palette entry. This constrains the pixels with the same stel index s to have similar colors or whatever local measurements xi represent. The indexing scheme is further assumed to change little accross different images of the same scene/object, while the palettes can vary significantly. For example, two images of the same scene captured in different levels of overall illumination would still have very similar stel partitions, even though their palettes may be vastly different. In this way, the image representation rises above a matrix of local measurements in favor of a matrix of stel indices which can survive remarkable non-structural image changes, as long as these can be explained away by a change in the (small) palette. For example, in Fig. 1B, images of pedestrians are captured by a model that has a prior distribution of stel assignments shown in the first row. The prior on stel probabilities for each pixel adds up to one, and the 6 images showing these prior probabilities add up to a uniform image of ones. Several pedestrian images are shown 1 S T e i T e i p(s) X S p(S) Epitome PIM Stel Epitome X X i t t Λ Λ Palette Palette Palette Stel 1 Stel 2 Stel 3 Stel 4 Stel 5 Stel 6 e(s) s=1 s=2 s=3 s=4 q(s=1) q(s=2) q(s=3) q(s=4) q(s=1) q(s=2) q(s=3) q(s=4) q(s=1) q(s=2) q(s=3) q(s=4) Inference x B) PROBABILISTIC INDEX MAP A) GRAPHICAL MODELS C) STEL EPITOME D) FOUR FRAMES E) ALIGNMENT WITH STEL F) ALIGNMENT OF INTENSITY IMAGES G) REGULAR EPITOME [2] q(s=1) q(s=2) q(s=3) q(s=4) q(s=5) q(s=6) Λ Λ Λ Figure 1: A) Graphical model of Epitome, Probabilistic index map (PIM) and Stel epitome. B) Examples of PIM parameters. C) Example of stel epitome parameters. D) Four frames aligned with stel epitome E-F). In G) we show the original epitome model [2] trained on these four frames. below with their posterior distributions over stel assignments, as well as the mean color of each stel. This illustrates that the different parts of the pedestrian images are roughly matched. Torso pixels, for instance, are consistently assigned to stel s = 3, despite the fact that different people wore shirts or coats of very different colors. Such a consistent segmentation is possible because torso pixels tend to have similar colors within any given image and because the torso is roughly in the same position across images (though misalignment of up to half the size of the segments is largely tolerated). While the figure shows the model with S=6 stels, larger number of stels were shown to lead to further segmentation of the head and even splitting of the left from right leg [6]. Motivated by similar insights as in [6], a number of models followed, e.g. [7, 13, 14, 8], as the described addition of hidden variables s achieves the remarkable level of intensity invariance first demonstrated through the use of similarity templates [12], but at a much lower computational cost. In this paper, we embed the stel image representation within a large stel epitome: a stel prior matrix, like the one shown in the top row of Fig. 1B, but much larger so that it can contain representations of multiple objects or scenes. This requires the additional transformation variables T for each image whose role is to align it with the epitome. The model is thus qualitatively enriched in two ways: 1) the model is now less sensitive to misalignment of images, as through alignment to the epitome, the images are aligned to each other, and 2) interesting structure emerges when the epitome real estate is limited so that though it is much larger than the size of a single image, it is till much smaller than the real estate needed to simply tile all images without overlap. In that case, a large collection of images must naturally undergo an unsupervised clustering in order for this real estate to be used as well as possible (or as well as the local minimum obtained by the learning algorithm allows). This clustering is quite different from the traditional notion of clustering. As in the original epitome models, the transformation variables play both the alignment and cluster indexing roles. Different 2 models over the typical scenes/objects have to compete over the positions in the epitome, with a panoramic version of each scene emerging in different parts of the epitome, finally providing a rich image indexing scheme. Such a panoramic scene submodel within the stel epitome is illustrated in Fig. 1C. A portion of the larger stel epitome is shown with 3 images that map into this region. The region represents one of two home offices in the dataset analyzed in the experiments. Stel s=1 captures the laptop screen, while the other stels capture other parts of the scene, as well as large shadowing effects (while the overall changes in illumination and color changes in object parts rarely affect stel representations, the shadows can break the stel invariance, and so the model learned to cope with them by breaking the shadows across multiple stels). The three images shown, mapping to different parts of this region, have very different colors as they were taken at different times of day and across different days, and yet their alignment is not adversely affected, as it is evident in their posterior stel segmentation aligned to the epitome. To further illustrate the panoramic alignment, we used the epitome mapping to show for the 4 different images in Fig. 1D how they overlap with stel s=4 of another office image (Fig. 1E), as well as how multiple images of this scene, including these 4, look when they are aligned and overlapped as intensity images in Fig. 1F. To illustrate the gain from palette-invariance that motivated this work, we show in Fig. 1G the original epitome model [2] trained on images of this scene. Without the invariances afforded by the stel representation, the standard color epitome has to split the images of the scene into two clusters, and so the laptop screen is doubled there. Qualitatively quite different from both epitomes and previous stel models, the stel epitome is a model flexible enough to be applied to a very diverse set of images. In particular, we are interested in datasets that might represent well a human’s total visual input over a longer period of time, and so we captured two weeks worth of SenseCam images, taken at a frequency of roughly one image every 20 seconds during all waking hours of a human subject over a period of two weeks (www.research.microsoft.com/∼jojic/aihs). 2 Stel epitome The graphical model describing the dependencies in stel epitomes is provided in Fig. 1A. The parametric forms for the conditional distributions are standard multinomial and Gaussian distributions just as the ones used in [8]. We first consider the generation of a single image or an image patch (depending on which visual scale we are epitomizing), and, for brevity, temporarily omit the subscript t indexing different images. The epitome is a matrix of multinomial distributions over S indices s ∈{1, 2, ..., S}, associated with each two-dimensional epitome location i: p(si = s) = ei(s). (1) Thus each location in the epitome contains S probabilities (adding to one) for different indices. Indices for the image are assumed to be generated from these distributions. The distribution over the entire collection of pixels (either from an entire image, or a patch), p({xi}|{si}, T, Λ), depends on the parametrization of the transformations T. We adopt the discrete transformation model used previously in graphical models e.g. [1, 2], where the shifts are separated from other transformations such as scaling or rotation, T = (ℓ, r), with ℓbeing a 2-dimensional shift and r being the index into the set of other transformations, e.g., combinations of rotation and scaling: p({xi}|{si}, T, Λ) = Y i p(xr i−ℓ|si, Λ) = Y i p(xr i−ℓ|Λsi), (2) where superscript r indicates transformation of the image x by the r-th transformation, and i −ℓis the mod-difference between the two-dimensional variables with respect to the edges of the epitome (the shifts wrap around). Λ is the palette associated with the image, and Λs is its s −th entry. Various palette models for probabilistic index / structure element map models have been reviewed in [8]. For brevity, in this paper we focus on the simplest case where the image measurements are simply pixel colors, and the palette entries are simply Gaussians with parameters Λs = (µs, φs). In this case, p(xr i−ℓ|Λsi) = N(xr i−ℓ; µsi, φsi), and the joint likelihood over observed and hidden variables can be written as P = p(Λ)p(ℓ, r) Y i Y s N(xr i−ℓ; µs, φs)ei(s) [si=s], (3) 3 where [] is the indicator function. To derive the inference and leaning algorithms for the mode, we start with a posterior distribution model Q and the appropriate free energy P Q log Q P . The standard variational approach, however, is not as straightforward as we might hope as major obstacles need to be overcome to avoid local minima and slow convergence. To focus on these important issues, we further simplify the problem and omit both the non-shift part of the transformations (r) and palette priors p(Λ), and for consistency, we also omit these parts of the model in the experiments. These two elements of the model can be dealt with in the manner proposed previously: The R discrete transformations (scale/rotation combinations, for example) can be inferred in a straight-forward way that makes the entire algorithm that follows R times slower (see [1] for using such transformations in a different context), and the various palette models from [8] can all be inserted here with the update rules adjusted appropriately. A large stel epitome is difficult to learn because decoupling of all hidden variables in the posterior leads to severe local minima, with all images either mapped to a single spot in the epitome, or mapped everywhere in the epitome so that the stel distribution is flat. This problem becomes particularly evident in larger epitomes, due to the imbalance in the cardinalities of the three types of hidden variables. To resolve this, we either need a very high numerical precision (and considerable patience), or the severe variational approximations need to be avoided as much as possible. It is indeed possible to tractably use a rather expressive posterior Q = q(ℓ) Y s q(Λs|ℓ) Y i q(si), (4) further setting q(Λs|ℓ) = δ(µs −ˆµs,ℓ)δ(φs −ˆφs,ℓ), where δ is the Dirac function. This leads to F = H(Q) + X s,ℓ,i q(ℓ)q(si = s) x2 i−ℓ 2ˆφs,ℓ − X s,ℓ,i q(ℓ)q(si = s) ˆµs,ℓxi−ℓ ˆφs,ℓ + + X s,ℓ,i q(ℓ)q(si = s) ˆµ2 s,ℓ 2ˆφs,ℓ − X s X i q(si = s) log ei(s), (5) where H(Q) is the entropy of the posterior distribution. Setting to zero the derivatives of this free energy with respect to the variational parameters – the probabilities q(si = s), q(ℓ), and the palette means and variance estimates ˆµs,ℓ, ˆφs,ℓ– we obtain a set of updates for iterative inference. 2.1 E STEP The following steps are iterated for a single image x on an m × n grid and for a given epitome distributions e(s) on an M × N grid. Index i corresponds to the epitome coordinates and masks m are used to describe which of all M × N coordinates correspond to image coordinates. In the variational EM learning on a collection of images index by t, these steps are done for each image, yielding posterior distributions indexed by t and then the M step is performed as described below. We initialize q(si = s) = e(si) and then iterate the following steps in the following order. Palette updates ˆµs,ℓ= P ℓ P i mi−ℓq(si = s)q(ℓ)xi−ℓ P ℓ P i q(si = s)q(ℓ)mi−ℓ (6) ˆφs,ℓ= P ℓ P i mi−ℓq(si = s)q(ℓ)x2 i−ℓ P ℓ P i q(si = s)q(ℓ)mi−ℓ  −ˆµ2 s,ℓ (7) Epitome mapping update log q(ℓ) = const + 1 2 X i,s q(st i = s) log 2πφi−ℓ (8) This update is derived from the free energy and from the expression for φ above). This equation can be used as is when the epitome e(s) is well defined (that is the entropy of component stel 4 distribution is low in the latter iterations), as long as the usual care is taken in exponentiation before normalization - the maximum log q(ℓ) should be subtracted from all elements of the M × N matrix log q(ℓ) before exponentiation. In the early iterations of EM, however, when distributions ei(s) have not converged yet, numerical imprecision can stop the convergence, leaving the algorithm at a point which is not even a local minimum. The reason for this is that after the normalization step we described, q(ℓ) will still be very peaky, even for relatively flat e(s) due to the large number of pixels in the image. The consequence is that low alignment probabilities are rounded down to zero, as after exponentiation and normalization their values go below numerical precision. If there are areas of the epitome where no single image is mapped with high probability, then the update in those areas in the M step would have to depend on the low-probability mappings for different images, and their relative probabilities would determine which of the images contribute more and which less to updating these areas of the epitome. To preserve the numerical precision needed for this, we set k thresholds τk, and compute log ˜q(ℓ)k, the distributions at the k different precision levels: log ˜q(ℓ)k = [log q(ℓ) ≥τk] · τk + [log q(ℓ) < τk] · log q(ℓ), where [] is the indicator function. This limits how high the highest probability in the map is allowed to be. The k −th distribution sets all values above τk to be equal to τk. We can now normalize these k distributions as discussed above: ˜q(ℓ)k = exp {log ˜q(ℓ)k −maxi log ˜q(ℓ)k} P ℓexp {log ˜q(ℓ)k −maxi log ˜q(ℓ)k} To keep track of which precision level is needed for different ℓ, we calculate the masks ˜mi,k = X ℓ ˜q(ℓ)k · mi−ℓ, where mask m is the mask discussed in the main text with ones in the upper left corner’s m × n entries and zeros elsewhere, designating the default image position for a shift of ℓ= 0 (or given that shifts are defined with a wrap-around, the shift of ℓ= (M, N)). Masks ˜mi,k provide total weight of the image mapping at the appropriate epitome location at different precision levels. Posterior stel distribution q(s) update at multiple precision levels log ˜q(si = s)k = const − X ℓ X i|i−ℓ∈C ˜q(ℓ)k x2 i−ℓ 2ˆφs,ℓ + X ℓ X i|i−ℓ∈C ˜q(ℓ)k ˆµs,ℓxi−ℓ ˆφs,ℓ − − X ℓ X i|i−ℓ∈C ˜q(ℓ)k ˆµ2 s,ℓ 2ˆφs,ℓ + ˜mi,k · log e(si = s). (9) To keep track of these different precision levels, we also define a mask M so that Mi = k indicates that the k-th level of detail should be used for epitome location i. The k-th level is reserved for those locations that have only the values from up to the k-th precision band of q(ℓ) mapped there (we will have m × n mappings of the original image to each epitome location, as this many different shifts will align the image so as to overlap with any given epitome location). One simple, though not most efficient way to define this matrix is Mi = 1 + ⌊P k ˜mi,k⌋. We now normalize log ˜q(si = s)k to compute the distribution at k different precision levels, ˜q(si = s)k, and compute q(s) integrating the results from different numerical precision levels as q(si = s) = P k[Mi = k] · ˜q(si = s)k. 2.2 M STEP The highest k for each epitome location Di = maxt{M t i }, is determined over all images xt in the dataset, so that we know the appropriate precision level at which to perform summation and normalization. Then the epitome update consists of: e(si = s) = X k [Di = k] P t[M t = k] · qt(si) P t[M t = k] . 5 Bike Car Dining room Home ofce Laptop room Kitchen Work ofce Outside home Tennis feld Living room Figure 2: Some examples from the dataset (www.resaerch.microsoft.com/∼jojic/aihs) Note that most of the summations can be performed by convolution operations and as the result, the complexity of the algorithm is of the O(SMN log MN) for M X N epitomes. 3 Experiments Using a SenseCam wearable camera, we have obtained two weeks worth of images, taken at the rate of one frame every 20 seconds during all waking hours of a human subject. The resulting image dataset captures the subject’s (summer) life rather completely in the following sense: Majority of images can be assigned to one of the emergent categories (Fig. 2) and the same categories represent the majority of images from any time period of a couple of days. We are interested in appropriate summarization, browsing, and recognition tasks on this dataset. This dataset also proved to be fundamental for testing stel epitomes, as the illumination and viewing angle variations are significant across images and we found that the previous approaches to scene recognition provide only modest recognition rates. For the purposes of evaluation, we have manually labeled a random collection of 320 images and compared our method with other approaches on supervised and unsupervised classification. We divided this reduced dataset in 10 different recurrent scenes (32 images per class); some examples are depicted in Fig. 2. In all the experiments with the reduced dataset we used an epitome area 14 times larger than the image area and five stels (S=5). The numerical results reported in the tables are averaged over 4 train/test splits. In supervised learning the scene labels are available during the stel epitome learning. We used this information to aid both the original epitome [9] and the stel epitome modifying the models by the addition of an observed scene class variable c in two ways: i) by linking c in the Bayesian network with e, and so learning p(e|c), and ii) by linking c with T inferring p(T|c). In the latter strategy, where we model p(T|c), we learn a single epitome, but we assume that the epitome locations are linked with certain scenes, and this mapping is learned for each epitome pixel. Then, the distribution p(c|ℓ) over scene labels can be used for inference of the scene label for the test data. For a previously unseen test image xt, recognition is achieved by computing the label posterior p(ct|xt) using p(ct|xt) = P ℓp(c|ℓ) · p(ℓ|xt). We compared our approach with the epitomic location recognition method presented in [9], with Latent Dirichlet allocation (LDA) [4], and with the Torralba approach [11]. We also compared with baseline discriminative classifiers and with the pyramid matching kernel approach [5], using SIFT features [3]. For the above techniques that are based on topic models, representing images as spatially disorganized bags of features, the codebook of SIFT features was based 16x16 pixel patches computed over a grid spaced by 8 pixels. We chose a number of topics Z = 45 and 200 codewords (W = 200). The same quantized dictionary has been employed in [5]. To provide a fair comparison between generative and discriminative methods, we also used the free energy optimization strategy presented in [10], which provides an extra layer of discriminative training for an arbitrary generative model. The comparisons are provided in Table 1. Accuracies achieved using the free energy optimization strategy [10] are reported in the Opt. column. 6 Table 1: Classification accuracies. Method Accuracy [10] Opt. Method Accuracy [10] Opt. Stel epitome p(T|c) 70,06% n.a. LDA [4] 74,23% 80,11% Stel epitome p(e|c) 88,67% 98,70% GMM [11] C=3 56,81% n.a. Epitome [9] p(T|c) 74,36% n.a. SIFT + K-NN 79,42% n.a. Epitome [9] p(e|c) 69,80% 79,14% [5] 96,67% n.a. We also trained both the regular epitome and the stel epitome in an unsupervised way. An illustration of the resulting stel epitome is provided in Fig. 3. The 5 panels marked s = 1, . . . , 5 show the stel epitome distribution. Each of these panels is an image ei(s) for an appropriate s. On the top of the stel epitome, four enlarged epitome regions are shown to highlight panoramic reconstructions of a few classes. We also show the result of averaging all images according to their mapping to the stel epitome (Fig. 3D) for comparison with the traditional epitome (Fig.3C) which models colors rather than stels. As opposed to the stel epitome, the learned color epitome [2] has to have multiple versions of the same scene in different illumination conditions. Furthermore, many different scenes tend to overlap in the color epitome, especially indoor scenes which all look equally beige. Finally, in Fig. 3B we show examples of some images of different scenes mapped onto the stel epitome, whose organization is illustrated by a rendering of all images averaged into the appropriate location (similarly to the original color epitomes). Note that the model automatically clusters images using the structure, and not colors, even in face of variation of colors present in the exemplars of the ”Car”, or the ”Work office” classes (See also the supplemental video that illustrates the mapping dynamically). The regular epitome cannot capture these invariances, and it clusters images based on overall intensity more readily than based on the structure of the scene. We evaluated the two models numerically in the following way. Using the two types of unsupervised epitomes, and the known labels for the images in the training set, we assigned labels to the test set using the same classification rule explained in the previous paragraph. This semi-supervised test reveals how consistent the clustering induced by epitomes is with the human labeling. The stel epitome accuracy, 73,06%, outperforms the standard epitome model [9], 69,42%, with statistical significance. We have also trained both types of epitomes over a real estate 35 times larger than the original image size using different random sets of 5000 images taken from the dataset. The stel epitomes trained in an unsupervised way are qualitatively equivalent, in that they consistently capture around six of the most prominent scenes from Fig. 2, whereas the traditional epitomes tended to capture only three. 4 Conclusions The idea of recording our experiences is not new. (For a review and interesting research directions see [15]). It is our opinion that recording, summarizing and browsing continuous visual input is particularly interesting. With the recent substantial increases in radio connectiviy, battery life, display size, and computing power of small devices, and the avilability of even greater computing power off line, summarizing one’s total visual input is now both a practically feasible and scientifically interesting target for vision research. In addition, a variety of applications may arise once this functionality is provided. As a step in this direction, we provide a new dataset that contains a mix of indoor and outdoor scenes as a result of two weeks of continuous image acquisition, as well as a simple algorithm that deals with some of the invariances that have to be incorporated in a model of such data. However, it is likely that modeling the geometry of the imaging process will lead to even more interesting results. Although straightforward application of panoramic stitching algorithms, such as Photosynth, did not work on this dataset, because of both the sheer number of images and the significant variations in the lighting conditions, such methods or insights from their development will most likely be very helpful in further development of unsupervised learning algorithms for such types of datasets. The geometry constraints may lead to more reliable background alignments for the next logical phase in modeling for ”All-I-have-seen” datasets: The learning of the foreground object categories such as family members’ faces. As this and other such datasets grow in size, the unsupervised techniques for modeling the data in a way where interesting visual components emerge over time will become both more practically useful and scientifically interesting. 7 s=1 s=2 10,4 pt A) STEL EPITOME Car stel-panorama Kitchen stel-panorama Home ofce stel-panorama Work ofce stel-panorama B) IMAGE MAPPINGS ON THE STEL EPITOME C) EPITOME D) STEL EPITOME RECONSTRUCTION Figure 3: Stel epitome of images captured by a wearable camera 8 References [1] B. Frey and N. Jojic, “Transformation-invariant clustering using the EM algorithm ”, TPAMI 2003, vol. 25, no. 1, pp. 1-17. [2] N. Jojic, B. Frey, A. Kannan, “Epitomic analysis of appearance and shape”, ICCV 2003. [3] D. Lowe, “Distinctive Image Features from Scale-Invariant Keypoints,” IJCV, 2004, vol. 60, no. 2, pp. 91-110. [4] L. Fei-Fei, P. Perona, “A Bayesian Hierarchical Model for Learning Natural Scene Categories,” IEEE CVPR 2005, pp. 524-531. [5] S. Lazebnik, C. Schmid, J. Ponce, “Beyond Bags of Features: Spatial Pyramid Matching for Recognizing Natural Scene Categories,” IEEE CVPR, 2006, pp. 2169-2178. [6] N. Jojic and C. Caspi, “Capturing image structure with probabilistic index maps,” IEEE CVPR 2004, pp. 212-219. [7] J. Winn and N. Jojic, “LOCUS: Learning Object Classes with Unsupervised Segmentation” ICCV 2005. [8] N. Jojic, A.Perina, M.Cristani, V.Murino and B. Frey, “Stel component analysis: modeling spatial correlation in image class structure,” IEEE CVPR 2009. [9] K. Ni, A. Kannan, A. Criminisi and J. Winn, “Epitomic Location Recognition,” IEEE CVPR 2008. [10] A. Perina, M. Cristani, U. Castellani, V. Murino and N. Jojic, “Free energy score-space,” NIPS 2009. [11] A. Torralba, K.P. Murphy, W.T. Freeman and M.A. Rubin, “Context-based vision system for place and object recognition,” ICCV 2003, pp. 273-280. [12] C. Stauffer, E. Miller, and K. Tieu, “Transform invariant image decomposition with similarity templates,” NIPS 2003. [13] V. Ferrari , A. Zisserman, “Learning Visual Attributes,” NIPS 2007. [14] B. Russell, A. Efros, J. Sivic, B. Freeman, A. Zisserman “Segmenting Scenes by Matching Image Composites,” NIPS 2009. [15] G. Bell and J. Gemmell, Total Recall. Dutton Adult 2009. 9
2010
202
3,969
Tree-Structured Stick Breaking for Hierarchical Data Ryan Prescott Adams∗ Dept. of Computer Science University of Toronto Zoubin Ghahramani Dept. of Engineering University of Cambridge Michael I. Jordan Depts. of EECS and Statistics University of California, Berkeley Abstract Many data are naturally modeled by an unobserved hierarchical structure. In this paper we propose a flexible nonparametric prior over unknown data hierarchies. The approach uses nested stick-breaking processes to allow for trees of unbounded width and depth, where data can live at any node and are infinitely exchangeable. One can view our model as providing infinite mixtures where the components have a dependency structure corresponding to an evolutionary diffusion down a tree. By using a stick-breaking approach, we can apply Markov chain Monte Carlo methods based on slice sampling to perform Bayesian inference and simulate from the posterior distribution on trees. We apply our method to hierarchical clustering of images and topic modeling of text data. 1 Introduction Structural aspects of models are often critical to obtaining flexible, expressive model families. In many cases, however, the structure is unobserved and must be inferred, either as an end in itself or to assist in other estimation and prediction tasks. This paper addresses an important instance of the structure learning problem: the case when the data arise from a latent hierarchy. We take a direct nonparametric Bayesian approach, constructing a prior on tree-structured partitions of data that provides for unbounded width and depth while still allowing tractable posterior inference. Probabilistic approaches to latent hierarchies have been explored in a variety of domains. Unsupervised learning of densities and nested mixtures has received particular attention via finite-depth trees [1], diffusive branching processes [2] and hierarchical clustering [3, 4]. Bayesian approaches to learning latent hierarchies have also been useful for semi-supervised learning [5], relational learning [6] and multi-task learning [7]. In the vision community, distributions over trees have been useful as priors for figure motion [8] and for discovering visual taxonomies [9]. In this paper we develop a distribution over probability measures that imbues them with a natural hierarchy. These hierarchies have unbounded width and depth and the data may live at internal nodes on the tree. As the process is defined in terms of a distribution over probability measures and not as a distribution over data per se, data from this model are infinitely exchangeable; the probability of any set of data is not dependent on its ordering. Unlike other infinitely exchangeable models [2, 4], a pseudo-time process is not required to describe the distribution on trees and it can be understood in terms of other popular Bayesian nonparametric models. Our new approach allows the components of an infinite mixture model to be interpreted as part of a diffusive evolutionary process. Such a process captures the natural structure of many data. For example, some scientific papers are considered seminal — they spawn new areas of research and cause new papers to be written. We might expect that within a text corpus of scientific documents, such papers would be the natural ancestors of more specialized papers that followed on from the new ideas. This motivates two desirable features of a distribution over hierarchies: 1) ancestor data (the ∗http://www.cs.toronto.edu/˜rpa/ 1 (a) Dirichlet process stick breaking (b) Tree-structured stick breaking Figure 1: a) Dirichlet process stick-breaking procedure, with a linear partitioning. b) Interleaving two stickbreaking processes yields a tree-structured partition. Rows 1, 3 and 5 are ν-breaks. Rows 2 and 4 are ψ-breaks. “prototypes”) should be able to live at internal nodes in the tree, and 2) as the ancestor/descendant relationships are not known a priori, the data should be infinitely exchangeable. 2 A Tree-Structured Stick-Breaking Process Stick-breaking processes based on the beta distribution have played a prominent role in the development of Bayesian nonparametric methods, most significantly with the constructive approach to the Dirichlet process (DP) due to Sethuraman [10]. A random probability measure G can be drawn from a DP with base measure αH using a sequence of beta variates via: G = ∞ X i=1 πi δθi πi = νi i−1 Y i′=1 (1 −νi′) θi ∼H νi ∼Be(1, α) π1 = ν1. (1) We can view this as taking a stick of unit length and breaking it at a random location. We call the left side of the stick π1 and then break the right side at a new place, calling the left side of this new break π2. If we continue this process of “keep the left piece and break the right piece again” as in Fig. 1a, assigning each πi a random value drawn from H, we can view this is a random probability measure centered on H. The distribution over the sequence (π1, π2, · · · ) is a case of the GEM distribution [11], which also includes the Pitman-Yor process [12]. Note that in Eq. (1) the θi are i.i.d. from H; in the current paper these parameters will be drawn according to a hierarchical process. The GEM construction provides a distribution over infinite partitions of the unit interval, with natural numbers as the index set as in Fig. 1a. In this paper, we extend this idea to create a distribution over infinite partitions that also possess a hierarchical graph topology. To do this, we will use finite-length sequences of natural numbers as our index set on the partitions. Borrowing notation from the P´olya tree (PT) construction [13], let ϵ=(ϵ1, ϵ2, · · · , ϵK), denote a length-K sequence of positive integers, i.e., ϵk ∈N+. We denote the zero-length string as ϵ=ø and use |ϵ| to indicate the length of ϵ’s sequence. These strings will index the nodes in the tree and |ϵ| will then be the depth of node ϵ. We interleave two stick-breaking procedures as in Fig. 1b. The first has beta variates νϵ ∼Be(1, α(|ϵ|)) which determine the size of a given node’s partition as a function of depth. The second has beta variates ψϵ ∼Be(1, γ), which determine the branching probabilities. Interleaving these processes partitions the unit interval. The size of the partition associated with each ϵ is given by πϵ = νϵϕϵ Y ϵ′≺ϵ ϕϵ′(1 −νϵ′) ϕϵϵi = ψϵϵi ϵi−1 Y j=1 (1 −ψϵj) πø = νø, (2) where ϵϵi denotes the sequence that results from appending ϵi onto the end of ϵ, and ϵ′ ≺ϵ indicates that ϵ could be constructed by appending onto ϵ′. When viewing these strings as identifying nodes on a tree, {ϵϵi : ϵi ∈1, 2, · · · } are the children of ϵ and {ϵ′ : ϵ′ ≺ϵ} are the ancestors of ϵ. The {πϵ} in Eq. (2) can be seen as products of several decisions on how to allocate mass to nodes and branches in the tree: the {ϕϵ} determine the probability of a particular sequence of children and the νϵ and (1−νϵ) terms determine the proportion of mass allotted to ϵ versus nodes that are descendants of ϵ. 2 (a) α0 =1, λ= 1 2 , γ = 1 5 (b) α0 =1, λ=1, γ = 1 5 (c) α0 =1, λ=1, γ =1 (d) α0 =5, λ= 1 2 , γ = 1 5 (e) α0 =5, λ=1, γ = 1 5 (f) α0 =5, λ= 1 2 , γ =1 (g) α0 =25, λ= 1 2 , γ = 1 5 (h) α0 =25, λ= 1 2 , γ =1 Figure 2: Eight samples of trees over partitions of fifty data, with different hyperparameter settings. The circles are represented nodes, and the squares are the data. Note that some of the sampled trees have represented nodes with no data associated with them and that the branch ordering does not correspond to a size-biased permutation. We require that the {πϵ} sum to one. The ψ-sticks have no effect upon this, but α(·) : N →R+ (the depth-varying parameter for the ν-sticks) must satisfy P∞ j=1 ln(1+1/α(j−1))=+∞(see [14]). This is clearly true for α(j)=α0 >0. A useful function that also satisfies this condition is α(j)=λjα0 with α0 >0, λ∈(0, 1]. The decay parameter λ allows a distribution over trees with most of the mass at an intermediate depth. This is the α(·) we will assume throughout the remainder of the paper. An Urn-based View When a Bayesian nonparametric model induces partitions over data, it is sometimes possible to construct a Blackwell-MacQueen [15] type urn scheme that corresponds to sequentially generating data, while integrating out the underlying random measure. The “Chinese restaurant” metaphor for the Dirichlet process is a popular example. In our model, we can use such an urn scheme to construct a treed partition over a finite set of data. The urn process can be seen as a path-reinforcing Bernoulli trip down the tree where each datum starts at the root and descends into children until it stops at some node. The first datum lives at the root node with probability 1/(α(0)+1), otherwise it descends and instantiates a new child. It stays at this new child with probability 1/(α(1)+1) or descends again and so on. A later datum stays at node ϵ with probability (Nϵ+1)/(Nϵ+Nϵ≺·+α(|ϵ|)+1), where Nϵ is the number of previous data that stopped at ϵ, and Nϵ≺· is the number of previous data that came down this path of the tree but did not stop at ϵ, i.e., a sum over all descendants: Nϵ≺· =P ϵ≺ϵ′ Nϵ′. If a datum descends to ϵ but does not stop then it chooses which child to descend to according to a Chinese restaurant process where the previous customers are only those data who have also descended to this point. That is, if it has reached node ϵ but will not stay there, it descends to existing child ϵϵi with probability (Nϵϵi +Nϵϵi≺·)/(Nϵ≺·+γ) and instantiates a new child with probability γ/(Nϵ≺·+γ). A particular path therefore becomes more likely according to its “popularity” with previous data. Note that a node can be a part of a popular path without having any data of its own. Fig. 2 shows the structures over fifty data drawn from this process with different hyperparameter settings. Note that the branch ordering in a realization of the urn scheme will not necessarily be the same as that of the size-biased ordering [16] of the partitions in Fig. 1b: the former is a tree over a finite set of data and the latter is over a random infinite partition. The urn view allows us to compare this model to other priors on infinite trees. One contribution of this model is that the data can live at internal nodes in the tree, but are nevertheless infinitely exchangeable. This is in contrast to the model in [8], for example, which is not infinitely exchangeable. The nested Chinese restaurant process (nCRP) [17] provides a distribution over trees of unbounded width and depth, but data correspond to paths of infinite length, requiring an additional distribution over depths that is not path-dependent. The P´olya tree [13] uses a recursive stick-breaking process to specify a distribution over nested partitions in a binary tree, however the data live at infinitely-deep leaf nodes. The marginal distribution on the topology of a Dirichlet diffusion tree [2] (and the clustering variant of Kingman’s coalescent [4]) provides path-reinforcement and infinite exchangeability, however it requires a pseudo-time hazard process and data do not live at internal nodes. 3 3 Hierarchical Priors for Node Parameters One can view the stick-breaking construction of the Dirichlet process as generating an infinite partition and then labeling each cell i with parameter θi drawn i.i.d. from H. In a mixture model, data from the ith component are generated independently according to a distribution f(x | θi), where x takes values in a sample space X. In our model, we continue to assume that the data are generated independently given the latent labeling, but to take advantage of the tree-structured partitioning of Section 2 an i.i.d. assumption on the node parameters is inappropriate. Rather, the distribution over the parameters at node ϵ, denoted θϵ, should depend in an interesting way on its ancestors {θϵ′ : ϵ′ ≺ϵ}. A natural way to specify such dependency is via a directed graphical model, with the requirement that edges must always point down the tree. An intuitive subclass of such graphical models are those in which a child is conditionally independent of all ancestors, given its parents and any global hyperparameters. This is the case we will focus on here, as it provides a useful view of the parametergeneration process as a “diffusion down the tree” via a Markov transition kernel that can be essentially any distribution with a location parameter. Coupling such a kernel, which we denote T(θϵϵi ←θϵ), with a root-level prior p(θø) and the node-wise data distribution f(x | θϵ), we have a complete model for infinitely exchangeable tree-structured data on X. We now examine a few specific examples. Generalized Gaussian Diffusions If our data distribution f(x | θ) is such that the parameters can be specified as a real-valued vector θ∈RM, then we can use a Gaussian distribution to describe the parent-to-child transition kernel: Tnorm(θϵϵi ←θϵ)=N(θϵϵi | η θϵ, Λ), where η∈[0, 1). Such a kernel captures the simple idea that the child’s parameters are noisy versions of the parent’s, as specified by the covariance matrix Λ, while η ensures that all parameters in the tree have a finite marginal variance. While this will not result in a conjugate model unless the data are themselves Gaussian, it has the simple property that each node’s parameter has a Gaussian prior that is specified by its parent. We present an application of this model in Section 5, where we model images as a distribution over binary vectors obtained by transforming a real-valued vector to (0, 1) via the logistic function. Chained Dirichlet-Multinomial Distributions If each datum is a set of counts over M discrete outcomes, as in many finite topic models, a multinomial model for f(x | θ) may be appropriate. In this case, X =NM, and θϵ takes values in the (M −1)-simplex. We can construct a parent-to-child transition kernel via a Dirichlet distribution with concentration parameter κ: Tdir(θϵϵi ←θϵ)=Dir(κθϵ), using a symmetric Dirichlet for the root node, i.e., θø ∼Dir(κ1). Hierarchical Dirichlet Processes A very general way to specify the distribution over data is to say that it is drawn from a random probability measure with a Dirichlet process prior. In our case, one flexible approach would be to model the data at node ϵ with a distribution Gϵ as in Eq. (1). This means that θϵ ∼Gϵ where Gϵ now corresponds to an infinite set of parameters. The hierarchical Dirichlet process (HDP) [18] provides a natural parent-to-child transition kernel for the tree-structured model, again with concentration parameter κ: Thdp(Gϵϵi ←Gϵ)=DP(κGϵ). At the top level, we specify a global base measure H for the root node, i.e., Gø ∼H. One negative aspect of this transition kernel is that the Gϵ will have a tendency to collapse down onto a single atom. One remedy is to smooth the kernel with η as in the Gaussian case, i.e., Thdp(Gϵϵi ←Gϵ)=DP(κ (η Gϵ + (1 −η) H)). 4 Inference via Markov chain Monte Carlo We have so far defined a model for data that are generated from the parameters associated with the nodes of a random tree. Having seen N data and assuming a model f(x | θϵ) as in the previous section, we wish to infer possible trees and model parameters. As in most complex probabilistic models, closed form inference is impossible and we instead generate posterior samples via Markov chain Monte Carlo (MCMC). To operate efficiently over a variety of regimes without tuning, we use slice sampling [19] extensively. This allows us to sample from the true posterior distribution over the finite quantities of interest despite our model containing an infinite number of parameters. The primary data structure in our Markov chain is the set of N strings describing the current assignments of data to nodes, which we denote {ϵn}N n=1. We represent the ν-sticks and parameters θϵ for all nodes that are traversed by the data in its current assignments, i.e., {νϵ, θϵ : ∃n, ϵ≺ϵn}. We also represent all ψ-sticks in the “hull” of the tree that contains the data: if at some node ϵ one of the N data paths passes through child ϵϵi, then we represent all the ψ-sticks in the set S ϵn S ϵϵi⪯ϵn{ψϵϵj : ϵj ≤ϵi}. 4 function SAMP-ASSIGNMENT(n) pslice ∼Uni(0, f(xn | θϵn)) umin ←0, umax ←1 loop u ∼Uni(umin, umax) ϵ ←FIND-NODE(u, ø) p ←f(xn | θϵ) if p > pslice then return ϵ else if ϵ<ϵn then umin ←u else umax ←u function FIND-NODE(u, ϵ) if u < νϵ then return ϵ else u ←(u −νϵ)/(1 −νϵ) while u<1−Q j(1−ψϵϵj) do Draw a new ψ-stick e←edges from ψ-sticks i←bin index for u from edges Draw θϵϵi and νϵϵi if necessary u ←(u −ei)/(ei+1 −ei) return FIND-NODE(u, ϵϵi) function SIZE-BIASED-PERM(ϵ) ρ ←∅ while represented children do w ←weights from {ψϵϵi} w ←w\ρ j ∼w ρ ←append j return ρ Slice Sampling Data Assignments The primary challenge in inference with Bayesian nonparametric mixture models is often sampling from the posterior distribution over assignments, as it is frequently difficult to integrate over the infinity of unrepresented components. To avoid this difficulty, we use a slice sampling approach that can be viewed as a combination of the Dirichlet slice sampler of Walker [20] and the retrospective sampler of Papaspiliopolous and Roberts [21]. Section 2 described a path-reinforcing process for generating data from the model. An alternative method is to draw a uniform variate u on (0, 1) and break sticks until we know what πϵ the u fell into. One can imagine throwing a dart at the top of Fig. 1b and considering which πϵ it hits. We would draw the sticks and parameters from the prior, as needed, conditioning on the state instantiated from any previous draws and with parent-to-child transitions enforcing the prior downwards in the tree. The pseudocode function FIND-NODE(u, ϵ) with u∼Uni(0, 1) and ϵ=ø draws such a sample. This representation leads to a slice sampling scheme on u that does not require any tuning parameters. To slice sample the assignment of the nth datum, currently assigned to ϵn, we initialize our slice sampling bounds to (0, 1). We draw a new u from the bounds and use the FIND-NODE function to determine the associated ϵ from the currently-represented state, plus any additional state that must be drawn from the prior. We do a lexical comparison (“string-like”) of the new ϵ and our current state ϵn, to determine whether this new path corresponds to a u that is “above” or “below” our current state. This lexical comparison prevents us from having to represent the initial un. We shrink the slice sampling bounds appropriately, depending on the comparison, until we find a u that satisfies the slice. This procedure is given in pseudocode as SAMP-ASSIGNMENT(n). After performing this procedure, we can discard any state that is not in the previously-mentioned hull of representation. Gibbs Sampling Stick Lengths Given the represented sticks and the current assignments of nodes to data, it is straightforward to resample the lengths of the sticks from the posterior beta distributions νϵ | data ∼Be(Nϵ+1, Nϵ≺·+α(|ϵ|)) ψϵϵi | data ∼Be(Nϵϵi≺·+1, γ+P j>i Nϵϵj≺·), where Nϵ and Nϵ≺· are the path-based counts as described in Section 2. Gibbs Sampling the Ordering of the ψ-Sticks When using the stick-breaking representation of the Dirichlet process, it is crucial for mixing to sample over possible orderings of the sticks. In our model, we include such moves on the ψ-sticks. We iterate over each instantiated node ϵ and perform a Gibbs update of the ordering of its immediate children using its invariance under size-biased permutation (SBP) [16]. For a given node, the ψ-sticks provide a “local” set of weights that sum to one. We repeatedly draw without replacement from the discrete distribution implied by the weights and keep the ordering that results. Pitman [16] showed that distributions over sequences such as our ψ-sticks are invariant under such permutations and we can view the SIZE-BIASED-PERM(ϵ) procedure as a Metropolis–Hastings proposal with an acceptance ratio that is always one. Slice Sampling Stick-Breaking Hyperparameters Given all of the instantiated sticks, we slice sample from the conditional posterior distribution over the hyperparameters α0, λ and γ: p(α0, λ | {νϵ}) ∝I(αmin 0 <α0 <αmax 0 )I(λmin <λ<λmax) Y ϵ Be(νϵ | 1, λ|ϵ|α0) p(γ | {ψϵ}) ∝I(γmin <γ <γmax) Y ϵ Be(ψϵ | 1, γ), where the products are over nodes in the aforementioned hull. We initialize the bounds of the slice sampler with the bounds of the top-hat prior. 5 Figure 3: These figures show a subset of the tree learned from the 50,000 CIFAR-100 images. The top tree only shows nodes for which there were at least 250 images. The ten shown at each node are those with the highest probability under the node’s distribution. The second row shows three expanded views of subtrees, with nodes that have at least 50 images. Detailed views of portions of these subtrees are shown in the third row. Selecting a Single Tree We have so far described a procedure for generating posterior samples from the tree structures and associated stick-breaking processes. If our objective is to find a single tree, however, samples from the posterior distribution are unsatisfying. Following [17], we report a best single tree structure over the data by choosing the sample from our Markov chain that has the highest complete-data likelihood p({xn, ϵn}N n=1 | {νϵ}, {ψϵ}, α0, λ, γ). 5 Hierarchical Clustering of Images We applied our model and MCMC inference to the problem of hierarchically clustering the CIFAR100 image data set 1. These data are a labeled subset of the 80 million tiny images data [22] with 50,000 32×32 color images. We did not use the labels in our clustering. We modeled the images via 256-dimensional binary features that had been previously extracted from each image (i.e., xn ∈{0, 1}256) using a deep neural network that had been trained for an image retrieval task [23]. We used a factored Bernoulli likelihood at each node, parameterized by a latent 256-dimensional real vector (i.e., θϵ ∈R256) that was transformed component-wise via the logistic function: f(xn | θϵ) = 256 Y d=1  1 + exp{−θ(d) ϵ } −x(d) n  1 + exp{θ(d) ϵ } 1−x(d) n . The prior over the parameters of a child node was Gaussian with its parent’s value as the mean. The covariance of the prior (Λ in Section 3) was diagonal and inferred as part of the Markov chain. We placed independent Uni(0.01, 1) priors on the elements of the diagonal. To efficiently learn the node parameters, we used Hamiltonian (hybrid) Monte Carlo (HMC) [24], taking 25 leapfrog HMC steps, with a randomized step size. We occasionally interleaved a slice sampling move for robustness. 1http://www.cs.utoronto.ca/˜kriz/cifar.html 6 neural chip figure input network Koch Murray Lazzaro Harris Cauwenberghs image network images recognition object Sejnowski Becker Baluja Zemel Mozer time signal network neural figure Sejnowski Bialek Makeig Jung Principe learning model time state control Dayan Thrun Singh Barto Moore function networks neural functions network Kowalczyk Warmuth Bartlett Williamson Meir neurons model neuron input spike Koch Zador Bower Sejnowski Brown model visual cells figure orientation Obermayer Koch Pouget Sejnowski Schulten network input neural learning networks Mozer Wiles Giles Sun Pollack set algorithm data training vector Scholkopf Smola Vapnik Shawe-Taylor Bartlett data model gaussian distribution algorithm Bishop Tresp Williams Ghahramani Barber network units learning hidden input Hinton Giles Fahlman Kamimura Baum state learning policy function time Singh Sutton Barto Tsitsiklis Moore network neural learning networks time Giles Toomarian Mozer Zemel Kabashima Figure 4: A subtree of documents from NIPS 1-12, inferred using 20 topics. Only nodes with at least 50 documents are shown. Each node shows three aggregated statistics at that node: the five most common author names, the five most common words and a histogram over the years of proceedings. For the stick-breaking processes, we used α0 ∼Uni(10, 50), λ∼Uni(0.05, 0.8), and γ ∼Uni(1, 10). Using Python on a single core of a modern workstation each MCMC iteration of the entire model (including slice sampled reassignment of all 50,000 images) requires approximately three minutes. Fig. 3 represents a part of the tree with the best complete-data log likelihood after 4000 such iterations. The tree provides a useful visualization of the data set, capturing broad variations in color at the higher levels of the tree, with lower branches varying in texture and shape. A larger version of this tree is provided in the supplementary material. 6 Hierarchical Modeling of Document Topics We also used our approach in a bag-of-words topic model, applying it to 1740 papers from NIPS 1–12 2. As in latent Dirichlet allocation (LDA) [25], we consider a topic to be a distribution over words and each document to be described by a distribution over topics. In LDA, each document has a unique topic distribution. In our model, however, each document lives at a node and that node has a unique topic distribution. Thus multiple documents share a distribution over topics if they inhabit the same node. Each node’s topic distribution is from a chained Dirichlet-multinomial as described in Section 3. The topics each have symmetric Dirichlet priors over their word distributions. This results in a different kind of topic model than that provided by the nested Chinese restaurant process. In the nCRP, each node corresponds to a topic and documents are spread across infinitely-long paths down the tree. Each word is drawn from a distribution over depths that is given by a GEM distribution. In the nCRP, it is not the documents that have the hierarchy, but the topics. We did two kinds of analyses. The first is a visualization as with the image data of the previous section, using all 1740 documents. The subtree in Fig. 4 shows the nodes that had at least fifty documents, along with the most common authors and words at that node. The normalized histogram in each box shows which of the twelve years are represented among the documents in that node. An 2http://cs.nyu.edu/˜roweis/data.html 7 10 20 30 40 50 60 70 80 90 100 Number of Topics 400 450 500 550 600 650 700 Perplexity Improvement Over Multinomial (nats) LDA TSSB (a) Improvement versus multinomial, by number of topics 1 2 3 4 5 6 7 8 9 10 Folds 2000 2200 2400 2600 2800 3000 3200 Best Perplexity Per Word (nats) 40 30 40 40 40 40 30 40 40 30 20 20 10 30 40 20 20 30 30 20 Multinomial LDA TSSB (b) Best perplexity per word, by folds Figure 5: Results of predictive performance comparison between latent Dirichlet allocation (LDA) and tree-structured stick breaking (TSSB). a) Mean improvement in perplexity per word over Laplace-smoothed multinomial, as a function of topics (larger is better). The error bars show the standard deviation of the improvement across the ten folds. b) Best predictive perplexity per word for each fold (smaller is better). The numbers above the LDA and TSSB bars show how many topics were used to achieve this. expanded version of this tree is provided in the supplementary material. Secondly, we quantitatively assessed the predictive performance of the model. We created ten random partitions of the NIPS corpus into 1200 training and 540 test documents. We then performed inference with different numbers of topics (10, 20, . . . , 100) and evaluated the predictive perplexity of the held-out data using an empirical likelihood estimate taken from a mixture of multinomials (pseudo-documents of infinite length, see, e.g. [26]) with 100,000 components. As Fig. 5a shows, our model improves in performance over standard LDA for smaller numbers of topics. This improvement appears to be due to the constraints on possible topic distributions that are imposed by the diffusion. For larger numbers of topics, however, it may be that these constraints become a hindrance and the model may be allocating predictive mass to regions where it is not warranted. In absolute terms, more topics did not appear to improve predictive performance for LDA or the tree-structured model. Both models performed best with fewer than fifty topics and the best tree model outperformed the best LDA model on all folds, as shown in Fig. 5b. The MCMC inference procedure we used to train our model was as follows: first, we ran Gibbs sampling of a standard LDA topic model for 1000 iterations. We then burned in the tree inference for 500 iterations with fixed word-topic associations. We then allowed the word-topic associations to vary and burned in for an additional 500 iterations, before drawing 5000 samples from the full posterior. For the comparison, we burned in LDA for 1000 iterations and then drew 5000 samples from the posterior [27]. For both models we thinned the samples by a factor of 50. The mixing of the topic model seems to be somewhat sensitive to the initialization of the κ parameter in the chained Dirichlet-multinomial and we initialized this parameter to be the same as the number of topics. 7 Discussion We have presented a model for a distribution over random measures that also constructs a hierarchy, with the goal of constructing a general-purpose prior on tree-structured data. Our approach is novel in that it combines infinite exchangeability with a representation that allows data to live at internal nodes on the tree, without a hazard rate process. We have developed a practical inference approach based on Markov chain Monte Carlo and demonstrated it on two real-world data sets in different domains. The imposition of structure on the parameters of an infinite mixture model is an increasingly important topic. In this light, our notion of evolutionary diffusion down a tree sits within the larger class of models that construct dependencies between distributions on random measures [28, 29, 18]. Acknowledgements The authors wish to thank Alex Krizhevsky for providing the image feature data. We also thank Kurt Miller, Iain Murray, Hanna Wallach, and Sinead Williamson for valuable discussions, and Yee Whye Teh for suggesting Gibbs moves based on size-biased permutation. RPA is a Junior Fellow of the Canadian Institute for Advanced Reserch. 8 References [1] Christopher K. I. Williams. A MCMC approach to hierarchical mixture modelling. In Advances in Neural Information Processing Systems 12, pages 680–686. 2000. [2] Radford M. Neal. Density modeling and clustering using Dirichlet diffusion trees. In Bayesian Statistics 7, pages 619–629, 2003. [3] Katherine A. Heller and Zoubin Ghahramani. Bayesian hierarchical clustering. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [4] Yee Whye Teh, Hal Daum´e III, and Daniel Roy. Bayesian agglomerative clustering with coalescents. In Advances in Neural Information Processing Systems 20, 2007. [5] Charles Kemp, Thomas L. Griffiths, Sean Stromsten, and Joshua B. Tenenbaum. Semi-supervised learning with trees. In Advances in Neural Information Processing Systems 16. 2004. [6] Daniel M. Roy, Charles Kemp, Vikash K. Mansinghka, and Joshua B. Tenenbaum. Learning annotated hierarchies from relational data. In Advances in Neural Information Processing Systems 19, 2007. [7] Hal Daum´e III. Bayesian multitask learning with latent hierarchies. In Proceedings of the 25th Conference on Uncertainty in Artificial Intelligence, 2009. [8] Edward Meeds, David A. Ross, Richard S. Zemel, and Sam T. Roweis. Learning stick-figure models using nonparametric Bayesian priors over trees. In IEEE Conference on Computer Vision and Pattern Recognition, 2008. [9] Evgeniy Bart, Ian Porteous, Pietro Perona, and Max Welling. Unsupervised learning of visual taxonomies. In IEEE Conference on Computer Vision and Pattern Recognition, 2008. [10] Jayaram Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [11] Jim Pitman. Poisson–Dirichlet and GEM invariant distributions for split-and-merge transformation of an interval partition. Combinatorics, Probability and Computing, 11:501–514, 2002. [12] Jim Pitman and Marc Yor. The two-parameter Poisson–Dirichlet distribution derived from a stable subordinator. The Annals of Probability, 25(2):855–900, 1997. [13] R. Daniel Mauldin, William D. Sudderth, and S. C. Williams. P´olya trees and random distributions. The Annals of Statistics, 20(3):1203–1221, September 1992. [14] Hemant Ishwaran and Lancelot F. James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453):161–173, March 2001. [15] David Blackwell and James B. MacQueen. Ferguson distributions via P´olya urn schemes. Annals of Statistics, 1(2):353–355, 1973. [16] Jim Pitman. Random discrete distributions invariant under size-biased permutation. Advances in Applied Probability, 28(2):525–539, 1996. [17] David M. Blei, Thomas L. Griffiths, and Michael I. Jordan. The nested Chinese restaurant process and Bayesian nonparametric inference of topic hierarchies. Journal of the ACM, 57(2):1–30, 2010. [18] Yee Whye Teh, Michael I. Jordan, Matthew J. Beal, and David M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476):1566–1581, 2006. [19] Radford M. Neal. Slice sampling (with discussion). The Annals of Statistics, 31(3):705–767, 2003. [20] Stephen G. Walker. Sampling the Dirichlet mixture model with slices. Communications in Statistics, 36:45–54, 2007. [21] Omiros Papaspiliopoulos and Gareth O. Roberts. Retrospective Markov chain Monte Carlo methods for Dirichlet process hierarchical models. Biometrika, 95(1):169–186, 2008. [22] Antonio Torralba, Rob Fergus, and William T. Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(11):1958–1970, 2008. [23] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Department of Computer Science, University of Toronto, 2009. [24] Radford M. Neal. MCMC using Hamiltonian dynamics. In Handbook of Markov chain Monte Carlo. Chapman and Hall / CRC Press. [25] David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [26] Hanna M. Wallach, Iain Murray, Ruslan Salakhutdinov, and David Mimno. Evaluation methods for topic models. In Proceedings of the 26th International Conference on Machine Learning, 2009. [27] Tom L. Griffiths and Mark Steyvers. Finding scientific topics. Proceedings of the National Academy of Sciences of the United States of America, 101(Suppl. 1):5228–5235, 2004. [28] Steven N. MacEachern. Dependent nonparametric processes. In Proceedings of the Section on Bayesian Statistical Science, 1999. [29] Steven N. MacEachern, Athanasios Kottas, and Alan E. Gelfand. Spatial nonparametric Bayesian models. Technical Report 01-10, Institute of Statistics and Decision Sciences, Duke University, 2001. 9
2010
203
3,970
LSTD with Random Projections Mohammad Ghavamzadeh, Alessandro Lazaric, Odalric-Ambrym Maillard, R´emi Munos INRIA Lille - Nord Europe, Team SequeL, France Abstract We consider the problem of reinforcement learning in high-dimensional spaces when the number of features is bigger than the number of samples. In particular, we study the least-squares temporal difference (LSTD) learning algorithm when a space of low dimension is generated with a random projection from a highdimensional space. We provide a thorough theoretical analysis of the LSTD with random projections and derive performance bounds for the resulting algorithm. We also show how the error of LSTD with random projections is propagated through the iterations of a policy iteration algorithm and provide a performance bound for the resulting least-squares policy iteration (LSPI) algorithm. 1 Introduction Least-squares temporal difference (LSTD) learning [3, 2] is a widely used reinforcement learning (RL) algorithm for learning the value function V π of a given policy π. LSTD has been successfully applied to a number of problems especially after the development of the least-squares policy iteration (LSPI) algorithm [9], which extends LSTD to control problems by using it in the policy evaluation step of policy iteration. More precisely, LSTD computes the fixed point of the operator ΠT π, where T π is the Bellman operator of policy π and Π is the projection operator onto a linear function space. The choice of the linear function space has a major impact on the accuracy of the value function estimated by LSTD, and thus, on the quality of the policy learned by LSPI. The problem of finding the right space, or in other words the problems of feature selection and discovery, is an important challenge in many areas of machine learning including RL, or more specifically, linear value function approximation in RL. To address this issue in RL, many researchers have focused on feature extraction and learning. Mahadevan [13] proposed a constructive method for generating features based on the eigenfunctions of the Laplace-Beltrami operator of the graph built from observed system trajectories. Menache et al. [16] presented a method that starts with a set of features and then tunes both features and the weights using either gradient descent or the cross-entropy method. Keller et al. [7] proposed an algorithm in which the state space is repeatedly projected onto a lower dimensional space based on the Bellman error and then states are aggregated in this space to define new features. Finally, Parr et al. [17] presented a method that iteratively adds features to a linear approximation architecture such that each new feature is derived from the Bellman error of the existing set of features. A more recent approach to feature selection and discovery in value function approximation in RL is to solve RL in high-dimensional feature spaces. The basic idea here is to use a large number of features and then exploit the regularities in the problem to solve it efficiently in this high-dimensional space. Theoretically speaking, increasing the size of the function space can reduce the approximation error (the distance between the target function and the space) at the cost of a growth in the estimation error. In practice, in the typical high-dimensional learning scenario when the number of features is larger than the number of samples, this often leads to the overfitting problem and poor prediction performance. To overcome this problem, several approaches have been proposed including regularization. Both ℓ1 and ℓ2 regularizations have been studied in value function approximation in RL. Farahmand et al. presented several ℓ2-regularized RL algorithms by adding ℓ2-regularization to LSTD and modified Bellman residual minimization [4] as well as fitted value iteration [5], and proved finite-sample performance bounds for their algorithms. There have also been algorithmic work on adding ℓ1-penalties to the TD [12], LSTD [8], and linear programming [18] algorithms. 1 In this paper, we follow a different approach based on random projections [21]. In particular, we study the performance of LSTD with random projections (LSTD-RP). Given a high-dimensional linear space F, LSTD-RP learns the value function of a given policy from a small (relative to the dimension of F) number of samples in a space G of lower dimension obtained by linear random projection of the features of F. We prove that solving the problem in the low dimensional random space instead of the original high-dimensional space reduces the estimation error at the price of a “controlled” increase in the approximation error of the original space F. We present the LSTDRP algorithm and discuss its computational complexity in Section 3. In Section 4, we provide the finite-sample analysis of the algorithm. Finally in Section 5, we show how the error of LSTD-RP is propagated through the iterations of LSPI. 2 Preliminaries For a measurable space with domain X, we let S(X) and B(X; L) denote the set of probability measures over X and the space of measurable functions with domain X and bounded in absolute value by 0 < L < ∞, respectively. For a measure µ ∈S(X) and a measurable function f : X →R, we define the ℓ2(µ)-norm of f as ||f||2 µ = R f(x)2µ(dx), the supremum norm of f as ||f||∞= supx∈X |f(x)|, and for a set of n states X1, . . . , Xn ∈X the empirical norm of f as ||f||2 n = 1 n Pn t=1 f(Xt)2. Moreover, for a vector u ∈Rn we write its ℓ2-norm as ||u||2 2 = Pn i=1 u2 i . We consider the standard RL framework [20] in which a learning agent interacts with a stochastic environment and this interaction is modeled as a discrete-time discounted Markov decision process (MDP). A discount MDP is a tuple M = ⟨X, A, r, P, γ⟩where the state space X is a bounded closed subset of a Euclidean space, A is a finite (|A| < ∞) action space, the reward function r : X ×A →R is uniformly bounded by Rmax, the transition kernel P is such that for all x ∈X and a ∈A, P(·|x, a) is a distribution over X, and γ ∈(0, 1) is a discount factor. A deterministic policy π : X →A is a mapping from states to actions. Under a policy π, the MDP M is reduced to a Markov chain Mπ = ⟨X, Rπ, P π, γ⟩with reward Rπ(x) = r x, π(x)  , transition kernel P π(·|x) = P · |x, π(x)  , and stationary distribution ρπ (if it admits one). The value function of a policy π, V π, is the unique fixed-point of the Bellman operator T π : B(X; Vmax = Rmax 1−γ ) →B(X; Vmax) defined by (T πV )(x) = Rπ(x) + γ R X P π(dy|x)V (y). We also define the optimal value function V ∗as the unique fixed-point of the optimal Bellman operator T ∗: B(X; Vmax) →B(X; Vmax) defined by (T ∗V )(x) = maxa∈A  r(x, a) + γ R X P(dy|x, a)V (y)  . Finally, we denote by T the truncation operator at threshold Vmax, i.e., if |f(x)| > Vmax then T(f)(x) = sgn f(x)  Vmax. To approximate a value function V ∈B(X; Vmax), we first define a linear function space F spanned by the basis functions ϕj ∈B(X; L), j = 1, . . . , D, i.e., F = {fα | fα(·) = φ(·)⊤α, α ∈RD}, where φ(·) = ϕ1(·), . . . , ϕD(·) ⊤is the feature vector. We define the orthogonal projection of V onto the space F w.r.t. norm µ as ΠFV = arg minf∈F ||V −f||µ. From F we can generate a d-dimensional (d < D) random space G = {gβ | gβ(·) = Ψ(·)⊤β, β ∈Rd}, where the feature vector Ψ(·) = ψ1(·), . . . , ψd(·) ⊤is defined as Ψ(·) = Aφ(·) with A ∈Rd×D be a random matrix whose elements are drawn i.i.d. from a suitable distribution, e.g., Gaussian N(0, 1/d). Similar to the space F, we define the orthogonal projection of V onto the space G w.r.t. norm µ as ΠGV = arg ming∈G ||V −g||µ. Finally, for any function fα ∈F, we define m(fα) = ||α||2 supx∈X ||φ(x)||2. 3 LSTD with Random Projections The objective of LSTD with random projections (LSTD-RP) is to learn the value function of a given policy from a small (relative to the dimension of the original space) number of samples in a low-dimensional linear space defined by a random projection of the high-dimensional space. We show that solving the problem in the low dimensional space instead of the original high-dimensional space reduces the estimation error at the price of a “controlled” increase in the approximation error. In this section, we introduce the notations and the resulting algorithm, and discuss its computational complexity. In Section 4, we provide the finite-sample analysis of the algorithm. We use the linear spaces F and G with dimensions D and d (d < D) as defined in Section 2. Since in the following the policy is fixed, we drop the dependency of Rπ, P π, V π, and T π on π and simply use R, P, V , and T . Let {Xt}n t=1 be a sample path (or trajectory) of size n generated by the Markov 2 chain Mπ, and let v ∈Rn and r ∈Rn, defined as vt = V (Xt) and rt = R(Xt), be the value and reward vectors of this trajectory. Also, let Ψ = [Ψ(X1)⊤; . . . ; Ψ(Xn)⊤] be the feature matrix defined at these n states and Gn = {Ψβ | β ∈Rd} ⊂Rn be the corresponding vector space. We denote by bΠG : Rn →Gn the orthogonal projection onto Gn, defined by bΠGy = arg minz∈Gn ||y − z||n, where ||y||2 n = 1 n Pn t=1 y2 t . Similarly, we can define the orthogonal projection onto Fn = {Φα | α ∈RD} as bΠFy = arg minz∈Fn ||y −z||n, where Φ = [φ(X1)⊤; . . . ; φ(Xn)⊤] is the feature matrix defined at {Xt}n t=1. Note that for any y ∈Rn, the orthogonal projections bΠGy and bΠFy exist and are unique. We consider the pathwise-LSTD algorithm introduced in [11]. Pathwise-LSTD takes a single trajectory {Xt}n t=1 of size n generated by the Markov chain as input and returns the fixed point of the empirical operator bΠG bT , where bT is the pathwise Bellman operator defined as bT y = r + γ bPy. The operator bP : Rn →Rn is defined as ( bPy)t = yt+1 for 1 ≤t < n and ( bPy)n = 0. As shown in [11], bT is a γ-contraction in ℓ2-norm, thus together with the non-expansive property of bΠG, it guarantees the existence and uniqueness of the pathwise-LSTD fixed point ˆv ∈Rn, ˆv = bΠG bT ˆv. Note that the uniqueness of ˆv does not imply the uniqueness of the parameter ˆβ such that ˆv = Ψˆβ. LSTD-RP D, d, {Xt}n t=1, {R(Xt)}n t=1, φ, γ  Cost Compute • the reward vector rn×1 ; rt = R(Xt) O(n) • the high-dimensional feature matrix Φn×D = [φ(X1)⊤; . . . ; φ(Xn)⊤] O(nD) • the projection matrix Ad×D whose elements are i.i.d. samples from N(0, 1/d) O(dD) • the low-dim feature matrix Ψn×d = [Ψ(X1)⊤; . . . ; Ψ(Xn)⊤] ; Ψ(·) = Aφ(·) O(ndD) • the matrix bPΨ = Ψ′ n×d = [Ψ(X2)⊤; . . . ; Ψ(Xn)⊤; 0⊤] O(nd) • ˜Ad×d = Ψ⊤(Ψ −γΨ′) , ˜bd×1 = Ψ⊤r O(nd + nd2) + O(nd) return either ˆβ = ˜A−1˜b or ˆβ = ˜A+˜b ( ˜A+ is the Moore-Penrose pseudo-inverse of ˜A) O(d2 + d3) Figure 1: The pseudo-code of the LSTD with random projections (LSTD-RP) algorithm. Figure 1 contains the pseudo-code and the computational cost of the LSTD-RP algorithm. The total computational cost of LSTD-RP is O(d3 + ndD), while the computational cost of LSTD in the high-dimensional space F is O(D3 + nD2). As we will see, the analysis of Section 4 suggests that the value of d should be set to O(√n). In this case the numerical complexity of LSTD-RP is O(n3/2D), which is better than O(D3), the cost of LSTD in F when n < D (the case considered in this paper). Note that the cost of making a prediction is D in LSTD in F and dD in LSTD-RP. 4 Finite-Sample Analysis of LSTD with Random Projections In this section, we report the main theoretical results of the paper. In particular, we derive a performance bound for LSTD-RP in the Markov design setting, i.e., when the LSTD-RP solution is compared to the true value function only at the states belonging to the trajectory used by the algorithm (see Section 4 in [11] for a more detailed discussion). We then derive a condition on the number of samples to guarantee the uniqueness of the LSTD-RP solution. Finally, from the Markov design bound we obtain generalization bounds when the Markov chain has a stationary distribution. 4.1 Markov Design Bound Theorem 1. Let F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2. Let {Xt}n t=1 be a sample path generated by the Markov chain Mπ, and v, ˆv ∈Rn be the vectors whose components are the value function and the LSTD-RP solution at {Xt}n t=1. Then for any δ > 0, whenever d ≥15 log(8n/δ), with probability 1−δ (the randomness is w.r.t. both the random sample path and the random projection), ˆv satisfies ||v−ˆv||n ≤ 1 p 1 −γ2 " ||v −bΠFv||n + r 8 log(8n/δ) d m(bΠFv) # +γVmaxL 1 −γ r d νn r 8 log(4d/δ) n + 1 n ! , (1) 3 where the random variable νn is the smallest strictly positive eigenvalue of the sample-based Gram matrix 1 nΨ⊤Ψ. Note that m(bΠFv) = m(fα) with fα be any function in F such that fα(Xt) = (bΠFv)t for 1 ≤t ≤n. Before stating the proof of Theorem 1, we need to prove the following lemma. Lemma 1. Let F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2. Let {Xi}n i=1 be n states and fα ∈F. Then for any δ > 0, whenever d ≥15 log(4n/δ), with probability 1 −δ (the randomness is w.r.t. the random projection), we have inf g∈G ||fα −g||2 n ≤8 log(4n/δ) d m(fα)2. (2) Proof. The proof relies on the application of a variant of Johnson-Lindenstrauss (JL) lemma which states that the inner-products are approximately preserved by the application of the random matrix A (see e.g., Proposition 1 in [14]). For any δ > 0, we set ϵ2 = 8 d log(4n/δ). Thus for d ≥ 15 log(4n/δ), we have ϵ ≤3/4 and as a result ϵ2/4 −ϵ3/6 ≥ϵ2/8 and d ≥ log(4n/δ) ϵ2/4−ϵ3/6. Thus, from Proposition 1 in [14], for all 1 ≤i ≤n, we have |φ(Xi) · α −Aφ(Xi) · Aα| ≤ϵ||α||2||φ(Xi)||2 ≤ ϵ m(fα) with high probability. From this result, we deduce that with probability 1 −δ inf g∈G ||fα −g||2 n ≤||fα −gAα||2 n = 1 n n X i=1 |φ(Xi) · α −Aφ(Xi) · Aα|2 ≤8 log(4n/δ) d m(fα)2. Proof of Theorem 1. For any fixed space G, the performance of the LSTD-RP solution can be bounded according to Theorem 1 in [10] as ||v −ˆv||n ≤ 1 p 1 −γ2 ||v −bΠGv||n + γVmaxL 1 −γ r d νn r 8 log(2d/δ′) n + 1 n  , (3) with probability 1 −δ′ (w.r.t. the random sample path). From the triangle inequality, we have ||v −bΠGv||n ≤||v −bΠFv||n + ||bΠFv −bΠGv||n = ||v −bΠFv||n + ||bΠFv −bΠG(bΠFv)||n. (4) The equality in Eq. 4 comes from the fact that for any vector g ∈G, we can write ||v −g||2 n = ||v−bΠFv||2 n+||bΠFv−g||2 n. Since ||v−bΠFv||n is independent of g, we have arg infg∈G ||v−g||2 n = arg infg∈G ||bΠFv −g||2 n, and thus, bΠGv = bΠG(bΠFv). From Lemma 1, if d ≥15 log(4n/δ′′), with probability 1 −δ′′ (w.r.t. the choice of A), we have ||bΠFv −bΠG(bΠFv)||n ≤ r 8 log(4n/δ′′) d m(bΠFv). (5) We conclude from a union bound argument that Eqs. 3 and 5 hold simultaneously with probability at least 1 −δ′ −δ′′. The claim follows by combining Eqs. 3–5, and setting δ′ = δ′′ = δ/2. Remark 1. Using Theorem 1, we can compare the performance of LSTD-RP with the performance of LSTD directly applied in the high-dimensional space F. Let ¯v be the LSTD solution in F, then up to constants, logarithmic, and dominated factors, with high probability, ¯v satisfies ||v −¯v||n ≤ 1 p 1 −γ2 ||v −bΠFv||n + 1 1 −γ O( p D/n). (6) By comparing Eqs. 1 and 6, we notice that 1) the estimation error of ˆv is of order O( p d/n), and thus, is smaller than the estimation error of ¯v, which is of order O( p D/n), and 2) the approximation error of ˆv is the approximation error of ¯v, ||v −bΠFv||n, plus an additional term that depends on m(bΠFv) and decreases with d, the dimensionality of G, with the rate O( p 1/d). Hence, LSTD-RP may have a better performance than solving LSTD in F whenever this additional term is smaller than the gain achieved in the estimation error. Note that m(bΠFv) highly depends on the value function V that is being approximated and the features of the space F. It is important to carefully tune the value of d as both the estimation error and the additional approximation error in Eq. 1 depend on d. For instance, while a small value of d significantly reduces the estimation error (and the need for samples), it may amplify the additional approximation error term, and thus, reduce the advantage of LSTD-RP over LSTD. We may get an idea on how to select the value of d by optimizing the bound 4 d = m(bΠFv) γVmaxL s nνn(1 −γ) 1 + γ . (7) Therefore, when n samples are available the optimal value for d is of the order O(√n). Using the value of d in Eq. 7, we can rewrite the bound of Eq. 1 as (up to the dominated term 1/n) ||v −ˆv||n ≤ 1 p 1 −γ2 ||v −bΠFv||n + 1 1 −γ p 8 log(8n/δ) q γVmaxL m(bΠFv) 1 −γ nνn(1 + γ) 1/4. (8) Using Eqs. 6 and 8, it would be easier to compare the performance of LSTD-RP and LSTD in space F, and observe the role of the term m(bΠFv). For further discussion on m(bΠFv) refer to [14] and for the case of D = ∞to Section 4.3 of this paper. Remark 2. As discussed in the introduction, when the dimensionality D of F is much bigger than the number of samples n, the learning algorithms are likely to overfit the data. In this case, it is reasonable to assume that the target vector v itself belongs to the vector space Fn. We state this condition using the following assumption: Assumption 1. (Overfitting). For any set of n points {Xi}n i=1, there exists a function f ∈F such that f(Xi) = V (Xi), 1 ≤i ≤n . Assumption 1 is equivalent to require that the rank of the empirical Gram matrices 1 nΦ⊤Φ to be bigger than n. Note that Assumption 1 is likely to hold whenever D ≫n, because in this case we can expect that the features to be independent enough on {Xi}n i=1 so that the rank of 1 nΦ⊤Φ to be bigger than n (e.g., if the features are linearly independent on the samples, it is sufficient to have D ≥n). Under Assumption 1 we can remove the empirical approximation error term in Theorem 1 and deduce the following result. Corollary 1. Under Assumption 1 and the conditions of Theorem 1, with probability 1−δ (w.r.t. the random sample path and the random space), ˆv satisfies ||v −ˆv||n ≤ 1 p 1 −γ2 r 8 log(8n/δ) d m(bΠFv) + γVmaxL 1 −γ r d νn r 8 log(4d/δ) n + 1 n  . 4.2 Uniqueness of the LSTD-RP Solution While the results in the previous section hold for any Markov chain, in this section we assume that the Markov chain Mπ admits a stationary distribution ρ and is exponentially fast β-mixing with parameters ¯β, b, κ, i.e., its β-mixing coefficients satisfy βi ≤¯β exp(−biκ) (see e.g., Sections 8.2 and 8.3 in [10] for a more detailed definition of β-mixing processes). As shown in [11, 10], if ρ exists, it would be possible to derive a condition for the existence and uniqueness of the LSTD solution depending on the number of samples and the smallest eigenvalue of the Gram matrix defined according to the stationary distribution ρ, i.e., G ∈RD×D , Gij = R ϕi(x)ϕj(x)ρ(dx). We now discuss the existence and uniqueness of the LSTD-RP solution. Note that as D increases, the smallest eigenvalue of G is likely to become smaller and smaller. In fact, the more the features in F, the higher the chance for some of them to be correlated under ρ, thus leading to an ill-conditioned matrix G. On the other hand, since d < D, the probability that d independent random combinations of ϕi lead to highly correlated features ψj is relatively small. In the following we prove that the smallest eigenvalue of the Gram matrix H ∈Rd×d , Hij = R ψi(x)ψj(x)ρ(dx) in the random space G is indeed bigger than the smallest eigenvalue of G with high probability. Lemma 2. Let δ > 0 and F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2 with D > d+2 p 2d log(2/δ)+2 log(2/δ). Let the elements of the projection matrix A be Gaussian random variables drawn from N(0, 1/d). Let the Markov chain Mπ admit a stationary distribution ρ. Let G and H be the Gram matrices according to ρ for the spaces F and G, and ω and χ be their smallest eigenvalues. We have with probability 1 −δ (w.r.t. the random space) χ ≥D d ω 1 − r d D − r 2 log(2/δ) D !2 . (9) Proof. Let β ∈Rd be the eigenvector associated to the smallest eigenvalue χ of H, from the definition of the features Ψ of G (H = AGA⊤) and linear algebra, we obtain 5 χ||β||2 2 = β⊤χβ = β⊤Hβ = β⊤AGA⊤β ≥ω||A⊤β||2 2 = ω β⊤AA⊤β ≥ω ξ ||β||2 2 , (10) where ξ is the smallest eigenvalue of the random matrix AA⊤, or in other words, √ξ is the smallest singular value of the D × d random matrix A⊤, i.e., smin(A⊤) = √ξ. We now define B = √ dA. Note that if the elements of A are drawn from the Gaussian distribution N(0, 1/d), the elements of B are standard Gaussian random variables, and thus, the smallest eigenvalue of AA⊤, ξ, can be written as ξ = s2 min(B⊤)/d. There has been extensive work on extreme singular values of random matrices (see e.g., [19]). For a D × d random matrix with independent standard normal random variables, such as B⊤, we have with probability 1 −δ (see [19] for more details) smin(B⊤) ≥ √ D − √ d − p 2 log(2/δ)  . (11) From Eq. 11 and the relation between ξ and smin(B⊤), we obtain ξ ≥D d 1 − r d D − r 2 log(2/δ) D !2 , (12) with probability 1 −δ. The claim follows by replacing the bound for ξ from Eq. 12 in Eq. 10. The result of Lemma 2 is for Gaussian random matrices. However, it would be possible to extend this result using non-asymptotic bounds for the extreme singular values of more general random matrices [19]. Note that in Eq. 9, D/d is always greater than 1 and the term in the parenthesis approaches 1 for large values of D. Thus, we can conclude that with high probability the smallest eigenvalue χ of the Gram matrix H of the randomly generated low-dimensional space G is bigger than the smallest eigenvalue ω of the Gram matrix G of the high-dimensional space F. Lemma 3. Let δ > 0 and F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2 with D > d+2 p 2d log(2/δ)+2 log(2/δ). Let the elements of the projection matrix A be Gaussian random variables drawn from N(0, 1/d). Let the Markov chain Mπ admit a stationary distribution ρ. Let G be the Gram matrix according to ρ for space F and ω be its smallest eigenvalue. Let {Xt}n t=1 be a trajectory of length n generated by a stationary β-mixing process with stationary distribution ρ. If the number of samples n satisfies n > 288L2 d Λ(n, d, δ/2) ωD max Λ(n, d, δ/2) b , 1 1/κ 1 − r d D − r 2 log(2/δ) D !−2 , (13) where Λ(n, d, δ) = 2(d + 1) log n + log e δ + log+ max{18(6e)2(d+1), ¯β}  , then with probability 1 −δ, the features ψ1, . . . , ψd are linearly independent on the states {Xt}n t=1, i.e., ||gβ||n = 0 implies β = 0, and the smallest eigenvalue νn of the sample-based Gram matrix 1 nΨ⊤Ψ satisifies √νn ≥√ν = √ω 2 r D d  1 − r d D − s 2 log( 2 δ ) D  −6L v u u t2Λ(n, d, δ 2) n max ( Λ(n, d, δ 2) b , 1 )1/κ > 0 . (14) Proof. The proof follows similar steps as in Lemma 4 in [10]. A sketch of the proof is available in [6]. By comparing Eq. 13 with Eq. 13 in [10], we can see that the number of samples needed for the empirical Gram matrix 1 nΨ⊤Ψ in G to be invertible with high probability is less than that for its counterpart 1 nΦ⊤Φ in the high-dimensional space F. 4.3 Generalization Bound In this section, we show how Theorem 1 can be generalized to the entire state space X when the Markov chain Mπ has a stationary distribution ρ. We consider the case in which the samples {Xt}n t=1 are obtained by following a single trajectory in the stationary regime of Mπ, i.e., when X1 is drawn from ρ. As discussed in Remark 2 of Section 4.1, it is reasonable to assume that the highdimensional space F contains functions that are able to perfectly fit the value function V in any finite number n (n < D) of states {Xt}n t=1, thus we state the following theorem under Assumption 1. 6 Theorem 2. Let δ > 0 and F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2 with d ≥15 log(8n/δ). Let {Xt}n t=1 be a path generated by a stationary β-mixing process with stationary distribution ρ. Let ˆV be the LSTD-RP solution in the random space G. Then under Assumption 1, with probability 1 −δ (w.r.t. the random sample path and the random space), ||V −T( ˆV )||ρ ≤ 2 p 1 −γ2 r 8 log(24n/δ) d m(ΠFV ) + 2γVmaxL 1 −γ r d ν r 8 log(12d/δ) n + 1 n  + ϵ , (15) where ν is a lower bound on the eigenvalues of the Gram matrix 1 nΨ⊤Ψ defined by Eq. 14 and ϵ = 24Vmax s 2Λ(n, d, δ/3) n max Λ(n, d, δ/3) b , 1 1/κ . with Λ(n, d, δ) defined as in Lemma 3. Note that T in Eq. 15 is the truncation operator defined in Section 2. Proof. The proof is a consequence of applying concentration of measures inequalities for β-mixing processes and linear spaces (see Corollary 18 in [10]) on the term ||V −T( ˆV )||n, using the fact that ||V −T( ˆV )||n ≤||V −ˆV ||n, and using the bound of Corollary 1. The bound of Corollary 1 and the lower bound on ν, each one holding with probability 1 −δ′, thus, the statement of the theorem (Eq. 15) holds with probability 1 −δ by setting δ = 3δ′. Remark 1. An interesting property of the bound in Theorem 2 is that the approximation error of V in space F, ||V −ΠFV ||ρ, does not appear and the error of the LSTD solution in the randomly projected space only depends on the dimensionality d of G and the number of samples n. However this property is valid only when Assumption 1 holds, i.e., at most for n ≤D. An interesting case here is when the dimension of F is infinite (D = ∞), so that the bound is valid for any number of samples n. In [15], two approximation spaces F of infinite dimension were constructed based on a multi-resolution set of features that are rescaled and translated versions of a given mother function. In the case that the mother function is a wavelet, the resulting features, called scrambled wavelets, are linear combinations of wavelets at all scales weighted by Gaussian coefficients. As a results, the corresponding approximation space is a Sobolev space Hs(X) with smoothness of order s > p/2, where p is the dimension of the state space X. In this case, for a function fα ∈Hs(X), it is proved that the ℓ2-norm of the parameter α is equal to the norm of the function in Hs(X), i.e., ||α||2 = ||fα||Hs(X). We do not describe those results further and refer the interested readers to [15]. What is important about the results of [15] is that it shows that it is possible to consider infinite dimensional function spaces for which supx ||φ(x)||2 is finite and ||α||2 is expressed in terms of the norm of fα in F. In such cases, m(ΠFV ) is finite and the bound of Theorem 2, which does not contain any approximation error of V in F, holds for any n. Nonetheless, further investigation is needed to better understand the role of ||fα||Hs(X) in the final bound. Remark 2. As discussed in the introduction, regularization methods have been studied in solving high-dimensional RL problems. Therefore, it is interesting to compare our results for LSTD-RP with those reported in [4] for ℓ2-regularized LSTD. Under Assumption 1, when D = ∞, by selecting the features as described in the previous remark and optimizing the value of d as in Eq. 7, we obtain ||V −T( ˆV )||ρ ≤O q ||fα||Hs(X) n−1/4 . (16) Although the setting considered in [4] is different than ours (e.g., the samples are i.i.d.), a qualitative comparison of Eq. 16 with the bound in Theorem 2 of [4] shows a striking similarity in the performance of the two algorithms. In fact, they both contain the Sobolev norm of the target function and have a similar dependency on the number of samples with a convergence rate of O(n−1/4) (when the smoothness of the Sobolev space in [4] is chosen to be half of the dimensionality of X). This similarity asks for further investigation on the difference between ℓ2-regularized methods and random projections in terms of prediction performance and computational complexity. 5 LSPI with Random Projections In this section, we move from policy evaluation to policy iteration and provide a performance bound for LSPI with random projections (LSPI-RP), i.e., a policy iteration algorithm that uses LSTD-RP at each iteration. LSPI-RP starts with an arbitrary initial value function V−1 ∈B(X; Vmax) and its corresponding greedy policy π0. At the first iteration, it approximates V π0 using LSTD-RP and 7 returns a function ˆV0, whose truncated version ˜V0 = T( ˆV0) is used to build the policy for the second iteration. More precisely, π1 is a greedy policy w.r.t. ˜V0. So, at each iteration k, a function ˆVk−1 is computed as an approximation to V πk−1, and then truncated, ˜Vk−1, and used to build the policy πk.1 Note that in general, the measure σ ∈S(X) used to evaluate the final performance of the LSPIRP algorithm might be different from the distribution used to generate samples at each iteration. Moreover, the LSTD-RP performance bounds require the samples to be collected by following the policy under evaluation. Thus, we need Assumptions 1-3 in [10] in order to 1) define a lowerbounding distribution µ with constant C < ∞, 2) guarantee that with high probability a unique LSTD-RP solution exists at each iteration, and 3) define the slowest β-mixing process among all the mixing processes Mπk with 0 ≤k < K. Theorem 3. Let δ > 0 and F and G be linear spaces with dimensions D and d (d < D) as defined in Section 2 with d ≥15 log(8Kn/δ). At each iteration k, we generate a path of size n from the stationary β-mixing process with stationary distribution ρk−1 = ρπk−1. Let n satisfy the condition in Eq. 13 for the slower β-mixing process. Let V−1 be an arbitrary initial value function, ˆV0, . . . , ˆVK−1 ( ˜V0, . . . , ˜VK−1) be the sequence of value functions (truncated value functions) generated by LSPIRP, and πK be the greedy policy w.r.t. ˜VK−1. Then, under Assumption 1 and Assumptions 1-3 in [10], with probability 1 −δ (w.r.t. the random samples and the random spaces), we have ||V ∗−V πK||σ ≤ 4γ (1 −γ)2 ( (1 + γ) p CCσ,µ " 2Vmax p 1 −γ2 s C ωµ r 8 log(24Kn/δ) d sup x∈X ||φ(x)||2 (17) + 2γVmaxL 1 −γ s d νµ r 8 log(12Kd/δ) n + 1 n  + E # + γ K−1 2 Rmax ) , where Cσ,µ is the concentrability term from Definition 2 in [1], ωµ is the smallest eigenvalue of the Gram matrix of space F w.r.t. µ, νµ is ν from Eq. 14 in which ω is replaced by ωµ, and E is ϵ from Theorem 2 written for the slowest β-mixing process. Proof. The proof follows similar lines as in the proof of Thm. 8 in [10] and is available in [6]. Remark. The most critical issue about Theorem 3 is the validity of Assumptions 1-3 in [10]. It is important to note that Assumption 1 is needed to bound the performance of LSPI independent from the use of random projections (see [10]). On the other hand, Assumption 2 is explicitly related to random projections and allows us to bound the term m(ΠFV ). In order for this assumption to hold, the features {ϕj}D j=1 of the high-dimensional space F should be carefully chosen so as to be linearly independent w.r.t. µ. 6 Conclusions Learning in high-dimensional linear spaces is particularly appealing in RL because it allows to have a very accurate approximation of value functions. Nonetheless, the larger the space, the higher the need of samples and the risk of overfitting. In this paper, we introduced an algorithm, called LSTD-RP, in which LSTD is run in a low-dimensional space obtained by a random projection of the original high-dimensional space. We theoretically analyzed the performance of LSTD-RP and showed that it solves the problem of overfitting (i.e., the estimation error depends on the value of the low dimension) at the cost of a slight worsening in the approximation accuracy compared to the high-dimensional space. We also analyzed the performance of LSPI-RP, a policy iteration algorithm that uses LSTD-RP for policy evaluation. The analysis reported in the paper opens a number of interesting research directions such as: 1) comparison of LSTD-RP to ℓ2 and ℓ1 regularized approaches, and 2) a thorough analysis of the case when D = ∞and the role of ||fα||Hs(X) in the bound. Acknowledgments This work was supported by French National Research Agency through the projects EXPLO-RA n◦ANR-08-COSI-004 and LAMPADA n◦ANR-09-EMER-007, by Ministry of Higher Education and Research, Nord-Pas de Calais Regional Council and FEDER through the “contrat de projets ´etat region 2007–2013”, and by PASCAL2 European Network of Excellence. 1Note that the MDP model is needed to generate a greedy policy πk. In order to avoid the need for the model, we can simply move to LSTD-Q with random projections. Although the analysis of LSTD-RP can be extended to action-value functions and LSTD-RP-Q, for simplicity we use value functions in the following. 8 References [1] A. Antos, Cs. Szepesvari, and R. Munos. Learning near-optimal policies with Bellman-residual minimization based fitted policy iteration and a single sample path. Machine Learning Journal, 71:89–129, 2008. [2] J. Boyan. Least-squares temporal difference learning. Proceedings of the 16th International Conference on Machine Learning, pages 49–56, 1999. [3] S. Bradtke and A. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22:33–57, 1996. [4] A. M. Farahmand, M. Ghavamzadeh, Cs. Szepesv´ari, and S. Mannor. Regularized policy iteration. In Proceedings of Advances in Neural Information Processing Systems 21, pages 441–448. MIT Press, 2008. [5] A. M. Farahmand, M. Ghavamzadeh, Cs. Szepesv´ari, and S. Mannor. Regularized fitted Qiteration for planning in continuous-space Markovian decision problems. In Proceedings of the American Control Conference, pages 725–730, 2009. [6] M. Ghavamzadeh, A. Lazaric, O. Maillard, and R. Munos. LSPI with random projections. Technical Report inria-00530762, INRIA, 2010. [7] P. Keller, S. Mannor, and D. Precup. Automatic basis function construction for approximate dynamic programming and reinforcement learning. In Proceedings of the Twenty-Third International Conference on Machine Learning, pages 449–456, 2006. [8] Z. Kolter and A. Ng. Regularization and feature selection in least-squares temporal difference learning. In Proceedings of the Twenty-Sixth International Conference on Machine Learning, pages 521–528, 2009. [9] M. Lagoudakis and R. Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4:1107–1149, 2003. [10] A. Lazaric, M. Ghavamzadeh, and R. Munos. Finite-sample analysis of least-squares policy iteration. Technical Report inria-00528596, INRIA, 2010. [11] A. Lazaric, M. Ghavamzadeh, and R. Munos. Finite-sample analysis of LSTD. In Proceedings of the Twenty-Seventh International Conference on Machine Learning, pages 615–622, 2010. [12] M. Loth, M. Davy, and P. Preux. Sparse temporal difference learning using lasso. In IEEE Symposium on Approximate Dynamic Programming and Reinforcement Learning, pages 352– 359, 2007. [13] S. Mahadevan. Representation policy iteration. In Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence, pages 372–379, 2005. [14] O. Maillard and R. Munos. Compressed least-squares regression. In Proceedings of Advances in Neural Information Processing Systems 22, pages 1213–1221, 2009. [15] O. Maillard and R. Munos. Brownian motions and scrambled wavelets for least-squares regression. Technical Report inria-00483014, INRIA, 2010. [16] I. Menache, S. Mannor, and N. Shimkin. Basis function adaptation in temporal difference reinforcement learning. Annals of Operations Research, 134:215–238, 2005. [17] R. Parr, C. Painter-Wakefield, L. Li, and M. Littman. Analyzing feature generation for valuefunction approximation. In Proceedings of the Twenty-Fourth International Conference on Machine Learning, pages 737–744, 2007. [18] M. Petrik, G. Taylor, R. Parr, and S. Zilberstein. Feature selection using regularization in approximate linear programs for Markov decision processes. In Proceedings of the TwentySeventh International Conference on Machine Learning, pages 871–878, 2010. [19] M. Rudelson and R. Vershynin. Non-asymptotic theory of random matrices: extreme singular values. In Proceedings of the International Congress of Mathematicians, 2010. [20] R. Sutton and A. Barto. Reinforcement Learning: An Introduction. MIP Press, 1998. [21] S. Vempala. The Random Projection Method. American Mathematical Society, 2004. 9
2010
204
3,971
Feature Construction for Inverse Reinforcement Learning Sergey Levine Stanford University svlevine@cs.stanford.edu Zoran Popovi´c University of Washington zoran@cs.washington.edu Vladlen Koltun Stanford University vladlen@cs.stanford.edu Abstract The goal of inverse reinforcement learning is to find a reward function for a Markov decision process, given example traces from its optimal policy. Current IRL techniques generally rely on user-supplied features that form a concise basis for the reward. We present an algorithm that instead constructs reward features from a large collection of component features, by building logical conjunctions of those component features that are relevant to the example policy. Given example traces, the algorithm returns a reward function as well as the constructed features. The reward function can be used to recover a full, deterministic, stationary policy, and the features can be used to transplant the reward function into any novel environment on which the component features are well defined. 1 Introduction Inverse reinforcement learning aims to find a reward function for a Markov decision process, given only example traces from its optimal policy. IRL solves the general problem of apprenticeship learning, in which the goal is to learn the policy from which the examples were taken. The MDP formalism provides a compact method for specifying a task in terms of a reward function, and IRL further simplifies task specification by requiring only a demonstration of the task being performed. However, current IRL methods generally require not just expert demonstrations, but also a set of features or basis functions that concisely capture the structure of the reward function [1, 7, 9, 10]. Incorporating feature construction into IRL has been recognized as an important problem for some time [1]. It is often easier to enumerate all potentially relevant component features (“components”) than to manually specify a set of features that is both complete and fully relevant. For example, when emulating a human driver, it is easier to list all known aspects of the environment than to construct a complete and fully relevant reward basis. The difficulty of performing IRL given only such components is that many of them may have important logical relationships that make it impossible to represent the reward function as their linear combination, while enumerating all possible relationships is intractable. In our example, some of the components, like the color of the road, may be irrelevant. Others, like the car’s speed and the presence of police, might have an important logical relationship for a driver who prefers to speed. We present an IRL algorithm that constructs reward features out of a large collection of component features, many of which may be irrelevant for the expert’s policy. The Feature construction for Inverse Reinforcement Learning (FIRL) algorithm constructs features as logical conjunctions of the components that are most relevant for the observed examples, thus capturing their logical relationships. At the same time, it finds a reward function for which the optimal policy matches 1 the examples. The reward function can be used to recover a deterministic, stationary policy for the expert, and the features can be used to transplant the reward to any novel environment on which the component features are well defined. In this way, the features act as a portable explanation for the expert’s policy, enabling the expert’s behavior to be predicted in unfamiliar surroundings. 2 Algorithm Overview We define a Markov decision process as M = {S, A, θ, γ, R}, where S is a state space, A is a set of actions, θsas′ is the probability of a transition from s ∈S to s′ ∈S under action a ∈A, γ ∈[0, 1) is a discount factor, and R(s, a) is a reward function. The optimal policy π∗is the policy that maximizes the expected discounted sum of rewards E [P∞ t=0 γtR(st, at)|π∗, θ]. FIRL takes as input M\R, as well as a set of traces from π∗, denoted by D = {(s1,1, a1,1), ..., (sn,T , an,T )}, where si,t is the tth state in the ith trace. FIRL also accepts a set of component features of the form δ : S →Z, which are used to construct a set of relevant features for representing R. The algorithm iteratively constructs both the features and the reward function. Each iteration consists of an optimization step and a fitting step. The algorithm begins with an empty feature set Φ(0). The optimization step of the ith iteration computes a reward function R(i) using the current set of features Φ(i−1), and the following fitting step determines a new set of features Φ(i). The objective of the optimization step is to find a reward function R(i) that best fits the last feature hypothesis Φ(i−1) while remaining consistent with the examples D. This appears similar to the objective of standard IRL methods. However, prior IRL algorithms generally minimize some measure of deviation from the examples, subject to the constraints of the provided features [1, 7, 8, 9, 10]. In contrast, the FIRL optimization step aims to discover regions where the current features are insufficient, and must be able to step outside of the constraints of the these features. To this end, the reward function R(i) is found by solving a quadratic program, with constraints that keep R(i) consistent with D, and an objective that penalizes the deviation of R(i) from its projection onto the linear basis formed by the features Φ(i−1). The fitting step analyzes the reward function R(i) to generate a new feature hypothesis Φ(i) that better captures the variation in the reward function. Intuitively, the regions where R(i) is poorly represented by Φ(i−1) correspond to features that must be refined further, while regions where different features take on similar rewards are indicative of redundant features that should be merged. The hypothesis is constructed by building a regression tree on S for R(i), with the components acting as tests at each node. Each leaf ℓcontains some subset of S, denoted φℓ. The new features are the set of indicator functions for membership in φℓ. A simple explanation of the reward function is often more likely to be the correct one [7], so we prefer the smallest tree that produces a sufficiently rich feature set to represent a reward function consistent with the examples. To obtain such a tree, we stop subdividing a node ℓwhen setting the reward for all states in φℓto their average induces an optimal policy consistent with the examples. The constructed features are iteratively improved through the interaction between the optimization and fitting steps. Since the optimization is constrained to be consistent with D, if the current set of features is insufficient to represent a consistent reward function, R(i) will not be well-represented by the features Φ(i−1). This intra-feature reward variance is detected in the fitting step, and the features that were insufficiently refined are subdivided further, while redundant features that have little variance between them are merged. 3 Optimization Step During the ith optimization step, we compute a reward function R(i) using the examples D and the current feature set Φ(i−1). This reward function is chosen so that the optimal policy under the reward is consistent with the examples D and so that it minimizes the sum of squared errors between R(i) and its projection onto the linear basis of features Φ(i−1). Formally, let TR→Φ be a |Φ(i−1)| by |S| matrix for which TR→Φ(φ, s) = |φ|−1 if s ∈φ, and 0 otherwise, and let TΦ→R be a |S| by |Φ(i−1)| matrix for which TΦ→R(s, φ) = 1 if s ∈φ, and 0 otherwise. Thus, TΦ→RTR→ΦR is a vector where 2 the reward in each state is the average over all rewards in the feature that state belongs to. Letting πR denote the optimal policy under R, the reward optimization problem can be expressed as: min R ∥R −TΦ→RTR→ΦR∥2 s.t. πR(s) = a ∀(s, a) ∈D (1) Unfortunately, the constraint (1) is not convex, making it difficult to solve the optimization efficiently. We can equivalently express it in terms of the value function corresponding to R as V (s) = R(s, a) + γ X s′ θsas′V (s′) ∀(s, a) ∈D V (s) = max a R(s, a) + γ X s′ θsas′V (s′) ∀s ∈S (2) These constraints are also not convex, but we can construct a convex relaxation by using a pseudovalue function that bounds the value function from above, replacing (2) with the linear constraint V (s) ≥R(s, a) + γ X s′ θsas′V (s′) ∀s /∈D In the special case that the MDP transition probabilities θ are deterministic, these constraints are equivalent to the original constraint (1). We prove this by considering the true value function V ∗obtained by value iteration, initialized with the pseudo-value function V . Let V ′ be the result obtained by performing one step of value iteration. Note that V ′(s) ≤V (s) for all s ∈S: since V (s) ≥R(s, a) + γ P s′ θsas′V (s′), we must have V (s) ≥maxa [R(s, a) + γ P s′ θsas′V (s′)] = V ′(s). Since the MDP is deterministic and the example set D consists of traces from the optimal policy, we have a unique next state for each stateaction pair. Let (si,t, ai,t) ∈D be the tth state-action pair from the ith expert trace. Since the constraints ensure that V (si,t) = maxa [R(si,t, a) + γV (si,t+1)], we have V ′(si,t) = V (si,t) for all i, t, and since V ′(s) for s /∈D can only decrease, we know that the optimal actions in all si,t must remain the same. Therefore, for each example state si,t, ai,t remains the optimal action under the true value function V ∗, and the convex relaxation is equivalent to the original constraint (1). In the case that θ is not deterministic, not all successors of an example state si,t are always observed, and their values under the pseudo-value function may not be sufficiently constrained. However, empirical tests presented in Figure 2(b) suggest that the constraint (1) is rarely violated under the convex relaxation, even in highly non-deterministic MDPs. In practice, we prefer a reward function under which the examples are not just part of an optimal policy, but are part of the unique optimal policy [7]. To prevent rewards under which example actions “tie” for the optimal choice, we require that ai,t be better than all other actions in state si,t by some margin ε, which we accomplish by adding ε to all inequality constraints for state si,t. The precise value of ε is not important, since changing it only scales the reward function by a constant. All of the constraints in the final optimization are sparse, but the matrix TΦ→RTR→Φ in the original objective can be arbitrarily dense (if, for instance, there is only one feature which contains all states). Since both TΦ→R and TR→Φ are sparse, and in fact only contain |S||A| non-zero entries, we can make the optimization fully sparse by introducing a new set of variables RΦ defined as RΦ = TR→ΦR, yielding the sparse objective ∥R −TΦ→RRΦ∥2. Recall that the fitting step must determine not only which features must be refined further, but also which features can be merged. We therefore add a second term to the objective to discourage nearby features from taking on different values when it is unnecessary. To that end, we construct a sparse matrix N, where each row k of N corresponds to a pair of features φk1 and φk2 (for a total of K rows). We define N as Nk,φk1 = −Nk,φk2 = ∆(φk1, φk2), so that [NRΦ]k = (RΦφk1 −RΦφk2)∆(φk1, φk2). The loss factor ∆(φk1, φk2) indicates how much we believe a priori that the features φk1 and φk2 should be merged, and is discussed further in Section 4. Since the purpose of the added term is to allow superfluous features to be merged because they take on similar values, we prefer for a feature to be very similar to one of its neighbors, rather than to have minimal distance to all of them. We therefore use a linear rather than quadratic penalty. Since we would like to make nearby features similar so long as it does not adversely impact the primary objective, we give this adjacency penalty a low weight. In our implementation, this weight was set to 3 wN = 10−5. Normalizing the two objectives by the number of entries, we get the following sparse quadratic program: min R,RΦ,V 1 |S||A|∥R −TΦ→RRΦ∥2 2 + wN K ∥NRΦ∥1 s.t. RΦ = TR→ΦR V (s) = R(s, a) + γ X s′ θsas′V (s′) ∀(s, a) ∈D V (s) ≥R(s, a) + γ X s′ θsas′V (s′) + ε ∀s ∈D, (s, a) /∈D V (s) ≥R(s, a) + γ X s′ θsas′V (s′) ∀s /∈D This program can be solved efficiently with any quadratic programming solver. It contains on the order of |S||A| variables and constraints, and the constraint matrix is sparse with O(|S||A|µa) nonzero entries, where µa is the average sparsity of θsa — that is, the average number of states s′ that have a non-zero probability of being reached from s using action a. In our implementation, we use the cvx Matlab package [6] to solve this optimization efficiently. 4 Fitting Step Once the reward function R(i) for the current feature set Φ(i−1) is computed, we formulate a new feature hypothesis Φ(i) that is better able to represent this reward function. The objective of this step is to construct a set of features that gives greater resolution in regions where the old features are too coarse, and lower resolution in regions where the old features are unnecessarily fine. We obtain Φ(i) by building a regression tree for R(i) over the state-space S, using the standard intra-cluster variance splitting criterion [3]. The tree is rooted at the node t0, and each node of the tree is defined as tj = {δj, φj, tj−, tj+}. tj−and tj+ are the left and right subtrees, φj ⊆S is the set of states belonging to node j (initialized as φ0 = S), and δj is the component feature that acts as the splitting test at node j. States s ∈φj for which δj(s) = 0 are assigned to the left subtree, and states for which δj(s) = 1 are assigned to the right subtree. In our implementation, all component features are binary, though the generalization to multivariate components and non-binary trees is straightforward. The new set of features consists of indicators for each of the leaf clusters φℓ(where tℓis a leaf node), and can be equivalently expressed as a conjunction of components: letting j0, ..., jn, ℓbe the sequence of nodes on the path from the root to tℓ, and defining r0, ..., rn so that rk is 1 if tjk+1 = tjk+ and 0 otherwise, s ∈φℓif and only if δjk(s) = rk for all k ∈{0, ..., n}. As discussed in Section 2, we prefer the smallest tree that produces a rich enough feature set to represent a reward function consistent with the examples D. We therefore terminate the splitting procedure at node tℓwhen we detect that further splitting of the node is unnecessary to maintain consistency with the example set. This is done by constructing a new reward function ˆR(i) for which ˆR(i)(s, a) = |φℓ|−1 P s∈φℓR(i)(s, a) if s ∈φℓ, and ˆR(i)(s, a) = R(i)(s, a) otherwise. The optimal policy under ˆR(i) is determined with value iteration and, if the policy is consistent with the examples D, tℓbecomes a leaf and R(i) is updated to be equal to ˆR(i). Although value iteration ordinarily can take many iterations, since the changes we are considering often make small, local changes to the optimal policy compared to the current reward function R(i), we can often converge in only a few iterations by starting with the value function V (i) for the current reward R(i). We therefore store this value function and update it along with R(i). In addition to this stopping criterion, we can also employ the loss factor ∆(φk1, φk2) to encourage the next optimization step to assign similar values to nearby features, allowing them to be merged in subsequent iterations. Recall that ∆(φk1, φk2) is a linear penalty on the difference between the average rewards of states in φk1 and φk2, and can be used to drive the rewards in these features closer together so that they can be merged in a subsequent iteration. Features found deeper in the tree exhibit greater complexity, since they are formed by a conjunction of a larger number of components. These complex features are more likely to be the result of overfitting, and can be merged to form smaller trees. To encourage such mergers, we set ∆(φk1, φk2) to be proportional 4 Gridworld Total LPAL MMP Abbeel & Ng FIRL Optimization Fitting size states (sec) (sec) (sec) (sec total) (sec each) (sec each) 16×16 256 0.29 0.24 27.05 8.34 0.39 0.11 32×32 1024 0.66 0.42 74.66 29.00 1.01 0.73 64×64 4096 2.22 1.26 272.10 165.29 4.26 5.80 128×128 16384 19.33 7.58 876.18 1208.47 24.44 48.44 256×256 65536 52.60 81.26 1339.87 10389.59 170.14 428.49 Table 1: Performance comparison of FIRL, LPAL, MMP, and Abbeel & Ng on gridworlds of varying size. FIRL ran for 15 iterations. Individual iterations were comparable in length to prior methods. to the depth of the deepest common ancestor of φk1 and φk2. The loss factor is therefore set to ∆(φk1, φk2) = Da(k1, k2)/Dt, where Da gives the depth of the deepest common ancestor of two nodes, and Dt is the total depth of the tree. Finally, we found that limiting the depth of the tree and iteratively increasing that limit reduced overfitting and produced features that more accurately described the true reward function, since the optimization and fitting steps could communicate more frequently before committing to a set of complex features. We therefore begin with a depth limit of one, and increase the limit by one on each successive iteration. We experimented with a variety of other depth limiting schemes and found that this simple iterative deepening procedure produced the best results. 5 Experiments 5.1 Gridworld In the first experiment, we compare FIRL with the MMP algorithm [9], the LPAL algorithm [10], and the algorithm of Abbeel & Ng [1] on a gridworld modeled after the one used by Abbeel & Ng. The purpose of this experiment is to determine how well FIRL performs on a standard IRL example, without knowledge of the relevant features. A gridworld consists of an N×N grid of states, with five actions possible in each state, corresponding to movement in each of the compass directions and standing in place. In the deterministic gridworld, each action deterministically moves the agent into the corresponding state. In the non-deterministic world, each action has a 30% chance of causing a transition to another random neighboring state. The world is partitioned into 64 equal-sized regions, and all the cells in a single region are assigned the same randomly selected reward. The expert’s policy is the optimal policy under this reward. The example set D is generated by randomly sampling states and following the expert’s policy for 100 steps. Since the prior algorithms do not perform feature construction, they were tested either with indicators for each of the 64 regions (referred to as “perfect” features), or with indicators for each state (the “primitive” features). FIRL was instead provided with 2N component features corresponding to splits on the x and y axes, so that δx,i(sx,y) = 1 if x ≥i, and δy,i(sx,y) = 1 if y ≥i. By composing such splits, it is possible to represent any rectangular partitioning of the state space. We first compare the running times of the algorithms (using perfect features for prior methods) on gridworlds of varying sizes, shown in Table 1. Performance was tested on an Intel Core i7 2.66 GHz computer. Each trial was repeated 10 times on random gridworlds, with average running times presented. For FIRL, running time is given for 15 iterations, and is also broken down into the average length of each optimization and fitting step. Although FIRL is often slower than methods that do not perform feature construction, the results suggest that it scales gracefully with the size of the problem. The optimization time scales almost linearly, while the tree construction scales worse than linearly but better than quadratically. The latter can likely be improved for large problems by using heuristics to minimize evaluations of the expensive stopping test. In the second experiment, shown in Figure 1, we evaluate accuracy on 64×64 gridworlds with varying numbers of examples, again repeating each trial 10 times. We measured the percentage of states in which each algorithm failed to predict the expert’s optimal action (“percent misprediction”), as well as the Euclidean distance between the expectations of the perfect features under the learned policy and the expert’s policy (normalized by (1 −γ) as suggested by Abbeel & Ng [1]). For the mixed policies produced by Abbeel & Ng, we computed the metrics for each policy and mixed them using the policy weights λ [1]. For the non-deterministic policies of LPAL, percent misprediction is 5 deterministic percent misprediction examples 2 4 8 16 32 64 128 256 512 0% 10% 20% 30% 40% 50% 60% deterministic percent misprediction examples 2 4 8 16 32 64 128 256 512 0% 10% 20% 30% 40% 50% 60% deterministic feature expectation dist examples 2 4 8 16 32 64 128 256 512 0 0.05 0.1 0.15 0.2 deterministic feature expectation dist examples 2 4 8 16 32 64 128 256 512 0 0.05 0.1 0.15 0.2 non-deterministic percent misprediction examples 2 4 8 16 32 64 128 256 512 0% 10% 20% 30% 40% 50% 60% non-deterministic percent misprediction examples 2 4 8 16 32 64 128 256 512 0% 10% 20% 30% 40% 50% 60% non-deterministic feature expectation dist examples 2 4 8 16 32 64 128 256 512 0 0.05 0.1 0.15 0.2 A&N prim. A&N perf. LPAL prim. LPAL perf. MMP prim. MMP perf. FIRL non-deterministic feature expectation dist examples 2 4 8 16 32 64 128 256 512 0 0.05 0.1 0.15 0.2 Figure 1: Accuracy comparison between FIRL, LPAL, MMP, and Abbeel & Ng, the latter provided with either perfect or primitive features. Shaded regions show standard error. Although FIRL was not provided the perfect features, it achieved similar accuracy to prior methods that were. the mean probability of taking an incorrect action in each state. Results for prior methods are shown with both the perfect and primitive features. FIRL again ran for 15 iterations, and generally achieved comparable accuracy to prior algorithms, even when they were provided with perfect features. 5.2 Transfer Between Environments While the gridworld experiments demonstrate that FIRL performs comparably to existing methods on this standard example, even without knowing the correct features, they do not evaluate the two key advantages of FIRL: its ability to construct features from primitive components, and its ability to generalize learned rewards to different environments. To evaluate reward transfer and see how the method performs with more realistic component features, we populated a world with objects. This environment also consists of an N×N grid of states, with the same actions as the gridworld. Objects are randomly placed with 5% probability in each state, and each object has 1 of C “inner” and “outer” colors, selected uniformly at random. The algorithm was provided with components of the form “is the nearest X at most n units away,” where X is a wall or an object with a specific inner or outer color, giving a total of (2C + 1)N component features. The expert received a reward of −2 for being within 3 units of an object with inner color 1, otherwise a reward of −1 for being within 2 units of a wall, otherwise a reward of 1 for being within 1 unit of an object with inner color 2, and 0 otherwise. All other colors acted as distractors, allowing us to evaluate the robustness of feature construction to irrelevant components. For each trial, the learned reward tree was used to test accuracy on 10 more random environments, by specifying a reward for each state according to the regression tree. We will refer to these experiments as “transfer.” Each trial was repeated 10 times. convergence analysis iterations percent misprediction 2 4 6 8 10 12 14 16 18 20 0% 10% 20% 30% 40% 50% 60% 70% 80% FIRL with objects FIRL transfer FIRL gridworld convergence analysis iterations percent misprediction 2 4 6 8 10 12 14 16 18 20 0% 10% 20% 30% 40% 50% 60% 70% 80% Figure 2(a): FIRL converged after a small number of iterations. constraint violation β percent violation 0.2 0.4 0.6 0.8 1 0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% constraint violation β percent violation 0.2 0.4 0.6 0.8 1 0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% Figure 2(b): Constraint violation was low in nondeterministic MDPs. In Figure 2(a), we evaluate how FIRL performs with varying numbers of iterations on both the training and transfer environments, as well as on the gridworld from the previous section. The results indicate that FIRL converged to a stable hypothesis more quickly than in the gridworld, since the square regions in the gridworld required many more partitions than the objectrelative features. However, the required number of iterations was low on both environments. In Figure 2(b), we evaluate how often the nonconvex constraints discussed in Section 3 are violated under our convex approximation. We measure the percent of examples that are violated with varying amounts of non-determinism, by varying the probability β with which an action moves the agent to the desired state. β = 1 is deterministic, and β = 0.2 gives a uniform distribution over neighboring states. The results suggest that the constraint is rarely violated under the convex relaxation, even in highly non-deterministic MDPs, and the number of violations decreases sharply as the MDP becomes more deterministic. We compared FIRL’s accuracy on the transfer task with Abbeel & Ng and MMP. LPAL was not used in the comparison because it does not return a reward function, and therefore cannot transfer 6 deterministic colors percent misprediction 2 8 14 20 0% 10% 20% 30% 40% 50% 60% A&N MMP FIRL A&N transfer MMP transfer FIRL transfer deterministic colors percent misprediction 2 8 14 20 0% 10% 20% 30% 40% 50% 60% deterministic colors feature expectation dist 2 8 14 20 0 0.05 0.1 0.15 0.2 0.25 0.3 deterministic colors feature expectation dist 2 8 14 20 0 0.05 0.1 0.15 0.2 0.25 0.3 non-deterministic colors percent misprediction 2 8 14 20 0% 10% 20% 30% 40% 50% 60% non-deterministic colors percent misprediction 2 8 14 20 0% 10% 20% 30% 40% 50% 60% non-deterministic colors feature expectation dist 2 8 14 20 0 0.05 0.1 0.15 0.2 0.25 0.3 non-deterministic colors feature expectation dist 2 8 14 20 0 0.05 0.1 0.15 0.2 0.25 0.3 Figure 3: Comparison of FIRL and Abbeel & Ng on training environments and randomly generated transfer environments, with increasing numbers of component features. FIRL maintained higher transfer accuracy in the presence of distractors by constructing features out of relevant components. its policy to new environments. Since prior methods do not perform feature construction, they were provided with all of the component features. The experiments used 64×64 environments and 64 examples. The number of colors C was varied from 2 to 20 to test how well the algorithms handle irrelevant “distractors.” FIRL ran for 10 iterations on each trial. The results in Figure 3 indicate that accuracy on the training environment remained largely stable, while transfer accuracy gradually decreased with more colors due to the ambiguity caused by large numbers of distractors. Prior algorithms were more affected by distractors on the training environments, and their inability to construct features prevented them from capturing a portable “explanation” of the expert’s reward. They therefore could not transfer the learned policy to other environments with comparable accuracy. In contrast to the gridworld experiments, the expert’s reward function in these environments was encoded in terms of logical relationships between the component features, which standard IRL algorithms cannot capture. In the next section, we examine another environment that also exemplifies the need for feature construction. 5.3 Highway Driving Behaviors To demonstrate FIRL’s ability to learn meaningful behaviors, we implemented a driving simulator inspired by the environments in [1] and [10]. The task is to navigate a car on a three-lane highway. All other vehicles are moving at speed 1. The agent can drive at speeds 1 through 4, and can move one lane left or one lane right. The other vehicles can be cars or motorcycles, and can be either civilian or police, for a total of 4 possibilities. The component features take the form “is a vehicle of type X at most n car-lengths in front/behind me,” where X can be either all vehicles, cars, motorcycles, police, or civilian, and n is in the range from 0 to 5 car-lengths. There are equivalent features for checking for cars in front or behind in the lanes to the left and to the right of the agent’s, as well as a feature for each of the four speeds and each lane the agent can occupy. The rich feature set of this driving simulator enables interesting behaviors to be demonstrated. For this experiment, we implemented expert policies for two behaviors: a “lawful” driver and an “outlaw” driver. The lawful driver prefers to drive fast, but does not exceed speed 2 in the right lane, or speed 3 in the middle lane. The outlaw driver also prefers to drive fast, but slows down to speed 2 or below when within 2 car-lengths of a police vehicle (to avoid arrest). In Table 2, we compare the policies learned from traces of the two experts by FIRL, MMP, and Abbeel & Ng’s algorithm. As before, prior methods were provided with all of the component features. All algorithms were trained on 30 traces on a stretch of highway 100 car-lengths long, and tested on 10 novel highways. As can be seen in the supplemental videos, the policy learned by FIRL closely matched that of the expert, maintaining a high speed whenever possible but not driving fast in the wrong lane or near police vehicles. The policies learned by Abbeel & Ng’s algorithm and MMP drove at the minimum speed when trained on either the lawful or outlaw expert traces. Because prior methods only represented the reward as a linear combination of the provided features, they were unable to determine the logical connection between speed and the other features. The policies learned by these methods found the nearest “optimal” position with respect to their learned feature weights, accepting the cost of violating the speed expectation in exchange for best matching the expectation of all other (largely irrelevant) features. FIRL, on the other hand, correctly established 7 “Lawful” policies “Outlaw” policies percent misfeature expectaverage percent misfeature expectaverage prediction ation distance speed prediction ation distance speed Expert 0.0% 0.000 2.410 0.0% 0.000 2.375 FIRL 22.9% 0.025 2.314 24.2% 0.027 2.376 MMP 27.0% 0.111 1.068 27.2% 0.096 1.056 A&N 38.6% 0.202 1.054 39.3% 0.164 1.055 Random 42.7% 0.220 1.053 41.4% 0.184 1.053 Table 2: Comparison of FIRL, MMP and Abbeel & Ng on the highway environment (left). The policies learned by FIRL closely match the expert’s average speed, while those of other methods do not. The difference between the policies is particularly apparent in the supplemental videos, which can be found at http://graphics.stanford.edu/projects/firl/index.htm the logical connection between speed and police vehicles or lanes, and drove fast when appropriate, as indicated by the average speed in Table 2. As a baseline, the table also shows the performance of a random policy generated by picking weights for the component features uniformly at random. 6 Discussion and Future Work This paper presents an IRL algorithm that constructs reward features, represented as a regression tree, out of a large collection of component features. By combining relevant components into logical conjunctions, the FIRL algorithm is able to discover logical precedence relationships that would not otherwise be apparent. The learned regression tree concisely captures the structure of the reward function and acts as a portable “explanation” of the observed behavior in terms of the provided components, allowing the learned reward function to be transplanted onto different environments. Feature construction for IRL may be a valuable tool for analyzing the motivations of an agent (such as a human or an animal) from observed behavior. Research indicates that animals learn optimal policies for a pattern of rewards [4], suggesting that it may be possible to learn such behavior with IRL. While it can be difficult to manually construct a complete list of relevant reward features for such an agent, it is comparatively easier to list all aspects of the environment that a human or animal is aware of. With FIRL, such a list can be used to form hypotheses about reward features, possibly leading to increased understanding of the agent’s motivations. In fact, models that perform a variant of IRL have been shown to correspond well to goal inference in humans [2]. While FIRL achieves good performance on discrete MDPs, in its present form it is unable to handle continuous state spaces, since the optimization constraints require an enumeration of all states in S. Approximate linear programming has been used to solve MDPs with continuous state spaces [5], and a similar approach could be used to construct a tractable set of constraints for the optimization step, making it possible to perform feature construction on continuous or extremely large state spaces. Although we found that FIRL converged to a stable hypothesis quickly, it is difficult to provide an accurate convergence test. Theoretical analysis of convergence is complicated by the fact that regression trees provide few guarantees. The conventional training error metric is not a good measure of convergence, because the optimization constraints keep training error consistently low. Instead, we can use cross-validation, or heuristics such as leaf count and tree depth, to estimate convergence. In practice, we found this unnecessary, as FIRL consistently converged in very few iterations. Defining a practical convergence test and analyzing convergence is an interesting avenue for future work. FIRL may also benefit from future work on the fitting step. A more intelligent hypothesis proposal scheme, perhaps with a Bayesian approach, could more readily incorporate priors on potential features to penalize excessively deep trees or prevent improbable conjunctions of components. Furthermore, while regression trees provide a principled method for constructing logical conjunctions of component features, if the desired features are not readily expressible as conjunctions of simple components, other regression methods may be used in the fitting step. For example, the algorithm could be modified to perform feature adaptation by using the fitting step to adapt a set of continuously-parameterized features to best fit the reward function. Acknowledgments. We thank Andrew Y. Ng, Emanuel Todorov, and Sameer Agarwal for helpful feedback and discussion. This work was supported in part by NSF grant CCF-0641402. 8 References [1] P. Abbeel and A. Y. Ng. Apprenticeship learning via inverse reinforcement learning. In ICML ’04: Proceedings of the 21st International Conference on Machine Learning. ACM, 2004. [2] C. L. Baker, J. B. Tenenbaum, and R. R. Saxe. Goal inference as inverse planning. In Proceedings of the 29th Annual Conference of the Cognitive Science Society, 2007. [3] L. Breiman, J. Friedman, R. Olshen, and C. Stone. Classification and Regression Trees. Wadsworth and Brooks, Monterey, CA, 1984. [4] P. Dayan and B. W. Balleine. Reward, motivation, and reinforcement learning. Neuron, 36(2):285–298, 2002. [5] D. P. de Farias and B. Van Roy. The linear programming approach to approximate dynamic programming. Operations Research, 51(6):850–865, 2003. [6] M. Grant and S. Boyd. CVX: Matlab Software for Disciplined Convex Programming (web page and software), 2008. http://stanford.edu/˜boyd/cvx. [7] A. Y. Ng and S. J. Russell. Algorithms for inverse reinforcement learning. In ICML ’00: Proceedings of the 17th International Conference on Machine Learning, pages 663–670. Morgan Kaufmann Publishers Inc., 2000. [8] D. Ramachandran and E. Amir. Bayesian inverse reinforcement learning. In IJCAI’07: Proceedings of the 20th International Joint Conference on Artifical Intelligence, pages 2586–2591. Morgan Kaufmann Publishers Inc., 2007. [9] N. D. Ratliff, J. A. Bagnell, and M. A. Zinkevich. Maximum margin planning. In ICML ’06: Proceedings of the 23rd International Conference on Machine Learning, pages 729–736. ACM, 2006. [10] U. Syed, M. Bowling, and R. E. Schapire. Apprenticeship learning using linear programming. In ICML ’08: Proceedings of the 25th International Conference on Machine Learning, pages 1032–1039. ACM, 2008. 9
2010
205
3,972
An analysis on negative curvature induced by singularity in multi-layer neural-network learning Eiji Mizutani Department of Industrial Management Taiwan Univ. of Science & Technology eiji@mail.ntust.edu.tw Stuart Dreyfus Industrial Engineering & Operations Research University of California, Berkeley dreyfus@ieor.berkeley.edu Abstract In the neural-network parameter space, an attractive field is likely to be induced by singularities. In such a singularity region, first-order gradient learning typically causes a long plateau with very little change in the objective function value E (hence, a flat region). Therefore, it may be confused with “attractive” local minima. Our analysis shows that the Hessian matrix of E tends to be indefinite in the vicinity of (perturbed) singular points, suggesting a promising strategy that exploits negative curvature so as to escape from the singularity plateaus. For numerical evidence, we limit the scope to small examples (some of which are found in journal papers) that allow us to confirm singularities and the eigenvalues of the Hessian matrix, and for which computation using a descent direction of negative curvature encounters no plateau. Even for those small problems, no efficient methods have been previously developed that avoided plateaus. 1 Introduction Consider a general two-hidden-layer multilayer perceptron (MLP) having a single (terminal) output, H nodes at the second hidden layer (next to the terminal layer), I nodes at the first hidden layer, and J nodes at the input layer; hence, a J-I-H-1 MLP. It has totally n parameters, denoted by an n-vector θ, including thresholds. Let φ(.) be some node function; then, the forward pass transforms the input vector x of length J to the first hidden-output vector z of length I, and then to the second hidden-output vector h of length H, leading to the final output y: y=f(θ; x)=φ ` hT +p ´ =φ “PH j=0 pjhj ” =φ “ PH j=0 pjφ(zT +vj) ” with zk =φ(xT +wk). (1) Here, fictitious outputs x0 = z0 = h0 = 1 are included in the output vectors with subscript “+” for thresholds p0, v0,j, and w0,k; pj (j = 1, ..., H) is the weight connecting the jth hidden node to the (final) output; vj a vector of “hidden” weights directly connecting to the jth hidden node from the first hidden layer; wk a vector of “hidden” weights to the kth hidden node from the input layer; hence, θT ≡ ˆ pT |vT |wT ˜ = ˆ pT |vT 1 , ..., vT j , ..., vT H|wT 1 , ..., wT k , ..., wT I ˜. The length of those weight vectors θ, p, v, w are denoted by n, n3, n2, and n1, respectively, where n=n3+n2+n1; n3 =(H+1); n2 =H(I+1); n1 =I(J +1). (2) For parameter optimization, one may attempt to minimize the squared error over m data E(θ)= 1 2 m X d=1 {f(θ; xd)−td}2 = 1 2 m X d=1 r2 d(θ)= 1 2rT r, (3) where td is a desired output on datum d; each residual rd a smooth function from ℜn to ℜ; and r an m-vector of residuals. Note here and hereafter that the argument (θ) for E and r is frequently suppressed as long as no confusion arises. The gradient and Hessian of E can be expressed as below ∇E(θ)= m X d=1 rd∇rd =JT r, and ∇2E(θ)= m X d=1 ∇rd∇rT d + m X d=1 rd∇2rd ≡JT J+S, (4) where J≡∇r, an m×n Jacobian matrix of r, and the dth row of J is denoted by ∇rT d . 1 In the well-known Gauss-Newton method, S, the last matrix of second derivatives of residuals, is omitted, and its search direction ∆θ is found by solving J∆θGN =−r (or, JT J∆θGN = −∇E). Under the normal error assumption, the Fisher information matrix is tantamount to JT J, called the GaussNewton Hessian. This is why natural gradient learning can be viewed as an incremental version of the Gauss-Newton method (see p.1404 [1]; p.1031 [2]) in the nonlinear least squares sense. Since JT J is positive (semi)definite, natural gradient learning has no chance to exploit negative curvature. It would be of great value to understand the weaknesses of such Gauss-Newton-type methods. Learning behaviors of layered networks may be attributable to singularities [3, 2, 4]. Singularities have been well discussed in the nonlinear least squares literature also: For instance, Jennrich & Sampson (pp.65–66 [5]) described an overlap-singularity situation involving a redundant model; specifically, a classical (linear-output) model of exponentials with hi ≡φ(vix) and no thresholds in Eq.(1): f(θ; x)=p1φ(v1x)+p2φ(v2x)=p1ev1x+p2ev2x. (5) If the target data follow the path of a single exponential then the two hidden parameters, v1 and v2, become identical (i.e., overlap singularity) at the solution point, where J is rank-deficient; hence, JT J is singular. If the fitted response function nearly follows such a path, then JT J is nearly singular. This is a typical over-realizable scenario, in which the true teacher lies at the singularity (see [6] for details about 1-2-1 MLP-learning). In practice, if the solution point θ∗is stationary but J(θ∗) is rank-deficient, then the search direction ∆θGN can be numerically orthogonal to ∇E at some distant point from θ∗; consequently, no progress can be made by searching along the Gauss-Newton direction (hence, line-search-based algorithms fail); this is first pointed out by Powell, who proved in [7] that the Gauss-Newton iterates converge to a non-stationary limit point at which J is rank-deficient in solving a particular system of nonlinear equations, for which the merit function is defined as Eq.(3), where m = n. Another weak point of the Gauss-Newton-type method is a so-called largeresidual problem (e.g., see Dennis [8]); this implies that S in ∇2E is substantial because r is highly nonlinear, or its norm is large at solution θ∗. Those drawbacks of the Gauss-Newton-type methods indicate that negative curvature often arises in MLP-learning when JT J is singular (i.e., in a rank-deficient nonlinear least squares problem), and/or when S is more dominant than JT J. We thus verify this fact mathematically, and then discuss how exploiting negative curvature is a good way to escape from singularity plateaus, thereby enhancing the learning capacity. 2 Negative curvature induced by singularity In rank-deficient nonlinear least squares problems, where J≡∇r is rank deficient, negative curvature often arises. This is true with an arbitrary MLP model, but to make our analysis concrete, we consider a single terminal linear-output two-hidden-layer MLP: f(θ; x)=PH j=0 pjhj in Eq. (1). Then, the n weights separate into linear p and non-linear v and w. In this context, we show that a 4-by-4 indefinite Hessian block can be extracted from the n-by-n Hessian matrix ∇2E in Eq.(4). 2.1 An existence of the 4 × 4 indefinite Hessian block H in ∇2E In the posed two-hidden-layer MLP-learning, as indicated after Eq.(1), the n weights are organized as θT ≡ ˆ pT |vT |wT ˜. Now, we pay attention to two particular hidden nodes j and k at the second hidden layer. The weights connecting to those two nodes are pj, pk, vj, and vk; they are arranged in the following manner: θT = ˆ p0, p1, ..., pj, ..., pk, ..., pH|v0,1, ......., |v0,j, v1,j, ..., vI,j|...|v0,k, v1,k, ..., vI,k|...., | wT ˜ , (6) where vi,k is a weight from node i at the first hidden layer to node k at the second hidden layer. Given a data pair (x; t), r≡f(θ; x)−t, a residual element, and uT , an n-length row vector of the residual Jacobian matrix J(≡∂r ∂θ ) in Eq.(4), is given as below using the output vector z+ (including z0 =1) at the first hidden layer uT ≡∇rT = ˆ ..., hj, ..., hk, ..., φ′ j(zT +vj)pj, ..., φ′ k(zT +vk)pk, ... ˜ , (7) where only four entries are shown that are associated with four weights: pj, pk, v0,j, and v0,k. The locations of those four weights in the n-vector θ are denoted by l1, l2, l3, and l4, respectively, where l1 ≡j+1, l2 ≡k+1, l3 ≡(I+1)(j−1)+1, l4 ≡(I+1)(k−1)+1. (8) Given J, we interchange columns 1 and l1; then, do columns 2 and l2; then columns 3 and l3; and finally columns 4 and l4; this interchanging procedure moves those four columns to the first four. 2 Suppose that the n×n Hessian matrix ∇2E =uuT+S is evaluated on a given single datum (x; t). We then apply the above interchanging procedure to both rows and columns of ∇2E appropriately, which can be readily accomplished by PT ∇2E P, where four permutation matrices Pi (i=1, ..., 4) are employed as P≡P1P2P3P4; each Pi satisfies PT i Pi =I (orthogonal) and Pi =PT i (symmetric); hence, P is orthogonal. As a result, H, the 4-by-4 Hessian block (at the upper-left corner) of the first four leading rows and columns of PT ∇2E P has the following structure: H |{z} 4×4 = 2 664 (hj)2 hjhk hjφ′ j(.)pj hjφ′ k(.)pk (hk)2 hkφ′ j(.)pj hkφ′ k(.)pk ˘ φ′ j(.)pj ¯2 φ′ j(.)φ′ k(.)pjpk Symmetric {φ′ k(.)pk}2 3 775+ 2 64 0 0 φ′ j(.)r 0 0 0 φ′ k(.)r φ′′ j (.)pjr 0 Symmetric φ′′ k(.)pkr 3 75. (9) The posed Hessian block H is associated with a vector of the four weights [pj, pk, v0,j, v0,k]T . If vj = vk, then hj = hk = φ(zT +v); see Eq.(7). Obviously, no matter how many data are accumulated, two columns hj and hk of J in Eq.(4) are identical; therefore, J is rank deficient; hence, JT J is singular. The posed singularity gives rise to negative curvature because the above 4-by-4 dense Hessian block is almost always indefinite (so is ∇2E of size n × n) to be proved next. 2.2 Case 1: vj =vk ≡v; hence, hj =hk ≡h=φ(zT +v), and pj ̸= pk Given a set of m (training) data, the gradient vector ∇E and the Hessian matrix ∇2E in Eq.(4) are evaluated. We then apply the aforementioned orthogonal matrix P to them as PT ∇E and PT ∇2EP, yielding the gradient vector g of length 4 and the 4-by-4 Hessian block H [see Eq.(9)] associated with the four weights [pj, pk, v0,j, v0,k]T ; they may be expressed in a compact form as g= m X d=1 rdud =   γ γ pje pke  ; H = JT J+S=   a a b1 b2 a a b1 b2 b1 b1 c11 c12 b2 b2 c12 c22  +   0 0 e 0 0 0 0 e e 0 d1 0 0 e 0 d2  , (10) where the entries are given below with B ≡Pm d=1φ′(zT +dv)hd, C ≡Pm d=1 “ φ′(zT +dv) ”2, D≡Pm d=1φ′′(zT +dv)rd:          a≡ m X d=1 h2 d, b1 ≡pjB, b2 ≡pkB, c11 ≡p2 jC, c12 ≡pjpkC, c22 ≡p2 kC, γ ≡ m X d=1 rdhd, e≡ m X d=1 φ′(zT +dv)rd, d1 ≡pjD, d2 ≡pkD. (11) Notice here that the subscript d implies datum d (d=1, ..., m); hence, hd is the hidden-node output on datum d (but not the dth hidden-node output) common to both nodes j and k due to vj =vk =v. Theorem 1: When e̸=0, the n-by-n Hessian ∇2E and its block H in Eq.(10) are always indefinite. Proof: A similarity transformation with T, a 4-by-4 orthogonal matrix (TT =T−1), obtains TT HT= 2 64 2a b1+b2+e 0 b1−b2 b1+b2+e α 0 β 0 0 0 e b1−b2 β e τ 3 75 with T= 2 6664 1 √ 2 0 1 √ 2 0 1 √ 2 0 −1 √ 2 0 0 1 √ 2 0 1 √ 2 0 1 √ 2 0 −1 √ 2 3 7775, (12) where α≡1 2(c11+2c12+c22+d1+d2), β ≡1 2(c11−c22+d1−d2), and τ ≡1 2(c11−2c12+c22+d1+d2). The eigenvalues of the 2-by-2 block at the lower-right corner are obtainable by ˛˛˛λI − h 0 e e τ i˛˛˛ = λ(λ −τ) −e2 = λ2 −τλ −e2 = 0, which yields 1 2(τ ± √ τ 2 + 4e2), the “sign-different” eigenvalues as long as e ̸= 0 holds. Then, by Cauchy’s interlace theorem (see Ch.10 of Parlett 1998), the Hessian ∇2E is indefinite. (So is H.) 2 2.3 Case 2: vj =vk ≡v (hj =hk ≡h), and pj =pk ≡p The result in Case 1 becomes simpler: For a given set of m (training) data, g=Pm d=1 rdud =   γ γ pe pe  ; H = JT J+S= 2 64 a a b b a a b b b b c c b b c c 3 75+ 2 64 0 0 e 0 0 0 0 e e 0 d 0 0 e 0 d 3 75 , (13) 3 where the entries are readily identifiable from Eq.(11). In Eq.(13), JT J is positive semi-definite (singular of rank 2 even when m ≥2), and S has an indefinite structure. When e̸=0 (hence, ∇E ̸=0), we can prove below that there always exists negative curvature (i.e., ∇2E is always indefinite). Theorem 2: When e̸=0, the 4×4 Hessian block H in Eq.(13) includes the sign-different eigenvalues of S; namely, 1 2(d ± √ d2 + 4e2), and the n × n Hessian ∇2E as well as H are always indefinite. Proof: Proceed similarly with the same orthogonal matrix T as defined in Eq.(12), where b1 =b2 =b, β =0, and τ =d, rendering TT HT “block-diagonal.” Its block of size 2×2 at the lower-right corner has the sign-different eigenvalues determined by λ2−dλ−e2 =0. 2 QED 2 Now, we investigate stationary points, where the n-length gradient vector ∇E =0; hence, g = 0 in Eq.(13). We thus consider two cases for pe = 0: (a) p = 0 and e ̸= 0, and (b) p ̸= 0 and e = 0. In Case (b), S becomes a diagonal matrix, and the above TT HT shows that H is of (at most) rank 3 (when d ̸= 0); hence, H becomes singular. Theorem 3: If ∇E(θ∗)=0, p=0, and e̸=0 [i.e., Case (a)], then the stationary point θ∗is a saddle. Theorem 4: If ∇E(θ∗)=0, and e=0, but d < 0 [see Eq.(13)], then θ∗is a saddle point. Proof of Theorems 3 and 4: From Theorem 2 above, H in Eq.(13) has a negative eigenvalue; hence, the entire Hessian matrix ∇2E of size n × n is indefinite 2 QED 2 Theorem 4 is a special case of Case (b). If d=pD>0, then H becomes positive semi-definite; however, we could alter the eigen-spectrum of H by changing linear parameters p in conjunction with scalar ζ for pj =2ζp and pk =2(1−ζ)p such that pj+pk =2p with no change in E and ∇E =0 held fixed (to be confirmed in simulation; see Fig.1 later), leading to the following Theorem 5: If D̸=0 and C > 0 [see the definition of C and D for Eq.(11)] and v1 = v2 (≡v) with ∇E =0, for which p ̸= 0 and e = 0 (hence, S is diagonal), then choosing scalar ζ appropriately for pj =2ζp and pk =2(1−ζ)p can render H and thus ∇2E indefinite. Proof: From Eq.(11), two on-diagonal (3,3) and (4,4) entries of H are a quadratic function in terms of ζ: The (3,3)-entry of H, H(3, 3) = 2ζp(2ζpC +D), has two roots: 0 and − D 2pC , whereas the (4,4)-entry, H(4, 4)=2(1−ζ)p[2(1−ζ)pC+D], has two roots: 1 and 1 + D 2pC . Obviously, given p, C, and D, there exists ζ such that the quadratic function value becomes negative (see later Fig.1). This implies that adjusting ζ can produce a negative diagonal entry of H; hence, indefinite. Then, again by Cauchy’s interlace theorem, so is ∇2E. 2 QED 2 Example 1: A two-exponential model in Eq.(5). Data set 1: Input x −2 −1 0 1 2 Target t 1 3 2 3 1 Data set 2: Input x −2 −1 0 1 2 Target t 3 1 2 1 3 (14) Given two sets of five data pairs (xi; ti) as shown above, for each data set, we first find a minimizer θ0 ∗=[p∗, v∗]T of a two-weight 1-1-1 MLP, and then expand it with scalar ζ as θ =[ζp∗, (1 −ζ)p∗, v∗, v∗]T to construct a four-weight 1-2-1 MLP that produces the same input-tooutput relations. That is, we first find the minimizer θ0 ∗=[p∗, v∗]T using a 1-1-1 MLP, f(θ0; x)=pevx, by solving ∇E =0, which yields p∗=2; v∗=0; E(θ0 ∗)= 1 2 P5 j=1 ˘ f(θ0 ∗; xj) −tj ¯2 =2; and confirm that the 2 × 2 Hessian ∇2E(θ0 ∗) is positive definite in both data sets above. Next, we augment θ0 ∗ as θ =[p1, p2, v1, v2]T =[ζp∗, (1 −ζ)p∗, v∗, v∗]T to construct a 1-2-1 MLP: f(θ; x)=p1ev1x+p2ev2x, which realizes the same input-to-output relations as the 1-1-1 MLP. Fig.1 shows how ζ changes the eigen-spectrum (see solid curve) of the 4 × 4 Hessian ∇2E (supported by Theorem 5). Conjecture: Suppose that θ∗is a local minimum point in two-hidden-layer J-I-H-1 MLP-learning, and ∇2E of size n × n is positive definite (so is H) with ∇E =0 and E >0. Then, adding a node at the second hidden layer can increase learning capacity in the sense that E can be further reduced. Sketch of Proof: Choose a node j among H hidden nodes, and add a hidden node (call node k) by duplicating the hidden weights by vk = vj with pk = 0; hence, totally en≡n+(I+2) weights. This certainly renders new JT J of size en × en singular, and the (4,4)-entry in H in Eq.(10) becomes zero (due to pk =0). Then, by the interlace theorem, new ∇2E of size en × en becomes indefinite. 2 The above proof is not complete since we did not make clear assumptions about how the first-order necessary condition ∇E =0 holds [see Cases (a) and (b) just above Theorem 3]. Furthermore, even if we know in advance the minimum number of hidden nodes, Hmin, for a certain task, we may not be able to find a local-minimum point of an MLP with one less hidden nodes, Hmin−1. Consider, for instance, the well-known (four data) XOR problem. Although it can be solved by a 2-2-1 MLP (nine 4 −2 −1 0 1 2 3 −25 −20 −15 −10 −5 0 5 10 15 20 ζ min Eig(∇2E) min Eig(S) ∇2E(3,3) ∇2E(4,4) −2 −1 0 1 2 3 −25 −20 −15 −10 −5 0 5 10 15 20 ζ min Eig(∇2E) min Eig(S) ∇2E(3,3) ∇2E(4,4) Figure 1: The change of the minimum eigenvalue of ∇2E (solid curve) and of S (dashed) as well as the (3,3)-entry of ∇2E (dotted) and the (4,4)-entry of ∇2E (dash-dot), both quadratic, according to value ζ (x-axis) in θ = [ζp∗, (1−ζ)p∗, v∗, v∗]T , the four weights of a 1-2-1 MLP with exponential hidden nodes (left) using data set 1, and (right) data set 2 in Eq.(14). Theorem 5 supports this result. 0 0.2 0.4 0.6 0.8 1 1.2 −3 −2 −1 0 1 2 3 4 5 p v 2−D contour plot Saddle Minimizer −1 −0.5 0 0.5 1 1.5 2 2.5 −20 −15 −10 −5 0 5 10 15 20 p v 2−D contour plot Minimizer Saddle Attractive point x −1 −0.5 0 0.5 1 1.5 2 2.5 −20 −10 0 10 20 0 1 2 3 4 v p E(p,v) Attractor Minimizer Saddle (a) (b) (c) Figure 2: The 1-1-1 MLP landscape: (a) a magnified view; (b) bird’s-eye views in 2-D, and (c) 3-D. weights), any local minimum point may not be found by optimizing a 2-1-1 MLP (five weights), since the hidden weights tend to be divergent (or weight-∞attractors). Here is another example: Example 2: An N-shape curve fitting to four data: Data(x; t) ≡{(−3; 0), (−1; 1), (1; 0), (3; 1)}. We solved ∇E =0 to find all stationary points of a two-weight 1-1-1 MLP with a logistic hiddennode function φ(x)≡ 1 1+e−x , and found p∗≈1.0185 and v∗≈0.3571 with ∥∇E(θ0 ∗)∥=O(10−15), roughly the order of machine (double) precision, and E(θ0 ∗)≈0.4111. The Hessian ∇2E(θ0 ∗) was positive definite (eigenvalues: 0.8254 and 1.4824). We also found a saddle point. There was another type of attractive points, where φ is driven to saturation due to a large hidden weight v in magnitude (weight-∞attractors). Fig.2 displays those three types of stationary points. Clearly, for a rigorous proof of Conjecture, we need to characterize those different types, and clarify their underlying assumptions; yet, it is quite an arduous task because the situation totally depends on data; see also our Hessian argument for Blum’s line in Sec.3.2. We continue with Example 2 to verify the above theorems. We set θ = [ζp∗, (1−ζ)p∗, v∗, v∗] in a 1-2-1 MLP. When ζ = 0.5, the Hessian ∇2E was positive semi-definite. If a small perturbation is added to v∗, then ∇2E becomes indefinite (see Theorem 2). In contrast, when ζ = −1.5, ∇2E became indefinite (minimum eigenvalue −0.2307); this situation was similar to Fig.1(left). Remarks: The eigen-spectrum (or curvature) variation along a line often arises in separable (i.e., mixed linear and nonlinear) optimization problems. As a small non-MLP model, consider, for instance, a separable objective function with θ ≡[p, v]T, two variables alone: F(θ)=F(p, v)=pv2. Expressed below are the gradient and Hessian of F: ∇F = » v2 2pv – ; ∇2F = » 0 2v 2v 2p – . (15) Consider a line v=0, where the Hessian ∇2F is singular. Then, the eigen-spectrum of ∇2F changes as the linear parameter p alters while the first-order necessary condition (∇F =0) is maintained with the objective-function value F = 0 held fixed. Clearly, ∇2F is positive semi-definite when p > 0, whereas it is negative semi-definite when p < 0. Hence, the line is a collection of degenerate stationary points. In this way, singularities may be closely related to flat regions, where any updates of 5 parameters do not change the objective function value. Back to MLP-learning, Blum [10] describes a different linear manifold of stationary points (see Sec.3.2 for more details), where the ζ-adjusting procedure described above fails because D=0 (see Example 3 below also). Some other types of linear manifolds (and eigen-spectrum changes) can be found; e.g., in [11, 4, 3]; unlike their work, our paper did not claim anything about local minima, and our approach is totally different. Example 3: A linear-output five-weight 1-1-2-1 MLP with θ =[p1, p2|v1, v2|w1]T (no thresholds), having tanh-hidden-node functions. If θ∗= [1, 1, 0, 0, 0]T, then ∇E(θ∗)=0 with the indefinite Hessian ∇2E (hence, θ∗a saddle point) below, in which all diagonal entries of S are zero due to D=0: ∇2E(θ∗) = 2 664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ⋆ 0 0 0 0 ⋆ 0 0 ⋆⋆ 0 3 775 with ⋆≡ m X d=1 xdrd. Here, ⋆denotes a non-zero entry with input x and residual r over an arbitrary number m of data. 2 The point to note here is that it is important to look at the entire Hessian ∇2E of size n × n. When H=O, a 4 × 4 block of zeros, ∇2E would be indefinite (again by the interlace theorem) as long as non-zero off-diagonal entries exist in ∇2E, as in Example 3 above. Needless to say, however, the Hessian analysis fails in certain pathological cases (see Sec.3.2). Typical is an aforementioned weight-∞case, where the sigmoid-shaped hidden-node functions are driven to saturation limits due to very large hidden weights. Then, only part of JT J associated with linear weights p appear in ∇2E since S=O even if residuals are still large. This case is outside the scope of our analysis. It should be noted that a regularization scheme to penalize large weights is quite orthogonal to our scheme to exploit negative curvature. If a regularization term µθT θ (with non-negative scalar µ) is added to E, then the negative-curvature information will be lost due to ∇2E + µI. 3 The 2-2-1 MLP-learning examples found in the literature In this section, we consider learning with a 2-2-1 MLP having nine weights; then, Eq.(6) reduces to θT ≡[pT |vT ]=[pT |vT 1 |vT 2 ]=[p0, p1, p2|v0,1, v1,1, v2,1|v0,2, v1,2, v2,2], where vj is a (hidden) weight vector connecting to the jth hidden node. Here, all weights are nonlinear since both hidden and final outputs are produced by sigmoidal logistic function φ(x)≡ 1 1+e−x . 3.1 Insensitivity to the initial weights in the singular XOR problem The world-renowned XOR problem (involving only four data of binary values: ON and off) with a standard nine-weight 2-2-1 MLP is inevitably a singular problem because the Gauss-Newton Hessian JT J in Eq.(4) is always singular (at most rank 4), whereas S tends to be of (nearly) full rank; so does ∇2E (cf. rank analysis in [12]). This implies that singularity in terms of JT J is everywhere in the posed neuro-manifolds. It is well-known (e.g., see [13]) that the origin (p = 0 and v = 0) is a singular saddle point, where ∇E =0 and ∇2E =JT J with only one positive eigenvalue and eight zeros. An interesting observation is that there always exists a descending path to the solution from any initial point θinit as long as θinit is randomly generated in a small range; i.e., in the vicinity of the origin. That is, first go directly down towards the origin from θinit, and then move in a descent direction of negative curvature so as to escape from that singular saddle point. In this way, the 2-2-1 MLP can develop insensitivity to initial weights, always solving the posed XOR problem. 3.2 Blum’s linear manifold of stationary points In the XOR problem, Blum [10] found a line of stationary points by adding constraints to θ as L1 ≡v0,1 =v0,2, w1 ≡v1,1 =v2,2, w2 ≡v1,2 =v2,1, w≡p1 =p2, (with L≡p0), (16) leading to a weight-sharing MLP of five weights: θ ≡[L, w, L1, w1, w2]T following the notations in [10]. Using four XOR data: (x1, x2; t) = {(0, 0; off), (0, 1; ON), (1, 0; ON), (1, 1; off)} for E in Eq.(3), Blum considered a point with v = 0; hence, θ∗≡[L, w, 0, 0, 0]T, which gives two identical hidden-node outputs: h1 =h2 =φ(0)= 1 1+e0 = 1 2. This is the same situation as in Sec.2.2 and 2.3. By the constraints given in Eq.(16), the terminal output is given by y=φ(L + w). All those node outputs are independent of input data. Then, for a given target value “off” (e.g., 0.1), set ON = 2φ(L + w) −off ⇐⇒ φ(L + w)=(off + ON)/2 (17) so that those target values “off” and “ON” must approximate XOR. 6 Blum’s Claim (page 539 [10]): There are many stationary points that are not absolute minima. They correspond to w and L satisfying Eq.(17). Hence, they lie on a line “L + w = c (constant)” in the (w, L)-plane. Actually, these points are local minima of E, being 1 2(ON −off)2. 2 A little algebra confirms that ∇E =0, and the quantities corresponding to e and D in Eq.(11) are all zeros; hence, S=O. Consequently, no matter how ζ (see Theorem 5) is changed to update w and L (along the line), ∇2E stays positive semi-definite, and E in Eq.(3) remains the same 0.5 (flat region). This is certainly a limitation of the second-order Hessian analysis, and thus more efforts using higher-order derivatives were needed to disprove Blum’s claim (see [14, 15]), and it turned out that Blum’s line is a collection of singular saddle points. In what follows, we show what conditions must hold for the Hessian argument to work. The 5-by-5 Hessian matrix ∇2E at a stationary point θ∗=[L, w, 0, 0, 0] is given by ∇2E | {z } 5×5 = 2 66664 4A 4A 2wA wA wA 4A 4A 2wA wA wA 2wA 2wA w2A w2 2 A w2 2 A wA wA w2 2 A w2 8 (3A+S) w2 8 (3A+S) wA wA w2 2 A w2 8 (3A+S) w2 8 (3A+S) 3 77775 with 8 > < > : A≡{φ′(L + w)}2 S ≡φ′′(L+w) “ φ(L+w)−off ” . (18) We thus obtain two non-zero eigenvalues of ∇2E, λ1 and λ2, below using k≡w2 8 (3A + S): λ1, λ2 = 1 2 ˆ A(w2 + 8) + 2k ˜ ± q [A(w2 + 8) + 2k]2 −2A(w2 + 8)(4k −w2A) ff . (19) Now, the smaller eigenvalue can be rendered negative when the following condition holds: 4k −w2A < 0 ⇐⇒A + S = {φ′(L + w)}2 + φ′′(L + w) “ φ(L + w) −off ” < 0. (20) Choosing L+w=2 and off = 0.1 accomplishes our goal, yielding sign-different eigenvalues with ON=2φ(2)−off≈1.6616 by Eq.(17). Because ∇2E is indefinite, the posed stationary point is a saddle point with E = 1 2 (ON −off)2 (≈1.219), as desired. In other words, the target value for ON is modified to break symmetry in data. Such a large target value ON (as 1.6616) is certainly unattainable outside the range (0,1) of the sigmoidal logistic function φ(x), but notice that ON is often set equal to 1.0, which is also un-attainable for finite weight values. It appears that the choice of such a (fictitiously large) value ON does not violate any Blum’s assumption. When 0 ≤off < ON ≤1 (with w ̸= 0), the Hessian ∇2E in Eq.(18) is always positive semi-definite of rank 2. Hence, it is a singular saddle point. 3.3 Two-class pattern classification problems of Gori and Tesi We next consider two two-class pattern classification problems made by Gori & Tesi: one with five binary data (p.80 in [17]), and another with only three data (p.93 in [16]); see Fig.3. Both are singular problems, because rank(JT J) ≤5; yet, both S and ∇2E tend to be of full rank; therefore, the 9×9 Hessian ∇2E tends to be indefinite (see Theorems 1 and 2). On p.81 in [17], a configuration of two separation lines, like two solid lines given by θinit in Fig.3(left) and (right), is claimed as a region attractive to a local-minimum point. Indeed, the batch-mode steepest-descent method fails to change the orientation of those solid lines. But its failure does not imply that there is no descending way out of the two-solid-line configuration given by θinit because the convergence of the steepestdescent method to a (local) minimizer can be guaranteed by examining negative curvature (e.g., p.45 in [18]). We shall show a descending negative curvature direction. In the five-data case, the steepest-descent method moves θinit to a point, where the weights become relatively large; the gradient vector ∇E ≈0; the Hessian ∇2E is positive semi-definite; and Eq.(3) with m = 5 is given by E = 1 3(ON −off)2, for which the two residuals at data points (0,0) and (1,1) are made zeros. We can find such a point analytically by a linear-equation solving: Given θinit in Fig.3, the solution to the linear system below yields p∗=[p∗ 0, p∗ 1, p∗ 2]T (three terminal weights): 2 4 1 φ(−1.5) φ(−0.5) 1 φ(0.5) φ(1.5) 1 φ(−0.5) φ(0.5) 3 5 2 4 p∗ 0 p∗ 1 p∗ 2 3 5 = 2 4 φ−1(off) φ−1(off) φ−1“ 2ON+off 3 ” 3 5 . The resulting point θ∗≡[p∗ 0, p∗ 1, p∗ 2; −1.5, 1, 1; −0.5, 1, 1]T, where the norm of p∗becomes relatively large O(102), gives the zero gradient vector, the positive semi-definite Hessian of rank 5, and E = 1 3(ON−off)2, as mentioned above. It is observed, however, that small perturbations on θ∗render 7 x1 x 2 (0, 1) 1.5 1.5 (1, 0) 0.5 0.5 −0.5 1 h1 1 2 1 0 0 h2 1 1 1 1 −1.5 −0.5 x 1 x2 0 1 −1 (1, 1) x1 x 2 (0, 0) (0, 1) 1.5 1.5 (1, 0) 0.5 0.5 net = − x + x + 0.5 1 2 net = x + x − 0.5 1 2 net = − x + x − 0.5 1 2 net = x + x − 1.5 1 2 −0.5 Figure 3: Gori & Tesi’s two-class pattern classification problems (left) three-data case; (right) fivedata case; and (middle) a 2-2-1 MLP with initial weight values θinit ≡[0, 1, −1; −1.5, 1, 1; −0.5, 1, 1]T. Its corresponding initial configuration gives two solid lines of net-inputs (to two hidden nodes) in the input space, where “◦” stands for two ON-data (1,0), (0,1), whereas “×” for one off-data (0.5,0.5) in left figure and three off-data (0,0), (0.5,0.5), (1,1) in right figure. A solution to both problems may be given by the two dotted lines with θsol ≡[0, 1, −1; −0.5, −1, 1; 0.5, −1, 1]T. ∇2E indefinite of full rank (since S is dominant): rank(S)=rank(∇2E)=9 with rank(JT J)=4; this suggests a descend direction (other than the steepest descent) to follow from θinit to a solution θsol. Fig.3(right) presents one of them, an intuitive change of six hidden weights (with the other three weights held fixed) from two solid lines to two dotted ones, indicated by two thick arrows given by ∆θ ≡θsol −θinit =[0, 0, 0; 1, −2, 0; 1, −2, 0]T, is a descent direction of negative curvature down to θsol because ∆θT ∇2E(θinit)∆θ < 0, where ∇2E(θinit), the Hessian evaluated at θinit, was indefinite. Intriguingly enough, it is easy to confirm for the three-data case that the posed “descent” direction of negative curvature ∆θ is orthogonal to −∇E, the steepest-descent direction. Claim: Line search from θinit to θsol monotonically decreases the squared error E (θinit + η∆θ) as the step size η (scalar) changes from 0 to 1; hence, no plateau. Proof for the three-data case: (The five-data case can be proved in a similar fashion.) Using target values ON=1 and off=0, let q(η)≡E(θinit+η∆θ)−E(θinit). Then, we show below that q′(η) < 0 using a property that φ(−x)=1−φ(x): q(η)= 1 2{φ(−0.5−η)−φ(0.5−η)−ON}2+ 1 2{φ(−0.5+η)−φ(0.5+η)−ON}2−{φ(−0.5)−φ(0.5)−ON}2 = 1 2{1−φ(0.5+η)−φ(0.5−η)−ON}2+ 1 2{1−φ(0.5−η)−φ(0.5+η)−ON}2−{1−φ(0.5)−φ(0.5)−ON}2 ={1−ON−φ(0.5 + η)−φ(0.5 −η)}2 −{1 −ON −2φ(0.5)}2 ={φ(0.5 + η) + φ(0.5 −η)}2 −4 {φ(0.5)}2 . Differentiation leads to q′(η) = 2 {φ(0.5+η)+φ(0.5−η)} {φ′(0.5+η)−φ′(0.5−η)} < 0 because φ(0.5+η)>0, φ(0.5−η)>0, and η > 0, which guarantees φ′(0.5+η)<φ′(0.5−η). 2 4 Summary In a general setting, we have proved that negative curvature can arise in MLP-learning. To make it analytically tractable, we intentionally used noise-free small data sets but on “noisy” data, the conditions for Theorems 1 and 2 most likely hold in the vicinity of singularity regions; it then follows that the Hessian ∇2E tends to be indefinite (of nearly full rank). Our numerical results confirm that the negative-curvature information is of immense value for escaping from singularity plateaus including some problems where no method was developed to alleviate plateaus. In simulation, we employed the second-order stagewise backpropagation [12] (that can evaluate ∇2E and JT J at the essentially same cost; see proof therein) to obtain ∇2E explicitly and its eigen-directions so as to exploit negative curvature. This approach is suitable for up to medium-scale problems, for which our analysis suggests using existing trust-region globalization strategies whose theory has thrived on negative curvature including indefinite dogleg [19]. For large-scale problems, one could resort to matrix-free Krylov subspace methods: Among them, the truncated conjugate-gradient (Krylovdogleg) method tends to pick up an arbitrary negative curvature (hence, slowing down learning; see [20] for numerical evidence); so, other trust-region Krylov subspace methods are of our great interest such as a Lanczos type [21] and a parameterized eigenvalue approach [22]. Acknowledgments The work is partially supported by the National Science Council, Taiwan (NSC-99-2221-E-011-097). 8 References [1] Amari, S.-I., Park,H. & Fukumizu, K. Adaptive Method of Realizing Natural Gradient Learning for Multilayer Perceptrons. Neural Computation, 12:1399-1409, 2000. [2] Amari, S.-I., Park, H. & Ozeki, T. Singularities affect dynamics of learning in neuro-manifolds. Neural Computation, 18(5):1007-1065, 2006. [3] Wei, H., Zhang, J., Cousseau, F., Ozeki, T., & Amari, S.-I. Dynamics of Learning Near Singularities in Layered Networks. Neural Computation, 20(3):813-843, 2008. [4] Fukumizu, K. & Amari, S.-I. Local Minima and Plateaus in Hierarchical Structures of Multilayer Perceptrons. Neural Networks, 13(3):317–327, 2000. [5] Jennrich, R.I. & Sampson, P.F. Application of Stepwise Regression to Non-Linear Estimation. Technometrics, 10(1):63–72, 1968. [6] Cousseau, F., Ozeki, T., & Amari, S.-I. Dynamics of Learning in Multilayer Perceptrons near Singularities IEEE Trans. on Neural Networks, 19(8):1313-1328, 2008. [7] Powell, M.J.D. A hybrid method for nonlinear equations. In Numerical Methods for Nonlinear Algebraic Equations, Ed. by P.Rabinowitz, Gordon & Breach, London, pp.87–114, 1970. [8] Dennis, J.E., Jr. Nonlinear least squares and equations. In The state of the art in numerical analysis, Ed. by D. Jacobs, Academic Press, London, pp.269–312, 1977. [9] Parlett, B.N. The Symmetric Eigenvalue Problem. SIAM, 1998. [10] Blum, E.K. Approximation of Boolean Functions by Sigmoidal Networks: Part I: XOR and other twovariable functions. Neural Computation, 1:532-540, 1989. [11] Sprinkhuizen-Kuyper, I.G. & Boers, E.J.W. A Local Minimum for the 2-3-1 XOR Network. IEEE Transactions on Neural Networks, 10(4):968–971, 1999. [12] Mizutani, E. & Dreyfus, S.E. Second-order stagewise backpropagation for Hessian-matrix analyses and investigation of negative curvature. Neural Networks, vol.21 (issues 2–3):193-203, 2008. (See its Corrigendum in vol.21, issue 9, page 1418). [13] Sprinkhuizen-Kuyper, I.G. & Boers, E.J.W. The error surface of the 2-2-1 XOR network: The finite stationary points. Neural Networks, 11:683–690, 1998. [14] Tsaih, R.-H. An Improved Back Propagation Neural Network Learning Algorithm. Ph.D thesis at the Department of Industrial Engineering and Operations Research, University of California at Berkeley, pp.67–70, 1991. [15] Sprinkhuizen-Kuyper, I.G. & Boers, E.J.W. A comment on a paper of Blum: Blum’s local minima are saddle points. Tech. Rep. No. 94-34, Leiden University, Department of Computer Science, Leiden, The Netherlands, 1994. [16] Gori, M. & Tesi, A. Some examples of local minima during learning with backpropagation. Third Italian Workshop on Parallel Architectures and Neural Networks. (Ed. by E.R. Caianiello), World Scientific Publishing Co., pp. 87–94, 1990. [17] Gori, M. & Tesi, A. On the Problem of Local Minima in Backpropagation. IEEE Trans. on Pattern Analysis and Machine Intelligence, 14(1):76-86, 1992. [18] Nocedal, J & Wright, S.J. Numerical Optimization. Springer Verlag, 1999. [19] Byrd, R.H., Schnabel, R.B. & Schultz, G.A. Approximate solution of the trust region problems by minimization over two-dimensional subspaces. Mathematical Programming, 40:247–263, 1988. [20] Mizutani, E. & Demmel, J.W. Iterative scaled trust-region learning in Krylov subspaces via Pearlmutter’s implicit sparse Hessian-vector multiply. In S. Thrun, L. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems, MIT Press, 16:209–216, 2004. [21] Gould, N.I.M., Lucidi, S., Roma, M. & Toint, Ph.L. Solving the trust-region subproblem using the Lanczos method. SIAM Journal on Optimization, 9(2):504–525, 1999. [22] Rojas, M., Santos, S.A. & Sorensen, D.C. A New Matrix-Free Algorithm for the Large-Scale TrustRegion Subproblem. SIAM Journal on Optimization, 11(3):611–646, 2000. 9
2010
206
3,973
Joint Cascade Optimization Using a Product of Boosted Classifiers Leonidas Lefakis Idiap Research Institute Martigny, Switzerland leonidas.lefakis@idiap.ch Franc¸ois Fleuret Idiap Research Institute Martigny, Switzerland francois.fleuret@idiap.ch Abstract The standard strategy for efficient object detection consists of building a cascade composed of several binary classifiers. The detection process takes the form of a lazy evaluation of the conjunction of the responses of these classifiers, and concentrates the computation on difficult parts of the image which cannot be trivially rejected. We introduce a novel algorithm to construct jointly the classifiers of such a cascade, which interprets the response of a classifier as the probability of a positive prediction, and the overall response of the cascade as the probability that all the predictions are positive. From this noisy-AND model, we derive a consistent loss and a Boosting procedure to optimize that global probability on the training set. Such a joint learning allows the individual predictors to focus on a more restricted modeling problem, and improves the performance compared to a standard cascade. We demonstrate the efficiency of this approach on face and pedestrian detection with standard data-sets and comparisons with reference baselines. 1 Introduction Object detection remains one of the core objectives of computer vision, either as an objective per se, for instance for automatic focusing on faces in digital cameras, or as means to get high-level understanding of natural scenes for robotics and image retrieval. The standard strategy which has emerged for detecting objects of reasonable complexity such as faces is the so-called “sliding-window” approach. It consists of visiting all locations and scales in the scene to be parsed, and for any such pose, evaluating a two-class predictor which computes if the object of interest is visible there. The computational cost of such approaches is controlled traditionally with a cascade, that is a succession of classifiers, each one being evaluated only if the previous ones in the sequence have not already rejected the candidate location. Such an architecture concentrates the computation on difficult parts of the global image to be processed, and reduces tremendously the overall computational effort. In its original form, this approach constructs classifiers one after another during training, each one from examples which have not been rejected by the previous ones. While very successful, this technique suffers from three main practical drawbacks. The first one is the need for a very large number of negative samples, so that enough samples are available to train any one of the classifiers. The second drawback is the necessity to define as many thresholds as there are levels in the cascade. This second step may seem innocuous, but in practice is a serious difficulty, requiring additional validation data. Finally the third drawback is the inability of a standard cascade to properly exploit 1 the trade-off between the different levels. A response marginally below threshold at a certain level is enough to reject a sample, even if classifiers at other levels have strong responses. At a more conceptual level, standard training for cascades does not allow the classifiers to exploit their joint modeling: Each classifier is trained as if it has to do the job alone, without having the opportunity to properly balance its own modeling effort and that of the other classifiers. The novel approach we propose here is a joint learning of the classifiers constituting a cascade. We interpret the individual responses of the classifiers as probabilities of responding positively, and define the overall response of the cascade as the probability of all the classifiers responding positively under an assumption of independence. Instead of training classifiers successively, we directly minimize a loss taking into account this global response. This noisy-AND model leads to a very simple criterion for a new Boosting procedure, which improves all the classifiers symmetrically on the positive samples, and focuses on improving the classifier with the best response on every negative sample. We demonstrate the efficiency of this technique for face and pedestrian detection. Experiments show that this joint cascade learning requires far less negative training examples, and achieves performance better than standard cascades without the need for intensive bootstrapping. At the computational level, we propose to optimally permute the order of the classifiers during the evaluation to reduce the overall number of evaluated classifiers, and show that such optimization allows for better error rates at similar computational costs. 2 Related works A number of methods have been proposed over the years to control the computational cost of machine-learning based object detection. The idea common to these approaches is to rely on a form of adaptive testing : only candidates which cannot be trivially rejected as not being the object of interest will require heavy computation. In practice the majority of the candidates will be rejected with a very coarse criterion, hence requiring very low computation. 2.1 Reducing object detection computational cost Heisele et al. [1] propose a hierarchy of linear Support Vector Machines, each trained on images of increasing resolution, to weed out background patches, followed by a final computationally intensive polynomial SVM. In [2] and [3], the authors use an hierarchy of respectively two and three Support Vector Machines of increasing complexity. Graf et al. [4] introduced the parallel support vector machine which creates a filtering process by combining layers of parallel SVMs, each trained using the support vectors of classifiers in the previous layer. Fleuret and Geman [5] introduce a hierarchy of classifiers dedicated to positive populations with geometrical poses of decreasing randomness. This approach generalizes the cascade to more complex pose spaces, but as for cascades, trains the classifiers separately. Recently, a number of scanning alternatives to sliding window have also been introduced. In [6] a branch and bound approach is utilized during scanning, while in [7] a divide and conquer approach is proposed, wherein regions in the image are either accepted or rejected as a whole or split and further processed. Feature-centric approaches is proposed by the authors in [8] and [9]. The most popular approach however, for both its conceptual simplicity and practical efficiency, is the attentional cascade proposed by Viola and Jones [10]. Following this seminal paper, cascades have been used in a variety of problems [11, 12, 13]. 2.2 Improving attentional cascades In recent years approaches have been proposed that address some of the issues we list in the introduction. In [14] the authors train a cascade with a global performance criteria and a single set of parameters common to all stages. In [15] the authors address the asymmetric nature of the stage goals via a biased minimax probability machine, while in [16] the authors formulate the stage goals as a constrained optimization problem. In [17] a alternate boosting method dubbed FloatBoost is proposed. It allows for backtracking and removing weak classifiers which no longer contribute. 2 Table 1: Notation (xn, yn), n = 1, . . . , N, training examples. K number of levels in the cascade. fk(x) non-thresholded response of classifier k. During training, f t k(x) stands for that response after t steps of Boosting. pk(x) = 1 1+exp(−fk(x)) probability of classifier k to response positively on x. During training, pt k(x) stands for the same value after t steps of Boosting, computed from f t k(x). p(x) = Q k pk(x) posterior probability of sample x to be positive, as estimated jointly by all the classifiers of the cascade. During training, pt(x) is that value after only t steps of Boosting, computed from the pt k(x). Sochman and Matas [18] presented a Boosting algorithm based on sequential probability ratio tests, minimizing the average evaluation time subject to upper bounds on the false negative and false positive rates. A general framework for probabilistic boosting trees (of which cascades are a degenerated case) was proposed in [19]. In all these methods however, a set of free parameters concerning detection and false alarm performances must be set during training. As will be seen, our method is capable of postponing any decisions concerning performance goals until after training. The authors in [20] use the output of each stage as an initial weak classifier of the boosting classifier in the next stage. This allows the cascade to retain information between stages. However this approach only constitutes a backward view of the cascade. No information concerning the future performance of the cascade is available to each stage. In [21] sample traces are utilized to keep track of the performance of the cascade on the training data, and thresholds are picked after the cascade training is finished. This allows for reordering of cascade stages. However besides a validation set, a large number of negative examples must also be bootstrapped not only during the training phase, but also during the post-processing step of threshold and order calibration. Furthermore, different learning targets are used in the learning and calibration phases. To our knowledge, very little work has been done on the joint optimization of the cascaded stages. In [22] the authors attempt to jointly optimize a cascade of SVMs. As can be seen, a cascade effectively performs an AND operation over the data, enforcing that a positive example passes all stages; and that a negative example be rejected by at least one stage. In order to simulate this behavior, the authors attempt to minimize the maximum hinge loss over the SVMs for the positive examples, and to minimize the product of the hinge losses for the negative examples. An approximate solution to this formulation is found via cyclic optimization. In [23] the authors present a method similar to ours, jointly optimizing a cascade using the product of the output of individual logistic regression base classifiers. Their method attempts to find the MAP-estimate of the optimal classifier weights using cyclic coordinate descent. As is the case with the work in [22], the authors consider the ordering of the stages a priori fixed. 3 Method Our approach can be interpreted as a noisy-AND: The classifiers in the cascade produce stochastic Boolean predictions, conditionally independent given the signal to classify. We define the global response of the cascade as the probability that all these predictions are positive. This can be interpreted as if we were first computing from the signal x, for each classifier in the cascade, a probability pk(x), and defining the response of the cascade as the probability that K independent Bernoulli variables of parameters p1(x), . . . , pK(x) would all be equal to 1. Such a criterion takes naturally into account the confidence of individual classifiers in the final response, and introduces an additional non-linearity in the decision function. This approach is related to the noisy-OR proposed in [24] for multi-view object detection. However, their approach aims at decomposing a complex population into a collection of homogeneous populations, while our objective is to speed up the computation for the detection of a homogeneous 3 population. In some sense the noisy-OR they propose and the noisy-AND we use for training are addressing dual objectives. 3.1 Formalization Let fk(x) stand for the non-thresholded response of the classifier at level k of the cascade. We define pk(x) = 1 1 + exp(−fk(x)) (1) as the probabilistic interpretation of the deterministic output of classifier k. From that, we define the final output of the cascade as the probability that all classifiers make positive predictions, under the assumption that they are conditionally independent, given x p(x) = K Y k=1 pk(x). (2) In the ideal Boolean case, an example x will be classified as positive if and only if all classifiers classify it as such. Conversely the example will be classified as negative if pk(x) = 0 for at least one k. This is consistent with the AND nature of the cascade. Of course due to the product, the final classifier is able to make probabilistic predictions rather than solely hard ones as in [22]. 3.2 Joint Boosting Let (xn, yn) ∈Rd × {0, 1}, n = 1, . . . , N (3) denote a training set. In order to train our cascade we consider the maximization of the joint maximum log likelihood of the data: J = log Y n p(xn)yn(1 −p(xn))1−yn. (4) At each round t we sequentially visit each classifier and add a weak learner which locally minimizes J the most. If pt(x) denotes the overall response of the cascade after having added t weak learners in each classifier, and pt k(x) denotes the response of classifier k at that point – hence a function the response of classifier k at step t, f t k(x) – the score to maximize to select a weak learner hk t (xn) is: X n wk,t n hk t (xn) (5) with wk,t n = ∂J ∂fk(xn) = yn −pt(xn) 1 −pt(xn) (1 −pt k(xn)). (6) It should be noted that in this formulation, the weight wk,t n are signed, and these assigned to negative examples are negative. In the case of a positive example xn this simplifies to wk,t n = 1 −pt k(xn) and thus this criterion pushes every classifier in the cascade to maximize the response on positive samples, irrespective of the performance of the overall cascade. In the case of a negative example however, the weight update rule becomes wk,t n = −pt(xn) 1−pt(xn)(1 − pt k(xn)), each classifier in the cascade is then passed information regarding the overall performance via the term −pt(xn) 1−pt(xn). If the cascade is already rejecting the negative example, then this term becomes 0 and the classifier ignores its performance on the specific example. On the other hand, if the cascade is performing poorly, then the term becomes increasingly large and the classifiers put large weights on that example. Furthermore, due to the term 1 −pt k(xn), each classifier puts larger weight on negative examples that it is already performing well on, effectively partitioning the space of negative examples. The weights of the weak-learners can not be computed in a close formed as for AdaBoost and are estimated through a numerical line-search. 4 3.3 Exponential variant To assess if the asymptotic behavior of the loss – which is similar in spirit to the logistic one – is critical or not in the performance, we also experimented the minimization of the exponential error of the output. This translates to the minimization of the cost function : Jexp = X n 1 −p(xn) p(xn) 2yn−1 (7) and leads to the following expression for the sample weights during Boosting: wk,t n = pt k(xn) −1 pt(xn) (8) for the positive samples and wk,t n = (1 −pt k(xn)) pt(xn) (1 −pt(xn))2 (9) for the negative ones. Such a weighting strongly penalizes outliers in the training set, in a manner similar to Adaboost’s exponential loss. 4 Experiments 4.1 Implementation Details We comparatively evaluate the proposed cascade framework on two data-sets. In [10] the authors present an initial comparison between their cascade framework and an AdaBoost classifier on the CMU-MIT data-set. They train the monolithic classifier for 200 rounds and compare it against a simple cascade containing ten stages, each with 20 weak learners. As cascade architecture plays an important role in the final performance of the cascade, and in order to avoid any issues in the comparison pertaining to architectural designs, we keep this structure and evaluate both the proposed cascade and the Viola and Jones cascade, using this architecture. The monolithic classifier is similarly trained for 200 rounds. During the training, the thresholds for each stage in the Viola and Jones cascade are set to achieve a 99.5% detection rate. As pointed out, our approach does not make use of a validation set, nor uses bootstrapping during training. We experimented with bootstrapping a fixed number M of negative examples at fixed intervals, similar to [21] and attained higher performance than the one presented here. However it was found that training, was highly sensitive to the choice of M and that furthermore this choice of M was application specific. We tested three versions of our JointCascade approach: JointCascade is the algorithm described in § 3.2, JointCascade Augmented is the same, but is trained with as many negative examples as the total number used by the Viola and Jones cascade, and JointCascade Exponential uses the same number of negative samples as the basic setting, but uses the exponential version of the loss described in § 3.3. 4.2 Data-Sets 4.2.1 Pedestrians For pedestrian detection we use the INRIA pedestrian data-set [25], which contains pedestrian images of various poses with high variance concerning background and lighting. The training set consists of 1239 images of pedestrians as positive examples, and 12180 negative examples, mined from 1218 pedestrian-free images. Of these we keep 900 images for training (together with their mirror images, for a total of 1800) and 9000 negative examples. The remaining images in the original training set are put aside to be used as a validation set by the Viola and Jones cascade. 5 As in [25] we utilize a histogram of oriented gradient to describe each image. The reader is referred to this article for implementation details of the descriptor. The trained classifiers are then tested on a test set composed of 1126 images of pedestrians and 18120 non-pedestrian images. 4.2.2 Faces For faces, we evaluate against the CMU+MIT data-set of frontal faces. We utilize the Haar-like wavelet features introduced in [10], however, for performance reasons, we sub-sample 2000 of these features at each round to be used for training. For training we use the same data-set as that used by Viola and Jones consisting of 4916 images of faces. Of these we use 4000 (plus their mirror images) for training and set apart a further 916 (plus mirror images) for use as the validation set needed by the classical cascade approach. The negative portion of the training set is comprised of 10000 non-face images, mined randomly from non-face containing images. In order to test the trained classifiers, we extract the 507 faces in the data-set and scale-normalize to 24x24 images, a further 12700 non-face image patches are extracted from the background of the images in the data-set. We do not perform scale search, nor do we use any form of post-processing. 4.2.3 Bootstrap Images As, during training, the Viola and Jones cascade needs to bootstrap false positive examples after each stage, we randomly mine a data-set of approximately 7000 images from the web. These images have been manually inspected to ensure that they do not contain either faces or pedestrians. These images are used for bootstrapping in both sets of experiments. 4.3 Error rate The evaluation on the face data-set can be seen in Figure 1. The plotted lines represent the ROC curves for the evaluated methods. The proposed methods are able to reach a level of performance on par with the Viola and Jones cascade, without the need for a validation set or bootstrapping. The log-likelihood version of our method, performs slightly better than the exponential error version. The ROC curves for the pedestrian detection task can be seen in Figure 2. The log-likelihood version of our method significantly outperforms the Viola and Jones Cascade. The exponential error version is again slightly worse than the log-likelihood version, however this too outperforms the classical approach. Finally, as can be seen, augmenting the training data for the proposed method, leads to further improvement. The results on the two data-sets show that the proposed methods are capable of performing on par or better than the Viola and Jones cascade, while avoiding the need for a validation set or for bootstrapping. This lack of a need for bootstrapping, further means that the training time needed is considerably smaller than in the case of the classical cascade. 4.4 Optimization of the evaluation order As stated, one of the main motivations for using cascades is speed. We compare the average number of stages visited per negative example for the various methods presented. Typically in cascade training, the thresholds and orders of the various stages must be determined during training, either by setting them in an ad hoc manner or by using one of the optimization schemes of the many proposed. In our case however, any decision concerning the thresholds as well as the ordering of the stages can be postponed till after training. It is easy to derive for any given detection goal, a relevant threshold θ on the overall cascade responce. Thus we ask that p(xn) > θ, for an image patch to be accepted as positive. Subsequently the image patch will be rejected if the product of any subset of strong classifiers has a value smaller than θ. Based on this we use a greedy method to evaluate, using the original training set, the optimal order of classifiers as follows : Originally we chose as the first stage in our cascade, the classifier whose 6 0.8 0.85 0.9 0.95 1 0 0.01 0.02 0.03 0.04 0.05 True-positive rate False-positive rate Faces Non-cascade AdaBoost VJ cascade JointCascade JointCascade Augmented JointCascade Exponential Figure 1: True-positive rate vs. false-positive rate on the face data-set for the methods proposed, AdaBoost and the Viola and Jones type cascade. The JointCascade variants are described in § 4.1. At any true-positive rate above 95%, all three methods perform better than the standard cascade. This is a particularly good result for the basic JointCascade which does not use bootstrapping during training, which would seem to be critical for such conservative regimes. 0.8 0.85 0.9 0.95 1 0 0.02 0.04 0.06 0.08 0.1 True-positive rate False-positive rate Pedestrians Non-cascade AdaBoost VJ cascade JointCascade JointCascade Augmented JointCascade Exponential Figure 2: True-positive rate vs. false-positive rate on the pedestrian data-set for the methods proposed, AdaBoost and the Viola and Jones type cascade. All three JointCascade methods outperform the standard cascade, for regions of the false positive rate which are of practical use. 7 Table 2: Average number of classifiers evaluated on a sample, for each method and different truepositive rates, on the two data-sets. As expected, the computational load increases with the accuracy. The JointCascade variants require marginally more operations at a fixed rate on the pedestrian population, and marginally less on the faces except at very conservative rates. This is an especially good result, given their lower false-positive rates, which should induce more computation on average. Computational cost (faces) Computational cost (pedestrians) TP VJ JointCascade JointCascade JointCascade VJ JointCascade JointCascade JointCascade Augmented Exponential Augmented Exponential 95% 1.35 1.49 1.62 1.69 2.27 2.58 2.66 2.93 90% 1.21 1.18 1.31 1.25 1.93 2.04 1.94 2.21 86% 1.13 1.09 1.18 1.11 1.56 1.79 1.71 1.81 82% 1.10 1.04 1.12 1.07 1.38 1.49 1.59 1.52 78% 1.07 1.03 1.09 1.04 1.30 1.37 1.48 1.39 reponse is smaller than θ for the largest number of negative examples. We then iteratively add to the order of the cascade, that classifier which leads to a response smaller than θ for the most negative examples, when multiplied with the aggregated response of the stages already ordered in the cascade. As stated this ordering of the cascade stages is computed using the training set. We then measure the speed of our ordered cascade on the same test sets as above, as shown on Table 2. As can be seen, in the case of the face dataset, in almost all cases our approach is actually faster during scanning than the classical Viola and Jones approach. When the augmented dataset is used however this speed advantage is lost, there is a thus a trade-off between performance and speed, as is to be expected. The speed of our JointCascade approach on the pedestrian data-set is marginally worst than that of Viola and Jones, which is due to the lower false-positive rates. 5 Conclusion We have presented a new criterion to train a cascade of classifiers in a joint manner. This approach has a clear probabilistic interpretation as a noisy-AND, and leads to a global decision criterion which avoids thresholding classifiers individually, and can exploit independence in the classifier response amplitudes. This method avoids the need for picking multiple thresholds and the requirement for additional validation data. It allows to easily fix the final performance without the need for re-training. Finally, we have demonstrated that it reaches state-of-the-art performance on standard data sets, without the need for bootstrapping. This approach is very promising as a general framework to build adaptive detection techniques. It could easily be extended to hierarchical approaches instead of simple cascade, hence could be used for latent poses richer than location and scale. Finally, the reduction of the computational cost itself could be addressed in a more explicit manner than the optimization of the order presented in § 4.4. We are investigating a dynamic approach where the same criterion is used to allocate weak learners adaptively among the classifiers. This could be combined with a loss function explicitly estimating the expected computation cost of detection, hence providing an incentive for early rejection of more samples in the cascade. Acknowledgments We thank the anonymous reviewers for their helpful comments. This work was supported by the European Community’s Seventh Framework Programme FP7 - Challenge 2 - Cognitive Systems, Interaction, Robotics - under grant agreement No 247022 - MASH. 8 References [1] B. Heisele, T. Serre, S. Prentice, and T. Poggio. Hierarchical classification and feature reduction for fast face detection with support vector machines. Pattern Recognition Letters, 36(9):2007–2017, 2003. [2] Hedi Harzallah, Fr´ed´eric Jurie, and Cordelia Schmid. Combining efficient object localization and image classification. In International Conference on Computer Vision, pages 237–244, 2009. [3] A. Vedaldi, V. Gulshan, M. Varma, and A. Zisserman. Multiple kernels for object detection. In International Conference on Computer Vision, pages 606–613, 2009. [4] Hans Peter Graf, Eric Cosatto, L´eon Bottou, Igor Dourdanovic, and Vladimir Vapnik. Parallel support vector machines: The cascade svm. In Neural Information Processing Systems, pages 521–528, 2005. [5] F. Fleuret and D. Geman. Coarse-to-fine face detection. International Journal of Computer Vision, 41(1/2):85–107, 2001. [6] Christopher H. Lampert, M. B. Blaschko, and Thomas Hofmann. Beyond sliding windows: Object localization by efficient subwindow search. In Conference on Computer Vision and Pattern Recognition, pages 1–8, 2008. [7] Christoph H. Lampert. An efficient divide-and-conquer cascade for nonlinear object detection. In Conference on Computer Vision and Pattern Recognition, pages 1022–1029, 2010. [8] Henry Schneiderman. Feature-centric evaluation for efficient cascaded object detection. In Conference on Computer Vision and Pattern Recognition, pages 29–36, 2004. [9] A. Lehmann, B. Leibe, and L. Van Gool. Feature-centric efficient subwindow search. In International Conference on Computer Vision, pages 940–947, 2009. [10] Paul Viola and Michael Jones. Rapid object detection using a boosted cascade of simple features. In Conference on Computer Vision and Pattern Recognition, pages 511–518, 2001. [11] Owen T. Carmichael and Martial Hebert. Shape-based recognition of wiry objects. In Conference on Computer Vision and Pattern Recognition, pages 401–408, 2003. [12] Qiang Zhu, Shai Avidan, Mei chen Yeh, and Kwang ting Cheng. Fast human detection using a cascade of histograms of oriented gradients. In Conference on Computer Vision and Pattern Recognition, pages 1491–1498, 2006. [13] Geremy Heitz, Stephen Gould, Ashutosh Saxena, and Daphne Koller. Cascaded classification models: Combining models for holistic scene understanding. In Neural Information Processing Systems, pages 641–648, 2009. [14] S. Charles Brubaker, Jianxin Wu, Jie Sun, Matthew D. Mullin, and James M. Rehg. On the design of cascades of boosted ensembles for face detection. International Journal of Computer Vision, 77(1-3):65– 86, 2008. [15] Kaizhu Huang, Haiqin Yang, Irwin King, and Michael R. Lyu. Learning classifiers from imbalanced data based on biased minimax probability machine. In Conference on Computer Vision and Pattern Recognition, pages 558–563, 2004. [16] J. Wu, S. C. Brubaker, M. D. Mullin, and J. M. Rehg. Fast asymmetric learning for cascade face detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30:369–382, 2008. [17] Stan Z. Li and ZhenQiu Zhang. FloatBoost learning and statistical face detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(9), 2004. [18] Jan Sochman and Jiri Matas. Waldboost ” learning for time constrained sequential detection. In Conference on Computer Vision and Pattern Recognition, pages 150–156, 2005. [19] Zhuowen Tu. Probabilistic boosting-tree: Learning discriminative models for classification, recognition, and clustering. In International Conference on Computer Vision, pages 1589–1596, 2005. [20] Rong Xiao, Long Zhu, and HongJiang Zhang. Boosting chain learning for object detection. In International Conference on Computer Vision, pages 709–715, 2003. [21] Lubomir Bourdev and Jonathan Brandt. Robust object detection via soft cascade. In Conference on Computer Vision and Pattern Recognition, pages 236–243, 2005. [22] M. Murat Dundar and Jinbo Bi. Joint optimization of cascaded classifiers for computer aided detection. In Conference on Computer Vision and Pattern Recognition, pages 1–8, 2007. [23] V. C. Raykar, B. Krishnapuram, and S. Yu. Designing efficient cascaded classifiers: Tradeoff between accuracy and cost. In Conference on Knowledge Discovery and Data Mining, 2010. [24] Tae-Kyun Kim and Roberto Cipolla. MCBoost: Multiple classifier boosting for perceptual co-clustering of images and visual features. In Neural Information Processing Systems, pages 841–856, 2008. [25] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Conference on Computer Vision and Pattern Recognition, pages 886–893, 2005. 9
2010
207
3,974
Parallelized Stochastic Gradient Descent Martin A. Zinkevich Yahoo! Labs Sunnyvale, CA 94089 maz@yahoo-inc.com Markus Weimer Yahoo! Labs Sunnyvale, CA 94089 weimer@yahoo-inc.com Alex Smola Yahoo! Labs Sunnyvale, CA 94089 smola@yahoo-inc.com Lihong Li Yahoo! Labs Sunnyvale, CA 94089 lihong@yahoo-inc.com Abstract With the increase in available data parallel machine learning has become an increasingly pressing problem. In this paper we present the first parallel stochastic gradient descent algorithm including a detailed analysis and experimental evidence. Unlike prior work on parallel optimization algorithms [5, 7] our variant comes with parallel acceleration guarantees and it poses no overly tight latency constraints, which might only be available in the multicore setting. Our analysis introduces a novel proof technique — contractive mappings to quantify the speed of convergence of parameter distributions to their asymptotic limits. As a side effect this answers the question of how quickly stochastic gradient descent algorithms reach the asymptotically normal regime [1, 8]. 1 Introduction Over the past decade the amount of available data has increased steadily. By now some industrial scale datasets are approaching Petabytes. Given that the bandwidth of storage and network per computer has not been able to keep up with the increase in data, the need to design data analysis algorithms which are able to perform most steps in a distributed fashion without tight constraints on communication has become ever more pressing. A simple example illustrates the dilemma. At current disk bandwidth and capacity (2TB at 100MB/s throughput) it takes at least 6 hours to read the content of a single harddisk. For a decade, the move from batch to online learning algorithms was able to deal with increasing data set sizes, since it reduced the runtime behavior of inference algorithms from cubic or quadratic to linear in the sample size. However, whenever we have more than a single disk of data, it becomes computationally infeasible to process all data by stochastic gradient descent which is an inherently sequential algorithm, at least if we want the result within a matter of hours rather than days. Three recent papers attempted to break this parallelization barrier, each of them with mixed success. [5] show that parallelization is easily possible for the multicore setting where we have a tight coupling of the processing units, thus ensuring extremely low latency between the processors. In particular, for non-adversarial settings it is possible to obtain algorithms which scale perfectly in the number of processors, both in the case of bounded gradients and in the strongly convex case. Unfortunately, these algorithms are not applicable to a MapReduce setting since the latter is fraught with considerable latency and bandwidth constraints between the computers. A more MapReduce friendly set of algorithms was proposed by [3, 9]. In a nutshell, they rely on distributed computation of gradients locally on each computer which holds parts of the data and subsequent aggregation of gradients to perform a global update step. This algorithm scales linearly 1 in the amount of data and log-linearly in the number of computers. That said, the overall cost in terms of computation and network is very high: it requires many passes through the dataset for convergence. Moreover, it requires many synchronization sweeps (i.e. MapReduce iterations). In other words, this algorithm is computationally very wasteful when compared to online algorithms. [7] attempted to deal with this issue by a rather ingenious strategy: solve the sub-problems exactly on each processor and in the end average these solutions to obtain a joint solution. The key advantage of this strategy is that only a single MapReduce pass is required, thus dramatically reducing the amount of communication. Unfortunately their proposed algorithm has a number of drawbacks: the theoretical guarantees they are able to obtain imply a significant variance reduction relative to the single processor solution [7, Theorem 3, equation 13] but no bias reduction whatsoever [7, Theorem 2, equation 9] relative to a single processor approach. Furthermore, their approach requires a relatively expensive algorithm (a full batch solver) to run on each processor. A further drawback of the analysis in [7] is that the convergence guarantees are very much dependent on the degree of strong convexity as endowed by regularization. However, since regularization tends to decrease with increasing sample size the guarantees become increasingly loose in practice as we see more data. We attempt to combine the benefits of a single-average strategy as proposed by [7] with asymptotic analysis [8] of online learning. Our proposed algorithm is strikingly simple: denote by ci(w) a loss function indexed by i and with parameter w. Then each processor carries out stochastic gradient descent on the set of ci(w) with a fixed learning rate η for T steps as described in Algorithm 1. Algorithm 1 SGD({c1, . . . , cm}, T, η, w0) for t = 1 to T do Draw j ∈{1 . . . m} uniformly at random. wt ←wt−1 −η∂wcj(wt−1). end for return wT . On top of the SGD routine which is carried out on each computer we have a master-routine which aggregates the solution in the same fashion as [7]. Algorithm 2 ParallelSGD({c1, . . . cm}, T, η, w0, k) for all i ∈{1, . . . k} parallel do vi = SGD({c1, . . . cm}, T, η, w0) on client end for Aggregate from all computers v = 1 k !k i=1 vi and return v The key algorithmic difference to [7] is that the batch solver of the inner loop is replaced by a stochastic gradient descent algorithm which digests not a fixed fraction of data but rather a random fixed subset of data. This means that if we process T instances per machine, each processor ends up seeing T m of the data which is likely to exceed 1 k. Algorithm Latency tolerance MapReduce Network IO Scalability Distributed subgradient [3, 9] moderate yes high linear Distributed convex solver [7] high yes low unclear Multicore stochastic gradient [5] low no n.a. linear This paper high yes low linear A direct implementation of the algorithms above would place every example on every machine: however, if T is much less than m, then it is only necessary for a machine to have access to the data it actually touches. Large scale learning, as defined in [2], is when an algorithm is bounded by the time available instead of by the amount of data available. Practically speaking, that means that one can consider the actual data in the real dataset to be a subset of a virtually infinite set, and drawing with replacement (as the theory here implies) and drawing without replacement on the 2 Algorithm 3 SimuParallelSGD(Examples {c1, . . . cm}, Learning Rate η, Machines k) Define T = ⌊m/k⌋ Randomly partition the examples, giving T examples to each machine. for all i ∈{1, . . . k} parallel do Randomly shuffle the data on machine i. Initialize wi,0 = 0. for all t ∈{1, . . . T}: do Get the tth example on the ith machine (this machine), ci,t wi,t ←wi,t−1 −η∂wci(wi,t−1) end for end for Aggregate from all computers v = 1 k !k i=1 wi,t and return v. infinite data set can both be simulated by shuffling the real data and accessing it sequentially. The initial distribution and shuffling can be a part of how the data is saved. SimuParallelSGD fits very well with the large scale learning paradigm as well as the MapReduce framework. Our paper applies an anytime algorithm via stochastic gradient descent. The algorithm requires no communication between machines until the end. This is perfectly suited to MapReduce settings. Asymptotically, the error approaches zero. The amount of time required is independent of the number of examples, only depending upon the regularization parameter and the desired error at the end. 2 Formalism In stark contrast to the simplicity of Algorithm 2, its convergence analysis is highly technical. Hence we limit ourselves to presenting the main results in this extended abstract. Detailed proofs are given in the appendix. Before delving into details we briefly outline the proof strategy: • When performing stochastic gradient descent with fixed (and sufficiently small) learning rate η the distribution of the parameter vector is asymptotically normal [1, 8]. Since all computers are drawing from the same data distribution they all converge to the same limit. • Averaging between the parameter vectors of k computers reduces variance by O(k−1 2 ) similar to the result of [7]. However, it does not reduce bias (this is where [7] falls short). • To show that the bias due to joint initialization decreases we need to show that the distribution of parameters per machine converges sufficiently quickly to the limit distribution. • Finally, we also need to show that the mean of the limit distribution for fixed learning rate is sufficiently close to the risk minimizer. That is, we need to take finite-size learning rate effects into account relative to the asymptotically normal regime. 2.1 Loss and Contractions In this paper we consider estimation with convex loss functions ci : ℓ2 →[0, ∞). While our analysis extends to other Hilbert Spaces such as RKHSs we limit ourselves to this class of functions for convenience. For instance, in the case of regularized risk minimization we have ci(w) = λ 2 ∥w∥2 + L(xi, yi, w · xi) (1) where L is a convex function in w·xi, such as 1 2(yi−w·xi)2 for regression or log[1+exp(−yiw·xi)] for binary classification. The goal is to find an approximate minimizer of the overall risk c(w) = 1 m m " i=1 ci(w). (2) To deal with stochastic gradient descent we need tools for quantifying distributions over w. Lipschitz continuity: A function f : X →R is Lipschitz continuous with constant L with respect to a distance d if |f(x) −f(y)| ≤Ld(x, y) for all x, y ∈X. 3 H¨older continuity: A function f is H¨older continous with constant L and exponent α if |f(x) − f(y)| ≤Ldα(x, y) for all x, y ∈X. Lipschitz seminorm: [10] introduce a seminorm. With minor modification we use ∥f∥Lip := inf {l where |f(x) −f(y)| ≤ld(x, y) for all x, y ∈X} . (3) That is, ∥f∥Lip is the smallest constant for which Lipschitz continuity holds. H¨older seminorm: Extending the Lipschitz norm for α ≥1: ∥f∥Lipα := inf {l where |f(x) −f(y)| ≤ldα(x, y) for all x, y ∈X} . (4) Contraction: For a metric space (M, d), f : M →M is a contraction mapping if ∥f∥Lip < 1. In the following we assume that ∥L(x, y, y′)∥Lip ≤G as a function of y′ for all occurring data (x, y) ∈X × Y and for all values of w within a suitably chosen (often compact) domain. Theorem 1 (Banach’s Fixed Point Theorem) If (M, d) is a non-empty complete metric space, then any contraction mapping f on (M, d) has a unique fixed point x∗= f(x∗). Corollary 2 The sequence xt = f(xt−1) converges linearly with d(x∗, xt) ≤∥f∥t Lip d(x0, x∗). Our strategy is to show that the stochastic gradient descent mapping w ←φi(w) := w −η∇ci(w) (5) is a contraction, where i is selected uniformly at random from {1, . . . m}. This would allow us to demonstrate exponentially fast convergence. Note that since the algorithm selects i at random, different runs with the same initial settings can produce different results. A key tool is the following: Lemma 3 Let c∗≥ ##∂ˆyL(xi, yi, ˆy) ## Lip be a Lipschitz bound on the loss gradient. Then if η ≤ ( ##xi##2 c∗+ λ)−1 the update rule (5) is a contraction mapping in ℓ2 with Lipschitz constant 1 −ηλ. We prove this in Appendix B. If we choose η “low enough”, gradient descent uniformly becomes a contraction. We define η∗:= min i $##xi##2 c∗+ λ %−1 . (6) 2.2 Contraction for Distributions For fixed learning rate η stochastic gradient descent is a Markov process with state vector w. While there is considerable research regarding the asymptotic properties of this process [1, 8], not much is known regarding the number of iterations required until the asymptotic regime is assumed. We now address the latter by extending the notion of contractions from mappings of points to mappings of distributions. For this we introduce the Monge-Kantorovich-Wasserstein earth mover’s distance. Definition 4 (Wasserstein metric) For a Radon space (M, d) let P(M, d) be the set of all distributions over the space. The Wasserstein distance between two distributions X, Y ∈P(M, d) is Wz(X, Y ) = & inf γ∈Γ(X,Y ) ' x,y dz(x, y)dγ(x, y) ( 1 z (7) where Γ(X, Y ) is the set of probability distributions on (M, d) × (M, d) with marginals X and Y . This metric has two very important properties: it is complete and a contraction in (M, d) induces a contraction in (P(M, d), Wz). Given a mapping φ : M →M, we can construct p : P(M, d) → P(M, d) by applying φ pointwise to M. Let X ∈P(M, d) and let X′ := p(X). Denote for any measurable event E its pre-image by φ−1(E). Then we have that X′(E) = X(φ−1(E)). 4 Lemma 5 Given a metric space (M, d) and a contraction mapping φ on (M, d) with constant c, p is a contraction mapping on (P(M, d), Wz) with constant c. This is proven in Appendix C. This shows that any single mapping is a contraction. However, since we draw ci at random we need to show that a mixture of such mappings is a contraction, too. Here the fact that we operate on distributions comes handy since the mixture of mappings on distribution is a mapping on distributions. Lemma 6 Given a Radon space (M, d), if p1 . . . pk are contraction mappings with constants c1 . . . ck with respect to Wz, and ! i ai = 1 where ai ≥0, then p = !k i=1 aipi is a contraction mapping with a constant of no more than [! i ai(ci)z] 1 z . Corollary 7 If for all i, ci ≤c, then p is a contraction mapping with a constant of no more than c. This is proven in Appendix C. We apply this to SGD as follows: Define p∗= 1 m !m i=1 pi to be the stochastic operation in one step. Denote by D0 η the initial parameter distribution from which w0 is drawn and by Dt η the parameter distribution after t steps, which is obtained via Dt η = p∗(Dt−1 η ). Then the following holds: Theorem 8 For any z ∈N, if η ≤η∗, then p∗is a contraction mapping on (M, Wz) with contraction rate (1 −ηλ). Moreover, there exists a unique fixed point D∗ η such that p∗(D∗ η) = D∗ η. Finally, if w0 = 0 with probability 1, then Wz(D0 η, D∗ η) = G λ , and Wz(DT η , D∗ η) ≤G λ (1 −ηλ)T . This is proven in Appendix F. The contraction rate (1 −ηλ) can be proven by applying Lemma 3, Lemma 5, and Corollary 6. As we show later, wt ≤G/λ with probability 1, so Prw∈D∗η[d(0, w) ≤ G/λ] = 1, and since w0 = 0, this implies Wz(D0 η, D∗ η) = G/λ. From this, Corollary 2 establishes Wz(DT η , D∗ η) ≤G λ (1 −ηλ)T . This means that for a suitable choice of η we achieve exponentially fast convergence in T to some stationary distribution D∗ η. Note that this distribution need not be centered at the risk minimizer of c(w). What the result does, though, is establish a guarantee that each computer carrying out Algorithm 1 will converge rapidly to the same distribution over w, which will allow us to obtain good bounds if we can bound the ’bias’ and ’variance’ of D∗ η. 2.3 Guarantees for the Stationary Distribution At this point, we know there exists a stationary distribution, and our algorithms are converging to that distribution exponentially fast. However, unlike in traditional gradient descent, the stationary distribution is not necessarily just the optimal point. In particular, the harder parts of understanding this algorithm involve understanding the properties of the stationary distribution. First, we show that the mean of the stationary distribution has low error. Therefore, if we ran for a really long time and averaged over many samples, the error would be low. Theorem 9 c(Ew∈D∗η[w]) −minw∈Rn c(w) ≤2ηG2. Proven in Appendix G using techniques from regret minimization. Secondly, we show that the squared distance from the optimal point, and therefore the variance, is low. Theorem 10 The average squared distance of D∗ η from the optimal point is bounded by: Ew∈D∗η[(w −w∗)2] ≤ 4ηG2 (2 −ηλ)λ. In other words, the squared distance is bounded by O(ηG2/λ). 5 Proven in Appendix I using techniques from reinforcement learning. In what follows, if x ∈M, Y ∈P(M, d), we define Wz(x, Y ) to be the Wz distance between Y and a distribution with a probability of 1 at x. Throughout the appendix, we develop tools to show that the distribution over the output vector of the algorithm is “near” µD∗η, the mean of the stationary distribution. In particular, if DT,k η is the distribution over the final vector of ParallelSGD after T iterations on each of k machines with a learning rate η, then W2(µD∗η, DT,k η ) = ) Ex∈DT,k η [(x −µD∗η)2] becomes small. Then, we need to connect the error of the mean of the stationary distribution to a distribution that is near to this mean. Theorem 11 Given a cost function c such that ∥c∥L and ∥∇c∥L are bounded, a distribution D such that σD and is bounded, then, for any v: Ew∈D[c(w)] −min w c(w) ≤(W2(v, D)) ) 2 ∥∇c∥L (c(v) −min w c(w)) + ∥∇c∥L 2 (W2(v, D))2 + (c(v) −min w c(w)). (8) This is proven in Appendix K. The proof is related to the Kantorovich-Rubinstein theorem, and bounds on the Lipschitz of c near v based on c(v) −minw c(w). At this point, we are ready to get the main theorem: Theorem 12 If η ≤η∗and T = ln k−(ln η+ln λ) 2ηλ : Ew∈DT,k η [c(w)] −min w c(w) ≤8ηG2 √ kλ ) ∥∇c∥L + 8ηG2 ∥∇c∥L kλ + (2ηG2). (9) This is proven in Appendix K. 2.4 Discussion of the Bound The guarantee obtained in (9) appears rather unusual insofar as it does not have an explicit dependency on the sample size. This is to be expected since we obtained a bound in terms of risk minimization of the given corpus rather than a learning bound. Instead the runtime required depends only on the accuracy of the solution itself. In comparison to [2], we look at the number of iterations to reach ρ for SGD in Table 2. Ignoring the effect of the dimensions (such as ν and d), setting these parameters to 1, and assuming that the conditioning number κ = 1 λ, and ρ = η. In terms of our bound, we assume G = 1 and ∥∇c∥L = 1. In order to make our error order η, we must set k = 1 λ. So, the Bottou paper claims a bound of νκ2 ρ iterations, which we interpret as 1 ηλ2 . Modulo logarithmic factors, we require 1 λ machines to run 1 ηλ time, which is the same order of computation, but a dramatic speedup of a factor of 1 λ in wall clock time. Another important aspect of the algorithm is that it can be arbitrarily precise. By halving η and roughly doubling T, you can halve the error. Also, the bound captures how much paralllelization can help. If k > ∥∇c∥L λ , then the last term ηG2 will start to dominate. 3 Experiments Data: We performed experiments on a proprietary dataset drawn from a major email system with labels y ∈±1 and binary, sparse features. The dataset contains 3, 189, 235 time-stamped instances out of which the last 68, 1015 instances are used to form the test set, leaving 2, 508, 220 training points. We used hashing to compress the features into a 218 dimensional space. In total, the dataset contained 785, 751, 531 features after hashing, which means that each instance has about 313 features on average. Thus, the average sparsity of each data point is 0.0012. All instance have been normalized to unit length for the experiments. 6 Figure 1: Relative training error with λ = 1e−3: Huber loss (left) and squared error (right) Approach: In order to evaluate the parallelization ability of the proposed algorithm, we followed the following procedure: For each configuration (see below), we trained up to 100 models, each on an independent, random permutation of the full training data. During training, the model is stored on disk after k = 10, 000 ∗2i updates. We then averaged the models obtained for each i and evaluated the resulting model. That way, we obtained the performance for the algorithm after each machine has seen k samples. This approach is geared towards the estimation of the parallelization ability of our optimization algorithm and its application to machine learning equally. This is in contrast to the evaluation approach taken in [7] which focussed solely on the machine learning aspect without studying the performance of the optimization approach. Evaluation measures: We report both the normalized root mean squared error (RMSE) on the test set and the normalized value of the objective function during training. We normalize the RMSE such that 1.0 is the RMSE obtained by training a model in one single, sequential pass over the data. The objective function values are normalized in much the same way such that the objective function value of a single, full sequential pass over the data reaches the value 1.0. Configurations: We studied both the Huber and the squared error loss. While the latter does not satisfy all the assumptions of our proofs (its gradient is unbounded), it is included due to its popularity. We choose to evaluate using two different regularization constants, λ = 1e−3 and λ = 1e−6 in order to estimate the performance characteristics both on smooth, “easy” problems (1e−3) and on high-variance, “hard” problems (1e−6). In all experiments, we fixed the learning rate to η = 1e−3. 3.1 Results and Discussion Optimization: Figure 1 shows the relative objective function values for training using 1, 10 and 100 machines with λ = 1e−3. In terms of wall clock time, the models obtained on 100 machines clearly outperform the ones obtained on 10 machines, which in turn outperform the model trained on a single machine. There is no significant difference in behavior between the squared error and the Huber loss in these experiments, despite the fact that the squared error is effectively unbounded. Thus, the parallelization works in the sense that many machines obtain a better objective function value after each machine has seen k instances. Additionally, the results also show that data-local parallelized training is feasible and beneficial with the proposed algorithm in practice. Note that the parallel training needs slightly more machine time to obtain the same objective function value, which is to be expected. Also unsurprising, yet noteworthy, is the trade-off between the number of machines and the quality of the solution: The solution obtained by 10 machines is much more of an improvement over using one machine than using 100 machines is over 10. Predictive Performance: Figure 2 shows the relative test RMSE for 1, 10 and 100 machines with λ = 1e−3. As expected, the results are very similar to the objective function comparison: The parallel training decreases wall clock time at the price of slightly higher machine time. Again, the gain in performance between 1 and 10 machines is much higher than the one between 10 and 100. 7 Figure 2: Relative Test-RMSE with λ = 1e−3: Huber loss (left) and squared error (right) Figure 3: Relative train-error using Huber loss: λ = 1e−3 (left), λ = 1e−6 (right) Performance using different λ: The last experiment is conducted to study the effect of the regularization constant λ on the parallelization ability: Figure 3 shows the objective function plot using the Huber loss and λ = 1e−3 and λ = 1e−6. The lower regularization constant leads to more variance in the problem which in turn should increase the benefit of the averaging algorithm. The plots exhibit exactly this characteristic: For λ = 1e−6, the loss for 10 and 100 machines not only drops faster, but the final solution for both beats the solution found by a single pass, adding further empirical evidence for the behaviour predicted by our theory. 4 Conclusion In this paper, we propose a novel data-parallel stochastic gradient descent algorithm that enjoys a number of key properties that make it highly suitable for parallel, large-scale machine learning: It imposes very little I/O overhead: Training data is accessed locally and only the model is communicated at the very end. This also means that the algorithm is indifferent to I/O latency. These aspects make the algorithm an ideal candidate for a MapReduce implementation. Thereby, it inherits the latter’s superb data locality and fault tolerance properties. Our analysis of the algorithm’s performance is based on a novel technique that uses contraction theory to quantify finite-sample convergence rate of stochastic gradient descent. We show worst-case bounds that are comparable to stochastic gradient descent in terms of wall clock time, and vastly faster in terms of overall time. Lastly, our experiments on a large-scale real world dataset show that the parallelization reduces the wall-clock time needed to obtain a set solution quality. Unsurprisingly, we also see diminishing marginal utility of adding more machines. Finally, solving problems with more variance (smaller regularization constant) benefits more from the parallelization. 8 References [1] Shun-ichi Amari. A theory of adaptive pattern classifiers. IEEE Transactions on Electronic Computers, 16:299–307, 1967. [2] L. Bottou and O. Bosquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems, 2008. [3] C.T. Chu, S.K. Kim, Y. A. Lin, Y. Y. Yu, G. Bradski, A. Ng, and K. Olukotun. Map-reduce for machine learning on multicore. In B. Sch¨olkopf, J. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems 19, 2007. [4] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. In Conference on Computational Learning Theory, 2010. [5] J. Langford, A.J. Smola, and M. Zinkevich. Slow learners are fast. In Neural Information Processing Systems, 2009. [6] J. Langford, A.J. Smola, and M. Zinkevich. Slow learners are fast. arXiv:0911.0491, 2009. [7] G. Mann, R. McDonald, M. Mohri, N. Silberman, and D. Walker. Efficient large-scale distributed training of conditional maximum entropy models. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1231–1239. 2009. [8] N. Murata, S. Yoshizawa, and S. Amari. Network information criterion — determining the number of hidden units for artificial neural network models. IEEE Transactions on Neural Networks, 5:865–872, 1994. [9] Choon Hui Teo, S. V. N. Vishwanthan, Alex J. Smola, and Quoc V. Le. Bundle methods for regularized risk minimization. J. Mach. Learn. Res., 11:311–365, January 2010. [10] U. von Luxburg and O. Bousquet. Distance-based classification with lipschitz functions. Journal of Machine Learning Research, 5:669–695, 2004. [11] M. Zinkevich. Online convex programming and generalised infinitesimal gradient ascent. In Proc. Intl. Conf. Machine Learning, pages 928–936, 2003. 9
2010
208
3,975
Shadow Dirichlet for Restricted Probability Modeling Bela A. Frigyik, Maya R. Gupta, and Yihua Chen Department of Electrical Engineering University of Washington Seattle, WA 98195 frigyik@gmail.com, gupta@ee.washington.edu, yihuachn@gmail.com Abstract Although the Dirichlet distribution is widely used, the independence structure of its components limits its accuracy as a model. The proposed shadow Dirichlet distribution manipulates the support in order to model probability mass functions (pmfs) with dependencies or constraints that often arise in real world problems, such as regularized pmfs, monotonic pmfs, and pmfs with bounded variation. We describe some properties of this new class of distributions, provide maximum entropy constructions, give an expectation-maximization method for estimating the mean parameter, and illustrate with real data. 1 Modeling Probabilities for Machine Learning Modeling probability mass functions (pmfs) as random is useful in solving many real-world problems. A common random model for pmfs is the Dirichlet distribution [1]. The Dirichlet is conjugate to the multinomial and hence mathematically convenient for Bayesian inference, and the number of parameters is conveniently linear in the size of the sample space. However, the Dirichlet is a distribution over the entire probability simplex, and for many problems this is simply the wrong domain if there is application-specific prior knowledge that the pmfs come from a restricted subset of the simplex. For example, in natural language modeling, it is common to regularize a pmf over n-grams by some generic language model distribution q0, that is, the pmf to be modeled is assumed to have the form θ = λq + (1 −λ)q0 for some q in the simplex, λ ∈(0, 1) and a fixed generic model q0 [2]. But once q0 and λ are fixed, the pmf θ can only come from a subset of the simplex. Another natural language processing example is modeling the probability of keywords in a dictionary where some words are related, such as espresso and latte, and evidence for the one is to some extent evidence for the other. This relationship can be captured with a bounded variation model that would constrain the modeled probability of espresso to be within some ϵ of the modeled probability of latte. We show that such bounds on the variation between pmf components also restrict the domain of the pmf to a subset of the simplex. As a third example of restricting the domain, the similarity discriminant analysis classifier estimates class-conditional pmfs that are constrained to be monotonically increasing over an ordered sample space of discrete similarity values [3]. In this paper we propose a simple variant of the Dirichlet whose support is a subset of the simplex, explore its properties, and show how to learn the model from data. We first discuss the alternative solution of renormalizing the Dirichlet over the desired subset of the simplex, and other related work. Then we propose the shadow Dirichlet distribution; explain how to construct a shadow Dirichlet for three types of restricted domains: the regularized pmf case, bounded variation between pmf components, and monotonic pmfs; and discuss the most general case. We show how to use the expectation-maximization (EM) algorithm to estimate the shadow Dirichlet parameter α, and present simulation results for the estimation. 1 Dirichlet Shadow Dirichlet Renormalized Dirichlet Figure 1: Dirichlet, shadow Dirichlet, and renormalized Dirichlet for α = [3.94 2.25 2.81]. 2 Related Work One solution to modeling pmfs on only a subset of the simplex is to simply restrict the support of the Dirichlet to the desired support ˜S, and renormalize the Dirichlet over ˜S (see Fig. 1 for an example). This renormalized Dirichlet has the advantage that it is still a conjugate distribution for the multinomial. Nallapati et al.considered the renormalized Dirichlet for language modeling, but found it difficult to use because the density requires numerical integration to compute the normalizer [4] . In addition, there is no closed form solution for the mean, covariance, or peak of the renormalized Dirichlet, making it difficult to work with. Table 1 summarizes these properties. Additionally, generating samples from the renormalized Dirichlet is inefficient: one draws samples from the standard Dirichlet, then rejects realizations that are outside ˜S. For high-dimensional sample spaces, this could greatly increase the time to generate samples. Although the Dirichlet is a classic and popular distribution on the simplex, Aitchison warns it “is totally inadequate for the description of the variability of compositional data,” because of its “implied independence structure and so the Dirichlet class is unlikely to be of any great use for describing compositions whose components have even weak forms of dependence” [5]. Aitchison instead championed a logistic normal distribution with more parameters to control covariance between components. A number of variants of the Dirichlet that can capture more dependence have been proposed and analyzed. For example, the scaled Dirichlet enables a more flexible shape for the distribution [5], but does not change the support. The original Dirichlet(α1, α2, . . . αd) can be derived as Yj/ P j Yj where Yj ∼Γ(αj, β), whereas the scaled Dirichlet is derived from Yj ∼Γ(αj, βj), resulting in density p(θ) = γ Q j β αj j θ αj −1 j (P i βiθi)α1+···+αd , where β, α ∈Rd + are parameters, and γ is the normalizer. Another variant is the generalized Dirichlet [6] which also has parameters β, α ∈Rd +, and allows greater control of the covariance structure, again without changing the support. As perhaps first noted by Karl Pearson [7] and expounded upon by Aitchison [5], correlations of proportional data can be very misleading. Many Dirichlet variants have been generalizations of the Connor-Mossiman variant, Dirichlet process variants, other compound Dirichlet models, and hierarchical Dirichlet models. Ongaro et al. [8] propose the flexible Dirichlet distribution by forming a re-parameterized mixture of Dirichlet distributions. Rayens and Srinivasan [9] considered the dependence structure for the general Dirichlet family called the generalized Liouville distributions. In contrast to prior efforts, the shadow Dirichlet manipulates the support to achieve various kinds of dependence that arise frequently in machine learning problems. 3 Shadow Dirichlet Distribution We introduce a new distribution that we call the shadow Dirichlet distribution. Let S be the probability (d −1)-simplex, and let ˜Θ ∈S be a random pmf drawn from a Dirichlet distribution with density pD and unnormalized parameter α ∈Rd +. Then we say the random pmf Θ ∈S is distributed according to a shadow Dirichlet distribution if Θ = M ˜Θ for some fixed d × d left-stochastic (that is, each column of M sums to 1) full-rank (and hence invertible) matrix M, and we call ˜Θ the gen2 erating Dirichlet of Θ, or Θ’s Dirichlet shadow. Because M is a left-stochastic linear map between finite-dimensional spaces, it is a continuous map from the convex and compact S to a convex and compact subset of S that we denote SM. The shadow Dirichlet has two parameters: the generating Dirichlet’s parameter α ∈Rd +, and the d × d matrix M. Both α and M can be estimated from data. However, as we show in the following subsections, the matrix M can be profitably used as a design parameter that is chosen based on application-specific knowledge or side-information to specify the restricted domain SM, and in that way impose dependency between the components of the random pmfs. The shadow Dirichlet density p(θ) is the normalized pushforward of the Dirichlet density, that is, it is the composition of the Dirichlet density and M −1 with the Jacobian: p(θ) = 1 B(α) |det(M)| Y j (M −1θ)αj−1 j , (1) where B(α) ≜ Q j Γ(αj) Γ(α0) is the standard Dirichlet normalizer, and α0 = Pd j=1 αj is the standard Dirichlet precision factor. Table 1 summarizes the basic properties of the shadow Dirichlet. Fig. 1 shows an example shadow Dirichlet distribution. Generating samples from the shadow Dirichlet is trivial: generate samples from its generating Dirichlet (for example, using stick-breaking or urn-drawing) and multiply each sample by M to create the corresponding shadow Dirichlet sample. Table 1: Table compares and summarizes the Dirichlet, renormalized Dirichlet, and shadow Dirichlet distributions. Shadow Renormalized Dirichlet(α) Dirichlet (α, M) Dirichlet (α, ˜S) Density p(θ) 1 B(α) Qd j=1 θ αj−1 j 1 B(α)|det(M)| Qd j=1(M −1θ) αj−1 j 1 R ˜ S Q d j=1 q αj −1 j dq Qd j=1 θ αj−1 j Mean α α0 M α α0 R ˜ S θp(θ)dθ Covariance Cov(Θ) M Cov(Θ)M T R ˜ S(θ −¯θ)(θ −¯θ)T p(θ)dθ Mode (if α > 1) αj−1 α0−d M αj−1 α0−d max θ∈˜ S p(θ) How to Sample stick-breaking, draw from Dirichlet(α), draw from Dirichlet(α), urn-drawing multiply by M reject if not in ˜S ML Estimate iterative iterative unknown (simple functions) (simple functions) complexity ML Compound iterative iterative unknown Estimate (simple functions) (numerical integration) complexity 3.1 Example: Regularized Pmfs The shadow Dirichlet can be designed to specify a distribution over a set of regularized pmfs SM = {θ θ = λ˜θ + (1 −λ)˘θ, ˜θ ∈S}, for specific values of λ and ˘θ. In general, for a given λ and ˘θ ∈S, the following d × d matrix M will change the support to the desired subset SM by mapping the extreme points of S to the extreme points of SM: M = (1 −λ)˘θ1T + λI, (2) where I is the d × d identity matrix. In Section 4 we show that the M given in (2) is optimal in a maximum entropy sense. 3 3.2 Example: Bounded Variation Pmfs We describe how to use the shadow Dirichlet to model a random pmf that has bounded variation such that |θk −θl| ≤ϵk,l for any k, ℓ∈{1, 2, . . . , d} and ϵk,l > 0. To construct specified bounds on the variation, we first analyze the variation for a given M. For any d × d left stochastic matrix M, θ = M ˜θ = hPd j=1 M1j ˜θj . . . Pd j=1 Mdj ˜θj iT , so the difference between any two entries is |θk −θl| = X j (Mkj −Mlj)˜θj ≤ X j |Mkj −Mlj| ˜θj. (3) Thus, to obtain a distribution over pmfs with bounded |θk −θℓ| ≤ϵk,l for any k, ℓcomponents, it is sufficient to choose components of the matrix M such that |Mkj −Mlj| ≤ϵk,l for all j = 1, . . . , d because ˜θ in (3) sums to 1. One way to create such an M is using the regularization strategy described in Section 3.1. For this case, the jth component of θ is θj =  M ˜θ  j = λ˜θj + (1 −λ)˘θj, and thus the variation between the ith and jth component of any pmf in SM is: |θi −θj| = λ˜θi + (1 −λ)˘θi −λ˜θj −(1 −λ)˘θj ≤λ ˜θi −˜θj + (1 −λ) ˘θi −˘θj ≤λ + (1 −λ) max i,j ˘θi −˘θj . (4) Thus by choosing an appropriate λ and regularizing pmf ˘θ, one can impose the bounded variation given by (4). For example, set ˘θ to be the uniform pmf, and choose any λ ∈(0, 1), then the matrix M given by (2) will guarantee that the difference between any two entries of any pmf drawn from the shadow Dirichlet (M, α) will be less than or equal to λ. 3.3 Example: Monotonic Pmfs For pmfs over ordered components, it may be desirable to restrict the support of the random pmf distribution to only monotonically increasing pmfs (or to only monotonically decreasing pmfs). A d × d left-stochastic matrix M that will result in a shadow Dirichlet that generates only monotonically increasing d × 1 pmfs has kth column [0 . . . 0 1/(d −k + 1) . . . 1/(d −k + 1)]T , we call this the monotonic M. It is easy to see that with this M only monotonic θ’s can be produced, because θ1 = 1 d ˜θ1 which is less than or equal to θ2 = 1 d ˜θ1 + 1 d−1 ˜θ2 and so on. In Section 4 we show that the monotonic M is optimal in a maximum entropy sense. Note that to provide support over both monotonically increasing and decreasing pmfs with one distribution is not achievable with a shadow Dirichlet, but could be achieved by a mixture of two shadow Dirichlets. 3.4 What Restricted Subsets are Possible? Above we have described solutions to construct M for three kinds of dependence that arise in machine learning applications. Here we consider the more general question: What subsets of the simplex can be the support of the shadow Dirichlet, and how to design a shadow Dirichlet for a particular support? For any matrix M, by the Krein-Milman theorem [10], SM = MS is the convex hull of its extreme points. If M is injective, the extreme points of SM are easy to specify, as a d × d matrix M will have d extreme points that occur for the d choices of θ that have only one nonzero component, as the rest of the θ will create a non-trivial convex combination of the columns of M, and therefore cannot result in extreme points of SM by definition. That is, the extreme points of SM are the d columns of M, and one can design any SM with d extreme points by setting the columns of M to be those extreme pmfs. However, if one wants the new support to be a polytope in the probability (d −1)-simplex with m > d extreme points, then one must use a fat M with d×m entries. Let Sm denote the probability 4 (m −1)-simplex, then the domain of the shadow Dirichlet will be MSm, which is the convex hull of the m columns of M and forms a convex polytope in S with at most m vertices. In this case M cannot be injective, and hence it is not bijective between Sm and MSm. However, a density on MSm can be defined as: p(θ) = 1 B(α) Z {˜θ M ˜θ=θ} Y j ˜θαj−1 j d˜θ. (5) On the other hand, if one wants the support to be a low-dimensional polytope subset of a higherdimensional probability simplex, then a thin d × m matrix M, where m < d, can be used to implement this. If M is injective, then it has a left inverse M ∗that is a matrix of dimension m × d, and the normalized pushforward of the original density can be used as a density on the image MSm: p(θ) = 1 B(α) |det(M T M)|1/2 Y j (M ∗θ)αj−1 j , If M is not injective then one way to determine a density is to use (5). 4 Information-theoretic Properties In this section we note two information-theoretic properties of the shadow Dirichlet. Let Θ be drawn from shadow Dirichlet density pM, and let its generating Dirichlet ˜Θ be drawn from pD. Then the differential entropy of the shadow Dirichlet is h(pM) = log |det(M)| + h(pD), where h(pD) is the differential entropy of its generating Dirichlet. In fact, the shadow Dirichlet always has less entropy than its Dirichlet shadow because log |det(M)| ≤0, which can be shown as a corollary to the following lemma (proof not included due to lack of space): Lemma 4.1. Let {x1, . . . , xn} and {y1, . . . , yn} be column vectors in Rn. If each yj is a convex combination of the xi’s, i.e. yj = Pn i=1 γjixi, Pn i=1 γji = 1, γjk ≥0, ∀j, k ∈{1, . . . , n} then |det[y1, . . . , yn]| ≤|det[x1, . . . , xn]|. It follows from Lemma 4.1 that the constructive solutions for M given in (2) and the monotonic M are optimal in the sense of maximizing entropy: Corollary 4.1. Let Mreg be the set of left-stochastic matrices M that parameterize shadow Dirichlet distributions with support in {θ θ = λ˜θ + (1 −λ)˘θ, ˜θ ∈S}, for a specific choice of λ and ˘θ. Then the M given in (2) results in the shadow Dirichlet with maximum entropy, that is, (2) solves arg maxM∈Mreg h(pM). Corollary 4.2. Let Mmono be the set of left-stochastic matrices M that parameterize shadow Dirichlet distributions that generate only monotonic pmfs. Then the monotonic M given in Section 3.3 results in the shadow Dirichlet with maximum entropy, that is, the monotonic M solves arg maxM∈Mmono h(pM). 5 Estimating the Distribution from Data In this section, we discuss the estimation of α for the shadow Dirichlet and compound shadow Dirichlet, and the estimation of M. 5.1 Estimating α for the Shadow Dirichlet Let matrix M be specified (for example, as described in the subsections of Section 3), and let q be a d × N matrix where the ith column qi is the ith sample pmf for i = 1 . . . N, and let (qi)j be the jth component of the ith sample pmf for j = 1, . . . , d. Then finding the maximum likelihood estimate 5 of α for the shadow Dirichlet is straightforward: arg max α∈Rk + log N Y i=1 p(qi|α) ≡arg max α∈Rk + log  1 B(α) |det(M)| N + log  Y i Y j (M −1qi)αj−1 j   ≡arg max α∈Rk + log   1 B(α)N Y i Y j (˜qi)αj−1 j  , (6) where ˜q = M −1q. Note (6) is the maximum likelihood estimation problem for the Dirichlet distribution given the matrix ˜q, and can be solved using the standard methods for that problem (see e.g. [11, 12]). 5.2 Estimating α for the Compound Shadow Dirichlet For many machine learning applications the given data are modeled as samples from realizations of a random pmf, and given these samples one must estimate the random pmf model’s parameters. We refer to this case as the compound shadow Dirichlet, analogous to the compound Dirichlet (also called the multivariate P´olya distribution). Assuming one has already specified M, we first discuss method of moments estimation, and then describe an expectation-maximization (EM) method for computing the maximum likelihood estimate ˘α. One can form an estimate of α by the method of moments. For the standard compound Dirichlet, one treats the samples of the realizations as normalized empirical histograms, sets the normalized α parameter equal to the empirical mean of the normalized histograms, and uses the empirical variances to determine the precision α0. By definition, this estimate will be less likely than the maximum likelihood estimate, but may be a practical short-cut in some cases. For the compound shadow Dirichlet, we believe the method of moments estimator will be a poorer estimate in general. The problem is that if one draws samples from a pmf θ from a restricted subset SM of the simplex, then the normalized empirical histogram ˘θ of those samples may not be in SM. For example given a monotonic pmf, the histogram of five samples drawn from it may not be monotonic. Then the empirical mean of such normalized empirical histograms may not be in SM, and so setting the shadow Dirichlet mean Mα equal to the empirical mean may lead to an infeasible estimate (one that is outside SM). A heuristic solution is to project the empirical mean into SM first, for example, by finding the nearest pmf in SM in squared error or relative entropy. As with the compound Dirichlet, this may still be a useful approach in practice for some problems. Next we state an EM method to find the maximum likelihood estimate ˘α. Let s be a d × N matrix of sample histograms from different experiments, such that the ith column si is the ith histogram for i = 1, . . . , N, and (si)j is the number of times we have observed the jth event from the ith pmf vi. Then the maximum log-likelihood estimate of α solves arg max log p(s|α) for α ∈Rk +. If the random pmfs are drawn from a Dirichlet distribution, then finding this maximum likelihood estimate requires an iterative procedure, and can be done in several ways including a gradient descent (ascent) approach. However, if the random pmfs are drawn from a shadow Dirichlet distribution, then a direct gradient descent approach is highly inconvenient as it requires taking derivatives of numerical integrals. However, it is practical to apply the expectation-maximization (EM) algorithm [13][14], as we describe in the rest of this section. Code to perform the EM estimation of α can be downloaded from idl.ee.washington.edu/publications.php. We assume that the experiments are independent and therefore p(s|α) = p({si}|α) = Q i p(si|α) and hence arg maxα∈Rk + log p(s|α) = arg maxα∈Rk + P i log p(si|α). To apply the EM method, we consider the complete data to be the sample histograms s and the pmfs that generated them (s, v1, v2, . . . , vN), whose expected log-likelihood will be maximized. Specifically, because of the assumed independence of the {vi}, the EM method requires one to repeatedly maximize the Q-function such that the estimate of α at the (m + 1)th iteration is: α(m+1) = arg max α∈Rk + N X i=1 Evi|si,α(m) [log p(vi|α)] . (7) 6 Like the compound Dirichlet likelihood, the compound shadow Dirichlet likelihood is not necessarily concave. However, note that the Q-function given in (7) is concave, because log p(vi|α) = −log |det(M)| + log pD,α M −1vi  , where pD,α is the Dirichlet distribution with parameter α, and by a theorem of Ronning [11], log pD,α is a concave function, and adding a constant does not change the concavity. The Q-function is a finite integration of such concave functions and hence also concave [15]. We simplify (7) without destroying the concavity to yield the equivalent problem α(m+1) = arg max g(α) for α ∈Rk +, where g(α) = log Γ(α0) −Pd j=1 log Γ(αj) + Pd j=1 βjαj, and βj = 1 N PN i=1 tij zi , where tij and zi are integrals we compute with Monte Carlo integration: tij = Z SM log(M −1vi)jγi d Y k=1 (vi) (si)k k pM(vi |α(m))dvi zi = Z SM γi d Y k=1 (vi)jk(si)kpM(vi |α(m))dvi, where γi is the normalization constant for the multinomial with histogram si. We apply the Newton method [16] to maximize g(α), where the gradient ∇g(α) has kth component ψ0(α0) −ψ0(α1) + β1, where ψ0 denotes the digamma function. Let ψ1 denote the trigamma function, then the Hessian matrix of g(α) is: H = ψ1(α0)11T −diag (ψ1(α1), . . . , ψ1(αd)) . Note that because H has a very simple structure, the inversion of H required by the Newton step is greatly simplified by using the Woodbury identity [17]: H−1 = −diag(ξ1, . . . , ξd) − 1 ξ0−P d j=1 ξj [ξiξj]d×d, where ξ0 = 1 ψ1(α0) and ξj = 1 ψ1(αj), j = 1, . . . , d. 5.3 Estimating M for the Shadow Dirichlet Thus far we have discussed how to construct M to achieve certain desired properties and how to interpret a given M’s effect on the support. In some cases it may be useful to estimate M directly from data, for example, finding the maximum likelihood M. In general, this is a non-convex problem because the set of rank d −1 matrices is not convex. However, we offer two approximations. First, note that as in estimating the support of a uniform distribution, the maximum likelihood M will correspond to a support that is no larger than needed to contain the convex hull of sample pmfs. Second, the mean of the empirical pmfs will be in the support, and thus a heuristic is to set the kth column of M (which corresponds to the kth vertex of the support) to be a convex combination of the kth vertex of the standard probability simplex and the empirical mean pmf. We provide code that finds the d optimal such convex combinations such that a specificed percentage of the sample pmfs are within the support, which reduces the non-convex problem of finding the maximum likelihood d × d matrix M to a d-dimensional convex relaxation. 6 Demonstrations It is reasonable to believe that if the shadow Dirichlet better matches the problem’s statistics, it will perform better in practice, but an open question is how much better? To motivate the reader to investigate this question further in applications, we provide two small demonstrations. 6.1 Verifying the EM Estimation We used a broad suite of simulations to test and verify the EM estimation. Here we include a simple visual confirmation that the EM estimation works: we drew 100 i.i.d. pmfs from a shadow Dirichlet with monotonic M for d = 3 and α = [3.94 2.25 2.81] (used in [18]). From each of the 100 pmfs, we drew 100 i.i.d. samples. Then we applied the EM algorithm to find the α for both the standard compound Dirichlet, and the compound shadow Dirichlet with the correct M. Fig. 2 shows the true distribution and the two estimated distributions. 7 True Distribution Estimated Shadow Dirichlet Estimated Dirichlet (Shadow Dirichlet) Figure 2: Samples were drawn from the true distribution and the given EM method was applied to form the estimated distributions. 6.2 Estimating Proportions from Sales Manufacturers often have constrained manufacturing resources, such as equipment, inventory of raw materials, and employee time, with which to produce multiple products. The manufacturer must decide how to proportionally allocate such constrained resources across their product line based on their estimate of proportional sales. Manufacturer Artifact Puzzles gave us their past retail sales data for the 20 puzzles they sold during July 2009 through Dec 2009, which we used to predict the proportion of sales expected for each puzzle. These estimates were then tested on the next five months of sales data, for January 2010 through April 2010. The company also provided a similarity between puzzles S, where S(A, B) is the proportion of times an order during the six training months included both puzzle A and B if it included puzzle A. We compared treating each of the six training months of sales data as a sample from a compound Dirichlet versus or a compound shadow Dirichlet. For the shadow Dirichlet, we normalized each column of the similarity matrix S to sum to one so that it was left-stochastic, and used that as the M matrix; this forces puzzles that are often bought together to have closer estimated proportions. We estimated each α parameter by EM to maximize the likelihood of the past sales data, and then estimated the future sales proportions to be the mean of the estimated Dirichlet or shadow Dirichlet distribution. We also compared with treating all six months of sales data as coming from one multinomial which we estimated as the maximum likelihood multinomial, and to taking the mean of the six empirical pmfs. Table 2: Squared errors between estimates and actual proportional sales. Multinomial Mean Pmf Dirichlet Shadow Dirichlet Jan. .0129 .0106 .0109 .0093 Feb. .0185 .0206 .0172 .0164 Mar. .0231 .0222 .0227 .0197 Apr. .0240 .0260 .0235 .0222 7 Summary In this paper we have proposed a variant of the Dirichlet distribution that naturally captures some of the dependent structure that arises often in machine learning applications. We have discussed some of its theoretical properties, and shown how to specify the distribution for regularized pmfs, bounded variation pmfs, monotonic pmfs, and for any desired convex polytopal domain. We have derived the EM method and made available code to estimate both the shadow Dirichlet and compound shadow Dirichlet from data. Experimental results demonstrate that the EM method can estimate the shadow Dirichlet effectively, and that the shadow Dirichlet may provide worthwhile advantages in practice. 8 References [1] B. Frigyik, A. Kapila, and M. R. Gupta, “Introduction to the Dirichlet distribution and related processes,” Tech. Rep., University of Washington, 2010. [2] C. Zhai and J. Lafferty, “A study of smoothing methods for language models applied to information retrieval,” ACM Trans. on Information Systems, vol. 22, no. 2, pp. 179–214, 2004. [3] Y. Chen, E. K. Garcia, M. R. Gupta, A. Rahimi, and L. Cazzanti, “Similarity-based classification: Concepts and algorithms,” Journal of Machine Learning Research, vol. 10, pp. 747–776, March 2009. [4] R. Nallapati, T. Minka, and S. Robertson, “The smoothed-Dirichlet distribution: a building block for generative topic models,” Tech. Rep., Microsoft Research, Cambridge, 2007. [5] Aitchison, Statistical Analysis of Compositional Data, Chapman Hall, New York, 1986. [6] R. J. Connor and J. E. Mosiman, “Concepts of independence for proportions with a generalization of the Dirichlet distibution,” Journal of the American Statistical Association, vol. 64, pp. 194–206, 1969. [7] K. Pearson, “Mathematical contributions to the theory of evolution–on a form of spurious correlation which may arise when indices are used in the measurement of organs,” Proc. Royal Society of London, vol. 60, pp. 489–498, 1897. [8] A. Ongaro, S. Migliorati, and G. S. Monti, “A new distribution on the simplex containing the Dirichlet family,” Proc. 3rd Compositional Data Analysis Workshop, 2008. [9] W. S. Rayens and C. Srinivasan, “Dependence properties of generalized Liouville distributions on the simplex,” Journal of the American Statistical Association, vol. 89, no. 428, pp. 1465– 1470, 1994. [10] Walter Rudin, Functional Analysis, McGraw-Hill, New York, 1991. [11] G. Ronning, “Maximum likelihood estimation of Dirichlet distributions,” Journal of Statistical Computation and Simulation, vol. 34, no. 4, pp. 215221, 1989. [12] T. Minka, “Estimating a Dirichlet distribution,” Tech. Rep., Microsoft Research, Cambridge, 2009. [13] A. P. Dempster, N. M. Laird, and D. B. Rubin, “Maximum likelihood from incomplete data via the EM algorithm,” Journal of the Royal Statistical Society: Series B (Methodological), vol. 39, no. 1, pp. 1–38, 1977. [14] M. R. Gupta and Y. Chen, Theory and Use of the EM Method, Foundations and Trends in Signal Processing, Hanover, MA, 2010. [15] R. T. Rockafellar, Convex Analysis, Princeton University Press, Princeton, NJ, 1970. [16] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, Cambridge, 2004. [17] K. B. Petersen and M. S. Pedersen, Matrix Cookbook, 2009, Available at matrixcookbook.com. [18] R. E. Madsen, D. Kauchak, and C. Elkan, “Modeling word burstiness using the Dirichlet distribution,” in Proc. Intl. Conf. Machine Learning, 2005. 9
2010
209
3,976
Efficient and Robust Feature Selection via Joint ℓ2,1-Norms Minimization Feiping Nie Computer Science and Engineering University of Texas at Arlington feipingnie@gmail.com Heng Huang Computer Science and Engineering University of Texas at Arlington heng@uta.edu Xiao Cai Computer Science and Engineering University of Texas at Arlington xiao.cai@mavs.uta.edu Chris Ding Computer Science and Engineering University of Texas at Arlington chqding@uta.edu Abstract Feature selection is an important component of many machine learning applications. Especially in many bioinformatics tasks, efficient and robust feature selection methods are desired to extract meaningful features and eliminate noisy ones. In this paper, we propose a new robust feature selection method with emphasizing joint ℓ2,1-norm minimization on both loss function and regularization. The ℓ2,1-norm based loss function is robust to outliers in data points and the ℓ2,1norm regularization selects features across all data points with joint sparsity. An efficient algorithm is introduced with proved convergence. Our regression based objective makes the feature selection process more efficient. Our method has been applied into both genomic and proteomic biomarkers discovery. Extensive empirical studies are performed on six data sets to demonstrate the performance of our feature selection method. 1 Introduction Feature selection, the process of selecting a subset of relevant features, is a key component in building robust machine learning models for classification, clustering, and other tasks. Feature section has been playing an important role in many applications since it can speed up the learning process, improve the mode generalization capability, and alleviate the effect of the curse of dimensionality [15]. A large number of developments on feature selection have been made in the literature and there are many recent reviews and workshops devoted to this topic, e.g., NIPS Conference [7]. In past ten years, feature selection has seen much activities primarily due to the advances in bioinformatics where a large amount of genomic and proteomic data are produced for biological and biomedical studies. For example, in genomics, DNA microarray data measure the expression levels of thousands of genes in a single experiment. Gene expression data usually contain a large number of genes, but a small number of samples. A given disease or a biological function is usually associated with a few genes [19]. Out of several thousands of genes to select a few of relevant genes thus becomes a key problem in bioinformatics research [22]. In proteomics, high-throughput mass spectrometry (MS) screening measures the molecular weights of individual biomolecules (such as proteins and nucleic acids) and has potential to discover putative proteomic biomarkers. Each spectrum is composed of peak amplitude measurements at approximately 15,500 features represented by a corresponding mass-to-charge value. The identification of meaningful proteomic features from MS is crucial for disease diagnosis and protein-based biomarker profiling [22]. 1 In general, there are three models of feature selection methods in the literature: (1) filter methods [14] where the selection is independent of classifiers, (2) wrapper methods [12] where the prediction method is used as a black box to score subsets of features, and (3) embedded methods where the procedure of feature selection is embedded directly in the training process. In bioinformatics applications, many feature selection methods from these categories have been proposed and applied. Widely used filter-type feature selection methods include F-statistic [4], reliefF [11, 13], mRMR [19], t-test, and information gain [21] which compute the sensitivity (correlation or relevance) of a feature with respect to (w.r.t) the class label distribution of the data. These methods can be characterized by using global statistical information. Wrapper-type feature selection methods is tightly coupled with a specific classifier, such as correlation-based feature selection (CFS) [9], support vector machine recursive feature elimination (SVM-RFE) [8]. They often have good performance, but their computational cost is very expensive. Recently sparsity regularization in dimensionality reduction has been widely investigated and also applied into feature selection studies. ℓ1-SVM was proposed to perform feature selection using the ℓ1-norm regularization that tends to give sparse solution [3]. Because the number of selected features using ℓ1-SVM is upper bounded by the sample size, a Hybrid Huberized SVM (HHSVM) was proposed combining both ℓ1-norm and ℓ2-norm to form a more structured regularization [26]. But it was designed only for binary classification. In multi-task learning, in parallel works, Obozinsky et. al. [18] and Argyriou et. al. [1] have developed a similar model for ℓ2,1-norm regularization to couple feature selection across tasks. Such regularization has close connections to group lasso [28]. In this paper, we propose a novel efficient and robust feature selection method to employ joint ℓ2,1norm minimization on both loss function and regularization. Instead of using ℓ2-norm based loss function that is sensitive to outliers, a ℓ2,1-norm based loss function is adopted in our work to remove outliers. Motivated by previous research [1, 18], a ℓ2,1-norm regularization is performed to select features across all data points with joint sparsity, i.e. each feature (gene expression or mass-to-charge value in MS) either has small scores for all data points or has large scores over all data points. To solve this new robust feature selection objective, we propose an efficient algorithm to solve such joint ℓ2,1-norm minimization problem. We also provide the algorithm analysis and prove the convergence of our algorithm. Extensive experiments have been performed on six bioinformatics data sets and our method outperforms five other commonly used feature selection methods in statistical learning and bioinformatics. 2 Notations and Definitions We summarize the notations and the definition of norms used in this paper. Matrices are written as boldface uppercase letters. Vectors are written as boldface lowercase letters. For matrix M = (mij), its i-th row, j-th column are denoted by mi, mj respectively. The ℓp-norm of the vector v ∈Rn is defined as ∥v∥p = µ nP i=1 |vi|p ¶ 1 p . The ℓ0-norm of the vector v ∈Rn is defined as ∥v∥0 = nP i=1 |vi|0. The Frobenius norm of the matrix M ∈Rn×m is defined as ∥M∥F = v u u t n X i=1 m X j=1 m2 ij = v u u t n X i=1 ∥mi∥2 2. (1) The ℓ2,1-norm of a matrix was first introduced in [5] as rotational invariant ℓ1 norm and also used for multi-task learning [1, 18] and tensor factorization [10]. It is defined as ∥M∥2,1 = n X i=1 v u u t m X j=1 m2 ij = n X i=1 °°mi°° 2, (2) 2 which is rotational invariant for rows: ∥MR∥2,1 = ∥M∥2,1 for any rotational matrix R. The ℓ2,1-norm can be generalized to ℓr,p-norm ∥M∥r,p =    n X i=1   m X j=1 |mij|r   p r    1 p = Ã n X i=1 °°mi°°p r ! 1 p . (3) Note that ℓr,p-norm is a valid norm because it satisfies the three norm conditions, including the triangle inequality ∥A∥r,p + ∥B∥r,p ≥∥A + B∥r,p. This can be proved as follows. Starting from the triangle inequality (P i |ui|p) 1 p + (P i |vi|p) 1 p ≥(P i |ui + vi|p) 1 p and setting ui = ∥ai∥r and vi = ∥bi∥r, we obtain ÃX i ∥ai∥p r ! 1 p + ÃX i ∥bi∥p r ! 1 p ≥ ÃX i | ∥ai∥r + ∥bi∥r|p ! 1 p ≥ ÃX i | ∥ai + bi∥r|p ! 1 p , (4) where the second inequality follows the triangle inequality for ℓr norm: ∥ai∥r+∥bi∥r ≥∥ai+bi∥r. Eq. (4) is just ∥A∥r,p + ∥B∥r,p ≥∥A + B∥r,p. However, the ℓ0-norm is not a valid norm because it does not satisfy the positive scalability: ∥αv∥0 = |α|∥v∥0 for scalar α. The term “norm” here is for convenience. 3 Robust Feature Selection Based on ℓ2,1-Norms Least square regression is one of the popular methods for classification. Given training data {x1, x2, · · · , xn} ∈Rd and the associated class labels {y1, y2, · · · , yn} ∈Rc, traditional least square regression solves the following optimization problem to obtain the projection matrix W ∈Rd×c and the bias b ∈Rc: min W,b n X i=1 °°WT xi + b −yi °°2 2. (5) For simplicity, the bias b can be absorbed into W when the constant value 1 is added as an additional dimension for each data xi(1 ≤i ≤n). Thus the problem becomes: min W n X i=1 °°WT xi −yi °°2 2. (6) In this paper, we use the robust loss function: min W n X i=1 °°WT xi −yi °° 2, (7) where the residual ∥WT xi −yi∥is not squared and thus outliers have less importance than the squared residual ∥WT xi −yi∥2. This loss function has a rotational invariant property while the pure ℓ1-norm loss function does not has such desirable property [5]. We now add a regularization term R(W) with parameter γ. The problem becomes: min W n X i=1 °°WT xi −yi °° 2 + γR(W). (8) Several regularizations are possible: R1(W) = ∥W∥2, R2(W) = c X j=1 ∥wj∥1, R3(W) = d X i=1 °°wi°°0 2, R4(W) = d X i=1 °°wi°° 2. (9) R1(W) is the ridge regularization. R2(W) is the LASSO regularization. R3(W) and R4(W) penalizes all c regression coefficients corresponding to a single feature as a whole. This has the 3 effects of feature selection. Although the ℓ0-norm of R3(W) is the most desirable [16], in this paper, we use R4(W) instead. The reasons are: (A) the ℓ1-norm of R4(W) is convex and can be easily optimized (the main contribution of this paper); (B) it was shown that results of ℓ0-norm is identical or approximately identical to the ℓ1-norm results under practical conditions. Denote data matrix X = [x1, x2, · · · , xn] ∈Rd×n and label matrix Y = [y1, y2, · · · , yn]T ∈ Rn×c. In this paper, we optimize min W J(W) = n X i=1 °°WT xi −yi °° 2 + γR4(W) = °°XT W −Y °° 2,1 + γ ∥W∥2,1 . (10) It seems that solving this joint ℓ2,1-norm problem is difficult as both of the terms are non-smooth. Surprisingly, we will show in the next section that the problem can be solved using a simple yet efficient algorithm. 4 An Efficient Algorithm 4.1 Reformulation as A Constrained Problem First, the problem in Eq. (10) is equivalent to min W 1 γ °°XT W −Y °° 2,1 + ∥W∥2,1 , (11) which is further equivalent to min W,E ∥E∥2,1 + ∥W∥2,1 s.t. XT W + γE = Y. (12) Rewriting the above problem as min W,E °°°° · W E ¸°°°° 2,1 s.t. £ XT γI ¤ · W E ¸ = Y, (13) where I ∈Rn×n is an identity matrix. Denote m = n + d. Let A = £ XT γI ¤ ∈Rn×m and U = · W E ¸ ∈Rm×c, then the problem in Eq. (13) can be written as: min U ∥U∥2,1 s.t. AU = Y (14) This optimization problem Eq. (14) has been widely used in the Multiple Measurement Vector (MMV) model in signal processing community. It was generally felt that the ℓ2,1-norm minimization problem is much more difficult to solve than the ℓ1-norm minimization problem. Existing algorithms usually reformulate it as a second-order cone programming (SOCP) or semidefinite programming (SDP) problem, which can be solved by interior point method or the bundle method. However, solving SOCP or SDP is computationally very expensive, which limits their use in practice. Recently, an efficient algorithm was proposed to solve the specific problem Eq. (14) by complicatedly reformulating the problem as a min-max problem and then applying the proximal method to solve it [25]. The reported results show that the algorithm is more efficient than existing algorithms. However, the algorithm is a gradient descent type method and converges very slow. Moreover, the algorithm is derived to solve the specific problem, and can not be applied directly to solve other general ℓ2,1-norm minimization problem. In the next subsection, we will propose a very simple but at the same time much more efficient method to solve this problem. Theoretical analysis guarantees that the proposed method will converge to the global optimum. More importantly, this method is very easy to implement and can be readily used to solve other general ℓ2,1-norm minimization problem. 4.2 An Efficient Algorithm to Solve the Constrained Problem The Lagrangian function of the problem in Eq. (14) is L(U) = ∥U∥2,1 −Tr(ΛT (AU −Y)). (15) 4 Taking the derivative of L(U) w.r.t U, and setting the derivative to zero, we have: ∂L(U) ∂U = 2DU −AT Λ = 0, (16) where D is a diagonal matrix with the i-th diagonal element as1 dii = 1 2 ∥ui∥2 . (17) Left multiplying the two sides of Eq. (16) by AD−1, and using the constraint AU = Y, we have: 2AU −AD−1AT Λ = 0 ⇒2Y −AD−1AT Λ = 0 ⇒Λ = 2(AD−1AT )−1Y (18) Substitute Eq. (18) into Eq. (16), we arrive at: U = D−1AT (AD−1AT )−1Y. (19) Since the problem in Eq. (14) is a convex problem, U is a global optimum solution to the problem if and only if the Eq. (19) is satisfied. Note that D is dependent to U and thus is also a unknown variable. We propose an iterative algorithm in this paper to obtain the solution U such that Eq. (19) is satisfied, and prove in the next subsection that the proposed iterative algorithm will converge to the global optimum. The algorithm is described in Algorithm 1. In each iteration, U is calculated with the current D, and then D is updated based on the current calculated U. The iteration procedure is repeated until the algorithm converges. Data: A ∈Rn×m, Y ∈Rn×c Result: U ∈Rm×c Set t = 0. Initialize Dt ∈Rm×m as an identity matrix repeat Calculate Ut+1 = D−1 t AT (AD−1 t AT )−1Y. Calculate the diagonal matrix Dt+1, where the i-th diagonal element is 1 2∥ui t+1∥2 . t = t + 1. until Converges Algorithm 1: An efficient iterative algorithm to solve the optimization problem in Eq. (14). 4.3 Algorithm Analysis The Algorithm 1 monotonically decreases the objective of the problem in Eq. (14) in each iteration. To prove it, we need the following lemma: Lemma 1. For any nonzero vectors u, ut ∈Rc, the following inequality holds: ∥u∥2 − ∥u∥2 2 2 ∥ut∥2 ≤∥ut∥2 −∥ut∥2 2 2 ∥ut∥2 . (20) Proof. Beginning with an obvious inequality (√v −√vt)2 ≥0, we have (√v −√vt)2 ≥0 ⇒v −2√vvt + vt ≥0 ⇒√v − v 2√vt ≤ √vt 2 ⇒√v − v 2√vt ≤√vt − vt 2√vt (21) Substitute the v and vt in Eq. (21) by ∥u∥2 2 and ∥ut∥2 2 respectively, we arrive at the Eq. (20). 1When ui = 0, then dii = 0 is a subgradient of ∥U∥2,1 w.r.t. ui. However, we can not set dii = 0 when ui = 0, otherwise the derived algorithm can not be guaranteed to converge. Two methods can be used to solve this problem. First, we will see from Eq.(19) that we only need to calculate D−1, so we can let the i-th element of D−1 as 2 °°ui°° 2. Second, we can regularize dii as dii = 1 2√ (ui)T ui+ς , and the derived algorithm can be proved to minimize the regularized ℓ2,1-norms of U (defined as nP i=1 p (ui)T ui + ς) instead of the ℓ2,1-norms of U. It is easy to see that the regularized ℓ2,1-norms of U approximates the ℓ2,1-norms of U when ς →0. 5 The convergence of the Algorithm 1 is summarized in the following theorem: Theorem 1. The Algorithm 1 will monotonically decrease the objective of the problem in Eq. (14) in each iteration, and converge to the global optimum of the problem. Proof. It can easily verified that Eq. (19) is the solution to the following problem: min U Tr(UT DU) s.t. AU = Y (22) Thus in the t iteration, Ut+1 = arg U min AU=Y TrUT DtU, (23) which indicates that Tr(UT t+1DtUt+1) ≤Tr(UT t DtUt). (24) That is to say, m X i=1 °°ui t+1 °°2 2 2 °°ui t °° 2 ≤ m X i=1 °°ui t °°2 2 2 °°ui t °° 2 , (25) where vectors ui t and ui t+1 denote the i-th row of matrices Ut and Ut+1, respectively. On the other hand, according to Lemma 1, for each i we have °°ui t+1 °° 2 − °°ui t+1 °°2 2 2 °°ui t °° 2 ≤ °°ui t °° 2 − °°ui t °°2 2 2 °°ui t °° 2 . (26) Thus the following inequality holds: m X i=1 Ã °°ui t+1 °° 2 − °°ui t+1 °°2 2 2 °°ui t °° 2 ! ≤ m X i=1 Ã °°ui t °° 2 − °°ui t °°2 2 2 °°ui t °° 2 ! . (27) Combining Eq. (25) and Eq. (27), we arrive at m X i=1 °°ui t+1 °° 2 ≤ m X i=1 °°ui t °° 2. (28) That is to say, ∥Ut+1∥2,1 ≤∥Ut∥2,1 . (29) Thus the Algorithm 1 will monotonically decrease the objective of the problem in Eq. (14) in each iteration t. In the convergence, Ut and Dt will satisfy the Eq. (19). As the problem in Eq. (14) is a convex problem, satisfying the Eq. (19) indicates that U is a global optimum solution to the problem in Eq. (14). Therefore, the Algorithm 1 will converge to the global optimum of the problem (14). Note that in each iteration, the Eq. (19) can be solved efficiently. First, D is a diagonal matrix and thus D−1 is also diagonal with the i-th diagonal element as d−1 ii = 2 °°ui°° 2. Second, the term Z = (AD−1AT )−1Y in Eq. (19) can be efficiently obtained by solving the linear equation: (AD−1AT )Z = Y. (30) Empirical results show that the convergence is fast and only a few iterations are needed to converge. Therefore, the proposed method can be applied to large scale problem in practice. It is worth to point out that the proposed method can be easily extended to solve other ℓ2,1-norm minimization problem. For example, considering a general ℓ2,1-norm minimization problem as follows: min U f(U) + X k ∥AkU + Bk∥2,1 s.t. U ∈C (31) The problem can be solved by solve the following problem iteratively: min U f(U) + X k Tr((AkU + Bk)T Dk(AkU + Bk)) s.t. U ∈C (32) where Dk is a diagonal matrix with the i-th diagonal element as 1 2∥(AkU+Bk)i∥2 . Similar theoretical analysis can be used to prove that the iterative method will converge to a local minimum. If the problem Eq. (31) is a convex problem, i.e., f(U) is a convex function and C is a convex set, then the iterative method will converge to the global minimum. 6 0 10 20 30 40 50 60 70 80 70 75 80 85 90 95 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (a) ALLAML 0 10 20 30 40 50 60 70 80 30 35 40 45 50 55 60 65 70 75 80 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (b) GLIOMA 0 10 20 30 40 50 60 70 80 75 80 85 90 95 100 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (c) LUNG 0 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 90 100 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (d) Carcinomas 0 10 20 30 40 50 60 70 80 80 82 84 86 88 90 92 94 96 98 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (e) PROSTATE-GE 0 10 20 30 40 50 60 70 80 70 75 80 85 90 95 100 the number of features selected the classification accuracy ReliefF FscoreRank T−test Information gain mRMR RFS (f) PROSTATE-MS Figure 1: Classification accuracy comparisons of six feature selection algorithms on 6 data sets. SVM with 5-fold cross validation is used for classification. RFS is our method. 5 Experimental Results In order to validate the performance of our feature selection method, we applied our method into two bioinformatics applications, gene expression and mass spectrometry classifications. In our experiments, we used five publicly available microarray data sets and one Mass Spectrometry (MS) data sets: ALLAML data set [6], the malignant glioma (GLIOMA) data set [17], the human lung carcinomas (LUNG) data set [2], Human Carcinomas (Carcinomas) data set [24, 27], Prostate Cancer gene expression (Prostate-GE) data set [23] for microarray data; and Prostate Cancer (Prostate-MS) [20] for MS data. The Support Vector Machine (SVM) classifier is employed to these data sets, using 5-fold cross-validation. 5.1 Data Sets Descriptions We give a brief description on all data sets used in our experiments as follows. ALLAML data set contains in total 72 samples in two classes, ALL and AML, which contain 47 and 25 samples, respectively. Every sample contains 7,129 gene expression values. GLIOMA data set contains in total 50 samples in four classes, cancer glioblastomas (CG), noncancer glioblastomas (NG), cancer oligodendrogliomas (CO) and non-cancer oligodendrogliomas (NO), which have 14, 14, 7,15 samples, respectively. Each sample has 12625 genes. Genes with minimal variations across the samples were removed. For this data set, intensity thresholds were set at 20 and 16,000 units. Genes whose expression levels varied < 100 units between samples, or varied < 3 fold between any two samples, were excluded. After preprocessing, we obtained a data set with 50 samples and 4433 genes. LUNG data set contains in total 203 samples in five classes, which have 139, 21, 20, 6,17 samples, respectively. Each sample has 12600 genes. The genes with standard deviations smaller than 50 expression units were removed and we obtained a data set with 203 samples and 3312 genes. Carcinomas data set composed of total 174 samples in eleven classes, prostate, bladder/ureter, breast, colorectal, gastroesophagus, kidney, liver, ovary, pancreas, lung adenocarcinomas, and lung squamous cell carcinoma, which have 26, 8, 26, 23, 12, 11, 7, 27, 6, 14, 14 samples, respectively. In the original data [24], each sample contains 12533 genes. In the preprocessed data set [27], there are 174 samples and 9182 genes. 7 Table 1: Classification Accuracy of SVM using 5-fold cross validation. Six feature selection methods are compared. RF: ReliefF, F-s: F-score, IG: Information Gain, and RFS: our method. Average accuracy of top 20 features (%) Average accuracy of top 80 features (%) RF F-s T-test IG mRMR RFS RF F-s T-test IG mRMR RFS ALLAML 90.36 89.11 92.86 93.21 93.21 95.89 95.89 96.07 94.29 95.71 94.46 97.32 GLIOMA 50 50 56 60 62 74 54 60 58 66 66 70 LUNG 91.68 87.7 89.22 93.1 92.61 93.63 93.63 91.63 90.66 95.1 94.12 96.07 Carcinom. 79.88 65.48 49.9 85.09 78.22 91.38 90.24 83.33 68.91 89.65 87.92 93.66 Pro-GE 92.18 95.09 92.18 92.18 93.18 95.09 91.18 93.18 93.18 89.27 86.36 95.09 Pro-MS 76.41 98.89 95.56 98.89 95.42 98.89 89.93 98.89 94.44 98.89 93.14 100 Average 80.09 81.04 79.29 87.09 85.78 91.48 85.81 87.18 83.25 89.10 87 92.02 Prostate-GE data set has in total 102 samples in two classes tumor and normal, which have 52 and 50 samples, respectively. The original data set contains 12600 genes. In our experiment, intensity thresholds were set at 100 C16000 units. Then we filtered out the genes with max/min ≤5 or (max-min) ≤50. After preprocessing, we obtained a data set with 102 samples and 5966 genes. Prostate-MS data can be obtained from the FDA-NCI Clinical Proteomics Program Databank [20]. This MS data set consists of 190 samples diagnosed as benign prostate hyperplasia, 63 samples considered as no evidence of disease, and 69 samples diagnosed as prostate cancer. The samples diagnosed as benign prostate hyperplasia as well as samples having no evidence of prostate cancer were pooled into one set making 253 control samples, whereas the other 69 samples are the cancer samples. 5.2 Classification Accuracy Comparisons All data sets are standardized to be zero-mean and normalized by standard deviation. SVM classifier has been individually performed on all data sets using 5-fold cross-validation. We utilize the linear kernel with the parameter C = 1. We compare our feature selection method (called as RFS) to several popularly used feature selection methods in bioinformatics, such as F-statistic [4], reliefF [11, 13], mRMR [19], t-test, and information gain [21]. Because the above data sets are for multiclass classification problem, we don’t compare to ℓ1-SVM, HHSVM and other methods that were designed for binary classification. Fig. 1 shows the classification accuracy comparisons of all five feature selection methods on six data sets. Table 1 shows the detailed experimental results using SVM. We compute the average accuracy using the top 20 and top 80 features for all feature selection approaches. Obviously our approaches outperform other methods significantly. With top 20 features, our method is around 5%-12% better than other methods all six data sets. 6 Conclusions In this paper, we proposed a new efficient and robust feature selection method with emphasizing joint ℓ2,1-norm minimization on both loss function and regularization. The ℓ2,1-norm based regression loss function is robust to outliers in data points and also efficient in calculation. Motivated by previous work, the ℓ2,1-norm regularization is used to select features across all data points with joint sparsity. We provided an efficient algorithm with proved convergence. Our method has been applied into both genomic and proteomic biomarkers discovery. Extensive empirical studies have been performed on two bioinformatics tasks, six data sets, to demonstrate the performance of our method. 7 Acknowledgements This research was funded by US NSF-CCF-0830780, 0939187, 0917274, NSF DMS-0915228, NSF CNS-0923494, 1035913. 8 References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. NIPS, pages 41–48, 2007. [2] A. Bhattacharjee, W. G. Richards, and et. al. Classification of human lung carcinomas by mRNA expression profiling reveals distinct adenocarcinoma subclasses. Proceedings of the National Academy of Sciences, 98(24):13790–13795, 2001. [3] P. Bradley and O. Mangasarian. Feature selection via concave minimization and support vector machines. ICML, 1998. [4] C. Ding and H. Peng. Minimum redundancy feature selection from microarray gene expression data. Proceedings of the Computational Systems Bioinformatics, 2003. [5] C. Ding, D. Zhou, X. He, and H. Zha. R1-PCA: Rotational invariant L1-norm principal component analysis for robust subspace factorization. Proc. Int’l Conf. Machine Learning (ICML), June 2006. [6] S. P. Fodor. DNA SEQUENCING: Massively Parallel Genomics. Science, 277(5324):393–395, 1997. [7] I. Guyon and A. Elisseeff. An introduction to variable and feature selection. J. Machine Learning Research, 2003. [8] I. Guyon, J.Weston, S. Barnhill, and V. Vapnik. Gene selection for cancer classification using support vector machines. Machine Learning, 46(1):389, 2002. [9] M. A. Hall and L. A. Smith. Feature selection for machine learning: Comparing a correlation-based filter approach to the wrapper. 1999. [10] H. Huang and C. Ding. Robust tensor factorization using r1 norm. CVPR 2008, pages 1–8, 2008. [11] K. Kira and L. A. Rendell. A practical approach to feature selection. In A Practical Approach to Feature Selection, pages 249–256, 1992. [12] R. Kohavi and G. H. John. Wrappers for feature subset selection. Artificial Intelligence, 97(1-2):273–324, 1997. [13] I. Kononenko. Estimating attributes: Analysis and extensions of RELIEF. In European Conference on Machine Learning, pages 171–182, 1994. [14] P. Langley. Selection of relevant features in machine learning. In AAAI Fall Symposium on Relevance, pages 140–144, 1994. [15] H. Liu and H. Motoda. Feature Selection for Knowledge Discovery and Data Mining. Springer, 1998. [16] D. Luo, C. Ding, and H. Huang. Towards structural sparsity: An explicit ℓ2/ℓ0 approach. ICDM, 2010. [17] C. L. Nutt, D. R. Mani, R. A. Betensky, P. Tamayo, J. G. Cairncross, C. Ladd, U. Pohl, C. Hartmann, and M. E. Mclaughlin. Gene expression-based classification of malignant gliomas correlates better with survival than histological classification. Cancer Res., 63:1602–1607, 2003. [18] G. Obozinski, B. Taskar, and M. Jordan. Multi-task feature selection. Technical report, Department of Statistics, University of California, Berkeley, 2006. [19] H. Peng, F. Long, and C. Ding. Feature selection based on mutual information: Criteria of max-depe ndency, max-relevance, and min-redundancy. IEEE Trans. Pattern Analysis and Machine Intelligence, 27, 2005. [20] P. C. Petricoin EF, Ornstein DK. Serum proteomic patterns for detection of prostate cancer. J Natl Cancer Inst., 94(20):1576–8, 2002. [21] L. E. Raileanu and K. Stoffel. Theoretical comparison between the gini index and information gain criteria. Univeristy of Neuchatel, 2000. [22] Y. Saeys, I. Inza, and P. Larranaga. A review of feature selection techniques in bioinformatics. Bioinformatics, 23(19):2507–2517, 2007. [23] D. Singh, P. Febbo, K. Ross, and et al. Gene expression correlates of clinical prostate cancer behavior. Cancer Cell, pages 203–209, 2002. [24] A. I. Su, J. B. Welsh, L. M. Sapinoso, and et al. Molecular classification of human carcinomas by use of gene expression signatures. Cancer Research, 61:7388–7393, 2001. [25] L. Sun, J. Liu, J. Chen, and J. Ye. Efficient recovery of jointly sparse vectors. In Neural Information Processing Systems, 2009. [26] L. Wang, J. Zhu, and H. Zou. Hybrid huberized support vector machines for microarray classification. ICML, 2007. [27] K. Yang, Z. Cai, J. Li, and G. Lin. A stable gene selection in microarray data analysis. BMC Bioinformatics, 7:228, 2006. [28] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B, 68:49–67, 2005. 9
2010
21
3,977
MAP estimation in Binary MRFs via Bipartite Multi-cuts Sashank J. Reddi∗ Sunita Sarawagi Sundar Vishwanathan IIT Bombay IIT Bombay IIT Bombay sashank@cse.iitb.ac.in sunita@cse.iitb.ac.in sundar@cse.iitb.ac.in Abstract We propose a new LP relaxation for obtaining the MAP assignment of a binary MRF with pairwise potentials. Our relaxation is derived from reducing the MAP assignment problem to an instance of a recently proposed Bipartite Multi-cut problem where the LP relaxation is guaranteed to provide an O(log k) approximation where k is the number of vertices adjacent to non-submodular edges in the MRF. We then propose a combinatorial algorithm to efficiently solve the LP and also provide a lower bound by concurrently solving its dual to within an ϵ approximation. The algorithm is up to an order of magnitude faster and provides better MAP scores and bounds than the state of the art message passing algorithm of [1] that tightens the local marginal polytope with third-order marginal constraints. 1 Introduction We consider pairwise Markov Random Field (MRF) over n binary variables x = x1, . . . , xn expressed as a graph G = (V, E) and an energy function E(x|θ) whose parameters θ decompose over its vertices and edges as: E(x|θ) = X i∈V θi(xi) + X (i,j)∈E θij(xi, xj) + θconst (1) Our goal is to find a x∗= argminx∈{0,1}nE(x|θ). This is called the MAP assignment problem in graphical models and for general graphs and arbitrary parameters is NP complete. Consequently, there is an extensive literature of approximation schemes for the problem and new algorithms continue to be explored [2, 3, 4, 5, 6, 7, 8]. The most popular of these are based on the following linear programming relaxation of the MAP problem. min µ X i,xi θi(xi)µi(xi) + X (i,j),xi,xj θij(xi, xj)µij(xi, xj) X xj µij(xi, xj) = µi(xi) ∀(i, j) ∈E, ∀xi ∈{0, 1} X xi µi(xi) = 1 ∀i ∈V, µij(xi, xj) ≥0 ∀(i, j) ∈E, ∀xi, xj ∈{0, 1} (2) Broadly two main techniques are used to solve this relaxation: message-passing algorithms [9, 10, 11, 7, 12] such as TRW-S and Max-sum diffusion on the dual and, combinatorial algorithms based on graph cuts and network flows [13, 14]. Both these methods find the exact MAP when the edge parameters are submodular. For non-submodular parameters, these methods provide partial optimality guarantees for variables that get integral values. This observation is exploited in [14] to design ∗The author is currently affiliated with Google Inc. 1 an iterative probing scheme to expand the set of variables with optimal assignments. However, this scheme is useful only for the case when the graphical model has a few non-submodular edges. More principled methods to improve the solution output by the relaxed LP are based on progressively tightening the relaxation with violated constraints. Cycle constraints [15, 16, 17, 18, 1, 19] and higher order marginal constraints [17, 1, 20] are two such types of constraints. However, these are not backed by efficient algorithms and thus most of these tightenings come at a considerable computational cost. In this paper we propose a new relaxation of the MAP estimation problem via reduction to a recently proposed Bipartite Multi-cut problem in undirected graphs [21]. We exploit this to show that after adding a polynomial number of constraints, we get a O(log k) approximation guarantee on the MAP objective where k is the number of variables adjacent to non-submodular edges in the graphical model, and this can be tightened to O( p log(k) log(log(k))) using a semi-definite programming relaxation1. In this paper we explore only LP-based relaxation since our goal is to design practical algorithms. We propose a combinatorial algorithm to efficiently solve this LP by casting it as a Multi-cut problem on a specially constructed graph, the dual of which is a multi-commodity flow problem. The algorithm, adapted from [22, 23], simultaneously updates the primal and dual solutions, and thus at any point provides both a candidate solution and a lower bound to the energy function. It is guaranteed to provide an ϵ- approximate solution of the primal LP in O(ϵ−2(|V|+|E|)2) time but in practice terminates much faster. No such guarantees exist for any of the existing algorithms for tightening the MAP LP based on cycle or higher order marginals constraints. Empirically, this algorithm is an order of magnitude faster than the state of the art message passing algorithm[1] while yielding the same or better MAP values and bounds. We show that our LP is a relaxation of the LP with cycle constraints, but we still yield better and faster bounds because our combinatorial algorithm solves the LP within a guaranteed ϵ approximation. 2 MAP estimation as Bipartite Multi-cut We assume a reparameterization of the energy function so that the parameters of E(x|θ) (Equation 1) are 1. Symmetric, that is for {xi, xj} ∈{0, 1}2 θij(xi, xj) = θij(xi, xj) where xi = 1 −xi, 2. Zero-normalized, that is min xi θi(xi) = 0 and min xi,xj θij(xi, xj) = 0. It is easy to see that any energy function over binary variables can be reparameterized in this form2. Our starting point is the LP relaxation proposed in [13] for approximating MAP x∗ = argminxE(x|θ) as the minimum s-t cut in a suitably constructed graph H = (VH, EH). We present this construction for completeness. 2.1 Graph cut-based relaxation of [13] For ease of notation, first augment the n variables with a special “0” variable that always takes a label of 0 and has an edge to all n variables. This enables us to redefine the node parameters θi(xi) as edge parameters θ0i(0, xi). Add to H two vertices i0 and i1 for each variable i, 0 ≤i ≤n. For each edge (i, j) ∈E, add an edge between i0 and j0 with weight θij(0, 1) if the edge is submodular, else add edge (i0, j1) with weight θij(0, 0). For every vertex i, if θi(1) is non-zero add an edge between 00 and i0 with weight θi(1) else add edge between 01 and i0 with weight θi(0). It is easy to see that the MAP problem minx∈{0,1}n E(x) is equivalent to solving the following program if all 1We note however that these multiplicative bounds may not be relevant for MAP estimation problem in graphical models where reparameterization leaves behind negative constants which are kept outside the LP objective. 2Set: θ′ ij(0, 0) = θ′ ij(1, 1) = (θij(0, 0) + θij(1, 1))/2, θ′ ij(0, 1) = θ′ ij(1, 0) = (θij(0, 1) + θij(1, 0))/2, θ′ i(1) = θi(1) + P (i,j)∈E(θij(1, 0) + θij(1, 1) −θij(0, 1) −θij(0, 0))/2, θ′ const = θconst + P (i,j)∈E(θij(0, 0) −θij(1, 1))/2. Then zero normalize as in [9]. 2 variables are further constrained to take integral values (with D(i0) ≡xi). min de,D(.) X e∈E H wede de + D(is) −D(jt) ≥0 ∀e = (is, jt) ∈EH de + D(jt) −D(is) ≥0 ∀e = (is, jt) ∈EH D(00) = 0 (Min-cut LP) D(is) ∈[0, 1] ∀is ∈VH de ∈[0, 1] ∀e ∈EH D(i0) + D(i1) = 1 ∀i ∈{0, . . . , n} An efficient way to solve this LP exactly is by finding a s-t Min-cut in H with (s t) as (00, 01) and setting D(i0) = 1/2 when both i0 and i1 fall on the same side otherwise setting it to 0 or 1 depending on whether i0 or i1 are in the 00 side [13, 14]. It is easy to see that this LP is equivalent to the basic LP relaxation in Equation 2 for which many alternative algorithms have been proposed [3, 6, 7, 9, 11]. On graphs with many cycles containing an odd number of non-submodular edges, this method yields poor MAP assignments. We next show how to tighten this LP based on a connection to a recently proposed Bipartite Multi-cut problem [21]. 2.2 Bipartite Multi-cut based LP relaxation The Bipartite Multi-cut (BMC) problem is a generalization of the standard s-t Min-cut problem. Given an undirected graph J = (N, A) with non-negative edge weights, the s-t Min-cut problem finds the subset of edges with minimum total weight, whose deletion disconnects s and t. In BMC, we are given k source-sink pairs ST = {(s1, t1) . . . (sk, tk)}, and the goal is find a subset of vertices M ⊂N such that | {si, ti} ∩M |= 1 and the total weight of edges from M to the remaining vertices N −M is minimized. The BMC problem was recently proposed in [21] where it was shown to be NP-hard and O(log k) approximable using a linear programming relaxation. The BMC problem is also related to the more popular Multi-cut problem where the goal is to identify the smallest weight set of edges such that every si and ti are separated. Any feasible BMC solution is a solution to Multi-cut but not the other way round. To see this, consider a graph over six vertices (s1, s2, s3, t1, t2, t3) and three edges (s1, s3), (t1, t2), (s2, t3). If ST = {(si, ti) : 1 ≤i ≤3}, then all pairs in ST are separated and optimal Multi-cut solution has cost 0. But, for BMC one of the three edges has to be cut. The LP relaxations for Multi-cut provide only a Ω(k) approximation to the BMC problem. We reduce the MAP estimation problem to the Bipartite Multi-cut problem on an optimized version of graph H constructed so that the set of variables R adjacent to non-submodular edges is minimized. Later in Section 2.3 we will show how to create such an optimized graph. Without loss of generality, we assume that the variables in R are 0, 1, . . . , k. The remaining variables j ∈V −R do not need the j1 copy of j in H since there have no edges adjacent to j1. We create an instance of a Bipartite Multi-cut problem on H with the source-sink pairs ST = {(i0, i1) : 0 ≤i ≤k}. Let M be the subset of vertices output by BMC on this graph, and without loss of generality assume that M contains 00. The MAP labeling x∗is obtained from M by setting xi = s if is ∈M and xi = ¯s if is ∈VH −M. This gives a valid MAP labeling because for each variable j that appears in the set R, BMC ensures that M contains exactly one of (j0, j1). Using this connection, we tighten the Min-cut LP as follows. For each u ∈{00, 01, . . . , k0, k1} and js ∈VH we define new variables Du(js) and use these to augment the Min-cut LP with additional 3 constraints as follows: min de,Du(.) X e∈E H wede de + Du(is) −Du(jt) ≥0 de + Du(jt) −Du(is) ≥0  ∀e = (is, jt) ∈EH, ∀u ∈{00, 01 . . . , k0, k1} Di0(i1) ≥1 ∀i ∈{0, . . . , k} (BMC LP) Du(js) ≥0 ∀js ∈VH, ∀u ∈{00, 01 . . . k0, k1} de ≥0 ∀e ∈EH Di0(j0) = Di1(j1) Di0(j1) = Di1(j0)  ∀i, j ∈{0, . . . , k} A useful interpretation of the above LP is provided by viewing variables de as the distance between is and jt for any edge e = (is, jt), and variables Du(js) as the distance between u and js. The first two constraints ensure that these distance variables satisfy triangle inequality. These, along with the constraint Di0(i1) ≥1 ensure that for every ST pair (i0, i1), any path P from i0 to i1 has P e∈P de ≥1. In contrast, the Min-cut LP ensures this kind of separation only for the (00, 01) terminal pair. Later, in Section 5 we will establish a connection between these constraints and cycle constraints [15, 16, 17, 18, 19]. When the LP returns integral solutions, we obtain an optimal MAP labeling using M = {js : D00(js) = 0}. When the variables are not integral, [21] suggests a region growing approach for rounding them so as to get a O(log k) approximation of the optimal objective. In practice, we found that ICM starting with fractional node assignments xi = D00(i0) gave better results. 2.3 Reducing the size of ST set In the LP above, for every edge that is non-submodular we add a terminal pair to ST corresponding to any of its two endpoints. The problem of minimizing the size of the ST set is equivalent to the problem of finding the minimum set R of variables of G such that all cycles with an odd number of non-submodular edges are covered. It is easy that see that in any such cycle, it is always possible to flip the variables such that any one selected edge is non-submodular and the rest are submodular. Since finding the optimal R is NP-hard, we used the following heuristics. First, we pick the set of variables to flip so as to minimize the number of non-submodular edges, and then obtain a vertex cover of the reduced non-submodular edges using a greedy algorithm. Interestingly, this problem can be cast as a MAP inference problem on G defined as follows: For each variable, label 0 denotes that the variable is not flipped and 1 denotes that the node is flipped. Thus, if an edge is submodular and both variables attached to it are flipped (i.e labeled 1) then the edge remains submodular. We need to minimize the number of non-submodular edges. Therefore, energy function for this new graphical model will be θij(xi, xj) = xi ⊕xj ⊕is non submodular(i, j) ∀(i, j) ∈E θi(0) = θi(1) = 0 ∀i ∈V When G is planar, for example a grid, the special structure of these potentials (Ising energy function) enables us to get an optimal solution using the matching algorithm of [24, 8]. With the above LP formulation, we were able to obtain exact solutions for most 20x20 grids and 25 node clique graphs. However, the LP does not scale beyond 30x30 grid and 50 node clique graphs. We therefore provide a combinatorial algorithm for solving the LP. 3 Combinatorial algorithm We will adapt the primal-dual algorithm that was proposed in [22, 23] for solving the closely related Multi-cut problem. We review this algorithm in Section 3.1 and in Section 3.2 show how we adapt it to solve the BMC LP. 4 3.1 Garg’s algorithm for the Multi-cut problem Recall that in the Multi-cut problem, the goal is to remove the minimum weight set of edges so as to separate each (si, ti) pair in ST. This problem is formulated as the followed primal dual LP pair in [22]. Multi-cut LP: Primal min d X e∈E H wede X e∈P de ≥1 ∀P ∈P de ≥0 ∀e ∈EH Multi-cut LP: Dual max f X P ∈P fP X P ∈Pe fP ≤we ∀e ∈EH fP ≥0 ∀P ∈P where P denotes all paths between a pair of vertices in ST and Pe denotes the set of paths in P which contain edge e. Garg’s algorithm [22, 23] simultaneously solves the primal and dual so that they are within an ϵ factor of each other for any user-provided ϵ > 0. The algorithm starts by setting all dual variables flow variables to zero and all primal variables de = δ where δ is (1+ϵ)/((1+ϵ)L)1/ϵ, and L is the maximum number of edges for any path in P. It then iteratively updates the variables by first finding the shortest path P ∈P which violates the P e∈P de ≥1 constraint and then, modifying variables as fP = mine∈P we i.e f = f +fP and de = de(1+ ϵfP we ) ∀e ∈P. At any point a feasible solution can be obtained by rescaling all the primal and dual variables. Termination is reached when the rescaled primal objective is within (1 + ϵ) of the rescaled dual objective for error parameter ϵ. This process is shown to terminate in O(m log1+ϵ 1+ϵ δ ) steps where m = |EH|. 3.2 Solving the BMC LP We first modify the edge weights on graph H constructed for the BMC LP so that for all edges e = (is, jt) and its complement ¯e = (i¯s, j¯t), the weights are equal, that is, we = w¯e. This can be easily ensured by setting we = w¯e = average of previous edge weights of e and e in H. This change adds all (2n + 2) possible vertices to H i.e all nodes 0 ≤i ≤n contain terminal pairs (i0, i1) in the ST set. For any path P in H we define its complementary path ¯P to be the path obtained by reversing the order of edges and complementing all edges in P. For example, the complement of path (20, 11, 30, 21) is (20, 31, 10, 21). Next, we consider the following alternative LP called BMC-Sym LP for BMC on symmetric graphs, that is, graphs where we = w¯e min X e∈E H wede X e∈P de ≥1 ∀P ∈P (BMC-Sym LP) de ≥0, de = de ∀e ∈EH Lemma 1 When H is symmetric, the BMC-Sym LP, BMC LP, and Multi-cut LP are equivalent. PROOF Any feasible solution of BMC-Sym LP can be used to obtain a solution to BMC LP with the same objective as follows: Set de variables unchanged, this keeps the objective intact. Set Du(is) as the length of the shortest path between u and is that is, Du(is) = minP ∈paths(u,is) P e∈P de. This yields a feasible solution — the constraints de + Du(is) −Du(jt) ≥0 hold because Du(is) variables are the shortest path between u and is. The constraints Di0(i1) ≥1 hold because all paths between i0 and i1 have a distance ≥1 in BMC-Sym LP. The constraints Di0(j0) = Di1(j1) and Di0(j1) = Di1(j0) are satisfied because the distances are symmetric de = de. We next show that any feasible solution of BMC LP gives a feasible solution to Multi-cut LP with the same de and objective value. For any pair (p0, p1) ∈ST the constraint Dp0(p1) ≥1 along with repeated application of de+Dp0(is)−Dp0(jt) ≥0 ensures that P e∈P de ≥1 for any path between p0 and p1. Finally, we show that if {de} is a feasible solution to Multi-cut LP then it can be used to construct a feasible solution {d′ e} to BMC-Sym LP without changing the value of the objective function using 5 d′ e = d′ e = (de + de)/2. The objective value remains unchanged since we = we. The path constraints P e∈P d′ e ≥1 hold ∀P ∈P because both path P and its complementary path P are in P and we know that P e∈P de ≥1 and P e∈P de = P e∈P de ≥1. We modify Garg’s algorithm [22, 23] to exploit the fact that the graph is symmetric so that at each iteration we push twice the flow while keeping the approximation guarantees intact. The key change we make is that when augmenting flow f in some path P, we augment the same flow f to the complementary path P as outlined in our final algorithm in Figure 1. This change ensures that we always obtain symmetric distance values as we prove below. Lemma 2 Suppose H is a symmetric graph then de = de ∀e ∈EH at the end of each iteration of the while loop in algorithm in Figure 1. PROOF We prove by induction. The claim holds initially, since de = δ ∀e ∈EH and H is symmetric. Let Pi denote the path selected in the ith iteration of the algorithm. Now, suppose that the hypothesis is true for the nth iteration. In the (n + 1)th iteration, we augment flow f in both paths Pn+1 and P n+1. These paths Pn+1 and P n+1 do not share any edge because this would imply that there is another pair (j0, j1) of shorter length, and we would choose Pn+1 to be this path instead. We then do the following update de = de(1 + ϵfP we ) with fP = mine∈P we for both the paths Pn+1 and P n+1. Since we = we for all e ∈E and de = de ∀e ∈EH before this iteration, de = de ∀e ∈EH after (n + 1)th step. Theorem 3 The modified algorithm also provides an ϵ-approximation algorithm to the BMC LP. PROOF Suppose, we do not augment the flow in the complementary path P while augmenting P. In the next iteration the original algorithm of [22, 23] picks P or any path with the same path length since the path length of P and P is equal before the iteration and they do not share any common edges. Therefore, by forcing P we are not modifying the course of the original algorithm and the analysis in [22, 23] holds here as well. Input: Graphical model G with reparameterized energy function E, approximation guarantee ϵ Create symmetric graph H from G and E Initialize de = δ (δ derived from ϵ as shown in Section 3.1), and f = 0, fe = 0, x=arbitrary initial labeling of graphical model G. Define: Primal objective P({de}) = P e wede/ minP ∈P P e∈P de Define: Dual objective D(f, {fe}) = f/(maxe fe/we) while min (E(x) −θconst, P({de})) > (1 + ϵ)D(f, {fe}) do P = Shortest path between (i0, i1) ∀(i0, i1) ∈ST if (P e∈P de < 1) then With fP = min e∈P we update f = f + fP , fe = fe + fP , de = de(1 + ϵfP we ) ∀e ∈P. Repeat above for the complement path P x′ = current solution after rounding, x =better of x and x′ end if end while Return bound = D(f, {fe}) + θconst, MAP = x. Figure 1: Combinatorial Algorithm for MAP inference using BMC. Our algorithm in addition to updating the primal and dual solutions at each iteration, also keeps track of the primal objective obtained with the current best rounding (x in Figure 1). Often, the rounded variables yielded lower primal objective values and led to early termination. The complexity of the algorithm can be shown to be O(ϵ−2km2) ignoring the polylog(m) factors. Fleischer [25] subsequently improved the above algorithm by reducing the complexity to O(ϵ−2m2). It is interesting to note that running time is independent of k. Though we have presented modification to algorithm in [22, 23], we can fit our algorithm in Fleischer’s framework as well. In fact, we use Fleischer’s modification for practical implementation of our algorithm. 6 0.8 1.3 1.8 2.3 2.8 3.3 3.8 0 20 40 60 80 MAP Score/Clique Size Clique Size BMC MPLP TRW-S 0.8 1.3 1.8 2.3 2.8 3.3 3.8 0 20 40 60 80 Bound/Clique Size Clique Size BMC MPLP TRW-S 0 50 100 150 200 250 300 0 20 40 60 80 Time in secs/Clique Size Clique Size BMC MPLP TRW-S Figure 2: Clique size scaled values of MAP, Upper bound, and running time with increasing clique size on three methods: BMC, MPLP, and TRW-S. 0 100 200 300 400 500 0 50 100 150 200 Score Time in seconds (a) Edge strength = 0.15 Map_MPLP Bound_MPLP Map_BMC Bound_BMC 0 100 200 300 400 500 0 50 100 150 200 Score Time in seconds (b) Edge strength = 0.5 Map_MPLP Bound_MPLP Map_BMC Bound_BMC 0 100 200 300 400 500 0 50 100 150 200 Score Time in seconds (c) Edge strength = 2 Map_MPLP Bound_MPLP Map_BMC Bound_BMC Figure 3: Comparing convergence rates of BMC and MPLP for three different clique graphs. 4 Experiments We compare our proposed algorithm (called BMC here) with MPLP, a state-of-art message passing algorithm [1] that tightens the standard MAP LP with third order marginal constraints, which are equivalent to cycle constraints for binary MRFs. As reference we also present results for the TRW-S algorithm [9]. BMC is implemented in Java whereas for MPLP we ran the C++ code provided by the authors. We run BMC with ϵ = 0.02. MPLP was run with edge clusters until convergence (up to a precision of 2×10−4) or for at most 1000 iterations, whichever comes first. Our experiments were performed on two kinds of datasets: (1) Clique graph based binary MRFs of various sizes generated as per the method of [17] where edge potentials are Potts sampled from U[−σ, σ] (our default setting was σ = 0.5) and node potentials via U[−1, 1], and (2) Maxcut instances of various sizes and densities from the BiqMac library3. Since the second task is formulated as a maximization problem, for the sake of consistency we report all our results as maximizing the MAP score. We compare the algorithms on the quality of the final solution, the upper bound to MAP score, and running time. It should be noted that multiplicative bounds do not hold here since the reparameterizations give rise to negative constants. In the graphs in Figure 2 we compare BMC, MPLP, and TRW-S with increasing clique size averaged over five seeds. We observe that BMC provides much higher MAP scores and slightly tighter bounds than MPLP. In terms of running time, BMC is more than an order of magnitude faster than MPLP for large graphs. The baseline LP (TRW-S) while much faster than both BMC and MPLP provides really poor MAP scores and bounds. We also compare BMC and MPLP on their speed of convergence. In Figures 3(a), (b), and (c) we show the MAP and Upper bounds for different times in the execution of the algorithm on cliques of size 50 and different edge strengths. BMC, whose bounds and MAP appear as the two short arcs in-between the MAP scores and bounds of MPLP, converges significantly faster and terminates well before MPLP while providing same or better MAP scores and bounds for all edge strengths. In Table 1 we compare the three algorithms on the various graphs from the BiqMac library. The graphs are sorted by increasing density and are all of size 100. We observe that the MAP values for BMC are significantly higher than those for TRW-S. For MPLP, the MAP values are always zero because it decodes marginals purely based on node marginals which for these graphs are tied. The upper bounds achieved by MPLP are significantly tighter than TRW-S, showing that with proper rounding MPLP is likely to produce good MAP scores, but BMC provides even tighter bounds in 3http://biqmac.uni-klu.ac.at/ 7 MAP Bound Time in seconds Graph density BMC MPLP TRW-S BMC MPLP TRW-S BMC MPLP TRW-S pm1s 0.1 110 0 91 131 200 257 45 43 0.005 pw01 0.1 1986 0 1882 2079 2397 2745 48 46 0.006 w01 0.1 653 0 495 720 1115 1320 46 41 0.004 g05 0.5 1409 0 1379 1650 1720 2475 761 317 0.021 pw05 0.5 7975 0 7786 9131 9195 13696 699 1139 0.021 w05 0.5 1444 0 1180 2245 2488 6588 737 1261 0.021 pw09 0.9 13427 0 13182 16493 16404 24563 106 2524 0.041 w09 0.9 1995 0 1582 4073 4095 11763 123 2671 0.053 pm1d 0.99 347 0 277 842 924 2463 12 1307 0.047 Table 1: Comparisons on Maxcut graphs of size 100 from the BiqMac library. most cases. The running time for BMC is significantly lower than MPLP for dense graphs but for sparse graphs (10% edges) it requires the same time as MPLP. Thus, overall we find that BMC achieves tighter bounds and better MAP solutions at a significantly faster rate than the state-of-the-art method for tightening LPs. The gain over MPLP is highest for the case of dense graphs. For sparse graphs many algorithms work, for example recently [8, 26] reported excellent results on planar, or nearly planar graphs and [27] show that even local search works when the graph is sparse. 5 Discussion and Conclusion We put our tightening of the basic MAP LP (Marginal LP in Equation 2 or the Min-cut LP) in perspective with other proposed tightenings based on cycle constraints [17, 18, 1, 19] and higher order marginal constraints [17, 1, 20]. For binary MRFs cycle constraints are equivalent to adding marginal consistency constraints among triples of variables [28]. We show the relationship between cycle constraints and our constraints. Let S = (VS, ES) denote the minimum cut graph created from G as shown in Section 2.1 but without the i1 vertices for (1 ≤i ≤n) so that weights of non-submodular edges in S will be negative. The LP relaxation of MAP based on cycle constraints is defined as: min d P e∈ES w′ ede P e∈F (1 −de) + P e∈C\F de ≥ 1 ∀C ∈C, F ⊆C and | F | is odd de ∈ [0 . . . 1] ∀e ∈ES where C denotes the set of all cycles in S. Suppose we construct our symmetric minimum cut graph H with edges (is, jt) corresponding to all four possible values of (s, t) for each edge (i, j) ∈E, instead of two that we currently get due to zero-normalized edge potentials. Then, BMC-Sym LP along with the constraints disjt + disjt = 1 ∀(is, jt) ∈EH is equivalent to the cycle LP above. We skip the proof due to lack of space. Our main contribution is that by relaxing the cycle LP to the Bipartite Multi-cut LP we have been able to design a combinatorial algorithm which is guaranteed to provide an ϵ approximation to the LP in polynomial time. Since we solve the LP and its dual better than any of the earlier methods of enforcing cycle constraints, we are able to obtain tighter bounds and MAP scores at a considerable faster speed. Future work in this area includes developing combinatorial algorithm for solving the semi-definite program in [21] and extending our approach to multi label graphical models. Acknowledgement We thank Naveen Garg for helpful discussion in relating the multi-commodity flow problem with the Bipartite multi-cut problem. The second author acknowledges the generous support of Microsoft Research and IBM’s Faculty award. 8 References [1] David Sontag, Talya Meltzer, Amir Globerson, Tommi Jaakkola, and Yair Weiss. Tightening LP Relaxations for MAP using Message Passing. In UAI, 2008. [2] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [3] M.I. Schlesinger. Syntactic analysis of two-dimensional visual signals in noisy conditions. Kybernetica, 1976. [4] Chandra Chekuri, Sanjeev Khanna, Joseph (Seffi) Naor, and Leonid Zosin. Approximation Algorithms for the Metric Labeling Problem via a New Linear Programming Formulation. In SODA, 2001. [5] Jon Kleinberg and Eva Tardos. Approximation Algorithms for Classification Problems with Pairwise Relationships: Metric Labeling and Markov Random Fields. J. ACM, 49(5):616–639, 2002. [6] M. Wainwright, T. Jaakkola, and A. Willsky. MAP Estimation Via Agreement on Trees: Message-Passing and Linear Programming. IEEETIT: IEEE Transactions on Information Theory, 51, 2005. [7] Tom´as Werner. A Linear Programming Approach to Max-Sum Problem: A Review. IEEE Trans. Pattern Anal. Mach. Intell., 29(7):1165–1179, 2007. [8] Nic Schraudolph. Polynomial-Time Exact Inference in NP-Hard Binary MRFs via Reweighted Perfect Matching. In AISTATS, 2010. [9] Vladimir Kolmogorov. Convergent Tree-Reweighted Message Passing for Energy Minimization. IEEE Trans. Pattern Anal. Mach. Intell., 28(10):1568–1583, 2006. [10] Talya Meltzer, Amir Globerson, and Yair Weiss. Convergent message passing algorithms - a unifying view. In UAI, 2009. [11] Pradeep Ravikumar, Alekh Agarwal, and Martin J. Wainwright. Message-passing for Graph-structured Linear Programs: Proximal Methods and Rounding Schemes. JMLR, 11:1043–1080, 2010. [12] David Sontag and Tommi Jaakkola. Tree Block Coordinate Descent for MAP in Graphical Models. In AI-STATS, volume 9, pages 544–551, 2009. [13] Endre Boros and Peter L. Hammer. Pseudo-Boolean Optimization. Discrete Applied Mathematics, 123(13):155–225, 2002. [14] Carsten Rother, Vladimir Kolmogorov, Victor S. Lempitsky, and Martin Szummer. Optimizing Binary MRFs via Extended Roof Duality. In CVPR, 2007. [15] Francisco Barahona and Ali Ridha Mahjoub. On the cut polytope. Math. Program., 36(2):157–173, 1986. [16] Uri Zwick. Outward Rotations: A Tool for Rounding Solutions of Semidefinite Programming Relaxations, with Applications to MAX CUT and Other Problems. In STOC, 1999. [17] David Sontag and Tommi Jaakkola. New Outer Bounds on the Marginal Polytope. In NIPS, 2007. [18] M. Pawan Kumar, Vladimir Kolmogorov, and Philip H. S. Torr. An Analysis of Convex Relaxations for MAP Estimation of Discrete MRFs. JMLR, 10:71–106, 2009. [19] Nikos Komodakis and Nikos Paragios. Beyond Loose LP-Relaxations: Optimizing MRFs by Repairing Cycles. In ECCV, 2008. [20] Tom´as Werner. High-arity interactions, polyhedral relaxations, and cutting plane algorithm for soft constraint optimisation (map-mrf). In CVPR, 2008. [21] Sreyash Kenkre and Sundar Vishwanathan. Approximation algorithms for the Bipartite Multicut problem. Information Processing Letters, 110(8-9):282 – 287, 2010. [22] Naveen Garg, Vijay V. Vazirani, and Mihalis Yannakakis. Approximate Max-Flow Min-(Multi)Cut Theorems and Their Applications. SIAM J. Comput., 25(2):235–251, 1996. [23] Naveen Garg and Jochen Knemann. Faster and Simpler Algorithms for Multicommodity Flow and Other Fractional Packing Problems. SIAM J. Comput. 37(2): (2007), 37(2):630–652, 2007. [24] Amir Globerson and Tommi Jaakkola. Approximate inference using planar graph decomposition. In NIPS, 2006. [25] Lisa Fleischer. Approximating Fractional Multicommodity Flow Independent of the Number of Commodities. SIAM J. Discrete Math., 13(4):505–520, 2000. [26] D Batra, A C Gallagher, D Parikh, and T Chen. Beyond trees: Mrf inference via outer-planar decomposition. In CVPR, 2010. [27] Kyomin Jung, Pushmeet Kohli, and Devavrat Shah. Local Rules for Global MAP: When Do They Work? In NIPS. 2009. [28] David Sontag. Cutting plane algorithms for variational inference in graphical models. Master’s thesis, MIT, Department of Electrical Engineering and Computer Science, 2007. 9
2010
210
3,978
Approximate Inference by Compilation to Arithmetic Circuits Daniel Lowd Department of Computer and Information Science University of Oregon Eugene, OR 97403-1202 lowd@cs.uoregon.edu Pedro Domingos Department of Computer Science and Engineering University of Washington Seattle, WA 98195-2350 pedrod@cs.washington.edu Abstract Arithmetic circuits (ACs) exploit context-specific independence and determinism to allow exact inference even in networks with high treewidth. In this paper, we introduce the first ever approximate inference methods using ACs, for domains where exact inference remains intractable. We propose and evaluate a variety of techniques based on exact compilation, forward sampling, AC structure learning, Markov network parameter learning, variational inference, and Gibbs sampling. In experiments on eight challenging real-world domains, we find that the methods based on sampling and learning work best: one such method (AC2-F) is faster and usually more accurate than loopy belief propagation, mean field, and Gibbs sampling; another (AC2-G) has a running time similar to Gibbs sampling but is consistently more accurate than all baselines. 1 Introduction Compilation to arithmetic circuits (ACs) [1] is one of the most effective methods for exact inference in Bayesian networks. An AC represents a probability distribution as a directed acyclic graph of addition and multiplication nodes, with real-valued parameters and indicator variables at the leaves. This representation allows for linear-time exact inference in the size of the circuit. Compared to a junction tree, an AC can be exponentially smaller by omitting unnecessary computations, or by performing repeated subcomputations only once and referencing them multiple times. Given an AC, we can efficiently condition on evidence or marginalize variables to yield a simpler AC for the conditional or marginal distribution, respectively. We can also compute all marginals in parallel by differentiating the circuit. These many attractive properties make ACs an interesting and important representation, especially when answering many queries on the same domain. However, as with junction trees, compiling a BN to an equivalent AC yields an exponentially-sized AC in the worst case, preventing their application to many domains of interest. In this paper, we introduce approximate compilation methods, allowing us to construct effective ACs for previously intractable domains. For selecting circuit structure, we compare exact compilation of a simplified network to learning it from samples. Structure selection is done once per domain, so the cost is amortized over all future queries. For selecting circuit parameters, we compare variational inference to maximum likelihood learning from samples. We find that learning from samples works 1 best for both structure and parameters, achieving the highest accuracy on eight challenging, realworld domains. Compared to loopy belief propagation, mean field, and Gibbs sampling, our AC2-F method, which selects parameters once per domain, is faster and usually more accurate. Our AC2-G method, which optimizes parameters at query time, achieves higher accuracy on every domain with a running time similar to Gibbs sampling. The remainder of this paper is organized as follows. In Section 2, we provide background on Bayesian networks and arithmetic circuits. In Section 3, we present our methods and discuss related work. We evaluate the methods empirically in Section 4 and conclude in Section 5. 2 Background 2.1 Bayesian networks Bayesian networks (BNs) exploit conditional independence to compactly represent a probability distribution over a set of variables, {X1, . . . , Xn}. A BN consists of a directed, acyclic graph with a node for each variable, and a set of conditional probability distributions (CPDs) describing the probability of each variable, Xi, given its parents in the graph, denoted πi [2]. The full probability distribution is the product of the CPDs: P(X) = Qn i=1 P(Xi|πi). Each variable in a BN is conditionally independent of its non-descendants given its parents. Depending on the how the CPDs are parametrized, there may be additional independencies. For discrete domains, the simplest form of CPD is a conditional probability table, but this requires space exponential in the number of parents of the variable. A more scalable approach is to use decision trees as CPDs, taking advantage of context-specific independencies [3, 4, 5]. In a decision tree CPD for variable Xi, each interior node is labeled with one of the parent variables, and each of its outgoing edges is labeled with a value of that variable. Each leaf node is a multinomial representing the marginal distribution of Xi conditioned on the parent values specified by its ancestor nodes and edges in the tree. Bayesian networks can be represented as log-linear models: log P(X = x) = −log Z + P i wifi(x) (1) where each fi is a feature, each wi is a real-valued weight, and Z is the partition function. In BNs, Z is 1, since the conditional distributions ensure global normalization. After conditioning on evidence, the resulting distribution may no longer be a BN, but it can still be represented as a log linear model. The goal of inference in Bayesian networks and other graphical models is to answer arbitrary marginal and conditional queries (i.e., to compute the marginal distribution of a set of query variables, possibly conditioned on the values of a set of evidence variables). Popular methods include variational inference, Gibbs sampling, and loopy belief propagation. In variational inference, the goal is to select a tractable distribution Q that is as close as possible to the original, intractable distribution P. Minimizing the KL divergence from P to Q (KL(P ∥Q)) is generally intractable, so the “reverse” KL divergence is typically used instead: KL(Q∥P) = X x Q(x) log Q(x) P(x) = −HQ(x) − X i wiEQ[fi] + log ZP (2) where HQ(x) is the entropy of Q, EQ is an expectation computed over the probability distribution Q, ZP is the partition function of P, and wi and fi are the weights and features of P (see Equation 1). This quantity can be minimized by fixed-point iteration or by using a gradient-based numerical optimization method. What makes the reverse KL divergence more tractable to optimize is that the expectations are done over Q instead of P. This minimization also yields bounds on the log partition function, or the probability of evidence in a BN. Specifically, because KL(Q ∥P) is non-negative, log ZP ≥HQ(x) + P i wiEQ[fi]. The most commonly applied variational method is mean field, in which Q is chosen from the set of fully factorized distributions. Generalized or structured mean field operates on a set of clusters (possibly overlapping), or junction tree formed from a subset of the edges [6, 7, 8]. Selecting the best tractable substructure is a difficult problem. One approach is to greedily delete arcs until the junction tree is tractable [6]. Alternately, Xing et al. [7] use weighted graph cuts to select clusters for structured mean field. 2 2.2 Arithmetic circuits The probability distribution represented by a Bayesian network can be equivalently represented by a multilinear function known as the network polynomial [1]: P(X1 = x1, . . . , Xn = xn) = P X Qn i=1 I(Xi = xi)P(Xi = xi|Πi = πi) where the sum ranges over all possible instantiations of the variables, I() is the indicator function (1 if the argument is true, 0 otherwise), and the P(Xi|Πi) are the parameters of the BN. The probability of any partial instantiation of the variables can now be computed simply by setting to 1 all the indicators consistent with the instantiation, and to 0 all others. This allows arbitrary marginal and conditional queries to be answered in time linear in the size of the polynomial. Furthermore, differentiating the network with respect to its weight parameters (wi) yields the probabilities of the corresponding features (fi). The size of the network polynomial is exponential in the number of variables, but it can be more compactly represented using an arithmetic circuit (AC). An AC is a rooted, directed acyclic graph whose leaves are numeric constants or variables, and whose interior nodes are addition and multiplication operations. The value of the function for an input tuple is computed by setting the variable leaves to the corresponding values and computing the value of each node from the values of its children, starting at the leaves. In the case of the network polynomial, the leaves are the indicators and network parameters. The AC avoids the redundancy present in the network polynomial, and can be exponentially more compact. Every junction tree has a corresponding AC, with an addition node for every instantiation of a separator, a multiplication node for every instantiation of a clique, and a summation node as the root. Thus one way to compile a BN into an AC is via a junction tree. However, when the network contains context-specific independences, a much more compact circuit can be obtained. Darwiche [1] describes one way to do this, by encoding the network into a special logical form, factoring the logical form, and extracting the corresponding AC. Other exact inference methods include variable elimination with algebraic decision diagrams (which can also be done with ACs [9]), AND/OR graphs [10], bucket elimination [11], and more. 3 Approximate Compilation of Arithmetic Circuits In this section, we describe AC2 (Approximate Compilation of Arithmetic Circuits), an approach for constructing an AC to approximate a given BN. AC2 does this in two stages: structure search and parameter optimization. The structure search is done in advance, once per network, while the parameters may be selected at query time, conditioned on evidence. This amortizes the cost of the structure search over all future queries.The parameter optimization allows us to fine-tune the circuit to specific pieces of evidence. Just as in variational inference methods such as mean field, we optimize the parameters of a tractable distribution to best approximate an intractable one. Note that, if the BN could be compiled exactly, this step would be unnecessary, since the conditional distribution would always be optimal. 3.1 Structure search We considered two methods for generating circuit structures. The first is to prune the BN structure and then compile the simplified BN exactly. The second is to approximate the BN distribution with a set of samples and learn a circuit from this pseudo-empirical data. 3.1.1 Pruning and compiling Pruning and compiling a BN is somewhat analogous to edge deletion methods (e.g., [6]), except that instead of removing entire edges and building the full junction tree, we introduce contextspecific independencies and build an arithmetic circuit that can exploit them. This finer-grained simplification offers the potential of much richer models or smaller circuits. However, it also offers more challenging search problems that must be approximated heuristically. We explored several techniques for greedily simplifying a network into a tractable AC by pruning splits from its decision-tree CPDs. Ideally, we would like to have bounds on the error of our simplified model, relative to the original. This can be accomplished by bounding the ratio of each log con3 ditional probability distribution, so that the approximated log probability of every instance is within a constant factor of the truth, as done by the Multiplicative Approximation Scheme (MAS) [12]. However, we found that the bounds for our networks were very large, with ratios in the hundreds or thousands. This occurs because our networks have probabilities close to 0 and 1 (with logs close to negative infinity and zero), and because the bounds focus on the worst case. Therefore, we chose to focus instead on the average case by attempting to minimize the KL divergence between the original model and the simplified approximation: KL(P ∥Q) = P x P(x) log P (x) Q(x) where P is the original network and Q is the simplified approximate network, in which each of P’s conditional probability distributions has been simplified. We choose to optimize the KL divergence here because the reverse KL is prone to fitting only a single mode, and we want to avoid excluding any significant parts of the distribution before seeing evidence. Since Q’s structure is a subset of P’s, we can decompose the KL divergence as follows: KL(P ∥Q) = X i X πi P(πi) X xi P(xi|πi) log P(xi|πi) Q(xi|πi) (3) where the summation is over all states of the Xi’s parents, Πi. In other words, the KL divergence can be computed by adding the expected divergence of each local factor, where the expectation is computed according to the global probability distribution. For the case of BNs with tree CPDs (as described in Section 2.1), this means that knowing the distribution of the parent variables allows us to compute the change in KL divergence from pruning a tree CPD. Unfortunately, computing the distribution of each variable’s parents is intractable and must be approximated in some way. We tried two different methods for computing these distributions: estimating the joint parent probabilities from a large number of samples (one million in our experiments) (“P-Samp”), and forming the product of the parent marginals estimated using mean field (“P-MF”). Given a method for computing the parent marginals, we remove the splits that least increase the KL divergence. We implement this by starting from a fully pruned network and greedily adding the splits that most decrease KL divergence. After every 10 splits, we check the number of edges by compiling the candidate network to an AC using the C2D compiler. 1 We stop when the number of edges exceeds our prespecified bound. 3.1.2 Learning from samples The second approach we tried is learning a circuit from a set of generated samples. The samples themselves are generated using forward sampling, in which each variable in the BN is sampled in topological order according to its conditional distribution given its parents. The circuit learning method we chose is the LearnAC algorithm by Lowd and Domingos [13], which greedily learns an AC representing a BN with decision tree CPDs by trading off log likelihood and circuit size. We made one modification to the the LearnAC (LAC) algorithm in order to learn circuits with a fixed number of edges. Instead of using a fixed edge penalty, we start with an edge penalty of 100 and halve it every time we run out of candidate splits with non-negative scores. The effect of this modified procedure is to conservatively selects splits that add few edges to the circuit at first, and become increasingly liberal until the edge limit is reached. Tuning the initial edge penalty can lead to slightly better performance at the cost of additional training time. We also explored using the BN structure to guide the AC structure search (for example, by excluding splits that would violate the partial order of the original BN), but these restrictions offered no significant advantage in accuracy. Many modifications to this procedure are possible. Larger edge budgets or different heuristics could yield more accurate circuits. With additional engineering, the LearnAC algorithm could be adapted to dynamically request only as many samples as necessary to be confident in its choices. For example, Hulten and Domingos [14] have developed methods that scale learning algorithms to datasets of arbitrary size; the same approach could be used here, except in a “pull” setting where the data is generated on-demand. Spending a long time finding the most accurate circuit may be worthwhile, since the cost is amortized over all queries. We are not the first to propose sampling as a method for converting intractable models into tractable ones. Wang et al. [15] used a similar procedure for learning a latent tree model to approximate a 1Available at http://reasoning.cs.ucla.edu/c2d/. 4 BN. They found that the learned models had faster or more accurate inference on a wide range of standard BNs (where exact inference is somewhat tractable). In a semi-supervised setting, Liang et al. [16] trained a conditional random field (CRF) from a small amount of labeled training data, used the CRF to label additional examples, and learned independent logistic regression models from this expanded dataset. 3.2 Parameter optimization In this section, we describe three methods for selecting AC parameters: forward sampling, variational optimization, and Gibbs sampling. 3.2.1 Forward sampling In AC2-F, we use forward sampling to generate a set of samples from the original BN (one million in our experiments) and maximum likelihood estimation to estimate the AC parameters from those samples. This can be done in closed form because, before conditioning on evidence, the AC structure also represents a BN. AC2-F selects these parameters once per domain, before conditioning on any evidence. This makes it very fast at query time. AC2-F can be viewed as approximately minimizing the KL divergence KL(P ∥Q) between the BN distribution P and the AC distribution Q. For conditional queries P(Y |X = xev), we are more interested in the divergence of the conditional distributions, KL(P(.|xev)∥Q(.|xev)). The following theorem bounds the conditional KL divergence as a function of the unconditional KL divergence: Theorem 1. For discrete probability distributions P and Q, and evidence xev, KL(P(.|xev)∥Q(.|xev)) ≤ 1 P(xev)KL(P ∥Q) (See the supplementary materials for the proof.) From this theorem, we expect AC2-F to work better when evidence is likely (i.e., P(xev) is not too small). For rare evidence, the conditional KL divergence could be much larger than the unconditional KL divergence. 3.2.2 Variational optimization Since AC2-F selects parameters based on the unconditioned BN, it may do poorly when conditioning on rare evidence. An alternative is to choose AC parameters that (locally) minimize the reverse KL divergence to the BN conditioned on evidence. Let P and Q be log-linear models, i.e.: log P(x) = −log ZP + P i wifi(x) log Q(x) = −log ZQ + P j vjgj(x) The reverse KL divergence and its gradient can now be written as follows: KL(Q∥P) = P j vjEQ(gj) −P i wiEQ(fi) + log ZP ZQ (4) ∂ ∂vj KL(Q∥P) = P k vk(EQ(gkgj) −Q(gk)Q(gj)) −P i vi(EQ(figj) −Q(fi)Q(gj)) (5) where EQ(gkgj) is the expected value of gk(x) × gj(x) according to Q. In our application, P is the BN conditioned on evidence and Q is the AC. Since inference in Q (the AC) is tractable, the gradient can be computed exactly. We can optimize this using any numerical optimization method, such as gradient descent. Due to local optima, the results may depend on the optimization procedure and its initialization. In experiments, we used the limited memory BFGS algorithm (L-BFGS) [17], initialized with AC2-F. We now discuss how to compute the gradient efficiently in a circuit with e edges. By setting leaf values and evaluating the circuit as described by Darwiche [1], we can compute the probability of any conjunctive feature Q(fi) (or Q(gk)) in O(e) operations. If we differentiate the circuit after conditioning on a feature fi (or gk), we can obtain the probabilities of the conjunctions Q(figj) (or Q(gkgj)) for all gj in O(e) time. Therefore, if there are n features in P, and m features in Q, then the total complexity of computing the derivative is O((n + m)e). Since there are typically fewer features in Q than P, this simplifies to O(ne). These methods are applicable to any tractable structure represented as an AC, including low treewidth models, mixture models, latent tree models, etc. We refer to this method as AC2-V. 5 3.2.3 Gibbs sampling While optimizing the reverse KL is a popular choice for approximate inference, there are certain risks. Even if KL(Q∥P) is small, Q may assign very small or zero probabilities to important modes of P. Furthermore, we are only guaranteed to find a local optimum, which may be much worse than the global optimum. The “regular” KL divergence, does not suffer these disadvantages, but is impractical to compute since it involves expectations according to P: KL(P ∥Q)= P i wiEP (fi) −P j vjEP (gj) + log ZQ/ZP (6) ∂ ∂vj KL(P ∥Q)= EQ(gj) −EP (gj) (7) Therefore, minimizing KL(P ∥Q) by gradient descent or L-BFGS requires computing the conditional probability of each AC feature according to the BN, EP (gj). Note that these only need to be computed once, since they are unaffected by the AC feature weights, vj. We chose to approximate these expectations using Gibbs sampling, but an alternate inference method (e.g., importance sampling) could be substituted. The probabilities of the AC features according to the AC, EQ(gj), can be computed in parallel by differentiating the circuit, requiring time O(e).2 This is typically orders of magnitude faster than the variational approach described above, since each optimization step runs in O(e) instead of O(ne), where n is the number of BN features. We refer to this method as AC2-G. 4 Experiments In this section, we compare the proposed methods experimentally and demonstrate that approximate compilation is an accurate and efficient technique for inference in intractable networks. 4.1 Datasets We wanted to evaluate our methods on challenging, realistic networks where exact inference is intractable, even for the most sophisticated arithmetic circuit-based techniques. This ruled out most traditional benchmarks, for which ACs can already perform exact inference [9]. We generated intractable networks by learning them from eight real-world datasets using the WinMine Toolkit [18]. The WinMine Toolkit learns BNs with tree-structured CPDs, leading to complex models with high tree-width. In theory, this additional structure can be exploited by existing arithmetic circuit techniques, but in practice, compilation techniques ran out of memory on all eight networks. See Davis and Domingos [19] and our supplementary material for more details on the datasets and the networks learned from them, respectively. 4.2 Structure selection In our first set of experiments, we compared the structure selection algorithms from Section 3.1 according to their ability to approximate the original models. Since computing the KL divergence directly is intractable, we approximated it using random samples x(i): D(P||Q) = X x P(x) log P(x) Q(x) = EP [log(P(x)/Q(x))] ≈1 m X i log(P(x(i))/Q(x(i))) (8) where m is the number of samples (10,000 in our experiments). These samples were distinct from the training data, and the same set of samples was used to evaluate each algorithm. For LearnAC, we trained circuits with a limit of 100,000 edges. All circuits were learned using 100,000 samples, and then the parameters were set using AC2-F with 1 million samples.3 Training time ranged from 17 minutes (KDD Cup) to 8 hours (EachMovie). As an additional baseline, we also learned tree-structured BNs from the same 1 million samples using the Chow-Liu algorithm [20]. Results are in Table 1. The learned arithmetic circuit (LAC) achieves the best performance on all datasets, often by a wide margin. We also observe that, of the pruning methods, samples (P-Samp) work better than mean field marginals (P-MF). Chow-Liu trees (C-L) typically perform somewhere between P-MF and P-Samp. For the rest of this paper, we focus on structures selected by LearnAC. 2To support optimization methods that perform line search (including L-BFGS), we can similarly approximate KL(P ∥Q). log ZQ can also be computed in O(e) time. 3With 1 million samples, we ran into memory limitations that a more careful implementation might avoid. 6 Table 1: KL divergence of different structure selection algorithms. P-MF P-Samp C-L LAC KDD Cup 2.44 0.10 0.23 0.07 Plants 8.41 2.29 4.48 1.27 Audio 4.99 3.31 4.47 2.12 Jester 5.14 3.55 5.08 2.82 Netflix 3.83 3.06 4.14 2.24 MSWeb 1.78 0.52 0.70 0.38 Book 4.90 2.43 2.84 1.89 EachMovie 29.66 17.61 17.11 11.12 Table 2: Mean time for answering a single conditional query, in seconds. AC2-F AC2-V AC2-G BP MF Gibbs KDD Cup 0.022 3803 11.2 0.050 0.025 2.5 Plants 0.022 2741 11.2 0.081 0.073 2.8 Audio 0.023 4184 14.4 0.063 0.048 3.4 Jester 0.019 3448 13.8 0.054 0.057 3.3 Netflix 0.021 3050 12.3 0.057 0.053 3.3 MSWeb 0.022 2831 12.2 0.277 0.046 4.3 Book 0.020 5190 16.1 0.864 0.059 6.6 EachMovie 0.022 10204 28.6 1.441 0.342 11.0 -0.044 -0.042 -0.040 -0.038 -0.036 -0.034 10% 20% 30% 40% 50% Log probability Evidence variables KDD -0.4 -0.3 -0.2 -0.1 10% 20% 30% 40% 50% Log probability Evidence variables Plants -0.58 -0.54 -0.50 -0.46 -0.42 -0.38 10% 20% 30% 40% 50% Log probability Evidence variables Audio -0.68 -0.64 -0.60 -0.56 -0.52 10% 20% 30% 40% 50% Log probability Evidence variables Jester -0.64 -0.62 -0.60 -0.58 -0.56 -0.54 10% 20% 30% 40% 50% Log probability Evidence variables Netflix -0.044 -0.040 -0.036 -0.032 -0.028 10% 20% 30% 40% 50% Log probability Evidence variables MSWeb -0.10 -0.09 -0.08 -0.07 10% 20% 30% 40% 50% Log probability Evidence variables Book -0.18 -0.16 -0.14 -0.12 -0.10 -0.08 10% 20% 30% 40% 50% Log probability Evidence variables EachMovie -0.18 -0.16 -0.14 -0.12 -0.10 -0.08 10% 20% 30% 40% 50% Log probability Evidence variables EachMovie AC2-F AC2-V AC2-G MF BP Gibbs Figure 1: Average conditional log likelihood of the query variables (y axis), divided by the number of query variables (x axis). Higher is better. Gibbs often performs too badly to appear in the frame. 4.3 Conditional probabilities Using structures selected by LearnAC, we compared the accuracy of AC2-F, AC2-V, and AC2-G to mean field (MF), loopy belief propagation (BP), and Gibbs sampling (Gibbs) on conditional probability queries. We ran MF and BP to convergence. For Gibbs sampling, we ran 10 chains, each with 1000 burn-in iterations and 10,000 sampling iterations. All methods exploited CPD structure whenever possible (e.g., in the computation of BP messages). All code will be publicly released. Since most of these queries are intractable to compute exactly, we cannot determine the true probabilities directly. Instead, we generated 100 random samples from each network, selected a random subset of the variables to use as evidence (10%-50% of the total variables), and measured the log conditional probability of the non-evidence variables according to each inference method. Different queries used different evidence variables. This approximates the KL divergence between the true and inferred conditional distributions up to a constant. We reduced the variance of this approximation by selecting additional queries for each evidence configuration. Specifically, we generated 100,000 samples and kept the ones compatible with the evidence, up to 10,000 per configuration. For some evidence, none of the 100,000 samples were compatible, leaving just the original query. Full results are in Figure 1. Table 2 contains the average inference time for each method. Overall, AC2-F does very well against BP and even better against MF and Gibbs, especially with lesser amounts of evidence. Its somewhat worse performance at greater amounts of evidence is consistent with Theorem 1. AC2-F is also the fastest of the inference methods, making it a very good choice for speedy inference with small to moderate amounts of evidence. AC2-V obtains higher accuracy than AC2-F at higher levels of evidence, but is often less accurate at lesser amounts of evidence. This can be attributed to different optimization and evaluation metrics: 7 reducing KL(Q ∥P) may sometimes lead to increased KL(P ∥Q). On EachMovie, AC2-V does particularly poorly, getting stuck in a worse local optimum than the much simpler MF. AC2-V is also the slowest method, by far. AC2-G is the most accurate method overall. It dominates BP, MF, and Gibbs on all datasets. With the same number of samples, AC2-G takes 2-4 times longer than Gibbs. This additional running time is partly due to the parameter optimization step and partly due to the fact that AC2-G is computing many expectations in parallel, and therefore has more bookkeeping per sample. If we increase the number of samples in Gibbs by a factor of 10 (not shown), then Gibbs wins on KDD at 40 and 50% and Plants at 50% evidence, but is also significantly slower than AC2-G. Compared to the other AC methods, AC2-G wins everywhere except for KDD at 10-40% evidence and Netflix at 10% evidence. If we increase the number of samples in AC2-G by a factor of 10 (not shown), then it beats AC2-F and AC2-V on every dataset. The running time of AC2-G is split approximately evenly between computing sufficient statistics and optimizing parameters with L-BFGS. Gibbs sampling did poorly in almost all of the scenarios, which can be attributed to the fact that it is unable to accurately estimate the probabilities of very infrequent events. Most conjunctions of dozens or hundreds of variables are very improbable, even if conditioned on a large amount of evidence. If a certain configuration is never seen, then its probability is estimated to be very low (non-zero due to smoothing). MF and BP did not have this problem, since they represent the conditional distribution as a product of marginals, each of which can be estimated reasonably well. In follow-up experiments, we found that using Gibbs sampling to compute the marginals yielded slightly better accuracy than BP, but much slower. AC2-G can be seen as a generalization of using Gibbs sampling to compute marginals, just as AC2-V generalizes MF. 5 Conclusion Arithmetic circuits are an attractive alternative to junction trees due to their ability to exploit determinism and context-specific independence. However, even with ACs, exact inference remains intractable for many networks of interest. In this paper, we introduced the first approximate compilation methods, allowing us to apply ACs to any BN. Our most efficient method, AC2-F, is faster than traditional approximate inference methods and more accurate most of the time. Our most accurate method, AC2-G, is more accurate than the baselines on every domain. One of the key lessons is that combining sampling and learning is a good strategy for accurate approximate inference. Sampling generates a coarse approximation of the desired distribution which is subsequently smoothed by learning. For structure selection, an AC learning method applied to samples was more effective than exact compilation of a simplified network. For parameter selection, maximum likelihood estimation applied to Gibbs samples was both faster and more effective than variational inference in ACs. For future work, we hope to extend our methods to Markov networks, in which generating samples is a difficult inference problem in itself. Similar methods could be used to select AC structures tuned to particular queries, since a BN conditioned on evidence can be represented as a Markov network. This could lead to more accurate results, especially in cases with a lot of evidence, but the cost would no longer be amortized over all future queries. Comparisons with more sophisticated baselines are another important item for future work. Acknowledgements The authors wish to thank Christopher Meek and Jesse Davis for helpful comments. This research was partly funded by ARO grant W911NF-08-1-0242, AFRL contract FA8750-09-C-0181, DARPA contracts FA8750-05-2-0283, FA8750-07-D-0185, HR0011-06-C-0025, HR0011-07-C-0060 and NBCH-D030010, NSF grants IIS-0534881 and IIS-0803481, and ONR grant N00014-08-1-0670. The views and conclusions contained in this document are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ARO, DARPA, NSF, ONR, or the United States Government. 8 References [1] A. Darwiche. A differential approach to inference in Bayesian networks. Journal of the ACM, 50(3):280– 305, 2003. [2] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, San Francisco, CA, 1988. [3] C. Boutilier, N. Friedman, M. Goldszmidt, and D. Koller. Context-specific independence in Bayesian networks. In Proc. of the 12th Conference on Uncertainty in Artificial Intelligence, pages 115–123, Portland, OR, 1996. Morgan Kaufmann. [4] N. Friedman and M. Goldszmidt. Learning Bayesian networks with local structure. In Proc. of the 12th Conference on Uncertainty in Artificial Intelligence, pages 252–262, Portland, OR, 1996. Morgan Kaufmann. [5] D. Chickering, D. Heckerman, and C. Meek. A Bayesian approach to learning Bayesian networks with local structure. In Proc. of the 13th Conference on Uncertainty in Artificial Intelligence, pages 80–89, Providence, RI, 1997. Morgan Kaufmann. [6] Arthur Choi and Adnan Darwiche. A variational approach for approximating Bayesian networks by edge deletion. In Proc. of the 22nd Conference on Uncertainty in Artificial Intelligence (UAI-06), Arlington, Virginia, 2006. AUAI Press. [7] E. P. Xing, M. I. Jordan, and S. Russell. Graph partition strategies for generalized mean field inference. In Proc. of the 20th Conference on Uncertainty in Artificial Intelligence, pages 602–610, Banff, Canada, 2004. [8] D. Geiger, C. Meek, and Y. Wexler. A variational inference procedure allowing internal structure for overlapping clusters and deterministic constraints. Journal of Artificial Intelligence Research, 27:1–23, 2006. [9] M. Chavira and A. Darwiche. Compiling Bayesian networks using variable elimination. In Proc. of the 20th International Joint Conference on Artificial Intelligence (IJCAI), pages 2443–2449, 2007. [10] R. Dechter and R. Mateescu. AND/OR search spaces for graphical models. Artificial Intelligence, 171:73– 106, 2007. [11] R. Dechter. Bucket elimination: a unifying framework for reasoning. Artificial Intelligence, 113:41–85, 1999. [12] Y. Wexler and C. Meek. MAS: a multiplicative approximation scheme for probabilistic inference. In Advances in Neural Information Processing Systems 22, Cambridge, MA, 2008. MIT Press. [13] D. Lowd and P. Domingos. Learning arithmetic circuits. In Proc. of the 24th Conference on Uncertainty in Artificial Intelligence, Helsinki, Finland, 2008. AUAI Press. [14] G. Hulten and P. Domingos. Mining complex models from arbitrarily large databases in constant time. In Proc. of the 8th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 525–531, Edmonton, Canada, 2002. ACM Press. [15] Y. Wang, N. L. Zhang, and T. Chen. Latent tree models and approximate inference in Bayesian networks. Journal of Artificial Intelligence Research, 32:879–900, 2008. [16] P. Liang, III H. Daum´e, and D. Klein. Structure compilation: trading structure for features. In Proc. of the 25th International Conference on Machine Learning, pages 592–599, Helsinki, Finland, 2008. ACM. [17] D. C. Liu and J. Nocedal. On the limited memory BFGS method for large scale optimization. Mathematical Programming, 45(3):503–528, 1989. [18] D. M. Chickering. The WinMine toolkit. Technical Report MSR-TR-2002-103, Microsoft, Redmond, WA, 2002. [19] J. Davis and P. Domingos. Bottom-up learning of Markov network structure. In Proc. of the 27th International Conference on Machine Learning, Haifa, Israel, 2010. ACM Press. [20] C. K. Chow and C. N Liu. Approximating discrete probability distributions with dependence trees. IEEE Transactions on Information Theory, 14:462–467, 1968. 9
2010
211
3,979
Random Walk Approach to Regret Minimization Hariharan Narayanan MIT Cambridge, MA 02139 har@mit.edu Alexander Rakhlin University of Pennsylvania Philadelphia, PA 19104 rakhlin@wharton.upenn.edu Abstract We propose a computationally efficient random walk on a convex body which rapidly mixes to a time-varying Gibbs distribution. In the setting of online convex optimization and repeated games, the algorithm yields low regret and presents a novel efficient method for implementing mixture forecasting strategies. 1 Introduction This paper brings together two topics: online convex optimization and sampling from logconcave distributions over convex bodies. Online convex optimization has been a recent focus of research [30, 25], for it presents an abstraction that unifies and generalizes a number of existing results in online learning. Techniques from the theory of optimization (in particular, Fenchel and minimax duality) have proven to be key for understanding the rates of growth of regret [25, 1]. Deterministic regularization methods [3, 25] have emerged as natural black-box algorithms for regret minimization, and the choice of the regularization function turned out to play a pivotal role in limited-feedback problems [3]. In particular, the authors of [3] demonstrated the role of self-concordant regularization functions and the Dikin ellipsoid for minimizing regret. The latter gives a handle on the local geometry of the convex set, crucial for linear optimization with limited feedback. Random walks in a convex body gained much attention following the breakthrough paper of Dyer, Frieze and Kannan [9], who exhibited a polynomial time randomized algorithm for estimating the volume of a convex body. It is known that the problem of computing this volume by a deterministic algorithm is #P-hard. Over the two decades following [9], the polynomial dependence of volume computation on the dimension n has been drastically decreased from O∗(n23) to O∗(n4) [17]. The development was accomplished through the study of several geometric random walks: the Ball Walk and Hit-and-Run (see [26] for a survey). The driving force behind such results are the isoperimetric inequalities which can be extended from uniform to general logconcave distributions. In particular, computing the volume of a convex body can be seen as a special case of integration of a logconcave function, and there has been a number of major results on mixing time for sampling from logconcave distributions [17, 18]. Connections to optimization have been established in [12, 18], among others. More recently, a novel random walk, called the Dikin Walk has been proposed in [19, 13]. By exploiting the local geometry of the set, this random walk is shown to mix rapidly, and offers a number of advantages over the other random walks. While the aim of online convex optimization is different from that of sampling from logconcave distributions, the fact that the two communities recognized the importance of the Dikin ellipsoid is remarkable. In this paper we build a bridge between the two topics. We show that the problem of online convex optimization can be solved by sampling from logconcave distributions, and that the Dikin Walk can be adapted to mix rapidly to a certain time-varying distribution. In fact, it mixes fast enough that for linear cost functions only one step of the guided Dikin Walk is necessary per round of the repeated game. This is surprisingly similar to the sufficiency of one Damped Newton step of Algorithm 2 in [3], due to locally quadratic convergence ensured by the self-concordant regularizer. 1 The time-varying Gibbs distributions from which we sample are closely related to Mixture Forecasters and Bayesian Model Averaging methods (see [7, Section 11.10] as well as [29, 28, 4, 10]). To the best of our knowledge, the method presented in this paper is the first provably computationallyefficient approach to solving a class of problems which involves integrating over continuous sets of decisions. From the Bayesian point of view, our algorithm is an efficient procedure for sampling from posterior distributions, and can be used for settings outside of regret minimization. Prior work: The closest to our work is the result of [11] for Universal Portfolios. Unlike our onestep Markov chain, the algorithm of [11] works with a discretization of the probability simplex and requires a number of steps which has adverse dependence on the time horizon and accuracy. This seems unavoidable with the Grid Walk. In [2], it was shown that the Weighted Average Forecaster [15, 27] on a prohibitively large class of experts is optimal in terms of regret for a certain multitask problem, yet computationally inefficient. A Markov chain has been proposed with the required stationary distribution, but no mixing time bounds have been derived. In [8], the authors faced a similar problem whereby a near-optimal regret can be achieved by the Weighted Average Forecaster on a prohibitively large discretization of the set of decisions. Sampling from time-varying Markov chains has been investigated in the context of network dynamics [24], and has been examined from the point of view of linear stochastic approximation in reinforcement learning [14]. Beyond [11], we are not aware of any results to date where a provably rapidly mixing walk is used to solve regret minimization problems. It is worth emphasizing that without the Dikin Walk [19], the one-step mixing results of this paper seem out of reach. In particular, when sampling from exponential distributions, the known bounds for the conductance of the Ball Walk and Hit-and-Run are not scale-independent. In order to obtain O( √ T) regret, one has to be able to sample the target distribution with an error that is O(1/ √ T). As a consequence of the deterioration of the bounds on the conductance as the scale tends to zero, the number of steps necessary per round would tend to infinity as T tends to infinity. 2 Main Results Let K ⊂Rn be a convex compact set and let F be a set of convex functions from K to R. Online convex optimization is defined as a repeated T-round game between the player (the algorithm) and Nature (adversary) [30, 25]. From the outset we assume that Nature is oblivious (see [7]), i.e. the individual sequence of decisions ℓ1, . . . , ℓT ∈F can be fixed before the game. We are interested in randomized algorithms, and hence we consider the following online learning model: on round t, the player chooses a distribution (or, a mixed strategy) µt−1 supported on K and “plays” a random Xt ∼ µt−1. Nature then reveals the cost function ℓt ∈F. The goal of the player is to control expected regret (see Lemma 1) with respect to a randomized strategy defined by a fixed distribution pU ∈P for some collection of distributions P. If P contains Dirac delta distributions, the comparator term is indeed the best fixed decision x∗∈K chosen in hindsight. A procedure which guarantees sublinear growth of regret for any distribution pU ∈P will be called Hannan consistent with respect to P. We now state a natural procedure for updating distributions µt which guarantees Hannan consistency for a wide range of problems. This procedure is similar to the Mixture Forecaster used in the prediction context [29, 28, 4, 10]. Denote the cumulative cost functions by Lt(x) = !t s=1 ℓs(x), with L0(x) ≡0, and let η > 0 be a learning rate. Let q0(x) be some prior probability distribution supported on K. Define the following sequence of functions qt(x) = q0(x) exp {−ηLt(x)} , ∀t ∈{1, . . . , T} (1) for every x ∈K. Define the probability distribution µt over K at time t to have density dµt(x) dx = q0(x)e−ηLt(x) Zt where Zt = " x∈K qt(x)dx. (2) Let D(p||q) stand for the Kullback-Leibler divergence between distributions p and q. The following lemma1 gives an equality for expected regret with respect to a fixed randomized strategy. It bears 1Due to its simplicity, the lemma has likely appeared in the literature, yet we could not locate a reference for this form with equality and in the context of online convex optimization. The closest results appear in [28, 10], [7, p. 326] in the context of prediction, and in [4] in the context of density estimation with exponential families. 2 striking similarity to upper bounds on regret in terms of Bregman divergences for the Follow the Regularized Leader and Mirror Descent methods [23, 5], [7, Therem 11.1]. Lemma 1. Let Xt be a random variable distributed according to µt−1, for all t ∈{1, . . . , T}, as defined in (2). Let U be a random variable with distribution pU. The expected regret is E # T $ t=1 ℓt(Xt) − T $ t=1 ℓt(U) % = η−1 (D(pU||µ0) −D(pU||µT )) + η−1 T $ t=1 D(µt−1||µt). Specializing to the case ℓ(x) ∈[0, 1] over K, E # T $ t=1 ℓt(Xt) − T $ t=1 ℓt(U) % ≤η−1D(pU||µ0) + Tη/8. Before proceeding, let us make a few remarks. First, if the divergence between the comparator distribution pU and the prior µ0 is bounded, the result yields O( √ T) rates of regret growth for bounded losses by choosing η appropriately. To bound the divergence between a continuous initial µ0 and a point comparator at some x∗, the analysis can be carried out in two stages: comparison to a “small-covariance” Gaussian centered at x∗, followed by an observation that the loss of the “small-covariance” Gaussian strategy is not very different from the loss of the deterministic strategy x∗. This analysis can be found in [7, p. 326] and gives a near-optimal O(√T log T) regret bound. We also note that for linear cost functions, the notion of expected regret coincides with regret for deterministic strategies. Third, we note that if the prior is of the form q0(x) ∝exp{−R(x)} for some convex function R, then qt(x) ∝exp {−(ηLt(x) + R(x))}, bearing similarity to the objective function of the Follow the Regularized Leader algorithm [23, 3]. In general, we can encode prior knowledge in q0. For instance, if the cost functions are linear and the set K is a convex hull of N vertices (e.g. probability simplex), then the minimum loss is attained at one of the vertices, and a uniform prior on the vertices yields the Weighted Average Forecaster with the usual log N dependence [7]. Finally, we note that in online convex optimization, one of the difficulties is the issue of projections back to the set K. This issue does not arise when dealing with distributions, but instead translates into the difficulty of sampling. We find these parallels between sampling and optimization intriguing. We defer the easy proof of Lemma 1 to p. 8. Having a bound on regret, a natural question is whether there exists a computationally efficient algorithm for playing Xt according to the mixed strategy given in (2). The main result of this paper is that for linear Lipschitz cost functions the guided random walk (Algorithm 1 below) produces a sequence of points X1, . . . , XT ∈K with respective distributions σ0, . . . , σT −1 such that σi is close to µi for all 0 ≤i ≤T −1. Moreover, Xi is obtained from Xi−1 with only one random step. The step requires sampling from a Gaussian distribution with covariance given by the Hessian of the self-concordant barrier and can be implemented efficiently whenever the Hessian can be computed. The computation time exactly matches [3, Algorithm 2]: it is the same as time spent inverting a Hessian matrix, which is O(n3) or less. Let us now discuss our assumptions. First, the analysis of the random walk is carried out only for linear cost functions with a bounded Lipschitz constant. An analysis for general convex functions might be possible, but for the sake of brevity we restrict ourselves to the linear case. Note that convex cost functions can be linearized and a standard argument shows that regret for linearized functions can only be larger than that for the convex functions [30]. The second assumption is that q0 does not depend on T and has a bounded L2 norm with respect to the uniform distribution on K. This means that q0 can be not only uniform, but, for instance, of the form q0(x) ∝exp{−R(x)}. Theorem 2. Suppose ℓt : K *→[0, 1] are linear functions with Lipschitz constant 1 and the prior q0 is of bounded L2 norm with respect to uniform distribution on K. Then the one-step random walk (Algorithm 1) produces a sequence X1, . . . , XT with distributions σ0, . . . , σT −1 such that for all i, " x∈K |dσi(x) −dµi(x)| ≤Cηn3ν2, where µi are defined in (2), ν is the parameter of self-concordance, and C is an absolute constant. Therefore, regret of Algorithm 1 is within O( √ T) from the ideal procedure of Lemma 1. In 3 particular, by choosing η appropriately, for an absolute constant C′, E # T $ t=1 ℓt(Xt) − T $ t=1 ℓt(U) % ≤C′n3/2ν & TD(pU||µ0). (3) Proof. The statement follows directly from Lemma 1, Theorem 9, and an observation that for bounded losses ''Eµt−1ℓt(Xt) −Eσt−1ℓt(Xt) '' ≤ " x∈K |ℓt(x)| · |dµt−1(x) −dσt−1(x)| ≤Cηn3ν2 . 3 Sampling from a time-varying Gibbs distribution Sketch of the Analysis The sufficiency of only one step of the random walk is made possible by the fact that the distributions µt−1 and µt are close, and thus µt−1 is a (very) warm start for µt. The reduction in distance between the distributions after a single step is due to a general fact (Lov´asz-Simonovits [16]) which we state in Theorem 6. The majority of the work goes into lower bounding the conductance of the random walk by a quantity independent of T (Lemma 5). Since the random walk of Algorithm 1 takes advantage of the local geometry of the set, the conductance is lower bounded by (a) proving an isoperimetric inequality (Theorem 3) for the Riemannian metric (which states that the measure of the gap between two well-separated sets is large) and (b) by proving that for close-by (in the Riemannian metric) points, their transition functions are not too different (Lemma 4). Section 3 is organized as follows. In Section 3.1, the main building blocks for proving mixing time are stated, and their proofs appear later in Section 4. In Section 3.2, we use the mixing result of Section 3.1 to show that Algorithm 1 indeed closely tracks the distributions µt (Theorem 9). 3.1 Bounding Mixing Time In the remainder of this paper, C will denote a universal constant that may change from line to line. For any function F on the interior int(K) having continuous derivatives of order k, for vectors h1, . . . , hk ∈Rn and x ∈int(K), for k ≥1, we recursively define DkF(x)[h1, . . . , hk] := lim ϵ→0 Dk−1(x + ϵhk)[h1, . . . , hk−1] −Dk−1(x)[h1, . . . , hk−1] ϵ , where D0F(x) := F(x). Let F be a self-concordant barrier of K with a parameter ν (see [20]). For x, y ∈K, ρ(x, y) is the distance in the Riemannian metric whose metric tensor is the Hessian of F. Thus, the metric tensor on the tangent space at x assigns to a vector v the length ∥v∥x := D2F(x)[v, v], and to a pair of vectors v, w, the inner product ⟨v, w⟩x := D2F(x)[v, w]. We have ρ(x, y) = infΓ ( z ∥dΓ∥z where the infimum is taken over all rectifiable paths Γ from x to y. Let M be the metric space whose point set is K and metric is ρ. We assume ℓi are linear and 1−Lipschitz with respect to ρ. For x ∈int(K), let Gx denote the unique Gaussian probability density function on Rn such that Gx(y) ∝exp ) −n∥x −y∥2 x r2 + V (x) * , where V (x) = 1 2 ln det D2F(x) and r = 1/(Cn) Further, define the scaled cumulative cost as st(y) := r2ηLt(y). Note that shape of Gx is precisely given by the Dikin ellipsoid, which is defined as a unit ball in ∥·∥x around a point x [20, 3]. The Markov chain Mt considered in this paper is such that for x, y ∈K, one step x →y is given by Algorithm 1. A simple calculation shows that the detailed balance conditions are satisfied with respect to a stationary distribution µt (defined in Eq. (2)). Therefore the Markov chain is reversible and has this stationary measure. The next results imply that this Markov chain is rapidly mixing. The first main ingredient is an isoperimetric inequality necessary for lower bounding conductance. Theorem 3. Let S1 and S2 be measurable subsets of K and µ a probability measure supported on K that possesses a density whose logarithm is concave. Then, µ((K \ S1) \ S2) ≥ 1 2(1 + 3ν)ρ(S1, S2)µ(S1)µ(S2). 4 Algorithm 1 One Step Random Walk (Xt, st) Input: current point Xt ∈K and scaled cumulative cost st. Output: next point Xt+1 ∈K Toss a fair coin. If Heads, set Xt+1 := Xt. Else, Sample Z from GXt. If Z /∈K, let Xt+1 := Xt. If Z ∈K, let Xt+1 := + Z with prob. min , 1, GZ(Xt) exp(st(Xt)) GXt(Z) exp(st(Z)) Xt otherwise. Xt Xt+1 K Figure 1: The new point is sampled from a Gaussian distribution whose shape is defined by the local metric. Dotted lines are the unit Dikin ellipsoids. The next Lemma relates the Riemannian metric ρ to the Markov Chain. Intuitively, it says that for close-by points, their transition distributions cannot be far apart. Lemma 4. If x, y ∈K and ρ(x, y) ≤ r C√n, then dT V (Px, Py) ≤1 −1 C . Theorem 3 and Lemma 4 together give a lower bound on conductance of the Markov Chain. Lemma 5 (Bound on Conductance). Let µ be any exponential distribution on K. The conductance Φ := inf µ(S1)≤1 2 ( S1 Px(K \ S1)dµ(x) µ(S1) of the Markov Chain in Algorithm 1 is bounded below by 1 Cνn√n. The lower bound on conductance of Lemma 5 can now be used with the following general result on the reduction of distance between distributions. Theorem 6 (Lov´asz-Simonovits [16]). Let γ0 be the initial distribution for a lazy reversible ergodic Markov chain whose conductance is Φ and stationary measure is γ, and γk be the distribution of the kth step. Let M := supS γ0(S) γ(S) where the supremum is over all measurable subsets S of K. For every bounded f, let ∥f∥2,γ denote .( K f(x)2dγ(x). For any fixed f, let Ef be the map that takes x to ( K f(y)dPx(y). Then if ( K f(x)dγ(x) = 0, ∥Ekf∥2,γ ≤ ) 1 −Φ2 2 *k ∥f∥2,γ . In summary, Lemma 5 provides a lower bound on conductance, while Theorem 6 ensures reduction of the norm whenever conductance is large enough. In the next section, these two are put together. We will show that reduction in the norm guarantees that the distribution after one step of the random walk (k = 1 in Theorem 6) is close to the desired distribution µt. 3.2 Tracking the distributions Let {σi}∞ i=1 be the probability measures with bounded density, supported on K, corresponding to the distribution of a point during different steps of the evolution of the algorithm. For i ∈N, let ∥· ∥µi denote the L2 norm with respect to the measure µi. We shall write ∥· ∥i for brevity. Hence, for a measurable function f : K →R, ∥f∥i = /( K f 2dµi 01/2 . Furthermore, sup x∈K dµi(x) dµi+1(x) = sup x∈K q0(x)e−ηLi(x)dx q0(x)e−ηLi+1(x)dx Zt+1 Zt ≤e2η ≤1 + ¯η (4) where we used the fact that ℓi+1(x) ≤1 and ¯η is an appropriate multiple of η, e.g. ¯η = (e2 −1)η does the job. Analogously, dµi+1/dµi ≤1 + ¯η over K. It then follows that the norms at time i and i + 1 are comparable: ∥f∥i(1 + ¯η)−1 ≤∥f∥i+1 ≤∥f∥i(1 + ¯η) (5) 5 The mixing results of Lemma 5 together with Theorem 6 imply Corollary 7. For any i, 1111 dσi+1 dµi −1 1111 i ≤ 1111 dσi dµi −1 1111 i ) 1 − ) 1 Cn3ν2 ** Corollary 7 says that σi+1 is “closer” than σi to µi by a multiplicative constant. We now show that the distance of σi+1 to µi+1 is (additively) not much worse than its distance to µi. The multiplicative reduction in distance is shown to be dominating the additive increase, concluding the proof that σi is close to µi for all i (Theorem 9). Lemma 8. For any i, it holds that 1111 dσi+1 dµi+1 −1 1111 i+1 ≤(1 + ¯η)2 1111 σi+1 dµi −1 1111 i + ¯η(1 + ¯η). Proof. 1111 dσi+1 dµi+1 −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i = 1111 dσi+1 dµi+1 −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i+1 (6) + 1111 dσi+1 dµi −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i . (7) We first establish a bound of Cη on (6). For any function f : K →R, let f +(x) = max(0, f(x)) and f −(x) = min(0, f(x)). By the triangle inequality, 1111 dσi+1 dµi+1 −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i+1 ≤ 1111 dσi+1 dµi+1 −dσi+1 dµi 1111 i+1 . Now, using (4) and (5), 1111 dσi+1 dµi+1 −dσi+1 dµi 1111 2 i+1 = 11111 )dσi+1 dµi+1 −dσi+1 dµi *+11111 2 i+1 + 11111 )dσi+1 dµi+1 −dσi+1 dµi *−11111 2 i+1 ≤ 1111 dσi+1 dµi ¯η1 2 1 ≥ dµi dµi+1 31111 2 i+1 + 1111 dσi+1 dµi ¯η1 2 1 < dµi dµi+1 31111 2 i+1 = ¯η2 1111 dσi+1 dµi 1111 2 i+1 ≤¯η2(1 + ¯η)2 1111 dσi+1 dµi 1111 2 i . Thus, (6) is bounded as 1111 dσi+1 dµi+1 −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i+1 ≤¯η(1 + ¯η) 1111 dσi+1 dµi 1111 i = ¯η(1 + ¯η) ) 1 + 1111 σi+1 dµi −1 1111 i * Next, a bound on (7) follows simply by the norm comparison inequality (5): 1111 dσi+1 dµi −1 1111 i+1 − 1111 dσi+1 dµi −1 1111 i ≤¯η 1111 dσi+1 dµi −1 1111 i . The statement follows by rearranging the terms. Theorem 9. If 111 dσ0 dµ0 −1 111 0 < ¯η(1 + ¯η), where ¯η = (e2 −1)η, then for all i, 1111 dσi dµi −1 1111 i ≤Cηn3ν2 . Consequently, for all i " x∈K |dσi(x) −dµi(x)| ≤Cηn3ν2 . 6 Proof. By Corollary 7 and Lemma 8, we see that 1111 dσi+1 dµi+1 −1 1111 i+1 ≤(1 + ¯η)2 ) 1 − ) 1 Cn3ν2 ** 1111 dσi dµi −1 1111 i + ¯η(1 + ¯η). Since ¯η = o( 1 n3ν2 ), 1111 dσi+1 dµi+1 −1 1111 i+1 ≤ ) 1 − ) 1 Cn3ν2 ** 1111 dσi dµi −1 1111 i + Cη. (8) Let 0 ≤a < 1 and b > 0, and x0, x1, . . . , be any sequence of non-negative numbers such that, x0 ≤b and for each i, xi+1 ≤axi + b. We see, by unfolding the recurrence, that xi+1 ≤ b 1−a. From this and (8), the first statement of the theorem follows. The second statement follows from " |dσi −dµi| = " '''' dσi dµi −1 '''' dµi ≤ 4" )dσi dµi −1 *2 dµi 51/2 = 1111 dσi dµi −1 1111 i . 4 Proof Sketch In this section, we prove the main building blocks stated in Section 3.1. Consider a time step t. Let dT V represent total variation distance. Without loss of generality, assume x is the origin and assume st(x) = 0. For x ∈K and a vector v, |v|x is defined to be sup x±αv∈K α. The following relation holds: Theorem 10 (Theorem 2.3.2 (iii) [21]). Let F be a self-concordant barrier whose self-concordance parameter is ν. Then |h|x ≤∥h∥x ≤2(1 + 3ν)|h|x for all h ∈Rn and x ∈int(K). We term (S1, (M \ S1) \ S2, S2) a δ-partition of M, if δ ≤dM(S1, S2) := inf x∈S1,y∈S2 dM(x, y), where S1, S2 are measurable subsets of M. Let Pδ be the set of all δ-partitions of M. If µ is a measure on M, the isoperimetric constant is defined as C(δ, M, µ) := inf Pδ µ((M \ S1) \ S2) µ(S1)µ(S2) and Ct := C ) r √n, M, µt * . Given interior points x, y in int(K), suppose p, q are the ends of the chord in K containing x, y and p, x, y, q lie in that order. Denote by σ(x, y) the cross ratio |x−y||p−q| |p−x||q−y|. Let dH denote the Hilbert (projective) metric defined by dH(x, y) := ln (1 + σ(x, y)) . For two sets S1 and S2, let σ(S1, S2) := infx∈S1,y∈S2 σ(x, y). Proof of Theorem 3. For any z on the segment xy an easy computation shows that dH(x, z) + dH(z, y) = dH(x, y). Therefore it suffices to prove the result infinitesimally. By a result due to Nesterov and Todd [22, Lemma 3.1], ∥x −y∥x −∥x −y∥2 x ≤ρ(x, y) ≤−ln(1 −∥x −y∥x). (9) whenever ∥x −y∥x < 1. From (9) limy→x ρ(x,y) ∥x−y∥x = 1, and a direct computation shows that lim y→x dH(x, y) |x −y|x = lim y→x σ(x, y) |x −y|x ≥1. Hence, using Theorem 10, the Hilbert metric and the Riemannian metric satisfy ρ(x, y) ≤2(1 + 3ν)dH(x, y). The statement of the theorem is now an immediate consequence of the following result due to Lov´asz and Vempala [18]: If S1 and S2 are measurable subsets of K and µ a probability measure supported on K that possesses a density whose logarithm is concave, then µ((K \ S1) \ S2) ≥σ(S1, S2)µ(S1)µ(S2). 7 Proof of Lemma 5. Let S1 be a measurable subset of K such that µ(S1) ≤1 2 and S2 := K \ S1 be its complement. Let S′ 1 = S1 ∩{x ''Px(S2) ≤1/C} and S′ 2 = S2 ∩{y ''Py(S1) ≤1/C}. By the reversibility of the chain, which is easily checked, " S1 Px(S2)dµ(x) = " S2 Py(S1)dµ(y). If x ∈S′ 1 and y ∈S′ 2 then, dT V (Px, Py) := 1 − " K min )dPx dµ (w), dPy dµ (w) * dµ(w) = 1 −1 C . Lemma 4 implies that if ρ(x, y) ≤ r C√n, then dT V (Px, Py) ≤1 −1 C . Therefore ρ(S′ 1, S′ 2) := inf x∈S′ 1,y∈S′ 2 ρ(x, y) ≥ r C√n. (10) Therefore Theorem 3 implies that µ((K \ S′ 1) \ S′ 2) ≥ρ(S′ 1, S′ 2) 2(1 + 3ν) min(µ(S′ 1), µ(S′ 2)) ≥ r Cν√n min(µ(S′ 1), µ(S′ 2)). First suppose µ(S′ 1) ≥(1 −1 C )µ(S1) and µ(S′ 2) ≥(1 −1 C )µ(S2). Then, " S1 Px(S2)dµ(x) ≥µ((K \ S′ 1) \ S′ 2) ≥Cµ(S′ 1) C ≥C min(µ(S′ 1), µ(S′ 2)) C and we are done. Otherwise, without loss of generality, suppose µ(S′ 1) ≤(1 −1 C )µ(S1). Then " S1 Px(S2)dµ(x) ≥µ(S1) C and we are done. Proof of Lemma 1. We have that D(µt−1||µt) = " K dµt−1 log qt−1Zt Zt−1qt = log Zt Zt−1 + " K ηℓt(x)dµt−1(x) = log Zt Zt−1 + ηEℓt(Xt). (11) Rearranging, canceling the telescoping terms, and using the fact that Z0 = 1 ηE T $ t=1 ℓt(Xt) = T $ t=1 D(µt−1||µt) −log ZT . Let U be a random variable with a probability distribution pU. Then − T $ t=1 Eℓt(U) = η−1 " K −ηLT (u)dpU(u) = η−1 " K dpU(u) log qT (u) q0(u) Combining, E # T $ t=1 ℓt(Xt) − T $ t=1 ℓt(U) % = η−1 " K dpU(u) log qT (u)/ZT q0(u) + η−1 T $ t=1 D(µt−1||µt) = η−1 (D(pU||µ0) −D(pU||µT )) + η−1 T $ t=1 D(µt−1||µt). Now, from Eq. (11), the KL divergence can be also written as D(µt−1||µt) = log ( K e−ηℓt(x)qt−1(x)dx ( K qt−1(x)dx + ηEℓt(Xt) = log Ee−η(ℓt(Xt)−Eℓt(Xt)) By representing the divergence in this form, one can obtain upper bounds via known methods, such as Log-Sobolev inequalities (e.g. [6]). In the simplest case of bounded loss, it is easy to show that D(µt−1||µt) ≤O(η2), and the particular constant 1/8 can be obtained by, for instance, applying Lemma A.1 in [7]. This proves the second part of the lemma. 8 References [1] J. Abernethy, A. Agarwal, P. L. Bartlett, and A. Rakhlin. A stochastic view of optimal regret through minimax duality. In COLT ’09, 2009. [2] J. Abernethy, P. L. Bartlett, and A. Rakhlin. Multitask learning with expert advice. In Proceedings of The Twentieth Annual Conference on Learning Theory, pages 484–498, 2007. [3] J. Abernethy, E. Hazan, and A. Rakhlin. Competing in the dark: An efficient algorithm for bandit linear optimization. In Proceedings of The Twenty First Annual Conference on Learning Theory, 2008. [4] K. S. Azoury and M. K. Warmuth. Relative loss bounds for on-line density estimation with the exponential family of distributions. Machine Learning, 43(3):211–246, June 2001. [5] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Oper. Res. Lett., 31(3):167–175, 2003. [6] S. Boucheron, G. Lugosi, and P. Massart. Concentration inequalities using the entropy method. 31:1583– 1614, 2003. [7] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [8] V. Dani, T. P. Hayes, and S. Kakade. The price of bandit information for online optimization. In Advances in Neural Information Processing Systems 20. Cambridge, MA, 2008. [9] M. Dyer, A. Frieze, and R. Kannan. A random polynomial-time algorithm for approximating the volume of convex bodies. Journal of the ACM (JACM), 38(1):1–17, 1991. [10] S. Kakade and A. Ng. Online bounds for Bayesian algorithms. In Proceedings of Neural Information Processing Systems (NIPS 17), 2005. [11] A. Kalai and S. Vempala. Efficient algorithms for universal portfolios. The Journal of Machine Learning Research, 3:440, 2003. [12] A.T. Kalai and S. Vempala. Simulated annealing for convex optimization. Mathematics of Operations Research, 31(2):253–266, 2006. [13] R. Kannan and H. Narayanan. Random walks on polytopes and an affine interior point method for linear programming. In STOC, 2009. Accepted (pending revisions), Mathematics of Operations Research. [14] V. R. Konda and J. N. Tsitsiklis. Linear stochastic approximation driven by slowly varying markov chains. Systems and Control Letters, 50:95–102, 2003. [15] N. Littlestone and M. K. Warmuth. The weighted majority algorithm. Information and Computation, 108(2):212–261, 1994. [16] L. Lov´asz and M. Simonovits. Random walks in a convex body and an improved volume algorithm. Random Structures and Algorithms, 4(4):359–412, 1993. [17] L. Lov´asz and S. Vempala. Simulated annealing in convex bodies and an o∗(n4) volume algorithm. J. Comput. Syst. Sci., 72(2):392–417, 2006. [18] L. Lov´asz and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Struct. Algorithms, 30(3):307–358, 2007. [19] H. Narayanan. Randomized interior point methods for sampling and optimization. CoRR, abs/0911.3950, 2009. [20] A.S. Nemirovskii. Interior point polynomial time methods in convex programming, 2004. [21] Y. E. Nesterov and A. S. Nemirovskii. Interior Point Polynomial Algorithms in Convex Programming. SIAM, Philadelphia, 1994. [22] Y.E. Nesterov and MJ Todd. On the Riemannian geometry defined by self-concordant barriers and interior-point methods. Foundations of Computational Mathematics, 2(4):333–361, 2008. [23] A. Rakhlin. Lecture notes on online learning, 2008. http://stat.wharton.upenn.edu/˜rakhlin/papers/online learning.pdf. [24] D. Shah and J. Shin. Dynamics in congestion games. In Proceedings of ACM Sigmetrics, 2010. [25] S. Shalev-Shwartz and Y. Singer. Convex repeated games and fenchel duality. In NIPS. 2007. [26] S. Vempala. Geometric random walks: A survey. In Combinatorial and computational geometry. Math. Sci. Res. Inst. Publ, 52:577–616, 2005. [27] V. Vovk. Aggregating strategies. In Proceedings of the Third Annual Workshop on Computational Learning Theory, pages 372–383. Morgan Kaufmann, 1990. [28] V. Vovk. Competitive on-line statistics. International Statistical Review, 69:213–248, 2001. [29] K. Yamanishi. Minimax relative loss analysis for sequential prediction algorithms using parametric hypotheses. In COLT’ 98, pages 32–43, New York, NY, USA, 1998. ACM. [30] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, 2003. 9
2010
212
3,980
Unsupervised Kernel Dimension Reduction Meihong Wang Dept. of Computer Science U. of Southern California Los Angeles, CA 90089 meihongw@usc.edu Fei Sha Dept. of Computer Science U. of Southern California Los Angeles, CA 90089 feisha@usc.edu Michael I. Jordan Dept. of Statistics U. of California Berkeley, CA jordan@cs.berkeley.edu Abstract We apply the framework of kernel dimension reduction, originally designed for supervised problems, to unsupervised dimensionality reduction. In this framework, kernel-based measures of independence are used to derive low-dimensional representations that maximally capture information in covariates in order to predict responses. We extend this idea and develop similarly motivated measures for unsupervised problems where covariates and responses are the same. Our empirical studies show that the resulting compact representation yields meaningful and appealing visualization and clustering of data. Furthermore, when used in conjunction with supervised learners for classification, our methods lead to lower classification errors than state-of-the-art methods, especially when embedding data in spaces of very few dimensions. 1 Introduction Dimensionality reduction is an important aspect of many statistical learning tasks. In unsupervised dimensionality reduction, the primary interest is to preserve significant properties of the data in a low-dimensional representation. Well-known examples of this theme include principal component analysis, manifold learning algorithms and their many variants [1–4]. In supervised dimensionality reduction, side information is available to influence the choice of the low-dimensional space. For instance, in regression problems, we are interested in jointly discovering a low-dimensional representation Z of the covariates X and predicting well the response variable Y given Z. A classical example is Fisher discriminant analysis for binary response variables, which projects X to a one-dimensional line. For more complicated cases, however, one needs to specify a suitable regression function, E [Y | X ], in order to identify Z. This is often a challenging task in itself, especially for high-dimensional covariates. Furthermore, one can even argue that this task is cyclically dependent on identifying Z, as one of the motivations for identifying Z is that we would hope that the low-dimensional representation can guide us in selecting a good regression function. To address this dilemma, there has been a growing interest in sufficient dimension reduction (SDR) and related techniques [5–8]. SDR seeks a low-dimensional Z which captures all the dependency between X and Y . This is ensured by requiring conditional independence among the three variables; i.e., X ⊥⊥Y | Z. Several classical approaches exist to identify such random vectors Z [6, 9]. Recently, kernel methods have been adapted to this purpose. In particular, kernel dimensional reduction (KDR) develops a kernel-based contrast function that measures the degree of conditional independence [7]. Compared to classical techniques, KDR has the significant advantage that it avoids making strong assumptions about the distribution of X. Therefore, KDR has been found especially suitable for high-dimensional problems in machine learning and computer vision [8, 10, 11]. In this paper we show how the KDR framework can be used in the setting of unsupervised learning. Our idea is similar in spirit to a classical idea from the neural network literature: we construct 1 an “autoencoder” or “information bottleneck” where the response variables are the same as the covariates [12, 13]. The key difference is that autoencoders in the neural network literature were based on a specific parametric regression function. By exploiting the SDR and KDR frameworks, on the other hand, we can cast the unsupervised learning problem within a general nonparametric framework involving conditional independence, and in particular as one of optimizing kernel-based measures of independence. We refer to this approach as “unsupervised kernel dimensionality reduction” (UKDR). As we will show in an empirical investigation, the UKDR approach works well in practice, comparing favorably to other techniques for unsupervised dimension reduction. We assess this via visualization and via building classifiers on the compact representations delivered by these methods. We also provide some interesting analytical links of the UKDR approach to stochastic neighbor embedding (SNE) and t-distributed SNE (t-SNE) [14, 15]. The paper is organized as follows. In Section 2, we review the SDR framework and discuss how kernels can be used to solve the SDR problem. Additionally, we describe two specific kernelbased measures of independences, elucidating a relationship between these measures. We show how the kernel-based approach can be used for unsupervised dimensionality reduction in Section 3. We report empirical studies in Section 4. Finally, we conclude and comment on possible future directions in Section 5. Notation Random variables are denoted with upper-case characters such as X and Y . To refer to their specific values, if vectorial, we use bold lower-case such as x and xn. xi stands for the i-th element of x. Matrices are in bold upper-case such as M. 2 Sufficient dimension reduction and measures of independence with kernels Discovering statistical (in)dependencies among random variables is a classical problem in statistics; examples of standard measures include Spearman’s ρ, Kendall’s τ and Pearson’s χ2 tests. Recently, there have been a growing interest in computing measures of independence in Reproducing Kernel Hilbert spaces (RKHSs) [7, 16]. Kernel-based (and other nonparametric) methods detect nonlinear dependence in random variables without assuming specific relationships among them. In particular, the resulting independence measures attain minimum values when random variables are independent. These methods were originally developed in the context of independent component analysis [17] and have found applications in a variety of other problems, including clustering, feature selection, and dimensionality reduction [7, 8, 18–21]. We will be applying these approaches to unsupervised dimensionality reduction. Our proposed techniques aim to yield low-dimensional representation which is “maximally” dependent on the original high-dimensional inputs—this will be made precise in a later section. To this end, we first describe briefly kernel-based measures of (conditional) independence, focusing on how they are applied to supervised dimensionality reduction. 2.1 Kernel dimension reduction for supervised learning In supervised dimensionality reduction for classification and regression, the response variable, Y ∈ Y, provides side information about the covariates, X ∈X. In a basic version of this problem we seek a linear projection B ∈RD×M to project X from D-dimensional space to a M-dimensional subspace. We would like the low-dimensional coordinates Z = B⊤X to be as predictive about Y as X is; i.e., E [Y | B⊤X ] = E [Y | X ]. Intuitively, knowing Z is sufficient for the purpose of regressing Y . This problem is referred to as sufficient dimension reduction (SDR) in statistics, where it has been the subject of a large literature [22]. In particular, SDR seeks a projection B such that, X ⊥⊥Y | B⊤X , subject to B⊤B = I . (1) where I is the M ×M identity matrix. Several methods have been proposed to estimate B [6, 9]. Of special interest is the technique of kernel dimensional reduction (KDR) that is based on assessing conditional independence in RKHS spaces [7]. Concretely, we map the two variables X and Y to the RKHS spaces F and G induced by two positive semidefinite kernels KX : X × X →R 2 and KY : Y × Y →R. For any function g ∈G, there exists a conditional covariance operator CY Y |X : G →G such that ⟨g, CY Y |X g⟩G = E  varY |X[g(Y )|X]  (2) calculates the residual errors of predicting g(Y ) with X [7, Proposition 3]. Similarly, we can define the conditional covariance operator CB Y Y |X for predicting with B⊤X. The conditional covariance operator has an important property: for any projection B, CB Y Y |X ≥ CY Y |X where the (partial) order is defined in terms of the trace operator. Moreover, the equality holds if and only if eq. (1) is satisfied. This gives rise to the possibility of using the trace of the operators as a contrast function to estimate B. Concretely, with N samples drawn from P(X, Y ), we compute the corresponding kernel matrices KB⊤X and KY . We centralize them with a projection matrix H = I −1/N 11⊤, where 1 ∈RN be the vector whose elements are all ones. The trace of the estimated conditional variance operator CB Y Y |X is then defined as follows: ˆJY Y |X(B⊤X, Y ) = Trace  GY (GB⊤X + NǫNIN)−1 , (3) where GY = HKY H and GB⊤X = HKB⊤XH. ǫN is a regularizer, smoothing the kernel matrix. It should be chosen such that when N →+∞, ǫN →0 and √ NǫN →+∞to ensure consistency [7]. The minimizer of the conditional independence measure yields the optimal projection B for kernel dimensionality reduction: BY Y |X = arg minB⊤B=I ˆJY Y |X(B⊤X, Y ). (4) We defer discussion on choosing kernels as well as numerical optimization to later sections. When it is clear from context, we use ˆJY Y |X as a shorthand for ˆJY Y |X(B⊤X, Y ). The optimization functional in eq. (3) is not the only way to implement the KDR idea. Indeed, another kernel-based measure of independence that can be optimized in the KDR context is the Hilbert-Schmidt Independence Criterion (HSIC) [16]. This is built as the Hilbert-Schmidt norm of the cross-covariance operator CXY , defined as G →F: cov(f, g) = ⟨f, CXY g⟩F = EXY {[f(X) −EXf(X)] [g(Y ) −EY g(Y )]} , (5) where the expectations are taken with respect to the joint distribution and the two marginals respectively. It has been shown that for universal kernels such as Gaussian kernels the Hilbert-Schmidt norm of CXY is zero if and only if X and Y are independent [16]. Given N samples from P(X, Y ), the empirical estimate of HSIC is given by (up to a multiplicative constant): ˆJXY (X, Y ) = Trace [HKXHKY ] , (6) where KX and KY are RN×N kernel matrices computed over X and Y respectively. To apply this independence measure to dimensionality reduction, we seek a projection B which maximizes ˆJXY (B⊤X, Y ), such that the low-dimensional coordinates Z = B⊤X are maximally correlated with X, BXY = arg maxB⊤B=I ˆJXY (B⊤X, Y ) = arg maxB⊤B=I Trace[HKB⊤XHKY ] . (7) It is interesting to note that the independence measures in eq. (3) and eq. (6) are similar. In fact, we have been able to find conditions under which they are equivalent, as stated in the following proposition. Proposition 1. Let N →+∞and ǫN →0. Additionally, assume that the samples are distributed uniformly on the unit sphere. If σN ≪ǫ2 N, then up to a constant, ˆJY Y |X(B⊤X, Y ) ≈−c0N 2ǫ2 N ˆJXY (B⊤X, Y ). (8) Therefore, under these conditions it is equivalent to minimize ˆJY Y |X(B⊤X, Y ) or to maximize ˆJXY (B⊤X, Y ). Thus, BXY ≈BY Y |X. 3 Proof The proof is sketched in the supplementary material. Note that assuming the norm of X is equal to one is not overly restrictive; in practice, one often needs to normalize data points to control the overall scale. We note that while the two measures are asymptotically equivalent, they have different computational complexity—computing ˆJXY does not involve matrix inversion. Furthermore, ˆJXY is slightly easier to use in practice as it does not depend on regularization parameters to smooth the kernel matrices. The HSIC measure ˆJXY is also closely related to the technique of kernel alignment which minimizes the angles between (vectorized) kernel matrices KX and KY [23]. This is equivalent to maximizing Trace[KXKY ]/(∥KX|∥F ∥KY ∥F ). The alignment technique has been used for clustering data X by assigning cluster labels Y so that the two kernel matrices are maximally aligned. The HSIC measure has also been used for similar tasks [18]. While both ˆJY Y |X and ˆJXY have been used for supervised dimensionality reduction with known values of Y , they have not yet been applied to unsupervised dimensionality reduction, which is the direction that we pursue here. 3 Unsupervised kernel dimension reduction In unsupervised dimensionality reduction, the low-dimensional representation Z can be viewed as a compression of X. The goal is to identify the Z that captures as much of the information in X as possible. This desideratum has been pursued in the neural network literature where autoencoders learn a pair of encoding and decoding functions, Z = f(X) and X = g(Z). A drawback of this approach is that f and g need to be specified a priori, in terms of number of layers and neurons in neural nets. Can we leverage the advantages of SDR and KDR to identify Z without specifying f(X) or g(Z)? In this section, we describe how this can be done, viewing unsupervised dimensionality reduction as a special type of supervised regression problem. We start by considering the simplest case where Z is a linear projection of X. We then consider nonlinear approaches. 3.1 Linear unsupervised kernel dimension reduction Given a random variable X ∈RD, we consider the regression problem ˜X = f(B⊤X) where ˜X is a copy of X and Z = B⊤X ∈RM is the low-dimensional representation of X. Following the framework of SDR and KDR in section 2, we seek B such that X ⊥⊥˜X | B⊤X. Such B⊤X thus captures all information in X in order to construct itself (i.e., ˜X). With a set of N samples from P(X), the linear projection B can be identified as the minimizer of the following kernel-based measure of independence min B⊤B=I ˆJXX|B⊤X = Trace  GX(GB⊤X + NǫNI)−1 , (9) where GX and GB⊤X are centralized kernel matrices of KX and KB⊤X respectively. We can alternatively maximize the corresponding HSIC measure of dependence between B⊤X and X max B⊤B=I ˆJB⊤X X = Trace [GXGB⊤X]. (10) We refer collectively to this kernel-based dimension reduction method as linear unsupervised KDR (UKDR) and we use ˆJ(B⊤X, X) as a shorthand for the independence measure to be either minimized or maximized. 3.2 Nonlinear unsupervised kernel dimension reduction For data with complicated multimodal distributions, linear transformation of the inputs X is unlikely to be sufficiently flexible to reveal useful structures. For example, linear projections can result in overlapping clusters in low-dimensional spaces. For the purpose of better data visualization and exploratory data analysis, we describe several simple yet effective nonlinear extensions to linear UKDR. The main idea is to find a linear subspace embedding of nonlinearly transformed X. Let 4 h(X) ∈RH denote the nonlinear transformation. The projection B is then computed to optimize ˆJ(B⊤h(X), X). Radial Basis Network (RBN). In the spirit of neural network autoencoder, one obvious choice of h(X) is to use a network of radial basis functions (RBFs). In this case, H = N, the number of samples from X. For a sample xi, the n-th component of h(xi) is given by hRBN n (xi) = exp{−∥xi −xn∥2/σ2 n}, (11) where xn is the center of the n-th RBF and σn is the corresponding bandwidth. Random Sparse Feature (RSF). In this approach we draw D × H elements of W from a multivariate Gaussian distribution with zero mean and identity covariance matrix. We construct the k-th element of h(X) as hRSF k (X) = Heaviside(wk ⊤X −b), (12) where wk is the k-th row of W and b is an adjustable offset term. Heaviside(t) is the step function that takes the value of 1 when t > 0 and the value of 0 otherwise. Note that b controls the sparsity of hRSF(X), a property that can be computationally advantageous. Our choice of random matrix W is motivated by earlier work in neural networks with infinite number of hidden units, and recent work in large-scale kernel machines and deep learning kernels [24– 26]. In particular, in the limit of H →+∞, the transformed X induces an RKHS space with the arccos kernel: hRSF(u)⊤hRSF(v) = 1 −1/π cos−1(u⊤v/∥u∥∥v∥) [26]. Nonparametric. We have also experimented with a setup where Z is not constrained to any parametric form. In particular, we optimize ˆJ(Z, X) over all possible values Z ∈RM. While more powerful in principle than either linear KDR or the RBF or RSF variants of nonlinear KDR, we have found that empirically that the optimization can get stuck in local optima. However, when initialized with the solutions from the other nonlinear methods, the final solution is generally better. 3.3 Choice of kernels The independence measures ˆJ(B⊤X, X) are defined via kernels over B⊤X and X. A natural choice is a universal kernel, in particular the Gaussian kernel: KB⊤X(xi, xj) = exp{−∥B⊤xi − B⊤xj∥2/σ2 B}, and similarly for X with a different bandwidth σX. We have also experimented with other types of kernels; in particular we have found the following kernels to be of particular interest. Random walk kernel over X. Given N observations, {x1, x2, . . . , xN}, we note that the RBN transformed xi in eq. (11), when properly normalized, can be seen as the probability of random walk from xi to xj, pij = P(xi →xj) = exp{−∥xi −xj∥2/σ2 i } / X j̸=i exp{−∥xi −xj∥2/σ2 i }. (13) The matrix P with elements of pij is clearly not symmetric and not positive semidefinite. Nevertheless, a simple transformation KX = P P ⊤turns it into a positive semidefinite kernel. Intuitively, the values of pij describe local structures around xi [14]. Thus KX(xi, xj) = P k pikpjk measures the similarity between xi and xj in terms of these local structures. Cauchy kernel for B⊤X. A Cauchy kernel is a positive semidefinite kernel and is given by C(u, v) = 1/ 1 + ∥u −v∥2 = exp  −log(1 + ∥u −v∥2) . (14) We define KB⊤X(xi, xj) = C(B⊤xi, B⊤xj). Intuitively, the Cauchy kernel can be viewed as a Gaussian kernel in the transformed space φ(B⊤X) such that φ(xi)⊤φ(xj) = C(xi, xj) [27]. These two types of kernels are closely related to t-distributed stochastic neighbor embedding (tSNE), a state-of-the-art technique for dimensionality reduction [15]. We discuss the link in the Supplementary Material. 3.4 Numerical optimization We apply gradient-based techniques (with line search) to optimize either independence measure. The techniques constrain the projection matrix B to lie on the Grassman-Stiefel manifold 5 (a) 0 100 200 300 −150 −100 −50 0 50 100 150 (b) 0 100 200 300 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 (c) 0 100 200 300 −10 −5 0 5 10 (d) Figure 1: Experiments with synthetic 2D data. (a). Original. (b) 1D embedding by t-SNE. (c) and (d) are 1D embeddings by UKDR. They differ in terms of how the embeddings are constrained (see text for details). Vertical axes are the coordinates of 1D embeddings. t-SNE failed to separate data. UKDR makes fewer mistakes in (c) and no mistakes in (d). B⊤B = I [28]. While the optimization is nonconvex, our optimization algorithm works quite well in practice. The complexity of computing gradients is quadratic in the number of data points as the kernel matrix needs to be computed. Standard tricks—such as chunking—for handling large kernel matrices apply, though our empirical work has not used them. In order to optimize on the Stiefel manifold, computing the search direction from the gradient needs a QR decomposition which depends cubicly on D, the original dimensionality. More efficient implementation can bring the complexity to quadratic on D and linearly on M, the dimensionality of the low-dimensional space. One simple strategy is to use PCA as a preprocessing step to obtain a moderate D. 4 Experiments We compare the performance of our proposed methods for unsupervised kernel dimension reduction (UKDR) to a state-of-the-art method, specifically t-distributed stochastic neighbor embedding (tSNE) [15]. t-SNE has been shown to excel in many tasks of data visualization and clustering. In addition to visual examination of 2D embedding quality, we also investigate the performance of the resulting low-dimensional representations in classification. In all of the experiments reported in this section, we have used the independence measure ˆJB⊤X X(B⊤X, X) of eq. (10). 4.1 Synthetic example Our synthetic example contains 300 data points randomly distributed on two rings, shown in Fig. 1(a). We use t-SNE and our proposed method to yield 1D embeddings of these data points, plotted in Fig. 1(b)–1(d). The horizontal axis indexes the data points where the first 100 indices correspond to the inner ring. Fig. 1(b) plots a typical embedding by t-SNE where we see that there is significant overlap between the clusters. On the other hand, UKDR is able to generate less overlapped or non-overlapped clusters. In Fig. 1(c), the embedding is computed as the linear projection of the RBN-transformed original data. In Fig. 1(d), the embedding is unconstrained and free to take any value on 1D axis, corresponding to the “nonparametric embedding” presented in section 3. 4.2 Images of handwritten digits Our second data set is a set of 2007 images of USPS handwritten digits [20]. Each image has 256 pixels and is thus represented as a point in R256. We refer to this data set as “USPS-2007.” We also sampled a subset of 500 images, 100 each from the digits 1, 2, 3, 4 and 5. Note that images of digit 3 and 5 are often indistinguishable from each other. We refer to this dataset as “USPS-500.” USPS-500. Fig. 2 displays a 2D embedding of the 500 images. The colors encode digit categories (which are used only for visualization). The first row was generated with kernel PCA, Laplacian eigenmaps and t-SNE. t-SNE clearly outperforms the other two in yielding well-separated clusters. 6 The second row was generated with our UKDR method with Gaussian kernels for both the lowdimensional coordinates Z and X. The difference between the three embeddings is whether Z is constrained as a linear projection of the original X (linear UKDR), an RBN-transformed X (RBN UKDR), or a Random Sparse Feature transform of X (RSF UKDR). The Gaussian kernel bandwidths over Z were 0.1, 0.02 and 0.5, respectively. For the RBN transformation of X, we selected the bandwidth of each RBF function in eq. (11) with the “perplexity trick” used in SNE and tSNE [15]. The bandwidth for the Gaussian kernel over X was 0.5 for all three plots. While linear UKDR yields reasonably good clusters of the data, RBN UKDR and RSF UKDR yield significantly improved clusterings. Indeed, the quality of the embeddings is on par with that of t-SNE. In the third row of the figure, the embedding Z is constrained to be RSF UKDR. However, instead of using Gaussian kernels (as in the second row), we have used Cauchy kernels. The kernels over X are Gaussian, Random Walk, and Diffusion Map kernels [29], respectively. In general, contrasting to embeddings in the second row, using a Cauchy kernel for the embedding space Z leads to tighter clusters. Additionally, the embeddings by the diffusion map kernel is the most visually appealing one, outperforming t-SNE by significantly increasing the gap of digit 1 and 4 from the others. −6 −4 −2 0 2 4 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 1 2 3 4 5 (a) Kernel PCA −0.04 −0.02 0 0.02 0.04 0.06 0.08 0.1 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 0.08 0.1 0.12 1 2 3 4 5 (b) Laplacian eigenmap −50 0 50 100 −40 −20 0 20 40 1 2 3 4 5 (c) t-SNE −0.4 −0.2 0 0.2 0.4 0.6 −0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 1 2 3 4 5 (d) Linear UKDR −1 0 1 2 3 −0.5 0 0.5 1 1.5 2 1 2 3 4 5 (e) RBN UKDR −1 0 1 2 3 4 −0.5 0 0.5 1 1.5 2 2.5 1 2 3 4 5 (f) RSF UKDR −4 −2 0 2 4 6 −5 −4 −3 −2 −1 0 1 1 2 3 4 5 (g) Gaussian+Cauchy −2 −1 0 1 2 3 4 5 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 1 2 3 4 5 (h) Random Walk+Cauchy −2 −1 0 1 2 3 4 5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 1 2 3 4 5 (i) Diffusion+Cauchy Figure 2: 2D embedding results for the USPS-500 dataset by existing approaches, shown in the first row. Embeddings by UKDR are shown in the bottom two panels. Effect of sparsity. For RSF features computed with eq. (12), the offset constant b can be used to obtain control over the sparsity of the feature vectors. We investigated the effect of the sparsity level on embeddings. We found that a sparsity level as high as 82% still generates reasonable embeddings. Details are reported in the Supplementary Material. Thus RSF features are viable options for handling high-dimensional data for nonlinear UKDR. USPS-2007: visualization and classification. In Fig. 3, we compare the embeddings of t-SNE and unsupervised KDR on the full USPS 2007 data set. The data set has many easily confusable pairs of images. Both t-SNE and unsupervised KDR lead to visually appealing clustering of data. In the UKDR framework, using an RBN transformation to parameterize the embedding performs slightly better than using the RSF transformation. 7 M 2 3 5 10 20 50 UKDR 11.1 11.6 9.6 9.5 8.8 7.8 t-SNE 19.8 16.8 19.3 8.4 8.2 8.1 PCA 49.3 42.2 21.5 10.03 6.7 6.6 Table 1: Classification errors on the USPS-2007 data set with different dimensionality reduction techniques. Finally, as another way to assess the quality of the low-dimensional embeddings discovered by these methods, we used these embeddings as inputs to supervised classifiers. The classifier we used was the large-margin nearest-neighbor classifier of [30]. We split the 2007 images into 70% for training and 30% for testing and reporting classification errors. We repeated the random split 50 times and report averaged errors. The results are displayed in table 1 where PCA acts as a baseline. There are several notable findings. First, with very few dimensions (up to and including 5), our UKDR method outperforms both t-SNE and PCA significantly. As the dimensionality goes up, t-SNE starts to perform better than our method but only marginally. PCA is expected to perform well with very high dimensionality as it recovers pairwise distances the best. The superior classification performance by our method is highly desirable when the target dimensionality is very much constrained. −0.05 0 0.05 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 1 2 3 4 5 6 7 8 9 0 (a) RBN UKDR −5 0 5 −4 −3 −2 −1 0 1 2 3 1 2 3 4 5 6 7 8 9 10 (b) RSF UKDR −100 −50 0 50 100 −100 −50 0 50 100 1 2 3 4 5 6 7 8 9 0 (c) t-SNE Figure 3: Embeddings of the USPS-2007 data set by our nonlinear UKDR approach and by t-SNE. Both methods separate all classes reasonably well. However, using these embeddings as inputs to classifiers suggests that the embedding by nonlinear UKDR is of higher quality. 5 Conclusions We propose a novel technique for unsupervised dimensionality reduction. Our approach is based on kernel dimension reduction. The algorithm identifies low-dimensional representations of input data by optimizing independence measures computed in a reproducing kernel Hilbert space. We study empirically and contrast the performance of our method to that of state-of-the-art approaches. We show that our method yield meaningful and appealing clustering patterns of data. When used for classification, it also leads to significantly lower misclassification. Acknowledgements This work is partially supported by NSF Grant IIS-0957742 and DARPA N10AP20019. F.S. also benefited from discussions with J.P. Zhang, under Fudan University Key Laboratory Senior Visiting Scholar Program. References [1] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323, 2000. [2] J. B. Tenenbaum, V. Silva, and J. C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319, 2000. [3] C. M. Bishop, M. Svens´en, and C. K. I. Williams. GTM: the generative topographic mapping. Neural Computation, 10:215–234, 1998. 8 [4] N. D. Lawrence. Gaussian process latent variable models for visualisation of high dimensional data. In Advances in Neural Information Processing Systems 16, pages 329–336. MIT Press, 2004. [5] R. D. Cook and X. Yin. Dimension reduction and visualization in discriminant analysis (with discussion). Australian & New Zealand Journal of Statistics, 43:147–199, 2001. [6] K. C. Li. Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86:316–327, 1991. [7] K. Fukumizu, F. R. Bach, and M. I. Jordan. Kernel dimension reduction in regression. The Annals of Statistics, 37:1871–1905, 2009. [8] J. Nilsson, F. Sha, and M. I. Jordan. Regression on manifolds using kernel dimension reduction. In Proceedings of the 24th International Conference on Machine Learning, pages 697–704. ACM, 2007. [9] K.-C. Li. On principal Hessian directions for data visualization and dimension reduction: another application of Stein’s lemma. Journal of the American Statistical Association, 86:316–342, 1992. [10] A. Shyr, R. Urtasun, and M. I. Jordan. Sufficient dimensionality reduction for visual sequence classification. In Proceedings of Twenty-third IEEE Conference on Computer Vision and Pattern Recognition, pages 3610–3617, 2010. [11] Q. Wu, S. Mukherjee, and F. Liang. Localized sliced inverse regression. In Advances in Neural Information Processing Systems 21, pages 1785–1792. MIT Press, 2009. [12] C. M. Bishop et al. Pattern recognition and machine learning. Springer New York, 2006. [13] N. Tishby, F. C. Pereira, and W. Bialek. The information bottleneck method. In Proceedings of the 37th Annual Allerton Conference on Communication, Control, and Computing, pages 368–377, 1999. [14] G. Hinton and S. Roweis. Stochastic neighbor embedding. Advances in Neural Information Processing Systems 15, pages 857–864, 2003. [15] L. van der Maaten and G. Hinton. Visualizing data using t-SNE. The Journal of Machine Learning Research, 9:2579–2605, 2008. [16] A. Gretton, R. Herbrich, A. Smola, O. Bousquet, and B. Sch¨olkopf. Kernel methods for measuring independence. The Journal of Machine Learning Research, 6:2075–2129, 2005. [17] F. R. Bach and M. I. Jordan. Kernel independent component analysis. The Journal of Machine Learning Research, 3:1–48, 2003. [18] L. Song, A. Smola, A. Gretton, and K. M. Borgwardt. A dependence maximization view of clustering. In Proceedings of the 24th International Conference on Machine Learning, pages 815–822. ACM, 2007. [19] L. Song, A. Smola, A. Gretton, K. M. Borgwardt, and J. Bedo. Supervised feature selection via dependence estimation. In Proceedings of the 24th International Conference on Machine Learning, pages 823–830. ACM, 2007. [20] L. Song, A. Smola, K. Borgwardt, and A. Gretton. Colored maximum variance unfolding. Advances in Neural Information Processing Systems 20, pages 1385–1392, 2008. [21] K. Fukumizu, F. R. Bach, and M. I. Jordan. Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. The Journal of Machine Learning Research, 5:73–99, 2004. [22] K. P. Adragni and R. D. Cook. Sufficient dimension reduction and prediction in regression. Philosophical Transactions A, 367:4385–4405, 2009. [23] N., J. Kandola, A. Elisseeff, and J. Shawe-Taylor. On kernel-target alignment. In Advances in Neural Information Processing Systems 14, pages 367–373. MIT Press, 2002. [24] C. K. I. Williams. Computation with infinite neural networks. Neural Computation, 10:1203–1216, 1998. [25] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems 20, pages 1177–1184. MIT Press, 2008. [26] Y. Cho and L. Saul. Kernel methods for deep learning. In Advances in Neural Information Processing Systems 22, pages 342–350. MIT Press, 2009. [27] C. Berg, J. P. R. Christensen, and P. Ressel. Harmonic Analysis on Semigroups. Springer Verlag, 1984. [28] A. Edelman, T. A. Arias, and S. T. Smith. The geometry of algorithms with orthogonality constraints. SIAM J. Matrix Anal. Appl, 20:303–353, 1998. [29] B. Nadler, S. Lafon, R. Coifman, and I. G. Kevrekidis. Diffusion maps, spectral clustering and eigenfunctions of Fokker-Planck operators. In Advances in Neural Information Processing Systems 18, pages 955–962. MIT Press, 2005. [30] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. The Journal of Machine Learning Research, 10:207–244, 2009. 9
2010
213
3,981
Multitask Learning without Label Correspondences Novi Quadrianto1, Alex Smola2, Tib´erio Caetano1, S.V.N. Vishwanathan3, James Petterson1 1 SML-NICTA & RSISE-ANU, Canberra, ACT, Australia 2 Yahoo! Research, Santa Clara, CA, USA 3 Purdue University, West Lafayette, IN, USA Abstract We propose an algorithm to perform multitask learning where each task has potentially distinct label sets and label correspondences are not readily available. This is in contrast with existing methods which either assume that the label sets shared by different tasks are the same or that there exists a label mapping oracle. Our method directly maximizes the mutual information among the labels, and we show that the resulting objective function can be efficiently optimized using existing algorithms. Our proposed approach has a direct application for data integration with different label spaces, such as integrating Yahoo! and DMOZ web directories. 1 Introduction In machine learning it is widely known that if several tasks are related, then learning them simultaneously can improve performance [1–4]. For instance, a personalized spam classifier trained with data from several different users is likely to be more accurate than one that is trained with data from a single user. If one views learning as the task of inferring a function f from the input space X to the output space Y, then multitask learning is the problem of inferring several functions fi : Xi 7→Yi simultaneously. Traditionally, one either assumes that the set of labels Yi for all the tasks are the same (that is, Yi = Y for all i), or that we have access to an oracle mapping function gi,j : Yi 7→Yj. However, as we argue below, in many natural settings these assumptions are not satisfied. Our motivating example is the problem of learning to automatically categorize objects on the web into an ontology or directory. It is well established that many web-related objects such as web directories and RSS directories admit a (hierarchical) categorization, and web directories aim to do this in a semi-automated fashion. For instance, it is desirable, when building a categorizer for the Yahoo! directory1, to take into account other web directories such as DMOZ2. Although the tasks are clearly related, their label sets are not identical. For instance, some section heading and sub-headings may be named differently in the two directories. Furthermore, different editors may have made different decisions about the ontology depth and structure, leading to incompatibilities. To make matters worse, these ontologies evolve with time and certain topic labels may die naturally due to lack of interest or expertise while other new topic labels may be added to the directory. Given the large label space, it is unrealistic to expect that a label mapping function is readily available. However, the two tasks are clearly related and learning them simultaneously is likely to improve performance. This paper presents a method to learn classifiers from a collection of related tasks or data sets, in which each task has its own label dictionary, without constructing an explicit label mapping among them. We formulate the problem as that of maximizing mutual information among the labels sets. We then show that this maximization problem yields an objective function which can be written as a difference of concave functions. By exploiting convex duality [5], we can solve the resulting optimization problem efficiently in the dual space using existing DC programming algorithms [6]. 1http://dir.yahoo.com/ 2http://www.dmoz.org/ 1 Related Work As described earlier, our work is closely related to the research efforts on multitask learning, where the problem of simultaneously learning multiple related tasks is addressed. Several papers have empirically and theoretically highlighted the benefits of multitask learning over singletask learning when the tasks are related. There are several approaches to define task relatedness. The works of [2, 7, 8] consider the setting when the tasks to be learned jointly share a common subset of features. This can be achieved by adding a mixed-norm regularization term that favors a common sparsity profile in features shared by all tasks. Task relatedness can also be modeled as learning functions that are close to each other in some sense [3, 9]. Crammer et al. [10] consider the setting where, in addition to multiple sources of data, estimates of the dissimilarities between these sources are also available. There is also work on data integration via multitask learning where each data source has the same binary label space, whereas the attributes of the inputs can admit different orderings as well as be linearly transformed [11]. The remainder of the paper is organized as follows. We briefly develop background on the maximum entropy estimation problem and its dual in Section 2. We introduce in Section 3 the novel multitask formulation in terms of a mutual information maximization criterion. Section 4 presents the algorithm to solve the optimization problem posed by the multitask problem. We then present the experimental results, including applications on news articles and web directories data integration, in Section 5. Finally, in Section 6 we conclude the paper. 2 Maximum Entropy Duality for Conditional Distributions Here we briefly summarize the well known duality relation between approximate conditional maximum entropy estimation and maximum a posteriori estimation (MAP) [5, 12]. We will exploit this in Section 4. Recall the definition of the Shannon entropy, H(y|x) := −P y p(y|x) log p(y|x), where p(y|x) is a conditional distribution on the space of labels Y. Let x ∈X and assume the existence of φ(x, y) : X × Y 7→H, a feature map into a Hilbert space H. Given a data set (X, Y ) := {(x1, y1) , . . . , (xm, ym)}, where X := {x1, . . . , xm}, define Ey∼p(y|X) [φ(X, y)] := 1 m m X i=1 Ey∼p(y|xi) [φ(xi, y)] , and µ = 1 m m X i=1 φ(xi, yi). (1) Lemma 1 ([5], Lemma 6) With the above notation we have min p(y|x) m X i=1 −H(y|xi) s.t. Ey∼p(y|X) [φ(X, y)] −µ H ≤ϵ and X y∈Y p(y|xi) = 1 (2a) = max θ ⟨θ, µ⟩H − m X i=1 log X y exp(⟨θ, φ(xi, y)⟩) −ϵ ∥θ∥H . (2b) Although we presented a version of the above theorem using Hilbert spaces, it can also be extended to Banach spaces. Choosing different Banach space norms recovers well known algorithms such as ℓ1 or ℓ2 regularized logistic regression. Also note that by enforcing the moment matching constraint exactly, that is, setting ϵ = 0, we recover the well-known duality between maximum (Shannon) entropy and maximum likelihood (ML) estimation. 3 Multitask Learning via Mutual Information For the purpose of explaining our basic idea, we focus on the case when we want to integrate two data sources such as Yahoo! directory and DMOZ. Associated with each data source are labels Y = {y1, . . . , yc} ⊆Y and observations X = {x1, . . . , xm} ⊆X (resp. Y ′ = {y′ 1, . . . , y′ c′} ⊆Y′ and X′ = {x′ 1, . . . , x′ m′} ⊆X′). The observations are disjoint but we assume that they are drawn from the same domain, i.e., X = X′ (in our running example they are webpages). If we are interested to solve each of the categorization tasks independently, a maximum entropy estimator described in Section 2 can be readily employed [13]. Here we would like to learn the 2 two tasks simultaneously in order to improve classification accuracy. Assuming that the labels are different yet correlated we should assume that the joint distribution p(y, y′) displays high mutual information between y and y′. Recall that the mutual information between random variables y and y′ is defined as I(y, y′) = H(y) + H(y′) −H(y, y′), and that this quantity is high when the two variables are mutually dependent. To illustrate this, consider in our running example of integrating Yahoo! and DMOZ web directories, we would expect there is a high mutual dependency between section heading ‘Computer & Internet’ at Yahoo! directory and ‘Computers’ at DMOZ directory although they are named somewhat slightly different. Since the marginal distributions over the labels, p(y) and p(y′) are fixed, maximizing mutual information can then be viewed as minimizing the joint entropy H(y, y′) = − X y,y′ p(y, y′) log p(y, y′). (3) This reasoning leads us to adding the joint entropy as an additional term for the objective function of the multitask problem. If we define µ = 1 m m X i=1 φ(xi, yi) and µ′ = 1 m′ m′ X i=1 φ(x′ i, y′ i), (4) then we have the following objective function maximize p(y|x) m X i=1 H(y|xi) + m′ X i=1 H(y′|x′ i) −λH(y, y′) for some λ > 0 (5a) s.t. Ey∼p(y|X) [φ(X, y)] −µ ≤ϵ and X y∈Y p(y|xi) = 1 (5b) Ey′∼p(y′|X′) [φ′(X′, y′)] −µ′ ≤ϵ′ and X y′∈Y′ p(y′|x′ i) = 1. (5c) Intuitively, the above objective function tries to find a ‘simple’ distribution p which is consistent with the observed samples via moment matching constraints while also taking into account task relatedness. We can recover the single task maximum entropy estimator by removing the joint entropy term (by setting λ = 0), since the optimization problem (the objective functions as well as the constraints) in (5) will be decoupled in terms of p(y|x) and p(y′|x′). There are two main challenges in solving (5): • The joint entropy term H(y, y′) is concave, hence the above objective of the optimization problem is not concave in general (it is the difference of two concave functions). We therefore propose to solve this non-concave problem using DC programming [6], in particular the concave convex procedure (CCCP) [14, 15]. • The joint distribution between labels p(y, y′) is unknown. We will estimate this quantity (therefore the joint entropy quantity) from the observations x and x′. Further, we assume that y and y′ are conditionally independent given an arbitrary input x ∈X, that is p(y, y′|x) = p(y|x)p(y′|x). For instance, in our example, annotations made by an editor at Yahoo! and an editor at DMOZ on the set of webpages are assumed conditionally independent given the set of webpages. This assumption essentially means that the labeling process depends entirely on the set of webpages, i.e., any other latent factors that might connect the two editors are ignored. In the following section we discuss in further detail how to address these two challenges, as well as the resulting optimization problem obtained, which can be solved efficiently by existing convex solvers. 4 Optimization The concave convex procedure (CCCP) works as follow: for a given function f(x) = g(x) −h(x), where g is concave and −h is convex, a lower bound can be found by f(x) ≥g(x) −h(x0) −⟨∂h(x0), x −x0⟩. (6) 3 This lower bound is concave and can be maximized effectively over a convex domain. Subsequently one finds a new location x0 and the entire procedure is repeated. This procedure is guaranteed to converge to a local optimum or saddle point [16]. Therefore, one potential approach to solve the optimization problem in (5) is to use successive linear lower bounds on H(y, y′) and to solve the resulting decoupled problems in p(y|x) and p(y′|x′) separately. We estimate the joint entropy term H(y, y′) by its empirical quantity on x and x′ with the conditional independence assumption (in the sequel, we make the dependency of p(y|x) on a parameter θ explicit and similarly for the dependency of p(y′|x′) on θ′), that is H(y, y′|X) = − X y,y′ " 1 m m X i=1 p(y|xi, θ)p(y′|xi, θ′) # log  1 m m X j=1 p(y|xj, θ)p(y′|xj, θ′)  , (7) and similarly for H(y, y′|X′). Each iteration of CCCP approximates the convex part (negative joint entropy) by its tangent, that is ⟨∂h(x0), x⟩in (6). Therefore, taking derivatives of the joint entropy with respect to p(y|xi) and evaluating at parameters at iteration t −1, denoted as θt−1 and θ′ t−1, yields gy(xi) := −∂p(y|xi)H(y, y′|X) (8) = 1 m X y′  1 + log 1 m m X j=1 p(y|xj, θt−1)p(y′|xj, θ′ t−1)  p(y′|xi, θ′ t−1). (9) Define similarly gy(x′ i), gy′(xi), and gy′(x′ i) for the derivative with respect to p(y|x′ i), p(y′|xi) and p(y′|x′ i), respectively. This leads, by optimizing the lower bound in (6), to the following decoupled optimization problems in p(y|xi) and an analogous problem in p(y′|x′ i): min p(y|x) m X i=1 " −H(y|xi) + λ X y gy(xi)p(y|xi) # + m′ X i=1 " −H(y|x′ i) + λ′ X y gy(x′ i)p(y|x′ i) # (10a) subject to Ey∼p(y|X)[φ(X, y)] −µ ≤ϵ. (10b) The above objective function is still in the form of maximum entropy estimation, with the linearization of the joint entropy quantities acting like additional evidence terms. Furthermore, we also impose an additional maximum entropy requirement on the ‘off-set’ observations p(y|x′ i), as after all we also want the ‘simplicity’ requirement of the distribution p on the input x′ i. We can of course weigh the requirement on ‘off-set’ observations differently. While we succeed in reducing the non-concave objective function in (5) to a decoupled concave objective function in (10), it might be desirable to solve the problem in the dual space due to difficulty in handling the constraint in (10b). The following lemma shows the duality of the objective function in (10). The proof is given in the supplementary material. Lemma 2 The corresponding Fenchel’s dual of (10) is min θ m X i=1 log X y exp(⟨θ, φ(xi, y)⟩−λgy(xi)) + m′ X i=1 log X y exp(⟨θ, φ(x′ i, y)⟩−λ′gy(x′ i)) −1 m m X i=1 ⟨θ, φ(xi, yi)⟩+ ϵ ∥θ∥ℓ2 (11) The above dual problem still has the form of logistic regression with the additional evidence terms from task relatedness appearing in the log-partition function. Several existing convex solvers can be used to solve the optimization problem in (11) efficiently. Refer to Algorithm 1 for a pseudocode of our proposed method. Initialization For each iteration of CCCP, the linearization part of the joint entropy function requires the value of θ and θ′ at the previous iteration (refer to (9)). At the beginning of the iteration, we can start the algorithm with a uniform prior, i.e. set p(y) = 1/|Y| and p(y′) = 1/|Y′|. 4 Algorithm 1 Multitask Mutual Information Input: Datasets (X, Y ) and (X′, Y ′) with Y ̸= Y′, number of iterations N Output: θ, θ′ Initialize p(y) = 1/|Y| and p(y′) = 1/|Y′| for t = 1 to N do Solve the dual problem in (11) w.r.t. p(y|x, θ) and obtain θt Solve the dual problem in (11) w.r.t. p(y′|x′, θ′) and obtain θ′ t end for return θ ←θN, θ′ ←θ′ N 5 Experiments To assess the performance of our proposed multitask algorithm, we perform binary n-task (n ∈ {3, 5, 7, 10}) experiments on MNIST digit dataset and a multiclass 2-task experiment on the Reuters1-v2 dataset plus an application on integrating Yahoo! and DMOZ web directory. We detail those experiments in turn in the following sections. 5.1 MNIST Datasets MNIST data set3 consists of 28 × 28-size images of hand-written digits from 0 through 9. We use a small sample of the available training set to simulate the situation when we only have limited number of labeled examples and test the performance on the entire available test set. In this experiment, we look at a binary n-task (n ∈{3, 5, 7, 10}) problem. We consider digits {8, 9, 0}, {6, 7, 8, 9, 0}, {4, 5, 6, 7, 8, 9, 0} and {1, 2, 3, 4, 5, 6, 7, 8, 9, 0} for the 3-task, 5-task, 7-task and 10task, respectively. To simulate the problem that we have distinct label dictionaries for each task, we consider the following setting: in the 3-task problem, the first task has binary labels {+1, −1}, where label +1 means digit 8 and label −1 means digit 9 and 0; in the second task, label +1 means digit 9 and label −1 means digit 8 and 0; lastly in the third task, label +1 means digit 0 and label −1 means digit 8 and 9. Similar one-against-rest grouping is also used for 5-task, 7-task and 10-task problems. Each of the tasks has its own input x. Algorithms We couldn’t find in the literature of multitask learning methods addressing the same problem as the one we study: learn multiple tasks when there is no correspondence between the output spaces. Therefore we compared the performance of our multitask method against the baseline given by the maximum entropy estimator applied to each of the tasks independently. Note that we focus on the setting in which data sources have disjoint sets of covariate observations (vide Section 3) and thus a simple strategy of multilabel prediction with union of label sets corresponds to our baseline. For both ours and the baseline method, we use a Gaussian kernel to define the implicit feature map on the inputs. The width of the kernel was set to the median between pairs of observations, as suggested in [17]. The regularization parameter was tuned for the single task estimator and the same value was used for the multitask. The weight on the joint entropy term was set to be equal to 1. Pairwise Label Correlation Section 3 describes the multitask objective function for the case of the 2-task problem. For the case when the number of tasks to be learned jointly is greater than 2, we experiment in two different ways: in one approach we can define the joint entropy term on the full joint distribution, that is when we want to learn jointly 3 different tasks having label y, y′ and y′′, we can then define the joint entropy as H(y, y′, y′′) = −P y,y′,y′′ p(y, y′, y′′) log p(y, y′, y′′). As more computationally efficient way, we can consider the joint entropy on the pairwise distribution instead. We found that the performance of our method is quite similar for the two cases and we report results only on the pairwise case. Results The experiments are repeated for 10 times and the results are summarized in Table 1. We find that, on average, jointly learning the multiple related tasks always improves the classification 3http://yann.lecun.com/exdb/mnist 5 Table 1: Performance assessment, Accuracy ± STD. m(m′) denotes the number of training data points (number of test points). STL: single task learning; MTL: multi task learning and Upper Bound: multi class learning. Boldface indicates a significance difference between STL and MTL (one-sided paired Welch t-test with 99.95% confidence level). Tasks m (m’) STL MTL Upper Bound 8 \-8 15 (2963) 77.39±5.23 80.03±4.83 93.42±0.87 9 \-9 15 (2963) 91.12±5.94 91.96±5.42 95.99±0.75 0 \-0 120 (2963) 98.66±0.67 98.21±0.92 98.79±0.25 Average 89.06 90.07 96.07 6 \-6 25 (4949) 81.79±10.18 83.86±9.51 96.37±1.06 7 \-7 25 (4949) 70.73±16.58 72.84±15.77 91.99±2.23 8 \-8 25 (4949) 62.52±10.15 66.77±9.43 92.05±1.76 9 \-9 25 (4949) 63.80±13.70 67.26±12.65 92.53±1.65 0 \-0 150 (4949) 97.35±1.33 96.60±1.64 97.59±0.62 Average 75.84 77.47 94.10 4 \-4 70 (6823) 71.69±6.83 73.49±6.77 91.20±1.55 5 \-5 70 (6823) 67.55±4.70 70.10±4.61 89.30±0.34 6 \-6 70 (6823) 86.31±2.93 87.21±2.77 94.03±0.95 7 \-7 70 (6823) 83.34±3.54 84.02±3.69 91.94±0.90 8 \-8 70 (6823) 75.61±6.00 76.97±5.12 87.46±1.69 9 \-9 70 (6823) 63.69±11.42 65.74±10.15 86.89±1.79 0 \-0 210 (6823) 97.20±1.49 96.56±1.67 97.24±0.73 Average 77.91 79.16 91.15 1 \-1 100 (10000) 96.59±2.11 96.80±1.91 96.89±0.59 2 \-2 100 (10000) 67.77±3.49 69.95±2.68 88.74±1.94 3 \-3 100 (10000) 72.59±5.90 74.18±5.54 87.59±2.95 4 \-4 100 (10000) 69.91±5.82 71.76±5.47 92.87±0.94 5 \-5 100 (10000) 53.78±2.78 57.26±2.72 85.71±1.38 6 \-6 100 (10000) 79.22±5.21 80.54±4.53 92.93±0.98 7 \-7 100 (10000) 76.57±10.2 77.18±9.43 89.83±1.24 8 \-8 100 (10000) 63.57±2.65 65.85±2.50 83.51±0.63 9 \-9 100 (10000) 63.28±6.69 65.38±6.09 84.94±1.45 0 \-0 300 (10000) 98.43±0.84 97.81±1.01 98.49±0.40 Average 74.17 75.67 90.82 accuracy. When assessing the performance on each of the tasks, we notice that the advantage of learning jointly is particularly significant for those tasks with smaller number of observations. 5.2 Ontology News Ontologies In this experiment, we consider multiclass learning in a 2-task problem. We use the Reuters1-v2 news article dataset [18] which has been pre-processed4. In the pre-processing stage, the label hierarchy is reorganized by mapping the data set to the second level of topic hierarchy. The documents that only have labels of the third or fourth levels are mapped to their parent category of the second level. The documents that only have labels of the first level are not mapped onto any category. Lastly any multi-labelled instances are removed. The second level hierarchy consists of 53 categories and we perform experiments on the top 10 categories. TF-IDF features are used, and the dictionary size (feature dimension) is 47236. For this experiment, we use 12500 news articles to form one set of data and another 12500 news article to form the second set of data. In the first set, we group the news articles having the label {1, 2}, {3, 4}, {5, 6}, {7, 8} and {9, 10} and re-label it as {1, 2, 3, 4, 5}. For the second set of data, it also has 5 labels but this time the labels are 4http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/multiclass.html 6 Table 2: Yahoo! Top Level Categorization Results. STL: single task learning accuracy; MTL: multi task learning accuracy; % Imp.: relative performance improvement. The highest relative improvement at Yahoo! is for the topic of ‘Computer & Internet’, i.e. there is an increase in accuracy from 48.12% to 52.57%. Interestingly, DMOZ has a similar topic but was called ‘Computers’ and it achieves accuracy of 75.72%. Topic MTL/STL (% Imp.) Topic MTL/STL (% Imp.) Arts 56.27/55.11 (2.10) News & Media 15.23/14.83 (1.03) Business & Economy 66.52/66.88 (-0.53) Recreation 68.81/67.00 (2.70) Computer & Internet 52.57/48.12 (9.25) Reference 26.65/24.81 (7.42) Education 62.48/63.02 (-0.85) Regional 62.85/61.86 (1.60) Entertainment 63.30/61.37 (3.14) Science 78.58/79.75 (-1.46) Government 24.44/22.88 (6.82) Social Science 31.55/30.68 (2.84) Health 85.42/85.27 (1.76) Society & Culture 49.51/49.05 (0.94) Table 3: DMOZ Top Level Categorization Results. STL: single task learning accuracy; MTL: multi task learning accuracy; % Imp.: relative performance improvement. The improvement of multitask to single task on each topic is negligible for DMOZ web directories. Arguably, this can be partly explained as DMOZ has higher average topic categorization accuracy than Yahoo! and there might be more knowledge to be shared from DMOZ to Yahoo! than vice versa. Topic MTL/STL (% Imp.) Topic MTL/STL (% Imp.) Arts 57.52/57.84 (-0.5) Reference 67.42/67.42 (0) Business 54.02/53.05 (1.83) Regional 28.59/28.56 (0.10) Computers 75.08/75.72 (-0.8) Science 42.67/42.09 (1.38) Games 78.58/78.58 (0) Shopping 75.20/74.62 (0.54) Health 82.34/82.55 (-0.14) Society 57.68/58.20 (-0.89) Home 67.47/67.47 (0) Sports 83.49/83.53 (-0.05) News 61.70/62.01 (-0.49) World 87.80/87.57 (0.26) Recreation 58.04/58.25 (-0.36) generated by {1, 6}, {2, 7}, {3, 8}, {4, 9} and {5, 10} grouping. We split equally the news articles on each set to form training and test sets. We run a maximum entropy estimator independently, p(y|x, θ) and p(y′|x′, θ′) , on the two sets achieving accuracy of 92.59% for the first set and 91.53% for the second set. We then learn the two sets of the news articles jointly and in the first test set, we achieve accuracy of 93.81%. For the second test set, we achieve an accuracy of 93.31%. This experiment further emphasizes that it is possible to learn several related tasks simultaneously even though they have different label sets and it is beneficial to do so. Web Ontologies We also perform an experiment on the data integration of Yahoo! and DMOZ web directories. We consider the top level of the Yahoo!’s topic tree and sample web links listed in the directory. Similarly we also consider the top level of the DMOZ topic tree and retrieve sampled web links. We consider the content of the first page of each web link as our input data. It is possible that the first page that is being linked from the web directory contain mostly images (for the purpose of attracting visitors), thus we only consider those webpages that have enough texts to be a valid input. This gives us 19186 webpages for Yahoo! and 35270 for DMOZ. For the sake of getting enough texts associated with each link, we can actually crawl many more pages associated with the link. However, we find that it is quite damaging to do so because as we crawl deeper the topic of the texts are rapidly changing. We use the standard bag-of-words representation with TF-IDF weighting as our features. The dictionary size (feature dimension) is 27075. We then use 2000 web pages from Yahoo! and 2000 pages from DMOZ as training sets and the remainder as test sets. Table 2 and 3 summarize the experimental results. 7 From the experimental results on web directories integration, we observe the following: • Similarly to the experiments on MNIST digits and Reuters1-v2 news articles, multitask learning always helps on average, i.e. the average relative improvements are positive for both Yahoo! and DMOZ web directories; • The improvement of multitask to single task on each topic is more prominent for Yahoo! web directories and is negligible for DMOZ web directories (2.62% and 0.07%, respectively). Arguably, this can be partly explained as Yahoo! has lower average topic categorization accuracy than DMOZ (c.f. 60.22% and 64.68 %, respectively). It seems that there is much more knowledge to be shared from DMOZ to Yahoo! in the hope to increase the latter’s classification accuracies; • Looking closely at accuracy at each topic, the highest relative improvement at Yahoo! is for the topic of ‘Computer & Internet’, i.e. there is an increase in accuracy from 48.12% to 52.57%. Interestingly, DMOZ has a similar topic but was called ‘Computers’ and it achieves accuracy of 75.72%. The improvement might be partly because our proposed method is able to discover the implicit label correlations despite the two topics being named differently; • Regarding the worst classified categories, we have ‘News & Media’ for Yahoo! and ‘Regional’ for DMOZ. This is intuitive since those two topics can indeed cover a wide range of subjects. The easiest category to be classified is ‘Health’ for Yahoo! and ‘World’ for DMOZ. As well, this is quite intuitive as the world of health contains mostly specific jargon and the world of world has much language-specific webpage content. 6 Discussion and Conclusion We presented a method to learn classifiers from a collection of related tasks or data sets, in which each task has its own label set. Our method works without the need of an explicit mapping between the label spaces of the different tasks. We formulate the problem as one of maximizing the mutual information among the label sets. Our experiments on binary n-task (n ∈{3, 5, 7, 10}) and multiclass 2-task problems revealed that, on average, jointly learning the multiple related tasks, albeit with different label sets, always improves the classification accuracy. We also provided experiments on a prototypical application of our method: classifying in Yahoo! and DMOZ web directories. Here we deliberately used small amounts of data–a common situation in commercial tagging and classification. This shows that classification accuracy of Yahoo! significantly increased. Given that DMOZ classification was already 4.5% better prior to the application of our method, this shows the method was able to transfer classification accuracy from the DMOZ task to the Yahoo! task. Furthermore, the experiments seem to suggest that our proposed method is able to discover implicit label correlations despite the lack of label correspondences. Although the experiments on web directories integration is encouraging, we have clearly only touched the surface of possibilities to be explored. While we focused on the categorization at the top level of the topic tree, it might be beneficial (and further highlight the usefulness of multitask learning, as observed in [2–4, 9]) to consider categorization at deeper levels (take for example the second level of the tree), where we have much fewer observations for each category. In the extreme case, we might consider the labels as corresponding to a directed acyclic graph (DAG) and encode the feature map associated with the label hierarchy accordingly. One instance as considered in [19] is to use a feature map φ(y) ∈Rk for k nodes in the DAG (excluding the root node) and associate with every label y the vector describing the path from the root node to y, ignoring the root node itself. Furthermore, the application of data integration which admit a hierarchical categorization goes beyond web related objects. With our method, it is also now possible to learn classifiers from a collection of related gene-ontology graphs [20] or patent hierarchies [19]. Acknowledgments NICTA is funded by the Australian Government as represented by the Department of Broadband, Communications and the Digital Economy and the Australian Research Council through the ICT Centre of Excellence program. N. Quadrianto is partly supported by Microsoft Research Asia Fellowship. 8 References [1] R. Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [2] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Mach. Learn., 73(3):243–272, 2008. [3] Kai Yu, Volker Tresp, and Anton Schwaighofer. Learning gaussian processes from multiple tasks. In ICML ’05: Proceedings of the 22nd international conference on Machine learning, pages 1012–1019, New York, NY, USA, 2005. ACM. [4] Rie Kubota Ando and Tong Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6:1817–1853, 2005. [5] Y. Altun and A.J. Smola. Unifying divergence minimization and statistical inference via convex duality. In H.U. Simon and G. Lugosi, editors, Proc. Annual Conf. Computational Learning Theory, LNCS, pages 139–153. Springer, 2006. [6] T. Pham Dinh and L. Hoai An. A D.C. optimization algorithm for solving the trust-region subproblem. SIAM Journal on Optimization, 8(2):476–505, 1988. [7] G. Obozinski, B. Taskar, and M. I. Jordan. Multi-task feature selection. Technical report, U.C. Berkeley, 2007. [8] Remi Flamary, Alain Rakotomamonjy, Gilles Gasso, and Stephane Canu. Svm multi-task learning and non convex sparsity measure. In The Learning Workshop, 2009. [9] Theodoros Evgeniou, Charles A. Micchelli, and Massimiliano Pontil. Learning multiple tasks with kernel methods. J. Mach. Learn. Res., 6:615–637, 2005. [10] K. Crammer, M. Kearns, and J. Wortman. Learning from multiple sources. In NIPS 19, pages 321–328. MIT Press, 2007. [11] Shai Ben-David, Johannes Gehrke, and Reba Schuller. A theoretical framework for learning from a pool of disparate data sources. In KDD ’02: Proceedings of the 8th ACM international conference on Knowledge discovery and data mining, pages 443–449. ACM, 2002. [12] M. Dud´ık and R. E. Schapire. Maximum entropy distribution estimation with generalized regularization. In G´abor Lugosi and Hans U. Simon, editors, Proc. Annual Conf. Computational Learning Theory. Springer Verlag, June 2006. [13] Nadia Ghamrawi and Andrew McCallum. Collective multi-label classification. In CIKM ’05: Proceedings of the 14th ACM international conference on Information and knowledge management, pages 195–200, New York, NY, USA, 2005. ACM. [14] A.L. Yuille and A. Rangarajan. The concave-convex procedure. Neural Computation, 15:915– 936, 2003. [15] A. J. Smola, S. V. N. Vishwanathan, and T. Hofmann. Kernel methods for missing variables. In R.G. Cowell and Z. Ghahramani, editors, Proceedings of International Workshop on Artificial Intelligence and Statistics, pages 325–332, 2005. [16] Bharath Sriperumbudur and Gert Lanckriet. On the convergence of the concave-convex procedure. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1759–1767. MIT Press, 2009. [17] B. Sch¨olkopf. Support Vector Learning. R. Oldenbourg Verlag, Munich, 1997. Download: http://www.kernel-machines.org. [18] David D. Lewis, Yiming Yang, Tony G. Rose, and Fan Li. RCV1: A new benchmark collection for text categorization research. The Journal of Machine Learning Research, 5:361–397, 2004. [19] Lijuan Cai and T. Hofmann. Hierarchical document categorization with support vector machines. In Proceedings of the Thirteenth ACM conference on Information and knowledge management, pages 78–87, New York, NY, USA, 2004. ACM Press. [20] M. Ashburner, C. A. Ball, J. A. Blake, D. Botstein, H. Butler, J. M. Cherry, A. P. Davis, K. Dolinski, S. S. Dwight, J. T. Eppig, M. A. Harris, D. P. Hill, L. Issel-Tarver, A. Kasarskis, S. Lewis, J. C. Matese, J. E. Richardson, M. Ringwald, G. M. Rubin, and G. Sherlock. Gene ontology: tool for the unification of biology. the gene ontology consortium. Nat Genet, 25:25– 29, 2000. [21] J. M. Borwein and Q. J. Zhu. Techniques of Variational Analysis. CMS books in Mathematics. Canadian Mathematical Society, 2005. 9
2010
214
3,982
CUR from a Sparse Optimization Viewpoint Jacob Bien∗ Department of Statistics Stanford University Stanford, CA 94305 jbien@stanford.edu Ya Xu∗ Department of Statistics Stanford University Stanford, CA 94305 yax.stanford@gmail.com Michael W. Mahoney Department of Mathematics Stanford University Stanford, CA 94305 mmahoney@cs.stanford.edu Abstract The CUR decomposition provides an approximation of a matrix X that has low reconstruction error and that is sparse in the sense that the resulting approximation lies in the span of only a few columns of X. In this regard, it appears to be similar to many sparse PCA methods. However, CUR takes a randomized algorithmic approach, whereas most sparse PCA methods are framed as convex optimization problems. In this paper, we try to understand CUR from a sparse optimization viewpoint. We show that CUR is implicitly optimizing a sparse regression objective and, furthermore, cannot be directly cast as a sparse PCA method. We also observe that the sparsity attained by CUR possesses an interesting structure, which leads us to formulate a sparse PCA method that achieves a CUR-like sparsity. 1 Introduction CUR decompositions are a recently-popular class of randomized algorithms that approximate a data matrix X ∈Rn×p by using only a small number of actual columns of X [12, 4]. CUR decompositions are often described as SVD-like low-rank decompositions that have the additional advantage of being easily interpretable to domain scientists. The motivation to produce a more interpretable lowrank decomposition is also shared by sparse PCA (SPCA) methods, which are optimization-based procedures that have been of interest recently in statistics and machine learning. Although CUR and SPCA methods start with similar motivations, they proceed very differently. For example, most CUR methods have been randomized, and they take a purely algorithmic approach. By contrast, most SPCA methods start with a combinatorial optimization problem, and they then solve a relaxation of this problem. Thus far, it has not been clear to researchers how the CUR and SPCA approaches are related. It is the purpose of this paper to understand CUR decompositions from a sparse optimization viewpoint, thereby elucidating the connection between CUR decompositions and the SPCA class of sparse optimization methods. To do so, we begin by putting forth a combinatorial optimization problem (see (6) below) which CUR is implicitly approximately optimizing. This formulation will highlight two interesting features of CUR: first, CUR attains a distinctive pattern of sparsity, which has practical implications from the SPCA viewpoint; and second, CUR is implicitly optimizing a regression-type objective. These two observations then lead to the three main contributions of this paper: (a) first, we formulate a non-randomized optimization-based version of CUR (see Problem 1: GL-REG in Section 3) that is based on a convex relaxation of the CUR combinatorial optimization problem; (b) second, we show that, in contrast to the original PCA-based motivation for CUR, CUR’s implicit objective cannot be directly expressed in terms of a PCA-type objective (see Theorem 3 in Section 4); and (c) third, we propose an SPCA approach (see Problem 2: GL-SPCA in Section 5) that achieves the sparsity structure of CUR within the PCA framework. We also provide a brief empirical evaluation of our two proposed objectives. While our proposed GL-REG and GL-SPCA methods are promising in and of themselves, our purpose in this paper is not to explore them as alternatives to CUR; instead, our goal is to use them to help clarify the connection between CUR and SPCA methods. ∗Jacob Bien and Ya Xu contributed equally. 1 We conclude this introduction with some remarks on notation. Given a matrix A, we use A(i) to denote its ith row (as a row-vector) and A(i) its ith column. Similarly, given a set of indices I, AI and AI denote the submatrices of A containing only these I rows and columns, respectively. Finally, we let Lcol(A) denote the column space of A. 2 Background In this section, we provide a brief background on CUR and SPCA methods, with a particular emphasis on topics to which we will return in subsequent sections. Before doing so, recall that, given an input matrix X, Principal Component Analysis (PCA) seeks the k-dimensional hyperplane with the lowest reconstruction error. That is, it computes a p × k orthogonal matrix W that minimizes ERR(W) = ||X −XWWT ||F . (1) Writing the SVD of X as UΣVT , the minimizer of (1) is given by Vk, the first k columns of V. In the data analysis setting, each column of V provides a particular linear combination of the columns of X. These linear combinations are often thought of as latent factors. In many applications, interpreting such factors is made much easier if they are comprised of only a small number of actual columns of X, which is equivalent to Vk only having a small number of nonzero elements. 2.1 CUR matrix decompositions CUR decompositions were proposed by Drineas and Mahoney [12, 4] to provide a low-rank approximation to a data matrix X by using only a small number of actual columns and/or rows of X. Fast randomized variants [3], deterministic variants [5], Nystr¨om-based variants [1, 11], and heuristic variants [17] have also been considered. Observing that the best rank-k approximation to the SVD provides the best set of k linear combinations of all the columns, one can ask for the best set of k actual columns. Most formalizations of “best” lead to intractable combinatorial optimization problems [12], but one can take advantage of oversampling (choosing slightly more than k columns) and randomness as computational resources to obtain strong quality-of-approximation guarantees. Theorem 1 (Relative-error CUR [12]). Given an arbitrary matrix X ∈Rn×p and an integer k, there exists a randomized algorithm that chooses a random subset I ⊂{1, . . ., p} of size c = O(k log k log(1/δ)/ǫ2) such that XI, the n×c submatrix containing those c columns of X, satisfies ||X −XIXI+X||F = min B∈Rc×p ||X −XIB||F ≤(1 + ǫ)||X −Xk||F , (2) with probability at least 1 −δ, where Xk is the best rank k approximation to X. The algorithm referred to by Theorem 1 is very simple: 1) Compute the normalized statistical leverage scores, defined below in (3). 2) Form I by randomly sampling c columns of X, using these normalized statistical leverage scores as an importance sampling distribution. 3) Return the n × c matrix XI consisting of these selected columns. The key issue here is the choice of the importance sampling distribution. Let the p × k matrix Vk be the top-k right singular vectors of X. Then the normalized statistical leverage scores are πi = 1 k ||Vk(i)||2 2, (3) for all i = 1, . . . , p, where Vk(i) denotes the i-th row of Vk. These scores, proportional to the Euclidean norms of the rows of the top-k right singular vectors, define the relevant nonuniformity structure to be used to identify good (in the sense of Theorem 1) columns. In addition, these scores are proportional to the diagonal elements of the projection matrix onto the top-k right singular subspace. Thus, they generalize the so-called hat matrix [8], and they have a natural interpretation as capturing the “statistical leverage” or “influence” of a given column on the best low-rank fit of the data matrix [8, 12]. 2.2 Regularized sparse PCA methods SPCA methods attempt to make PCA easier to interpret for domain experts by finding sparse approximations to the columns of V.1 There are several variants of SPCA. For example, Jolliffe et al. [10] 1For SPCA, we only consider sparsity in the right singular vectors V and not in the left singular vectors U. This is similar to considering only the choice of columns and not of both columns and rows in CUR. 2 and Witten et al. [19] use the maximum variance interpretation of PCA and provide an optimization problem which explicitly encourages sparsity in V based on a Lasso constraint [18]. d’Aspremont et al. [2] take a similar approach, but instead formulate the problem as an SDP. Zou et al. [21] use the minimum reconstruction error interpretation of PCA to suggest a different approach to the SPCA problem; this formulation will be most relevant to our present purpose. They begin by formulating PCA as the solution to a regression-type problem. Theorem 2 (Zou et al. [21]). Given an arbitrary matrix X ∈Rn×p and an integer k, let A and W be p × k matrices. Then, for any λ > 0, let (A∗, V∗ k) = argminA,W∈Rp×k||X −XWAT ||2 F + λ||W||2 F s.t. AT A = Ik. (4) Then, the minimizing matrices A∗and V∗ k satisfy A∗(i) = siV(i) and V∗(i) k = si Σ2 ii Σ2 ii+λV(i), where si = 1 or −1. That is, up to signs, A∗consists of the top-k right singular vectors of X, and V∗ k consists of those same vectors “shrunk” by a factor depending on the corresponding singular value. Given this regression-type characterization of PCA, Zou et al. [21] then “sparsify” the formulation by adding an L1 penalty on W: (A∗, V∗ k) = argminA,W∈Rp×k||X −XWAT ||2 F + λ||W||2 F + λ1||W||1 s.t. AT A = Ik, (5) where ||W||1 = P ij |Wij|. This regularization tends to sparsify W element-wise, so that the solution V∗ k gives a sparse approximation of Vk. 3 Expressing CUR as an optimization problem In this section, we present an optimization formulation of CUR. Recall, from Section 2.1, that CUR takes a purely algorithmic approach to the problem of approximating a matrix in terms of a small number of its columns. That is, it achieves sparsity indirectly by randomly selecting c columns, and it does so in such a way that the reconstruction error is small with high probability (Theorem 1). By contrast, SPCA methods are generally formulated as the exact solution to an optimization problem. From Theorem 1, it is clear that CUR seeks a subset I of size c for which minB∈Rc×p ||X−XIB||F is small. In this sense, CUR can be viewed as a randomized algorithm for approximately solving the following combinatorial optimization problem: min I⊂{1,...,p} min B∈Rc×p ||X −XIB||F s.t. |I| ≤c. (6) In words, this objective asks for the subset of c columns of X which best describes the entire matrix X. Notice that relaxing |I| = c to |I| ≤c does not affect the optimum. This optimization problem is analogous to all-subsets multivariate regression [7], which is known to be NP-hard. However, by using ideas from the optimization literature we can approximate this combinatorial problem as a regularized regression problem that is convex. First, notice that (6) is equivalent to min B∈Rp×p ||X −XB||F s.t. p X i=1 1{||B(i)||2̸=0} ≤c, (7) where we now optimize over a p×p matrix B. To see the equivalence between (6) and (7), note that the constraint in (7) is the same as finding some subset I with |I| ≤c such that BIc = 0. The formulation in (7) provides a natural entry point to proposing a convex optimization approach corresponding to CUR. First notice that (7) uses an L0 norm on the rows of B, which is not convex. However, we can approximate the L0 constraint by a group lasso penalty, which uses a well-known convex heuristic proposed by Yuan et al. [20] that encourages prespecified groups of parameters to be simultaneously sparse. Thus, the combinatorial problem in (6) can be approximated by the following convex (and thus tractable) problem: Problem 1 (Group lasso regression: GL-REG). Given an arbitrary matrix X ∈Rn×p, let B ∈ Rp×p and t > 0. The GL-REG problem is to solve B∗= argminB||X −XB||F s.t. p X i=1 ||B(i)||2 ≤t, (8) where t is chosen to get c nonzero rows in B∗. 3 Since the rows of B are grouped together in the penalty Pp i=1 ||B(i)||2, the row vector B(i) will tend to be either dense or entirely zero. Note also that the algorithm to solve Problem 1 is a special case of Algorithm 1 (see below), which solves the GL-SPCA problem, to be introduced later. (Finally, as a side remark, note that our proposed GL-REG is strikingly similar to a recently proposed method for sparse inverse covariance estimation [6, 15].) 4 Distinguishing CUR from SPCA Our original intention in casting CUR in the optimization framework was to understand better whether CUR could be seen as an SPCA-type method. So far, we have established CUR’s connection to regression by showing that CUR can be thought of as an approximation algorithm for the sparse regression problem (7). In this section, we discuss the relationship between regression and PCA, and we show that CUR cannot be directly cast as an SPCA method. To do this, recall that regression, in particular “self” regression, finds a B ∈Rp×p that minimizes ||X −XB||F . (9) On the other hand, PCA-type methods find a set of directions W that minimize ERR(W) := ||X −XWW+||F . (10) Here, unlike in (1), we do not assume that W is orthogonal, since the minimizer produced from SPCA methods is often not required to be orthogonal (recall Section 2.2). Clearly, with no constraints on B or W, we can trivially achieve zero reconstruction error in both cases by taking B = Ip and W any p × p full-rank matrix. However, with additional constraints, these two problems can be very different. It is common to consider sparsity and/or rank constraints. We have seen in Section 3 that CUR effectively requires B to be row-sparse; in the standard PCA setting, W is taken to be rank k (with k < p), in which case (10) is minimized by Vk and obtains the optimal value ERR(Vk) = ||X −Xk||F ; finally, for SPCA, W is further required to be sparse. To illustrate the difference between the reconstruction errors (9) and (10) when extra constraints are imposed, consider the 2-dimensional toy example in Figure 1. In this example, we compare regression with a row-sparsity constraint to PCA with both rank and sparsity constraints. With X ∈Rn×2, we plot X(2) against X(1) as the solid points in both plots of Figure 1. Constraining B(2) = 0 (giving row-sparsity, as with CUR methods), (9) becomes minB12 ||X(2) −X(1)B12||2, which is a simple linear regression, represented by the black thick line and minimizing the sum of squared vertical errors as shown. The red line (left plot) shows the first principal component direction, which minimizes ERR(W) among all rank-one matrices W. Here, ERR(W) is the sum of squared projection distances (red dotted lines). Finally, if W is further required to be sparse in the X(2) direction (as with SPCA methods), we get the rank-one, sparse projection represented by the green line in Figure 1 (right). The two sets of dotted lines in each plot clearly differ, indicating that their corresponding reconstruction errors are different as well. Since we have shown that CUR is minimizing a regression-based objective, this toy example suggests that CUR may not in fact be optimizing a PCA-type objective such as (10). Next, we will make this intuition more precise. The first step to showing that CUR is an SPCA method would be to produce a matrix VCUR for which XIXI+X = XVCURV+ CUR, i.e. to express CUR’s approximation in the form of an SPCA approximation. However, this equality implies Lcol(XVCURV+ CUR) ⊆Lcol(XI), meaning that (VCUR)Ic = 0. If such a VCUR existed, then clearly ERR(VCUR) = ||X −XIXI+X||F , and so CUR could be regarded as implicitly performing sparse PCA in the sense that (a) VCUR is sparse; and (b) by Theorem 1 (with high probability), ERR(VCUR) ≤(1 + ǫ)ERR(Vk). Thus, the existence of such a VCUR would cast CUR directly as a randomized approximation algorithm for SPCA. However, the following theorem states that unless an unrealistic constraint on X holds, there does not exist a matrix VCUR for which ERR(VCUR) = ||X −XIXI+X||F . The larger implication of this theorem is that CUR cannot be directly viewed as an SPCA-type method. Theorem 3. Let I ⊂{1, . . . , p} be an index set and suppose W ∈Rp×p satisfies WIc = 0. Then, ||X −XWW+||F > ||X −XIXI+X||F , unless Lcol(XI) ⊥Lcol(XIc), in which case “≥” holds. 4 Regression PCA X(1) X(2) error (9) error (10) Regression SPCA X(1) X(2) error (9) error (10) Figure 1: Example of the difference in reconstruction errors (9) and (10), when additional constraints imposed. Left: regression with row-sparsity constraint (black) compared with PCA with low rank constraint (red). Right: regression with row-sparsity constraint (black) compared with PCA with low rank and sparsity constraint (green). In both plots, the corresponding errors are represented by the dotted lines. Proof. ||X −XWW+||2 F = ||X −XIWIW+||2 F = ||X −XIWI(WT I WI)−1WT ||2 F = ||XI −XIWIW+ I ||2 F + ||XIc||2 F ≥||XIc||2 F = ||XIc −XIXI+XIc||2 F + ||XIXI+XIc||2 F = ||X −XIXI+X||2 F + ||XIXI+XIc||2 F ≥||X −XIXI+X||2 F . The last inequality is strict unless XIXI+XIc = 0. 5 CUR-type sparsity and the group lasso SPCA Although CUR cannot be directly cast as an SPCA-type method, in this section we propose a sparse PCA approach (which we call the group lasso SPCA or GL-SPCA) that accomplishes something very close to CUR. Our proposal produces a V∗that has rows that are entirely zero, and it is motivated by the following two observations about CUR. First, following from the definition of the leverage scores (3), CUR chooses columns of X based on the norm of their corresponding rows of Vk. Thus, it essentially “zeros-out” the rows of Vk with small norms (in a probabilistic sense). Second, as we have noted in Section 4, if CUR could be expressed as a PCA method, its principal directions matrix “VCUR” would have p −c rows that are entirely zero, corresponding to removing those columns of X. Recall that Zou et al. [21] obtain a sparse V∗by including in (5) an additional L1 penalty from the optimization problem (4). Since the L1 penalty is on the entire matrix viewed as a vector, it encourages only unstructured sparsity. To achieve the CUR-type row sparsity, we propose the following modification of (4): Problem 2 (Group lasso SPCA: GL-SPCA). Given an arbitrary matrix X ∈Rn×p and an integer k, let A and W be p × k matrices, and let λ, λ1 > 0. The GL-SPCA problem is to solve (A∗, V∗) = argminA,W||X −XWAT ||2 F + λ||W||2 F + λ1 p X i=1 ||W(i)||2 s.t. AT A = Ik. (11) Thus, the lasso penalty λ1||W||1 in (5) is replaced in (11) by a group lasso penalty λ1 Pp i=1 ||W(i)||2, where rows of W are grouped together so that each row of V∗will tend to be either dense or entirely zero. Importantly, the GL-SPCA problem is not convex in W and A together; it is, however, convex in W, and it is easy to solve in A. Thus, analogous to the treatment in Zou et al. [21], we propose an iterative alternate-minimization algorithm to solve GL-SPCA. This is described in Algorithm 1; and the justification of this algorithm is given in Section 7. Note that if we fix A to be I throughout, then Algorithm 1 can be used to solve the GL-REG problem discussed in Section 3. 5 Algorithm 1: Iterative algorithm for solving the GL-SPCA (and GL-REG) problems. (For the GL-REG problem, fix A = I throughout this algorithm.) Input: Data matrix X and initial estimates for A and W Output: Final estimates for A and W repeat 1 Compute SVD of XT XW as UDVT and then A ←UVT ; S ←{i : ||W(i)||2 ̸= 0}; for i ∈S do 2 Compute bi = P j̸=i X(j)T X(i) WT (j); if ||AT XT X(i) −bi||2 ≤λ1/2 then 3 WT (i) ←0; else 4 WT (i) ← 2 2||X(i)||2 2+λ+λ1/||W(i)||2 AT XT X(i) −bi  ; until convergence; We remark that such row-sparsity in V∗can have either advantages or disadvantages. Consider, for example, when there are a small number of informative columns in X and the rest are not important for the task at hand [12, 14]. In such a case, we would expect that enforcing entire rows to be zero would lead to better identification of the signal columns; and this has been empirically observed in the application of CUR to DNA SNP analysis [14]. The unstructured V∗, by contrast, would not be able to “borrow strength” across all columns of V∗to differentiate the signal columns from the noise columns. On the other hand, requiring such structured sparsity is more restrictive and may not be desirable. For example, in microarray analysis in which we have measured p genes on n patients, our goal may be to find several underlying factors. Biologists have identified “pathways” of interconnected genes [16], and it would be desirable if each sparse factor could be identified with a different pathway (that is, a different set of genes). Requiring all factors of V∗to exclude the same p −c genes does not allow a different sparse subset of genes to be active in each factor. We finish this section by pointing out that while most SPCA methods only enforce unstructured zeros in V∗, the idea of having a structured sparsity in the PCA context has very recently been explored [9]. Our GL-SPCA problem falls within the broad framework of this idea. 6 Empirical Comparisons In this section, we evaluate the performance of the four methods discussed above on both synthetic and real data. In particular, we compare the randomized CUR algorithm of Mahoney and Drineas [12, 4] to our GL-REG (of Problem 1), and we compare the SPCA algorithm proposed by Zou et al. [21] to our GL-SPCA (of Problem 2). We have also compared against the SPCA algorithm of Witten et al. [19], and we found the results to be very similar to those of Zou et al. 6.1 Simulations We first consider synthetic examples of the form X = bX + E, where bX is the underlying signal matrix and E is a matrix of noise. In all our simulations, E has i.i.d. N(0, 1) entries, while the signal bX has one of the following forms: Case I) bX = [0n×(p−c); bX∗] where the n × c matrix bX∗is the nonzero part of bX. In other words, bX has c nonzero columns and does not necessarily have a low-rank structure. Case II) bX = UVT where U and V each consist of k < p orthogonal columns. In addition to being low-rank, V has entire rows equal to zero (i.e. it is row-sparse). Case III) bX = UVT where U and V each consist of k < p orthogonal columns. Here V is low-rank and sparse, but the sparsity is not structured (i.e. it is scattered-sparse). A successful method attains low reconstruction error of the true signal bX and has high precision in identifying correctly the zeros in the underlying model. As previously discussed, the four methods 6 optimize for different types of reconstruction error. Thus, in comparing CUR and GL-REG, we use the regression-type reconstruction error ERRreg(I) = || bX −XIXI+X||F , whereas for the comparison of SPCA and GL-SPCA, we use the PCA-type error ERR(V) = || bX −XVV+||F . Table 1 presents the simulation results from the three cases. All comparisons use n = 100 and p = 1000. In Case II and III, the signal matrix has rank k = 10. The underlying sparsity level is 20%, i.e. 80% of the entries of bX (Case I) and V (Case II&III) are zeros. Note that all methods except for GL-REG require the rank k as an input, and we always take it to be 10 even in Case I. For easy comparison, we have tuned each method to have the correct total number of zeros. The results are averaged over 5 trials. Methods Case I Case II Case III ERRreg(I) CUR 316.29 (0.835) 315.28 (0.797) 315.64 (0.166) GL-REG 316.29 (0.989) 315.28 (0.750) 315.64 (0.107) ERR(V) SPCA 177.92 (0.809) 44.388 (0.799) 44.995 (0.792) GL-SPCA 141.85 (0.998) 37.310 (0.767) 45.500 (0.804) Table 1: Simulation results: The reconstruction errors and the percentages of correctly identified zeros (in parentheses). We notice in Table 1 that the two regression-type methods CUR and GL-REG have very similar performance. As we would expect, since CUR only uses information in the top k singular vectors, it does slightly worse than GL-REG in terms of precision when the underlying signal is not low-rank (Case I). In addition, both methods perform poorly if the sparsity is not structured as in Case III. The two PCA-type methods perform similarly as well. Again, the group lasso method seems to work better in Case I. We note that the precisions reported here are based on element-wise sparsity—if we were measuring row-sparsity, methods like SPCA would perform poorly since they do not encourage entire rows to be zero. 6.2 Microarray example We next consider a microarray dataset of soft tissue tumors studied by Nielsen et al. [13]. Mahoney and Drineas [12] apply CUR to this dataset of n = 31 tissue samples and p = 5520 genes. As with the simulation results, we use two sets of comparisons: we compare CUR with GL-REG, and we compare SPCA with GL-SPCA. Since we do not observe the underlying truth bX, we take ERRreg(I) = ||X −XIXI+X||F and ERR(V) = ||X −XVV+||F . Also, since we do not observe the true sparsity, we cannot measure the precision as we do in Table 1. The left plot in Figure 2 shows ERRreg(I) as a function of |I|. We see that CUR and GL-REG perform similarly. (However, since CUR is a randomized algorithm, on every run it gives a different result. From a practical standpoint, this feature of CUR can be disconcerting to biologists wanting to report a single set of important genes. In this light, GL-REG may be thought of as an attractive non-randomized alternative to CUR.) The right plot of Figure 2 compares GL-SPCA to SPCA (specifically, Zou et al. [21]). Since SPCA does not explicitly enforce row-sparsity, for a gene to be not used in the model requires all of the (k = 4) columns of V∗to exclude it. This likely explains the advantage of GL-SPCA over SPCA seen in the figure. 7 Justification of Algorithm 1 The algorithm alternates between minimizing with respect to A and B until convergence. Solving for A given B: If B is fixed, then the regularization penalty in (11) can be ignored, in which case the optimization problem becomes minA ||X −XBAT ||2 F subject to AT A = I. This problem was considered by Zou et al. [21], who showed that the solution is obtained by computing the SVD of (XT X)B as (XT X)B = UDVT and then setting bA = UVT . This explains step 1 in Algorithm 1. Solving for B given A: If A is fixed, then (11) becomes an unconstrained convex optimization problem in B. The subgradient equations (using that AT A = Ik) are 2BT XT X(i) −2AT XT X(i) + 2λBT (i) + λ1si = 0; i = 1, . . . , p, (12) 7 0 50 100 150 200 0 100 200 300 400 ERRreg(I) Number of genes used Microarray Dataset GL-REG CUR 1000 2000 3000 4000 5000 360 380 400 420 440 460 ERR(V) Number of genes used Microarray Dataset GL-SPCA SPCA Figure 2: Left: Comparison of CUR, multiple runs, with GL-REG; Right: Comparison of GLSPCA with SPCA (specifically, Zou et al. [21]). where the subgradient vectors si = BT (i)/||B(i)||2 if B(i) ̸= 0, or ||si||2 ≤1 if B(i) = 0. Let us define bi = P j̸=i(X(j)T X(i))BT (j) = BT XT X(i)−||X(i)||2 2BT (i), so that the subgradient equations can be written as bi + (||X(i)||2 2 + λ)BT (i) −AT XT X(i) + (λ1/2)si = 0. (13) The following claim explains Step 3 in Algorithm 1. Claim 1. B(i) = 0 if and only if ||AT XT X(i) −bi||2 ≤λ1/2. Proof. First, if B(i) = 0, the subgradient equations (13) become bi −ATXT X(i) + (λ1/2)si = 0. Since ||si||2 ≤1 if B(i) = 0, we have ||AT XT X(i) −bi||2 ≤λ1/2. To prove the other direction, recall that B(i) ̸= 0 implies si = BT (i)/||B(i)||2. Substituting this expression into (13), rearranging terms, and taking the norm on both sides, we get 2||AT XT X(i) −bi||2 = 2||X(i)||2 2 + 2λ + λ1/||B(i)||2  ||B(i)||2 > λ1. By Claim 1, ||AT XT X(i) −bi||2 > λ1/2 implies that B(i) ̸= 0 which further implies si = BT (i)/||B(i)||2. Substituting into (13) gives Step 4 in Algorithm 1. 8 Conclusion In this paper, we have elucidated several connections between two recently-popular matrix decomposition methods that adopt very different perspectives on obtaining interpretable low-rank matrix decompositions. In doing so, we have suggested two optimization problems, GL-REG and GLSPCA, that highlight similarities and differences between the two methods. In general, SPCA methods obtain interpretability by modifying an existing intractable objective with a convex regularization term that encourages sparsity, and then exactly optimizing that modified objective. On the other hand, CUR methods operate by using randomness and approximation as computational resources to optimize approximately an intractable objective, thereby implicitly incorporating a form of regularization into the steps of the approximation algorithm. Understanding this concept of implicit regularization via approximate computation is clearly of interest more generally, in particular for applications where the size scale of the data is expected to increase. Acknowledgments We would like to thank Art Owen and Robert Tibshirani for encouragement and helpful suggestions. Jacob Bien was supported by the Urbanek Family Stanford Graduate Fellowship, and Ya Xu was supported by the Melvin and Joan Lane Stanford Graduate Fellowship. In addition, support from the NSF and AFOSR is gratefully acknowledged. 8 References [1] M.-A. Belabbas and P.J. Wolfe. Fast low-rank approximation for covariance matrices. In Second IEEE International Workshop on Computational Advances in Multi-Sensor Adaptive Processing, pages 293–296, 2007. [2] A. d’Aspremont, L. El Ghaoui, M. I. Jordan, and G. R. G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. SIAM Review, 49(3):434–448, 2007. [3] P. Drineas, R. Kannan, and M.W. Mahoney. Fast Monte Carlo algorithms for matrices III: Computing a compressed approximate matrix decomposition. SIAM Journal on Computing, 36:184–206, 2006. [4] P. Drineas, M.W. Mahoney, and S. Muthukrishnan. Relative-errorCUR matrix decompositions. SIAM Journal on Matrix Analysis and Applications, 30:844–881, 2008. [5] S.A. Goreinov and E.E. Tyrtyshnikov. The maximum-volume concept in approximation by low-rank matrices. Contemporary Mathematics, 280:47–51, 2001. [6] T. Hastie, R. Tibshirani, and J. Friedman. Applications of the lasso and grouped lasso to the estimation of sparse graphical models. Manuscript. Submitted. 2010. [7] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. SpringerVerlag, New York, 2003. [8] D.C. Hoaglin and R.E. Welsch. The hat matrix in regression and ANOVA. The American Statistician, 32(1):17–22, 1978. [9] R. Jenatton, G. Obozinski, and F. Bach. Structured sparse principal component analysis. Technical report. Preprint: arXiv:0909.1440 (2009). [10] I. T. Jolliffe, N. T. Trendafilov, and M. Uddin. A modified principal component technique based on the LASSO. Journal of Computational and Graphical Statistics, 12(3):531–547, 2003. [11] S. Kumar, M. Mohri, and A. Talwalkar. Ensemble Nystr¨om method. In Annual Advances in Neural Information Processing Systems 22: Proceedings of the 2009 Conference, 2009. [12] M.W. Mahoney and P. Drineas. CUR matrix decompositions for improved data analysis. Proc. Natl. Acad. Sci. USA, 106:697–702, 2009. [13] T. Nielsen, R.B. West, S.C. Linn, O. Alter, M.A. Knowling, J. O’Connell, S. Zhu, M. Fero, G. Sherlock, J.R. Pollack, P.O. Brown, D. Botstein, and M. van de Rijn. Molecular characterisation of soft tissue tumours: a gene expression study. Lancet, 359(9314):1301–1307, 2002. [14] P. Paschou, E. Ziv, E.G. Burchard, S. Choudhry, W. Rodriguez-Cintron, M.W. Mahoney, and P. Drineas. PCA-correlated SNPs for structure identification in worldwide human populations. PLoS Genetics, 3:1672–1686, 2007. [15] J. Peng, P. Wang, N. Zhou, and J. Zhu. Partial correlation estimation by joint sparse regression models. Journal of the American Statistical Association, 104:735–746, 2009. [16] A. Subramanian, P. Tamayo, V. K. Mootha, S. Mukherjee, B. L. Ebert, M. A. Gillette, A. Paulovich, S. L. Pomeroy, T. R. Golub, E. S. Lander, and J. P. Mesirov. Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proc. Natl. Acad. Sci. USA, 102(43):15545–15550, 2005. [17] J. Sun, Y. Xie, H. Zhang, and C. Faloutsos. Less is more: Compact matrix decomposition for large sparse graphs. In Proceedings of the 7th SIAM International Conference on Data Mining, 2007. [18] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B, 58(1):267–288, 1996. [19] D. M. Witten, R. Tibshirani, and T. Hastie. A penalized matrix decomposition, with applications to sparse principal components and canonical correlation analysis. Biostatistics, 10(3):515–534, 2009. [20] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B, 68(1):49–67, 2006. [21] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of Computational and Graphical Statistics, 15(2):262–286, 2006. 9
2010
215
3,983
Robust Clustering as Ensembles of Affinity Relations Hairong Liu1, Longin Jan Latecki2, Shuicheng Yan1 1Department of Electrical and Computer Engineering, National University of Singapore, Singapore 2Department of Computer and Information Sciences, Temple University, Philadelphia, USA lhrbss@gmail.com,latecki@temple.edu,eleyans@nus.edu.sg Abstract In this paper, we regard clustering as ensembles of k-ary affinity relations and clusters correspond to subsets of objects with maximal average affinity relations. The average affinity relation of a cluster is relaxed and well approximated by a constrained homogenous function. We present an efficient procedure to solve this optimization problem, and show that the underlying clusters can be robustly revealed by using priors systematically constructed from the data. Our method can automatically select some points to form clusters, leaving other points un-grouped; thus it is inherently robust to large numbers of outliers, which has seriously limited the applicability of classical methods. Our method also provides a unified solution to clustering from k-ary affinity relations with k ≥2, that is, it applies to both graph-based and hypergraph-based clustering problems. Both theoretical analysis and experimental results show the superiority of our method over classical solutions to the clustering problem, especially when there exists a large number of outliers. 1 Introduction Data clustering is a fundamental problem in many fields, such as machine learning, data mining and computer vision [1]. Unfortunately, there is no universally accepted definition of a cluster, probably because of the diverse forms of clusters in real applications. But it is generally agreed that the objects belonging to a cluster satisfy certain internal coherence condition, while the objects not belonging to a cluster usually do not satisfy this condition. Most of existing clustering methods are partition-based, such as k-means [2], spectral clustering [3, 4, 5] and affinity propagation [6]. These methods implicitly share an assumption: every data point must belong to a cluster. This assumption greatly simplifies the problem, since we do not need to judge whether a data point is an outlier or not, which is very challenging. However, this assumption also results in bad performance of these methods when there exists a large number of outliers, as frequently met in many real-world applications. The criteria to judge whether several objects belong to the same cluster or not are typically expressed by pairwise relations, which is encoded as the weights of an affinity graph. However, in many applications, high order relations are more appropriate, and may even be the only choice, which naturally results in hyperedges in hypergraphs. For example, when clustering a given set of points into lines, pairwise relations are not meaningful, since every pair of data points trivially defines a line. However, for every three data points, whether they are near collinear or not conveys very important information. As graph-based clustering problem has been well studied, many researchers tried to deal with hypergraph-based clustering by using existing graph-based clustering methods. One direction is to transform a hypergraph into a graph, whose edge-weights are mapped from the weights of the original hypergraph. Zien et. al. [7] proposed two approaches called “clique expansion” and “star expansion”, respectively, for such a purpose. Rodriguez [8] showed the relationship between the 1 spectral properties of the Laplacian matrix of the resulting graph and the minimum cut of the original hypergraph. Agarwal et al. [9] proposed the “clique averaging” method and reported better results than “clique expansion” method. Another direction is to generalize graph-based clustering method to hypergraphs. Zhou et al. [10] generalized the well-known “normalized cut” method [5] and defined a hypergraph normalized cut criterion for a k-partition of the vertices. Shashua et al. [11] cast the clustering problem with high order relations into a nonnegative factorization problem of the closest hyper-stochastic version of the input affinity tensor. Based on game theory, Bulo and Pelillo [12] proposed to consider the hypergraph-based clustering problem as a multi-player non-cooperative “clustering game” and solve it by replicator equation, which is in fact a generalization of their previous work [13]. This new formulation has a solid theoretical foundation, possesses several appealing properties, and achieved state-of-art results. This method is in fact a specific case of our proposed method, and we will discuss this point in Section 2. In this paper, we propose a unified method for clustering from k-ary affinity relations, which is applicable to both graph-based and hypergraph-based clustering problems. Our method is motivated by an intuitive observation: for a cluster with m objects, there may exist (m k ) possible k-ary affinity relations, and most of these (sometimes even all) k-ary affinity relations should agree with each other on the same criterion. For example, in the line clustering problem, for m points on the same line, there are (m 3 ) possible triplets, and all these triplets should satisfy the criterion that they lie on a line. The ensemble of such large number of affinity relations is hardly produced by outliers and is also very robust to noises, thus yielding a robust mechanism for clustering. 2 Formulation Clustering from k-ary affinity relations can be intuitively described as clustering on a special kind of edge-weighted hypergraph, k-graph. Formally, a k-graph is a triplet G = (V, E, w), where V = {1, · · · , n} is a finite set of vertices, with each vertex representing an object, E ⊆V k is the set of hyperedges, with each hyperedge representing a k-ary affinity relation, and w : E →R is a weighting function which associates a real value (can be negative) with each hyperedge, with larger weights representing stronger affinity relations. We only consider the k-ary affinity relations with no duplicate objects, that is, the hyperedges among k different vertices. For hyperedges with duplicated vertices, we simply set their weights to zeros. Each hyperedge e ∈E involves k vertices, thus can be represented as k-tuple {v1, · · · , vk}. The weighted adjacency array of graph G is an k z }| { n × n × · · · × n super-symmetry array, denoted by M, and defined as M(v1, · · · , vk) = { w({v1, · · · , vk}) if {v1, · · · , vk} ∈E, 0 else, (1) Note that each edge {v1, · · · , vk} ∈E has k! duplicate entries in the array M. For a subset U ⊆V with m vertices, its edge set is denoted as EU. If U is really a cluster, then most of hyperedges in EU should have large weights. The simplest measure to reflect such ensemble phenomenon is the sum of all entries in M whose corresponding hyperedges contain only vertices in U, which can be expressed as: S(U) = ∑ v1,···,vk∈U M(v1, · · · , vk). (2) Suppose y is an n × 1 indicator vector of the subset U, such that yvi = 1 if vi ∈U and zero otherwise, then S(U) can be expressed as: S(U) = S(y) = ∑ v1,···,vk∈V M(v1, · · · , vk) k z }| { yv1 · · · yvk . (3) Obviously, S(U) usually increases as the number of vertices in U increases. Since ∑ i yi = m and there are mk summands in S(U), the average of these entries can be expressed as: Sav(U) = 1 mk S(y) 2 = 1 mk ∑ v1,···,vk∈V M(v1, · · · , vk) k z }| { yv1 · · · yvk = ∑ v1,···,vk∈V M(v1, · · · , vk) k z }| { yv1 m · · · yvk m = ∑ v1,···,vk∈V M(v1, · · · , vk) k z }| { xv1 · · · xvk, (4) where x = y/m. As ∑ i yi = m, ∑ i xi = 1 is a natural constraint over x. Intuitively, when U is a true cluster, Sav(U) should be relatively large. Thus, the clustering problem corresponds to the problem of maximizing Sav(U). In essence, this is a combinatorial optimization problem, since we know neither m nor which m objects to select. As this problem is NP-hard, to reduce its complexity, we relax x to be within a continuous range [0, ε], where ε ≤1 is a constant, while keeping the constraint ∑ i xi = 1. Then the problem becomes: { max f(x) = ∑ v1,···,vk∈V M(v1, · · · , vk) ∏k i=1 xvi, subject to x ∈∆n and xi ∈[0, ε] (5) where ∆n = {x ∈Rn : x ≥0 and ∑ i xi = 1} is the standard simplex in Rn. Note that Sav(x) is abbreviated by f(x) to simplify the formula. The adoption of ℓ1-norm in (5) not only let xi have an intuitive probabilistic meaning, that is, xi represents the probability for the cluster contain the i-th object, but also makes the solution sparse, which means to automatically select some objects to form a cluster, while ignoring other objects. Relation to Clustering Game. In [12], Bulo and Pelillo proposed to cast the hypergraph-based clustering problem into a clustering game, which leads to a similar formulation as (5). In fact, their formulation is a special case of (5) when ε = 1. Setting ε < 1 means that the probability of choosing each strategy (from game theory perspective) or choosing each object (from our perspective) has an known upper bound, which is in fact a prior, while ε = 1 represents a noninformative prior. This point is very essential in many applications, it avoids the phenomenon where some components of x dominate. For example, if the weight of a hyperedge is extremely large, then the cluster may only select the vertices associated with this hyperedge, which is usually not desirable. In fact, ε offers us a tool to control the least number of objects in cluster. Since each component does not exceed ε, the cluster contains at least [ 1 ε] objects, where [z] represents the smallest integer larger than or equal to z. Because of the constraint xi ∈[0, ε], the solution is also totally different from [12]. 3 Algorithm Formulation (5) usually has many local maxima. Large maxima correspond to true clusters and small maxima usually form meaningless subsets. In this section, we first analyze the properties of the maximizer x∗, which are critical in algorithm design, and then introduce our algorithm to calculate x∗. Since the formulation (5) is a constrained optimization problem, by adding Lagrangian multipliers λ, µ1, · · · , µn and β1, · · · , βn, µi ≥0 and βi ≥0 for all i = 1, · · · , n, we can obtain its Lagrangian function: L(x, λ, µ, β) = f(x) −λ( n ∑ i=1 xi −1) + n ∑ i=1 µixi + n ∑ i=1 βi(ε −xi). (6) The reward at vertex i, denoted by ri(x), is defined as follows: ri(x) = ∑ v1,···,vk−1∈V M(v1, · · · , vk−1, i) k−1 ∏ t=1 xvt (7) Since M is a super-symmetry array, then ∂f(x) ∂xi = kri(x), i.e., ri(x) is proportional to the gradient of f(x) at x. 3 Any local maximizer x∗must satisfy the Karush-Kuhn-Tucker (KKT) condition [14], i.e., the firstorder necessary conditions for local optimality. That is,    kri(x∗) −λ + µi −βi = 0, i = 1, · · · , n, ∑n i=1 x∗ i µi = 0, ∑n i=1(ε −x∗ i )βi = 0. (8) Since x∗ i , µi and βi are all nonnegative for all i’s, ∑n i=1 x∗ i µi = 0 is equivalent to saying that if x∗ i > 0, then µi = 0, and ∑n i=1(ε −x∗ i )βi = 0 is equivalent to saying that if x∗ i < ε, then βi = 0. Hence, the KKT conditions can be rewritten as: ri(x∗) { ≤λ/k, x∗ i = 0, = λ/k, x∗ i > 0 and x∗ i < ε, ≥λ/k, x∗ i = ε. (9) According to x, the vertices set V can be divided into three disjoint subsets, V1(x) = {i|xi = 0}, V2(x) = {i|xi ∈(0, ε)} and V3(x) = {i|xi = ε}. The Equation (9) characterizes the properties of the solution of (5), which are further summarized in the following theorem. Theorem 1. If x∗is the solution of (5), then there exists a constant η (= λ/k) such that 1) the rewards at all vertices belonging to V1(x∗) are not larger than η; 2) the rewards at all vertices belonging to V2(x∗) are equal to η; and 3) the rewards at all vertices belonging to V3(x∗) are not smaller than η. Proof: Since KKT condition is a necessary condition, according to (9), the solution x∗must satisfy 1), 2) and 3). The set of non-zero components is Vd(x) = V2(x) ∪V3(x) and the set of the components which are smaller than ε is Vu(x) = V1(x)∪V2(x). For any x, if we want to update it to increase f(x), then the values of some components belonging to Vd(x) must decrease and the values of some components belonging to Vu(x) must increase. According to Theorem 1, if x is the solution of (5), then ri(x) ≤ rj(x), ∀i ∈Vu(x), ∀j ∈Vd(x). On the contrary, if ∃i ∈Vu(x), ∃j ∈Vd(x), ri(x) > rj(x), then x is not the solution of (5). In fact, in such case, we can increase xi and decrease xj to increase f(x). That is, let x′ l = { xl, l ̸= i, l ̸= j; xl + α, l = i; xl −α, l = j. (10) and define rij(x) = ∑ v1,···,vk−2 M(v1, · · · , vk−2, i, j) k−2 ∏ t=1 xvt (11) Then f(x′) −f(x) = −k(k −1)rij(x)α2 + k(ri(x) −rj(x))α (12) Since ri(x) > rj(x), we can always select a proper α > 0 to increase f(x). According to formula (10) and the constraint over xi, α ≤min(xj, ε −xi). Since ri(x) > rj(x), if rij(x) ≤0, then when α = min(xj, ε −xi), the increase of f(x) reaches maximum; if rij > 0, then when α = min(xj, ε −xi, ri(x)−rj(x) 2(k−1)rij(x)), the increase of f(x) reaches maximum. According to the above analysis, if ∃i ∈Vu(x), ∃j ∈Vd(x), ri(x) > rj(x), then we can update x to increase f(x). Such procedure iterates until ri(x) ≤rj(x), ∀i ∈Vu(x), ∀j ∈Vd(x). From a prior (initialization) x(0), the algorithm to compute the local maximizer of (5) is summarized in Algorithm 1, which successively chooses the “best” vertex and the “worst” vertex and then update their corresponding components of x. Since significant maxima of formulation (5) usually correspond to true clusters, we need multiple initializations (priors) to obtain them, with at least one initialization at the basin of attraction of every significant maximum. Such informative priors in fact can be easily and efficiently constructed from the neighborhood of every vertex (vertices with hyperedges connecting to this vertex), because the neighbors of a vertex generally have much higher probabilities to belong to the same cluster. 4 Algorithm 1 Compute a local maximizer x∗from a prior x(0) 1: Input: Weighted adjacency array M, prior x(0); 2: repeat 3: Compute the reward ri(x) for each vertex i; 4: Compute V1(x(t)), V2(x(t)), V3(x(t)), Vd(x(t)), and Vu(x(t)); 5: Find the vertex i in Vu(x(t)) with the largest reward and the vertex j in Vd(x(t)) with the smallest reward; 6: Compute α and update x(t) by formula (10) to obtain x(t + 1); 7: until x is a local maximizer 8: Output: The local maximizer x∗. Algorithm 2 Construct a prior x(0) containing vertex v 1: Input: Hyperedge set E(v) and ε; 2: Sort the hyperedges in E(v) in descending order according to their weights; 3: for i = 1, · · · , |E(v)| do 4: Add all vertices associated with the i-th hyperedge to L. If |L| ≥[ 1 ε], then break; 5: end for 6: For each vertex vj ∈L, set the corresponding component xvj(0) = 1 |L|; 7: Output: a prior x(0). For a vertex v, the set of hyperedges connected to v is denoted by E(v). We can construct a prior containing v from E(v), which is described in Algorithm 2. Because of the constraint xi ≤ε, the initializations need to contain at least [ 1 ε] nonzero components. To cover basin of attractions of more maxima, we expect these initializations to locate more uniformly in the space {x|x ∈∆n, xi ≤ε}. Since from every vertex, we can construct such a prior, thus, we can construct n priors in total. From these n priors, according to Algorithm 1, we can obtain n maxima. The significant maxima of (5) are usually among these n maxima, and a significant maximum may appear multiple times. In this way, we can robustly obtain multiple clusters simultaneously, and these clusters may overlap, both of which are desirable properties in many applications. Note that the clustering game approach [12] utilizes a noninformative prior, that is, all vertices have equal probability. Thus, it cannot obtain multiple clusters simultaneously. In clustering game approach [12], if xi(t) = 0, then xi(t+1) = 0, which means that it can only drop points and if a point is initially not included, then it cannot be selected. However, our method can automatically add or drop points, which is another key difference to the clustering game approach. In each iteration of Algorithm 1, we only need to consider two components of x, which makes both the update of rewards and the update of x(t) very efficient. As f(x(t)) increases, the sizes of Vu(x(t)) and Vd(x(t)) both decrease quickly, thus f(x) converges to local maximum quickly. Suppose the maximal number of hyperedges containing a certain vertex is h, then the time complexity of Algorithm 1 is O(thk), where t is the number of iterations. The total time complexity of our method is then O(nthk), since we need to ran Algorithm 1 from n initializations. 4 Experiments We evaluate our method on three types of experiments. The first one addresses the problem of line clustering, the second addresses the problem of illumination-invariant face clustering, and the third addresses the problem of affine-invariant point set matching. We compare our method with clique averaging [9] algorithm and matching game approach [12]. In all experiments, the clique averaging approach needs to know the number of clusters in advance; however, both clustering game approach and our method can automatically reveal the number of clusters, which yields the advantages of the latter two in many applications. 4.1 Line Clustering In this experiment, we consider the problem of clustering lines in 2D point sets. Pairwise similarity measures are useless in this case, and at least three points are needed for characterizing such a 5 property. The dissimilarity measure on triplets of points is given by their mean distance to the best fitting line. If d(i, j, k) is the dissimilarity measure of points {i, j, k}, then the similarity function is given by s({i, j, k}) = exp(−d(i, j, k)2/σ2 d), where σd is a scaling parameter, which controls the sensitivity of the similarity measure to deformation. We randomly generate three lines within the region [−0.5, 0.5]2, each line contains 30 points, and all these points have been perturbed by Gaussian noise N(0, σ). We also randomly add outliers into the point set. Fig. 1(a) illustrates such a point set with three lines shown in red, blue and green colors, respectively, and the outliers are shown in magenta color. To evaluate the performance, we ran all algorithms on the same data set over 30 trials with varying parameter values, and the performance is measured by F-measure. We first fix the number of outliers to be 60, vary the scaling parameter σd from 0.01 to 0.14, and the result is shown in Fig. 1(b). For our method, we set ε = 1/30. Obviously, our method is nearly not affected by the scaling parameter σd, while the clustering game approach is very sensitive to σd. Note that σd in fact controls the weights of the hyperedge graph and many graph-based algorithms are notoriously sensitive to the weights of the graph. Instead, by setting a proper ε, our method overcomes this problem. From Fig. 1(b), we observe that when σd = 4σ, the clustering game approach will get the best performance. Thus, we fix σd = 4σ, and change the noise parameter σ from 0.01 to 0.1, the results of clustering game approach, clique averaging algorithm and our method are shown in blue, green and red colors in Fig. 1(c), respectively. As the figure shows, when the noise is small, matching game approach outperforms clique averaging algorithm, and when the noise becomes large, the clique averaging algorithm outperforms matching game approach. This is because matching game approach is more robust to outliers, while the clique averaging algorithm seems more robust to noises. Our method always gets the best result, since it can not only select coherent clusters as matching game approach, but also control the size of clusters, thus avoiding the problem of too few points selected into clusters. In Fig. 1(d) and Fig. 1(e), we vary the number of outliers from 10 to 100, the results clearly demonstrate that our method and clustering game approach are robust to outliers, while clique averaging algorithm is very sensitive to outliers, since it is a partition-based method and every point must be assigned to a cluster. To illustrate the influence of ε, we fix σd = σ = 0.02, and test the performance of our method under different ε, the result is shown in Fig. 1(f), note that x axis is 1/ε. As we stressed in Section 2, clustering game approach is in fact a special case of our method when ε = 1, thus, the result at ε = 1 is nearly the same as the result of clustering game approach in Fig. 1(b) under the same conditions. Obviously, as 1/ε approaches the real number of points in the cluster, the result become much better. Note that the best result appears when 1/ε > 30, which is due to the fact that some outliers fall into the line clusters, as can be seen in Fig. 1(a). 4.2 Illumination-invariant face clustering It has been shown that the variability of images of a Labmertian surface in fixed pose, but under variable lighting conditions where no surface point is shadowed, constitutes a three dimensional linear subspace [15]. This leads to a natural measure of dissimilarity over four images, which can be used for clustering. In fact, this is a generalization of the k-lines problem into the k-subspaces problem. If we assume that the four images under consideration form the columns of a matrix, and normalize each column by ℓ2 norm, then d = s2 4 s2 1+···+s2 4 serves as a natural measure of dissimilarity, where si is the ith singular value of this matrix. In our experiments we use the Yale Face Database B and its extended version [16], which contains 38 individuals, each under 64 different illumination conditions. Since in some lighting conditions, the images are severely shadowed, we delete these images and do the experiments on a subset (about 35 images for each individual). We considered cases where we have faces from 4 and 5 random individuals (randomly choose 10 faces for each individual), with and without outliers. The case with outliers consists 10 additional faces each from a different individual. For each of those combinations, we ran 10 trials to obtain the average F-measures (mean and standard deviation), and the result is reported in Table 1. Note that for each algorithm, we individually tune the parameters to obtain the best results. The results clearly show that partition-based clustering method (clique averaging) is very sensitive to outliers, but performs better when there are no outliers. The clustering game approach and our method both perform well, especially when there are outliers, and our method performs a little better. 6 Figure 1: Results on clustering three lines with noises and outliers. The performance of clique averaging algorithm [9], matching game approach [12] and our method is shown as green dashed, blue dotted and read solid curves, respectively. This figure is best viewed in color. Table 1: Experiments on illuminant-invariant face clustering Classes 4 5 Outliers 0 10 0 10 Clique Averaging 0.95 ± 0.05 0.84 ± 0.08 0.93 ± 0.05 0.83 ± 0.07 Clustering Game 0.92 ± 0.04 0.90 ± 0.04 0.91 ± 0.06 0.90 ± 0.07 Our Method 0.93 ± 0.04 0.92 ± 0.05 0.92 ± 0.07 0.91 ± 0.04 4.3 Affine-invariant Point Set Matching An important problem in the object recognition is the fact that an object can be seen from different viewpoints, resulting in differently deformed images. Consequently, the invariance to viewpoints is a desirable property for many vision tasks. It is well-known that a near-planar object seen from different viewpoint can be modeled by affine transformations. In this subsection, we will show that matching planar point sets under different viewpoints can be formulated into a hypergraph clustering problem and our algorithm is very suitable for such tasks. Suppose the two point sets are P and Q, with nP and nQ points, respectively. For each point in P, it may match to any point in Q, thus there are nP nQ candidate matches. Under the affine transformation A, for three correct matches, mii′, mjj′ and mkk′, Sijk Si′j′k′ = |det(A)|, where Sijk is the area of the triangle formed by points i, j and k in P, Si′j′k′ is the area of the triangle formed by points i′, j′ and k′ in Q, and det(A) is the determinant of A. If we regard each candidate match as a point, then s = exp(− (Sijk−Si′j′k′|det(A)|)2 σ2 d ) serves as a natural similarity measure for three points (candidate matches), mii′, mjj′ and mkk′, σd is a scaling parameter, and the correct matching configuration then naturally form a cluster. Note that in this problem, most of the candidate matches are incorrect matches, and can be considered to be outliers. We did the experiments on 8 shapes from MPEG-7 shape database [17]. For each shape, we uniformly sample its contour into 20 points. Both the shapes and sampled point sets are demonstrated in Fig. 2. We regard original contour point sets as Ps, then randomly add Gaussian noise N(0, σ), and transform them by randomly generated affine matrices As to form corresponding Qs. Fig. 3 (a) shows such a pair of P and Q in red and blue, respectively. Since most of points (candidate matches) should not belong to any cluster, partition-based clustering method, such as clique aver7 aging method, cannot be used. Thus, we only compare our method with matching game approach and measure the performance of these two methods by counting how many matches agree with the ground truths. Since |det(A)| is unknown, we estimate its range and sample several possible values in this range, and conduct the experiment for each possible |det(A)|. In Fig. 3(b), we fix noise parameter σ = 0.05, and test the robustness of both methods under varying scaling parameter σd. Obviously, our method is very robust to σd, while the matching game approach is very sensitive to it. In Fig. 3(c), we increase σ from 0.04 to 0.16, and for each σ, we adjust σd to reach the best performances for both methods. As expected, our method is more robust to noise by benefiting from the parameter ε, which is set to 0.05 in both Fig. 3(b) and Fig. 3(c). In Fig. 3(d), we fix σ = 0.05 and σd = 0.15, and test the performance of our method under different ε. The result again verifies the importance of the parameter ε. Figure 2: The shapes and corresponding contour point sets used in our experiment. Figure 3: Performance curves on affine-invariant point set matching problem. The red solid curves demonstrate the performance of our method, while the blue dotted curve illustrates the performance of matching game approach. 5 Discussion In this paper, we characterized clustering as an ensemble of all associated affinity relations and relax the clustering problem into optimizing a constrained homogenous function. We showed that the clustering game approach turns out to be a special case of our method. We also proposed an efficient algorithm to automatically reveal the clusters in a data set, even under severe noises and a large number of outliers. The experimental results demonstrated the superiority of our approach with respect to the state-of-the-art counterparts. Especially, our method is not sensitive to the scaling parameter which affects the weights of the graph, and this is a very desirable property in many applications. A key issue with hypergraph-based clustering is the high computational cost of the construction of a hypergraph, and we are currently studying how to efficiently construct an approximate hypergraph and then perform clustering on the incomplete hypergraph. 6 Acknowledgement This research is done for CSIDM Project No. CSIDM-200803 partially funded by a grant from the National Research Foundation (NRF) administered by the Media Development Authority (MDA) of Singapore, and this work has also been partially supported by the NSF Grants IIS-0812118, BCS0924164 and the AFOSR Grant FA9550-09-1-0207. 8 References [1] A. Jain, M. Murty, and P. Flynn, “Data clustering: a review,” ACM Computing Surveys, vol. 31, no. 3, pp. 264–323, 1999. [2] T. Kanungo, D. Mount, N. Netanyahu, C. Piatko, R. Silverman, and A. Wu, “An efficient k-means clustering algorithm: Analysis and implementation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 7, pp. 881–892, 2002. [3] A. Ng, M. Jordan, and Y. Weiss, “On spectral clustering: Analysis and an algorithm,” in Advances in Neural Information Processing Systems, vol. 2, 2002, pp. 849–856. [4] I. Dhillon, Y. Guan, and B. Kulis, “Kernel k-means: spectral clustering and normalized cuts,” in Proceedings of the tenth ACM International Conference on Knowledge Discovery and Data Mining, 2004, pp. 551–556. [5] J. Shi and J. Malik, “Normalized cuts and image segmentation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22, no. 8, pp. 888–905, 2000. [6] B. Frey and D. Dueck, “Clustering by passing messages between data points,” Science, vol. 315, no. 5814, pp. 972–976, 2007. [7] J. Zien, M. Schlag, and P. Chan, “Multilevel spectral hypergraph partitioning with arbitrary vertex sizes,” IEEE Transactions on Computer-aided Design of Integrated Circuits and Systems, vol. 18, no. 9, pp. 1389–1399, 1999. [8] J. Rodriguez, “On the Laplacian spectrum and walk-regular hypergraphs,” Linear and Multilinear Algebra, vol. 51, no. 3, pp. 285–297, 2003. [9] S. Agarwal, J. Lim, L. Zelnik-Manor, P. Perona, D. Kriegman, and S. Belongie, “Beyond pairwise clustering,” in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2, 2005, pp. 838–845. [10] D. Zhou, J. Huang, and B. Scholkopf, “Learning with hypergraphs: Clustering, classification, and embedding,” in Advances in Neural Information Processing Systems, vol. 19, 2007, pp. 1601–1608. [11] A. Shashua, R. Zass, and T. Hazan, “Multi-way clustering using super-symmetric non-negative tensor factorization,” in European Conference on Computer Vision, 2006, pp. 595–608. [12] S. Bulo and M. Pelillo, “A game-theoretic approach to hypergraph clustering,” in Advances in Neural Information Processing Systems, 2009. [13] M. Pavan and M. Pelillo, “Dominant sets and pairwise clustering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 29, no. 1, pp. 167–172, 2007. [14] H. Kuhn and A. Tucker, “Nonlinear programming,” ACM SIGMAP Bulletin, pp. 6–18, 1982. [15] P. Belhumeur and D. Kriegman, “What is the set of images of an object under all possible illumination conditions?” International Journal of Computer Vision, vol. 28, no. 3, pp. 245– 260, 1998. [16] K. Lee, J. Ho, and D. Kriegman, “Acquiring linear subspaces for face recognition under variable lighting,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 27, no. 5, pp. 684–698, 2005. [17] L. Latecki, R. Lakamper, and T. Eckhardt, “Shape descriptors for non-rigid shapes with a single closed contour,” in IEEE Conference on Computer Vision and Pattern Recognition, vol. 1, 2000, pp. 65–72. 9
2010
216
3,984
Optimal learning rates for Kernel Conjugate Gradient regression Gilles Blanchard Mathematics Institute, University of Potsdam Am neuen Palais 10, 14469 Potsdam blanchard@math.uni-potsdam.de Nicole Kr¨amer Weierstrass Institute Mohrenstr. 39, 10117 Berlin, Germany nicole.kraemer@wias-berlin.de Abstract We prove rates of convergence in the statistical sense for kernel-based least squares regression using a conjugate gradient algorithm, where regularization against overfitting is obtained by early stopping. This method is directly related to Kernel Partial Least Squares, a regression method that combines supervised dimensionality reduction with least squares projection. The rates depend on two key quantities: first, on the regularity of the target regression function and second, on the effective dimensionality of the data mapped into the kernel space. Lower bounds on attainable rates depending on these two quantities were established in earlier literature, and we obtain upper bounds for the considered method that match these lower bounds (up to a log factor) if the true regression function belongs to the reproducing kernel Hilbert space. If this assumption is not fulfilled, we obtain similar convergence rates provided additional unlabeled data are available. The order of the learning rates match state-of-the-art results that were recently obtained for least squares support vector machines and for linear regularization operators. 1 Introduction The contribution of this paper is the learning theoretical analysis of kernel-based least squares regression in combination with conjugate gradient techniques. The goal is to estimate a regression function f ∗based on random noisy observations. We have an i.i.d. sample of n observations (Xi, Yi) ∈X ×R from an unknown distribution P(X, Y ) that follows the model Y = f ∗(X) + ε , where ε is a noise variable whose distribution can possibly depend on X, but satisfies E [ε|X] = 0. We assume that the true regression function f ∗belongs to the space L2(PX) of square-integrable functions. Following the kernelization principle, we implicitly map the data into a reproducing kernel Hilbert space H with a kernel k. We denote by Kn = 1 n(k(Xi, Xj)) ∈Rn×n the normalized kernel matrix and by Υ = (Y1, . . . , Yn)⊤∈Rn the n-vector of response observations. The task is to find coefficients α such that the function defined by the normalized kernel expansion fα(X) = 1 n n X i=1 αik(Xi, X) is an adequate estimator of the true regression function f ∗. The closeness of the estimator fα to the target f ∗is measured via the L2(PX) distance, ∥fα −f ∗∥2 2 = EX∼PX £ (fα(X) −f ∗(X))2¤ = EXY £ (fα(X) −Y )2¤ −EXY £ (f ∗(X) −Y )2¤ , The last equality recalls that this criterion is the same as the excess generalization error for the squared error loss ℓ(f, x, y) = (f(x) −y)2. 1 In empirical risk minimization, we use the training data empirical distribution as a proxy for the generating distribution, and minimize the training squared error. This gives rise to the linear equation Knα = Υ with α ∈Rn . (1) Assuming Kn invertible, the solution of the above equation is given by α = K−1 n Υ, which yields a function in H interpolating perfectly the training data but having poor generalization error. It is well-known that to avoid overfitting, some form of regularization is needed. There is a considerable variety of possible approaches (see e.g. [10] for an overview). Perhaps the most well-known one is α = (Kn + λI)−1Υ, (2) known alternatively as kernel ridge regression, Tikhonov’s regularization, least squares support vector machine, or MAP Gaussian process regression. A powerful generalization of this is to consider α = Fλ(Kn)Υ, (3) where Fλ : R+ →R+ is a fixed function depending on a parameter λ. The notation Fλ(Kn) is to be interpreted as Fλ applied to each eigenvalue of Kn in its eigen decomposition. Intuitively, Fλ should be a “regularized” version of the inverse function F(x) = x−1. This type of regularization, which we refer to as linear regularization methods, is directly inspired from the theory of inverse problems. Popular examples include as particular cases kernel ridge regression, principal components regression and L2-boosting. Their application in a learning context has been studied extensively [1, 2, 5, 6, 12]. Results obtained in this framework will serve as a comparison yardstick in the sequel. In this paper, we study conjugate gradient (CG) techniques in combination with early stopping for the regularization of the kernel based learning problem (1). The principle of CG techniques is to restrict the learning problem onto a nested set of data-dependent subspaces, the so-called Krylov subspaces, defined as Km(Υ, Kn) = span © Υ, KnΥ, . . . , Km−1 n Υ ª . (4) Denote by ⟨., .⟩the usual euclidean scalar product on Rn rescaled by the factor n−1. We define the Kn-norm as ∥α∥2 Kn := ⟨α, α⟩Kn := ⟨α, Knα⟩. The CG solution after m iterations is formally defined as αm = arg min α∈Km(Υ,Kn) ∥Υ −Knα∥Kn ; (5) and the number m of CG iterations is the model parameter. To simplify notation we define fm := fαm. In the learning context considered here, regularization corresponds to early stopping. Conjugate gradients have the appealing property that the optimization criterion (5) can be computed by a simple iterative algorithm that constructs basis vectors d1, . . . , dm of Km(Υ, Kn) by using only forward multiplication of vectors by the matrix Kn. Algorithm 1 displays the computation of the CG kernel coefficients αm defined by (5). Algorithm 1 Kernel Conjugate Gradient regression Input kernel matrix Kn, response vector Υ, maximum number of iterations m Initialization: α0 = 0n; r1 = Υ; d1 = Υ; t1 = KnΥ for i = 1, . . . , m do ti = ti/∥ti∥Kn ; di = di/∥ti∥Kn (normalization of the basis, resp. update vector) γi = ⟨Υ, ti⟩Kn (proj. of Υ on basis vector) αi = αi−1 + γidi (update) ri+1 = ri −γiti (residuals) di+1 = ri+1 −di ⟨ti, Knri+1⟩Kn ; ti+1 = Kndi+1 (new update, resp. basis vector) end for Return: CG kernel coefficients αm, CG function fm = Pn i=1 αi,mk(Xi, ·) The CG approach is also inspired by the theory of inverse problems, but it is not covered by the framework of linear operators defined in (3): As we restrict the learning problem onto the Krylov space Km(Υ, Kn) , the CG coefficients αm are of the form αm = qm(Kn)Υ with qm a polynomial of degree ≤m −1. However, the polynomial qm is not fixed but depends on Υ as well, making the CG method nonlinear in the sense that the coefficients αm depend on Υ in a nonlinear fashion. 2 We remark that in machine learning, conjugate gradient techniques are often used as fast solvers for operator equations, e.g. to obtain the solution for the regularized equation (2). We stress that in this paper, we study conjugate gradients as a regularization approach for kernel based learning, where the regularity is ensured via early stopping. This approach is not new. As mentioned in the abstract, the algorithm that we study is closely related to Kernel Partial Least Squares [18]. The latter method also restricts the learning problem onto the Krylov subspace Km(Υ, Kn), but it minimizes the euclidean distance ∥Υ −Knα∥instead of the distance ∥Υ −Knα∥Kn defined above1. Kernel Partial Least Squares has shown competitive performance in benchmark experiences (see e.g [18, 19]). Moreover, a similar conjugate gradient approach for non-definite kernels has been proposed and empirically evaluated by Ong et al [17]. The focus of the current paper is therefore not to stress the usefulness of CG methods in practical applications (and we refer to the above mentioned references) but to examine its theoretical convergence properties. In particular, we establish the existence of early stopping rules that lead to optimal convergence rates. We summarize our main results in the next section. 2 Main results For the presentation of our convergence results, we require suitable assumptions on the learning problem. We first assume that the kernel space H is separable and that the kernel function is measurable. (This assumption is satisfied for all practical situations that we know of.) Furthermore, for all results, we make the (relatively standard) assumption that the kernel is bounded: k(x, x) ≤κ for all x ∈X . We consider – depending on the result – one of the following assumptions on the noise: (Bounded) (Bounded Y ): |Y | ≤M almost surely. (Bernstein) (Bernstein condition): E [εp|X] ≤(1/2)p!M p almost surely, for all integers p ≥2. The second assumption is weaker than the first. In particular, the first assumption implies that not only the noise, but also the target function f ∗is bounded in supremum norm, while the second assumption does not put any additional restriction on the target function. The regularity of the target function f ∗is measured in terms of a source condition as follows. The kernel integral operator is given by K : L2(PX) →L2(PX), g 7→ Z k(., x)g(x)dP(x) . The source condition for the parameters r > 0 and ρ > 0 is defined by: SC(r, ρ) : f ∗= Kru with ∥u∥≤κ−rρ. It is a known fact that if r ≥1/2, then f ∗coincides almost surely with a function belonging to Hk. We refer to r ≥1/2 as the “inner case” and to r < 1/2 as the “outer case”. The regularity of the kernel operator K with respect to the marginal distribution PX is measured in terms of the so-called effective dimensionality condition, defined by the two parameters s ∈(0, 1), D ≥0 and the condition ED(s, D) : tr(K(K + λI)−1) ≤D2(κ−1λ)−s for all λ ∈(0, 1]. This notion was first introduced in [22] in a learning context, along with a number of fundamental analysis tools which we rely on and have been used in the rest of the related literature cited here. It is known that the best attainable rates of convergence, as a function of the number of examples n, are determined by the parameters r and s in the above conditions: It was shown in [6] that the minimax learning rate given these two parameters is lower bounded by O(n−2r/(2r+s)). We now expose our main results in different situations. In all the cases considered, the early stopping rule takes the form of a so-called discrepancy stopping rule: For some sequence of thresholds Λm > 0 to be specified (and possibly depending on the data), define the (data-dependent) stopping iteration bm as the first iteration m for which ∥Υ −Knαm∥Kn < Λm . (6) 1This is generalized to a CG-l algorithm (l ∈N≥0) by replacing the Kn-norm in (5) with the norm defined by Kl n. Corresponding fast iterative algorithms to compute the solution exist for all l (see e.g. [11]). 3 Only in the first result below, the threshold Λm actually depends on the iteration m and on the data. It is not difficult to prove from (4) and (5) that ∥Υ −Knαn∥Kn = 0, so that the above type of stopping rule always has bm ≤n. 2.1 Inner case without knowledge on effective dimension The inner case corresponds to r ≥1/2, i.e. the target function f ∗lies in H almost surely. For some constants τ > 1 and 1 > γ > 0, we consider the discrepancy stopping rule with the threshold sequence Λm = 4τ r κ log(2γ−1) n ³√κ ∥αm∥Kn + M p log(2γ−1) ´ . (7) For technical reasons, we consider a slight variation of the rule in that we stop at step bm−1 instead of bm if q b m(0) ≥4κ p log(2γ−1)/n, where qm is the iteration polynomial such that αm = qm(Kn)Υ. Denote em the resulting stopping step. We obtain the following result. Theorem 2.1. Suppose that Y is bounded (Bounded), and that the source condition SC(r, ρ) holds for r ≥1/2. With probability 1 −2γ , the estimator f e m obtained by the (modified) discrepancy stopping rule (7) satisfies ∥f e m −f ∗∥2 2 ≤c(r, τ)(M + ρ)2 µlog2 γ−1 n ¶ 2r 2r+1 . We present the proof in Section 4. 2.2 Optimal rates in inner case We now introduce a stopping rule yielding order-optimal convergence rates as a function of the two parameters r and s in the “inner” case (r ≥1/2, which is equivalent to saying that the target function belongs to H almost surely). For some constant τ ′ > 3/2 and 1 > γ > 0, we consider the discrepancy stopping rule with the fixed threshold Λm ≡Λ = τ ′M√κ µ 4D √n log 6 γ ¶ 2r+1 2r+s . (8) for which we obtain the following: Theorem 2.2. Suppose that the noise fulfills the Bernstein assumption (Bernstein), that the source condition SC(r, ρ) holds for r ≥1/2, and that ED(s, D) holds. With probability 1 −3γ , the estimator f b m obtained by the discrepancy stopping rule (8) satisfies ∥f b m −f ∗∥2 2 ≤c(r, τ ′)(M + ρ)2 µ16D2 n log2 6 γ ¶ 2r 2r+s . Due to space limitations, the proof is presented in the supplementary material. 2.3 Optimal rates in outer case, given additional unlabeled data We now turn to the “outer” case. In this case, we make the additional assumption that unlabeled data is available. Assume that we have ˜n i.i.d. observations X1, . . . , X˜n, out of which only the first n are labeled. We define a new response vector ˜Υ = ˜n n (Y1, . . . , Yn, 0, . . . , 0) ∈R˜n and run the CG algorithm 1 on X1, . . . , X˜n and ˜Υ. We use the same threshold (8) as in the previous section for the stopping rule, except that the factor M is replaced by max(M, ρ). Theorem 2.3. Suppose assumptions (Bounded), SC(r, ρ) and ED(s, D), with r + s ≥1 2. Assume unlabeled data is available with en n ≥ µ16D2 n log2 6 γ ¶− (1−2r)+ 2r+s . 4 Then with probability 1 −3γ , the estimator f b m obtained by the discrepancy stopping rule defined above satisfies ∥f b m −f ∗∥2 2 ≤c(r, τ ′)(M + ρ)2 µ16D2 n log2 6 γ ¶ 2r 2r+s . A sketch of the proof can be found in the supplementary material. 3 Discussion and comparison to other results For the inner case – i.e. f ∗∈H almost surely – we provide two different consistent stopping criteria. The first one (Section 2.1) is oblivious to the effective dimension parameter s, and the obtained bound corresponds to the “worst case” with respect to this parameter (that is, s = 1). However, an interesting feature of stopping rule (7) is that the rule itself does not depend on the a priori knowledge of the regularity parameter r, while the achieved learning rate does (and with the optimal dependence in r when s = 1). Hence, Theorem 2.1 implies that the obtained rule is automatically adaptive with respect to the regularity of the target function. This contrasts with the results obtained in [1] for linear regularization schemes of the form (3), (also in the case s = 1) for which the choice of the regularization parameter λ leading to optimal learning rates required the knowledge or r beforehand. When taking into account also the effective dimensionality parameter s, Theorem 2.2 provides the order-optimal convergence rate in the inner case (up to a log factor). A noticeable difference to Theorem 2.1 however, is that the stopping rule is no longer adaptive, that is, it depends on the a priori knowledge of parameters r and s. We observe that previously obtained results for linear regularization schemes of the form (2) in [6] and of the form (3) in [5], also rely on the a priori knowledge of r and s to determine the appropriate regularization parameter λ. The outer case – when the target function does not lie in the reproducing Kernel Hilbert space H – is more challenging and to some extent less well understood. The fact that additional assumptions are made is not a particular artefact of CG methods, but also appears in the studies of other regularization techniques. Here we follow the semi-supervised approach that is proposed in e.g. [5] (to study linear regularization of the form (3)) and assume that we have sufficient additional unlabeled data in order to ensure learning rates that are optimal as a function of the number of labeled data. We remark that other forms of additional requirements can be found in the recent literature in order to reach optimal rates. For regularized M-estimation schemes studied in [20], availability of unlabeled data is not required, but a condition is imposed of the form ∥f∥∞≤C ∥f∥p H ∥f∥1−p 2 for all f ∈H and some p ∈(0, 1]. In [13], assumptions on the supremum norm of the eigenfunctions of the kernel integral operator are made (see [20] for an in-depth discussion on this type of assumptions). Finally, as explained in the introduction, the term ’conjugate gradients’ comprises a class of methods that approximate the solution of linear equations on Krylov subspaces. In the context of learning, our approach is most closely linked to Partial Least Squares (PLS) [21] and its kernel extension [18]. While PLS has proven to be successful in a wide range of applications and is considered one of the standard approaches in chemometrics, there are only few studies of its theoretical properties. In [8, 14], consistency properties are provided for linear PLS under the assumption that the target function f ∗depends on a finite known number of orthogonal latent components. These findings were recently extended to the nonlinear case and without the assumption of a latent components model [3], but all results come without optimal rates of convergence. For the slightly different CG approach studied by Ong et al [17], bounds on the difference between the empirical risks of the CG approximation and of the target function are derived in [16], but no bounds on the generalization error were derived. 4 Proofs Convergence rates for regularization methods of the type (2) or (3) have been studied by casting kernel learning methods into the framework of inverse problems (see [9]). We use this framework for the present results as well, and recapitulate here some important facts. 5 We first define the empirical evaluation operator Tn as follows: Tn : g ∈H 7→Tng := (g(X1), . . . , g(Xn))⊤∈Rn and the empirical integral operator T ∗ n as: T ∗ n : u = (u1, . . . , un) ∈Rn 7→T ∗ nu := 1 n n X i=1 uik(Xi, ·) ∈H. Using the reproducing property of the kernel, it can be readily checked that Tn and T ∗ n are adjoint operators, i.e. they satisfy ⟨T ∗ nu, g⟩H = ⟨u, Tng⟩, for all u ∈Rn, g ∈H . Furthermore, Kn = TnT ∗ n, and therefore ∥α∥Kn = ∥fα∥H. Based on these facts, equation (5) can be rewritten as fm = arg min f∈Km(T ∗ nΥ,Sn) ∥T ∗ nY −Snf∥H , (9) where Sn = T ∗ nTn is a self-adjoint operator of H, called empirical covariance operator. This definition corresponds to that of the “usual” conjugate gradient algorithm formally applied to the so-called normal equation (in H) Snfα = T ∗ nΥ , which is obtained from (1) by left multiplication by T ∗ n. The advantage of this reformulation is that it can be interpreted as a “perturbation” of a population, noiseless version (of the equation and of the algorithm), wherein Y is replaced by the target function f ∗and the empirical operator T ∗ n, Tn are respectively replaced by their population analogues, the kernel integral operator T ∗: g ∈L2(PX) 7→T ∗g := Z k(., x)g(x)dPX(x) = E [k(X, ·)g(X)] ∈H , and the change-of-space operator T : g ∈H 7→g ∈L2(PX) . The latter maps a function to itself but between two Hilbert spaces which differ with respect to their geometry – the inner product of H being defined by the kernel function k, while the inner product of L2(PX) depends on the data generating distribution (this operator is well defined: since the kernel is bounded, all functions in H are bounded and therefore square integrable under any distribution PX). The following results, taken from [1] (Propositions 21 and 22) quantify more precisely that the empirical covariance operator Sn = T ∗ nTn and the empirical integral operator applied to the data, T ∗ nΥ, are close to the population covariance operator S = T ∗T and to the kernel integral operator applied to the noiseless target function, T ∗f ∗respectively. Proposition 4.1. Assume that k(x, x) ≤κ for all x ∈X. Then the following holds: P · ∥Sn −S∥HS ≤4κ √n r log 2 γ ¸ ≥1 −γ , (10) where ∥.∥HS denotes the Hilbert-Schmidt norm. If the representation f ∗= Tf ∗ H holds, and under assumption (Bernstein), we have the following: P · ∥T ∗ nY −Sf ∗ H∥≤4M√κ √n log 2 γ ¸ ≥1 −γ . (11) We note that f ∗= Tf ∗ H implies that the target function f ∗coincides with a function f ∗ H belonging to H (remember that T is just the change-of-space operator). Hence, the second result (11) is valid for the case with r ≥1/2, but it is not true in general for r < 1/2 . 4.1 Nemirovskii’s result on conjugate gradient regularization rates We recall a sharp result due to Nemirovskii [15] establishing convergence rates for conjugate gradient methods in a deterministic context. We present the result in an abstract context, then show how, combined with the previous section, it leads to a proof of Theorem 2.1. Consider the linear equation Az∗= b , 6 where A is a bounded linear operator over a Hilbert space H . Assume that the above equation has a solution and denote z∗its minimal norm solution; assume further that a self-adjoint operator ¯A, and an element ¯b ∈H are known such that °°A −¯A °° ≤δ ; °°b −¯b °° ≤ε , (12) (with δ and ε known positive numbers). Consider the CG algorithm based on the noisy operator ¯A and data ¯b, giving the output at step m zm = Arg Min z∈Km( ¯ A,¯b) °° ¯Az −¯b °°2 . (13) The discrepancy principle stopping rule is defined as follows. Consider a fixed constant τ > 1 and define ¯m = min © m ≥0 : °° ¯Azm −¯b °° < τ(δ ∥zm∥+ ε) ª . We output the solution obtained at step max(0, ¯m −1) . Consider a minor variation of of this rule: bm = ½ ¯m if q ¯m(0) < ηδ−1 max(0, ¯m −1) otherwise, where q ¯m is the degree m −1 polynomial such that z ¯m = q ¯m( ¯A)¯b , and η is an arbitrary positive constant such that η < 1/τ . Nemirovskii established the following theorem: Theorem 4.2. Assume that (a) max(∥A∥, °° ¯A °°) ≤L; and that (b) z∗= Aµu∗with ∥u∗∥≤R for some µ > 0. Then for any θ ∈[0, 1] , provided that bm < ∞it holds that °°Aθ (z b m −z∗) °°2 ≤c(µ, τ, η)R 2(1−θ) 1+µ (ε + δRLµ)2(θ+µ)/(1+µ) . 4.2 Proof of Theorem 2.1 We apply Nemirovskii’s result in our setting (assuming r ≥ 1 2): By identifying the approximate operator and data as ¯A = Sn and ¯b = T ∗ nY, we see that the CG algorithm considered by Nemirovskii (13) is exactly (9), more precisely with the identification zm = fm. For the population version, we identify A = S, and z∗= f ∗ H (remember that provided r ≥1 2 in the source condition, then there exists f ∗ H ∈H such that f ∗= Tf ∗ H). Condition (a) of Nemirovskii’s theorem 4.2 is satisfied with L = κ by the boundedness of the kernel. Condition (b) is satisfied with µ = r −1/2 ≥0 and R = κ−rρ, as implied by the source condition SC(r, ρ). Finally, the concentration result 4.1 ensures that the approximation conditions (12) are satisfied with probability 1 −2γ , more precisely with δ = 4κ √n q log 2 γ and ε = 4M√κ √n log 2 γ . (Here we replaced γ in (10) and (11) by γ/2, so that the two conditions are satisfied simultaneously, by the union bound). The operator norm is upper bounded by the Hilbert-Schmidt norm, so that the deviation inequality for the operators is actually stronger than what is needed. We consider the discrepancy principle stopping rule associated to these parameters, the choice η = 1/(2τ), and θ = 1 2 , thus obtaining the result, since °°°A 1 2 (z b m −z∗) °°° 2 = °°°S 1 2 (f b m −f ∗ H) °°° 2 H = ∥f b m −f ∗ H∥2 2 . 4.3 Notes on the proof of Theorems 2.2 and 2.3 The above proof shows that an application of Nemirovskii’s fundamental result for CG regularization of inverse problems under deterministic noise (on the data and the operator) allows us to obtain our first result. One key ingredient is the concentration property 4.1 which allows to bound deviations in a quasi-deterministic manner. To prove the sharper results of Theorems 2.2 and 2.3, such a direct approach does not work unfortunately, and a complete rework and extension of the proof is necessary. The proof of Theorem 2.2 is presented in the supplementary material to the paper. In a nutshell, the concentration result 4.1 is too coarse to prove the optimal rates of convergence taking into account the effective dimension 7 parameter. Instead of that result, we have to consider the deviations from the mean in a “warped” norm, i.e. of the form °°°(S + λI)−1 2 (T ∗ nY −T ∗f ∗) °°° for the data, and °°°(S + λI)−1 2 (Sn −S) °°° HS for the operator (with an appropriate choice of λ > 0) respectively. Deviations of this form were introduced and used in [5, 6] to obtain sharp rates in the framework of Tikhonov’s regularization (2) and of the more general linear regularization schemes of the form (3). Bounds on deviations of this form can be obtained via a Bernstein-type concentration inequality for Hilbert-space valued random variables. On the one hand, the results concerning linear regularization schemes of the form (3) do not apply to the nonlinear CG regularization. On the other hand, Nemirovskii’s result does not apply to deviations controlled in the warped norm. Moreover, the “outer” case introduces additional technical difficulties. Therefore, the proofs for Theorems 2.2 and 2.3, while still following the overall fundamental structure and ideas introduced by Nemirovskii, are significantly different in that context. As mentioned above, we present the complete proof of Theorem 2.2 in the supplementary material and a sketch of the proof of Theorem 2.3. 5 Conclusion In this work, we derived early stopping rules for kernel Conjugate Gradient regression that provide optimal learning rates to the true target function. Depending on the situation that we study, the rates are adaptive with respect to the regularity of the target function in some cases. The proofs of our results rely most importantly on ideas introduced by Nemirovskii [15] and further developed by Hanke [11] for CG methods in the deterministic case, and moreover on ideas inspired by [5, 6]. Certainly, in practice, as for a large majority of learning algorithms, cross-validation remains the standard approach for model selection. The motivation of this work is however mainly theoretical, and our overall goal is to show that from the learning theoretical point of view, CG regularization stands on equal footing with other well-studied regularization methods such as kernel ridge regression or more general linear regularization methods (which includes between many others L2 boosting). We also note that theoretically well-grounded model selection rules can generally help cross-validation in practice by providing a well-calibrated parametrization of regularizer functions, or, as is the case here, of thresholds used in the stopping rule. One crucial property used in the proofs is that the proposed CG regularization schemes can be conveniently cast in the reproducing kernel Hilbert space H as displayed in e.g (9). This reformulation is not possible for Kernel Partial Least Squares: It is also a CG type method, but uses the standard Euclidean norm instead of the Kn-norm used here. This point is the main technical justification on why we focus on (5) rather than kernel PLS. Obtaining optimal convergence rates also valid for Kernel PLS is an important future direction and should build on the present work. Another important direction for future efforts is the derivation of stopping rules that do not depend on the confidence parameter γ. Currently, this dependence prevents us to go from convergence in high probability to convergence in expectation, which would be desirable. Perhaps more importantly, it would be of interest to find a stopping rule that is adaptive to both parameters r (target function regularity) and s (effective dimension parameter) without their a priori knowledge. We recall that our first stopping rule is adaptive to r but at the price of being worst-case in s. In the literature on linear regularization methods, the optimal choice of regularization parameter is also non-adaptive, be it when considering optimal rates with respect to r only [1] or to both r and s [5]. An approach to alleviate this problem is to use a hold-out sample for model selection; this was studied theoretically in [7] for linear regularization methods (see also [4] for an account of the properties of hold-out in a general setup). We strongly believe that the hold-out method will yield theoretically founded adaptive model selection for CG as well. However, hold-out is typically regarded as inelegant in that it requires to throw away part of the data for estimation. It would be of more interest to study model selection methods that are based on using the whole data in the estimation phase. The application of Lepskii’s method is a possible step towards this direction. 8 References [1] F. Bauer, S. Pereverzev, and L. Rosasco. On Regularization Algorithms in Learning Theory. Journal of Complexity, 23:52–72, 2007. [2] N. Bissantz, T. Hohage, A. Munk, and F. Ruymgaart. Convergence Rates of General Regularization Methods for Statistical Inverse Problems and Applications. SIAM Journal on Numerical Analysis, 45(6):2610–2636, 2007. [3] G. Blanchard and N. Kr¨amer. Kernel Partial Least Squares is Universally Consistent. Proceedings of the 13th International Conference on Artificial Intelligence and Statistics, JMLR Workshop & Conference Proceedings, 9:57–64, 2010. [4] G. Blanchard and P. Massart. Discussion of V. Koltchinskii’s ”Local Rademacher complexities and oracle inequalities in risk minimization”. Annals of Statistics, 34(6):2664–2671, 2006. [5] A. Caponnetto. Optimal Rates for Regularization Operators in Learning Theory. Technical Report CBCL Paper 264/ CSAIL-TR 2006-062, Massachusetts Institute of Technology, 2006. [6] A. Caponnetto and E. De Vito. Optimal Rates for Regularized Least-squares Algorithm. Foundations of Computational Mathematics, 7(3):331–368, 2007. [7] A. Caponnetto and Y. Yao. Cross-validation based Adaptation for Regularization Operators in Learning Theory. Analysis and Applications, 8(2):161–183, 2010. [8] H. Chun and S. Keles. Sparse Partial Least Squares for Simultaneous Dimension Reduction and Variable Selection. Journal of the Royal Statistical Society B, 72(1):3–25, 2010. [9] E. De Vito, L. Rosasco, A. Caponnetto, U. De Giovannini, and F. Odone. Learning from Examples as an Inverse Problem. Journal of Machine Learning Research, 6(1):883, 2006. [10] L. Gy¨orfi, M. Kohler, A. Krzyzak, and H. Walk. A Distribution-Free Theory of Nonparametric Regression. Springer, 2002. [11] M. Hanke. Conjugate Gradient Type Methods for Linear Ill-posed Problems. Pitman Research Notes in Mathematics Series, 327, 1995. [12] L. Lo Gerfo, L. Rosasco, E. Odone, F.and De Vito, and A. Verri. Spectral Algorithms for Supervised Learning. Neural Computation, 20:1873–1897, 2008. [13] S. Mendelson and J. Neeman. Regularization in Kernel Learning. The Annals of Statistics, 38(1):526–565, 2010. [14] P. Naik and C.L. Tsai. Partial Least Squares Estimator for Single-index Models. Journal of the Royal Statistical Society B, 62(4):763–771, 2000. [15] A. S. Nemirovskii. The Regularizing Properties of the Adjoint Gradient Method in Ill-posed Problems. USSR Computational Mathematics and Mathematical Physics, 26(2):7–16, 1986. [16] C. S. Ong. Kernels: Regularization and Optimization. Doctoral dissertation, Australian National University, 2005. [17] C. S. Ong, X. Mary, S. Canu, and A. J. Smola. Learning with Non-positive Kernels. In Proceedings of the 21st International Conference on Machine Learning, pages 639 – 646, 2004. [18] R. Rosipal and L.J. Trejo. Kernel Partial Least Squares Regression in Reproducing Kernel Hilbert Spaces. Journal of Machine Learning Research, 2:97–123, 2001. [19] R. Rosipal, L.J. Trejo, and B. Matthews. Kernel PLS-SVC for Linear and Nonlinear Classification. In Proceedings of the Twentieth International Conference on Machine Learning, pages 640–647, Washington, DC, 2003. [20] I. Steinwart, D. Hush, and C. Scovel. Optimal Rates for Regularized Least Squares Regression. In Proceedings of the 22nd Annual Conference on Learning Theory, pages 79–93, 2009. [21] S. Wold, H. Ruhe, H. Wold, and W.J. Dunn III. The Collinearity Problem in Linear Regression. The Partial Least Squares (PLS) Approach to Generalized Inverses. SIAM Journal of Scientific and Statistical Computations, 5:735–743, 1984. [22] T. Zhang. Learning bounds for kernel regression using effective data dimensionality. Neural Computation, 17(9):2077–2098, 2005. 9
2010
217
3,985
Rates of convergence for the cluster tree Kamalika Chaudhuri UC San Diego kchaudhuri@ucsd.edu Sanjoy Dasgupta UC San Diego dasgupta@cs.ucsd.edu Abstract For a density f on Rd, a high-density cluster is any connected component of {x : f(x) ≥λ}, for some λ > 0. The set of all high-density clusters form a hierarchy called the cluster tree of f. We present a procedure for estimating the cluster tree given samples from f. We give finite-sample convergence rates for our algorithm, as well as lower bounds on the sample complexity of this estimation problem. 1 Introduction A central preoccupation of learning theory is to understand what statistical estimation based on a finite data set reveals about the underlying distribution from which the data were sampled. For classification problems, there is now a well-developed theory of generalization. For clustering, however, this kind of analysis has proved more elusive. Consider for instance k-means, possibly the most popular clustering procedure in use today. If this procedure is run on points X1, . . . , Xn from distribution f, and is told to find k clusters, what do these clusters reveal about f? Pollard [8] proved a basic consistency result: if the algorithm always finds the global minimum of the k-means cost function (which is NP-hard, see Theorem 3 of [3]), then as n →∞, the clustering is the globally optimal k-means solution for f. This result, however impressive, leaves the fundamental question unanswered: is the best k-means solution to f an interesting or desirable quantity, in settings outside of vector quantization? In this paper, we are interested in clustering procedures whose output on a finite sample converges to “natural clusters” of the underlying distribution f. There are doubtless many meaningful ways to define natural clusters. Here we follow some early work on clustering (for instance, [5]) by associating clusters with high-density connected regions. Specifically, a cluster of density f is any connected component of {x : f(x) ≥λ}, for any λ > 0. The collection of all such clusters forms an (infinite) hierarchy called the cluster tree (Figure 1). Are there hierarchical clustering algorithms which converge to the cluster tree? Previous theory work [5, 7] has provided weak consistency results for the single-linkage clustering algorithm, while other work [13] has suggested ways to overcome the deficiencies of this algorithm by making it more robust, but without proofs of convergence. In this paper, we propose a novel way to make single-linkage more robust, while retaining most of its elegance and simplicity (see Figure 3). We establish its finite-sample rate of convergence (Theorem 6); the centerpiece of our argument is a result on continuum percolation (Theorem 11). We also give a lower bound on the problem of cluster tree estimation (Theorem 12), which matches our upper bound in its dependence on most of the parameters of interest. 2 Definitions and previous work Let X be a subset of Rd. We exclusively consider Euclidean distance on X, denoted ∥· ∥. Let B(x, r) be the closed ball of radius r around x. 1 X C3 C2 C1 λ1 λ2 λ3 f(x) Figure 1: A probability density f on R, and three of its clusters: C1, C2, and C3. 2.1 The cluster tree We start with notions of connectivity. A path P in S ⊂X is a continuous 1 −1 function P : [0, 1] →S. If x = P(0) and y = P(1), we write x P⇝y, and we say that x and y are connected in S. This relation – “connected in S” – is an equivalence relation that partitions S into its connected components. We say S ⊂X is connected if it has a single connected component. The cluster tree is a hierarchy each of whose levels is a partition of a subset of X, which we will occasionally call a subpartition of X. Write Π(X) = {subpartitions of X}. Definition 1 For any f : X →R, the cluster tree of f is a function Cf : R →Π(X) given by Cf(λ) = connected components of {x ∈X : f(x) ≥λ}. Any element of Cf(λ), for any λ, is called a cluster of f. For any λ, Cf(λ) is a set of disjoint clusters of X. They form a hierarchy in the following sense. Lemma 2 Pick any λ′ ≤λ. Then: 1. For any C ∈Cf(λ), there exists C′ ∈Cf(λ′) such that C ⊆C′. 2. For any C ∈Cf(λ) and C′ ∈Cf(λ′), either C ⊆C′ or C ∩C′ = ∅. We will sometimes deal with the restriction of the cluster tree to a finite set of points x1, . . . , xn. Formally, the restriction of a subpartition C ∈Π(X) to these points is defined to be C[x1, . . . , xn] = {C ∩{x1, . . . , xn} : C ∈C}. Likewise, the restriction of the cluster tree is Cf[x1, . . . , xn] : R → Π({x1, . . . , xn}), where Cf[x1, . . . , xn](λ) = Cf(λ)[x1, . . . , xn]. See Figure 2 for an example. 2.2 Notion of convergence and previous work Suppose a sample Xn ⊂X of size n is used to construct a tree Cn that is an estimate of Cf. Hartigan [5] provided a very natural notion of consistency for this setting. Definition 3 For any sets A, A′ ⊂X, let An (resp, A′ n) denote the smallest cluster of Cn containing A ∩Xn (resp, A′ ∩Xn). We say Cn is consistent if, whenever A and A′ are different connected components of {x : f(x) ≥λ} (for some λ > 0), P(An is disjoint from A′ n) →1 as n →∞. It is well known that if Xn is used to build a uniformly consistent density estimate fn (that is, supx |fn(x) −f(x)| →0), then the cluster tree Cfn is consistent; see the appendix for details. The big problem is that Cfn is not easy to compute for typical density estimates fn: imagine, for instance, how one might go about trying to find level sets of a mixture of Gaussians! Wong and 2 X f(x) Figure 2: A probability density f, and the restriction of Cf to a finite set of eight points. Lane [14] have an efficient procedure that tries to approximate Cfn when fn is a k-nearest neighbor density estimate, but they have not shown that it preserves the consistency property of Cfn. There is a simple and elegant algorithm that is a plausible estimator of the cluster tree: single linkage (or Kruskal’s algorithm); see the appendix for pseudocode. Hartigan [5] has shown that it is consistent in one dimension (d = 1). But he also demonstrates, by a lovely reduction to continuum percolation, that this consistency fails in higher dimension d ≥2. The problem is the requirement that A ∩Xn ⊂An: by the time the clusters are large enough that one of them contains all of A, there is a reasonable chance that this cluster will be so big as to also contain part of A′. With this insight, Hartigan defines a weaker notion of fractional consistency, under which An (resp, A′ n) need not contain all of A∩Xn (resp, A′ ∩Xn), but merely a sizeable chunk of it – and ought to be very close (at distance →0 as n →∞) to the remainder. He then shows that single linkage has this weaker consistency property for any pair A, A′ for which the ratio of inf{f(x) : x ∈A∪A′} to sup{inf{f(x) : x ∈P} : paths P from A to A′} is sufficiently large. More recent work by Penrose [7] closes the gap and shows fractional consistency whenever this ratio is > 1. A more robust version of single linkage has been proposed by Wishart [13]: when connecting points at distance r from each other, only consider points that have at least k neighbors within distance r (for some k > 2). Thus initially, when r is small, only the regions of highest density are available for linkage, while the rest of the data set is ignored. As r gets larger, more and more of the data points become candidates for linkage. This scheme is intuitively sensible, but Wishart does not provide a proof of convergence. Thus it is unclear how to set k, for instance. Stuetzle and Nugent [12] have an appealing top-down scheme for estimating the cluster tree, along with a post-processing step (called runt pruning) that helps identify modes of the distribution. The consistency of this method has not yet been established. Several recent papers [6, 10, 9, 11] have considered the problem of recovering the connected components of {x : f(x) ≥λ} for a user-specified λ: the flat version of our problem. In particular, the algorithm of [6] is intuitively similar to ours, though they use a single graph in which each point is connected to its k nearest neighbors, whereas we have a hierarchy of graphs in which each point is connected to other points at distance ≤r (for various r). Interestingly, k-nn graphs are valuable for flat clustering because they can adapt to clusters of different scales (different average interpoint distances). But they are challenging to analyze and seem to require various regularity assumptions on the data. A pleasant feature of the hierarchical setting is that different scales appear at different levels of the tree, rather than being collapsed together. This allows the use of r-neighbor graphs, and makes possible an analysis that has minimal assumptions on the data. 3 Algorithm and results In this paper, we consider a generalization of Wishart’s scheme and of single linkage, shown in Figure 3. It has two free parameters: k and α. For practical reasons, it is of interest to keep these as 3 1. For each xi set rk(xi) = inf{r : B(xi, r) contains k data points}. 2. As r grows from 0 to ∞: (a) Construct a graph Gr with nodes {xi : rk(xi) ≤r}. Include edge (xi, xj) if ∥xi −xj∥≤αr. (b) Let bC(r) be the connected components of Gr. Figure 3: Algorithm for hierarchical clustering. The input is a sample Xn = {x1, . . . , xn} from density f on X. Parameters k and α need to be set. Single linkage is (α = 1, k = 2). Wishart suggested α = 1 and larger k. small as possible. We provide finite-sample convergence rates for all 1 ≤α ≤2 and we can achieve k ∼d log n, which we conjecture to be the best possible, if α > √ 2. Our rates for α = 1 force k to be much larger, exponential in d. It is a fascinating open problem to determine whether the setting (α = 1, k ∼d log n) yields consistency. 3.1 A notion of cluster salience Suppose density f is supported on some subset X of Rd. We will show that the hierarchical clustering procedure is consistent in the sense of Definition 3. But the more interesting question is, what clusters will be identified from a finite sample? To answer this, we introduce a notion of salience. The first consideration is that a cluster is hard to identify if it contains a thin “bridge” that would make it look disconnected in a small sample. To control this, we consider a “buffer zone” of width σ around the clusters. Definition 4 For Z ⊂Rd and σ > 0, write Zσ = Z + B(0, σ) = {y ∈Rd : infz∈Z ∥y −z∥≤σ}. An important technical point is that Zσ is a full-dimensional set, even if Z itself is not. Second, the ease of distinguishing two clusters A and A′ depends inevitably upon the separation between them. To keep things simple, we’ll use the same σ as a separation parameter. Definition 5 Let f be a density on X ⊂Rd. We say that A, A′ ⊂X are (σ, ǫ)-separated if there exists S ⊂X (separator set) such that: • Any path in X from A to A′ intersects S. • supx∈Sσ f(x) < (1 −ǫ) infx∈Aσ∪A′ σ f(x). Under this definition, Aσ and A′ σ must lie within X, otherwise the right-hand side of the inequality is zero. However, Sσ need not be contained in X. 3.2 Consistency and finite-sample rate of convergence Here we state the result for α > √ 2 and k ∼d log n. The analysis section also has results for 1 ≤α ≤2 and k ∼(2/α)dd log n. Theorem 6 There is an absolute constant C such that the following holds. Pick any δ, ǫ > 0, and run the algorithm on a sample Xn of size n drawn from f, with settings √ 2  1 + ǫ2 √ d  ≤α ≤2 and k = C · d log n ǫ2 · log2 1 δ . Then there is a mapping r : [0, ∞) →[0, ∞) such that with probability at least 1 −δ, the following holds uniformly for all pairs of connected subsets A, A′ ⊂X: If A, A′ are (σ, ǫ)-separated (for ǫ and some σ > 0), and if λ := inf x∈Aσ∪A′ σ f(x) ≥ 1 vd(σ/2)d · k n ·  1 + ǫ 2  (*) where vd is the volume of the unit ball in Rd, then: 4 1. Separation. A ∩Xn is disconnected from A′ ∩Xn in Gr(λ). 2. Connectedness. A ∩Xn and A′ ∩Xn are each individually connected in Gr(λ). The two parts of this theorem – separation and connectedness – are proved in Sections 3.3 and 3.4. We mention in passing that this finite-sample result implies consistency (Definition 3): as n →∞, take kn = (d log n)/ǫ2 n with any schedule of (ǫn : n = 1, 2, . . .) such that ǫn →0 and kn/n →0. Under mild conditions, any two connected components A, A′ of {f ≥λ} are (σ, ǫ)-separated for some σ, ǫ > 0 (see appendix); thus they will get distinguished for sufficiently large n. 3.3 Analysis: separation The cluster tree algorithm depends heavily on the radii rk(x): the distance within which x’s nearest k neighbors lie (including x itself). Thus the empirical probability mass of B(x, rk(x)) is k/n. To show that rk(x) is meaningful, we need to establish that the mass of this ball under density f is also, very approximately, k/n. The uniform convergence of these empirical counts follows from the fact that balls in Rd have finite VC dimension, d + 1. Using uniform Bernstein-type bounds, we get a set of basic inequalities that we use repeatedly. Lemma 7 Assume k ≥d log n, and fix some δ > 0. Then there exists a constant Cδ such that with probability > 1 −δ, every ball B ⊂Rd satisfies the following conditions: f(B) ≥Cδd log n n =⇒ fn(B) > 0 f(B) ≥k n + Cδ n p kd log n =⇒ fn(B) ≥k n f(B) ≤k n −Cδ n p kd log n =⇒ fn(B) < k n Here fn(B) = |Xn ∩B|/n is the empirical mass of B, while f(B) = R B f(x)dx is its true mass. PROOF: See appendix. Cδ = 2Co log(2/δ), where Co is the absolute constant from Lemma 16. □ We will henceforth think of δ as fixed, so that we do not have to repeatedly quantify over it. Lemma 8 Pick 0 < r < 2σ/(α + 2) such that vdrdλ ≥ k n + Cδ n p kd log n vdrdλ(1 −ǫ) < k n −Cδ n p kd log n (recall that vd is the volume of the unit ball in Rd). Then with probability > 1 −δ: 1. Gr contains all points in (Aσ−r ∪A′ σ−r) ∩Xn and no points in Sσ−r ∩Xn. 2. A ∩Xn is disconnected from A′ ∩Xn in Gr. PROOF: For (1), any point x ∈(Aσ−r∪A′ σ−r) has f(B(x, r)) ≥vdrdλ; and thus, by Lemma 7, has at least k neighbors within radius r. Likewise, any point x ∈Sσ−r has f(B(x, r)) < vdrdλ(1 −ǫ); and thus, by Lemma 7, has strictly fewer than k neighbors within distance r. For (2), since points in Sσ−r are absent from Gr, any path from A to A′ in that graph must have an edge across Sσ−r. But any such edge has length at least 2(σ −r) > αr and is thus not in Gr. □ Definition 9 Define r(λ) to be the value of r for which vdrdλ = k n + Cδ n √kd log n. To satisfy the conditions of Lemma 8, it suffices to take k ≥4C2 δ (d/ǫ2) log n; this is what we use. 5 xi π(xi) x′ x x′ x xi π(xi) xi+1 Figure 4: Left: P is a path from x to x′, and π(xi) is the point furthest along the path that is within distance r of xi. Right: The next point, xi+1 ∈Xn, is chosen from a slab of B(π(xi), r) that is perpendicular to xi −π(xi) and has width 2ζ/ √ d. 3.4 Analysis: connectedness We need to show that points in A (and similarly A′) are connected in Gr(λ). First we state a simple bound (proved in the appendix) that works if α = 2 and k ∼d log n; later we consider smaller α. Lemma 10 Suppose 1 ≤α ≤2. Then with probability ≥1 −δ, A ∩Xn is connected in Gr whenever r ≤2σ/(2 + α) and the conditions of Lemma 8 hold, and vdrdλ ≥  2 α d Cδd log n n . Comparing this to the definition of r(λ), we see that choosing α = 1 would entail k ≥2d, which is undesirable. We can get a more reasonable setting of k ∼d log n by choosing α = 2, but we’d like α to be as small as possible. A more refined argument shows that α ≈ √ 2 is enough. Theorem 11 Suppose α2 ≥2(1 + ζ/ √ d), for some 0 < ζ ≤1. Then, with probability > 1 −δ, A ∩Xn is connected in Gr whenever r ≤σ/2 and the conditions of Lemma 8 hold, and vdrdλ ≥8 ζ · Cδd log n n . PROOF: We have already made heavy use of uniform convergence over balls. We now also require a more complicated class G, each element of which is the intersection of an open ball and a slab defined by two parallel hyperplanes. Formally, each of these functions is defined by a center µ and a unit direction u, and is the indicator function of the set {z ∈Rd : ∥z −µ∥< r, |(z −µ) · u| ≤ζr/ √ d}. We will describe any such set as “the slab of B(µ, r) in direction u”. A simple calculation (see Lemma 4 of [4]) shows that the volume of this slab is at least ζ/4 that of B(x, r). Thus, if the slab lies entirely in Aσ, its probability mass is at least (ζ/4)vdrdλ. By uniform convergence over G (which has VC dimension 2d), we can then conclude (as in Lemma 7) that if (ζ/4)vdrdλ ≥(2Cδd log n)/n, then with probability at least 1 −δ, every such slab within A contains at least one data point. Pick any x, x′ ∈A∩Xn; there is a path P in A with x P⇝x′. We’ll identify a sequence of data points x0 = x, x1, x2, . . ., ending in x′, such that for every i, point xi is active in Gr and ∥xi−xi+1∥≤αr. This will confirm that x is connected to x′ in Gr. To begin with, recall that P is a continuous 1 −1 function from [0, 1] into A. We are also interested in the inverse P −1, which sends a point on the path back to its parametrization in [0, 1]. For any point y ∈X, define N(y) to be the portion of [0, 1] whose image under P lies in B(y, r): that is, N(y) = {0 ≤z ≤1 : P(z) ∈B(y, r)}. If y is within distance r of P, then N(y) is nonempty. Define π(y) = P(sup N(y)), the furthest point along the path within distance r of y (Figure 4, left). The sequence x0, x1, x2, . . . is defined iteratively; x0 = x, and for i = 0, 1, 2, . . . : • If ∥xi −x′∥≤αr, set xi+1 = x′ and stop. 6 • By construction, xi is within distance r of path P and hence N(xi) is nonempty. • Let B be the open ball of radius r around π(xi). The slab of B in direction xi −π(xi) must contain a data point; this is xi+1 (Figure 4, right). The process eventually stops because each π(xi+1) is strictly further along path P than π(xi); formally, P −1(π(xi+1)) > P −1(π(xi)). This is because ∥xi+1 −π(xi)∥< r, so by continuity of the function P, there are points further along the path (beyond π(xi)) whose distance to xi+1 is still < r. Thus xi+1 is distinct from x0, x1, . . . , xi. Since there are finitely many data points, the process must terminate, so the sequence {xi} does constitute a path from x to x′. Each xi lies in Ar ⊆Aσ−r and is thus active in Gr (Lemma 8). Finally, the distance between successive points is: ∥xi −xi+1∥2 = ∥xi −π(xi) + π(xi) −xi+1∥2 = ∥xi −π(xi)∥2 + ∥π(xi) −xi+1∥2 + 2(xi −π(xi)) · (π(xi) −xi+1) ≤ 2r2 + 2ζr2 √ d ≤α2r2, where the second-last inequality comes from the definition of slab. □ To complete the proof of Theorem 6, take k = 4C2 δ (d/ǫ2) log n, which satisfies the requirements of Lemma 8 as well as those of Theorem 11, using ζ = 2ǫ2. The relationship that defines r(λ) (Definition 9) then translates into vdrdλ = k n  1 + ǫ 2  . This shows that clusters at density level λ emerge when the growing radius r of the cluster tree algorithm reaches roughly (k/(λvdn))1/d. In order for (σ, ǫ)-separated clusters to be distinguished, we need this radius to be at most σ/2; this is what yields the final lower bound on λ. 4 Lower bound We have shown that the algorithm of Figure 3 distinguishes pairs of clusters that are (σ, ǫ)-separated. The number of samples it requires to capture clusters at density ≥λ is, by Theorem 6, O  d vd(σ/2)dλǫ2 log d vd(σ/2)dλǫ2  , We’ll now show that this dependence on σ, λ, and ǫ is optimal. The only room for improvement, therefore, is in constants involving d. Theorem 12 Pick any ǫ in (0, 1/2), any d > 1, and any σ, λ > 0 such that λvd−1σd < 1/50. Then there exist: an input space X ⊂Rd; a finite family of densities Θ = {θi} on X; subsets Ai, A′ i, Si ⊂ X such that Ai and A′ i are (σ, ǫ)-separated by Si for density θi, and infx∈Ai,σ∪A′ i,σ θi(x) ≥λ, with the following additional property. Consider any algorithm that is given n ≥100 i.i.d. samples Xn from some θi ∈Θ and, with probability at least 1/2, outputs a tree in which the smallest cluster containing Ai ∩Xn is disjoint from the smallest cluster containing A′ i ∩Xn. Then n = Ω  1 vdσdλǫ2d1/2 log 1 vdσdλ  . PROOF: We start by constructing the various spaces and densities. X is made up of two disjoint regions: a cylinder X0, and an additional region X1 whose sole purpose is as a repository for excess probability mass. Let Bd−1 be the unit ball in Rd−1, and let σBd−1 be this same ball scaled to have radius σ. The cylinder X0 stretches along the x1-axis; its cross-section is σBd−1 and its length is 4(c + 1)σ for some c > 1 to be specified: X0 = [0, 4(c + 1)σ] × σBd−1. Here is a picture of it: 7 0 4(c + 1)σ 4σ 8σ 12σ σ x1 axis We will construct a family of densities Θ = {θi} on X, and then argue that any cluster tree algorithm that is able to distinguish (σ, ǫ)-separated clusters must be able, when given samples from some θI, to determine the identity of I. The sample complexity of this latter task can be lower-bounded using Fano’s inequality (typically stated as in [2], but easily rewritten in the convenient form of [15], see appendix): it is Ω((log |Θ|)/β), for β = maxi̸=j K(θi, θj), where K(·, ·) is KL divergence. The family Θ contains c −1 densities θ1, . . . , θc−1, where θi is defined as follows: • Density λ on [0, 4σi+σ]×σBd−1 and on [4σi+3σ, 4(c+1)σ]×σBd−1. Since the crosssectional area of the cylinder is vd−1σd−1, the total mass here is λvd−1σd(4(c + 1) −2). • Density λ(1 −ǫ) on (4σi + σ, 4σi + 3σ) × σBd−1. • Point masses 1/(2c) at locations 4σ, 8σ, . . . , 4cσ along the x1-axis (use arbitrarily narrow spikes to avoid discontinuities). • The remaining mass, 1/2−λvd−1σd(4(c+1)−2ǫ), is placed on X1 in some fixed manner (that does not vary between different densities in Θ). Here is a sketch of θi. The low-density region of width 2σ is centered at 4σi + 2σ on the x1-axis. point mass 1/2c density λ(1 −ǫ) density λ 2σ For any i ̸= j, the densities θi and θj differ only on the cylindrical sections (4σi + σ, 4σi + 3σ) × σBd−1 and (4σj +σ, 4σj +3σ)×σBd−1, which are disjoint and each have volume 2vd−1σd. Thus K(θi, θj) = 2vd−1σd  λ log λ λ(1 −ǫ) + λ(1 −ǫ) log λ(1 −ǫ) λ  = 2vd−1σdλ(−ǫ log(1 −ǫ)) ≤ 4 ln 2vd−1σdλǫ2 (using ln(1 −x) ≥−2x for 0 < x ≤1/2). This is an upper bound on the β in the Fano bound. Now define the clusters and separators as follows: for each 1 ≤i ≤c −1, • Ai is the line segment [σ, 4σi] along the x1-axis, • A′ i is the line segment [4σ(i + 1), 4(c + 1)σ −σ] along the x1-axis, and • Si = {4σi + 2σ} × σBd−1 is the cross-section of the cylinder at location 4σi + 2σ. Thus Ai and A′ i are one-dimensional sets while Si is a (d −1)-dimensional set. It can be checked that Ai and A′ i are (σ, ǫ)-separated by Si in density θi. With the various structures defined, what remains is to argue that if an algorithm is given a sample Xn from some θI (where I is unknown), and is able to separate AI ∩Xn from A′ I ∩Xn, then it can effectively infer I. This has sample complexity Ω((log c)/β). Details are in the appendix. □ There remains a discrepancy of 2d between the upper and lower bounds; it is an interesting open problem to close this gap. Does the (α = 1, k ∼d log n) setting (yet to be analyzed) do the job? Acknowledgments. We thank the anonymous reviewers for their detailed and insightful comments, and the National Science Foundation for support under grant IIS-0347646. 8 References [1] O. Bousquet, S. Boucheron, and G. Lugosi. Introduction to statistical learning theory. Lecture Notes in Artificial Intelligence, 3176:169–207, 2004. [2] T. Cover and J. Thomas. Elements of Information Theory. Wiley, 2005. [3] S. Dasgupta and Y. Freund. Random projection trees for vector quantization. IEEE Transactions on Information Theory, 55(7):3229–3242, 2009. [4] S. Dasgupta, A. Kalai, and C. Monteleoni. Analysis of perceptron-based active learning. Journal of Machine Learning Research, 10:281–299, 2009. [5] J.A. Hartigan. Consistency of single linkage for high-density clusters. Journal of the American Statistical Association, 76(374):388–394, 1981. [6] M. Maier, M. Hein, and U. von Luxburg. Optimal construction of k-nearest neighbor graphs for identifying noisy clusters. Theoretical Computer Science, 410:1749–1764, 2009. [7] M. Penrose. Single linkage clustering and continuum percolation. Journal of Multivariate Analysis, 53:94–109, 1995. [8] D. Pollard. Strong consistency of k-means clustering. Annals of Statistics, 9(1):135–140, 1981. [9] P. Rigollet and R. Vert. Fast rates for plug-in estimators of density level sets. Bernoulli, 15(4):1154–1178, 2009. [10] A. Rinaldo and L. Wasserman. Generalized density clustering. Annals of Statistics, 38(5):2678–2722, 2010. [11] A. Singh, C. Scott, and R. Nowak. Adaptive hausdorff estimation of density level sets. Annals of Statistics, 37(5B):2760–2782, 2009. [12] W. Stuetzle and R. Nugent. A generalized single linkage method for estimating the cluster tree of a density. Journal of Computational and Graphical Statistics, 19(2):397–418, 2010. [13] D. Wishart. Mode analysis: a generalization of nearest neighbor which reduces chaining effects. In Proceedings of the Colloquium on Numerical Taxonomy held in the University of St. Andrews, pages 282–308, 1969. [14] M.A. Wong and T. Lane. A kth nearest neighbour clustering procedure. Journal of the Royal Statistical Society Series B, 45(3):362–368, 1983. [15] B. Yu. Assouad, Fano and Le Cam. Festschrift for Lucien Le Cam, pages 423–435, 1997. 9
2010
218
3,986
Throttling Poisson Processes Uwe Dick Peter Haider Thomas Vanck Michael Br¨uckner Tobias Scheffer University of Potsdam Department of Computer Science August-Bebel-Strasse 89, 14482 Potsdam, Germany {uwedick,haider,vanck,mibrueck,scheffer}@cs.uni-potsdam.de Abstract We study a setting in which Poisson processes generate sequences of decisionmaking events. The optimization goal is allowed to depend on the rate of decision outcomes; the rate may depend on a potentially long backlog of events and decisions. We model the problem as a Poisson process with a throttling policy that enforces a data-dependent rate limit and reduce the learning problem to a convex optimization problem that can be solved efficiently. This problem setting matches applications in which damage caused by an attacker grows as a function of the rate of unsuppressed hostile events. We report on experiments on abuse detection for an email service. 1 Introduction This paper studies a family of decision-making problems in which discrete events occur on a continuous time scale. The time intervals between events are governed by a Poisson process. Each event has to be met by a decision to either suppress or allow it. The optimization criterion is allowed to depend on the rate of decision outcomes within a time interval; the criterion is not necessarily a sum of a loss function over individual decisions. The problems that we study cannot adequately be modeled as Mavkov or semi-Markov decision problems because the probability of transitioning from any value of decision rates to any other value depends on the exact points in time at which each event occurred in the past. Encoding the entire backlog of time stamps in the state of a Markov process would lead to an unwieldy formalism. The learning formalism which we explore in this paper models the problem directly as a Poisson process with a throttling policy that depends on an explicit data-dependent rate limit, which allows us to refer to a result from queuing theory and derive a convex optimization problem that can be solved efficiently. Consider the following two scenarios as motivating applications. In order to stage a successful denial-of-service attack, an assailant has to post requests at a rate that exceeds the capacity of the service. A prevention system has to meet each request by a decision to suppress it, or allow it to be processed by the service provider. Suppressing legitimate requests runs up costs. Passing few abusive requests to be processed runs up virtually no costs. Only when the rate of passed abusive requests exceeds a certain capacity, the service becomes unavailable and costs incur. The following second application scenario will serve as a running example throughout this paper. Any email service provider has to deal with a certain fraction of accounts that are set up to disseminate phishing messages and email spam. Serving the occasional spam message causes no harm other than consuming computational ressources. But if the rate of spam messages that an outbound email server discharges triggers alerting mechanisms of other providers, then that outbound server will become blacklisted and the service is disrupted. Naturally, suppressing any legitimate message is a disruption to the service, too. 1 Let x denote a sequence of decision events x1, . . . , xn; each event is a point xi ∈X in an instance space. Sequence t denotes the time stamps ti ∈R+ of the decision events with ti < ti+1. We define an episode e by the tuple e = (x, t, y) which includes a label y ∈{−1, +1}. In our application, an episode corresponds to the sequence of emails sent within an observation interval from a legitimate (y = −1) or abusive (y = +1) account e. We write xi and ti to denote the initial sequence of the first i elements of x and t, respectively. Note that the length n of the sequences can be different for different episodes. Let A = {−1, +1} be a binary decision set, where +1 corresponds to suppressing an event and −1 corresponds to passing it. The decision model π gets to make a decision π (xi, ti) ∈A at each point in time ti at which an event occurs. The outbound rate rπ(t′|x, t) at time t′ for episode e and decision model π is a crucial concept. It counts the number of events that were let pass during a time interval of lengh τ ending before t′. It is therefore defined as rπ(t′|x, t) = |{i : π(xi, ti) = −1 ∧ti ∈[t′ −τ, t′)}|. In outbound spam throttling, τ corresponds to the time interval that is used by other providers to estimate the incoming spam rate. We define an immediate loss function ℓ: Y ×A →R+ that specifies the immediate loss of deciding a ∈A for an event with label y ∈Y as ℓ(y, a) = { c+ y = +1 ∧a = −1 c− y = −1 ∧a = +1 0 otherwise, (1) where c+ and c−are positive constants, corresponding to costs of false positive and false negative decisions. Additionally, the rate-based loss λ : Y × R+ →R+ is the loss that runs up per unit of time. We require λ to be a convex, monotonically increasing function in the outbound rate for y = +1 and to be 0 otherwise. The rate-based loss reflects the risk of the service getting blacklisted based on the current sending behaviour. This risk grows in the rate of spam messages discharged and the duration over which a high sending rate of spam messages is maintained. The total loss of a model π for an episode e = (x, t, y) is therefore defined as L(π; x, t, y) = ∫tn+τ t1 λ (y, rπ(t′|x, t)) dt′ + n ∑ i=1 ℓ(y, π(xi, ti)) (2) The first term penalizes a high rate of unsuppressed events with label +1—in our example, a high rate of unsuppressed spam messages—whereas the second term penalizes each decision individually. For the special case of λ = 0, the optimization criterion resolves to a risk, and the problem becomes a standard binary classification problem. An unknown target distribution over p(x, t, y) induces the overall optimization goal Ex,t,y[L(π; x, t, y)]. The learning problem consists in finding π∗= argminπEx,t,y[L(π; x, t, y)] from a training sample of tuples D = {(x1 n1, t1 n1, y1), . . . , (xm nm, tm nm, ym)}. 2 Poisson Process Model We assume the following data generation process for episodes e = (x, t, y) that will allow us to derive an optimization problem to be solved by the learning procedure. First, a rate parameter ρ, label y, and the sequence of instances x, are drawn from a joint distribution p(x, ρ, y). Rate ρ is the parameter of a Poisson process p(t|ρ) which now generates time sequence t. The expected loss of decision model π is taken over all input sequences x, rate parameter ρ, label y, and over all possible sequences of time stamps t that can be generated according to the Poisson process. Ex,t,y[L(π; x, t, y)] = ∫ x ∫ t ∫ ρ ∑ y L(π; x, t, y)p(t|ρ)p(x, ρ, y)dρdtdx (3) 2.1 Derivation of Empirical Loss In deriving the empirical counterpart of the expected loss, we want to exploit our assumption that time stamps are generated by a Poisson process with unknown but fixed rate parameter. For each 2 input episode (x, t, y), instead of minimizing the expected loss over the single observed sequence of time stamps, we would therefore like to minimize the expected loss over all sequences of time stamps generated by a Poisson process with the rate parameter that has most likely generated the observed sequence of time stamps. Equation 4 introduces the observed time sequence of time stamps t′ into Equation 3 and uses the fact that the rate parameter ρ is independent of x and y given t′. Equation 5 rearranges the terms, and Equation 6 writes the central integral as a conditional expected value of the loss given the rate ρ. Finally, Equation 7 approximates the integral over all values of ρ by a single summand with value ρ∗for each episode. Ex,t,y[L(π; x, t, y)] = ∫ t′ ∫ x ∫ t ∫ ρ ∑ y L(π; x, t, y)p(t|ρ)p(ρ|t′)p(x, t′, y)dρdtdxdt′ (4) = ∫ t′ ∫ x ∑ y (∫ ρ (∫ t L(π; x, t, y)p(t|ρ)dt ) p(ρ|t′)dρ ) p(x, t′, y)dxdt′ (5) = ∫ t′ ∫ x ∑ y (∫ ρ (Et [L(π; x, t, y) | ρ] p(ρ|t′)dρ ) p(x, t′, y)dxdt′ (6) ≈ ∫ t′ ∫ x ∑ y Et [L(π; x, t, y) | ρ∗] p(x, t′, y)dxdt′ (7) We arrive at the regularized risk functional in Equation 8 by replacing p(x, t′, y) by 1 m for all observations in D and inserting MAP estimate ρ∗ e as parameter that generated time stamps te. The influence of the convex regularizer Ωis determined by regularization parameter η > 0. ˆEx,t,y[L(π; x, t, y)] = 1 m m ∑ e=1 Et [L(π; xe, t, ye) | ρ∗ e] + ηΩ(π) (8) with ρ∗ e = argmaxρp(ρ|te) Minimizing this risk functional is the basis of the learning procedure in the next section. As noted in Section 1, for the special case when the rate-based loss λ is zero, the problem reduces to a standard weighted binary classification problem and would be easy to solve with standard learning algorithms. However, as we will see in Section 4, the λ-dependent loss makes the task of learning a decision function hard to solve; attributing individual decisions with their “fair share” of the rate loss—and thus estimating the cost of the decision—is problematic. The Erlang learning model of Section 3 employs a decision function that allows to factorize the rate loss naturally. 3 Erlang Learning Model In the following we derive an optimization problem that is based on modeling the policy as a datadependent rate limit. This allows us to apply a result from queuing theory and approximate the empirical risk functional of Equation (8) with a convex upper bound. We define decision model π in terms of the function fθ(xi, ti) = exp(θTϕ (xi, ti)) which sets a limit on the admissible rate of events, where ϕ is some feature mapping of the initial sequence (xi, ti) and θ is a parameter vector. The throttling model is defined as π (xi, ti) = { −1 (“allow”) if rπ(ti|xi, ti) + 1 ≤fθ(xi, ti) +1 (“suppress”) otherwise. (9) The decision model blocks event xi, if the number of instances that were sent within [ti −τ, ti), plus the current instance, would exceed rate limit fθ(xi, ti). We will now transform the optimization goal of Equation 8 into an optimization problem that can be solved by standard convex optimization tools. To this end, we first decompose the expected loss of an input sequence given the rate parameter in Equation 8 into immediate and rate-dependent loss terms. Note that te denotes the observed training sequence whereas t serves as expectation variable for the expectation Et[·|ρe∗] over all sequences 3 conditional on the Poisson process rate parameter ρe∗as in Equation 8. Et [L(π; xe, t, ye) | ρ∗ e] = Et [∫tne+τ t1 λ (ye, rπ(t′|xe, t)) dt′ | ρ∗ e ] + ne ∑ i=1 Et[ℓ(ye, π(xe i, ti)) | ρ∗ e] (10) = Et [ ∫tne+τ t1 λ (ye, rπ(t′|xe, t)) dt′ | ρ∗ e ] + ne ∑ i=1 Et [ δ ( π(xe i, ti) ̸=ye) | ρ∗ e ] ℓ(ye, −ye) (11) Equation 10 uses the definition of the loss function in Equation 2. Equation 11 exploits that only decisions against the correct label, π(xe i, ti) ̸= ye, incur a positive loss ℓ(y, π(xe i, ti)). We will first derive a convex approximation of the expected rate-based loss Et[ ∫tne+τ t1 λ (ye, rπ(t′|xe, t)) dt′|ρ∗ e] (left side of Equation 11). Our definition of the decision model allows us to factorize the expected rate-based loss into contributions of individual rate limit decisions. The convexity will be addressed by Theorem 1. Since the outbound rate rπ increases only at decision points ti, we can upper-bound its value with the value immediately after the most recent decision in Equation 12. Equation 13 approximates the actual outbound rate with the rate limit given by fθ(xe i, te i). This is reasonable because the outbound rate depends on the policy decisions which are defined in terms of the rate limit. Because t is generated by a Poisson process, Et[ti+1 −ti | ρ∗ e] = 1 ρ∗e (Equation 14). Et [∫tne+τ t1 λ (ye, rπ(t′|xe, t)) dt′ | ρ∗ e ] ≤ ne−1 ∑ i=1 Et[ti+1 −ti | ρ∗ e]λ(ye, rπ(ti|xe, t)) + τλ(ye, rπ(tne|xe, t)) (12) ≈ ne−1 ∑ i=1 Et[ti+1 −ti | ρ∗ e]λ ( ye, fθ(xe i, te i) ) + τλ ( ye, fθ(xe ne, te ne)) (13) = ne−1 ∑ i=1 1 ρe∗λ ( ye, fθ(xe i, te i) ) + τλ ( ye, fθ(xe ne, te ne) ) (14) We have thus established a convex approximation of the left side of Equation 11. We will now derive a closed form approximation of Et[δ (π(xe i, ti) ̸= ye) | ρ∗ e], the second part of the loss functional in Equation 11. Queuing theory provides a convex approximation: The Erlang-B formula [5] gives the probability that a queuing process which maintains a constant rate limit of f within a time interval of τ will block an event when events are generated by a Poisson process with given rate parameter ρ. Fortet’s formula (Equation 15) generalizes the Erlang-B formula for non-integer rate limits. B(f, ρτ) = 1 ∫∞ 0 e−z(1 + z ρτ )fdz (15) The integral can be computed efficiently using a rapidly converging series, c.f. [5]. The formula requires a constant rate limit, so that the process can reach an equilibrium. In our model, the rate limit fθ(xi, ti) is a function of the sequences xi and ti until instance xi, and Fortet’s formula therefore serves as an approximation. Et [δ(π(xe i, ti)=1)|ρ∗ e] ≈ B(fθ(xe i, te i), ρ∗ eτ) (16) = [∫∞ 0 e−z(1 + z ρ∗eτ )fθ(xe i ,te i )dz ]−1 (17) Unfortunately, Equation 17 is not convex in θ. We approximate it with the convex upper bound −log (1 −B(fθ(xe i, te i), ρ∗ eτ)) (cf. the dashed green line in the left panel of Figure 2(b) for an illustration). This is an upper bound, because −log p ≥1 −p for 0 ≤p ≤1; its convexity is addressed by Theorem 1. Likewise, Et [δ(π(xe i, ti)=−1)|ρ∗ e] is approximated by upper bound log (B(fθ(xe i, te i), ρ∗ eτ)). We have thus derived a convex upper bound of Et[δ (π(xe i, ti) ̸= ye) |ρ∗ e]. 4 Combining the two components of the optimization goal (Equation 11) and adding convex regularizer Ω(θ) and regularization parameter η > 0 (Equation 8), we arrive at an optimization problem for finding the optimal policy parameters θ. Optimization Problem 1 (Erlang Learning Model). Over θ, minimize R(θ) = 1 m m ∑ e=1 { ne−1 ∑ i=1 1 ρe∗λ ( ye, fθ(xe i, te i) ) + τλ ( ye, fθ(xe ne, te ne) ) (18) + ne ∑ i=1 −log [ δ(ye=1) −yeB ( fθ(xe i, te i), ρ∗ eτ )] ℓ(ye, −ye) } + ηΩ(θ) Next we show that minimizing risk functional R amounts to solving a convex optimization problem. Theorem 1 (Convexity of R). R(θ) is a convex risk functional in θ for any ρ∗ e > 0 and τ > 0. Proof. The convexity of λ and Ωfollows from their definitions. It remains to be shown that both −log B(fθ(·), ρ∗ eτ)) and −log(1 −B(fθ(·), ρ∗ e) are convex in θ. Component ℓ(ye, −ye) of Equation 18 is independent of θ. It is known that Fortet’s formula B(f, ρe∗τ)) is convex, monotically decreasing, and positive in f for ρ∗ eτ > 0 [5]. Furthermore −log(B(f, ρ∗ eτ))) is convex and monotonically increasing. Since fθ(·) is convex in θ, it follows that −log(B(fθ(·), ρ∗ e)) is also convex. Next, we show that −log(1 −B(fθ(·), ρ∗ eτ))) is convex and monotonically decreasing. From the above it follows that b(f) = 1 −B(f, ρ∗ eτ)) is monotonically increasing, concave and positive. Therefore, d2 df 2 −ln(b(f)) = 1 b2(f)b′(f) + b ′′(f) −1 b(f) ≥0 as both summands are positive. Again, it follows that −log(1 −B(fθ(·), ρ∗ eτ))) is convex in θ due to the definition of fθ. 4 Prior Work and Reference Methods We will now discuss how the problem of minimizing the expected loss, π∗ = argminπEx,t,y[L(π; x, t, y)], from a sample of sequences x of events with labels y and observed rate parameters ρ∗relates to previously studied methods. Sequential decision-making problems are commonly solved by reinforcement learning approaches, which have to attribute the loss of an episode (Equation 2) to individual decisions in order to learn to decide optimally in each state. Thus, a crucial part of defining an appropriate procedure for learning the optimal policy consists in defining an appropriate state-action loss function. Qπ(s, a) estimates the loss of performing action a in state s when following policy π for the rest of the episode. Several different state-action loss functions for related problems have been investigated in the literature. For example, policy gradient methods such as in [4] assign the loss of an episode to individual decisions proportional to the log-probabilities of the decisions. Other approaches use sampled estimates of the rest of the episode Q(si, ai) = L(π, s) −L(π, si) or the expected loss if a distribution of states of the episode is known [7]. Such general purpose methods, however, are not the optimal choice for the particular problem instance at hand. Consider the special case λ = 0, where the problem reduces to a sequence of independent binary decisions. Assigning the cumulative loss of the episode to all instances leads to a grave distortion of the optimization criterion. As reference in our experiments we use a state-action loss function that assigns the immediate loss ℓ(y, ai) to state si only. Decision ai determines the loss incurred by λ only for τ time units, in the interval [ti, ti + τ). The corresponding rate loss is ∫ti+τ ti λ(y, rπ(t′|x, t))dt′. Thus, the loss of deciding ai = −1 instead of ai = +1 is the difference in the corresponding λ-induced loss. Let x−i, t−i denote the sequence x, t without instance xi. This leads to a state-action loss function that is the sum of immediate loss and λ-induced loss; it serves as our first baseline. Qπ it(si, a) = ℓ(y, a) + δ(a=−1) ∫ti+τ ti λ(y, rπ(t′|x−i, t−i) + 1) −λ(y, rπ(t′|x−i, t−i))dt′ (19) By approximating ∫ti+τ ti λ(y, rπ(t′|x, t)) with τλ(y, rπ(ti|x, t)), we define the state-action loss function of a second plausible state-action loss that, instead of using the observed loss to estimate 5 the loss of an action, approximates it with the loss that would be incurred by the current outbound rate rπ(ti|x−i, t−i) for τ time units. Qπ ub(si, a) = ℓ(y, a) + δ(a=−1) [ τ ( λ(y, rπ(ti|x−i, t−i) + 1) −λ(y, rπ(ti|x−i, t−i)) )] (20) The state variable s has to encode all information a policy needs to decide. Since the loss crucially depends on outbound rate rπ(t′|x, t), any throttling model must have access to the current outbound rate. The transition between a current and a subsequent rate depends on the time at which the next event occurs, but also on the entire backlog of events, because past events may drop out of the interval τ at any time. In analogy to the information that is available to the Erlang learning model, it is natural to encode states si as a vector of features ϕ(xi, ti) (see Section 5 for details) together with the current outbound rate rπ(ti|x, t). Given a representation of the state and a state-action loss function, different approaches for defining the policy π and optimizing its parameters have been investigated. For our baselines, we use the following two methods. Policy gradient. Policy gradient methods model a stochastic policy directly as a parameterized decision function. They perform a gradient descent that always converges to a local optimum [8]. The gradient of the expected loss with respect to the parameters is estimated in each iteration k for the distribution over episodes, states, and losses that the current policy πk induces. However, in order to achieve fast convergence to the optimal polity, one would need to determine the gradient for the distribution over episodes, states, and losses induced by the optimal policy. We implement two policy gradient algorithms for experimentation which only differ in using Qit and Qub, respectively. They are denoted PGit and PGub in the experiments. Both use a logistic regression function as decision function, the two-class equivalent of the Gibbs distribution which is used in the literature. Iterative Classifier. The second approach is to represent policies as classifiers and to employ methods for supervised classification learning. A variety of papers addresses this approach [6, 3, 7]. We use an algorithm that is inspired by [1, 2] and is adapted to the problem setting at hand. Blatt and Hero [2] investigate an algorithm that finds non-stationary policies for two-action T-step MDPs by solving a sequence of one-step decisions via a binary classifier. Classifiers πt for time step t are learned iteratively on the distribution of states generated by the policy (π0, . . . , πt−1). Our derived algorithm iteratively learns weighted support vector machine (SVM) classifier πk+1 in iteration k+1 on the set of instances and losses Qπk(s, a) that were observed after classifier πk was used as policy on the training sample. The weight vector of πk is denoted θk. The weight of misclassification of s is given by Qπk(s, −y). The SVM weight vector is altered in each iteration as θk+1 = (1−αk)θk + αkˆθ, where ˆθ is the weight vector of the new classifier that was learned on the observed losses. In the experiments, two iterative SVM learner were implemented, denoted It-SVMit and It-SVMub, corresponding to the used state-action losses Qit and Qub, respectively. Note that for the special case λ = 0 the iterative SVM algorithm reduces to a standard SVM algorithm. All four procedures iteratively estimate the loss of a policy decision on the data via a state-action loss function and learn a new policy π based on this estimated cost of the decisions. Convergence guarantees typically require the Markov assumption; that is, the process is required to possess a stationary transition distribution P(si+1|si, ai). Since the transition distribution in fact depends on the entire backlog of time stamps and the duration over which state si has been maintained, the Markov assumption is violated to some extent in practice. In addition to that, λ-based loss estimates are sampled from a Poisson process. In each iteration π is learned to minimize sampled and inherently random losses of decisions. Thus, convergence to a robust solution becomes unlikely. In contrast, the Erlang learning model directly minimizes the λ-loss by assigning a rate limit. The rate limit implies an expectation of decisions. In other words, the λ-based loss is minimized without explicitely estimating the loss of any decisions that are implied by the rate limit. The convexity of the risk functional in Optimization Problem 1 guarantees convergence to the global optimum. 5 Application The goal of our experiments is to study the relative benefits of the Erlang learning model and the four reference methods over a number of loss functions. The subject of our experimentation is the problem of suppressing spam and phishing messages sent from abusive accounts registered at a large email service provider. We sample approximately 1,000,000 emails sent from approximately 6 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 Loss cλ c-=5, c+=1 ELM It-SVMit It-SVMub PGub PGit SVM 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 Loss cλ c-=10, c+=1 ELM It-SVMit It-SVMub PGub PGit SVM 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 Loss cλ c-=20, c+=1 ELM It-SVMit It-SVMub PGub PGit SVM Figure 1: Average loss on test data depending on the influence of the rate loss cλ for different immediate loss constants c−and c+. 10,000 randomly selected accounts over two days and label them automatically based on information passed by other email service providers via feedback loops (in most cases triggered by “report spam” buttons). Because of this automatic labeling process, the labels contain a certain smount of noise. Feature mapping ϕ determines a vector of moving average and moving variance estimates of several attributes of the email stream. These attributes measure the frequency of subject changes and sender address changes, and the number of recipients. Other attributes indicate whether the subject line or the sender address have been observed before within a window of time. Additionally, a moving average estimate of the rate ρ is used as feature. Finally, other attributes quantify the size of the message and the score returned by a content-based spam filter employed by the email service. We implemented the baseline methods that were descibed in Section 4, namely the iterative SVM methods It-SVMub and It-SVMit and the policy gradient methods PGub and PGit. Additionally, we used a standard support vector machine classifier SVM with weights of misclassification corresponding to the costs defined in Equation 1. The Erlang learning model is denoted ELM in the plots. Linear decision functions were used for all baselines. In our experiments, we assume a cost that is quadratic in the outbound rate. That is, λ(1, rπ(t′|x, t))) = cλ · rπ(t′|x, t)2 with cλ > 0 determining the influence of the rate loss to the overall loss. The time interval τ was chosen to be 100 seconds. Regularizer Ω(θ) as in Optimization problem 1 is the commonly used squared l2-norm Ω(θ) = ∥θ∥2 2. We evaluated our method for different costs of incorrectly classified non-spam emails (c−), incorrectly classified spam emails (c+) (see the definition of ℓin Equation 1), and rate of outbound spam messages (cλ). For each setting, we repeated 100 runs; each run used about 50%, chosen at random, as training data and the remaining part as test data. Splits where chosen such that there were equally many spam episodes in training and test set. We tuned the regularization parameter η for the Erlang learning model as well as the corresponding regularization parameters of the iterative SVM methods and the standard SVM on a separate tuning set that was split randomly from the training data. 5.1 Results Figure 1 shows the resulting average loss of the Erlang learning model and reference methods. Each of the three plots shows loss versus parameter cλ which determines the influence of the rate loss on the overall loss. The left plot shows the loss for c−= 5 and c+ = 1, the center plot for (c−= 10, c+ = 1), and the right plot for (c−= 20, c+ = 1). We can see in Figure 1 that the Erlang learning model outperforms all baseline methods for larger values of cλ—more influence of the rate dependent loss on the overall loss—in two of the three settings. For c−= 20 and c+ = 1 (right panel), the performance is comparable to the best baseline method It-SVMub; only for the largest shown cλ = 5 does the ELM outperform this baseline. The iterative classifier It-SVMub that uses the approximated state-action loss Qub performs uniformly better than It-SVMit, the iterative SVM method that uses the sampled loss from the previous iteration. It-SVMit itself surprisingly shows very similar performance to that of the standard SVM method; only for the setting c−= 20 and c+ = 1 in the right panel does this iterative SVM method show superior performance. Both policy gradient methods perform comparable to the Erlang learning model for smaller values of cλ but deteriorate for larger values. 7 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0.2 0.4 0.6 0.8 1 Loss cλ c-=5, c+=1 ELM It-SVMit It-SVMub PGub PGit SVM (a) Average loss and standard error for small values of cλ. 0 1 2 0 1 2 3 φ*θ Fortet function with convex upper bound B(exp(φθ),ρτ) -log(1-B(exp(φθ),ρτ)) 0 1 2 -1 0 1 2 φ*θ Complement of Fortet function with convex upper bound 1-B(exp(φθ),ρτ) -log(B(exp(φθ),ρτ)) (b) Left: Fortet’s formula B(eϕθ, ρτ) (Equation 17) and its upper bound −log(1 −B(eϕθ, ρ)) for ρτ = 10. Right: 1 −B(eϕθ, ρ) and respective upper bound −log(B(eϕθ, ρ)). As expected, the iterative SVM and the standard SVM algorithms perform better than the Erlang learning model and policy gradient models if the influence of the rate pedendent loss is very small. This can best be seen in Figure 2(a). It shows a detail of the results for the setting c−= 5 and c+ = 1, for cλ ranging only from 0 to 1. This is the expected outcome following the considerations in Section 4. If cλ is close to 0, the problem approximately reduces to a standard binary classification problem, thus favoring the very good classification performance of support vector machines. However, for larger cλ the influence of the rate dependent loss rises and more and more dominates the immediate classification loss ℓ. Consequently, for those cases — which are the important ones in this real world application — the better rate loss estimation of the Erlang learning model compared to the baselines leads to better performance. The average training times for the Erlang learning model and the reference methods are in the same order of magnitude. The SVM algorithm took 14 minutes in average to converge to a solution. The Erlang learning model converged after 44 minutes and the policy gradient methods took approximately 45 minutes. The training times of the iterative classifier methods were about 60 minutes. 6 Conclusion We devised a model for sequential decision-making problems in which events are generated by a Poisson process and the loss may depend on the rate of decision outcomes. Using a throttling policy that enforces a data-dependent rate-limit, we were able to factor the loss over single events. Applying a result from queuing theory led us to a closed-form approximation of the immediate event-specific loss under a rate limit set by a policy. Both parts led to a closed-form convex optimization problem. Our experiments explored the learning model for the problem of suppressing abuse of an email service. We observed significant improvements over iterative reinforcement learning baselines. The model is being employed to this end in the email service provided by web hosting firm STRATO. It has replaced a procedure of manual deactivation of accounts after inspection triggered by spam reports. Acknowledgments We gratefully acknowledge support from STRATO Rechenzentrum AG and the German Science Foundation DFG. References [1] J.A. Bagnell, S. Kakade, A. Ng, and J. Schneider. Policy search by dynamic programming. Advances in Neural Information Processing Systems, 16, 2004. [2] D. Blatt and A.O. Hero. From weighted classification to policy search. Advances in Neural Information Processing Systems, 18, 2006. [3] C. Dimitrakakis and M.G. Lagoudakis. Rollout sampling approximate policy iteration. Machine Learning, 72(3):157–171, 2008. 8 [4] M. Ghavamzadeh and Y. Engel. Bayesian policy gradient algorithms. Advances in Neural Information Processing Systems, 19, 2007. [5] D.L. Jagerman, B. Melamed, and W. Willinger. Stochastic modeling of traffic processes. Frontiers in queueing: models, methods and problems, pages 271–370, 1996. [6] M.G. Lagoudakis and R. Parr. Reinforcement learning as classification: Leveraging modern classifiers. In Proceedings of the 20th International Conference on Machine Learning, 2003. [7] J. Langford and B. Zadrozny. Relating reinforcement learning performance to classification performance. In Proceedings of the 22nd International Conference on Machine learning, 2005. [8] R.S. Sutton, D. McAllester, S. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. Advances in Neural Information Processing Systems, 12, 2000. 9
2010
219
3,987
Repeated Games against Budgeted Adversaries Jacob Abernethy∗ Division of Computer Science UC Berkeley jake@cs.berkeley.edu Manfred K. Warmuth† Department of Computer Science UC Santa Cruz manfred@cse.ucsc.edu Abstract We study repeated zero-sum games against an adversary on a budget. Given that an adversary has some constraint on the sequence of actions that he plays, we consider what ought to be the player’s best mixed strategy with knowledge of this budget. We show that, for a general class of normal-form games, the minimax strategy is indeed efficiently computable and relies on a “random playout” technique. We give three diverse applications of this new algorithmic template: a cost-sensitive “Hedge” setting, a particular problem in Metrical Task Systems, and the design of combinatorial prediction markets. 1 Introduction How can we reasonably expect to learn given possibly adversarial data? Overcoming this obstacle has been one of the major successes of the Online Learning framework or, more generally, the so-called competitive analysis of algorithms: rather than measure an algorithm only by the cost it incurs, consider this cost relative to an optimal “comparator algorithm” which has knowledge of the data in advance. A classic example is the so-called “experts setting”: assume we must predict a sequence of binary outcomes and we are given access to a set of experts, each of which reveals their own prediction for each outcome. After each round we learn the true outcome and, hence, which experts predicted correctly or incorrectly. The expert setting is based around a simple assumption, that while some experts’ predictions may be adversarial, we have an a priori belief that there is at least one good expert whose predictions will be reasonably accurate. Under this relatively weak good-expert assumption, one can construct algorithms that have quite strong loss guarantees. Another way to interpret this sequential prediction model is to treat it as a repeated two-player zero-sum game against an adversary on a budget; that is, the adversary’s sequence of actions is restricted in that play ceases once the adversary exceeds the budget. In the experts setting, the assumption “there is a good expert” can be reinterpreted as a “nature shall not let the best expert err too frequently”, perhaps more than some fixed number of times. In the present paper, we develop a general framework for repeated game-playing against an adversary on a budget, and we provide a simple randomized strategy for the learner/player for a particular class of these games. The proposed algorithms are based on a technique, which we refer to as a “random playout”, that has become a very popular heuristic for solving games with massively-large state spaces. Roughly speaking, a random playout in an extensive-form game is a way to measure the likely outcome at a given state by finishing the game randomly from this state. Random playouts, often known simply as Monte Carlo methods, have become particularly popular for solving the game of Go [5], which has led to much follow-up work for general games [12, 11]. The Budgeted Adversary game we consider also involves exponentially large state spaces, yet we achieve efficiency using these random playouts. The key result of this paper is that the proposed random playout is not simply a good heuristic, it is indeed minimax optimal for the games we consider. ∗Supported by a Yahoo! PhD Fellowship and NSF grant 0830410. †Supported by NSF grant IIS-0917397. 1 Abernethy et al [1] was the first to use a random playout strategy to optimally solve an adversarial learning problem, namely for the case of the so-called Hedge Setting introduced by Freund and Schapire [10]. Indeed, their model can be interpreted as a particular special case of a Budgeted Adversary problem. The generalized framework that we give in the first half of the paper, however, has a much larger range of applications. We give three such examples, described briefly below. More details are given in the second half of the paper. Cost-sensitive Hedge Setting. In the standard Hedge setting, it is assumed that each expert suffers a cost in [0, 1] on each round. But a surprisingly-overlooked case is when the cost ranges differ, where expert i may suffer per-round cost in [0, ci] for some fixed ci > 0. The vanilla approach, to use a generic bound of maxi ci, is extremely loose, and we know of no better bounds for this case. Our results provide the optimal strategy for this cost-sensitive Hedge setting. Metrical Task Systems (MTS). The MTS problem is decision/learning problem similar to the Hedge Setting above but with an added difficulty: the learner is required to pay the cost of moving through a given metric space. Finding even a near-optimal generic algorithm has remained elusive for some time, with recent encouraging progress made in one special case [2], for the so-called “weighted-star” metric. Our results provide a simple minimax optimal algorithm for this problem. Combinatorial Prediction Market Design: There has been a great deal of work in designing socalled prediction markets, where bettors may purchase contracts that pay off when the outcome of a future event is correctly guessed. One important goal of such markets is to minimize the potential risk of the “market maker” who sells the contracts and pays the winning bettors. Another goal is to design “combinatorial” markets, that is where the outcome space might be complex. The latter has proven quite challenging, and there are few positive results within this area. We show how to translate the market-design problem into a Budgeted Adversary problem, and from here how to incorporate certain kinds of combinatorial outcomes. 2 Preliminaries Notation: We shall write [n] for the set {1, 2, . . . , n}, and [n]∗to be the set of all finite-length sequences of elements of [n]. We will use the greek symbols ρ and σ to denote such sequences i1i2 . . . iT , where it ∈[n]. We let ∅denote the empty sequence. When we have defined some T-length sequence ρ = i1i2 . . . iT , we may write ρt to refer to the t-length prefix of ρ, namely ρt = i1i2 . . . it, and clearly t ≤T. We will generally use w to refer to a distribution in ∆n, the n-simplex, where wi denotes the ith coordinate of w. We use the symbol ei to denote the ith basis vector in n dimensions, namely a vector with a 1 in the ith coordinate, and 0’s elsewhere. We shall use 1[·] to denote the “indicator function”, where 1[predicate] is 1 if predicate is true, and 0 if it is false. It may be that predicate is a random variable, in which case 1[predicate] is a random variable as well. 2.1 The Setting: Budgeted Adversary Games We will now describe the generic sequential decision problem, where a problem instance is characterized by the following triple: an n × n loss matrix M, a monotonic “cost function” cost : [n]∗→R+, and a cost budget k. A cost function is monotonic as long as it satisfies the relation cost(ρσ) ≤cost(ρiσ) for all ρ, σ ∈[n]∗and all i ∈[n]. Play proceeds as follows: 1. On each round t, the player chooses a distribution wt ∈∆n over his action space. 2. An outcome it ∈[n] is chosen by Nature (potentially an adversary). 3. The player suffers w⊤ t Meit. 4. The game proceeds until the first round in which the budget is spent, i.e. the round T when cost(i1i2 . . . iT −1) ≤k < cost(i1i2 . . . iT −1iT ). The goal of the Player is to choose each wt in order to minimize the total cost of this repeated game on all sequences of outcomes. Note, importantly, that the player can learn from the past, and hence would like an efficiently computable function w : [n]∗→∆n, where on round t the player is given ρt−1 = (i1 . . . it−1) and sets wt ←w(ρt−1). We can define the worst-case cost of an algorithm 2 w : [n]∗→∆n by its performance against a worst-case sequence, that is WorstCaseLoss(w; M, cost, k) := max ρ = i1i2 . . . ∈[n]∗ cost(ρT −1) ≤k < cost(ρT ) T X t=1 w(ρt−1)⊤Meit. Note that above T is a parameter chosen according to ρ and the budget. We can also define the minimax loss, which is defined by choosing the w(·) which minimizes WorstCaseLoss(·). Specifically, MinimaxLoss(M, cost, k) := min w:[n]∗→∆n max ρ = i1i2 . . . ∈[n]∗ cost(ρT −1) ≤k < cost(ρT ) T X t=1 w(ρt−1)⊤Meit. In the next section, we describe the optimal algorithm for a restricted class of M. That is, we obtain the mapping w which optimizes WorstCaseLoss(w; M, cost, k). 3 The Algorithm We will start by assuming that M is a nonnegative diagonal matrix, that is M = diag(c1, c2, . . . , cn), and ci > 0 for all i. With these values ci, define the distribution q ∈∆n with qi := 1/ci P j 1/cj . Given a current state ρ, the algorithm will rely heavily on our ability to compute the following function Φ(·). For any ρ ∈[n]∗such that cost(ρ) > k, define Φ(ρ) := 0. Otherwise, let Φ(ρ) := 1 P i 1/ci E ∀t:it∼q " ∞ X t=0 1[cost(ρi1 . . . it) ≤k] # Notice, this is the expected length of a random process. Of course, we must impose the natural condition that the length of this process has a finite expectation. Also, since we assume that the cost increases, it is reasonable to require that the distribution over the length, i.e. min{t : cost(ρi1 . . . it) > k}, has an exponentially decaying tail. Under these weak conditions, the following m-trial Monte Carlo method will provide a high probability estimate to error within O(m−1/2). Algorithm 1 Efficient Estimation of Φ(ρ) for i=1...m do Sample: infinite random sequence σ := i1i2 . . . where Pr(it = i) = qi Let: Ti = max{t : cost(ρσt−1) ≤k} end for Return Pm i=1 Ti m Notice that the infinite sequence σ does not have to be fully generated. Instead, we can continue to sample the sequence and simply stop when the condition cost(ρσt−1) ≥k is reached. We can now define our algorithm in terms of Φ(·). Algorithm 2 Player’s optimal strategy Input: state ρ Compute: Φ(ρ), Φ(ρ, 1), Φ(ρ, 2), . . . , Φ(ρ, n) Let: set w(ρ) with values wi(ρ) = Φ(ρ)−Φ(ρ,i) ci 4 Minimax Optimality Now we prove that Algorithm 2 is both “legal” and minimax optimal. Lemma 4.1. The vector w(ρ) computed in Algorithm 2 is always a valid distribution. 3 Proof. It must first be established that wi(ρ) ≥0 for all i and ρ. This, however, follows because we assume that the function cost() is monotonic, which implies that cost(ρσ) ≤cost(ρiσ) and hence cost(ρiσ) ≤k =⇒cost(ρσ) ≤k, and hence 1[cost(ρiσ) ≤k] ≤1[cost(ρσ) ≤k]. Taking the expected difference of the infinite sum of these two indicators leads to Φ(ρ) −Φ(ρi) ≥0, which implies wi(ρ) ≥0 as desired. We must also show that P i wi(ρ) = 1. We claim that the following recurrence relation holds for the function Φ(ρ) whenever cost(ρ) ≤k: Φ(ρ) = 1 P i 1/ci | {z } first step + X i qiΦ(ρi) | {z } remaining steps , for any ρ s.t. cost(ρ) < k. This is clear from noticing that Φ is an expected random walk length, with transition probabilities defined by q, and scaled by the constant (P i 1/ci)−1. Hence, X i wi(ρ) = X i Φ(ρ) −Φ(ρi) ci = X i 1/ci ! Φ(ρ) − X i Φ(ρi) ci = X i 1/ci ! 1 P i 1/ci + X i qiΦ(ρi) ! − X i Φ(ρi) ci = 1 where the last equality holds because qi = 1/ci P j 1/cj . Theorem 4.1. For M = diag(c1, . . . , cn), Algorithm 2 is minimax optimal for the Budgeted Adversary problem. Furthermore, Φ(∅) = MinimaxLoss(M, cost, k). Proof. First we prove an upper bound. Notice that, for an sequence ρ = i1i2i3 . . . iT , the total cost of Algorithm 2 will be T X t=1 w(ρt−1)⊤Meit = T X t=1 wit(ρt−1)cit = T X t=1 Φ(ρt−1) −Φ(ρt) cit cit = Φ(∅) −Φ(ρT ) ≤Φ(∅) and hence the total cost of the algorithm is always bounded by Φ(∅). On the other hand, we claim that Φ(∅) can always be achieved by an adversary for any algorithm w′(·). Construct a sequence ρ as follows. Given that ρt−1 has been constructed so far, select any coordinate it ∈[n] for which wit(ρt−1) ≤w′ it(ρt−1), that is, where the the algorithm w′ places at least as much weight on it as the proposed algorithm w we defined in Algorithm 2. This must always be possible because both w(ρt−1) and w′(ρt−1) are distributions and neither can fully dominate the other. Set ρt ←ρt−1i. Continue constructing ρ until the budget is reached, i.e. cost(ρ) > k. Now, let us check the loss of w′ on this sequence ρ: T X t=1 w′(ρt−1)⊤Meit = T X t=1 w′ it(ρt−1)cit ≥ T X t=1 wit(ρt−1)cit = Φ(∅) −Φ(ρ) = Φ(∅) Hence, an adversary can achieve at least Φ(∅) loss for any algorithm w′. 4.1 Extensions For simplicity of exposition, we proved Theorem 4.1 under a somewhat limited scope: only for diagonal matrices M, known budget k and cost(). But with some work, these restrictions can be lifted. We sketch a few extensions of the result, although we omit the details due to lack of space. First, the concept of a cost() function and a budget k is not entirely necessary. Indeed, we can redefine the Budgeted Adversary game in terms of an arbitrary stopping criterion δ : [n]∗→{0, 1}, where δ(ρ) = 0 is equivalent to “the budget has been exceeded”. The only requirement is that δ() is monotonic, which is naturally defined as δ(ρiσ) = 1 =⇒δ(ρσ) = 1 for all ρ, σ ∈[n]∗and all i ∈[n]. This alternative budget interpretation lets us consider the sequence ρ as a path through 4 a game tree. At a given node ρt of the tree, the adversary’s action it+1 determines which branch to follow. As soon as δ(ρt) = 0 we have reached a terminal node of this tree. Second, we need not assume that the budget k, or even the generalized stopping criterion δ(), is known in advance. Instead, we can work with the following generalization: the stopping criterion δ is drawn from a known prior λ and given to the adversary before the start of the game. The resulting optimal algorithm depends simply on estimating a new version of Φ(ρ). Φ(ρ) is now redefined as both an expectation over a random σ and a random δ drawn from the posterior of λ, that is where we condition on the event δ(ρ) = 1. Third, Theorem 4.1 can be extended to a more general class of M, namely inverse-nonnegative matrices, where M is invertible and M −1 has all nonnegative entries. (In all the examples we give we need only diagonal M, but we sketch this generalization for completeness). If we let 1n be the vector of n ones, then define D = diag−1(M −11n), which is a nonnegative diagonal matrix. Also let N = DM −1 and notice that the rows of N are the normalized rows of M −1. We can use Algorithm 2 with the diagonal matrix D, and attain distribution w′(ρ) for any ρ. To obtain an algorithm for the matrix M (not D), we simply let w(ρ) = (w′(ρ)⊤N)⊤, which is guaranteed to be a distribution. The loss of w is identical to w′ since w(ρ)⊤M = w′(ρ)⊤D by construction. Fourth, we have only discussed minimizing loss against a budgeted adversary. But all the results can be extended easily to the case where the player is instead maximizing gain (and the adversary is minimizing). A particularly surprising result is that the minimax strategy is identical in either case; that is, the the recursive definition of wi(ρ) is the same whether the player is maximizing or minimizing. However, the termination condition might change depending on whether we are minimizing or maximizing. For example in the expert setting, the game stops when all experts have cost larger than k versus at least one expert has gain at least k. Therefore for the same budget size k, the minimax value of the gain version is typically smaller than the value of the loss version. Simplified Notation. For many examples, including two that we consider below, recording the entire sequence ρ is unnecessary—the only relevant information is the number of times each i occurs in ρ and not where it occurs. This is the case precisely when the function cost(ρ) is unchanged up to permutations of ρ. In such situations, we can consider a smaller state space, which records the “counts” of each i in the sequence ρ. We will use the notation s ∈Nn, where st = ei1 + . . . + eit for the sequence ρt = i1i2 . . . it. 5 The Cost-Sensitive Hedge Setting A straightforward application of Budgeted Adversary games is the “Hedge setting” introduced by Freund and Schapire [10], a version of the aforementioned experts setting. The minimax algorithm for this special case was already thoroughly developed by Abernethy et al [1]. We describe an interesting extension that can be achieved using our techniques which has not yet been solved. The Hedge game goes as follows. A learner must predict a sequence of distributions wt ∈∆n, and receive a sequence of loss vectors ℓt ∈{0, 1}n. The total loss to the learner is P t wt · ℓt, and the game ceases only once the best expert has more than k errors, i.e. mini P t ℓt,i > k. The learner wants to minimize his total loss. The natural way to transform the Hedge game into a Budgeted Adversary problem is as follows. We’ll let s be the state, defined as the vector of cumulative losses of all the experts. M = " 1 ... 1 # cost(s) = min i si X t wt · ℓt = X t w⊤ t Meit The proposed reduction almost works, except for one key issue: this only allows cost vectors of the form ℓt = Meit = eit, since by definition Nature chooses columns of M. However, as shown in Abernethy et al, this is not a problem. Lemma 5.1 (Lemma 11 and Theorem 12 of [1]). In the Hedge game, the worst case adversary always chooses ℓt ∈{e1, . . . , en}. The standard and more well-known, although non-minimax, algorithm for the Hedge setting [10] uses a simple modification of the Weighted Majority Algorithm [14], and is described simply by 5 setting wi(s) = exp(−ηsi) P j exp(−ηsj). With the appropriate tuning of η, it is possible to bound the total loss of this algorithm by k + √ 2k ln n + ln n, which is known to be roughly optimal in the limit. Abernethy et al [1] provide the minimax optimal algorithm, but state the bound in terms of an expected length of a random walk. This is essentially equivalent to our description of the minimax cost in terms of Φ(∅). A significant drawback of the Hedge result, however, is that it requires the losses to be uniformly bounded in [0, 1], that is ℓt ∈[0, 1]n. Ideally, we would like an algorithm and a bound that can handle non-uniform cost ranges, i.e. where expert i suffers loss in some range [0, ci]. The ℓt,i ∈[0, 1] assumption is fundamental to the Hedge analysis, and we see no simple way of modifying it to achieve a tight bound. The simplest trick, which is just to take cmax := maxi ci, leads to a bound of the form k + √2cmaxk ln n + cmax ln n which we know to be very loose. Intuitively, this is because only a single “risky” expert, with a large ci, should not affect the bound significantly. In our Budgeted Adversary framework, this case can be dealt with trivially: letting M = diag(c1, . . . , cn) and cost(s) = mini sici gives us immediately an optimal algorithm that, by Theorem 4.1, we know to be minimax optimal. According to the same theorem, the minimax loss bound is simply Φ(∅) which, unfortunately, is in terms of a random walk length. We do not know how to obtain a closed form estimate of this expression, and we leave this as an intriguing open question. 6 Metrical Task Systems A classic problem from the Online Algorithms community is known as Metrical Task Systems (MTS), which we now describe. A player (decision-maker, algorithm, etc.) is presented with a finite metric space and on each of a sequence of rounds will occupy a single state (or point) within this metric space. At the beginning of each round the player is presented with a cost vector, describing the cost of occupying each point in the metric space. The player has the option to remain at the his present state and pay this states associated cost, or he can decide to switch to another point in the metric and pay the cost of the new state. In the latter case, however, the player must also pay the switching cost which is exactly the metric distance between the two points. The MTS problem is a useful abstraction for a number of problems; among these is job-scheduling. An algorithm would like to determine on which machine, across a large network, it should process a job. At any given time point, the algorithm observes the number of available cycles on each machine, and can choose to migrate the job to another machine. Of course, if the subsequent machine is a great distance, then the algorithm also pays the travel time of the job migration through the network. Notice that, were we given a sequence of cost vectors in advance, we could compute the optimal path of the algorithm that minimized total cost. Indeed, this is efficiently solved by dynamic programming, and we will refer to this as the optimal offline cost, or just the offline cost. What we would like is an algorithm that performs well relative to the offline cost without knowledge of the sequence of cost vectors. The standard measure of performance for an online algorithm is the competitive ratio, which is the ratio of cost of the online algorithm to the optimal offline cost. For all the results discussed below, we assume that the online algorithm can maintain a randomized state—a distribution over the metric—and pays the expected cost according to this random choice (Randomized algorithms tend to exhibit much better competitive ratios than deterministic algorithms). When the metric is uniform, i.e. where all pairs of points are at unit distance, it is known that the competitive ratio is O(log n), where n is the number of points in the metric; this was shown by Borodin, Linial and Saks who introduced the problem [4]. For general metric spaces, Bartal et al achieved a competitive ratio of O(log6 n) [3], and this was improved to O(log2 n) by Fiat and Mendel [9]. The latter two techniques, however, rely on a scheme of randomly approximating the metric space with a hierarchical tree metric, adding a (likely-unnecessary) multiplicative cost factor of log n. It is widely believed that the minimax competitive ratio is O(log n) in general, but this gap has remained elusive for at least 10 years. The most significant progress towards O(log n) is the 2007 work of Bansal et al [2] who achieved such a ratio for the case of “weighted-star metrics”. A weighted star is a metric such that each point i has a fixed distance di from some “center state”, and traveling between any state i and j requires 6 going through the center, hence incurring a switching cost of di + dj. For weighted-star metrics, Bansal et al managed to justify two simplifications which are quite useful: 1. We can assume that the cost vector is of the form ⟨0, . . . , ∞, . . . , 0⟩; that is, all state receive 0 cost, except some state i which receives an infinite cost. 2. When the online algorithm is currently maintaining a distribution w over the metric, and an infinite cost occurs at state i, we can assume1 that algorithm incurs exactly 2diwi, exactly the cost of having wi probability weight enter and leave i from the center. Bansal et al provide an efficient algorithm for this setting using primal-dual techniques developed for solving linear programs. With the methods developed in the present paper, however, we can give the minimax optimal online algorithm under the above simplifications. Notice that the adversary is now choosing a sequence of states i1, i2, i3 . . . ∈[n] at which to assign an infinite cost. If we let ρ = i1i2i3 . . ., then the online algorithm’s job is to choose a sequence of distributions w(ρt), and pays 2dit+1wit+1(ρt) at each step. In the end, the online algorithm’s cost is compared to the offline MTS cost of ρ, which we will call cost(ρ). Assume2 we know the cost of the offline in advance, say it’s k, and let us define M = diag(2d1, . . . , 2dn). Then the player’s job is to select an algorithm w which minimizes max ρ = (i1, . . . , iT ) cost(ρ) ≤k T X t=1 w(ρt−1)⊤Meit. As we have shown, Algorithm 2 is minimax optimal for this setting. The competitive ratio of this algorithm is precisely lim supk→∞ 1 kMinimaxLoss(M, cost, k)  . Notice the convenient trick here: by bounding a priori the cost of the offline at k, we can simply imagine playing this repeated game until the budget k is achieved. Then the competitive ratio is just the worst-case loss over the offline cost, k. On the downside, we don’t know of any easy way to bound the worst-case loss Φ(∅). 7 Combinatorial Information Markets We now consider the design of so-called cost-function-based information markets, a popular type of prediction market. This work is well-developed by Chen and Pennock [7], with much useful discussion by Chen and Vaughn [8]. We refer the reader to the latter work, which provides a very clear picture of the nice relationship between online learning and the design of information markets. In the simplest setting, a prediction market is a mechanism for selling n types of contract, where a contract of type i corresponds to some potential future outcome, say “event i will occur”. The standard assumption is that the set of possible outcomes are mutually exclusive, so only one of the n events will occur—for example, a pending election with n competing candidates and one eventual winner. When a bettor purchases a contract of type i, the manager of the market, or “market maker”, promises to pay out $1 if the outcome is i and $0 otherwise. A popular research question in recent years is how to design such prediction markets when the outcome has a combinatorial structure. An election might produce a complex outcome like a group of candidates winning, and a bettor may desire to bet on a complex predicate, such as “none of the winning candidates will be from my state”. This question is explored in Hanson [13], although without much discussion of the relevant computational issues. The computational aspects of combinatorial information markets are addressed in Chen et al [6], who provide a particular hardness result regarding computation of certain price functions, as well as a positive result for an alternative type of combinatorial market. In the present section, we propose a new technique for designing combinatorial markets using the techniques laid out in the present work. In this type of information market, the task of a market maker is to choose a price for each of the n contracts, but where the prices may be set adaptively according to the present demand. Let s ∈Nn denote the current volume, where si is the number of contracts sold of type i. In a costfunction-based market, these prices are set according to a given convex “cost function” C(s) which 1Precisely, they claim that it should be upper-bounded by 4di. We omit the details regarding this issue, but it only contributes a multiplicative factor of 2 to the competitive ratio. 2Even when we do not know the offline cost in advance, standard “doubling tricks” allow you to guess this value and increase the guess as the game proceeds. For space, we omit these details. 7 represents a potential on the demand. It is assumed that C(·) satisfies the relation C(s + α1) = C(s) + α for all s, and α > 0 and ∂2C ∂s2 i > 0. A typical example of such a cost function is C(s) = b log Pn i=1 exp(si/b) where b is a parameter (see Chen and Pennock for further discussion [7]); it’s easy to check this function satisfies the desired properties. Given the current volume s, the price of contract i is set at C(s + ei) −C(s). This pricing scheme has the advantage that the total money earned in this market is easy to compute: it’s exactly C(s) regardless of the order in which the contracts were purchased. A disadvantage of this market, however, is that the posted prices (typically) sum to greater than $1! A primary goal of an information market is to incentivize bettors to reveal their private knowledge of the outcome of an event. If a given bettor believes the true distribution of the outcome to be q ∈∆n, he will have an incentive to purchase any contract i for which the current price pi is smaller than qi, thus providing positive expected reward (relative to his predicted distribution). Using this cost-function scheme, it is possible that qi < C(s + ei) −C(s) for all i and hence a bettor will have no incentive to bet. We propose instead an alternative market mechanism that avoids this difficulty: for every given volume state s, the market maker will advertise a price vector w(s) ∈∆n. If a contract of type i is purchased, the state proceeds to s+ei, and the market maker earns wi(s). If a sequence of contracts i1i2 . . . is purchased, the market maker’s total earning is P t w(ei1 + . . . + eit−1) · eit. On the other hand, if the final demand is s, in the worst case the market maker may have to payout a total of maxi si dollars. If we assume the market maker has a fixed budget k on the max number of contracts he is willing to sell, and wants to maximize the total earned money from selling contracts subject to this constraint, then we have3 exactly a Budgeted Adversary problem: let M be the identity and let cost(s) := maxi si. This looks quite similar to the Budgeted Adversary reduction in the Hedge Setting described above, which is perhaps not too surprising given the strong connections discovered in Chen and Vaughn [8] between learning with experts and market design. But this reduction gives us additional power: we now have a natural way to design combinatorial prediction markets. We sketch one such example, but we note that many more can be worked out also. Assume we are in a setting where we have n election candidates, but some subset of size m < n will become the “winners”, and any such subset is possible. In this case, we can imagine a market maker selling a contract of type i with the following promise: if candidate i is in the winning subset, the payout is 1/m and 0 otherwise. For similar reasons as above, the market maker should sell contracts at prices pi where P i pi = 1. If we assume that market maker has a budget constraint of k for the final payout, then we can handle this new setting within the Budgeted Adversary framework by simply modifying the cost function appropriately: cost(s) = max U⊂[n],|U|=m X i∈U si m. This solution looks quite simple, so what did we gain? The benefit of our Budgeted Adversary framework is that we can handle arbitrary monotonic budget constraints, and the combinatorial nature of this problem can be encoded within the budget. We showed this for the case of “subset betting”, but it can be applied to a wide range of settings with combinatorial outcomes. 8 Open problem We have provided a very general framework for solving repeated zero-sum games against a budgeted adversary. Unfortunately, the generality of these results only go as far as games with payoff matrices that are inverse-nonnegative. For one-shot games, of course, Von Neumann’s minimax theorem leads us to an efficient algorithm, i.e. linear programming, which can handle any payoff matrix, and we would hope this is achievable here. We thus pose the following open question: Is there an efficient algorithm for solving Budgeted Adversary games for arbitrary matrices M? 3The careful reader may notice that this modified model may lead to a problem not present in the costfunction based markets: an arbitrage opportunity for the bettors. This issue can be dealt with by including a sufficient transaction fee per contract, but we omit these details due to space constraints. 8 References [1] J. Abernethy, M. K. Warmuth, and J. Yellin. Optimal strategies from random walks. In Proceedings of the 21st Annual Conference on Learning Theory (COLT 08), pages 437–445, July 2008. [2] Nikhil Bansal, Niv Buchbinder, and Joseph (Seffi) Naor. A Primal-Dual randomized algorithm for weighted paging. In Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science, pages 507–517. IEEE Computer Society, 2007. [3] Y. Bartal, A. Blum, C. Burch, and A. Tomkins. A polylog (n)-competitive algorithm for metrical task systems. In Proceedings of the twenty-ninth annual ACM symposium on Theory of computing, page 711719, 1997. [4] A. Borodin, N. Linial, and M. E Saks. An optimal on-line algorithm for metrical task system. Journal of the ACM (JACM), 39(4):745763, 1992. [5] B. Br¨ugmann. Monte carlo go. Master’s Thesis, Unpublished, 1993. [6] Y. Chen, L. Fortnow, N. Lambert, D. M Pennock, and J. Wortman. Complexity of combinatorial market makers. In Proceedings of the ACM Conference on Electronic Commerce (EC), 2008. [7] Y. Chen and D. M Pennock. A utility framework for bounded-loss market makers. In Proceedings of the 23rd Conference on Uncertainty in Artificial Intelligence, page 4956, 2007. [8] Y. Chen and J. W Vaughan. A new understanding of prediction markets via No-Regret learning. Arxiv preprint arXiv:1003.0034, 2010. [9] A. Fiat and M. Mendel. Better algorithms for unfair metrical task systems and applications. In Proceedings of the thirty-second annual ACM symposium on Theory of computing, page 725734, 2000. [10] Yoav Freund and Robert E. Schapire. A decision-theoretic generalization of on-line learning and an application to Boosting. J. Comput. Syst. Sci., 55(1):119–139, 1997. Special Issue for EuroCOLT ’95. [11] S. Gelly and D. Silver. Combining online and offline knowledge in UCT. In Proceedings of the 24th international conference on Machine learning, page 280, 2007. [12] S. Gelly, Y. Wang, R. Munos, and O. Teytaud. Modification of UCT with patterns in MonteCarlo go. 2006. [13] R. Hanson. Combinatorial information market design. Information Systems Frontiers, 5(1):107119, 2003. [14] N. Littlestone and M. K. Warmuth. The Weighted Majority algorithm. Inform. Comput., 108(2):212–261, 1994. Preliminary version in FOCS 89. 9
2010
22
3,988
An Approximate Inference Approach to Temporal Optimization in Optimal Control Konrad C. Rawlik School of Informatics University of Edinburgh Edinburgh, UK Marc Toussaint TU Berlin Berlin, Germany Sethu Vijayakumar School of Informatics University of Edinburgh Edinburgh, UK Abstract Algorithms based on iterative local approximations present a practical approach to optimal control in robotic systems. However, they generally require the temporal parameters (for e.g. the movement duration or the time point of reaching an intermediate goal) to be specified a priori. Here, we present a methodology that is capable of jointly optimizing the temporal parameters in addition to the control command profiles. The presented approach is based on a Bayesian canonical time formulation of the optimal control problem, with the temporal mapping from canonical to real time parametrised by an additional control variable. An approximate EM algorithm is derived that efficiently optimizes both the movement duration and control commands offering, for the first time, a practical approach to tackling generic via point problems in a systematic way under the optimal control framework. The proposed approach, which is applicable to plants with non-linear dynamics as well as arbitrary state dependent and quadratic control costs, is evaluated on realistic simulations of a redundant robotic plant. 1 Introduction Control of sensorimotor systems, artificial or biological, is inherently both a spatial and temporal process. Not only do we have to specify where the plant has to move to but also when it reaches that position. In some control schemes, the temporal component is implicit; for example, with a PID controller, movement duration results from the application of the feedback loop, while in other cases it is explicit, like for example in finite or receding horizon optimal control approaches where the time horizon is set explicitly as a parameter of the problem [8, 13]. Although control based on an optimality criterion is certainly attractive, practical approaches for stochastic systems are currently limited to the finite horizon [9, 16] or first exit time formulation [14, 17]. The former does not optimize temporal aspects of the movement, i.e., duration or the time when costs for specific sub goals of the problem are incurred, assuming them as given a priori. However, how should one choose these temporal parameters? This question is non trivial and important even while considering a simple reaching problem. The solution generally employed in practice is to use a apriori fixed duration, chosen experimentally. This can result in not reaching the goal, having to use unrealistic range of control commands or excessive (wasteful) durations for short distance tasks. The alternative first exit time formulation, on the other hand, either assumes specific exit states in the cost function and computes the shortest duration trajectory which fulfils the task or assumes a time stationary task cost function and computes the control which minimizes the joint cost of movement duration and task cost [17, 1, 14]. This formalism is thus only directly applicable to tasks which do not require sequential achievement of multiple goals. Although this limitation could be overcome by chaining together individual time optimal single goal controllers, such a sequential approach has several drawbacks. First, if we are interested in placing a cost on overall movement duration, we are restricted to linear costs if we wish to remain time optimal. A second more important flaw is that 1 future goals should influence our control even before we have achieved the previous goal, a problem which we highlight during our comparative simulation studies. A wide variety of successful approaches to address stochastic optimal control problems have been described in the literature [6, 2, 7]. The approach we present here builds on a class of approximate stochastic optimal control methods which have been successfully used in the domain of robotic manipulators and in particular, the iLQG [9] algorithm used by [10], and the Approximate Inference Control (AICO) algorithm [16]. These approaches, as alluded to earlier, are finite horizon formulations and consequently require the temporal structure of the problem to be fixed a priori. This requirement is a direct consequence of a fixed length discretization of the continuous problem and the structure of the temporally non-stationary cost function used, which binds incurrence of goal related costs to specific (discretised) time points. The fundamental idea proposed here is to reformulate the problem in canonical time and alternately optimize the temporal and spatial trajectories. We implement this general approach in the context of the approximate inference formulation of AICO, leading to an Expectation Maximisation (EM) algorithm where the E-Step reduces to the standard inference control problem. It is worth noting that due to the similarities between AICO, iLQG and other algorithms, e.g., DDP [6], the same principle and approach should be applicable more generally. The proposed approach provides an extension to the time scaling approach [12, 3] by considering the scaling for a complete controlled system, rather then a single trajectory. Additionally, it also extends previous applications of Expectation Maximisation algorithms for system identification of dynamical systems, e.g. [4, 5], which did not consider the temporal aspects. 2 Preliminaries Let us consider a process with state x ∈RDx and controls u ∈RDu which is of the form dx = (F(x) + Bu)dt + dξ dξdξ⊤ = Q (1) with non-linear state dependent dynamics F, control matrix B and Brownian motion ξ, and define a cost of the form L(x(·), u(·)) = Z T 0  C(x(t), t) + u(t)⊤Hu(t)  dt , (2) with arbitrary state dependent cost C and quadratic control cost. Note in particular that T , the trajectory length, is assumed to be known. The closed loop stochastic optimal control problem is to find the policy π : x(t) →u(t) given by π∗= argmin π Ex,u|π,x(0) {L(x(·), u(·))} . (3) In practice, the continuous time problem is discretized into a fixed number of K steps of length ∆t, leading to the discreet problem with dynamics P(xk+1|xk, uk) = N(xk+1|xk + (F(x) + Bu)∆t, Q∆t) , (4) where we use N(·|a, A) to denote a Gaussian distribution with mean a and covariance A, and cost L(x1:K, u1:K) = CK(xK) + K−1 X k=0  ∆tCk(xk) + u⊤ k(H∆t)uk  . (5) Note that here we used the Euler Forward Method as the discretization scheme, which will prove advantageous if a linear cost on the movement duration is chosen, leading to closed form solution for certain optimization problems. However, in other cases, alternative discretisation methods could be used and indeed, be preferable. 2.1 Approximate Inference Control Recently, it has been suggested to consider a Bayesian inference approach [16] to (discreet) optimal control problems formalised in Section 2. With the probabilistic trajectory model in (4) as a prior, an auxiliary (binary) dynamic random task variable rk, with the associated likelihood P(rk = 1|xk, uk) = exp  −(∆tCk(xk) + u⊤ k(H∆t)uk) , (6) 2 u0 u1 u2 x0 x1 x2 . . . xK r0 r1 r2 rK (a) θ0 θ1 θ2 u0 u1 u2 x0 x1 x2 . . . xK r0 r1 r2 rK (b) Figure 1: The graphical models for (a) standard inference control and (b) the AICO-T model with canonical time. Circle and square nodes indicate continous and discreet variables respectively. Shaded nodes are observed. is introduced, i.e., we interpret the cost as a negative log likelihood of task fulfilment. Inference control consists of computing the posterior conditioned on the observation r0:K = 1 within the resulting model (illustrated as a graphical model in Fig. 1 (a)), and from it obtaining the maximum a posteriori (MAP) controls. For cases, where the process and cost are linear and quadratic in u respectively, the controls can be marginalised in closed form and one is left with the problem of computing the posterior P(x0:K|r0:K = 1) = Y k N(xk+1|xk + F(xk)∆t, W∆t) exp(−∆tCk(xk)) , (7) with W := Q + BH−1B⊤. As this posterior is in general not tractable, the AICO [16] algorithm computes a Gaussian approximation to the true posterior using an approximate message passing approach similar in nature to EP (details are given in supplementary material). The algorithm has been shown to have competitive performance when compared to iLQG [16]. 3 Temporal Optimization for Optimal Control Often the state dependent cost term C(x, t) in (2) can be split into a set of costs which are incurred only at specific times: also referred to as goals, and others which are independent of time, that is C(x, t) = J (x) + N X n=1 δt=ˆtnVn(x) . (8) Classically, ˆtn refer to real time and are fixed. For instance, in a reaching movement, generally a cost that is a function of the distance to the target is incurred only at the final time T while collision costs are independent of time and incurred throughout the movement. In order to allow the time point at which the goals are achieved to be influenced by the optimization, we will re-frame the goal driven part of the problem in a canonical time and in addition to optimizing the controls, also optimize the mapping from canonical to real time. Specifically, we introduce into the problem defined by (1) & (2) the canonical time variable τ with the associated mapping τ = β(t) = Z t 0 1 θ(s)ds , θ(·) > 0 , (9) with θ as an additional control. We also reformulate the cost in terms of the time τ as1 L(x(·), u(·), θ(·)) = N X n=1 Vn(x(β−1(ˆτn))) + Z ˆτN 0 T (θ(s))ds + Z β−1(ˆτN) 0  J (x(t)) + u(t)⊤Hu(t)  dt , (10) 1Note that as β is strictly monotonic and increasing, the inverse function β−1 exists 3 with T an additional cost term over the controls θ and the ˆτ1:N ∈R assumed as given. Based on the last assumption, we are still required to choose the time point at which individual goals are achieved and how long the movement lasts; however, this is now done in terms of the canonical time and since by controlling θ, we can change the real time point at which the cost is incurred, the exact choices for ˆτ1:N are relatively unimportant. The real time behaviour is mainly specified by the additional cost term T over the new controls θ which we have introduced. Note that in the special case where T is linear, we have R ˆτN 0 T (θs)ds = T (T ), i.e., T is equivalent to a cost on the total movement duration. Although here we will stick to the linear case, the proposed approach is also applicable to non-linear duration costs. We briefly note the similarity of the formulation to the canonical time formulation of [11] used in an imitation learning setting. We now discretize the augmented system in canonical time with a fixed number of steps K. Making the arbitrary choice of a step length of 1 in τ induces, by (9), a sequence of steps in t with length2 ∆k = θk. Using this time step sequence and (4) we can now obtain a discreet process in terms of the canonical time with an explicit dependence on θ0:K−1. Discretization of the cost in (10) gives L(x1:K, u1:K, θ0:K−1) = N X n=1 Vn(xˆkn) + K−1 X k=0  T (θk) + J (xk)θk + u⊤ kHθkuk  , (11) for some given ˆk1:N. We now have a new formulation of the optimal control problem that no longer of the form of equations (4) & (5), e.g. (11) is no longer quadratic in the controls as θ is a control. Proceeding as for standard inference control and treating the cost (11) as a neg-log likelihood of an auxiliary binary dynamic random variable, we obtain the inference problem illustrated by the Bayesian network in Figure 1(b). With controls u marginalised, our aim is now to find the posterior P(x0:K, θ0:K−1|r0:K = 1). Unfortunately, this problem is intractable even for the simplest case, e.g. LQG with linear duration cost. However, observing that for given θk’s, the problem reduces to the standard case of Section 2.1 suggest restricting ourselves to finding the MAP estimate for θ0:K−1 and the associated posterior P(x0:K|θMAP 0:K−1, r0:K = 1) using an EM algorithm. The solution is obtained by iterating the E- & M-Steps (see below) until the θ’s have converged; we call this algorithm AICOT to reflect the temporal aspect of the optimization. 3.1 E-Step In general, the aim of the E-Step is to calculate the posterior over the unobserved variables, i.e. the trajectories, given the current parameter values, i.e. the θi’s. qi(x0:K) = P(x0:K|r0:K = 1, θi 0:K−1) . (12) However, as will be shown below we actually only require the expectations xkx⊤ k and xkx⊤ k+1 during the M-Step. As these are in general not tractable, we compute a Gaussian approximation to the posterior, following an approximate message passing approach with linear and quadratic approximations to the dynamics and cost respectively [16] (for details, refer to supplementary material). 3.2 M-Step In the M-Step, we solve θi+1 0:K−1 = argmax θ0:K−1 Q(θ0:K−1|θi 0:K−1) , (13) with Q(θ0:K−1|θi 0:K−1) = ⟨log P(x0:K, r0:K = 1|θ0:K−1)⟩ = K−1 X k=0 ⟨log P(xk+1|xk, θk)⟩− K−1 X k=1 [T (θk) + θk ⟨J (xk)⟩] + constant , (14) where ⟨·⟩denotes the expectation with respect to the distribution calculated in the E-Step, i.e., the posterior qi(x0:K) over trajectories given the previous parameter values. The required expectations, 2under the assumption of constant θ(·) during each step 4 ⟨J (xk)⟩and ⟨log P(xk+1|xk, θk)⟩= −Dx 2 log |f Wk| −1 2 D (xk+1 −eF(xk))⊤f W−1 k (xk+1 −eF(xk)) E , (15) with e F(xk) = xk + F(xk)θk and f Wk = θkW, are in general not tractable. Therefore, we take approximations F(xk) ≈ak + Akxk and J (xk) ≈1 2x⊤ kJkxk −j⊤ kxk , (16) choosing the mean of qi(xk) as the point of approximation, consistent with the equivalent approximations made in the E-Step. Under these approximations, it can be shown that, up to additive terms independent of θ, Q(θ0:K−1|θi 0:K−1) = − K−1 X k=0 Dx 2 log |f Wk| + T (θk) + 1 2 Tr(f W−1 k xk+1x′ k+1 ) −Tr( eA′ k f W−1 k ⟨xk+1x′ k⟩) + 1 2 Tr( eAk f W−1 k eA′ k ⟨xkx′ k⟩) + ˜a⊤ k f W−1 k eAk ⟨xk⟩ + 1 2 ˜a⊤ k f W−1 k ˜ak + θk 1 2 Tr(Jk xkx⊤ k −jk ⟨xk⟩   , with ˜a⊤ k = θkak, eAk = I + θkAk and taking partial derivatives leads to ∂Q ∂θk = 1 2θ−2 k Tr W−1( xk+1x⊤ k+1 −2 xk+1x⊤ k + xkx⊤ k )  −D2 x 2 θ−1 k −1 2  Tr(AW−1A⊤ xkx⊤ k ) + 2 dT dθ θk + a⊤ kW−1ak + 2a⊤ kW−1Ak ⟨xk⟩ + Tr(Jk xkx⊤ k ) −2jk ⟨xk⟩  . (17) In the general case, we can now use gradient ascent to improve the θ’s. However, in the specific case where T is a linear function of θ, we note that 0 = ∂Q ∂θk is a quadratic in θ−1 k and the unique extremum under the constraint θk > 0 can be found analytically. 3.3 Practical Remarks The performance of the algorithm can be greatly enhanced by using the result of the previous EStep as initialisation for the next one. As this is likely to be near the optimum with the new temporal trajectory, AICO converges within only a few iterations. Additionally, in practise it is often sufficient to restrict the θk’s between goals to be constant, which is easily achieved as Q is a sum over the θ’s. The proposed algorithms leads to a variation of discretization step length which can be a problem. For one, the approximation error increases with the step length which may lead to wrong results. On the other hand, the algorithm may lead to control frequencies which are not achievable in practice. In general, a fixed control signal frequency may be prescribed by the hardware system. In practice, θ’s can be kept in a prescribed range by adjusting the number of discretization steps K after an M-Step. Finally, although we have chosen to express the time cost in terms of a function of the θ’s, often it may be desirable to consider a cost directly over the duration T . Noting that T = P θk, all that is required is to replace dT dθ with ∂T (P θ) ∂θk in (17). 4 Experiments The proposed algorithm was evaluated in simulation. As a basic plant, we used a kinematic simulation of a 2 degrees of freedom (DOF) planar arm, consisting of two links of equal length. The state of the plant is given by x = (q, ˙q), with q ∈R2 the joint angles and ˙q ∈R2 associated angular 5 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 Task Space Movement Distance Movement Duration AICO-T(α = α0) AICO-T(α = 2α) AICO-T(α = 0.5α) (a) 0.2 0.4 0.6 0.8 0 100 200 300 Task Space Movement Distance Reaching Cost AICO-T(α = α0) AICO-T(α = 2α0) AICO-T(α = 0.5α0) (b) 0.2 0.4 0.6 0.8 0 200 400 600 Task Space Movement Distance Reaching Cost AICO (T = 0.07) AICO (T = 0.24) AICO (T = 0.41) AICO-T(α = α0) (c) Figure 2: Temporal scaling behaviour using AICO-T. (a & b) Effect of changing time-cost weight α, (effectively the ratio between reaching cost and duration cost) on (a) duration and (b) reaching cost (control + state cost). (c) Comparison of reaching costs (control + error cost) for AICO-T and a fixed duration approach, i.e. AICO. velocities. The controls u ∈R2 are the joint space accelerations. We also added some iid noise with small diagonal covariance. For all experiments, we used a quadratic control cost and the state dependent cost term: V(xk) = X i δk=ˆki(φi(xk) −y∗ i )⊤Λi(φi(xk) −y∗ i ) , (18) for some given ˆki and employed a diagonal weight matrix Λi while y∗ i represented the desired state in task space. For point targets, the task space mapping is φ(x) = (x, y, ˙x, ˙y)⊤, i.e., the map from x to the vector of end point positions and velocities in task space coordinates. The time cost was linear, that is, T (θ) = αθ. 4.1 Variable Distance Reaching Task In order to evaluate the behaviour of AICO-T we applied it to a reaching task with varying starttarget distance. Specifically, for a fixed start point we considered a series of targets lying equally spaced along a line in task space. It should be noted that although the targets are equally spaced in task space and results are shown with respect to movement distance in task space, the distances in joint space scale non linearly. The state cost (18) contained a single term incurred at the final discrete step with Λ = 106 · I and the control cost were given by H = 104 · I. Fig. 2(a & b) shows the movement duration (= P θk) and standard reaching cost3 for different temporal-cost parameters α (we used α0 = 2·107), demonstrating that AICO-T successfully trades-off the movement duration and standard reaching cost for varying movement distances. In Fig. 2(c), we compare the reaching costs of AICO-T with those obtained with a fixed duration approach, in this case AICO. Note that although with a fixed, long duration (e.g., AICO with duration T=0.41) the control and error costs are reduced for short movements, these movements necessarily have up to 4× longer durations than those obtained with AICO-T. For example for a movement distance of 0.2 application of AICO-T results in a optimised movement duration of 0.07 (cf. Fig. 2(a)), making the fixed time approach impractical when temporal costs are considered. Choosing a short duration on the other hand (AICO (T=0.07)) leads to significantly worse costs for long movements. We further emphasis that the fixed durations used in this comparison were chosen post hoc by exploiting the durations suggested by AICO-T in absence of this, there would have been no practical way of choosing them apart from experimentation. Furthermore, we would like to highlight that, although the results suggests a simple scaling of duration with movement distance, in cluttered environments and plants with more complex forward kinematics, an efficient decision on the movement duration cannot be based only on task space distance. 4.2 Via Point Reaching Tasks We also evaluated the proposed algorithm in a more complex via point task. The task requires the end-effector to reach to a target, having passed at some point through a given second target, the 3n.b. the standard reaching cost is the sum of control costs and cost on the endpoint error, without taking duration into account, i.e., (11) without the T (θ) term. 6 −0.4−0.2 0 0.2 2.6 2.8 3 3.2 3.4 (a) 0 1 2 −0.8 −0.6 −0.4 −0.2 Time Angle Joint 1 [rad] 0 1 2 −2.5 −2 −1.5 Time Angle Joint 2 [rad] (b) Near Far 0 5 10 15 20 25 Reaching Cost Near Far 0 0.5 1 1.5 2 2.5 Movement Duration (c) Figure 3: Comparision of AICO-T (solid) to the common modelling approach, using AICO, (dashed) with fixed times on a via point task. (a) End point task space trajectories for two different via points (circles) obtained for a fixed start point (triangle). (b) The corresponding joint space trajectories. (c) Movement durations and reaching costs (control + error costs) from 10 random start points. The proportion of the movement duration spend before the via point is shown in light gray (mean in the AICO-T case). via point. This task is of interest as it can be seen as an abstraction of a diverse range of complex sequential tasks that requires one to achieve a series of sub-tasks in order to reach a final goal. This task has also seen some interest in the literature on modeling of human movement using the optimal control framework, e.g., [15]. Here the common approach is to choose the time point at which one passes the via point such as to divide the movement duration in the same ratio as the distances between the start point, via point and end target. This requires on the one hand prior knowledge of these movement distances and on the other, makes the implicit assumption that the two movements are in some sense independent. In a first experiment, we demonstrate the ability of our approach to solve such sequential problems, adjusting movement durations between sub goals in a principled manner, and show that it improves upon the standard modelling approach. Specifically, we apply AICO-T to the two via point problems illustrated in Fig. 3(a) with randomised start states4. For comparison, we follow the standard modeling approach and apply AICO to compute the controller. We again choose the movement duration for the standard case post hoc to coincide with the mean movement duration obtained with AICO-T for each of the individual via point tasks. Each task is expressed using a cost function consisting of two point target cost terms. Specifically, (18) takes the form V(xk) = δk= K 2 (φ(xk) −y∗ v)⊤Λv(φ(xk) −y∗ v) + δk=K(φ(xk) −y∗ e)⊤Λe(φ(xk) −y∗ e) , (19) with K the number of discrete steps and diagonal matrices Λv = diag(λpos, λpos, 0, 0), Λe = diag(λpos, λpos, λvel, λvel), where λpos = 105 & λvel = 107 and vectors y∗ v = (·, ·, 0, 0)⊤, y∗ e = (·, ·, 0, 0)⊤desired states for individual via point and target, respectively. Note that the cost function does not penalise velocity at the via point but encourages the stopping at the target. While admittedly the choice of incurring the via point cost at the middle of the movement ( K 2 ) is likely to be a suboptimal choice for the standard approach, one has to consider that in more complex task spaces, the relative ratio of movement distances may not be easily accessible and one may have to resort to the most intuitive choice for the uninformed case as we have done here. Note that although for AICO-T this cost is incurred at the same discrete step, we allow θ before and after the via point to differ, but constrain them to be constant throughout each part of the movement, hence, allowing the cost to be incurred at an arbitrary point in real time. We sampled the initial position of each joint independently from a Gaussian distribution with a variance of 3◦. In Fig. 3(a&b), we show maximum a posteriori (MAP) trajectories in task space and joint space for controllers computed for the mean initial state. Interestingly, although the end point trajectory for the near via point produced by AICO-T may look sub-optimal than that produced by the standard AICO algorithm, closer examination of the joint space trajectories reveal that our approach results in more efficient actuation trajectories. In Fig. 3(c), we illustrate the resulting average movement durations and costs of the mean trajectories. As can be seen, AICO-T results in the expected passing times for the two via points, i.e. early vs. late in the movement for the near and far via point, respectively. This directly leads to a lower incurred cost compared to un-optimised movement durations. 4For the sake of clarity, Fig. 3(a&b) show MAP trajectories of controllers computed for the mean start state. 7 0 0.2 0.4 0.6 2.6 2.8 3 3.2 3.4 (a) 0 1 2 −1.2 −1 −0.8 −0.6 −0.4 −0.2 Time Angle Joint 1 [rad] 0 1 2 −2.5 −2 −1.5 Time Angle Joint 2 [rad] (b) Joint Seq. 0 0.5 1 1.5 2 2.5 Movement Duration Joint Seq. 0 10 20 30 40 50 60 Reaching Cost (c) Figure 4: Joint (solid) vs. sequential (dashed) optimisation using AICO-T for a sequential (via point) task. (a) Task space trajectories for a fixed start point (triangle). Viapoint and target are indicated by the circle and square, respectively. (b) The corresponding joint space trajectories. (c) The movement durations and reaching costs (control + error cost) for 10 random start points. The mean proportion of the movement duration spend before the via point is shown in light gray. In order to highlight the shortcomings of sequential time optimal control, next we compare planning a complete movement over sequential goals to planning a sequence of individual movements. Specifically, using AICO-T, we compare planning the whole via point movement (joint planner) to planning a movement from the start to the via point followed by a second movement from the end point of the first movement (n.b. not from the via point) to the end target (sequential planner). The joint planner used the same cost function as the previous experiment. For the sequential planner, each of the two sub-trajectories had half the number of discrete time steps of the joint planner and the cost functions were given by appropriately splitting (19), i.e., V1(xk) = δk= K 2 (φ(xk)−y∗ v)⊤Λv(φ(xk)−y∗ v) and V2(xk) = δk= K 2 (φ(xk)−y∗ e)⊤Λe(φ(xk)−y∗ e) , with Λv, Λe, y∗ v, y∗ e as for (19). The start states were sampled according to the distribution used in the last experiment and in Fig. 4(a&b), we plot the MAP trajectories for the mean start state, in task as well as joint space. The results illustrate that sequential planning leads to sub-optimal results as it does not take future goals into consideration. This leads directly to a higher cost (c.f. Fig. 4(c)), calculated from trials with randomised start state. One should however note that this effect would be less pronounced if the cost required stopping at the via point, as it is the velocity away from the end target which is the main problem for the sequential planner. 5 Conclusion The contribution of this paper is a novel method for jointly optimizing a movement trajectory and its time evolution (temporal scale and duration) in the stochastic optimal control framework. As a special case, this solves the problem of an unknown goal horizon and the problem of trajectory optimization through via points when the timing of intermediate constraints is unknown and subject to optimization. Both cases are of high relevance in practical robotic applications where pre-specifying a goal horizon by hand is common practice but typically lacks justification. The method was derived in the form of an Expectation-Maximization algorithm where the E-step addresses the stochastic optimal control problem reformulated as an inference problem and the M-step re-adapts the time evolution of the trajectory. In principle, the proposed framework can be applied to extend any algorithm that – directly or indirectly – provides us with an approximate trajectory posterior in each iteration. AICO [16] does so directly in terms of a Gaussian approximation; similarly, the local LQG solution implicit in iLQG [9] can, with little extra computational cost, be used to compute a Gaussian posterior over trajectories. For algorithms like DDP [6], which do not lead to an LQG approximation, we can employ the Laplace method to obtain Gaussian posteriors or adjust the M-Step for the non-Gaussian posterior. We demonstrated the algorithm on a standard reaching task with and without via points. In particular, in the via point case, it becomes obvious that fixed horizon methods and sequenced first exit time methods cannot find equally efficient motions as the proposed method. 8 References [1] David Barber and Tom Furmston. Solving deterministic policy (PO)MDPs using expectationmaximisation and antifreeze. In European Conference on Machine Learning (LEMIR workshop), 2009. [2] Marc Peter Deisenroth, Carl Edward Rasmussen, and Jan Peters. Gaussian process dynamic programming. Neurocomputing, 72(7-9):1508 – 1524, 2009. [3] Yu-Yi Fu, Chia-Ju Wu, Kuo-Lan Su, and Chia-Nan Ko. A time-scaling method for near-timeoptimal control of an omni-directional robot along specified paths. Artificial Life and Robotics, 13(1):350–354, 2008. [4] Z Ghahramani and G Hinton. Parameter estimation for linear dynamical systems. Technical Report CRG-TR-96-2, University of Toronto, 1996. [5] Z Ghahramani and S Roweis. Learning nonlinear dynamical systems using an em algorithm. In Advances in Neural Information Processing Systems, volume 11, Nov 1999. [6] D Jacobson and D Mayne. Differential Dynamic Programming. Elsevier, 1970. [7] Hilbert J. Kappen. A linear theory for control of non-linear stochastic systems. Physical Review Letters, 95(20):200201, 2005. [8] Donald E. Kirk. Optimal Control Theory - An Introduction. Prentice-Hall, 1970. [9] Weiwei Li and Emanuel Todorov. An iterative optimal control and estimation design for nonlinear stochastic system. In Proc. of the 45th IEEE Conference on Decision and Control, 2006. [10] Djordje Mitrovic, Sho Nagashima, Stefan Klanke, Takamitsu Matsubara, and Sethu Vijayakumar. Optimal feedback control for anthropomorphicmanipulators. In Proc. IEEE International Conference on Robotics and Automation (ICRA 2010), 2010. [11] Peter Pastor, Heiko Hoffmann, Tamim Asfour, and Stefan Schaal. Learning and generalization of motor skills by learning from demonstration. In Proc. IEEE International Conference on Robotics and Automation (ICRA 2010), Feb 2010. [12] Gideon Sahar and John M. Hollerbach. Planning of minimum- time trajectories for robot arms. The International Journal of Robotics Research, 5(3):90–100, 1986. [13] Robert F. Stengel. Optimal Control and Estimation. Dover Publications, 1986. [14] Emanuel Todorov. Compositionality of optimal control laws. In Advances in Neural Information Processing Systems, volume 22, 2009. [15] Emanuel Todorov and Michael Jordan. Optimal feedback control as a theory of motor coordination. Nature Neuroscience, 5(11):1226–1235, 2002. [16] Marc Toussaint. Robot trajectory optimization using approximate inference. In Proc. of the 26 th International Conference on Machine Learning (ICML 2009), 2009. [17] Marc Toussaint and Amos Storkey. Probabilistic inference for solving discrete and continuous state Markov Decision Processes. In Proc. of the 23nd Int. Conf. on Machine Learning (ICML 2006), pages 945–952, 2006. 9
2010
220
3,989
Phone Recognition with the Mean-Covariance Restricted Boltzmann Machine George E. Dahl, Marc’Aurelio Ranzato, Abdel-rahman Mohamed, and Geoffrey Hinton Department of Computer Science University of Toronto {gdahl, ranzato, asamir, hinton}@cs.toronto.edu Abstract Straightforward application of Deep Belief Nets (DBNs) to acoustic modeling produces a rich distributed representation of speech data that is useful for recognition and yields impressive results on the speaker-independent TIMIT phone recognition task. However, the first-layer Gaussian-Bernoulli Restricted Boltzmann Machine (GRBM) has an important limitation, shared with mixtures of diagonalcovariance Gaussians: GRBMs treat different components of the acoustic input vector as conditionally independent given the hidden state. The mean-covariance restricted Boltzmann machine (mcRBM), first introduced for modeling natural images, is a much more representationally efficient and powerful way of modeling the covariance structure of speech data. Every configuration of the precision units of the mcRBM specifies a different precision matrix for the conditional distribution over the acoustic space. In this work, we use the mcRBM to learn features of speech data that serve as input into a standard DBN. The mcRBM features combined with DBNs allow us to achieve a phone error rate of 20.5%, which is superior to all published results on speaker-independent TIMIT to date. 1 Introduction Acoustic modeling is a fundamental problem in automatic continuous speech recognition. Most state of the art speech recognition systems perform acoustic modeling using the following approach [1]. The acoustic signal is represented as a sequence of feature vectors; these feature vectors typically hold a log spectral estimate on a perceptually warped frequency scale and are augmented with the first and second (at least) temporal derivatives of this spectral information, computed using smoothed differences of neighboring frames. Hidden Markov models (HMMs), with Gaussian mixture models (GMMs) for the emission distributions, are used to model the probability of the acoustic vector sequence given the (tri)phone sequence in the utterance to be recognized.1 Typically, all of the individual Gaussians in the mixtures are restricted to have diagonal covariance matrices and a large hidden Markov model is constructed from sub-HMMs for each triphone to help deal with the effects of context-dependent variations. However, to mitigate the obvious data-sparsity and efficiency problems context dependence creates, modern systems perform sophisticated parameter tying by clustering the HMM states using carefully constructed decision trees to make state tying choices. Although systems of this sort have yielded many useful results, diagonal covariance CDHMM models have several potential weaknesses as models of speech data. On the face of things at least, feature vectors for overlapping frames are treated as independent and feature vectors must be augmented with derivative information in order to enable successful modeling with mixtures of diagonal-covariance Gaussians (see [2, 3] for a more in-depth discussion of the exact consequences of the delta features). However, perhaps even more disturbing than the frame-independence assumption are the compromises required to deal with two competing pressures in Gaussian mixture model 1We will refer to HMMs with GMM emission distributions as CDHMMs for continuous-density HMMs. 1 training: the need for expressive models capable of representing the variability present in real speech data and the need to combat the resulting data sparsity and statistical efficiency issues. These pressures of course exist for other models as well, but the tendency of GMMs to partition the input space into regions where only one component of the mixture dominates is a weakness that inhibits efficient use of a very large number of tunable parameters. The common decision to use diagonal covariance Gaussians for the mixture components is an example of such a compromise of expressiveness that suggests that it might be worthwhile to explore models in which each parameter is constrained by a large fraction of the training data. By contrast, models that use the simultaneous activation of a large number of hidden features to generate an observed input can use many more of their parameters to model each training example and hence have many more training examples to constrain each parameter. As a result, models that use non-linear distributed representations are harder to fit to data, but they have much more representational power for the same number of parameters. The diagonal covariance approximation typically employed for GMM-based acoustic models is symptomatic of, but distinct from, the general representational inefficiencies that tend to crop up in mixture models with massive numbers of highly specialized, distinctly parameterized mixture components. Restricting mixture components to have diagonal covariance matrices introduces a conditional independence assumption between dimensions within a single frame. The delta-feature augmentation mitigates the severity of the approximation and thus makes outperforming diagonal covariance Gaussian mixture models difficult. However, a variety of precision matrix modeling techniques have emerged in the speech recognition literature. For example, [4] describes a basis superposition framework that includes many of these techniques. Although the recent work in [5] on using deep belief nets (DBNs) for phone recognition begins to attack the representational efficiency issues of GMMs, Gaussian-Bernoulli Restricted Boltzmann Machines (GRBMs) are used to deal with the real-valued input representation (in this case, melfrequency cepstral coefficients). GRBMs model different dimensions of their input as conditionally independent given the hidden unit activations, a weakness akin to restricting Gaussians in a GMM to have diagonal covariance. This conditional independence assumption is inappropriate for speech data encoded as a sequence of overlapping frames of spectral information, especially when many frames are concatenated to form the input vector. Such data can exhibit local smoothness in both frequency and time punctuated by bursts of energy that violate these local smoothness properties. Performing a standard augmentation of the input with temporal derivative information, as [5] did, will of course make it easier for GRBMs to deal with such data, but ideally one would use a model capable of succinctly modeling these effects on its own. Inspired by recent successes in modeling natural images, the primary contribution of this work is to bring the mean-covariance restricted Boltzmann machine (mcRBM) of [6] to bear on the problem of extracting useful features for phone recognition and to incorporate these features into a deep architecture similar to one described in [5]. We demonstrate the efficacy of our approach by reporting results on the speaker-independent TIMIT phone recognition task. TIMIT, as argued in [7], is an ideal dataset for testing new ideas in speech recognition before trying to scale them up to large vocabulary tasks because it is phonetically rich, has well-labeled transcriptions, and is small enough not to pose substantial computational challenges at test time. Our best system achieves a phone error rate on the TIMIT corpus of 20.5%, which is superior to all published results on speakerindependent TIMIT to date. We obtain these results without augmenting the input with temporal difference features since a sensible model of speech data should be able to learn to extract its own useful features that make explicit inclusion of difference features unnecessary. 2 Using Deep Belief Nets for Phone Recognition Following the approach of [5], we use deep belief networks (DBNs), trained via the unsupervised pretraining algorithm described in [8], combined with supervised fine-tuning using backpropagation, to model the posterior distribution over HMM states given a local window of the acoustic input. We construct training cases for the DBN by taking n adjacent frames of acoustic input and pairing them with the identity of the HMM state for the central frame. We obtain the labels from a forced alignment with a CDHMM baseline. During the supervised phase of learning, we optimize the crossentropy loss for the individual HMM-state predictions, as a more convenient proxy for the number of mistakes (insertions, deletions, substitutions) in the phone sequence our system produces, which 2 is what we are actually interested in. In order to compare with the results [5], at test time, we use the posterior probability distribution over HMM states that the DBN produces in place of GMM likelihoods in an otherwise standard Viterbi decoder. Since the HMM defines a prior over states, it is better to divide the posterior probabilities of the DBN by the frequencies of the 183 labels in the training data [9], but in our experiments this did not noticeably change the results. 3 The Mean-Covariance Restricted Boltzmann Machine The previous work of [5] used a GRBM for the initial DBN layer. The GRBM associates each configuration of the visible units, v, and hidden units, h, with a probability density according to P(v, h) ∝e−E(v,h), (1) where E(v, h) is given by E(v, h) = 1 2(v −b)T(v −b) −cTh −vTWh, (2) and where W is the matrix of visible/hidden connection weights, b is a visible unit bias, and c is a hidden unit bias. Equation 2 implicitly assumes that the visible units have a diagonal covariance Gaussian noise model with a variance of 1 on each dimension. Another option for learning to extract binary features from real-valued data that has enjoyed success in vision applications is the mean-covariance RBM (mcRBM), first introduced in [10] and [6]. The mcRBM has two groups of hidden units: mean units and precision units. Without the precision units, the mcRBM would be identical to a GRBM. With only the precision units, we have what we will call the “cRBM”, following the terminology in [6]. The precision units are designed to enforce smoothness constraints in the data, but when one of these constraints is seriously violated, it is removed by turning off the precision unit. The set of active precision units therefore specifies a sample-specific covariance matrix. In order for a visible vector to be assigned high probability by the precision units, it must only fail to satisfy a small number of the precision unit constraints, although each of these constraints could be egregiously violated. The cRBM can be viewed as a particular type of factored third order Boltzmann machine. In other words, the RBM energy function is modified to have multiplicative interactions between triples of two visible units, vi and vj, and one hidden unit hk. Unrestricted 3-way connectivity causes a cubic growth in the number of parameters that is unacceptable if we wish to scale this sort of model to high dimensional data. Factoring the weights into a sum of 3-way outer products can reduce the growth rate of the number of parameters in the model to one that is comparable to a normal RBM. After factoring, we may write the cRBM energy function2 (with visible biases omitted) as: E(v, h) = −dTh −(vTR)2Ph, (3) where R is the visible-factor weight matrix, d denotes the hidden unit bias vector, and P is the factor-hidden, or “pooling” matrix. The squaring in equation 3 (and in other equations with this term) is performed elementwise. We force P to only have non-positive entries. We must constrain P in this way to avoid a model that assigns larger and larger probabilities (more negative energies) to larger and larger inputs. The hidden units of the cRBM are still (just as in GRBMs) conditionally independent given the states of the visible units, so inference remains simple. However, the visible units are coupled in a Markov Random Field determined by the settings of the hidden units. The interaction weight between two arbitrary visible units vi and vj, which we shall denote ˜wi,j, depends on the states of all the hidden units according to: ˜wi,j = X k X f hkrifrjfpkf. The conditional distribution of the hidden units (derived from 3) given the visible unit states v is: P(h|v) = σ  d + (vTR)2P T , 2In order to normalize the distribution implied by this energy function, we must restrict the visible units to a region of the input space that has finite extent. However, once we add the mean RBM this normalization issue vanishes. 3 where σ denotes the elementwise logistic sigmoid, σ(x) = (1+e−x)−1. The conditional distribution of the visible units given the hidden unit states for the cRBM is given by: P(v|h) ∼N  0,  R diag(−PTh)  RT−1 . (4) The cRBM always assigns highest probability to the all zero visible vector. In order to allow the model to shift the mean, we add an additional set of binary hidden units whose vector of states we shall denote m. The product of the distributions defined by the cRBM and the GRBM forms the mcRBM. If EC(v, h) denotes the cRBM energy function (equation 3) and EM(v, m) denotes the GRBM energy function (equation 2), then the mcRBM energy function is: EMC(v, h, m) = EC(v, h) + EM(v, m). (5) The gradient of the EM term moves the minimum of EMC away from the zero vector, but how far it moves depends on the curvature of the precision matrix defined by EC. The resulting conditional distribution over the visible units, given the two sets of hidden units is: P(v|h, m) ∝N (ΣWm, Σ) , where Σ = R diag(−PTh)  RT−1 . Thus the mcRBM can produce conditional distributions over the visible units, given the hidden units, that have non-zero means, unlike the cRBM. Just like other RBMs, the mcRBM can be trained using the following update rule, for some generic model parameter θ: ∆θ ∝⟨−∂E ∂θ ⟩data + ⟨∂E ∂θ ⟩reconstruction. However, since the matrix inversion required to sample from P(v|h, m) can be expensive, we integrate out the hidden units and use Hybrid Monte Carlo (HMC) [11] on the mcRBM free energy to obtain the reconstructions. It is important to emphasize that the mcRBM model of covariance structure is much more powerful than merely learning a covariance matrix in a GRBM. Learning the covariance matrix for a GRBM is equivalent to learning a single global linear transformation of the data, whereas the precision units of an mcRBM are capable of specifying exponentially many different covariance matrices and explaining different visible vectors with different distributions over these matrices. 3.1 Practical details In order to facilitate stable training, we make the precision unit term in the energy function insensitive to the scale of the input data by normalizing by the length of v. This makes the conditional P(v|h) clearly non-Gaussian. We constrain the columns of P to have unit L1 norm and to be sparse. We enforce one-dimensional locality and sparsity in P by setting entries beyond a distance of one from the main diagonal to zero after every update. Additionally, we constrain the columns of R to all have equal L2 norms and learn a single global scaling factor shared across all the factors. The non-positivity constraint on the entries of P is maintained by zeroing out, after each update, any entries that become positive. 4 Deep Belief Nets Learning is difficult in densely connected, directed belief nets that have many hidden layers because it is difficult to infer the posterior distribution over the hidden variables, when given a data vector, due to the phenomenon of explaining away. Markov chain Monte Carlo methods [12] can be used to sample from the posterior, but they are typically very time-consuming. In [8] complementary priors were used to eliminate the explaining away effects, producing a training procedure which is equivalent to training a stack of restricted Boltzmann machines. The stacking procedure works as follows. Once an RBM has been trained on data, we can infer the hidden unit activation probabilities given a data vector and re-represent the data vector as the vector of corresponding hidden activations. Since the RBM has been trained to reconstruct the data 4 R P W m h v W2 W3 h2 h3 Figure 1: An mcRBM with two RBMs stacked on top well, the hidden unit activations will retain much of the information present in the data and pick up (possibly higher-order) correlations between different data dimensions that exist in the training set. Once we have used one RBM as a feature extractor we can, if desired, train an additional RBM that treats the hidden activations of the first RBM as data to model. After training a sequence of RBMs, we can compose them to form a generative model whose top two layers are the final RBM in the stack and whose lower layers all have downward-directed connections that implement the p(hk−1|hk) learned by the kth RBM, where h0 = v. The weights obtained by the greedy layer-by-layer training procedure described for stacking RBMs, above, can be used to initialize the weights of a deep feed-forward neural network. Once we add an output layer to the pre-trained neural network, we can discriminatively fine-tune the weights of this neural net using any variant of backpropagation [13] we wish. Although options for fine-tuning exist other than backpropagation, such as the up-down algorithm used in [8], we restrict ourselves to backpropagation (updating the weights every 128 training cases) in this work for simplicity and because it is sufficient for obtaining excellent results. Figure 1 is a diagram of two RBMs stacked on top of an mcRBM. Note that the RBM immediately above the mcRBM uses both the mean unit activities and the precision unit activities together as visible data. Later, during backpropagation, after we have added the softmax output unit, we do not backpropagate through the mcRBM weights, so the mcRBM is a purely unsupervised feature extractor. 5 Experimental Setup 5.1 The TIMIT Dataset We used the TIMIT corpus3 for all of our phone recognition experiments. We used the 462 speaker training set and removed all SA records (i.e., identical sentences for all speakers in the database), since they could potentially bias our results. A development set of 50 speakers was used for handtuning hyperparameters and automated decoder tuning. As is standard practice, results are reported using the 24-speaker core test set. We produced the training labels with a forced alignment of an HMM baseline. Since there are three HMM states per phone and 61 phones, all DBN architectures had a 183-way softmax output unit. Once the training labels have been created, the HMM baseline 3http://www.ldc.upenn.edu/Catalog/CatalogEntry.jsp?catalogId=LDC93S1. 5 is no longer needed; we do not combine or average our results with any HMM+GMM system. After decoding, starting and ending silences were removed and the 61 phone classes were mapped to a set of 39 classes as in [14] for scoring. We removed starting and ending silences before scoring in order to be as similar to [5] as possible. However, to produce a more informative comparison between our results and results in the literature that do not remove starting and ending silences, we also present the phone error rate of our best model using the more common scoring strategy. During decoding, we used a simple bigram language model over phones. Our results would certainly improve with a trigram language model. In order to be able to make useful comparisons between different DBN architectures (and achieve the best results), we optimized the Viterbi decoder parameters (the word insertion probability and the language model scale factor) on the development set and then used the best performing setting to compute the phone error rate (PER) for the core test set. 5.2 Preprocessing Since we have completely abandoned Gaussian mixture model emission distributions, we are no longer forced to use temporal derivative features. For all experiments the acoustic signal was analyzed using a 25-ms Hamming window with 10-ms between the left edges of successive frames. We use the output from a mel scale filterbank, extracting 39 filterbank output log magnitudes and one log energy per frame. Once groups of 15 frames have been concatenated, we perform PCA whitening and preserve the 384 most important principal components. Since we perform PCA whitening anyway, the discrete cosine transform used to compute mel frequency cepstral coefficients (MFCCs) from the filterbank output is not useful. Determining the number of frames of acoustic context to give to the DBN is an important preprocessing decision; preliminary experiments revealed that moving to 15 frames of acoustic data, from the 11 used in [5], could provide improvements in PER when training a DBN on features from a mcRBM. It is possible that even larger acoustic contexts might be beneficial as well. Also, since the mcRBM is trained as a generative model, doubling the input dimensionality by using a 5-ms advance per frame is unlikely to cause serious overfitting and might well improve performance. 5.3 Computational Setup Training DBNs of the sizes used in this paper can be computationally expensive. We accelerated training by exploiting graphics processors, in particular GPUs in a NVIDIA Tesla S1070 system, using the wonderful library described in [15]. The wall time per epoch varied with the architecture. An epoch of training of an mcRBM that had 1536 hidden units (1024 precision units and 512 mean units) took 20 minutes. When each DBN layer had 2048 hidden units, each epoch of pre-training for the first DBN layer took about three minutes and each epoch of pretraining for the fifth layer took seven to eight minutes, since we propagated through each earlier layer. Each epoch of fine-tuning for such a five-DBN-layer architecture took 12 minutes. We used 100 epochs to train the mcRBM, 50 epochs to train each RBM in the stack and 14 epochs of discriminative fine-tuning of the whole network for a total of nearly 60 hours, about 34 of which were spent training the mcRBM. 6 Experiments Since one goal of this work is to improve performance on TIMIT by using deep learning architectures, we explored varying the number of DBN layers in our architecture. In agreement with [5], we found that in order to obtain the best results with DBNs on TIMIT, multiple layers were essential. Figure 2 plots phone error rate on both the development set and the core test set against the number of hidden layers in a mcRBM-DBN (we don’t count the mcRBM as a hidden layer since we do not backpropagate through it). The particular mcRBM-DBN shown had 1536 hidden units in each DBN hidden layer, 1024 precision units in the mcRBM, and 512 mean units in the mcRBM. As the number of DBN hidden layers increased, error on the development and test sets decreased and eventually leveled off. The improvements that deeper models can provide over shallower models were evident from results reported in [5]; the results for the mcRBM-DBN in this work are even more dramatic. In fact, an mcRBM-DBN with 8 hidden layers is what exhibits the best development set error, 20.17%, in these experiments. The same model gets 21.7% on the core test set (20.5% if starting and ending silences are included in scoring). Furthermore, at least 5 DBN hidden layers seem to be necessary 6 1 2 3 4 5 6 7 8 9 Number of DBN Hidden Layers 20 21 22 23 24 25 Phone Error Rate (PER) Dev Set Test Set Figure 2: Effect of increasing model depth Table 1: The effect of DBN layer size on Phone Error Rate for 5 layer mcRBM-DBN models Model devset testset 512 units 21.4% 22.8% 1024 units 20.9% 22.3% 1536 units 20.4% 21.9% 2048 units 20.4% 21.8% to break a test set PER of 22%. Models of this depth (note also that an mcRBM-DBN with 8 DBN hidden layers is really a 9 layer model) have rarely been employed in the deep learning literature (cf. [8, 16], for example). Table 1 demonstrates that once the hidden layers are sufficiently large, continuing to increase the size of the hidden layers did not seem to provide additional improvements. In general, we did not find our results to be very sensitive to the exact number of hidden units in each layer, as long the hidden layers were relatively large. To isolate the advantage of using an mcRBM instead of a GRBM, we need a clear comparison that is not confounded by the differences in preprocessing between our work and [5]. Table 2 provides such a comparison and confirms that the mcRBM feature extraction causes a noticeable improvement in PER. The architectures in table 2 use 1536-hidden-unit DBN layers. Table 3 compares previously published results on the speaker-independent TIMIT phone recognition task to the best mcRBM-DBN architecture we investigated. Results marked with a * remove starting Table 2: mcRBM-DBN vs GRBM-DBN Phone Error Rate Model devset PER testset PER 5 layer GRBM-DBN 22.3% 23.7% mcRBM + 4 layer DBN 20.6% 22.3% 7 Table 3: Reported (speaker independent) results on TIMIT core test set Method PER Stochastic Segmental Models [17] 36% Conditional Random Field [18] 34.8% Large-Margin GMM [19] 33% CD-HMM [20] 27.3% Augmented conditional Random Fields [20] 26.6% Recurrent Neural Nets [21] 26.1% Bayesian Triphone HMM [22] 25.6% Monophone HTMs [23] 24.8% Heterogeneous Classifiers [24] 24.4% Deep Belief Networks(DBNs) [5] 23.0*% Triphone HMMs discriminatively trained w/ BMMI [7] 22.7% Deep Belief Networks with mcRBM feature extraction (this work) 21.7*% Deep Belief Networks with mcRBM feature extraction (this work) 20.5% and ending silences at test time before scoring. One should note that the work of [7] used triphone HMMs and a trigram language model whereas in this work we used only a bigram language model and monophone HMMs, so table 3 probably underestimates the error reduction our system provides over the best published GMM-based approach. 7 Conclusions and Future Work We have presented a new deep architecture for phone recognition that combines a mcRBM feature extraction module with a standard DBN. Our approach attacks both the representational inefficiency issues of GMMs and an important limitation of previous work applying DBNs to phone recognition. The incorporation of features extracted by a mcRBM into an approach similar to that of [5] produces results on speaker-independent TIMIT superior to those that have been reported to date. However, DBN-based acoustic modeling approaches are still in their infancy and many important research questions remain. During the fine-tuning, one could imagine backpropagating through the decoder itself and optimizing an objective function more closely related to the phone error rate. Since the pretraining procedure can make use of large quantities of completely unlabeled data, leveraging untranscribed speech data on a large scale might allow our approach to be even more robust to inter-speaker acoustic variations and would certainly be an interesting avenue of future work. References [1] S. Young, “Statistical modeling in continuous speech recognition (CSR),” in UAI ’01: Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence, San Francisco, CA, USA, 2001, pp. 562–571, Morgan Kaufmann Publishers Inc. [2] C. K. I. Williams, “How to pretend that correlated variables are independent by using difference observations,” Neural Comput., vol. 17, no. 1, pp. 1–6, 2005. [3] J.S. Bridle, “Towards better understanding of the model implied by the use of dynamic features in HMMs,” in Proceedings of the International Conference on Spoken Language Processing, 2004, pp. 725–728. [4] K. C. Sim and M. J. F. Gales, “Minimum phone error training of precision matrix models,” IEEE Transactions on Audio, Speech & Language Processing, vol. 14, no. 3, pp. 882–889, 2006. [5] A. Mohamed, G. E. Dahl, and G. E. Hinton, “Deep belief networks for phone recognition,” in NIPS Workshop on Deep Learning for Speech Recognition and Related Applications, 2009. [6] M. Ranzato and G. Hinton, “Modeling pixel means and covariances using factorized third-order boltzmann machines,” in Proc. of Computer Vision and Pattern Recognition Conference (CVPR 2010), 2010. [7] T. N. Sainath, B. Ramabhadran, and M. Picheny, “An exploration of large vocabulary tools for small vocabulary phonetic recognition,” in IEEE Automatic Speech Recognition and Understanding Workshop, 2009. 8 [8] G. E. Hinton, S. Osindero, and Y. Teh, “A fast learning algorithm for deep belief nets,” Neural Computation, vol. 18, pp. 1527–1554, 2006. [9] N. Morgan and H. Bourlard, “Continuous speech recognition,” Signal Processing Magazine, IEEE, vol. 12, no. 3, pp. 24 –42, may 1995. [10] M. Ranzato, A. Krizhevsky, and G. Hinton, “Factored 3-way restricted Boltzmann machines for modeling natural images,” in Proceedings of the International Conference on Artificial Intelligence and Statistics, 2010, vol. 13. [11] R. M. Neal, Bayesian Learning for Neural Networks, Springer-Verlag New York, Inc., Secaucus, NJ, USA, 1996. [12] R. M. Neal, “Connectionist learning of belief networks,” Artificial Intelligence, vol. 56, no. 1, pp. 71–113, 1992. [13] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors,” Nature, vol. 323, no. 6088, pp. 533–536, 1986. [14] K. F. Lee and H. W. Hon, “Speaker-independent phone recognition using hidden markov models,” IEEE Transactions on Audio, Speech & Language Processing, vol. 37, no. 11, pp. 1641–1648, 1989. [15] V. Mnih, “Cudamat: a CUDA-based matrix class for python,” Tech. Rep. UTML TR 2009-004, Department of Computer Science, University of Toronto, November 2009. [16] V. Nair and G. E. Hinton, “3-d object recognition with deep belief nets,” in Advances in Neural Information Processing Systems 22, Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, Eds., 2009, pp. 1339–1347. [17] V. V. Digalakis, M. Ostendorf, and J. R. Rohlicek, “Fast algorithms for phone classification and recognition using segment-based models,” IEEE Transactions on Signal Processing, vol. 40, pp. 2885–2896, 1992. [18] J. Morris and E. Fosler-Lussier, “Combining phonetic attributes using conditional random fields,” in Proc. Interspeech, 2006, pp. 597–600. [19] F. Sha and L. Saul, “Large margin gaussian mixture modeling for phonetic classification and recognition,” in Proc. ICASSP, 2006, pp. 265–268. [20] Y. Hifny and S. Renals, “Speech recognition using augmented conditional random fields,” IEEE Transactions on Audio, Speech & Language Processing, vol. 17, no. 2, pp. 354–365, 2009. [21] A. Robinson, “An application of recurrent nets to phone probability estimation,” IEEE Transactions on Neural Networks, vol. 5, no. 2, pp. 298–305, 1994. [22] J. Ming and F. J. Smith, “Improved phone recognition using bayesian triphone models,” in Proc. ICASSP, 1998, pp. 409–412. [23] L. Deng and D. Yu, “Use of differential cepstra as acoustic features in hidden trajectory modelling for phonetic recognition,” in Proc. ICASSP, 2007, pp. 445–448. [24] A. Halberstadt and J. Glass, “Heterogeneous measurements and multiple classifiers for speech recognition,” in Proc. ICSLP, 1998. 9
2010
221
3,990
Sparse Coding for Learning Interpretable Spatio-Temporal Primitives Taehwan Kim TTI Chicago taehwan@ttic.edu Gregory Shakhnarovich TTI Chicago gregory@ttic.edu Raquel Urtasun TTI Chicago rurtasun@ttic.edu Abstract Sparse coding has recently become a popular approach in computer vision to learn dictionaries of natural images. In this paper we extend the sparse coding framework to learn interpretable spatio-temporal primitives. We formulated the problem as a tensor factorization problem with tensor group norm constraints over the primitives, diagonal constraints on the activations that provide interpretability as well as smoothness constraints that are inherent to human motion. We demonstrate the effectiveness of our approach to learn interpretable representations of human motion from motion capture data, and show that our approach outperforms recently developed matching pursuit and sparse coding algorithms. 1 Introduction In recent years sparse coding has become a popular paradigm to learn dictionaries of natural images [10, 1, 4]. The learned representations have proven very effective in computer vision tasks such as image denoising [4], inpainting [10, 8] and object recognition [1]. In these approaches, sparse coding was formulated as the sum of a data fitting term, typically the Frobenius norm, and a regularization term that imposes sparsity. The ℓ1 norm is typically used as it is convex instead of other sparsity penalties such as the ℓ0 pseudo-norm. However, the sparsity induced by these norms is local; The estimated representations are sparse in that most of the activations are zero, but the sparsity has no structure, i.e., there is no preference to which coefficients are active. Mairal et al. [9] extend the sparse coding formulation of natural images to impose structure by first clustering the set of image patches and then learning a dictionary where members of the same cluster are encouraged to share sparsity patterns. In particular, they use group norms so that the sparsity patterns are shared within a group. Here we are interested in the problem of learning dictionaries of human motion. Learning spatiotemporal representations of motion has been addressed in the neuroscience and motor control literature, in the context of motor synergies [13, 5, 14]. However, most approaches have focussed on learning static primitives, such as those obtained by linear subspace models applied to individual frames of motion [12, 15]. One notable exception to this is the work of diAvella et al. [3] where the goal was to recover primitives from time series of EMG signals recorded from a set of frog muscles. Using matching pursuit [11] and an ℓ0-type regularization as the underlying mechanism to learn primitives, [3] performed matrix factorization of the time series. The recovered factors represent the primitive dictionary and the primitive activations. However, this technique suffers from the inherent limitations of the ℓ0 regularization which is combinatorial in nature and thus difficult to optimize; therefore [3] resorted to a greedy algorithm that is subject to the inherent limitations of such an approach. In this paper we propose to extend the sparse coding framework to learn motion dictionaries. In particular, we cast the problem of learning spatio-temporal primitives as a tensor factorization prob1 lem and introduce tensor group norms over the primitives that encourage sparsity in order to learn the number of elements in the dictionary. The introduction of additional diagonal constraints in the activations, as well as smoothness constraints that are inherent to human motion, will allow us to learn interpretable representations of human motion from motion capture data. As demonstrated in our experiments, our approach outperforms state-of-the-art matching pursuit [3], as well as recently developed sparse coding algorithms [7]. 2 Sparse coding for motion dictionary learning In this section we first review the framework of sparse coding, and then show how to extend this framework to learn interpretable dictionaries of human motion. 2.1 Traditional sparse coding Let Y = [y1, · · · , yN] be the matrix formed by concatenating the set of training examples drawn i.i.d. from p(y). Sparse coding is usually formulated as a matrix factorization problem composed of a data fitting term, typically the Frobenius norm, and a regularizer that encourages sparsity of the activations min W,H ||Y −WH||2 F + λψ(H) . or equivalently min W,H ||Y −WH||2 F subject to ψ(H) ≤δsparse where λ and δsparse are parameters of the model. Additional bounding constraints on W are typically employed since there is an ambiguity on the scaling of W and H. In this formulation W is the dictionary, with wi the dictionary elements, H is the matrix of activations, and ψ(H) is a regularizer that induces sparsity. Solving this problem involves a non-convex optimization. However, solving with respect to W and H alone is convex if ψ is a convex function of H. As a consequence, ψ is usually taken to be the ℓ1 norm, i.e., ψ(H) = P i,j |hi,j|, and an alternate minimization scheme is typically employed [7]. If the problem has more structure, one would like to use this structure in order to learn non-local sparsity patterns. Mairal et al. [9] exploit group norm sparsity priors to learn dictionaries of natural images by first clustering the training image patches, and then learning a dictionary where members of the same cluster are encouraged to share sparsity patterns. In particular, they use the ℓ2,1 norm defined as ψ(H) = P k ||hk||2, where hk are the elements of H that are members of the k-th group. Note that the members of a group do not need to be rows or columns, more complex group structures can be employed [6]. However, the structure imposed by these group norms is not sufficient for learning interpretable motion primitives. We now show how in the case of motion, we can consider the activations and the primitives as tensors and impose group norm sparsity on the tensors. Moreover, we impose additional constraints such as continuity and differentiability that are inherent of human motion data, as well as diagonal constraints that ensure interpretability. 2.2 Motion dictionary learning Let Y ∈ℜD×L be a D dimensional signal of temporal length L. We formulate the problem of learning dictionaries of human motion as a tensor factorization problem where the matrix W is now a tensor, W ∈ℜD×P ×Q, encoding temporal and spatial information, with D the dimensionality of the observations, P the number of primitives, and Q the length of the primitives. H is now also defined as a tensor, H ∈ℜQ×P ×L, with L the temporal length of the sequence. For simplicity in the discussion we assume that the primitives have the same length. This restriction can be easily removed by setting Q to be the maximum length of the primitives and padding the remaining elements to zero. We thus define the data term to be ℓdata = ||Y −vec(W)vec(H)||F (2) 2 0 20 40 60 80 100 120 −40 −30 −20 −10 0 10 20 30 40 50 0 20 40 60 80 100 120 −50 −40 −30 −20 −10 0 10 20 30 40 1 2 3 4 5 6 7 8 9 10 11 50 100 150 200 Convergence of our approach Objective Iterations Figure 1: Walking dataset composed of multiple walking cycles performed by the same subject. (left, center) Projection of the data onto the first two principal components of walking. This is the data to be recovered. (right) Training error as a function of the number of iterations. Note that our approach converges after only a few iterations where vec(W) ∈ℜD×P Q and vec(H) ∈ℜQP ×L are projections of the tensors to be represented as matrices, i.e., flattening. When learning dictionaries of human motion, there is additional structure and constraints that one would like the dictionary elements to satisfy. One important property of human motion is that it is smooth. We impose continuity and differentiability constraints by adding a regularization term that encourages smooth curvature, i.e., φ(W) = PP p=1 ||∇2Wp,:,:||F . One of the main difficulties with learning motion dictionaries is that the dictionary words might have very different temporal lengths. Note that this problem does not arise in traditional dictionary learning of natural images, since the size of the dictionary words is manually specified [4, 1, 9]. This makes the learning problem more complex since one would like to identify not only the number of elements in the dictionary, but also the size of each dictionary word. We address this problem by adding a regularization term that prefers dictionaries with small number of primitives, as well as primitives of short length. In particular, we extend the group norms over matrices to be group norms over tensors and define ℓp,q,r(W) =    P X i=1   Q X j=1 D X k=1 |Wi,j,k|p !q/p  r/q   1/r where Wi,j,k is the k-th dimension at the j-th time frame of the i-th primitive in W. We will also like to impose additional constraints on the activations H. For interpretability, we would like to have only positive activations. Moreover, since the problem is under-constrained, i.e., H and W can be recovered up to an invertible transformation WH = (WC−1)(CH), we impose that the elements of the activation tensor should be in the unit interval, i.e., Hi,j,k ∈[0, 1]. As in traditional sparse coding, we encourage the activations to be sparse. We impose this by bounding the L1 norm. Finally, to impose interpretability of the results as spatio-temporal primitives, we impose that when a spatio-temporal primitive is active, it should be active across all its time-length with constant activation strength, i.e., ∀i, j, k, Hi,j,k = Hi,j+1,k+1. We thus formulate the problem of learning motion dictionaries as the one of solving the following optimization problem min W,H ||Y −vec(W)vec(H)||F + λφ(W) + ηLp,q,r(W) subject to ∀i, j, k 0 ≤Hi,j,k ≤1, Hi,j,k = Hi,j+1,k+1, ∀j X i,j Hi,j,k ≤δtrain (3a) where δtrain, λ and η are parameters of our model. When optimizing over W or H alone the problem is convex. We thus perform alternate minimizatio. Our algorithm converges to a local minimum, the proof is similar to the convergence proof of block coordinate descent, see Prop. 2.7.1 in [2]. 3 0 10 20 30 40 50 60 70 80 90 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 Matching Pursuit Non Refractory 0 10 20 30 40 50 60 70 80 90 −0.6 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 Matching Pursuit Non Refractory Matching Pursuit Non Refractory 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 (W1-MP-NR) (W2-MP-NR) (H-MP-NR) 0 10 20 30 40 50 60 70 80 90 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 Matching Pursuit 0 10 20 30 40 50 60 70 80 90 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 Matching Pursuit Matching Pursuit 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 (W1-MP) (W2-MP) (H-MP) 0 10 20 30 40 50 60 70 80 90 −60 −40 −20 0 20 40 60 Sparse Coding 0 10 20 30 40 50 60 70 80 90 −50 −40 −30 −20 −10 0 10 20 30 40 50 Sparse Coding Sparse Coding 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 −12 −10 −8 −6 −4 −2 0 2 4 6 8 (W1-SC) (W2-SC) (H-SC) 0 10 20 30 40 50 60 70 80 90 −60 −40 −20 0 20 40 60 Our approach 0 10 20 30 40 50 60 70 80 90 −50 −40 −30 −20 −10 0 10 20 30 40 Our approach Our approach 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 (W1-Ours) (W2-Ours) (H-Ours) Figure 2: Estimation of W and H when the number of primitives is unknown, using (top) matching pursuit without refractory period, (second row) matching pursuit with refractory period [3], (third row) traditional sparse coding and (bottom) our approach. Note that our approach is able to recover the primitives, their number and the correct activations. Matching pursuit is able to recover the number of primitives when using refractory period, however the activations and the primitives are not correct. When we do not use the refractory period, the recovered primitives are very noisy. Sparse coding has a low reconstruction error, but neither the number of primitives, nor the primitives and the activations are correctly recovered. 3 Experimental Evaluation We compare our algorithm to two state-of-the-art approaches in the task of discovering interpretable primitives from motion capture data, namely, the sparse coding approach of [7] and matching pursuit [3]. In the following, we first describe the baselines in detail. We then demonstrate our method’s ability to estimate the primitives, their number, as well as the activation patterns. We then show that our approach outperforms matching pursuit and sparse coding when learning dictionaries of walking and running motions. For all experiments we set δtrain = 1, δtest = 1.3, λ = 1 and η = 0.05 and use the ℓ2,1,1 norm. Note that similar results where obtained with the ℓ2,2,1 norm. For SC we use β = 0.01 and c is set to the maximum value of the ℓ2 norm. The threshold for MP with refractory period is set to 0.1. 4 0 5 10 15 20 25 0 50 100 150 200 250 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 0 50 100 150 200 250 300 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours (walk, σ2 = 50, e59D) (walk, σ2 = 100, e59D) (walk, σ2 = 50, eP CA) (walk, σ2 = 100, eP CA) 0 5 10 15 20 25 20 40 60 80 100 120 140 160 180 200 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 20 40 60 80 100 120 140 160 180 200 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 550 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours (run, σ2 = 50, e59D) (run, σ2 = 100, e59D) (run, σ2 = 50, eP CA) (run, σ2 = 100, eP CA) Figure 3: Error as a function of the dimension when adding Gaussian noise of variance 50 and 100. (Top) Walking, (bottom) running. Matching pursuit (MP): We follow a similar approach to [3] where an alternate minimization over W and H is employed. For each iteration in the alternate minimization, W is optimized by minimizing ℓdata defined in Eq. (2) until convergence. For each iteration in the optimization of H, an over-complete dictionary D is created by taking the primitives in W, and generating candidates by shifting each primitive in time. Note that the cardinality of the candidate dictionary is |D| = P(L + Q −1) if W has P primitives and the data is composed of L frames. Once the dictionary is created, a set of primitives is iteratively selected (one at a time) by choosing at each iteration the primitive with the largest scalar product with respect to the residual signal that cannot be explained with the already selected primitives. Primitives are chosen until a threshold on the scalar product is reached. Note that this is an instance of Matching Pursuit [11], a greedy algorithm to solve an ℓ0-type optimization. Additionally, in the step of choosing elements in the dictionary, [3] introduced the refractory period, which means that when one element in the dictionary is chosen, all overlapping elements are removed from the dictionary. This is done to avoid multiple activations of primitives. In our experiments we compare our approach to matching pursuit with and without refractory period. Sparse coding (SC): We use the sparse coding formulation of [7] which minimizes the Frobenius norm with an L1 regularization penalty on the activations min ¯ W, ¯H ||Y −¯ W ¯H||F + β X i,j | ¯Hi,j| subject to ∀j | ¯ W:,j| ≤c with β a constant trading off the relative influence of the data fitting term and the regularizer, and c a constant bounding the value of the primitives. Note that now ¯ W and ¯H are matrices. Following [7], we solve this optimization problem alternating between solving with respect to the primitives ¯ W and the activations ¯H. 3.1 Estimating the number of primitives In the first experiment we demonstrate the ability of our approach to infer the number of primitives as well as the length of the existing primitives. For this purpose we created a simple dataset which is composed of a single sequence of multiple walking cycles performed by the same subject from the CMU mocap dataset 1. We apply PCA to the data reducing the dimensionality of the observations 1The data was obtained from mocap.cs.cmu.edu 5 0 20 40 60 80 100 120 0 50 100 150 200 250 300 Variance Reconstruction error ||VïWH||F MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 0 100 200 300 400 500 600 Variance Reconstruction error ||VïWH||F MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 150 200 250 300 350 400 Variance Reconstruction error MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 50 100 150 200 250 300 350 400 450 500 550 Variance Reconstruction error MP w/o RP MP w/ RP SC Ours (walk, d=4, e59D) (walk, d=10, e59D) (walk, d=4, eP CA) (walk, d=10, eP CA) 0 20 40 60 80 100 120 0 50 100 150 200 250 300 350 Variance Reconstruction error ||VïWH||F MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 0 100 200 300 400 500 600 700 800 900 Variance Reconstruction error ||VïWH||F MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 100 150 200 250 300 350 400 Variance Reconstruction error MP w/o RP MP w/ RP SC Ours 0 20 40 60 80 100 120 0 100 200 300 400 500 600 700 800 900 Variance Reconstruction error MP w/o RP MP w/ RP SC Ours (run, d=4, e59D) (run, d=10, e59D) (run, d=4, eP CA) (run, d=10, eP CA) Figure 4: Error as a function of the Gaussian noise variance for 4D and 10D spaces learned from a dataset composed of a single subject. (Top) walking, (bottom) running. from 59D to 2D for each time instant. Fig. 1 depicts the projections of the data onto the first two principal components as a function of time. In this case it is easy to see that since the motion is periodic, the signal could be represented by a single 2D primitive whose length is equal to the length of the period. To perform the experiments we initialize our approach and the baselines with a sum of random smooth functions (sinusoids) whose frequencies are different from the principal frequency of the periodic training data, and set the number of primitives to P = 2. One primitive is set to have approximately the same length as a cycle of the periodic motion and the other primitive is set to be 50% larger. Note that a rough estimate of the length of the primitives could be easily obtained by analyzing the principal frequencies of the signal. Fig. 2 depicts the results obtained by our approach and the baselines. The first two columns depict the two dimensional primitives recovered (W1 and W2). Each plot represents vec(Wi,:,:) ∈ℜ(Q1+Q2)×1. The dotted black line separates the two primitives. Note that we expect these primitives to be similar to the original signal, i.e., vec(W1,:,:) similar to a period in Fig. 1 (left) and vec(W2,:,:) to a period in Fig. 1 (right). The third column depicts the activations vec(H) ∈ℜ(Q1+Q2)×L recovered. We expect the successful activations to be diagonal, and to appear only once every cycle. Note that our approach is able to recover the number of primitives as well as the primitive themselves and the correct activations. Matching pursuit without refractory period (first row) is not able to recover the primitives, their number, or the activations. Moreover, the estimated signal has high frequencies. Matching pursuit with refractory period (second row) is able to recover the number of primitives, however the activations are underestimated and the primitives are not very accurate. Sparse coding has a low reconstruction error, but neither the primitives, their number, nor the activations are correctly recovered. This confirms the inability of traditional sparse coding to recover interpretable primitives, and the importance of having interpretability constraints such as the refractory period of matching pursuit and our diagonal constraints. Note also that as shown in Fig. 1 (right) our approach converges in a few iterations. 3.2 Quantitative analysis and comparisons We evaluate the capabilities of our approach to reconstruct new sequences, and compare our approach to the baselines [3, 7] in a denoising scenario as well as when dealing with missing data. We preprocess the data by applying PCA to reduce the dimensionality of the input space. We measure error by computing the Frobenius norm between the test sequences and the reconstruction given by 6 0 5 10 15 20 25 20 40 60 80 100 120 140 160 180 200 220 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 0 50 100 150 200 250 300 350 400 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 0 200 400 600 800 1000 1200 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours (run, P=1, e59D) (run, P=2, e59D) (run, P=1, eP CA) (run, P=2, eP CA) Figure 5: Multiple subject error as a function of the dimension for noisy data with variance 100 and different numbers of primitives. As expected one primitive is not enough for accurate reconstruction. 0 5 10 15 20 25 150 200 250 300 350 400 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 500 550 600 650 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 150 200 250 300 350 400 450 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours 0 5 10 15 20 25 100 200 300 400 500 600 700 Dimension Reconstruction error MP w/o RP MP w/ RP SC Ours (smooth, Q/2, e59D) (random, Q/2, e59D) (smooth, 2Q/3, e59D) (random, 2Q/3, e59D) Figure 6: Missing data and influence of initialization: Error in the 59D space when Q/2 and 2Q/3 of the data is missing. The primitives are either initialize randomly or to a smooth set of sinusoids of random frequencies. the learned W and the estimated activations Htest epca = 1 D||Vtest −vec(W)vec(Htest)||F as well as the error in the original 59D space which can be computed by projecting back into the original space using the singular vectors. Note that W is learned at training, and the activations Htest are estimated at inference time. To evaluate the generalization properties of each algorithm, we compute both errors in a denoising scenario, where Htest is obtained using ˆVtest = Vtest + ϵ, with ϵ i.i.d Gaussian noise, and the errors are computed using the ground truth data Vtest. For each experiment we use P = 1, η = 0.05, δtrain = 1, δtest = 1.3 and a rough estimate of Q, which can be easily obtained by examining the principal frequencies of the data [16]. The primitives are initialized to a sum of sinusoids of random frequencies. We created a walking dataset composed of motions performed by the same subject. In particular we used motions {02, 03, 04, 05, 06, 07, 08, 09, 10, 11} of subject 35 in the CMU mocap dataset. We also performed reconstruction experiments for running motions and used motions {17, 18, 20, 21, 22, 23, 24, 25} from subject 35. In both cases, we use 2 sequences for training and the rest for testing, and report average results over 10 random splits. Fig. 3 depicts reconstruction error in PCA space and in the original space as a function of the noise variance. Fig. 4 depicts reconstruction error as a function of the dimensionality of the PCA space. Our approach outperforms matching pursuit with and without refractory period in all scenarios. Note that out method outperforms sparse coding when the output is noisy. This is due to the fact that, given a big enough dictionary, sparse coding overfits and can perfectly fit the noise. We also performed reconstruction experiments for running motions performed by different subjects. In particular we use motions {03, 04, 05, 06} of subject 9 and motions {21, 23, 24, 25} of subject 35. Fig. 5 depicts reconstruction error for our approach when using different numbers of primitives. As expected one primitive is not enough for accurate reconstruction. When using two primitives our approach performs comparable to sparse coding and clearly outperforms the other baselines. In the next experiment we show the importance of having interpretable primitives. In particular we compare our approach to the baselines in a missing data scenario, where part of the sequence is missing. In particular, Q/2 and 2Q/3 frames are missing. We use the single subject walking database. 7 0 2 4 6 8 10 12 15 20 25 30 35 40 45 50 55 error − log ! " error with missing data " test error " training error Errors vs. ! 1 2 3 4 5 0 5 10 15 20 25 30 35 40 P error Influence of P ï7 ï6 ï5 ï4 ï3 ï2 ï1 170 180 190 200 210 220 230 log _ Reconstruction error Figure 7: Influence of η and P on the single subject walking dataset as well as using soft constraints instead of hard constraints on the activations. (left) Our method is fairly insensitive to the choice of η. As expected the reconstruction error of the training data decreases when there is less regularization. The test error however is very flat, and increases when there is too much or too little regularization. For missing data, having good primitives is important, and thus regularization is necessary. Note that the horizontal axis depicts −log η, thus η decreases for larger values of this axis. (center) Error with (green) and without (red) missing data as a function of P . Our approach is not sensitive to the value of P; one primitive is enough for accurate reconstruction in this dataset. (right) Error when using solft constraints |Hi,j,k −Hi,j+1,k+1| ≤α as a function of α. The leftmost point corresponds to α = 0, i.e., Hi,j,k = Hi,j+1,k+1. As shown in Fig. 6 our approach clearly outperforms all the baselines. This is due to the fact that sparse coding does not have structure, while the structure imposed by our equality constraints, i.e., ∀i, j, k Hi,j,k = Hi,j+1,k+1, help ”hallucinate” the missing data. We also investigate the influence of initialization by using a random non-smooth initialization and the smooth initialization described above, i.e.,sinusoids of random frequencies. Note that as our approach, sparse coding is not sensitive to initialization. This is in contrast with MP which is very sensitive due to the ℓ0-type regularization. We also investigated the influence of the amount of regularization on W. Towards this end we use the single subject walking dataset, and compute reconstruction error for the training and test data with and without missing data as a function of η. As shown in Fig. 7 (left) our method is fairly insensitive to the choice of η. As expected the reconstruction error of the training data decreases when there is less regularization. The test error in the noiseless case is however very flat, and increases slightly when there is too much or too little regularization. When dealing with missing data, having good primitives becomes more important. Note that the horizontal axis depicts −log η, thus η decreases for larger values of the horizontal axis. The test error is higher than the training error for large η since we use δtrain = 1 and δtest = 1.3. Thus we are more conservative at learning since we want to learn interpretable primitives. We also investigate the sensitivity of our approach to the number of primitives. We use the single subject walking dataset and report errors averaged over 10 partitions of the data. As shown in Fig. 7 (middle) our approach is very insensitive to P; in this example a single primitive is enough for accurate reconstruction. We finally investigate the influence of replacing the hard constraints on the activations by soft constraints |Hi,j,k −Hi,j+1,k+1| ≤α. Note that our approach is not sensitive to the value of α and that the hard constraints ( Hi,j,k = Hi,j+1,k+1), depicted in the leftmost point in Fig. 7 (right), are almost optimal. This justifies our choice since when using hard constraints we do not need to search for the optimal value of α. 4 Conclusion We have proposed a sparse coding approach to learn interpretable spatio-temporal primitives of human motion. We have formulated the problem as a tensor factorization problem with tensor group norm constraints over the primitives, diagonal constraints on the activations, as well as smoothness constraints that are inherent to human motion. Our approach has proven superior to recently developed matching pursuit and sparse coding algorithms in the task of learning interpretable spatiotemporal primitives of human motion from motion capture data. In the future we plan to investigate applying similar techniques to learn spatio-temporal dictionaries of video data such as dynamic textures. 8 References [1] S. Bengio, F Pereira, Y. Singer, and D. Strelow. Group sparse coding. In NIPS, 2009. [2] D. P. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont, Massachusetts, 1999. [3] A. diAvella and E. Bizzi. Shared and specific muscle synergies in natural motor behaviors. PNAS, 102(8):3076–3081, 2005. [4] M. Elad and M. Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Trans. on Image Processing, 15(12):3736–3745, 2006. [5] Z. Ghahramani. Building blocks of movement. Nature, 407:682–683, 2000. [6] R. Jenatton, G. Obozinski, and F. Bach. Structured sparse principal component analysis. In Proc. AISTATS10, 2010. [7] H. Lee, Alexis Battle, Raina R, and A. Y. Ng. Efficient sparse coding algorithms. In NIPS, 2007. [8] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online dictionary learning for sparse coding. In ICML, 2009. [9] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Non-local sparse models for image restoration. In ICCV, 2009. [10] J. Mairal, G. Sapiro, and M. Elad. Learning multiscale sparse representations for image and video restoration. SIAM Multiscale Modelling and Simulation., 7(1):214–241, 2008b. [11] S. G. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Trans. Signal. Proc. 41, pages 3397–3415, 1993. [12] C. R. Mason, J. E. Gomez, and T. J. Ebner. Hand synergies during reach to grasp. J. of Neurophysiology, 86:2896–2910, 2001. [13] F. A. Mussa-Ivaldi and E. Bizzi. Motor learning: the combination of primitives. Phil. Trans. Royal Society London, Series B, 355:1755–1769, 2000. [14] F. A. Mussa-Ivaldi and S. Solla. Neural primitives for motion control. IEEE Journal on Ocean Engineering, 29(3):640–650, 2004. [15] E. Todorov and Z. Ghahramani. Analysis of the synergies underlying complex hand manipulation. In Proceedings of Conf. of the IEEE Engineering in Medicine and Biology Society, pages 4637–4640, 2004. [16] R. Urtasun, D. J. Fleet, A. Geiger, J. Popovic, T. Darrell, and N. D. Lawrence. Topologically-constrained latent variable models. In ICML, 2008. 9
2010
222
3,991
Block Variable Selection in Multivariate Regression and High-dimensional Causal Inference Aur´elie C. Lozano, Vikas Sindhwani IBM T.J. Watson Research Center, 1101 Kitchawan Road, Yorktown Heights NY 10598,USA {aclozano,vsindhw}@us.ibm.com Abstract We consider multivariate regression problems involving high-dimensional predictor and response spaces. To efficiently address such problems, we propose a variable selection method, Multivariate Group Orthogonal Matching Pursuit, which extends the standard Orthogonal Matching Pursuit technique. This extension accounts for arbitrary sparsity patterns induced by domain-specific groupings over both input and output variables, while also taking advantage of the correlation that may exist between the multiple outputs. Within this framework, we then formulate the problem of inferring causal relationships over a collection of high-dimensional time series variables. When applied to time-evolving social media content, our models yield a new family of causality-based influence measures that may be seen as an alternative to the classic PageRank algorithm traditionally applied to hyperlink graphs. Theoretical guarantees, extensive simulations and empirical studies confirm the generality and value of our framework. 1 Introduction The broad goal of supervised learning is to effectively learn unknown functional dependencies between a set of input variables and a set of output variables, given a finite collection of training examples. This paper is at the intersection of two key topics that arise in this context. The first topic is Multivariate Regression [4, 2, 24] which generalizes basic single-output regression to settings involving multiple output variables with potentially significant correlations between them. Applications of multivariate regression models include chemometrics, econometrics and computational biology. Multivariate Regression may be viewed as the classical precursor to many modern techniques in machine learning such as multi-task learning [15, 16, 1] and structured output prediction [18, 10, 22]. These techniques are output-centric in the sense that they attempt to exploit dependencies between output variables to learn joint models that generalize better than those that treat outputs independently. The second topic is that of sparsity [3], variable selection and the broader notion of regularization [20]. The view here is input-centric in the following specific sense. In very high dimensional problems where the number of input variables may exceed the number of examples, the only hope for avoiding overfitting is via some form of aggressive capacity control over the family of dependencies being explored by the learning algorithm. This capacity control may be implemented in various ways, e.g., via dimensionality reduction, input variable selection or regularized risk minimization. Estimation of sparse models that are supported on a small set of input variables is a highly active and very successful strand of research in machine learning. It encompasses l1 regularization (e.g., Lasso [19]) and matching pursuit techniques [13] which come with theoretical guarantees on the recovery of the exact support under certain conditions. Particularly pertinent to this paper is the 1 notion of group sparsity. In many problems involving very high-dimensional datasets, it is natural to enforce the prior knowledge that the support of the model should be a union over domain-specific groups of features. For instance, Group Lasso [23] extends Lasso, and Group-OMP [12, 9] extends matching pursuit techniques to this setting. In view of these two topics, we consider here very high dimensional problems involving a large number of output variables. We address the problem of enforcing sparsity via variable selection in multivariate linear models where regularization becomes crucial since the number of parameters grows not only with the data dimensionality but also the number of outputs. Our approach is guided by the following desiderata: (a) performing variable selection for each output in isolation may be highly suboptimal since the input variables which are relevant to (a subset of) the outputs may only exhibit weak correlation with each individual output. It is also desirable to leverage information on the relatedness between outputs, so as to guide the decision on the relevance of a certain input variable to a certain output, using additional evidence based on the relevance to related outputs. (b) It is desirable to take into account any grouping structure that may exist between input and output variables. In the presence of noisy data, inclusion decisions made at the group level may be more robust than those at the level of individual variables. To efficiently satisfy the above desiderata, we propose Multivariate Group Orthogonal Matching Pursuit (MGOMP) for enforcing arbitrary block sparsity patterns in multivariate regression coefficients. These patterns are specified by groups defined over both input and output variables. In particular, MGOMP can handle cases where the set of relevant features may differ from one response (group) to another, and is thus more general than simultaneous variable selection procedures (e.g. S-OMP of [21]), as simultaneity of the selection in MGOMP is enforced within groups of related output variables rather than the entire set of outputs. MGOMP also generalizes the GroupOMP algorithm of [12] to the multivariate regression case. We provide theoretical guarantees on the quality of the model in terms of correctness of group variable selection and regression coefficient estimation. We present empirical results on simulated datasets that illustrate the strength of our technique. We then focus on applying MGOMP to high-dimensional multivariate time series analysis problems. Specifically, we propose a novel application of multivariate regression methods with variable selection, namely that of inferring key influencers in online social communities, a problem of increasing importance with the rise of planetary scale web 2.0 platforms such as Facebook, Twitter, and innumerable discussion forums and blog sites. We rigorously map this problem to that of inferring causal influence relationships. Using special cases of MGOMP, we extend the classical notion of Granger Causality [7] which provides an operational notion of causality in time series analysis, to apply to a collection of multivariate time series variables representing the evolving textual content of a community of bloggers. The sparsity structure of the resulting model induces a weighted causal graph that encodes influence relationships. While we use blog communities to concretize the application of our models, our ideas hold more generally to a wider class of spatio temporal causal modeling problems. In particular, our formulation gives rise to a new class of influence measures that we call GrangerRanks, that may be seen as causality-based alternatives to hyperlink-based ranking techniques like the PageRank [17], popularized by Google in the early days of the internet. Empirical results on a diverse collection of real-world key influencer problems clearly show the value of our models. 2 Variable Group Selection in Multivariate Regression Let us begin by recalling the multivariate regression model, Y = X ¯A + E, where Y ∈Rn×K is the output matrix formed by n training examples on K output variables, X ∈Rn×p is the data matrix whose rows are p-dimensional feature vectors for the n training examples, ¯A is the p × K matrix formed by the true regression coefficients one wishes to estimate, and E is the n × K error matrix. The row vectors of E, are assumed to be independently sampled from N(0, Σ) where Σ is the K × K error covariance matrix. For simplicity of notation we assume without loss of generality that the columns of X and Y have been centered so we need not deal with intercept terms. The negative log-likelihood function (up to a constant) corresponding to the aforementioned model can be expressed as −l(A, Σ) = tr (Y −XA)T (Y −XA)Σ−1 −n log Σ−1 , (1) 2 where A is any estimate of ¯A, and |·| denotes the determinant of a matrix. The maximum likelihood estimator is the Ordinary Least Squares (OLS) estimator ˆAOLS = (XT X)−1XT Y, namely, the concatenation of the OLS estimates for each of the K outputs taken separately, irrespective of Σ. This suggests its suboptimality as the relatedness of the responses is disregarded. Also the OLS estimator is known to perform poorly in the case of high dimensional predictors and/or when the predictors are highly correlated. To alleviate these issues, several methods have been proposed that are based on dimension reduction. Among those, variable selection methods are most popular as they lead to parsimonious and interpretable models, which is desirable in many applications. Clearly, however, variable selection in multiple output regression is particularly challenging in the presence of high dimensional feature vectors as well as possibly a large number of responses. In many applications, including high-dimensional time series analysis and causal modeling settings showcased later in this paper, it is possible to provide domain specific guidance for variable selection by imposing a sparsity structure on A. Let I = {I1 . . . IL} denote the set formed by L (possibly overlapping) groups of input variables where Ik ⊂{1 . . .p}, k = 1, . . . L. Let O = {O1 . . . OM} denote the set formed by M (possibly overlapping) groups of output variables where Ok ⊂{1 . . . K}, k = 1, . . . , M. Note that if certain variables do not belong to any group, they may be considered to be groups of size 1. These group definitions specify a block sparsity/support pattern on A. Without loss of generality, we assume that column indices are permuted so that groups go over contiguous indices. We now outline a novel algorithm, Multivariate Group Orthogonal Matching Pursuit (MGOMP), that seeks to minimize the negative log-likelihood associated with the multivariate regression model subject to the constraint that the support (set of non-zeros) of the regression coefficient matrix, A, is a union of blocks formed by input and output variable groupings1. 2.1 Multivariate Group Orthogonal Matching Pursuit The MGOMP procedure performs greedy pursuit with respect to the loss function LC(A) = tr (Y −XA)T (Y −XA)C  , (2) where C is an estimate of the precision matrix Σ−1, given as input. Possible estimates include the sample estimate using residual error obtained from running univariate Group-OMP for each response individually. In addition to leveraging the grouping information via block sparsity constraints, MGOMP is able to incorporate additional information on the relatedness among output variables as implicitly encoded in the error covariance matrix Σ, noting that the latter is also the covariance matrix of the response Y conditioned on the predictor matrix X. Existing variable selection methods often ignore this information and deal instead with (regularized versions of) the simplified objective tr (Y −XA)T (Y −XA)  , thereby implicitly assuming that Σ = I. Before outlining the details of MGOMP, we first need to introduce some notation. For any set of output variables O ⊂{1, . . . , K}, denote by CO the restriction of the K × K precision matrix C to columns corresponding to the output variables in O, and by CO,O similar restriction to both columns and rows. For any set of input variables I ⊂{1, . . . , p}, denote by XI the restriction of X to columns corresponding to the input variables in I. Furthermore, to simplify the exposition, we assume in the remainder of the paper that for each group of input variables Is ∈I, XIs is orthonormalized, i.e., XIs T XIs = I. Denote by A(m) the estimate of the regression coefficient matrix at iteration m, and by R(m) the corresponding matrix of residuals, i.e. R(m) = Y−XA(m). The MGOMP procedure iterates between two steps : (a) Block Variable Selection and (b) Coefficient matrix re-estimation with selected block. We now outline the details of these two steps. Block Variable Selection: In this step, each block, (Ir, Os), is evaluated with respect to how much its introduction into Am−1 can reduce residual loss. Namely, at round m, the procedure selects the block (Ir, Os) that minimizes arg min 1≤r≤L,1≤s≤M min A:Av,w=0,v̸∈Ir,w̸∈Os(LC(A(m−1) + A) −LC(A(m−1))). 1We note that we could easily generalize this setting and MGOMP to deal with the more general case where there may be a different grouping structure for each output group, namely for each Ok, we could consider a different set IOk of input variable groups. 3 Note that when the minimum attained falls below ϵ, the algorithm is stopped. Using standard Linear Algebra, the block variable selection criteria simplifies to (r(m), s(m)) = arg max r,s tr  (XT IrR(m−1)COs)T (XT IrR(m−1)COs)(C−1 Os,Os)  . (3) From the above equation, it is clear that the relatedness between output variables is taken into account in the block selection process. Coefficient Re-estimation: Let M(m−1) be the set of blocks selected up to iteration m −1 . The set is now updated to include the selected block of variables (Ir(m), Os(m)), i.e., M(m) = M(m−1) ∪{(Ir(m), Os(m))}. The regression coefficient matrix is then re-estimated as A(m) = ˆAX(M(m), Y), where ˆAX(M(m), Y) = arg min A∈Rp×K LC(A) subject to supp(A) ⊆M(m). (4) Since certain features are only relevant to a subset of responses, here the precision matrix estimate C comes into play, and the problem can not be decoupled. However, a closed form solution for (4) can be derived by recalling the following matrix identities [8], tr(MT 1 M2M3MT 4 ) = vec(M1)T (M4 ⊗M2)vec(M3), (5) vec(M1M2) = (I ⊗M1)vec(M2), (6) where vec denotes the matrix vectorization, ⊗the Kronecker product, and I the identity matrix. From (5), we have tr (Y −XA)T (Y −XA)C  = (vec(Y −XA))T (C ⊗In)(vec(Y −XA)). (7) For a set of selected blocks, say M, denote by O(M) the union of the output groups in M. Let ˜C = CO(M),O(M) ⊗In and ˜Y = vec(YO(M)). For each output group Os in M, let I(Os) = ∪(Ir,Os)∈MIr. Finally define ˜X such that ˜X = diag  I|Os| ⊗XI(Os), Os ∈O(M) . Using (7) and (6) one can show that the non-zero entries of vec(ˆAX(M, Y)), namely those corresponding to the support induced by M, are given by ˆα =  ˜XT ˜C˜X −1  ˜XT ˜C  ˜Y , thus providing a closedform formula for the coefficient re-estimation step. To conclude this section, we note that we could also consider preforming alternate optimization of the objective in (1) over A and Σ, using MGOMP to optimize over A for a fixed estimate of Σ, and using a covariance estimation algorithm (e.g. Graphical Lasso [5]) to estimate Σ with fixed A. 2.2 Theoretical Performance Guarantees for MGOMP In this section we show that under certain conditions MGOMP can identify the correct blocks of variables and provide an upperbound on the maximum absolute difference between the estimated and true regression coefficients. We assume that the estimate of the error precision matrix, C, is in agreement with the specification of the output groups, namely that Ci,j = 0 if i and j belong to different output groups. For each output variable group Ok, denote by Ggood(k) the set formed by the input groups included in the true model for the regressions in Ok, and let Gbad(k) be the set formed by all the pairs that are not included. Similarly denote by Mgood the set formed by the pairs of input and output variable groups included in the true model, and Mbad be the set formed by all the pairs that are not included. Before we can state the theorem, we need to define the parameters that are key in the conditions for consistency. Let ρX(Mgood) = mink∈{1,...,M} infα  ∥Xα∥2 2/∥α∥2 2 : supp(α) ⊆Ggood(k) , namely ρX(Mgood) is the minimum over the output groups Ok of the smallest eigenvalue of XT Ggood(k)XGgood(k). For each output group Ok, define generally for any u = {u1, . . . , u|Ggood(k)|} and v = {v1, . . . , v|Gbad(k)|}, ∥u∥good(k) (2,1) = P Gi∈Ggood(k) r P j∈Gi u2 j, and ∥v∥bad(k) (2,1) = P Gi∈Gbad(k) r P j∈Gi v2 j . 4 For any matrix M ∈R|Ggood(k)|×|Gbad(k)|, let ∥M∥good/bad(k) (2,1) = sup ∥v∥bad(k) (2,1) =1 ∥Mv∥good(k) (2,1) . Then we define µX(Mgood) = maxk∈{1,...,M} ∥X+ Ggood(k)XGbad(k)∥good/bad(k) (2,1) , where X+ denotes the Moore-Penrose pseudoinverse of X. We are now able to state the consistency theorem. Theorem 1. Assume that µX(Mgood) < 1 and 0 < ρX(Mgood) ≤ 1. For any η ∈ (0, 1/2), with probability at least 1 −2η, if the stopping criterion of MGOMP is such that ϵ > 1 1−µX(Mgood) p 2pK ln(2pK/η) and mink∈{1,...,M},Ij∈Ggood(k) ∥¯AIj,Ok∥F ≥ √ 8ϵρX(Mgood)−1 then when the algorithm stops M(m−1) = Mgood and ∥A(m−1) −¯A∥max ≤ p (2 ln(2|Mgood|/η))/ρX(Mgood). Proof. The multivariate regression model Y = X ¯A + E can be rewritten in an equivalent univariate form with white noise: ˜Y = (IK ⊗X)¯α + η, where ¯α = vec( ¯A), ˜Y = diag  1 C1/2 k,k In K k=1 vec(YC1/2), and η is formed by i.i.d samples from N(0, 1). We can see that applying the MGOMP procedure is equivalent to applying the Group-OMP procedure [12] to the above vectorized regression model, using as grouping structure that naturally induced by the inputoutput groups originally considered for MGOMP. The theorem then follows from Theorem 3 in [12] and translating the univariate conditions for consistency into their multivariate counterparts via µX(Mgood) and ρX(Mgood). Since C is such that Ci,j = 0 for any i, j belonging to distinct groups, the entries in ˜Y do not mix components of Y from different output groups and hence the error covariance matrix does not appear in the consistency conditions. Note that the theorem can also be re-stated with an alternative condition on the amplitude of the true regression coefficient: mink∈{1,...,M},Ij∈Ggood(k) mins∈Ok ∥¯AIj,k∥2 ≥ √ 8ϵρX(Mgood)−1/ p |Ok| which suggests that the amplitude of the true regression coefficients is allowed to be smaller in MGOMP compared to Group-OMP on individual regressions. Intuitively, through MGOMP we are combining information from multiple regressions, thus improving our capability to identify the correct groups. 2.3 Simulation Results We empirically evaluate the performance of our method against representative variable selection methods, in terms of accuracy of prediction and variable (group) selection. As a measure of variable selection accuracy we use the F1 measure, which is defined as F1 = 2P R P +R, where P denotes the precision and R denotes the recall. To compute the variable group F1 of a variable selection method, we consider a group to be selected if any of the variables in the group is selected. As a measure of prediction accuracy we use the average squared error on a test set. For all the greedy pursuit methods, we consider the “holdout validated” estimates. Namely, we select the iteration number that minimizes the average squared error on a validation set. For univariate methods, we consider individual selection of the iteration number for each univariate regression (joint selection of a common iteration number across the univariate regressions led to worse results in the setting considered). For each setting, we ran 50 runs, each with 50 observations for training, 50 for validation and 50 for testing. We consider an n × p predictor matrix X, where the rows are generated independently according to Np(0, S), with Si,j = 0.7|i−j|. The n × K error matrix E is generated according to NK(0, Σ), with Σi,j = ρ|i−j|, where ρ ∈{0, 0.5, 0.7, 0/9}. We consider a model with 3rd order polynomial expansion: [YT1, . . . , YTM ] = X[A1,T1, . . . , A1,TM ] + X2[A2,T1, . . . , A2,TM ] + X3[A3,T1, . . . , A3,TM ] + E. Here we abuse notation to denote by Xq the matrix such that Xq i,j = (Xi,j)q. T1, . . . , TM are the target groups. For each k, each row of [A1,Tk, . . . , A3,Tk] is either all non-zero or all zero, according to Bernoulli draws with success probability 0.1. Then for each nonzero entry of Ai,Tk, independently, we set its value according to N(0, 1). The number of features for X is set to 20. Hence we consider 60 variables grouped into 20 groups corresponding the the 3rd degree polynomial expansion. The number of regressions is set to 60. We consider 20 regression groups (T1, . . . T20), each of size 3. 5 Parallel runs (p, L) (K, M) Precision matrix estimate Method K (p, p) (1, 1) Not applicable OMP [13] K (p, L) (1, 1) Not applicable Group-OMP [12] 1 (p, p) (K, 1) Identity matrix S-OMP [21] 1 (p, L) (K, M) Identity matrix MGOMP(Id) 1 (p, L) (K, M) Estimate from univariate OMP fits MGOMP(C) M (p, L) (M ′, 1) Identity matrix MGOMP(Parallel) Table 1: Various matching pursuit methods and their corresponding parameters. ρ MGOMP (C) MGOMP (Id) MGOMP(Parallel) Group-OMP OMP 0.9 0.863 ± 0.003 0.818 ± 0.003 0.762 ± 0.003 0.646 ± 0.007 0.517 ± 0.006 0.7 0.850 ± 0.002 0.806 ± 0.003 0.757 ± 0.003 0.631 ± 0.008 0.517 ± 0.007 0.5 0.850 ± 0.003 0.802 ± 0.004 0.766 ± 0.004 0.641 ± 0.006 0.525 ± 0.007 0 0.847 ± 0.004 0.848 ± 0.004 0.783 ± 0.004 0.651 ± 0.007 0.525 ± 0.007 ρ MGOMP (C) MGOMP (Id) MGOMP(Parallel) Group-OMP OMP 0.9 3.009 ± 0.234 3.324 ± 0.273 4.086 ± 0.169 6.165 ± 0.317 6.978 ± 0.206 0.7 3.114 ± 0.252 3.555 ± 0.287 4.461 ± 0.159 8.170 ± 0.328 8.14 ± 0.390 0.5 3.117 ± 0.234 3.630 ± 0.281 4.499 ± 0.288 7.305 ± 0.331 8.098 ± 0.323 0 3.124 ± 0.256 3.123 ± 0.262 3.852 ± 0.185 6.137 ± 0.330 7.414 ± 0.331 Table 2: Average F1 score (top) and average test set squared error (bottom) for the models output by variants of MGOMP, Group-OMP and OMP under the settings of Table 1. A dictionary of various matching pursuit methods and their corresponding parameters is provided in Table 1. In the table, note that MGOMP(Parallel) consists in running MGOMP separately for each regression group and C set to identity (Using C estimated from univariate OMP fits has negligible impact on performance and hence is omitted for conciseness.). The results are presented in Table 2. Overall, in all the settings considered, MGOMP is superior both in terms of prediction and variable selection accuracy, and more so when the correlation between responses increases. Note that MGOMP is stable with respect to the choice of the precision matrix estimate. Indeed the advantage of MGOMP persists under imperfect estimates (Identity and sample estimate from univariate OMP fits) and varying degrees of error correlation. In addition, model selection appears to be more robust for MGOMP, which has only one stopping point (MGOMP has one path interleaving input variables for various regressions, while GOMP and OMP have K paths, one path per univariate regression). 3 Granger Causality with Block Sparsity in Vector Autoregressive Models 3.1 Model Formulation We begin by motivating our main application. The emergence of the web2.0 phenomenon has set in place a planetary-scale infrastructure for rapid proliferation of information and ideas. Social media platforms such as blogs, twitter accounts and online discussion sites are large-scale forums where every individual can voice a potentially influential public opinion. This unprecedented scale of unstructured user-generated web content presents new challenges to both consumers and companies alike. Which blogs or twitter accounts should a consumer follow in order to get a gist of the community opinion as a whole? How can a company identify bloggers whose commentary can change brand perceptions across this universe, so that marketing interventions can be effectively strategized? The problem of finding key influencers and authorities in online communities is central to any viable information triage solution, and is therefore attracting increasing attention [14, 6]. A traditional approach to this problem would treat it no different from the problem of ranking web-pages in a hyperlinked environment. Seminal ideas such as the PageRank [17] and Hubs-and-Authorities [11] were developed in this context, and in fact even celebrated as bringing a semblance of order to the web. However, the mechanics of opinion exchange and adoption makes the problem of inferring authority and influence in social media settings somewhat different from the problem of ranking generic web-pages. Consider the following example that typifies the process of opinion adoption. A consumer is looking to buy a laptop. She initiates a web search for the laptop model and browses several discussion and blog sites where that model has been reviewed. The reviews bring to her attention that among other nice features, the laptop also has excellent speaker quality. Next she buys the laptop and in a few days herself blogs about it. Arguably, conditional on being made aware of 6 speaker quality in the reviews she had read, she is more likely to herself comment on that aspect without necessarily attempting to find those sites again in order to link to them in her blog. In other words, the actual post content is the only trace that the opinion was implicitly absorbed. Moreover, the temporal order of events in this interaction is indicative of the direction of causal influence. We formulate these intuitions rigorously in terms of the notion of Granger Causality [7] and then employ MGOMP for its implementation. For scalability, we work with MGOMP (Parallel), see table 1. Introduced by the Nobel prize winning economist, Clive Granger, this notion has proven useful as an operational notion of causality in time series analysis. It is based on the intuition that a cause should necessarily precede its effect, and in particular if a time series variable X causally affects another Y , then the past values of X should be helpful in predicting the future values of Y , beyond what can be predicted based on the past values of Y alone. Let B1 . . . BG denote a community of G bloggers. With each blogger, we associate content variables, which consist of frequencies of words relevant to a topic across time. Specifically, given a dictionary of K words and the time-stamp of each blog post, we record wk,t i , the frequency of the kth word for blogger Bi at time t. Then, the content of blogger Bi at time t can be represented as Bt i = [w1,t i , . . . , wK,t i ]. The input to our model is a collection of multivariate time series, {Bt i}T t=1 (1 ≤i ≤G), where T is the timespan of our analysis. Our key intuition is that authorities and influencers are causal drivers of future discussions and opinions in the community. This may be phrased in the following terms: Granger Causality: A collection of bloggers is said to influence Blogger Bi if their collective past content (blog posts) is predictive of the future content of Blogger Bi, with statistical significance, and more so than the past content of Blogger Bi alone. The influence problem can thus be mapped to a variable group selection problem in a vector autoregressive model, i.e., in multivariate regression with G × K responses {Bt j, j = 1, 2 . . . G} in terms of variable groups  {Bt−l j }d l=1, j = 1, 2 . . .G : [Bt 1, . . . , Bt G] = [Bt−1 1 , . . . , Bt−d 1 , . . . , Bt−1 G , . . . , Bt−d G ]A + E. We can then conclude that a certain blogger Bi influences blogger Bj, if the variable group {Bt−l i }l∈{1,...,d} is selected by the variable selection method for the responses concerning blogger Bj. For each blogger Bj, this can be viewed as an application of a Granger test on Bj against bloggers B1, B2, . . . , BG. This induces a directed weighted graph over bloggers, which we call causal graph, where edge weights are derived from the underlying regression coefficients. We refer to influence measures on causal graphs as GrangerRanks. For example, GrangerPageRank refers to applying pagerank on the causal graph while GrangerOutDegree refers to computing out-degrees of nodes as a measure of causal influence. 3.2 Application: Causal Influence in Online Social Communities Proof of concept: Key Influencers in Theoretical Physics: Drawn from a KDD Cup 2003 task, this dataset is publically available at: http://www.cs.cornell.edu/projects/kddcup/datasets.html. It consists of the latex sources of all papers in the hep-th portion of the arXiv (http://arxiv.org) In consultation with a theoretical physicist we did our analysis at a time granularity of 1 month. In total, the data spans 137 months. We created document term matrices using standard text processing techniques, over a vocabulary of 463 words chosen by running an unsupervised topic model. For each of the 9200 authors, we created a word-time matrix of size 463x137, which is the usage of the topic-specific key words across time. We considered one year, i.e., d = 12 months as maximum time lag. Our model produces the causal graph shown in Figure 1 showing influence relationships amongst high energy physicists. The table on the right side of Figure 1 lists the top 20 authors according to GrangerOutDegree (also marked on the graph), GrangerPagerRank and Citation Count. The model correctly identifies several leading figures such as Edward Witten, Cumrun Vafa as authorities in theoretical physics. In this domain, number of citations is commonly viewed as a valid measure of authority given disciplined scholarly practice of citing prior related work. Thus, we consider citation-count based ranking as the “ground truth”. We also find that GrangerPageRank and GrangerOutDegree have high positive rank correlation with citation counts (0.728 and 0.384 respectively). This experiment confirms that our model agrees with how this community recognizes its authorities. 7 Per Kraus E.Witten S.Theisen R.J.Szabo Jacob Sonnenschein Igor Klebanov P.K.Townsend C.S.Chu C.Vafa J.L.F.Barbon G.Moore S.Ferrara Arkady Tseytlin S.Gukov Alex Kehagias Ian Kogan M.Berkooz R.Tatar I.Antoniadis Michael Douglas GrangerOutdegree GrangerPageRank Citation Count E.Witten E.Witten E.Witten C.Vafa C.Vafa N.Seiberg Alex Kehagias Alex Kehagias C.Vafa Arkady Tseytlin Arkady Tseytlin J.M.Maldacena P.K.Townsend P.K.Townsend A.A.Sen Jacob Sonnenschein Jacob Sonnenschein Andrew Strominger Igor Klebanov R.J.Szabo Igor Klebanov R.J.Szabo G.Moore Michael Douglas G.Moore Igor Klebanov Arkady Tseytlin Michael Douglas Ian Kogan L.Susskind Figure 1: Causal Graph and top authors in High-Energy Physics according to various measures. (a) Causal Graph (b) Hyperlink Graph Figure 2: Causal and hyperlink graphs for the lotus blog dataset. Real application: IBM Lotus Bloggers: We crawled blogs pertaining to the IBM Lotus software brand. Our crawl process ran in conjunction with a relevance classifier that continuously filtered out posts irrelevant to Lotus discussions. Due to lack of space we omit preprocessing details that are similar to the previous application. In all, this dataset represents a Lotus blogging community of 684 bloggers, each associated with multiple time series describing the frequency of 96 words over a time period of 376 days. We considered one week i.e., d = 7 days as maximum time lag in this application. Figure 2 shows the causal graph learnt by our models on the left, and the hyperlink graph on the right. We notice that the causal graph is sparser than the hyperlink graph. By identifying the most significant causal relationships between bloggers, our causal graphs allow clearer inspection of the authorities and also appear to better expose striking sub-community structures in this blog community. We also computed the correlation between PageRank and Outdegrees computed over our causal graph and the hyperlink graph (0.44 and 0.65 respectively). We observe positive correlations indicating that measures computed on either graph partially capture related latent rankings, but at the same time are also sufficiently different from each other. Our results were also validated by domain experts. 4 Conclusion and Perspectives We have provided a framework for learning sparse multivariate regression models, where the sparsity structure is induced by groupings defined over both input and output variables. We have shown that extended notions of Granger Causality for causal inference over high-dimensional time series can naturally be cast in this framework. This allows us to develop a causality-based perspective on the problem of identifying key influencers in online communities, leading to a new family of influence measures called GrangerRanks. We list several directions of interest for future work: optimizing time-lag selection; considering hierarchical group selection to identify pertinent causal relationships not only between bloggers but also between communities of bloggers; incorporating the hyperlink graph in the causal modeling; adapting our approach to produce topic specific rankings; developing online learning versions; and conducting further empirical studies on the properties of the causal graph in various applications of multivariate regression. Acknowledgments We would like to thank Naoki Abe, Rick Lawrence, Estepan Meliksetian, Prem Melville and Grzegorz Swirszcz for their contributions to this work in a variety of ways. 8 References [1] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] Leo Breiman and Jerome H Friedman. Predicting multivariate responses in multiple linear regression. Journal of the Royal Statistical Society: Series B, (1):1369–7412, 1997. [3] M. Elad. Sparse and Redundant Representations: From Theory to Applications in Signal and Image Processing. Springer,2010 [4] Ildiko E. Frank and Jerome H. Friedman. A statistical view of some chemometrics regression tools. Technometrics, 35(2):109–135, 1993. [5] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, July 2008. [6] M. Gomez-Rodriguez and J. Leskovec and A. Krause. Inferring Networks of Diffusion and Influence, KDD 2010. [7] C. Granger. Testing for causality: A personal viewpoint. Journal of Economic Dynamics and Control, 2:329–352, 1980. [8] D. Harville. Matrix Algebra from a Statistician’s Perspective. Springer, 1997. [9] J. Huang, T. Zhang, and D. Metaxas D. Learning with structured sparsity, ICML 2009. [10] T. Joachims. Structured output prediction with support vector machines. In Joint IAPR International Workshops on Structural and Syntactic Pattern Recognition (SSPR) and Statistical Techniques in Pattern Recognition (SPR), pages 1–7, 2006. [11] Jon M. Kleinberg. Authoritative sources in a hyperlinked environment. Journal of the ACM, 46:668–677, 1999. [12] A.C. Lozano, G. Swirszcz, and N. Abe. Grouped orthogonal matching pursuit for variable selection and prediction. Advances in Neural Information Processing Systems 22, 2009. [13] S. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 1993. [14] P. Melville, K. Subbian, C. Perlich, R. Lawrence and E. Meliksetian. A Predictive Perspective on Measures of Influence in Networks Workshop on Information in Networks (WIN-10), New York, September, 2010. [15] Charles A. Micchelli and Massimiliano Pontil. Kernels for multi–task learning. In NIPS, 2004. [16] G. Obozinski, B. Taskar, and M. Jordan. Multi-task feature selection. Technical report, 2006. [17] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: Bringing order to the web. Technical Report, Stanford Digital Libraries, 1998. [18] Elisa Ricci, Tijl De Bie, and Nello Cristianini. Magic moments for structured output prediction. Journal of Machine Learning Research, 9:2803–2846, December 2008. [19] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1994. [20] A.N. Tikhonov. Regularization of incorrectly posed problems. Sov. Math. Dokl, 4:16241627, 1963. [21] J.A. Tropp, A.C. Gilbert, and M.J. Strauss. Algorithms for simultaneous sparse approximation: part i: Greedy pursuit. Sig. Proc., 86(3):572–588, 2006. [22] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependentand structured output spaces. In International Conference on Machine Learning (ICML), pages 104–112, 2004. [23] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B, 68:49–67, 2006. [24] Ming Yuan, Ali Ekici, Zhaosong Lu, and Renato Monteiro. Dimension reduction and coefficient estimation in multivariate linear regression. Journal Of The Royal Statistical Society Series B, 69(3):329–346, 2007. 9
2010
223
3,992
Reverse Multi-Label Learning James Petterson NICTA, Australian National University Canberra, ACT, Australia james.petterson@nicta.com.au Tiberio Caetano NICTA, Australian National University Canberra, ACT, Australia tiberio.caetano@nicta.com.au Abstract Multi-label classification is the task of predicting potentially multiple labels for a given instance. This is common in several applications such as image annotation, document classification and gene function prediction. In this paper we present a formulation for this problem based on reverse prediction: we predict sets of instances given the labels. By viewing the problem from this perspective, the most popular quality measures for assessing the performance of multi-label classification admit relaxations that can be efficiently optimised. We optimise these relaxations with standard algorithms and compare our results with several stateof-the-art methods, showing excellent performance. 1 Introduction Recently, multi-label classification (MLC) has been drawing increasing attention from the machine learning community (e.g., [1, 2, 3, 4]). Unlike in the case of multi-class learning, in MLC each instance may belong to multiple classes simultaneously. This reflects the situation in many realworld problems: in document classification, one document can cover multiple subjects; in biology, a gene can be associated with a set of functional classes [5]; in image annotation, one image can have several tags [6]. As diverse as the applications, however, are the evaluation measures used to assess the performance of different methods. That is understandable, since different applications have different goals. In e-discovery applications [7] it is mandatory that all relevant documents are retrieved, so recall is the most relevant measure. In web search, on the other hand, precision is also important, so the F1-score, which is the harmonic mean of precision and recall, might be more appropriate. In this paper we present a method for MLC which is able to optimise appropriate surrogates for a variety of performance measures. This means that the objective function being optimised by the method is tailored to the performance measure on which we want to do well in our specific application. This is in contrast particularly with probabilistic approaches, which typically aim for maximisation of likelihood scores rather than the performance measure used to assess the quality of the results. In addition, the method is based on well-understood facts from the domain of structured output learning, which gives us theoretical guarantees regarding the accuracy of the results obtained. Finally, source code is made available by us. An interesting aspect of the method is that we are only able to optimise the desired performance measures because we formulate the prediction problem in a reverse manner, in the spirit of [8]. We pose the prediction problem as predicting sets of instances given the labels. When this insight is fit into max-margin structured output methods, we obtain surrogate losses for the most widely used performance measures for multi-label classification. We perform experiments against state-of-theart methods in five publicly available benchmark datasets for MLC, and the proposed approach is the best performing overall. 1.1 Related Work The literature in this topic is vast and we cannot possibly make justice here since a comprehensive review is clearly impractical. Instead, we focus particularly on some state-of-the-art approaches 1 that have been tested on publicly available benchmark datasets for MLC, which facilitates a fair comparison against our method. A straightforward way to deal with multiple labels is to solve a binary classification problem for each one of them, treating them independently. This approach is known as Binary Method (BM) [9]. Classifier Chains (CC) [4] extends that by building a chain of binary classifiers, one for each possible label, but with each classifier augmented by all prior relevance predictions. Since the order of the classifiers in the chain is arbitrary, the authors also propose an ensemble method – Ensemble of Classifier Chains (ECC) – where several random chains are combined with a voting scheme. Probabilistic Classifier Chains (PCC) [1] extends CC to the probabilistic setting, with EPCC [1] being its corresponding ensemble method. Another way of working with multiple labels is to consider each possible set of labels as a class, thus encoding the problem as single-label classification. The problem with that is the exponentially large number of classes. RAndom K-labELsets (RAKEL) [10] deals with that by proposing an ensemble of classifiers, each one taking a small random subset of the labels and learning a single-label classifier for the prediction of each element in the power set of this subset. Other proposed ensemble methods are Ensemble of Binary Method (EBM) [4], which applies a simple voting scheme to a set of BM classifiers, and Ensemble of Pruned Sets (EPS) [11], which combines a set of Pruned Sets (PS) classifiers. PS is essentially a problem transformation method that maps sets of labels to single labels while pruning away infrequently occurring sets.Canonical Correlation Analysis (CCA) [3] exploits label relatedness by using a probabilistic interpretation of CCA as a dimensionality reduction technique and applying it to learn useful predictive features for multi-label learning. Meta Stacking (MS) [12] also exploits label relatedness by combining text features and features indicating relationships between classes in a discriminative framework. Two papers closely related to ours from the methodological point of view, which are however not tailored particularly to the multi-label learning problem, are [13] and [14]. In [13] the author proposes a smooth but non-concave relaxation of the F-measure for binary classification problems using a logistic regression classifier, and optimisation is performed by taking the maximum across several runs of BFGS starting from random initial values. In [14] the author proposes a method for optimising multivariate performance measures in a general setting in which the loss function is not assumed to be additive in the instances nor in the labels. The method also consists of optimising a convex relaxation of the derived losses. The key difference of our method is that we have a specialised convex relaxation for the case in which the loss does not decompose over the instances, but does decompose over the labels. 2 The Model Let the input x ∈X denote a label (e.g., a tag of an image), and the output y ∈Y denote a set of instances, (e.g., a set of training images). Let N = |X| be the number of labels and V be the number of instances. An input label x is encoded as x ∈{0, 1}N, s.t. ! i xi = 1. For example if N = 5 the second label is denoted as x = [0 1 0 0 0]. An output instance y is encoded as y ∈{0, 1}V (Y := {0, 1}V ), and yn i = 1 iff instance xn was annotated with label i. For example if V = 10 and only instances 1 and 3 are annotated with label 2, then the y corresponding to x = [0 1 0 0 0] is y = [1 0 1 0 0 0 0 0 0 0]. We assume a given training set {(xn, yn)}N n=1, where {xn}N n=1 comprises the entirety of labels available ({xn}N n=1 = X), and {yn}N n=1 represents the sets of instances associated to those labels. The task consists of estimating a map f : X →Y which reproduces well the outputs of the training set (i.e., f(xn) ≈yn) but also generalises well to new test instances. 2.1 Loss Functions The reason for this reverse prediction is the following: most widely accepted performance measures target information retrieval (IR) applications – that is, given a label we want to find a set of relevant instances. As a consequence, the measures are averaged over the set of possible labels. This is the case for, in particular, Macro-precision, Macro-recall, Macro-Fβ1 and Hamming loss [10]: Macro-precision = 1 N N " n=1 p(yn, ¯yn), Macro-recall = 1 N N " n=1 r(yn, ¯yn) 1Macro-F1 is the particular case of this when β equals to 1. Macro-precision and macro-recall are particular cases of macro-Fβ for β →0 and β →∞, respectively. 2 Macro-Fβ = 1 N N " n=1 (1 + β2) p(yn, ¯yn)r(yn, ¯yn) β2p(yn, ¯yn) + r(yn, ¯yn), Hamming loss = 1 N N " n=1 h(yn, ¯yn), where h(y, ¯y) = yT 1 + ¯yT 1 −2yT ¯y V , p(y, ¯y) = yT ¯y ¯yT ¯y , r(y, ¯y) = yT ¯y yT y . Here, ¯yn is our prediction for input label n, and yn the corresponding ground-truth. Since these measures average over the labels, in order to optimise them we need to average over the labels as well, and this happens naturally in a setting in which the empirical risk is additive on the labels.2 Instead of maximising a performance measure we frame the problem as minimising a loss function associated to the performance measure. We assume a known loss function ∆: Y × Y →R+ which assigns a non-negative number to every possible pair of outputs. This loss function represents how much we want to penalise a prediction ¯y when the correct prediction is y, i.e., it has the opposite semantics of a performance measure. As already mentioned, we will be able to deal with a variety of loss functions in this framework, but for concreteness of exposition we will focus on a loss derived from the Macro-Fβ score defined above, whose particular case for β equal to 1 (F1) is arguably the most popular performance measure for multi-label classification. In our notation, the Fβ score of a given prediction is Fβ(y, ¯y) = (1 + β2) yT ¯y β2yT y + ¯yT ¯y , (1) and since Fβ is a score of alignment between y and ¯y, one possible choice for the loss is ∆(y, ¯y) = 1 −Fβ(y, ¯y), which is the one we focus on in this paper, ∆(y, ¯y) = 1 −(1 + β2) yT ¯y β2yT y + ¯yT ¯y . (2) 2.2 Features and Parameterization Our next assumption is that the prediction for a given input x returns the maximiser(s) of a linear score of the model parameter vector θ, i.e., a prediction is given by ¯y such that 3 ¯y ∈argmax y∈Y ⟨φ(x, y), θ⟩. (3) Here we assume that φ(x, y) is linearly composed of features of the instances encoded in each yv, i.e., φ(x, y) = !V v=1 yv(ψv ⊗x). The vector ψv is the feature representation for the instance v. The map φ(x, y) will be the zero vector whenever yv = 0, i.e., when instance v does not have label x. The feature map φ(x, y) has a total of DN dimensions, where D is the dimensionality of our instance features (ψv) and N is the number of labels. Therefore DN is the dimensionality of our parameter θ to be learned. 2.3 Optimisation Problem We are now ready to formulate our estimator. We assume an initial, ‘ideal’ estimator taking the form θ∗= argmin θ #$ 1 N N " n=1 ∆(¯yn(xn; θ), yn) % + λ 2 ∥θ∥2 & . (4) In other words, we want to find a model that minimises the average prediction loss in the training set plus a quadratic regulariser that penalises complex solutions (the parameter λ determines the tradeoff between data fitting and good generalisation). Estimators of this type are known as regularised risk minimisers [15]. 2The Hamming loss also averages over the instances so it can be optimised in the ‘normal’ (not reverse) direction as well. 3⟨A, B⟩denotes the inner product of the vectorized versions of A and B 3 3 Optimisation 3.1 Convex Relaxation The optimisation problem (4) is non-convex. Even more critical, the loss is a piecewise constant function of θ.4 A similar problem occurs when one aims at optimising a 0/1 loss in binary classification; in that case, a typical workaround consists of minimising a surrogate convex loss function which upper bounds the 0/1 loss, for example the hinge loss, what gives rise to the support vector machine. Here we use an analogous approach, notably popularised in [16], which optimises a convex upper bound on the structured loss of (4). The resulting optimisation problem is [θ∗, ξ∗] = argmin θ,ξ # 1 N N " n=1 ξn + λ 2 ∥θ∥2 & (5) s.t. ⟨φ(xn, yn), θ⟩−⟨φ(xn, y), θ⟩≥∆(y, yn) −ξn, ξn ≥0 (6) ∀n, y ∈Y. It is easy to see that ξ∗ n upper bounds ∆(¯yn ∗, yn) (and therefore the objective in (5) upper bounds that of (4) for the optimal solution). Here, ¯yn ∗:= argmaxy ⟨φ(xn, y), θ∗⟩. First note that since the constraints (6) hold for all y, they also hold for ¯yn ∗. Second, the left hand side of the inequality for y = ¯yn must be non-positive from the definition of ¯y in equation (3). It then follows that ξ∗ n ≥∆(¯yn ∗, yn). The constraints (6) basically enforce a loss-sensitive margin: θ is learned so that mispredictions y that incur some loss end up with a score ⟨φ(xn, y), θ⟩that is smaller than the score ⟨φ(xn, yn), θ⟩ of the correct prediction yn by a margin equal to that loss (minus slack ξ). The formulation is a generalisation of support vector machines for the case in which there are an exponential number of classes y. It is in this sense that our approach is somewhat related in spirit to [10], as mentioned in the Introduction. However, as described below, here we can use a method for selecting a polynomial number of constraints which provably approximates well the original problem. The optimisation problem (5) has n|Y| = n2V constraints. Naturally, this number is too large to allow for a practical solution of the quadratic program. Here we resort to a constraint generation strategy, which consists of starting with no constraints and iteratively adding the most violated constraint for the current solution of the optimisation problem. Such an approach is assured to find an ϵ-close approximation of the solution of (5) after including only O(ϵ−2) constraints [16]. The key problem that needs to be solved at each iteration is constraint generation, i.e., to find the maximiser of the violation margin ξn, y∗ n ∈argmax y∈Y [∆(y, yn) + ⟨φ(xn, y), θ⟩] . (7) The difficulty in solving the above optimisation problem depends on the choice of φ(x, y) and ∆. Next we investigate how this problem can be solved for our particular choices of these quantities. 3.2 Constraint generation Using eq.(2) and φ(x, y) = !V v=1 yv(ψv ⊗x), eq. (7) becomes y∗ n ∈argmax y∈Y ⟨y, zn⟩. (8) where zn = Ψθn − (1 + β2)yn ∥y∥2 + β2 ∥yn∥2 , (9) and • Ψ is a V × D matrix with row v corresponding to ψv; • θn is the nth column of matrix θ; 4There is a countable number of loss values but an uncountable number of parameters, so there are large equivalence classes of parameters that correspond to precisely the same loss. 4 Algorithm 1 Reverse Multi-Label Learning 1: Input: training set {(xn, yn)}N n=1, λ, β, Output: θ 2: Initialize i = 1, θ1 = 0, MAX= −∞ 3: repeat 4: for n = 1 to N do 5: Compute y∗ n (Na¨ıve: Algorithm 2. Improved: See Appendix) 6: end for 7: Compute gradient gi (equation (12)) and objective oi (equation (11)) 8: θi+1 := argminθ λ 2 ∥θ∥2 + max(0, max j≤i ⟨gj, θ⟩+ oj); i ←i + 1 9: until converged (see [18]) 10: return θ Algorithm 2 Na¨ıve Constraint Generation 1: Input: (xn, yn), Ψ, θ, β, V , Output: y∗ n 2: MAX= −∞ 3: for k = 1 to V do 4: zn = Ψθn − (1+β2)yn k+β2∥yn∥2 5: y∗= argmaxy∈Yk ⟨y, zn⟩(i.e. find top k entries in zn in O(V ) time) 6: CURRENT= maxy∈Yk ⟨y, zn⟩ 7: if CURRENT>MAX then 8: MAX = CURRENT 9: y∗ n = y∗ 10: end if 11: end for 12: return y∗ n We now investigate how to solve (8) for a fixed θ. For the purpose of clarity, here we describe a simple, na¨ıve algorithm. In the appendix we present a more involved but much faster algorithm. A simple algorithm can be obtained by first noticing that zn depends on y only through the number of its nonzero elements. Consider the set of all y with precisely k nonzero elements, i.e., Yk =: {y : ∥y∥2 = k}. Then the objective in (8), if the maximisation is instead restricted to the domain Yk, is effectively linear in y, since zn in this case is a constant w.r.t. y. Therefore we can solve separately for each Yk by finding the top k entries in zn. Finding the top k elements of a list of size V can be done in O(V ) time [17]. Therefore we have a O(V 2) algorithm (for every k from 1 to V , solve argmaxy∈Yk ⟨y, z⟩in O(V ) expected time). Algorithm 1 describes in detail the optimisation, as solved by BMRM [18], and Algorithm 2 shows the na¨ıve constraint generation routine. The BMRM solver requires both the value of the objective function for the slack corresponding to the most violated constraint and its gradient. The value of the slack variable corresponding to y∗ n is ξ∗ n = ∆(y∗ n, yn) + ⟨φ(xn, y∗ n), θ⟩−⟨φ(xn, yn), θ⟩, (10) thus the objective function from (5) becomes 1 N " n ∆(y∗ n, yn) + ⟨φ(xn, y∗ n), θ⟩−⟨φ(xn, yn), θ⟩+ λ 2 ∥θ∥2 , (11) whose gradient (with respect to θ) is λθ −1 N " n (φ(xn, yn) −φ(xn, y∗ n)). (12) We need both expressions (11) and (12) in Algorithm 1. 3.3 Prediction at Test Time The problem to be solved at test time (eq. (3)) has the same form as the problem of constraint generation (eq. (7)), the only difference being that zn = Ψθn (i.e., the second term in eq. (9), due to the loss, is not present). Since zn a constant vector, the solution y∗ n for (7) is the vector that indicates the positive entries of zn, which can be efficiently found in O(V ). Therefore inference at prediction time is very fast. 5 Table 1: Evaluation scores and corresponding losses score ∆(y, ¯y) macro-Fβ 1 −(1+β2)(yT ¯y) β2yT y+¯yT ¯y macro-precision 1 −yT ¯y ¯yT ¯y macro-recall 1 −yT ¯y yT y Hamming loss yT 1+¯yT 1−2yT ¯y V Table 2: Datasets. #train/#test denotes the number of observations used for training and testing respectively; N is the number of labels and D the dimensionality of the features. dataset domain #train #test N D yeast biology 1500 917 14 103 scene image 1211 1196 6 294 medical text 645 333 45 1449 enron text 1123 579 53 1001 emotions music 391 202 6 72 3.4 Other scores Up to now we have focused on optimising Macro-Fβ, which already gives us several scores, in particular Macro-F1, macro-recall and macro-precision. We can however optimise other scores, in particular the popular Hamming loss – Table 1 shows a list with the corresponding loss, which we then plug in eq.(4). Note that for Hamming loss and macro-recall the denominator is constant, and therefore it is not necessary to solve (8) multiple times as described earlier, which makes constraint generation as fast as test-time prediction (see subsection 3.3). 4 Experimental Results In this section we evaluate our method in several real world datasets, for both macro-Fβ and Hamming loss. These scores were chosen because macro-Fβ is a generalisation of the most relevant scores, and the Hamming loss is a generic, popular score in the multi-label classification literature. Datasets We used 5 publicly available5 multi-label datasets: yeast, scene, medical, enron and emotions. We selected these datasets because they cover a variety of application domains – biology, image, text and music – and there are published results of competing methods on them for some of the popular evaluation measures for MLC (macro-F1 and Hamming loss). Table 2 describes them in more detail. Model selection Our model requires only one parameter: λ, the trade-off between data fitting and good generalisation. For each experiment we selected it with 5-fold cross-validation using only the training data. Implementation Our implementation is in C++, using the Bundle Methods for Risk Minimization (BMRM) of [18] as a base. Source code is available6 under the Mozilla Public License.7 Comparison to published results on Macro-F1 In our first set of experiments we compared our model to published results on the Macro-F1 score. We strived to make our comparison as broad as possible, but we limited ourselves to methods with published results on public datasets, where the experimental setting was described in enough detail to allow us to make a fair comparison. We therefore compared our model to Canonical Correlation Analysis [3] (CCA), Binary Method [9] (BM), Classifier Chains [4] (CC), Subset Mapping [19] (SM), Meta Stacking [12] (MS), Ensembles of Binary Method [4] (EBM) , Ensembles of Classifier Chains [4] (ECC), Ensembles of Pruned Sets [11] (EPS) and Random K Label Subsets [10] (RAKEL). Table 3 summarizes our results, along with competing methods’ which were taken from compilations by [3] and [4]. We can see that our model has the best performance in yeast, medical and enron. In 5http://mulan.sourceforge.net/datasets.html 6http://users.cecs.anu.edu.au/∼jpetterson/. 7http://www.mozilla.org/MPL/MPL-1.1.html 6 scene it doesn’t perform as well – we suspect this is related to the label cardinality of this dataset: almost all instances have just one label, making this essentially equivalent to a multiclass dataset. Comparison to published results on Hamming Loss To illustrate the flexibility of our model we also evaluated it on the Hamming loss. Here, we compared our model to classifier chains [4] (CC), probabilistic classifier chains [1] (PCC), ensembles of classifier chains [4] (ECC) and ensembled probabilistic classifier chains [1] (EPCC). These are the methods for which we could find Hamming loss results on publicly available data. Table 4 summarizes our results, along with competing methods’ which were taken from a compilation by [1]. As can be seen, our model has the best performance on both datasets. Results on Fβ One strength of our method is that it can be optimised for the specific measure we are interested in. In Macro-Fβ, for example, β is a trade-off between precision and recall: when β →0 we recover precision, and when β →∞we get recall. Unlike with other methods, given a desired precision/recall trade-off encoded in a choice of β, we can optimise our model such that it gets the best performance on Macro-Fβ. To show this we ran our method on all five datasets, but this time with different choices of β, ranging from 10−2 to 102. In this case, however, we could not find published results to compare to, so we used Mulan8, an open-source library for learning from multi-label datasets, to train three models: BM[9], RAKEL[10] and MLKNN[20]. BM was chosen as a simple baseline, and RAKEL and MLKNN are the two state-of-the-art methods available in the package. MLKNN has two parameters: the number of neighbors k and a smoothing parameter s controlling the strength of the uniform prior. We kept both fixed to 10 and 1.0, respectively, as was done in [20]. RAKEL has three parameters: the number of models m, the size of the labelset k and the threshold t. Since a complete search over the parameter space would be impractical, we adopted the library’s default for t and m (respectively 0.5 and 2 ∗N) and set k to N 2 as suggested by [4]. For BM we kept the library’s defaults. In Figure 1 we plot the results. We can see that BM tends to prioritize recall (right side of the plot), while ML-KNN and RAKEL give more emphasis to precision (left side). Our method, however, goes well in both sides, as it is trained separately for each value of β. In both scene and yeast it dominates the right side while is still competitive on the left side. And in the other three datasets – medical, enron and emotions – it practically dominates over the entire range of β. 5 Conclusion and Future Work We presented a new approach to multi-label learning which consists of predicting sets of instances from the labels. This apparent unintuitive approach is in fact natural since, once the problem is viewed from this perspective, many popular performance measures admit convex relaxations that can be directly and efficiently optimised with existing methods. The method only requires one parameter, as opposed to most existing methods, which have several. The method leverages on existing tools from structured output learning, which gives us certain theoretical guarantees. A simple version of constraint generation is presented for small problems, but we also developed a scalable, fast version for dealing with large datasets. We presented a detailed experimental comparison against several state-of-the-art methods and overall our performance is notably superior. A fundamental limitation of our current approach is that it does not handle dependencies among labels. It is however possible to include such dependencies by assuming for example a bivariate feature map on the labels, rather than univariate. This however complicates the algorithmics, and is left as subject for future research. Acknowledgements We thank Miro Dud´ık as well as the anonymous reviewers for insightful observations that helped to improve the paper. NICTA is funded by the Australian Government as represented by the Department of Broadband, Communications and the Digital Economy and the Australian Research Council through the ICT Centre of Excellence program. 8http://mulan.sourceforge.net/ 7 Table 3: Macro-F1 results. Bold face indicates the best performance. We don’t have results for CCA in the Medical and Enron datasets. Dataset Ours CCA CC BM SM MS ECC EBM EPS RAKEL Yeast 0.440 0.346 0.346 0.326 0.327 0.331 0.362 0.364 0.420 0.413 Scene 0.671 0.374 0.696 0.685 0.666 0.694 0.742 0.729 0.763 0.750 Medical 0.420 0.377 0.364 0.321 0.370 0.386 0.382 0.324 0.377 Enron 0.243 0.198 0.197 0.144 0.198 0.201 0.201 0.155 0.206 Table 4: Hamming loss results. Bold face indicates the best performance. Dataset Ours CC PCC ECC EPCC Scene 0.1271 0.1780 0.1780 0.1503 0.1498 Emotions 0.2252 0.2448 0.2417 0.2428 0.2372 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0.4 0.5 0.6 0.7 0.8 0.9 1 yeast log(β) macro−Fβ ML−KNN RaKEL BM Our method −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 scene log(β) macro−Fβ ML−KNN RaKEL BM Our method −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 medical log(β) macro−Fβ ML−KNN RaKEL BM Our method −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 enron log(β) macro−Fβ ML−KNN RaKEL BM Our method −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 0.4 0.5 0.6 0.7 0.8 0.9 1 emotions log(β) macro−Fβ ML−KNN RaKEL BM Our method Figure 1: Macro-Fβ results on five datasets, with β ranging from 10−2 to 102 (i.e., log10 β ranging from -2 to 2). The center point (log β = 0) corresponds to macro-F1. β controls a trade-off between Macro-precision (left side) and Macro-recall (right side). 8 References [1] Krzysztof Dembczynski, Weiwei Cheng, and Eyke H¨ullermeier. Bayes Optimal Multilabel Classification via Probabilistic Classifier Chains. In Proc. Intl. Conf. Machine Learning, 2010. [2] Xinhua Zhang, T. Graepel, and Ralf Herbrich. Bayesian Online Learning for Multi-label and Multi-variate Performance Measures. In Proc. Intl. Conf. on Artificial Intelligence and Statistics, volume 9, pages 956–963, 2010. [3] Piyush Rai and Hal Daume. Multi-Label Prediction via Sparse Infinite CCA. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1518–1526. 2009. [4] Jesse Read, Bernhard Pfahringer, Geoffrey Holmes, and Eibe Frank. Classifier chains for multi-label classification. In Wray L. Buntine, Marko Grobelnik, Dunja Mladenic, and John Shawe-Taylor, editors, ECML/PKDD (2), volume 5782 of Lecture Notes in Computer Science, pages 254–269. Springer, 2009. [5] Andr´e Elisseeff and Jason Weston. A kernel method for multi-labelled classification. In Annual ACM Conference on Research and Development in Information Retrieval, pages 274–281, 2005. [6] Matthieu Guillaumin, Thomas Mensink, Jakob Verbeek, and Cordelia Schmid. TagProp: Discriminative Metric Learning in Nearest Neighbor Models for Image Auto-Annotation. In Proc. Intl. Conf. Computer Vision, 2009. [7] Douglas W. Oard and Jason R. Baron. Overview of the TREC 2008 Legal Track. [8] Linli Xu, Martha White, and Dale Schuurmans. Optimal reverse prediction. Proc. Intl. Conf. Machine Learning, pages 1–8, 2009. [9] Grigorios Tsoumakas, Ioannis Katakis, and Ioannis P. Vlahavas. Mining Multi-label Data. Springer, 2009. [10] Grigorios Tsoumakas and Ioannis P. Vlahavas. Random k-labelsets: An ensemble method for multilabel classification. In Proceedings of the 18th European Conference on Machine Learning (ECML 2007), pages 406–417, Warsaw, Poland, 2007. [11] Jesse Read, Bernhard Pfahringer, and Geoff Holmes. Multi-label classification using ensembles of pruned sets. In ICDM ’08: Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, pages 995–1000, Washington, DC, USA, 2008. IEEE Computer Society. [12] Shantanu Godbole and Sunita Sarawagi. Discriminative methods for multi-labeled classification. In Proceedings of the 8th Pacific-Asia Conference on Knowledge Discovery and Data Mining, pages 22–30. Springer, 2004. [13] Martin Jansche. Maximum expected F-measure training of logistic regression models. HLT, pages 692–699, 2005. [14] T. Joachims. A support vector method for multivariate performance measures. In Proc. Intl. Conf. Machine Learning, pages 377–384, San Francisco, California, 2005. Morgan Kaufmann Publishers. [15] V. Vapnik. Statistical Learning Theory. John Wiley and Sons, New York, 1998. [16] I. Tsochantaridis, T. Joachims, T. Hofmann, and Y. Altun. Large margin methods for structured and interdependent output variables. J. Mach. Learn. Res., 6:1453–1484, 2005. [17] D. E. Knuth. The Art of Computer Programming: Fundamental Algorithms, volume 1. Addison-Wesley, Reading, Massachusetts, second edition, 1998. [18] Choon Hui Teo, S. V. N. Vishwanathan, Alex J. Smola, and Quoc V. Le. Bundle methods for regularized risk minimization. Journal of Machine Learning Research, 11:311–365, 2010. [19] Robert E. Schapire and Y. Singer. Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37(3):297–336, 1999. [20] Min-Ling Zhang and Zhi-Hua Zhou. ML-KNN: A lazy learning approach to multi-label learning. Pattern Recognition, 40(7):2038–2048, July 2007. 9
2010
224
3,993
Efficient Relational Learning with Hidden Variable Detection Ni Lao, Jun Zhu, Liu Liu, Yandong Liu, William W. Cohen Carnegie Mellon University 5000 Forbes Avenue, Pittsburgh, PA 15213 {nlao,junzhu,liuliu,yandongl,wcohen}@cs.cmu.edu Abstract Markov networks (MNs) can incorporate arbitrarily complex features in modeling relational data. However, this flexibility comes at a sharp price of training an exponentially complex model. To address this challenge, we propose a novel relational learning approach, which consists of a restricted class of relational MNs (RMNs) called relation tree-based RMN (treeRMN), and an efficient Hidden Variable Detection algorithm called Contrastive Variable Induction (CVI). On one hand, the restricted treeRMN only considers simple (e.g., unary and pairwise) features in relational data and thus achieves computational efficiency; and on the other hand, the CVI algorithm efficiently detects hidden variables which can capture long range dependencies. Therefore, the resultant approach is highly efficient yet does not sacrifice its expressive power. Empirical results on four real datasets show that the proposed relational learning method can achieve similar prediction quality as the state-of-the-art approaches, but is significantly more efficient in training; and the induced hidden variables are semantically meaningful and crucial to improve the training speed and prediction qualities of treeRMNs. 1 Introduction Statistical relational learning has attracted ever-growing interest in the last decade, because of widely available relational data, which can be as complex as citation graphs, the World Wide Web, or relational databases. Relational Markov Networks (RMNs) are excellent tools to capture the statistical dependency among entities in a relational dataset, as has been shown in many tasks such as collective classification [22] and information extraction [18][2]. Unlike Bayesian networks, RMNs avoid the difficulty of defining a coherent generative model, thereby allowing tremendous flexibility in representing complex patterns [21]. For example, Markov Logic Networks [10] can be automatically instantiated as a RMN, given just a set of predicates representing attributes and relations among entities. The algorithm can be applied to tasks in different domains without any change. Relational Bayesian networks [22], in contrary, would require expert knowledge to design proper model structures and parameterizations whenever the schema of the domain under consideration is changed. However, this flexibility of RMN comes at a high price in training very complex models. For example, work by Kok and Domingos [10][11][12] has shown that a prominent problem of relational undirected models is how to handle the exponentially many features, each of which is an conjunction of several neighboring variables (or “ground atoms” in terms of first order logic). Much computation is spent on proposing and evaluating candidate features. The main goal of this paper is to show that instead of learning a very expressive relational model, which can be extremely expensive, an alternative approach that explores Hidden Variable Detection (HVD) to compensate a family of restricted relational models (e.g., treeRMNs) can yield a very efficient yet competent relational learning framework. First, to achieve efficient inference, we introduce a restricted class of RMNs called relation tree-based RMNs (treeRMNs), which only considers unary (single variable assignment) and pairwise (conjunction of two variable assignments) features. 1 Since the Markov blanket of a variable is concisely defined by a relation tree on the schema, we can easily control the complexities of treeRMN models. Second, to compensate for the restricted expressive power of treeRMNs, we further introduce a hidden variable induction algorithm called Contrastive Variable Induction (CVI), which can effectively detect latent variables capturing long range dependencies. It has been shown in relational Bayesian networks [24] that hidden variables can help propagating information across network structures, thus reducing the burden of extensive structural learning. In this work, we explore the usefulness of hidden variables in learning RMNs. Our experiments on four real datasets show that the proposed relational learning framework can achieve similar prediction quality to the state-of-the-art RMN models, but is significantly more efficient in training. Furthermore, the induced hidden variables are semantically meaningful and are crucial to improving training speed of treeRMN. In the remainder of this paper, we first briefly review related work and training undirected graphical models with mean field contrastive divergence. Then we present the treeRMN model and the CVI algorithm for variable induction. Finally, we present experimental results and conclude this paper. 2 Related Work There has been a series of work by Kok and Domingos [10][11][12] developing Markov Logic Networks (MLNs) and showing their flexibility in different applications. The treeRMN model we introduced in this work is intended to be a simpler model than MLNs, which can be trained more efficiently, yet still be able to capture complex dependencies. Most of the existing RMN models construct Markov networks by applying templates to entity relation graphs [21][8]. The treeRMN model that we are going to introduce uses a type of template called a relation tree, which is very general and applicable to a wide range of applications. This relation tree template resembles the path-based feature generation approach for relational classifiers developed by Huang et al. [7]. Recently, much work has been done to induce hidden variables for generative Bayesian networks [5][4][16][9][20][14]. However, previous studies [6][19] have pointed out that the generality of Bayesian Networks is limited by their need for prior knowledge on the ordering of nodes. On the other hand, very little progress has been made in the direction of non-parametric hidden variable models based on discriminative Markov networks (MNs). One recent attempt is the Multiple Relational Clustering (MRC) [11] algorithm, which performs top-down clustering of predicates and symbols. However, it is computationally expensive because of its need for parameter estimation when evaluating candidate structures. The CVI algorithm introduced in this work is most similar to the “ideal parent” algorithm [16] for Gaussian Bayesian networks. The “ideal parent” evaluates candidate hidden variables based on the estimated gain of log-likelihood they can bring to the Bayesian network. Similarly, the CVI algorithm evaluates candidate hidden variables based on the estimated gain of an regularized RMN log-likelihood, thus avoids the costly step of parameter estimation. 3 Preliminaries Before describing our model, let’s briefly review undirected graphical models (a.k.a, Markov networks). Since our goal is to develop an efficient RMN model, we use the simple but very efficient mean field contrastive divergence [23] method. Our empirical results show that even the simplest naive mean field can yield very promising results. Extension to using more accurate (but also more expensive) inference methods, such as loopy BP [15] or structured mean fields can be done similarly. Here we consider the general case that Markov networks have observed variables O, labeled variables Y, and hidden variables H. Let X = (Y, H) be the joint of hidden and labeled variables. The conditional distribution of X given observations O is p(x|o; θ) = exp(θ⊤f(x, o))/Z(θ), where f is a vector of feature functions fk; θ is a vector of weights; Z(θ) = ∑ x exp(θ⊤f(x, o)) is a normalization factor; and fk(x, o) counts the number of times the k-th feature fires in (x, o). Here we assume that the range of each variable is discrete and finite. Many commonly used graphical models have tied parameters, which allow a small number of parameters to govern a large number of features. For example, in a linear chain CRF, each parameter is associated with a feature template: e.g. “the current node having label yt = 1 and the immediate next neighbor having label yt+1 = 1”. After applying each template to all the nodes in a graph, we get a graphical model with a large number of features (i.e., instantiations of feature templates). In general, a model’s order of Markov dependence is determined by the maximal number of neighboring steps considered by any one of 2 its feature templates. In the context of relational learning, the templates can be defined similarly, except having richer representations–with multiple types of entities and neighboring relations. Given a set of training samples D = {(ym, om)}M m=1, the parameter estimation of MN can be formulated as maximizing the following regularized log-likelihood L(θ) = M ∑ m=1 lm(θ) −λ∥θ∥1 −1 2β∥θ∥2 2, (1) where λ and β are non-negative regularization constants for the ℓ1 and ℓ2-norm respectively. Because of its singularity at the origin, the ℓ1-norm can yield a sparse estimate, which is a desired property for hidden variable discovery, as we shall see. The differentiable ℓ2-norm is useful when there are strongly correlated features. The composite ℓ1/ℓ2-norm is known as ElasticNet [27], which has been shown to have nice properties. The log-likelihood for a single sample is l(θ) = log p(y|o; θ) = log ∑ h p(h, y|o; θ), (2) and its gradient is ∇θl(θ) = ⟨f⟩py −⟨f⟩p, where ⟨·⟩p is the expectation under the distribution p. To simplify notation, we use p to denote the distribution p(h, y|o; θ) and py to denote p(h|y, o; θ). For simple (e.g. tree-structured) MNs, message passing algorithms can be used to infer the marginal probabilities as required in the gradients exactly. For general MNs, however, we need approximate strategies like variational or Monte Carlo methods. Here we use simple mean field variational method [23]. By analogy with statistical physics, the free energy of any distribution q is defined as F(q) = ⟨−θ⊤f⟩q −H(q). (3) Therefore, F(p) = −log Z(θ), F(py) = −log ∑ h exp(θ⊤f(y, h, o)), and l(θ) = F(p) −F(py). Let q0 be the mean field approximation of p(h, y|o; θ) with y clamped to their true values, and qt be the approximation of p(h, y|o; θ) obtained by applying t steps of mean field updates to q0 with y free. Then F(q0) ≥F(qt) ≥F(q∞) ≥F(p). As in [23], we set t = 1, and use lCD1(θ) ≜F(q1) −F(q0) (4) to approximate l(θ), and its gradient is ∇θlCD1(θ) = ⟨f⟩q0 −⟨f⟩q1. The new objective function LCD1(θ) uses lCD1(θ) to replace l(θ). One advantage of CD is that it avoids q being trapped in a possible multimodal distribution of p(h, y|o; θ) [25][3]. With the above approximation, we can use orthant-wise L-BFGS [1] to estimate the parameters θ. 4 Relation Tree-Based RMNs In the following, we formally define the treeRMN model with relation tree templates, which is very general and applicable to a wide range of applications. A schema S (Figure 1 left) is a pair (T, R). T = {Ti} is a set of entity types which include both basic entity types (e.g., Person, Class) and composite entity types (e.g., ⟨Person, Person⟩, ⟨Person, Class⟩). Each entity type is associated with a set of attributes A(T) = {T.Ai}: e.g., A(Person) = {Person.gender}. R = {R} is a set of binary relations. We use dom(R) to denote the domain type of R and range(R) to denote its range. For each argument of a composite entity type, we define two relations, one with outward direction (e.g. PP1 means from a Person-Person pair to its first argument) and another with inward direction (e.g. PP1−1). Here we use −1 to denote the inverse of a relation. We further introduce a Twin relation, which connects a composite entity type to itself. Its semantics will be clear later. In principle, we can define other types of relations such as those corresponding to functions in second order logic (e.g. Person F atherOf −−−−−−−→Person). An entity relation graph G = IE(S) (Figure 1 right), is the instantiation of schema S on a set of basic entities E = {ei}. We define the instantiation of a basic entity type T as IE(T) = {e : e.T = T}, and similarly for a composite type IE(T = ⟨T1, ..., Tk⟩) = {⟨e1, ..., ek⟩: ei.T = Ti}. In the given example, IE(Person) = {p1, p2} is the set of persons; IE(Class) = {c1} is the set of classes; IE(⟨Person, Person⟩) = {⟨p1, p2⟩, ⟨p2, p1⟩} is the set of person-person pairs; and IE(⟨Person, Class⟩) = {⟨p1, c1⟩, ⟨p2, c1⟩} is the set of person-class pairs. Each entity e has a set of variables {e.Xi} that correspond to the set of attributes of its entity type A(e.T). For a composite entity that consists of two entities of the same type, we’d like to capture its correlation with its twin– the composite entity made of the same basic entities but in reversed order. Therefore, we add the Twin relation between all pairs of twin entities: e.g., from ⟨p1, p2⟩to ⟨p2, p1⟩, and vice versa. 3 PP1 <Person> gender <Class> isGrduateCourse <Person, Person> advise co-auther <Person,Class> give take PP1 PC2 PP2 PP2 PC1 PC1 PC2 -1 -1 -1 -1 Twin <p1> gender =M <p2> gender =F <c1> isGrduateCourse =0 <p1,p2> advise=1 co-auther=1 <p2,p1> advise=0 co-auther=1 <p1,c1> give=1 take=0 <p2,c1> give=0 take=1 Twin Twin Figure 1: (Left) is a schema, where round and rectangular boxes represent basic and composite entity types respectively. (Right) is a corresponding entity relation graph with three basic entities: p1, p2, c1. For clarity we only show one direction of the relations and omit their labels. PP1 <Person> <Class> <Person, Person> <Person,Class> PP2 PC2 <Person> <Person, Person> <Person> PP2 -1 PP1-1 PC1 -1 <Person, Person> <Person, Person> PP2 <Person> Twin <Person, Person> <Person,Class> <Person, Person> PP2 -1 PP1-1 PC1 -1 PP1 <Person> <Person, Person> <Person,Class> <Person, Person> PP2 -1 PP1-1 PC1-1 Figure 2: Two-level relation trees for the Person type (left) and the ⟨Person, Person⟩type (right). Given a schema, we can conveniently express how one entity can reach another entity by the concept of a relation path. A relation path P is a sequence of relations R1 . . . Rℓfor which the domains and ranges of adjacent relations are compatible–i.e., range(Ri) = dom(Ri+1). We define dom(R1 . . . Rℓ) ≡dom(R1) and range(R1 . . . Rℓ) ≡range(Rℓ), and when we wish to emphasize the types associated with each step in a path, we will write the path P = R1 . . . Rℓas T0 R1 −−→. . . Rℓ −−→Tℓ, where T0 = dom(R1) = dom(P), T1 = range(R1) = dom(R2) and so on. Note that, because some of the relations reflect one-to-one mappings, there are groups of paths that are equivalent–e.g., the path Person is actually equivalent to the path Person P C1−1 −−−−→ ⟨Person, Class⟩ P C1 −−−→Person. To avoid creating these uninteresting paths, we add a constraint to outward composite relations (e.g. PP1,PC1) that they cannot be immediately preceded by their inverse. We also constrain that the Twin relation should not be combined with any other relations. Now, the Markov blanket of an entity e ∈T can be concisely defined by the set of all relation paths with domain T and of length ≤ℓ(as shown in Figure 2). We call this set the relation tree of type T, and denote it as Tree(T, ℓ) = {P}. We define a unary template as T.Ai = a, where Ai is an attribute of type T, and a ∈range(Ai). This template can be applied to any entity e of type T in the entity relation graph. We define a pairwise template as T.Ai = a ∧P.Bj = b, where Ai is an attribute of type T, a ∈range(Ai), P.Bj is an attribute of type range(P), dom(P) = T, and b ∈range(Bj). This template can be applied to any entity pair (e1, e2), where e1.T = T and e2 ∈e1.P. Here we define e.P as the set of entities reach able from entity e ∈T through the relation path P. For example, the following template pp.coauthor = 1 ∧ pp P P 1 −−−→p P P 1−1 −−−−−→pp.advise = 1 can be applied to any person-person pair, and it fires whenever co-author=1 for this person pair, and the first person (identified as pp P P 1 −−−→p ) also have advise=1 with another person. Here we use p as a shorthand for the type Person, and pp a shorthand for ⟨Person, Person⟩. In our current implementation, we systematically enumerate all possible unary and pairwise templates. Given the above concepts, we define a treeRMN model M = (G, f, θ) as the tuple of an entity relation graph G, a set of feature functions f, and their weights θ. Each feature function fk counts the number of times the k-th template fires in G. Generally, the complexity of inference is exponential in the depth of the relation trees, because both the number of templates and their sizes of Markov blankets grow exponentially w.r.t. the depth ℓ. TreeRMN provides us a very convenient way to control the complexity by the single parameter ℓ. Since treeRMN only considers pairwise and unary features, it is less expressive than Markov Logic Networks [10], which can define higher order features by conjunction of predicates; and treeRMN is also less expressive than relational Bayesian networks [9][20][14], which have factor functions with three arguments. However, the limited expressive power of treeRMN can be effectively compensated for by detecting hidden variables, which is another key component of our relational learning approach, as explained in the next section. 4 Algorithm 1 Contrastive Variable Induction initialize a treeRMN M = (G, f, θ) while true do estimate parameters θ by L-BFGS (f ′, θ′) = induceHiddenVariables(M) if no hidden variable is induced then break end if end while return M Algorithm 2 Bottom Up Clustering of Entities initialize clustering Γ = {Ii = {i}} while true do for any pair of clusters I1,I2 ∈Γ do inc(I1, I2) = ∆I1∪I2 −∆I1 −∆I2 end for if the largest increment ≤0 then break end if merge the pair with the largest increment end while return Γ 5 Contrastive Variable Induction (CVI) As we have explained in the previous section, in order to compensate for the limited expressive power of a shallow treeRMN and capture long-range dependencies in complex relational data, we propose to introduce hidden variables. These variables are detected effectively with the Contrastive Variable Induction (CVI) algorithm as explained below. The basic procedure (Algorithm 1) starts with a treeRMN model on observed variables, which can be manually designed or automatically learned [13]; then it iteratively introduces new HVs to the model and estimate its parameters. The key to making this simple procedure highly efficient is a fast algorithm to evaluate and select good candidate HVs. We give closed-form expressions of the likelihood gain and the weights of newly added features under contrastive divergence approximation [23] (other type of inference can be done similarly). Therefore, the CVI process can be very efficient, only adding small overhead to the training of a regular treeRMN. Consider introducing a new HV H to the entity type T. In order for H to influence the model, it needs to be connected to the existing model. This is done by defining additional feature templates: we can denote a HV candidate by a tuple ({q(i)(H)}, fH, θH), where {q(i)(H)} is the set of distributions of the hidden variable H on all entities of type T, fH is a set of pairwise feature templates that connect H to the existing model, and θH is a vector of feature weights. Here we assume that any feature f ∈fH is in the pairwise form fH=1 ∧A=a, where a is the assignment to one of the existing variables A in the relation tree of type T. Ideally, we would like to identify the candidate HV, which gives the maximal gain in the regularized objective function LCD1(θ). For easy evaluation of H, we set its mean field variational parameters µH to either 0 or 1 on the entities of type T. This yields a lower bound to the gain of LCD1(θ). Therefore, a candidate HV can be represented as (I, fH, θH), where I is the set of indices to the entities with µH = 1. Using second order Taylor expansion, we can show that for a particular feature f ∈fH the maximal gain ∆I,f = 1 2 ⌊−eI[f]⌋2 λ δI[f] + β (5) is achieved at θf = ⌊−eI[f]⌋λ δI[f] + β , (6) where ⌊⌋is a truncation operator: ⌊a⌋b = a−b, if a > b; a+b, if a < −b; 0, otherwise. Error eI[f] = ⟨f⟩q1,I −⟨f⟩q0,I is the difference of f’s expectations, and δI[f] = V ar∗ q1,I[f] −V ar∗ q0,I[f] is the differences of f’s variances1. Here we use q, I to denote the distribution q of the existing variables augmented by the distribution of H parameterized by the index set I. q0 and q1 are the wake and sleep distributions estimated by 1-step mean-field CD. The estimations in Eq. (5) and (6) are simple, yet have nice intuitive explanations about the effects of the ℓ1 and ℓ2 regularizer as used in Eq. (1): a large ℓ2-norm (i.e. large β) smoothly shrinks both the (estimated) likelihood gain and the feature weights; while the non-differentiable ℓ1-norm not only shrink the estimated gain and feature weights, but also drive features to have zero gains, therefore, can automatically select the features. If we assume that the gains of individual features are independent, then the estimated gain for H is 1V arq,I[f] is intractable when we have tied parameters. Therefore, we approximate it by assuming that the occurrences of f are independent to each other: i.e. V ar∗ q,I[f] = ∑ V ∈V V arq,I[f(V )] = ∑ V ∈V ⟨f(V )⟩q,I (1 −⟨f(V )⟩q,I), where V is any specific subset of variables that f can be applied to. 5 ∆I ≈ ∑ f∈fI ∆I,f, where fI = {f : ∆I,f > 0} is the set of features that are expected to improve the objective function. However, finding the index set I that maximizes ∆I is still non-trivial—an NP-hard combinatory optimization problem, which is often tackled by top-down or bottom-up procedures in the clustering literature. Algorithm 2 uses a simple bottom up clustering algorithm to build a hierarchy of clusters. It starts with each sample as an individual cluster, and then repeatedly merges the two clusters that lead to the best increment of gain. The merging is stopped if the best increment ≤0. After clustering, we introduce a single categorical variable that treats each cluster with positive gain as a category, and the remaining useless clusters are merged into a separate category. Introducing this categorical variable is equivalent to introducing a set of binary variables–one for each cluster with positive gain. From the above derivation, we can see that the essential part of the CVI algorithm is to compute the expectations and variances of RMN features, both of which can be done by any inference procedures, including the mean field as we have used. Therefore, in principle, the CVI algorithm can be extended to use other inference methods like belief propagation or exact inference. Remark 1 after the induction step, the introduced HVs are treated as observations: i.e. their variational parameters are fixed to their initial 0 or 1 values. In the future, we’d like to treat the HVs as free variables. This can potentially correct the errors made by the greedy clustering procedure. The cardinalities of HVs may be adapted by operators like deleting, merging, or splitting of categories. Remark 2 currently, we only induce HVs to basic entity types. Extension to composite types can show interesting tenary relations such as “Abnormality can be PartOf Animals”. However, this requires clustering over a much larger number of entities, which cannot be done by our simple implementation of bottom up clustering. 6 Experiment In this section, we present both qualitative and quantitative results of treeRMN model. We demonstrate that CVI can discover semantically meaningful hidden variables, which can significantly improve the speed and quality of treeRMN models. 6.1 Datasets Basic Composite #E #A #E #A Animal 50 80 0 0 Nation 14 111 196 56 UML 135 0 18,225 49 Kinship 104 0 10,816 1* Table 1: Number of entities (#E) and attributes (#A) for four datasets. ∗The kinship data has only one attribute which has 26 possible values. Table 1 shows the statistics of the four datasets used in our experiments. These datasets are commonly used by previous work in relational learning [9][11][20][14]. The Animal dataset contains a set of animals and their attributes. It consists exclusively of unary predicates of the form A(a) where A is an attribute and a is an animal (e.g., Swims(Dolphin)). This is a simple propositional dataset with no relational structure, but is useful as a base case for comparison. The Nation dataset contains attributes of nations and relations among them. The binary predicates are of the form R(n1, n2), where n1, n2 are nations and R is a relation between them (e.g., ExportsTo, GivesEconomicAidTo). The unary predicates are of the form A(n), where n is a nation and A is a attribute (e.g., Communist(China)). The UML dataset is a biomedical ontology called Unified Medical Language System. It consists of binary predicates of the form R(c1, c2), where c1 and c2 are biomedical concepts and R is a relation between them (e.g.,Treats(Antibiotic,Disease)). The Kinship dataset contains kinship relationships among members of the Alyawarra tribe from Central Australia. Predicates are of the form R(p1, p2), where R is a kinship term and p1, p2 are persons. Except for the animal data, the number of composite entities is the square of the number of basic entities. 6.2 Characterization of treeRMN and CVI In this section, we analyze the properties of the discovered hidden variables and demonstrate the behavior of the CVI algorithm. For the simple non-relational Animal data, if we start with a full model with all pairwise features, CVI will decide not to introduce any hidden variables. If we run CVI starting from a model with only unary features, however, CVI decides to introduce one hidden variable H0 with 8 categories. Table 2 shows the associated entities and features for the first four categories. We can see that they nicely identify marine mammals, predators, rodents, and primates. 6 Entities Positive Features Negative Features C0 KillerWhale Seal Dolphin BlueWhale Walrus HumpbackWhale Flippers Ocean Water Swims Fish Hairless Coastal Arctic ... Quadrapedal Ground Furry Strainteeth Walks ... C1 GrizzlyBear Tiger GermanShepherd Leopard Wolf Weasel Raccoon Fox Bobcat Lion Stalker Fierce Meat Meatteeth Claws Hunter Nocturnal Paws Smart Pads ... Timid Vegetation Weak Grazer Toughskin Hooves Domestic ... C2 Hamster Skunk Mole Rabbit Rat Raccoon Mouse Hibernate Buckteeth Weak Small Fields Nestspot Paws ... Strong Muscle Big Toughskin ... C3 SpiderMonkey Gorilla Chimpanzee Tree Jungle Bipedal Hands Vegetation Forest ... Plains Fields Patches ... Table 2: The associated entities and features (sorted by decreasing magnitude of feature weights) for the first four categories of the induced hidden variable a.H0 on the Animal data. The features are in the form a.H0 = Ci ∧a.A = 1, where A is any of the variables in the last two columns. Entities Positive Features C0 AcquiredAbnormality AnatomicalAbnormality CongenitalAbnormality c CC2−1 −−−−−→cc.Causes c CC1−1 −−−−−→cc.PartOf c CC2−1 −−−−−→cc.Complicates c CC2−1 −−−−−→cc.CooccursWith ... C1 Alga Plant c CC1−1 −−−−−→cc.InteractsWith c CC1−1 −−−−−→cc.LocationOf ... C2 Amphibian Animal Bird Invertebrate Fish Mammal Reptile Vertebrate c CC1−1 −−−−−→cc.InteractsWith c CC2−1 −−−−−→cc.PropertyOf c CC2−1 −−−−−→cc.InteractsWith c CC2−1 −−−−−→cc.PartOf ... Table 3: The associated entities and features (sorted by decreasing magnitude of feature weights) for the first three categories of the induced hidden variable c.H0 on the UML data. The features are in the form c.H0 = Ci ∧A = 1, where A is any of the variables in the last column. -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0 10 20 30 40 50 60 L-BFGS Iteration CLL Initial model Introduce c.H0 Introduce c.H1 Figure 3: change of the conditional log likelihood during training for the UML data. For the three relational datasets, we use UML as an example. The induction process of Nation and Kinship datasets are similar, and we omit their details due to space limitation. For the UML task, CVI induces two multinomial hidden variables H0 and H1. As we can see from Figure 3, the inclusion of each hidden variable significantly improves the conditional log likelihood of the model. The first hidden variable C.H0 has 43 categories, and Table 3 shows the top three of them. We can see that these categories represent the hidden concepts Abnormalities, Animals and Plants respectively. Abnormalities can be caused or treated by other concepts, and it can also be a part of other concepts. Plants can be the location of some other concepts; and some other concepts can be part of or the property of Animals. These grouping of concepts are similar to those reported by Kok and Domingos [11]. 6.3 Overall Performance Now we present quantitative evaluation of the treeRMN model, and compare it with other relational learning methods including MLN structure learning (MLS) [10], Infinite Relational Models (IRM) [9] and Multiple Relational Clustering (MRC) [11]. Following the methodology of [11], we situate our experiment in prediction tasks. We perform 10 fold cross validation by randomly splitting all the variables into 10 sets. At each run, we treat one fold as hidden during training, and then evaluate the prediction of these variables conditioned on the observed variables during testing. The overall performance is measured by training time, average Conditional Log-Likelihood (CLL), and Area Under the precision-recall Curve (AUC) [11]. All implementation is done with Java 6.0. Table 4 compares the overall performance of treeRMN (RMN), treeRMN with hidden variable discovery (RMNCV I), and other relational models (MSL, IRM and MRC) as reported in [11]. We use subscripts (0, 1, 2) to indicate the order of Markov dependency (depth of relation trees), and dimθ for the number of parameters. First, we can see that, without HVs, the treeRMNs with higher Markov orders generally perform better in terms of CLL and AUC. However, due to the complexity of high-order treeRMNs, this comes with large increases in training time. In some cases (e.g., Kinship data), a high order treeRMN can perform worse than a low order treeRMN probably due to the difficulty of inference with a large number of features. Second, training a treeRMN with CVI 7 Animal, λ=0.01, β=1 Nation, λ=0.01, β=1 CLL AUC dimθ Time CLL AUC dimθ Time RMN0 -0.34±0.03 0.88±0.02 3,655 5s RMN0 -0.40±0.01 0.63±0.04 7,812 15s RMN1 -0.33±0.02 0.72±0.04 21,840 70s RMN2 -0.38±0.03 0.71±0.04 40,489 446s RMNCV I⋆ 0 -0.33±0.02 0.89±0.02 4,349 9s RMNCV I 1 -0.31±0.02 0.83±0.04 22,191 104s MSL -0.54±0.04 0.68±0.04 †24h MSL -0.33±0.04 0.77±0.04 †24h MRC -0.43±0.04 0.80±0.04 †10h MRC -0.31±0.02 0.75±0.03 †10h IRM -0.43±0.06 0.79±0.08 †10h IRM -0.32±0.02 0.75±0.03 †10h UML, λ=0.01, β=10 Kinship, λ=0.01, β=10 CLL AUC dimθ Time CLL AUC dimθ Time RMN0 -0.056±0.005 0.70±0.02 1,081 0.3h RMN0 §-2.95±0.01 0.08±0.00 25 6s RMN1 -0.044±0.002 0.68±0.04 2,162 1.0h RMN1 §-1.36±0.05 0.66±0.03 350 107s RMN2 -0.028±0.003 0.71±0.02 6,440 14.5h RMN2 §-2.34±0.01 0.33±0.00 1,625 2.1h RMNCV I⋆ 1 -0.005±0.001 0.94±0.01 6,946 453s RMNCV I 1 §-1.04±0.03 0.81±0.01 900 402s MSL -0.025±0.002 0.47±0.06 †24h MSL -0.066±0.006 0.59±0.08 †24h MRC -0.004±0.000 0.97±0.00 †10h MRC -0.048±0.002 0.84±0.01 †10h IRM -0.011±0.001 0.79±0.01 †10h IRM -0.063±0.002 0.68±0.01 †10h Table 4: Overall performance. Bold identifies the best performance, and ± marks the standard deviations. Experiments are conducted with Intel Xeon 2.33GHz CPU (E5410). ⋆These results were started with a treeRMN that only has unary features. §The CLL of kinship data is not comparable to previous approaches, because we treat each of its labels as one variable with 26 categories instead of 26 binary variables. †The results of existing methods were run on different machines (Intel Xeon 2.8GHz CPU), and their 10-fold data splits are independent to those used for the RMN models. They were allowed to run up to 10-24 hours, and here we assumes that these methods cannot achieve similar accuracy when the amount of training time is significantly reduced. is only 2∼4 times slower than training a treeRMN of the same order of Markov dependency. On all three relational datasets, treeRMNs with CVI can significantly improve CLL and AUC. For the simple Animal dataset, the improvement is less significant because there is no long range dependency to be captured in this data. Although the CVI models have similar number features as the second order treeRMNs, their inferences are much faster due to their much smaller Markov blankets. Finally, on all datasets, the treeRMNs with CVI can achieve similar prediction quality as the existing methods (i.e., MSL, IRM and MRC), but is about two orders of magnitude more efficient in training. Specifically, it achieves significant improvements on the Animal and Nation data, but moderately worse results on the UML and Kinship data. Since both UML and Kinship data have no attributes in basic entity types, composite entities become more important to model. Therefore, we suspect that the MRC model achieves better performance because it can perform clustering on two-argument predicates which corresponds to composite entities. 7 Conclusions and Future Work We have presented a novel approach for efficient relational learning, which consists of a restricted class of Relational Markov Networks (RMN) called relation tree-based RMN (treeRMN) and an efficient hidden variable induction algorithm called Contrastive Variable Induction (CVI). By using simple treeRMNs, we achieve computational efficiency, and CVI can effectively detect hidden variables, which compensates for the limited expressive power of treeRMNs. Experiments on four real datasets show that the proposed relational learning approach can achieve state-of-the-art prediction accuracy and is much faster than existing relational Markov network models. We can improve the presented approach in several aspects. First, to further speedup the treeRMN model we can apply efficient Markov network feature selection methods [17][26] instead of systematically enumerating all possible feature templates. Second, as we have explained at the end of section 5, we’d like to apply HVD on composite entity types. Third, we’d also like to treat the introduced hidden variables as free variables and to make their cardinalities adaptive. Finally, we would like to explore high order features which involves more than two variable assignments. Acknowledgements. We gratefully acknowledge the support of NSF grant IIS-0811562 and NIH grant R01GM081293. 8 References [1] Galen Andrew and Jianfeng Gao. Scalable training of ℓ1-regularized log-linear models. In ICML, 2007. [2] Razvan C. Bunescu and Raymond J. Mooney. Collective information extraction with relational Markov networks. In ACL, 2004. [3] Miguel A. Carreira-Perpinan and Geoffrey E. Hinton. On contrastive divergence learning. In AISTATS, 2005. [4] Gal Elidan and Nir Friedman. The information bottleneck em algorithm. In UAI, 2003. [5] Gal Elidan, Noam Lotner, Nir Friedman, and Daphne Koller. Discovering hidden variables: A structure-based approach. In NIPS, 2000. [6] Nir Friedman, Lise Getoor, Daphne Koller, and Avi Pfeffer. Learning probabilistic relational models. In IJCAI, 1999. [7] Yi Huang, Volker Tresp, and Stefan Hagen Weber. Predictive modeling using features derived from paths in relational graphs. In Technical report, 2007. [8] Ariel Jaimovich, Ofer Meshi, and Nir Friedman. Template-based inference in symmetric relational Markov random fields. In UAI, 2007. [9] Charles Kemp, Joshua B. Tenenbaum, Thomas L. Griffiths, Takeshi Yamada, and Naonori Ueda. Learning systems of concepts with an infinite relational model. In AAAI, 2006. [10] Stanley Kok and Pedro Domingos. Learning the structure of Markov logic networks. In ICML, 2005. [11] Stanley Kok and Pedro Domingos. Statistical predicate invention. In ICML, 2007. [12] Stanley Kok and Pedro Domingos. Learning Markov logic networks using structural motifs. In ICML, 2010. [13] Su-In Lee, Varun Ganapathi, and Daphne Koller. Efficient structure learning of Markov networks using ℓ1-regularization. In NIPS, 2006. [14] Kurt T. Miller, Thomas L. Griffiths, and Michael I. Jordan. Nonparametric latent feature models for link prediction. In NIPS, 2009. [15] Kevin P. Murphy, Yair Weiss, and Michael I. Jordan. Loopy belief propagation for approximate inference: An empirical study. In UAI, 1999. [16] Iftach Nachman, Gal Elidan, and Nir Friedman. “Ideal parent” structure learning for continuous variable networks. In UAI, 2004. [17] Simon Perkins, Kevin Lacker, and James Theiler. Grafting: Fast, incremental feature selection by gradient descent in function spaces. In JMLR, 2003. [18] Hoifung Poon and Pedro Domingos. Joint inference in information extraction. In AAAI, 2007. [19] Karen Sachs, Omar Perez, Dana Peer, Douglas A. Lauffenburger, and Garry P. Nolan. Causal protein-signaling networks derived from multiparameter single-cell data. In Science, 2005. [20] Ilya Sutskever, Ruslan Salakhutdinov, and Josh Tenenbaum. Modelling relational data using Bayesian clustered tensor factorization. In NIPS, 2009. [21] Benjamin Taskar, Pieter Abbeel, and Daphne Koller. Discriminative probabilistic models for relational data. In UAI, 2002. [22] Benjamin Taskar, Eran Segal, and Daphne Koller. Probabilistic classification and clustering in relational data. In IJCAI, 2001. [23] Max Welling and Geoffrey E. Hinton. A new learning algorithm for mean field Boltzmann machines. In ICANN, 2001. [24] Zhao Xu, Volker Tresp, Kai Yu, and Hans-Peter Kriegel. Infinite hidden relational models. In UAI, 2006. [25] Alan Yuille. The convergence of contrastive divergence. In NIPS, 2004. [26] Jun Zhu, Ni Lao, and Eric P. Xing. Grafting-light: Fast, incremental feature selection and structure learning of Markov random fields. In KDD, 2010. [27] Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. In Journal Of The Royal Statistical Society Series B, 2005. 9
2010
225
3,994
Learning from Logged Implicit Exploration Data Alexander L. Strehl ∗ Facebook Inc. 1601 S California Ave Palo Alto, CA 94304 astrehl@facebook.com John Langford Yahoo! Research 111 West 40th Street, 9th Floor New York, NY, USA 10018 jl@yahoo-inc.com Lihong Li Yahoo! Research 4401 Great America Parkway Santa Clara, CA, USA 95054 lihong@yahoo-inc.com Sham M. Kakade Department of Statistics University of Pennsylvania Philadelphia, PA, 19104 skakade@wharton.upenn.edu Abstract We provide a sound and consistent foundation for the use of nonrandom exploration data in “contextual bandit” or “partially labeled” settings where only the value of a chosen action is learned. The primary challenge in a variety of settings is that the exploration policy, in which “offline” data is logged, is not explicitly known. Prior solutions here require either control of the actions during the learning process, recorded random exploration, or actions chosen obliviously in a repeated manner. The techniques reported here lift these restrictions, allowing the learning of a policy for choosing actions given features from historical data where no randomization occurred or was logged. We empirically verify our solution on two reasonably sized sets of real-world data obtained from Yahoo!. 1 Introduction Consider the advertisement display problem, where a search engine company chooses an ad to display which is intended to interest the user. Revenue is typically provided to the search engine from the advertiser only when the user clicks on the displayed ad. This problem is of intrinsic economic interest, resulting in a substantial fraction of income for several well-known companies such as Google, Yahoo!, and Facebook. Before discussing the proposed approach, we formalize the problem and then explain why more conventional approaches can fail. The warm-start problem for contextual exploration: Let X be an arbitrary input space, and A = {1, . . . , k} be a set of actions. An instance of the contextual bandit problem is specified by a distribution D over tuples (x,⃗r) where x ∈X is an input and ⃗r ∈[0, 1]k is a vector of rewards [6]. Events occur on a round-by-round basis where on each round t: 1. The world draws (x,⃗r) ∼D and announces x. 2. The algorithm chooses an action a ∈A, possibly as a function of x and historical information. 3. The world announces the reward ra of action a, but not ra′ for a′ ̸= a. ∗Part of this work was done while A. Strehl was at Yahoo! Research. 1 It is critical to understand that this is not a standard supervised-learning problem, because the reward of other actions a′ ̸= a is not revealed. The standard goal in this setting is to maximize the sum of rewards ra over the rounds of interaction. In order to do this well, it is essential to use previously recorded events to form a good policy on the first round of interaction. Thus, this is a “warm start” problem. Formally, given a dataset of the form S = (x, a, ra)∗generated by the interaction of an uncontrolled logging policy, we want to construct a policy h maximizing (either exactly or approximately) V h := E(x,⃗r)∼D[rh(x)]. Approaches that fail: There are several approaches that may appear to solve this problem, but turn out to be inadequate: 1. Supervised learning. We could learn a regressor s : X × A →[0, 1] which is trained to predict the reward, on observed events conditioned on the action a and other information x. From this regressor, a policy is derived according to h(x) = argmaxa∈A s(x, a). A flaw of this approach is that the argmax may extend over a set of choices not included in the training data, and hence may not generalize at all (or only poorly). This can be verified by considering some extreme cases. Suppose that there are two actions a and b with action a occurring 106 times and action b occuring 102 times. Since action b occurs only a 10−4 fraction of the time, a learning algorithm forced to trade off between predicting the expected value of ra and rb overwhelmingly prefers to estimate ra well at the expense of accurate estimation for rb. And yet, in application, action b may be chosen by the argmax. This problem is only worse when action b occurs zero times, as might commonly occur in exploration situations. 2. Bandit approaches. In the standard setting these approaches suffer from the curse of dimensionality, because they must be applied conditioned on X. In particular, applying them requires data linear in X × A, which is extraordinarily wasteful. In essence, this is a failure to take advantage of generalization. 3. Contextual Bandits. Existing approaches to contextual bandits such as EXP4 [1] or Epoch Greedy [6], require either interaction to gather data or require knowledge of the probability the logging policy chose the action a. In our case the probability is unknown, and it may in fact always be 1. 4. Exploration Scavenging. It is possible to recover exploration information from action visitation frequency when a logging policy chooses actions independent of the input x (but possibly dependent on history) [5]. This doesn’t fit our setting, where the logging policy is surely dependent on the input. 5. Propensity Scores, naively. When conducting a survey, a question about income might be included, and then the proportion of responders at various income levels can be compared to census data to estimate a probability conditioned on income that someone chooses to partake in the survey. Given this estimated probability, results can be importance-weighted to estimate average survey outcomes on the entire population [2]. This approach is problematic here, because the policy making decisions when logging the data may be deterministic rather than probabilistic. In other words, accurately predicting the probability of the logging policy choosing an ad implies always predicting 0 or 1 which is not useful for our purposes. Although the straightforward use of propensity scores does not work, the approach we take can be thought of as as a more clever use of a propensity score, as discussed below. Lambert and Pregibon [4] provide a good explanation of propensity scoring in an Internet advertising setting. Our Approach: The approach proposed in the paper naturally breaks down into three steps. 1. For each event (x, a, ra), estimate the probability ˆπ(a|x) that the logging policy chooses action a using regression. Here, the “probability” is over time—we imagine taking a uniform random draw from the collection of (possibly deterministic) policies used at different points in time. 2. For each event (x, a, ra), create a synthetic controlled contextual bandit event according to (x, a, ra, 1/ max{ˆπ(a|x), τ}) where τ > 0 is some parameter. The quantity, 1/ max{ˆπ(a|x), τ}, is an importance weight that specifies how important the current event is for training. As will be clear, the parameter τ is critical for numeric stability. 2 3. Apply an offline contextual bandit algorithm to the set of synthetic contextual bandit events. In our second set of experimental results (Section 4.2) a variant of the argmax regressor is used with two critical modifications: (a) We limit the scope of the argmax to those actions with positive probability; (b) We importance weight events so that the training process emphasizes good estimation for each action equally. It should be emphasized that the theoretical analysis in this paper applies to any algorithm for learning on contextual bandit events—we chose this one because it is a simple modification on existing (but fundamentally broken) approaches. The above approach is most similar to the Propensity Score approach mentioned above. Relative to it, we use a different definition of probability which is not necessarily 0 or 1 when the logging policy is completely deterministic. Three critical questions arise when considering this approach. 1. What does ˆπ(a|x) mean, given that the logging policy may be deterministically choosing an action (ad) a given features x? The essential observation is that a policy which deterministically chooses action a on day 1 and then deterministically chooses action b on day 2 can be treated as randomizing between actions a and b with probability 0.5 when the number of events is the same each day, and the events are IID. Thus ˆπ(a|x) is an estimate of the expected frequency with which action a would be displayed given features x over the timespan of the logged events. In section 3 we show that this approach is sound in the sense that in expectation it provides an unbiased estimate of the value of new policy. 2. How do the inevitable errors in ˆπ(a|x) influence the process? It turns out they have an effect which is dependent on τ. For very small values of τ, the estimates of ˆπ(a|x) must be extremely accurate to yield good performance while for larger values of τ less accuracy is required. In Section 3.1, we prove this robustness property. 3. What influence does the parameter τ have on the final result? While creating a bias in the estimation process, it turns out that the form of this bias is mild and relatively reasonable— actions which are displayed with low frequency conditioned on x effectively have an underestimated value. This is exactly as expected for the limit where actions have no frequency. In section 3.1 we prove this. We close with a generalization from policy evaluation to policy selection with a sample complexity bound in section 3.2 and then experimental results in section 4 using real data. 2 Formal Problem Setup and Assumptions Let π1, ..., πT be T policies, where, for each t, πt is a function mapping an input from X to a (possibly deterministic) distribution over A. The learning algorithm is given a dataset of T samples, each of the form (x, a, ra) ∈X ×A×[0, 1], where (x, r) is drawn from D as described in Section 1, and the action a ∼πt(x) is chosen according to the tth policy. We denote this random process by (x, a, ra) ∼(D, πt(·|x)). Similarly, interaction with the T policies results in a sequence S of T samples, which we denote S ∼(D, πi(·|x))T i=1. The learner is not given prior knowledge of the πt. Offline policy estimator: Given a dataset of the form S = {(xt, at, rt,at)}T t=1, (1) where ∀t, xt ∈X, at ∈A, rt,at ∈[0, 1], we form a predictor ˆπ : X × A →[0, 1] and then use it with a threshold τ ∈[0, 1] to form an offline estimator for the value of a policy h. Formally, given a new policy h : X →A and a dataset S, define the estimator: ˆV h ˆπ (S) = 1 |S| X (x,a,r)∈S raI(h(x) = a) max{ˆπ(a|x), τ}, (2) where I(·) denotes the indicator function. The shorthand ˆV h ˆπ will be used if there is no ambiguity. The purpose of τ is to upper-bound the individual terms in the sum and is similar to previous methods like robust importance sampling [10]. The purpose of τ is to upper-bound the individual terms in the sum and is similar to previous methods like robust importance sampling [10]. 3 3 Theoretical Results We now present our algorithm and main theoretical results. The main idea is twofold: first, we have a policy estimation step, where we estimate the (unknown) logging policy (Subsection 3.1); second, we have a policy optimization step, where we utilize our estimated logging policy (Subsection 3.2). Our main result, Theorem 3.2, provides a generalization bound—addressing the issue of how both the estimation and optimization error contribute to the total error. The logging policy πt may be deterministic, implying that conventional approaches relying on randomization in the logging policy are not applicable. We show next that this is ok when the world is IID and the policy varies over its actions. We effectively substitute the standard approach of randomization in the algorithm for randomization in the world. A basic claim is that the estimator is equivalent, in expectation, to a stochastic policy defined by: π(a|x) = Et∼UNIF(1,...,T )[πt(a|x)], (3) where UNIF(· · · ) denotes the uniform distribution. The stochastic policy π chooses an action uniformly at random over the T policies πt. Our first result is that the expected value of our estimator is the same when the world chooses actions according to either π or to the sequence of policies πt. Although this result and its proof are straightforward, it forms the basis for the rest of the results in our paper. Note that the policies πt may be arbitrary but we have assumed that they do not depend on the data used for evaluation. This assumption is only necessary for the proofs and can often be relaxed in practice, as we show in Section 4.1. Theorem 3.1. For any contextual bandit problem D with identical draws over T rounds, for any sequence of possibly stochastic policies πt(a|x) with π derived as above, and for any predictor ˆπ, ES∼(D,πi(·|x))T i=1 ˆV h ˆπ (S) = E(x,⃗r)∼D,a∼π(·|x) raI(h(x) = a) max{ˆπ(a|x), τ} (4) This theorem relates the expected value of our estimator when T policies are used to the much simpler and more standard setting where a single fixed stochastic policy is used. 3.1 Policy Estimation In this section we show that for a suitable choice of τ and ˆπ our estimator is sufficiently accurate for evaluating new policies h. We aggressively use the simplification of the previous section, which shows that we can think of the data as generated by a fixed stochastic policy π, i.e. πt = π for all t. For a given estimate ˆπ of π define the “regret” to be a function reg:X →[0, 1] by reg(x) = max a∈A  (π(a|x) −ˆπ(a|x))2 . (5) We do not use ℓ1 or ℓ∞loss above because they are harder to minimize than ℓ2 loss. Our next result is that the new estimator is consistent. In the following theorem statement, I(·) denotes the indicator function, π(a|x) the probability that the logging policy chooses action a on input x, and ˆV h ˆπ our estimator as defined by Equation 2 based on parameter τ. Lemma 3.1. Let ˆπ be any function from X to distributions over actions A. Let h : X →A be any deterministic policy. Let V h(x) = Er∼D(·|x)[rh(x)] denote the expected value of executing policy h on input x. We have that Ex " I(π(h(x)|x) ≥τ) · V h(x) − p reg(x) τ !# ≤E[ ˆV h ˆπ ] ≤V h + Ex " I(π(h(x)|x) ≥τ) · p reg(x) τ # . In the above, the expectation E[ ˆV h ˆπ ] is taken over all sequences of T tuples (x, a, r) where (x, r) ∼ D and a ∼π(·|x).1 This lemma bounds the bias in our estimate of V h(x). There are two sources of bias—one from the error of ˆπ(a|x) in estimating π(a|x), and the other from threshold τ. For the first source, it’s crucial that we analyze the result in terms of the squared loss rather than (say) ℓ∞loss, as reasonable sample complexity bounds on the regret of squared loss estimates are achievable.2 1Note that varying T does not change the expectation of our estimator, so T has no effect in the theorem. 2Extending our results to log loss would be interesting future work, but is made difficult by the fact that log loss is unbounded. 4 Lemma 3.1 shows that the expected value of our estimate ˆV h π of a policy h is an approximation to a lower bound of the true value of the policy h where the approximation is due to errors in the estimate ˆπ and the lower bound is due to the threshold τ. When ˆπ = π, then the statement of Lemma 3.1 simplifies to Ex  I(π(h(x)|x) ≥τ) · V h(x)  ≤E[ ˆV h ˆπ ] ≤V h. Thus, with a perfect predictor of π, the expected value of the estimator ˆV h ˆπ is a guaranteed lower bound on the true value of policy h. However, as the left-hand-side of this statement suggests, it may be a very loose bound, especially if the action chosen by h often has a small probability of being chosen by π. The dependence on 1/τ in Lemma 3.1 is somewhat unsettling, but unavoidable. Consider an instance of the bandit problem with a single input x and two actions a1, a2. Suppose that π(a1|x) = τ + ǫ for some positive ǫ and h(x) = a1 is the policy we are evaluating. Suppose further that the rewards are always 1 and that ˆπ(a1|x) = τ. Then, the estimator satisfies E[ ˆV h ˆπ ] = π(a1|x)/ˆπ(a1|x) = (τ + ǫ)/τ. Thus, the expected error in the estimate is E[ ˆV h ˆπ ] −V h = |(τ + ǫ)/τ −1| = ǫ/τ, while the regret of ˆπ is (π(a1|x) −ˆπ(a1|x))2 = ǫ2. 3.2 Policy Optimization The previous section proves that we can effectively evaluate a policy h by observing a stochastic policy π, as long as the actions chosen by h have adequate support under π, specifically π(h(x)|x) ≥ τ for all inputs x. However, we are often interested in choosing the best policy h from a set of policies H after observing logged data. Furthermore, as described in Section 2, the logged data are generated from T fixed, possibly deterministic, policies π1, . . . , πT as described in section 2 rather than a single stochastic policy. As in Section 3 we define the stochastic policy π by Equation 3, π(a|x) = Et∼UNIF(1,...,T )[πt(a|x)] The results of Section 3.1 apply to the policy optimization problem. However, note that the data are now assumed to be drawn from the execution of a sequence of T policies π1, . . . , πT , rather than by T draws from π. Next, we show that it is possible to compete well with the best hypothesis in H that has adequate support under π (even though the data are not generated from π). Theorem 3.2. Let ˆπ be any function from X to distributions over actions A. Let H be any set of deterministic policies. Define ˜H = {h ∈H | π(h(x)|x) > τ, ∀x ∈X} and ˜h = argmaxh∈˜ H{V h}. Let ˆh = argmaxh∈H{ ˆV h ˆπ } be the hypothesis that maximizes the empirical value estimator defined in Equation 2. Then, with probability at least 1 −δ, V ˆh ≥V ˜h −2 τ p Ex[reg(x)] + r ln(2|H|/δ) 2T ! , (6) where reg(x) is defined, with respect to π, in Equation 5. The proof of Theorem 3.2 relies on the lower-bound property of our estimator (the left-hand side of Inequality stated in Lemma 3.1). In other words, if H contains a very good policy that has little support under π, we will not be able to detect that by our estimator. On the other hand, our estimation is safe in the sense that we will never drastically overestimate the value of any policy in H. This “underestimate, but don’t overestimate” property is critical to the application of optimization techniques, as it implies we can use an unrestrained learning algorithm to derive a warm start policy. 4 Empirical Evaluation We evaluated our method on two real-world datasets obtained from Yahoo!. The first dataset consists of uniformly random exploration data, from which an unbiased estimate of any policy can be obtained. This dataset is thus used to verify accuracy of our offline evaluator (2). The second dataset then demonstrates how policy optimization can be done from nonrandom offline data. 5 4.1 Experiment I The first experiment involves news article recommendation in the “Today Module”, on the Yahoo! front page. For every user visit, this module displays a high-quality news article out of a small candidate pool, which is hand-picked by human editors. The pool contains about 20 articles at any given time. We seek to maximize the click probability (aka click-through rate, or CTR) of the highlighted article. This problem is modeled as a contextual bandit problem, where the context consists of both user and article information, the arms correspond to articles, and the reward of a displayed article is 1 if there is a click and 0 otherwise. Therefore, the value of a policy is exactly its overall CTR. To protect business-sensitive information, we only report normalized CTR (nCTR) which is defined as the ratio of the true CTR and the CTR of a random policy. Our dataset, denoted D0, was collected from real traffic on the Yahoo! front page during a twoweek period in June 2009. It contains T = 64.7M events in the form of triples (x, a, r), where the context x contains user/article features, arm a was chosen uniformly at random from a dynamic candidate pool A, and r is a binary reward signal indicating whether the user clicked on a. Since actions are chosen randomly, we have ˆπ(a|x) = π(a|x) ≡1/|A| and reg(x) ≡0. Consequently, Lemma 3.1 implies E[ ˆV h ˆπ ] = V h provided τ < 1/|A|. Furthermore, a straightforward application of Hoeffding’s inequality guarantees that ˆV h ˆπ concentrates to V h at the rate of O(1/ √ T) for any policy h, which is also verified empirically [9]. Given the size of our dataset, therefore, we used this dataset to calculate ˆV0 = ˆV h ˆπ using ˆπ(a|x) = 1/|A| in (2). The result ˆV0 was then treated as “ground truth”, with which we can evaluate how accurate the offline evaluator (2) is when non-random log data are used instead. To obtain non-random log data, we ran the LinUCB algorithm using the offline bandit simulation procedure, both from [8], on our random log data D0 and recorded events (x, a, r) for which LinUCB chose arm a for context x. Note that π is a deterministic learning algorithm, and may choose different arms for the same context at different timesteps. We call this subset of recorded events Dπ. It is known that the set of recorded events has the same distribution as if we ran LinUCB on real user visits to Yahoo! front page. We used Dπ as non-random log data and do evaluation. To define the policy h for evaluation, we used D0 to estimate each article’s overall CTR across all users, and then h was defined as selecting the article with highest estimated CTR. We then evaluated h on Dπ using the offline evaluator (2). Since the set A of articles changes over time (with news articles being added and old articles retiring), π(a|x) is very small due to the large number of articles over the two-week period, resulting in large variance. To resolve this problem, we split the dataset Dπ into subsets so that in each subset the candidate pool remains constant,3 and then estimate π(a|x) for each subset separately using ridge regression on features x. We note that more advanced conditional probability estimation techniques can be used. Figure 1 plots ˆV h ˆπ with varying τ against the ground truth ˆV0. As expected, as τ becomes larger, our estimate can become more (downward) biased. For a large range of τ values, our estimates are reasonably accurate, suggesting the usefulness of our proposed method. In contrast, a naive approach, which assumes π(a|x) = 1/|A|, gives a very poor estimate of 2.4. For extremely small values of τ, however, there appears to be a consistent trend of over-estimating the policy value. This is due to the fact that negative moments of a positive random variable are often larger than the corresponding moments of its expectation [7]. Note that the logging policy we used, π, violates one of the assumptions used to prove Lemma 3.1, namely that the exploration policy at timestep t not be dependent on an earlier event. Our offline evaluator is accurate in this setting, which suggests that the assumption may be relaxable in practice. 4.2 Experiment II In the second experiment, we investigate our approach to the warm-start problem. The dataset was provided by Yahoo!, covering a period of one month in 2008. The data are comprised of logs of events (x, a, y), where each event represents a visit by a user to a particular web page x, from a set of web pages X. From a large set of advertisements A, the commercial system chooses a single ad 3We could do so because we know A for every event in D0. 6 1E−4 1E−3 1E−2 1E−1 1.3 1.4 1.5 1.6 1.7 τ nCTR offline estimate ground truth Figure 1: Accuracy of offline evaluator with varying τ values. Method τ Estimate Interval Learned 0.01 0.0193 [0.0187,0.0206] Random 0.01 0.0154 [0.0149,0.0166] Learned 0.05 0.0132 [0.0129,0.0137] Random 0.05 0.0111 [0.0109,0.0116] Naive 0.05 0.0 [0,0.0071] Figure 2: Results of various algorithms on the ad display dataset. Note these numbers were computed using a not-necessarily-uniform sample of data. a for the topmost, or most prominent position. It also chooses additional ads to display, but these were ignored in our test. The output y is an indicator of whether the user clicked on the ad or not. The total number of ads in the data set is approximately 880, 000. The training data consist of 35 million events. The test data contain 19 million events occurring after the events in the training data. The total number of distinct web pages is approximately 3.4 million. We trained a policy h to choose an ad, based on the current page, to maximize the probability of click. For the purposes of learning, each ad and page was represented internally as a sparse highdimensional feature vector. The features correspond to the words that appear in the page or ad, weighted by the frequency with which they appear. Each ad contains, on average, 30 ad features and each page, approximately 50 page features. The particular form of f was linear over features of its input (x, a)4 The particular policy that was optimized, had an argmax form: h(x) = argmaxa∈C(X){f(x, a)}, with a crucial distinction from previous approaches in how f(x, a) was trained. Here f : X × A → [0, 1] is a regression function that is trained to estimate probability of click, and C(X) = {a ∈ A | ˆπ(a|x) > 0} is a set of feasible ads. The training samples were of the form (x, a, y), where y = 1 if the ad a was clicked after being shown on page x or y = 0 otherwise. The regressor f was chosen to approximately minimize the weighted squared loss: (y−f(x,a))2 max{ˆπ(at|xt),τ}. Stochastic gradient descent was used to minimize the squared loss on the training data. During the evaluation, we computed the estimator on the test data (xt, at, yt): ˆV h ˆπ = 1 T T X t=1 ytI(h(xt) = at) max{ˆπ(at|xt), τ}. (7) As mentioned in the introduction, this estimator is biased due to the use of the parameter τ > 0. As shown in the analysis of Section 3, this bias typically underestimates the true value of the policy h. We experimented with different thresholds τ and parameters of our learning algorithm.5 Results are summarized in the Table 2. The Interval column is computed using the relative entropy form of the Chernoff bound with δ = 0.05 which holds under the assumption that variables, in our case the samples used in the computation of the estimator (Equation 7), are IID. Note that this computation is slightly complicated because the range of the variables is [0, 1/τ] rather than [0, 1] as is typical. This is handled by rescaling by τ, applying the bound, and then rescaling the results by 1/τ. 4Technically the feature vector that the regressor uses is the Cartesian product of the page and ad vectors. 5For stochastic gradient descent, we varied the learning rate over 5 fixed numbers (0.2, 0.1, 0.05, 0.02, 0.01) using 1 pass over the data. We report on the test results for the value with the best training error. 7 The “Random” policy is the policy that chooses randomly from the set of feasible ads: Random(x) = a ∼UNIF(C(X)), where UNIF(·) denotes the uniform distribution. The “Naive” policy corresponds to the theoretically flawed supervised learning approach detailed in the introduction. The evaluation of this policy is quite expensive, requiring one evaluation per ad per example, so the size of the test set is reduced to 8373 examples with a click, which reduces the significance of the results. We bias the results towards the naive policy by choosing the chronologically first events in the test set (i.e. the events most similar to those in the training set). Nevertheless, the naive policy receives 0 reward, which is significantly less than all other approaches. A possible fear with the evaluation here is that the naive policy is always finding good ads that simply weren’t explored. A quick check shows that this is not correct–the naive argmax simply makes implausible choices. Note that we report only evaluation against τ = 0.05, as the evaluation against τ = 0.01 is not significant, although the reward obviously remains 0. The “Learned” policies do depend on τ. As suggested by Theorem 3.2, as τ is decreased, the effective set of hypotheses we compete with is increased, thus allowing for better performance of the learned policy. Indeed, the estimates for both the learned policy and the random policy improve when we decrease τ from 0.05 to 0.01. The empirical click-through rate on the test set was 0.0213, which is slightly larger than the estimate for the best learned policy. However, this number is not directly comparable since the estimator provides a lower bound on the true value of the policy due to the bias introduced by a nonzero τ and because any deployed policy chooses from only the set of ads which are available to display rather than the set of all ads which might have been displayable at other points in time. The empirical results are generally consistent with the theoretical approach outlined here—they provide a consistently pessimal estimate of policy value which nevertheless has sufficient dynamic range to distinguish learned policies from random policies, learned policies over larger spaces (smaller τ) from smaller spaces (larger τ), and the theoretically unsound naive approach from sounder approaches which choose amongst the the explored space of ads. It would be interesting future work to compare our approach to a full-fledged production online advertising system. 5 Conclusion We stated, justified, and evaluated theoretically and empirically the first method for solving the warm start problem for exploration from logged data with controlled bias and estimation. This problem is of obvious interest to applications for internet companies that recommend content (such as ads, search results, news stories, etc...) to users. However, we believe this also may be of interest for other application domains within machine learning. For example, in reinforcement learning, the standard approach to offline policy evaluation is based on importance weighted samples [3, 11]. The basic results stated here could be applied to RL settings, eliminating the need to know the probability of a chosen action explicitly, allowing an RL agent to learn from external observations of other agents. References [1] Peter Auer, Nicol`o C. Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [2] D. Horvitz and D. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 1952. [3] Michael Kearns, Yishay Mansour, and Andrew Y. Ng. Approximate planning in large pomdps via reusable trajectories. In NIPS, 2000. [4] Diane Lambert and Daryl Pregibon. More bang for their bucks: Assessing new features for online advertisers. In ADKDD 2007, 2007. [5] John Langford, Alexander L. Strehl, and Jenn Wortman. Exploration scavenging. In ICML-08: Proceedings of the 25rd international conference on Machine learning, 2008. [6] John Langford and Tong Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in Neural Information Processing Systems 20, pages 817–824, 2008. 8 [7] Robert A. Lew. Bounds on negative moments. SIAM Journal on Applied Mathematics, 30(4):728–731, 1976. [8] Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the Nineteenth International Conference on World Wide Web (WWW-10), pages 661–670, 2010. [9] Lihong Li, Wei Chu, John Langford, and Xuanhui Wang. Unbiased offline evaluation of contextualbandit-based news article recommendation algorithms. In Proceedings of the Fourth International Conference on Web Search and Web Data Mining (WSDM-11), 2011. [10] Art Owen and Yi Zhou. Safe and effective importance sampling. Journal of the American Statistical Association, 95:135–143, 1998. [11] Doina Precup, Rich Sutton, and Satinder Singh. Eligibility traces for off-policy policy evaluation. In ICML, 2000. 9
2010
226
3,995
Parametric Bandits: The Generalized Linear Case Sarah Filippi LTCI Telecom ParisTech et CNRS Paris, France filippi@telecom-paristech.fr Olivier Capp´e LTCI Telecom ParisTech et CNRS Paris, France cappe@telecom-paristech.fr Aur´elien Garivier LTCI Telecom ParisTech et CNRS Paris, France garivier@telecom-paristech.fr Csaba Szepesv´ari RLAI Laboratory University of Alberta Edmonton, Canada szepesva@ualberta.ca Abstract We consider structured multi-armed bandit problems based on the Generalized Linear Model (GLM) framework of statistics. For these bandits, we propose a new algorithm, called GLM-UCB. We derive finite time, high probability bounds on the regret of the algorithm, extending previous analyses developed for the linear bandits to the non-linear case. The analysis highlights a key difficulty in generalizing linear bandit algorithms to the non-linear case, which is solved in GLM-UCB by focusing on the reward space rather than on the parameter space. Moreover, as the actual effectiveness of current parameterized bandit algorithms is often poor in practice, we provide a tuning method based on asymptotic arguments, which leads to significantly better practical performance. We present two numerical experiments on real-world data that illustrate the potential of the GLM-UCB approach. Keywords: multi-armed bandit, parametric bandits, generalized linear models, UCB, regret minimization. 1 Introduction In the classical K-armed bandit problem, an agent selects at each time step one of the K arms and receives a reward that depends on the chosen action. The aim of the agent is to choose the sequence of arms to be played so as to maximize the cumulated reward. There is a fundamental trade-off between gathering experimental data about the reward distribution (exploration) and exploiting the arm which seems to be the most promising. In the basic multi-armed bandit problem, also called the independent bandits problem, the rewards are assumed to be random and distributed independently according to a probability distribution that is specific to each arm –see [1, 2, 3, 4] and references therein. Recently, structured bandit problems in which the distributions of the rewards pertaining to each arm are connected by a common unknown parameter have received much attention [5, 6, 7, 8, 9]. This model is motivated by the many practical applications where the number of arms is large, but the payoffs are interrelated. Up to know, two different models were studied in the literature along these lines. In one model, in each times step, a side-information, or context, is given to the agent first. The payoffs of the arms depend both on this side information and the index of the arm. Thus the optimal arm changes with the context [5, 6, 9]. In the second, simpler model, that we are also interested in here, there is no side-information, but the agent is given a model that describes the possible relations 1 between the arms’ payoffs. In particular, in “linear bandits” [10, 8, 11, 12], each arm a ∈A is associated with some d-dimensional vector ma ∈Rd known to the agent. The expected payoffs of the arms are given by the inner product of their associated vector and some fixed, but initially unknown parameter vector θ∗. Thus, the expected payoff of arm a is m′ aθ∗, which is linear in θ∗.1 In this article, we study a richer generalized linear model (GLM) in which the expectation of the reward conditionally to the action a is given by µ(m′ aθ∗), where µ is a real-valued, non-linear function called the (inverse) link function. This generalization allows to consider a wider class of problems, and in particular cases where the rewards are counts or binary variables using, respectively, Poisson or logistic regression. Obviously, this situation is very common in the fields of marketing, social networking, web-mining (see example of Section 5.2 below) or clinical studies. Our first contribution is an “optimistic” algorithm, termed GLM-UCB, inspired by the Upper Confidence Bound (UCB) approach [2]. GLM-UCB generalizes the algorithms studied by [10, 8, 12]. Our next contribution are finite-time bounds on the statistical performance of this algorithm. In particular, we show that the performance depends on the dimension of the parameter but not on the number of arms, a result that was previously known in the linear case. Interestingly, the GLM-UCB approach takes advantage of the particular structure of the parameter estimate of generalized linear models and operates only in the reward space. In contrast, the parameter-space confidence region approach adopted by [8, 12] appears to be harder to generalize to non-linear regression models. Our second contribution is a tuning method based on asymptotic arguments. This contribution addresses the poor empirical performance of the current algorithms that we have observed for small or moderate sample-sizes when these algorithms are tuned based on finite-sample bounds. The paper is organized as follows. The generalized linear bandit model is presented in Section 2, together with a brief survey of needed statistical results. Section 3 is devoted to the description of the GLM-UCB algorithm, which is compared to related approaches. Section 4 presents our regret bounds, as well as a discussion, based on asymptotic arguments, on the optimal tuning of the method. Section 5 reports the results of two experiments on real data sets. 2 Generalized Linear Bandits, Generalized Linear Models We consider a structured bandit model with a finite, but possibly very large, number of arms. At each time t, the agent chooses an arm At from the set A (we shall denote the cardinality of A by K). The prior knowledge available to the agent consists of a collection of vectors {ma}a∈A of features which are specific to each arm and a so-called (inverse) link function µ : R →R. The generalized linear bandit model investigated in this work is based on the assumption that the payoff Rt received at time t is conditionally independent of the past payoffs and choices and it satisfies E [Rt| At] = µ(m′ Atθ∗) , (1) for some unknown parameter vector θ∗∈Rd. This framework generalizes the linear bandit model considered by [10, 8, 12]. Just like the linear bandit model builds on linear regression, our model capitalizes on the well-known statistical framework of Generalized Linear Models (GLMs). The advantage of this framework is that it allows to address various, specific reward structures widely found in applications. For example, when rewards are binary-valued, a suitable choice of µ is µ(x) = exp(x)/(1 + exp(x)), leading to the logistic regression model. For integer valued rewards, the choice µ(x) = exp(x) leads to the Poisson regression model. This can be easily extended to the case of multinomial (or polytomic) logistic regression, which is appropriate to model situations in which the rewards are associated with categorical variables. To keep this article self-contained, we briefly review the main properties of GLMs [13]. A univariate probability distribution is said to belong to a canonical exponential family if its density with respect to a reference measure is given by pβ(r) = exp (rβ −b(β) + c(r)) , (2) where β is a real parameter, c(·) is a real function and the function b(·) is assumed to be twice continuously differentiable. This family contains the Gaussian and Gamma distributions when the reference measure is the Lebesgue measure and the Poisson and Bernoulli distributions when the 1Throughout the paper we use the prime to denote transposition. 2 reference measure is the counting measure on the integers. For a random variable R with density defined in (2), E(R) = ˙b(β) and Var(R) = ¨b(β), where ˙b and ¨b denote, respectively, the first and second derivatives of b. In addition, ¨b(β) can also be shown to be equal to the Fisher information matrix for the parameter β. The function b is thus strictly convex. Now, assume that, in addition to the response variable R, we have at hand a vector of covariates X ∈Rd. The canonical GLM associated to (2) postulates that pθ(r|x) = px′θ(r), where θ ∈Rd is a vector of parameter. Denote by µ = ˙b the so-called inverse link function. From the properties of b, we know that µ is continuously differentiable, strictly increasing, and thus one-to-one. The maximum likelihood estimator ˆθt, based on observations (R1, X1), . . . (Rt−1, Xt−1), is defined as the maximizer of the function t−1 X k=1 log pθ(Rk|Xk) = t−1 X k=1 RkX′ kθ −b(X′ kθ) + c(Rk) , a strictly concave function in θ.2 Upon differentiating, we obtain that ˆθt is the unique solution of the following estimating equation t−1 X k=1 (Rk −µ(X′ kθ)) Xk = 0 , (3) where we have used the fact that µ = ˙b. In practice, the solution of (3) may be found efficiently using, for instance, Newton’s algorithm. A semi-parametric version of the above model is obtained by assuming only that Eθ[R|X] = µ(X′θ) without (much) further assumptions on the conditional distribution of R given X. In this case, the estimator obtained by solving (3) is referred to as the maximum quasi-likelihood estimator. It is a remarkable fact that this estimator is consistent under very general assumptions as long as the design matrix Pt−1 k=1 XkX′ k tends to infinity [14]. As we will see, this matrix also plays a crucial role in the algorithm that we propose for bandit optimization in the generalized linear bandit model. 3 The GLM-UCB Algorithm According to (1), the agent receives, upon playing arm a, a random reward whose expected value is µ(m′ aθ∗), where θ∗∈Θ is the unknown parameter. The parameter set Θ is an arbitrary closed subset of Rd. Any arm with largest expected reward is called optimal. The aim of the agent is to quickly find an optimal arm in order to maximize the received rewards. The greedy action argmaxa∈A µ(m′ aˆθt) may lead to an unreliable algorithm which does not sufficiently explore to guarantee the selection of an optimal arm. This issue can be addressed by resorting to an “optimistic approach”. As described by [8, 12] in the linear case, an optimistic algorithm consists in selecting, at time t, the arm At = argmax a max θ Eθ [Rt | At = a] s.t. ∥θ −ˆθt∥Mt ≤ρ(t) , (4) where ρ is an appropriate, “slowly increasing” function, Mt = t−1 X k=1 mAkm′ Ak (5) is the design matrix corresponding to the first t −1 timesteps and ∥v∥M = √ v′Mv denotes the matrix norm induced by the positive semidefinite matrix M. The region ∥θ −ˆθt∥Mt ≤ρ(t) is a confidence ellipsoid around the estimated parameter ˆθt. Generalizing this approach beyond the case of linear link functions looks challenging. In particular, in GLMs, the relevant confidence regions may have a more complicated geometry in the parameter space than simple ellipsoids. As a consequence, the benefits of this form of optimistic algorithms appears dubious.3 2Here, and in what follows log denotes the natural logarithm. 3Note that maximizing µ(m′ aθ) over a convex confidence region is equivalent to maximizing m′ aθ over the same region since µ is strictly increasing. Thus, computationally, this approach is not more difficult than it is for the linear case. 3 An alternative approach consists in directly determining an upper confidence bound for the expected reward of each arm, thus choosing the action a that maximizes Eˆθt [Rt | At = a] + ρ(t)∥ma∥M−1 t . In the linear case the two approaches lead to the same solution [12]. Interestingly, for non-linear bandits, the second approach looks more appropriate. In the rest of this section, we apply this second approach to the GLM bandit model defined in (1). According to (3), the maximum quasi-likelihood estimator of the parameter in the GLM is the unique solution of the estimating equation t−1 X k=1  Rk −µ(m′ Ak ˆθt)  mAk = 0 , (6) where A1, . . . , At−1 denote the arms played so far and R1, . . . , Rt−1 are the corresponding rewards. Let gt(θ) = Pt−1 k=1 µ(m′ Akθ)mAk be the invertible function such that the estimated parameter ˆθt satisfies gt(ˆθt) = Pt−1 k=1 RkmAk. Since ˆθt might be outside of the set of admissible parameters Θ, we “project it” to Θ, to obtain ˜θt: ˜θt = argmin θ∈Θ gt(θ) −gt(ˆθt) M−1 t = argmin θ∈Θ gt(θ) − t−1 X k=1 RkmAk M−1 t . (7) Note that if ˆθt ∈Θ (which is easy to check and which happened to hold always in the examples we dealt with) then we can let ˜θt = ˆθt. This is important since computing ˜θt is non-trivial and we can save this computation by this simple check. The proposed algorithm, GLM-UCB, is as follows: Algorithm 1 GLM-UCB 1: Input: {ma}a∈A 2: Play actions a1, . . . , ad, receive R1, . . . , Rd. 3: for t > d do 4: Estimate ˆθt according to (6) 5: if ˆθt ∈Θ let ˜θt = ˆθt else compute ˜θt according to (7) 6: Play the action At = argmaxa n µ(m′ a˜θt) + ρ(t)∥ma∥M−1 t o , receive Rt 7: end for At time t, for each arm a, an upper bound µ(m′ a˜θt) + βa t is computed, where the “exploration bonus” βa t = ρ(t)∥ma∥M−1 t is the product of two terms. The quantity ρ(t) is a slowly increasing function; we prove in Section 4 that ρ(t) can be set to guarantee high-probability bounds on the expected regret (for the actual form used, see (8)). Note that the leading term of βa t is ∥ma∥M−1 t which decreases to zero as t increases. As we are mostly interested in the case when the number of arms K is much larger than the dimension d, the algorithm is simply initialized by playing actions a1, . . . , ad such that the vectors ma1 . . . , mad form a basis of M = span(ma, a ∈A). Without loss of generality, here and in what follows we assume that the dimension of M is equal to d. Then, by playing a1, . . . , ad in the first d steps the agent ensures that Mt is invertible for all t. An alternative strategy would be to initialize M0 = λ0I, where I is the d × d identify matrix. 3.1 Discussion The purpose of this section is to discuss some properties of Algorithm 1, and in particular the interpretation of the role played by ∥ma∥M−1 t . Generalizing UCB The standard UCB algorithm for K arms [2] can be seen as a special case of GLM-UCB where the vectors of covariates associated with the arms form an orthogonal system and µ(x) = x. Indeed, take d = K, A = {1, . . . , K}, define the vectors {ma}a∈A as the canonical basis {ea}a∈A of Rd, and take θ ∈Rd the vector whose component θa is the expected reward for arm a. 4 Then, Mt is a diagonal matrix whose a-th diagonal element is the number Nt(a) of times the a-th arm has been played up to time t. Therefore, the exploration bonus in GLM-UCB is given by βa t = ρ(t)/ p Nt(a). Moreover, the maximum quasi-likelihood estimator ˆθt satisfies ¯Ra t = ˆθt(a) for all a ∈A, where ¯Ra t = 1 Nt(a) Pt−1 k=1 I{At=a}Rk is the empirical mean of the rewards received while playing arm a. Algorithm 1 then reduces to the familiar UCB algorithm. In this case, it is known that the expected cumulated regret can be controlled upon setting the slowly varying function ρ to ρ(t) = p 2 log(t), assuming that the range of the rewards is bounded by one [2]. Generalizing linear bandits Obviously, setting µ(x) = x, we obtain a linear bandit model. In this case, assuming that Θ = Rd, the algorithm will reduce to those described in the papers [8, 12]. In particular, the maximum quasi-likelihood estimator becomes the least-squares estimator and as noted earlier, the algorithm behaves identically to one which chooses the parameter optimistically within the confidence ellipsoid {θ : ∥θ −ˆθt∥Mt ≤ρ(t)}. Dependence in the Number of Arms In contrast to an algorithm such as UCB, Algorithm 1 does not need that all arms be played even once.4 To understand this phenomenon, observe that, as Mt+1 = Mt + mAtm′ At, ∥ma∥2 M−1 t+1 = ∥ma∥2 M−1 t − m′ aM −1 t mAt 2 (1 + ∥mAt∥2 M−1 t ) for any arm a. Thus the exploration bonus βa t+1 decreases for all arms, except those which are exactly orthogonal to mAt (in the M −1 t metric). The decrease is most significant for arms that are colinear to mAt. This explains why the regret bounds obtained in Theorems 1 and 2 below depend on d but not on K. 4 Theoretical analysis In this section we first give our finite sample regret bounds and then show how the algorithm can be tuned based on asymptotic arguments. 4.1 Regret Bounds To quantify the performance of the GLM-UCB algorithm, we consider the cumulated (pseudo) regret defined as the expected difference between the optimal reward obtained by always playing an optimal arm and the reward received following the algorithm: RegretT = T X t=1 µ(m′ a∗θ∗) −µ(m′ Atθ∗) . For the sake of the analysis, in this section we shall assume that the following assumptions hold: Assumption 1. The link function µ : R →R is continuously differentiable, Lipschitz with constant kµ and such that cµ = infθ∈Θ,a∈A ˙µ(m′ aθ) > 0. For the logistic function kµ = 1/4, while the value of cµ depends on supθ∈Θ,a∈A |m′ aθ|. Assumption 2. The norm of covariates in {ma : a ∈A} is bounded: there exists cm < ∞such that for all a ∈A, ∥ma∥2 ≤cm. Finally, we make the following assumption on the rewards: Assumption 3. There exists Rmax > 0 such that for any t ≥1, 0 ≤Rt ≤Rmax holds a.s. Let ǫt = Rt −µ(m′ Atθ∗). For all t ≥1, it holds that E [ǫt|mAt, ǫt−1, . . . , mA2, ǫ1, mA1] = 0 a.s. As for the standard UCB algorithm, the regret can be analyzed in terms of the difference between the expected reward received playing an optimal arm and that of the best sub-optimal arm: ∆(θ∗) = min a:µ(m′aθ∗)<µ(m′ a∗θ∗) µ(m′ a∗θ∗) −µ(m′ aθ∗) . Theorem 1 establishes a high probability bound on the regret underlying using GLM-UCB with ρ(t) = 2kµκRmax cµ p 2d log(t) log(2 d T/δ) , (8) 4Of course, the linear bandit algorithms also share this property with our algorithm. 5 where T is the fixed time horizon, κ = p 3 + 2 log(1 + 2c2m/λ0) and λ0 denotes the smallest eigenvalue of Pd i=1 maim′ ai, which by our previous assumption is positive. Theorem 1 (Problem Dependent Upper Bound). Let s = max(1, c2 m/λ0). Then, under Assumptions 1–3, for all T ≥1, the regret satisfies: P  RegretT ≤(d + 1)Rmax + C d2 ∆(θ∗) log2 [s T ]log 2d T δ  ≥1−δ with C = 32κ2R2 maxk2 µ c2µ . Note that the above regret bound depends on the true value of θ∗through ∆(θ∗). The following theorem provides an upper-bound of the regret independently of the θ∗. Theorem 2 (Problem Independent Upper Bound). Let s = max(1, c2 m/λ0). Then, under Assumptions 1–3, for all T ≥1, the regret satisfies P RegretT ≤(d + 1)Rmax + Cd log [s T ] s T log 2dT δ ! ≥1 −δ with C = 8Rmaxkµκ cµ . The proofs of Theorems 1–2 can be found in the supplementary material. The main idea is to use the explicit form of the estimator given by (6) to show that µ(m′ Atθ∗) −µ(m′ At ˆθt) ≤kµ cµ ∥mAt∥M−1 t t−1 X k=1 mAk ǫk M−1 t . Bounding the last term on the right-hand side is then carried out following the lines of [12]. 4.2 Asymptotic Upper Confidence Bound Preliminary experiments carried out using the value of ρ(t) defined equation (8), including the case where µ is the identity function –i.e., using the algorithm described by [8, 12], revealed poor performance for moderate sample sizes. A look into the proof of the regret bound easily explains this observation as the mathematical involvement of the arguments is such that some approximations seem unavoidable, in particular several applications of the Cauchy-Schwarz inequality, leading to pessimistic confidence bounds. We provide here some asymptotic arguments that suggest to choose significantly smaller exploration bonuses, which will in turn be validated by the numerical experiments presented in Section 5. Consider the canonical GLM associated with an inverse link function µ and assume that the vectors of covariates X are drawn independently under a fixed distribution. This random design model would for instance describe the situation when the arms are drawn randomly from a fixed distribution. Standard statistical arguments show that the Fisher information matrix pertaining to this model is given by J = E[ ˙µ(X′θ∗)XX′] and that the maximum likelihood estimate ˆθt is such that t−1/2(ˆθt −θ∗) D −→N (0, J−1), where D −→stands for convergence in distribution. Moreover, t−1Mt a.s. −→Σ where Σ = E[XX′]. Hence, using the delta-method and Slutsky’s lemma ∥ma∥−1 M−1 t (µ(m′ aˆθt) −µ(m′ aθ∗)) D −→N(0, ˙µ(m′ aθ∗)∥m′ a∥−2 Σ−1∥m′ a∥2 J−1) . The right-hand variance is smaller than kµ/cµ as J ⪰cµΣ. Hence, for any sampling distribution such that J and Σ are positive definite and sufficiently large t and small δ, P  ∥ma∥−1 M−1 t (µ(m′ aˆθt) −µ(m′ aθ∗)) > q 2kµ/cµ log(1/δ)  is asymptotically bounded by δ. Based on the above asymptotic argument, we postulate that using ρ(t) = p 2kµ/cµ log(t), i.e., inflating the exploration bonus by a factor of p kµ/cµ compared to the usual UCB setting, is sufficient. This is the setting used in the simulations below. 5 Experiments To the best of our knowledge, there is currently no public benchmark available to test bandit methods on real world data. On simulated data, the proposed method unsurprisingly outperforms its competitors when the data is indeed simulated from a well-specified generalized linear model. In order to evaluate the potential of the method in more challenging scenarios, we thus carried out two experiments using real world datasets. 6 5.1 Forest Cover Type Data In this first experiment, we test the performance of the proposed method on a toy problem using the “Forest Cover Type dataset” from the UCI repository. The dataset (centered and normalized with constant covariate added, resulting in 11-dimensional vectors, ignoring all categorical variables) has been partitioned into K = 32 clusters using unsupervised k-means. The values of the response variable for the data points assigned to each cluster are viewed as the outcomes of an arm while the centroid of the cluster is taken as the 11-dimensional vector of covariates characteristic of the arm. To cast the problem into the logistic regression framework, each response variable is binarized by associating the first class (“Spruce/Fir”) to a response R = 1 and all other six classes to R = 0. The proportions of responses equal to 1 in each cluster (or, in other word, the expected reward associated with each arm) ranges from 0.354 to 0.992, while the proportion on the complete set of 581,012 data points is equal to 0.367. In effect, we try to locate as fast as possible the cluster that contains the maximal proportion of trees from a given species. We are faced with a 32-arm problem in a 11-dimensional space with binary rewards. Obviously, the logistic regression model is not satisfied, although we do expect some regularity with respect to the position of the cluster’s centroid as the logistic regression trained on all data reaches a 0.293 misclassification rate. 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 500 1000 1500 2000 t Regrett 2 4 6 8 10 12 14 16 18 0 2000 4000 6000 arm a GLM−UCB UCB UCB GLM−UCB ε−greedy Figure 1: Top: Regret of the UCB, GLM-UCB and the ǫ-greedy algorithms. Bottom: Frequencies of the 20 best arms draws using the UCB and GLM-UCB. We compare the performance of three algorithms. First, the GLM-UCB algorithm, with parameters tuned as indicated in Section 4.2. Second, the standard UCB algorithm that ignores the covariates. Third, an ǫ-greedy algorithm that performs logistic regression and plays the best estimated action, At = argmaxa µ(m′ aˆθt), with probability 1 −ǫ (with ǫ = 0.1). We observe in the top graph of Figure 1 that the GLM-UCB algorithm achieves the smallest average regret by a large margin. When the parameter is well estimated, the greedy algorithm may find the best arm in little time and then leads to small regrets. However, the exploration/exploitation tradeoff is not correctly handled by the ǫ-greedy approach causing a large variability in the regret. The lower plot of Figure 1 shows the number of times each of the 20 best arms have been played by the UCB and GLM-UCB algorithms. The arms are sorted in decreasing order of expected reward. It can be observed that GML-UCB only plays a small subset of all possible arms, concentrating on the bests. This behavior is made possible by the predictive power of the covariates: by sharing information between arms, it is possible to obtain sufficiently accurate predictions of the expected rewards of all actions, even for those that have never (or rarely) been played. 7 5.2 Internet Advertisement Data In this experiment, we used a large record of the activity of internet users provided by a major ISP. The original dataset logs the visits to a set of 1222 pages over a six days period corresponding to about 5.108 page visits. The dataset also contains a record of the users clicks on the ads that were presented on these pages. We worked with a subset of 208 ads and 3.105 users. The pages (ads) were partitioned in 10 (respectively, 8) categories using Latent Dirichlet Allocation [15] applied to their respective textual content (in the case of ads, the textual content was that of the page pointed to by the ad’s link). This second experiment is much more challenging, as the predictive power of the sole textual information turns out to be quite limited (for instance, Poisson regression trained on the entire data does not even correctly identify the best arm). The action space is composed of the 80 pairs of pages and ads categories: when a pair is chosen, it is presented to a group of 50 users, randomly selected from the database, and the reward is the number of recorded clicks. As the average reward is typically equal to 0.15, we use a logarithmic link function corresponding to Poisson regression. The vector of covariates for each pair is of dimension 19: it is composed of an intercept followed by the concatenation of two vectors of dimension 10 and 8 representing, respectively, the categories of the pages and the ads. In this problem, the covariate vectors do not span the entire space; to address this issue, it is sufficient to consider the pseudo-inverse of Mt instead of the inverse. On this data, we compared the GLM-UCB algorithm with the two alternatives described in Section 5.1. Figure 2 shows that GLM-UCB once again outperforms its competitors, even though the margin over UCB is now less remarkable. Given the rather limited predictive power of the covariates in this example, this is an encouraging illustration of the potential of techniques which use vectors of covariates in real-life applications. 0 1000 2000 3000 4000 5000 0 1000 2000 3000 t Regret UCB GLM−UCB ε−greedy Figure 2: Comparison of the regret of the UCB, GLM-UCB and the ǫ-greedy (ǫ = 0.1) algorithm on the advertisement dataset. 6 Conclusions We have introduced an approach that generalizes the linear regression model studied by [10, 8, 12]. As in the original UCB algorithm, the proposed GLM-UCB method operates directly in the reward space. We discussed how to tune the parameters of the algorithm to avoid exaggerated optimism, which would slow down learning. In the numerical simulations, the proposed algorithm was shown to be competitive and sufficiently robust to tackle real-world problems. An interesting open problem (already challenging in the linear case) consists in tightening the theoretical results obtained so far in order to bridge the gap between the existing (pessimistic) confidence bounds and those suggested by the asymptotic arguments presented in Section 4.2, which have been shown to perform satisfactorily in practice. Acknowledgments This work was supported in part by AICML, AITF, NSERC, PASCAL2 under no216886, the DARPA GALE project under noHR0011-08-C-0110 and Orange Labs under contract no289365. 8 References [1] T.L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [2] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2):235–256, 2002. [3] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge Univ Pr, 2006. [4] J. Audibert, R. Munos, and Cs. Szepesv´ari. Tuning bandit algorithms in stochastic environments. Lecture Notes in Computer Science, 4754:150, 2007. [5] C.C. Wang, S.R. Kulkarni, and H.V. Poor. Bandit problems with side observations. IEEE Transactions on Automatic Control, 50(3):338–355, 2005. [6] J. Langford and T. Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. Advances in Neural Information Processing Systems, pages 817–824, 2008. [7] S. Pandey, D. Chakrabarti, and D. Agarwal. Multi-armed bandit problems with dependent arms. International Conference on Machine learning, pages 721–728, 2007. [8] V. Dani, T.P. Hayes, and S.M. Kakade. Stochastic linear optimization under bandit feedback. Conference on Learning Theory, 2008. [9] S.M. Kakade, S. Shalev-Shwartz, and A. Tewari. Efficient bandit algorithms for online multiclass prediction. In Proceedings of the 25th International Conference on Machine learning, pages 440–447. ACM, 2008. [10] P. Auer. Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 3:397–422, 2002. [11] Y. Abbasi-Yadkori, A. Antos, and Cs. Szepesv´ari. Forced-exploration based algorithms for playing in stochastic linear bandits. In COLT Workshop on On-line Learning with Limited Feedback, 2009. [12] P. Rusmevichientong and J.N. Tsitsiklis. Linearly parameterized bandits. Mathematics of Operations Research, 35(2):395–411, 2010. [13] P. McCullagh and J. A. Nelder. Generalized Linear Models. Chapman and Hall, 1989. [14] K. Chen, I. Hu, and Z. Ying. Strong consistency of maximum quasi-likelihood estimators in generalized linear models with fixed and adaptive designs. Annals of Statistics, 27(4):1155–1163, 1999. [15] David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent Dirichlet allocation. Advances in Neural Information Processing Systems, 14:601–608, 2002. [16] V.H. De La Pena, M.J. Klass, and T.L. Lai. Self-normalized processes: exponential inequalities, moment bounds and iterated logarithm laws. Annals of Probability, 32(3):1902–1933, 2004. [17] P. Rusmevichientong and J.N. Tsitsiklis. Linearly parameterized bandits. Arxiv preprint arXiv:0812.3465v2, 2008. 9
2010
227
3,996
Basis Construction from Power Series Expansions of Value Functions Sridhar Mahadevan Department of Computer Science University of Massachusetts Amherst, MA 01003 mahadeva@cs.umass.edu Bo Liu Department of Computer Science University of Massachusetts Amherst, MA 01003 boliu@cs.umass.edu Abstract This paper explores links between basis construction methods in Markov decision processes and power series expansions of value functions. This perspective provides a useful framework to analyze properties of existing bases, as well as provides insight into constructing more effective bases. Krylov and Bellman error bases are based on the Neumann series expansion. These bases incur very large initial Bellman errors, and can converge rather slowly as the discount factor approaches unity. The Laurent series expansion, which relates discounted and average-reward formulations, provides both an explanation for this slow convergence as well as suggests a way to construct more efficient basis representations. The first two terms in the Laurent series represent the scaled average-reward and the average-adjusted sum of rewards, and subsequent terms expand the discounted value function using powers of a generalized inverse called the Drazin (or group inverse) of a singular matrix derived from the transition matrix. Experiments show that Drazin bases converge considerably more quickly than several other bases, particularly for large values of the discount factor. An incremental variant of Drazin bases called Bellman average-reward bases (BARBs) is described, which provides some of the same benefits at lower computational cost. 1 Introduction Markov decision processes (MDPs) are a well-studied model of sequential decision-making under uncertainty [11]. Recently, there has been growing interest in automatic basis construction methods for constructing a problem-specific low-dimensional representation of an MDP. Functions on the original state space, such as the reward function or the value function, are “compressed” by projecting them onto a basis matrix Φ, whose column space spans a low-dimensional subspace of the function space on the states of the original MDP. Among the various approaches proposed are reward-sensitive bases, such as Krylov bases [10] and an incremental variant called Bellman error basis functions (BEBFs) [9]. These approaches construct bases by dilating the (sampled) reward function by geometric powers of the (sampled) transition matrix of a policy. An alternative approach, called proto-value functions, constructs reward-invariant bases by finding the eigenvectors of the symmetric graph Laplacian matrix induced by the neighborhood topology of the state space under the given actions [7]. A fundamental dilemma that is revealed by these prior studies is that neither reward-sensitive nor reward-invariant eigenvector bases by themselves appear to be fully satisfactory. A Chebyshev polynomial bound for the error due to approximation using Krylov bases was derived in [10], extending a known similar result for general Krylov approximation [12]. This bound shows that performance of Krylov bases (and BEBFs) tends to degrade as the discount factor γ →1. Intuitively, the initial basis vectors capture short-term transient behavior near rewarding regions, and tend to poorly ap1 proximate the value function over the entire state space until a sufficiently large time scale is reached. A straightforward geometrical analysis of approximation errors using least-squares fixed point approximation onto a basis shows that the Bellman error decomposes into the sum of two terms: a reward error and a second term involving the feature prediction error [1, 8] (see Figure 1). This analysis helps reveal sources of error: Krylov bases and BEBFs tend to have low reward error (or zero in the non-sampled case), and hence a large component of the error in using these bases tends to be due to the feature prediction error. In contrast, PVFs tend to have large reward error since typical spiky goal reward functions are poorly approximated by smooth low-order eigenvectors; however, their feature prediction error can be quite low as the eigenvectors often capture invariant subspaces of the model transition matrix. A hybrid approach that combined low-order eigenvectors of the transition matrix (or PVFs) with higher-order Krylov bases was proposed in [10], which empirically resulted in a better approach. This paper demonstrates a more principled approach to address this problem, by constructing new bases that emerge from investigating the links between basis construction methods and different power series expansions of value functions. In particular, instead of using the eigenvectors of the transition matrix, the proposed approach uses the average-reward or gain as the first basis vector, and dilates the reward function by powers of the average-adjusted transition matrix. It turns out that the gain is an element of the space of eigenvectors associated with the eigenvalue λ = 1 of the transition matrix. The relevance of power series expansion to approximations of value functions was hinted at in early work by Schwartz [13] on undiscounted optimization, although he did not discuss basis construction. Krylov and Bellman error basis functions (BEBFs) [10, 9, 12], as well as proto-value functions [7], can be related to terms in the Neumann series expansion. Ultimately, the performance of these bases is limited by the speed of convergence of the Neumann expansion, and of course, other errors arising due to reward and feature prediction error. The key insight underlying this paper is to exploit connections between average-reward and discounted formulations. It is well-known that discounted value functions can be written in the form of a Laurent series expansion, where the first two terms correspond to the average-reward term (scaled by 1 1−γ ), and the average-adjusted sum of rewards (or bias). Higher order terms involve powers of the Drazin (or group) inverse of a singular matrix related to the transition matrix. This expansion provides a mathematical framework for analyzing the properties of basis construction methods and developing newer representations. In particular, Krylov bases converge slowly for high discount factors since the value function is dominated by the scaled average-reward term, which is poorly approximated by the initial BEBF or Krylov basis vectors as it involves the long-term limiting matrix P ∗. The Laurent series expansion leads to a new type of basis called a Drazin basis [6]. An approximation of Drazin bases called Bellman average-reward bases (BARBs) is described and compared with BEBFs, Krylov bases, and PVFs. 2 MDPs and Their Approximation A Markov decision process M is formally defined by the tuple (S, A, P, R), where S is a discrete state space, A is the set of actions (which could be conditioned on the state s, so that As is the set of legal actions in s), P(s′|s, a) is the transition matrix specifying the effect of executing action a in state s, and R(s, a) : S × A →R is the (expected) reward for doing action a in state s. The value function V associated with a deterministic policy π : S →A is defined as the long-term expected sum of rewards received starting from a state, and following the policy π indefinitely. 1 The value function V associated with a fixed policy π can be determined by solving the Bellman equation V = T(V ) = R + γPV, where T(.) is the Bellman backup operator, R(s) = R(s, π(s)), P(s, s′) = P(s′|s, π(s)), and the discount factor 0 ≤γ < 1. For a fixed policy π, the induced discounted Markov reward process is defined as (P, R, γ). A popular approach to approximating V is to use a linear combination of basis functions V ≈ˆV = Φw, where the basis matrix Φ is of size |S|×k, and k ≪|S|. The Bellman error for a given basis Φ, denoted BE(Φ), is defined as the difference between the two sides of the Bellman equation, when 1In what follows, we suppress the dependence of P, R, and V on the policy π to avoid clutter. 2 R γP ΦwΦ Φ ΠΦR (I −ΠΦ)R ΠΦγΦwΦ (I −ΠΦ)γP ΦwΦ Figure 1: The Bellman error due to a basis and its decomposition. See text for explanation. V is approximated by Φw. As Figure 1 illustrates, simple geometrical considerations can be used to show that the Bellman error can be decomposed into two terms: a reward error term and a weighted feature error term [1, 8]: 2 BE(Φ) = R + γPΦwΦ −ΦwΦ = (I −ΠΦ)R + (I −ΠΦ)γPΦwΦ, where ΠΦ is the weighted orthogonal projector onto the column space spanned by the basis Φ. wΦ is the weight vector associated with the fixed point Φwφ = ΠΦ(T(ΦwΦ)). If the Markov chain defined by P is irreducible and aperiodic, then ΠΦ = Φ(ΦT D∗Φ)−1ΦT D∗, where D∗is a diagonal matrix whose entries contain the stationary distribution of the Markov chain. In the experiments shown below, for simplicity we will use the unweighted projection ΠΦ = Φ(ΦT Φ)−1ΦT , in which case the fixed point is given by wφ = (ΦT Φ −γΦT PΦ)−1ΦT R. 3 Neumann Expansions and Krylov/BEBF Bases The most familiar expansion of the value function V is in terms of the Neumann series, where V = (I −γP)−1R = (I + γP + γ2P 2 + . . .)R. Krylov bases correspond to successive terms in the Neumann series [10, 12]. The jth Krylov subspace Kj is defined as the space spanned by the vectors: Kj = {R, PR, P 2R, . . . , P j−1R}. Note that K1 ⊆K2 ⊆. . ., such that for some m, Km = Km+1 = K (where m is the minimal polynomial of A = I −γP). Thus, K is the P-invariant Krylov space generated by P and R. An incremental variant of the Krylov-based approach is called Bellman error basis functions (BEBFs) [9]. In particular, given a set of basis functions Φk (where the first one is assumed to equal R), the next basis is defined to be φk+1 = T(ΦkwΦk) −ΦkwΦk. In the model-free reinforcement learning setting, φk+1 can be approximated by the temporal-difference (TD) error φk+1 = r+γ ˆQk(s′, πk(s′))−ˆQk(s, a), given a set of stored transitions in the form (s, a, r, s′). Here, ˆQk is the fixed-point least-squares approximation to the action-value function Q(s, a) on the basis Φk. It can be easily shown that BEBFs and Krylov bases define the same space [8]. 3.1 Convergence Analysis A key issue in evaluating the effectiveness of Krylov bases (and BEBFs) is the speed of convergence of the Neumann series. As γ →1, Krylov bases and BEBFs converge rather slowly, owing to a large increase in the weighted feature error. In practice, this problem can be shown to be acute even for values of γ = 0.9 or γ = 0.99, which are quite common in experiments. Petrik [10] derived a bound for the error due to Krylov approximation, which depends on the condition number of I −γP, and the ratio of two Chebyshev polynomials on the complex plane. The condition number of I −γP can significantly increase as γ →1 (see Figure 2). It has been shown that BEBFs reduce the Bellman error at a rate bounded by value iteration [9]. Iterative solution methods for solving linear systems Ax = b can broadly be categorized as different ways of decomposing A = S −T, giving rise to the iteration Sxk+1 = Txk + b. The convergence of this iteration depends on the spectral structure of B = S−1T, in particular its largest eigenvalue. For standard value iteration, A = I −γP, and consequently the natural decomposition is to set 2The two components of the Bellman error may partially (or fully) cancel each other out: the Bellman error of V itself is 0, but it generates non-zero reward and feature prediction errors. 3 0 5 10 15 20 25 0 20 40 60 80 100 120 140 160 180 200 Chain MDP with 50 states and rewards at state 10 and 41 γ varied from 0.75 → 0.99 Condition Number Figure 2: Condition number of I −γP as γ →1, where P is the transition matrix of the optimal policy in a chain MDP of 50 states with rewards in states 10 and 41 [9]. S = I and T = γP. Thus, the largest eigenvalue of S−1T is γ, and as γ →1, convergence of value iteration is progressively decelerated. For Krylov bases, the following bound can be shown. Theorem 1: The Bellman error in approximating the value function for a discounted Markov reward process (P, R, γ) using m BEBF or Krylov bases is is bounded by ∥BE(Φ)∥2 = ∥(I −ΠΦ)γPΦwΦ∥2 ≤κ(X)Cm( a d) Cm( c d), where the (Jordan form) diagonalization of I −γP = XSX−1, and κ(X) = ∥X∥2∥X−1∥2 is the condition number of I −γP. Cm is the Chebyshev polynomial of degree m of the first kind, where a, c and d are chosen such that E(a, c, d) is an ellipse on the set of complex numbers that covers all the eigenvalues of I −γP with center c, focal distance d, and major semi-axis a. Proof: This result follows directly from standard Krylov space approximation results [12], and past results on approximation using BEBFs and Krylov spaces for MDPs [10, 8]. First, note that the overall Bellman error can be reduced to the weighted feature error, since the reward error is 0 as R is in the span of both BEBFs and Krylov bases: ∥BE(Φ)∥2 = ∥T(ΦwΦ) −ΦwΦ∥2 = ∥R −(I −γP) ˆV ∥2 = ∥(I −ΠΦ)γPΦwΦ∥2. Next, setting A = (I −γP), we have ∥R −Aw∥2 = ∥R − m X i=1 wiAiR∥2 = ∥ m X i=0 −w(i)AiR∥2. assuming w(0) = −1. A standard result in Krylov space approximation [12] shows that min p∈Pm ∥p(A)∥2 ≤min p∈Pm κ(X) max i=1,...,n |p(λi)| ≤κ(X)Cm( a d) Cm( c d), where Pm is the set of polynomials of degree m. Figure 2 shows empirically that one reason for the slow convergence of BEBFs and Krylov bases is that as γ →1, the condition number of I −γP significantly increases. Figure 3 compares the weighted feature error of BEBF bases (the performance of Krylov bases is identical and not shown) on a 50 state chain domain with a single goal reward of 1 in state 25. The dynamics of the chain are identical to those in [9]. Notice as γ increases, the feature error increases dramatically. 4 Laurent Series Expansion and Drazin Bases A potential solution to the slow convergence of BEBFs and Krylov bases is suggested by a different power series called the Laurent expansion. It is well known from the classical theory of MDPs that the discounted value function can be written in a form that relates it to the average-reward formulation [11]. This connection uses the following Laurent series expansion of V in terms of the average reward ρ of the policy π, the average-adjusted sum of rewards h, and higher order terms that involve the generalized spectral inverse (Drazin or group inverse) of I −P. V = 1 γ γ 1 −γ ρ + h + ∞ X n=1 (γ −1 γ )n((I −P)D)n+1R ! . (1) 4 0 5 10 15 20 25 30 35 40 45 50 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Optimal VF 0 5 10 15 20 25 30 35 40 45 50 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Optimal VF 0 5 10 15 20 25 30 35 40 45 50 32 34 36 38 40 42 44 46 Optimal VF 0 5 10 15 20 25 30 35 40 45 50 0 0.2 0.4 0.6 0.8 1 # Basis Functions Bellman Error Figure 1a DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 35 40 45 50 0 0.2 0.4 0.6 0.8 1 # Basis Functions Reward Error Figure 1b DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 # Basis Functions Weighted Feature Error BEBF Feature Error in Chain Domain 0 5 10 15 20 25 30 35 40 45 50 0 1 2 3 4 # Basis Functions Bellman Error Figure 1a DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 35 40 45 50 0 0.2 0.4 0.6 0.8 1 # Basis Functions Reward Error Figure 1b DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 0 1 2 3 4 # Basis Functions Weighted Feature Error BEBF Feature Error in Chain Domain 0 5 10 15 20 25 30 35 40 45 50 0 10 20 30 40 50 # Basis Functions Bellman Error Figure 1a DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 35 40 45 50 0 0.2 0.4 0.6 0.8 1 # Basis Functions Reward Error Figure 1b DBF BEBF PVF PVF−MP 0 5 10 15 20 25 30 0 10 20 30 40 50 # Basis Functions Weighted Feature Error BEBF Fearure Error for Chain Domain Figure 3: Weighted feature error of BEBF bases on a 50 state chain MDP with a single reward of 1 in state 25. Top: optimal value function for γ = 0.5, 0.9, 0.99. Bottom: Weighted feature error. As γ increases, the weighted feature error grows much larger as the value function becomes progressively smoother and less like the reward function. Note the difference in scale between the three plots. As γ →1, the first term in the Laurent series expansion grows quite large causing the slow convergence of Krylov bases and BEBFs. (I −P)D is a generalized inverse of the singular matrix I −P called the Drazin inverse [2, 11]. For any square matrix A ∈Cn×n, the Drazin inverse X of A satisfies the following properties: (1) XAX = X (2) XA = AX (3) Ak+1X = Ak. Here, k is the index of matrix A, which is the smallest nonnegative integer k such that R(Ak) = R(Ak+1). R(A) is the range (or column space) of matrix A. For example, a nonsingular (square) matrix A has index 0, because R(A0) = R(I) = R(A). The matrix I −P of a Markov chain has index k = 1. For index 1 matrices, the Drazin inverse turns out to be the same as the group inverse, which is defined as (I −P)D = (I −P + P ∗)−1 −P ∗, where the long-term limiting matrix P ∗= limn→∞1 n Pn k=0 P k = I −(I −P)(I −P)D. The matrix (I −P + P ∗)−1 is often referred to as the fundamental matrix of a Markov chain. Note that for index 1 matrices, the Drazin (or group) inverse satisfies the additional property AXA = A. Also, P ∗and I −P ∗are orthogonal projection matrices, since they are both idempotent and furthermore PP ∗= P ∗P = P ∗, and P ∗(I −P ∗) = 0. 3 The gain and bias can be expressed in terms of P ∗. In particular, the gain g = P ∗R, and the bias or average-adjusted value function is given by: h = (I −P)DR =  (I −P + P ∗)−1 −P ∗ R = ∞ X t=0 (P t −P ∗)R. where the last equality holds for aperiodic Markov chains. If we represent the coefficients in the Laurent series as y−1, y0, . . . ,, they can be shown to be solutions to the following set of equations (for n = 1, 2, . . .). In terms of the expansion above, y−1 is the gain of the policy, y0 is its bias, and so on. (I −P)y−1 = 0, y−1 + (I −P)y0 = R, . . . , yn−1 + (I −P)yn = 0. Analogous to the Krylov bases, the successive terms of the Laurent series expansion can be viewed as basis vectors. More formally, the Drazin basis is defined as the space spanned by the vectors [6]: Dm = {P ∗R, (I −P)DR, ((I −P)D)2R, . . . , ((I −P)D)m−1R}. (2) The first basis vector is the average-reward or gain g = P ∗R of policy π. The second basis vector is the bias, or average-adjusted sum of rewards h. Subsequent basis vectors correspond to higher-order terms in the Laurent series. 3Several methods are available to compute Drazin inverses, as described in [2]. An iterative method called Successive Matrix Squaring (SMS) has also has been developed for efficient parallel implementation [15]. 5 5 Bellman Average-Reward Bases To get further insight into methods for approximating Drazin bases, it is helpful to note that the (i, j)th element in the Drazin or group inverse matrix is the difference between the expected number of visits to state j starting in state i following the transition matrix P versus the expected number of visits to j following the long-term limiting matrix P ∗. Building on this insight, an approximate Drazin basis called Bellman average-reward bases (BARBs) can be defined as follows. First, the approximate Drazin basis is defined as the space spanned by the vectors Am = {P ∗R, (P −P ∗)R, (P −P ∗)2R, . . . , (P −P ∗)m−1R} = {P ∗R, PR −P ∗R, P 2R −P ∗R, . . . , P m−1R −P ∗R}. BARBs are similar to Krylov bases, except that the reward function is being dilated by the averageadjusted transition matrix P −P ∗, and the first basis element is the gain. Defining ρ = P ∗R, BARBs can be defined as follows: φ1 = ρ = P ∗R. φk+1 = R −ρ + PΦkwΦk −ΦkwΦk. The cost of computing BARBs is essentially that of computing BEBFs (or Krylov bases), except for the term involving the gain ρ. Analogous to BEBFs, in the model-free reinforcement learning setting, BARBs can be computed using the average-adjusted TD error φk+1(s) = r −ρk(s) + ˆQk(s′, πk(s′)) −ˆQk(s, a). There are a number of incremental algorithms for computing ρ (such as the scheme used in Rlearning [13], or simply averaging the sample rewards). Several methods for computing P ∗are discussed in [14]. 5.1 Expressivity Properties Some results concerning the expressivity of approximate Drazin bases and BARBs are now discussed. Due to space, detailed proofs are not included. Theorem 2 For any k > 1, the following hold: span {Ak(R)} ⊆ span {BARBk+1(R)} . span {BARBk+1(R)} = span {{R} ∪Ak (R)} . span {BEBFk(R)} ⊆ span {BARBk+1(R)} . span {BARBk+1(R)} = span {{ρ} ∪BEBFk (R)} . Proof: Proof follows by induction. For k = 1, both approximate Drazin bases and BARBs contain the gain ρ. For k = 2, BARB2(R) = R −ρ, whereas A2 = PR −ρ (which is included in BARB3(R)). For general k > 2, the new basis vector in Ak is P k−1R, which can be shown to be part of BARBk+1(R). The other results can be derived through similar analysis. There is a similar decomposition of the average-adjusted Bellman error into a component that depends on the average-adjusted reward error and an undiscounted weighted feature error. Theorem 3 Given a basis Φ, for any average reward Markov reward process (P, R), the Bellman error can be decomposed as follows: T( ˆV ) −ˆV = R −ρ + PΦwΦ −ΦwΦ = (I −ΠΦ)(R −ρ) + (I −ΠΦ)PΦwΦ = (I −ΠΦ)R −(I −ΠΦ)ρ + (I −ΠΦ)PΦwΦ. Proof: The three terms represent the reward error, the average-reward error, and the undiscounted weighted feature error. The proof follows immediately from the geometry of the Bellman error, similar to that shown in Figure 1, and using the property of linearity of orthogonal projectors. A more detailed convergence analysis of BARBs is given in [4], based on the relationship between the approximation error and the mixing rate of the Markov chain defined by P. 6 0 10 20 30 40 50 0 0.5 1 1.5 # Basis Functions Reward Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 0.5 1 1.5 # Basis Functions Weighted Feature Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 0.5 1 1.5 # Basis Functions Bellman Error BARBs BEBF PVF−MP 0 10 20 30 40 50 0 0.5 1 1.5 # Basis Functions Reward Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 2 4 6 # Basis Functions Weighted Feature Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 2 4 6 # Basis Functions Bellman Error BARBs BEBF PVF−MP 0 10 20 30 40 50 0 0.5 1 1.5 # Basis Functions Reward Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 20 40 60 80 # Basis Functions Weighted Feature Error BARB BEBF PVF−MP 0 10 20 30 40 50 0 20 40 60 80 # Basis Functions Bellman Error BARBs BEBF PVF−MP Figure 4: Experimental comparison on a 50 state chain MDP with rewards in state 10 and 41. Left column: γ = 0.7. Middle column: γ = 0.9. Right column: γ = 0.99. 6 Experimental Comparisons Figure 4 compares the performance of Bellman average-reward basis functions (BARBs) vs. Bellman-error basis functions (BEBFs), and a variant of proto-value functions (PVF-MP) on a 50 state chain MDP. This problem was previously studied by [3]. The two actions (go left, or go right) succeed with probability 0.9. When the actions fail, they result in movement in the opposite direction with probability 0.1. The two ends of the chain are treated as “dead ends”. Rewards of +1 are given in states 10 and 41. The PVF-MP algorithm selects basis functions incrementally based upon the Bellman error, where basis function k+1 is the PVF that has the largest inner product with the Bellman error resulting from the previous k basis functions. PVFs have a high reward error, since the reward function is a set of two delta functions that is poorly approximated by the eigenvectors of the combinatorial Laplacian on the chain graph. However, PVFs have very low weighted feature error. The overall Bellman error remains large due to the high reward error. The reward error for BEBFs is by definition 0 as R is a basis vector itself. However, the weighted feature error for BEBFs grows quite large as γ increases from 0.7 to 0.99, particularly initially, until around 15 bases are used. Consequently, the Bellman error for BEBFs remains large initially. BARBs have the best overall performance at this task, particularly for γ = 0.9 and 0.99. The plots in Figure 5 compare BARBs vs. Drazin and Krylov bases in the two-room gridworld MDP [7]. Drazin bases perform the best, followed by BARBs, and then Krylov bases. At higher discount factors, the differences are more noticeable. Finally, Figure 6 compares BARBs vs. BEBFs on a 10 × 10 grid world MDP with a reward placed in the upper left corner state. The advantage of using BARBs over BEBFs is significant as γ →1. The policy is a random walk on the grid. Finally, similar results were also obtained in experiments conducted on random MDPs, where the states were decomposed into communicating classes of different block sizes (not shown). 7 Conclusions and Future Work The Neumann and Laurent series lead to different ways of constructing problem-specific bases. The Neumann series, which underlies Bellman error and Krylov bases, tends to converge slowly as γ →1. To address this shortcoming, the Laurent series was used to derive a new approach called the Drazin basis, which expands the discounted value function in terms of the average-reward, the bias, and higher order terms representing powers of the Drazin inverse of a singular matrix derived from 7 0 5 10 15 20 25 30 35 40 45 50 0 20 40 60 80 100 Reward Error BARB Drazin Krylov 0 5 10 15 20 25 30 35 40 45 50 0 20 40 60 80 100 120 Weighted Feature Error BARB Drazin Krylov 0 5 10 15 20 25 30 35 40 45 50 0 20 40 60 80 100 120 Bellman Error BARB Drazin Krylov 0 5 10 15 20 25 30 35 40 45 50 0 20 40 60 80 100 Reward Error BARB Drazin Krylov 0 5 10 15 20 25 30 35 40 45 50 0 50 100 150 200 Weighted Feature Error BARB Drazin Krylov 0 5 10 15 20 25 30 35 40 45 50 0 50 100 150 200 Bellman Error BARB Drazin Krylov Figure 5: Comparison of BARBs vs. Drazin and Krylov bases in a 100 state two-room MDP [7]. All bases were evaluated on the optimal policy. The reward was set at +100 for reaching a corner goal state in one of the rooms. Left: γ = 0.9. Right: γ = 0.99. 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 Reward Error BEBF BARB 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 Weighted Feature Error BEBF BARB 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 Bellman Error BEBF BARB 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 Reward Error BEBF BARB 0 5 10 15 20 25 30 0 0.5 1 1.5 Weighted Feature Error BEBF BARB 0 5 10 15 20 25 30 0 0.5 1 1.5 Bellman Error BEBF BARB 0 5 10 15 20 25 30 35 0 0.2 0.4 0.6 0.8 1 Reward Error BEBF BARB 0 5 10 15 20 25 30 35 0 2 4 6 8 10 Weighted Feature Error BEBF BARB 0 5 10 15 20 25 30 35 0 2 4 6 8 10 Bellman Error BEBF BARB Figure 6: Experimental comparison of BARBs and BEBFs on a 10 × 10 grid world MDP with a reward in the upper left corner. Left: γ = 0.7. Middle: γ = 0.99. Right: γ = 0.999. the transition matrix. An incremental version of Drazin bases called Bellman average-reward bases (BARBs) was investigated. Numerical experiments on simple MDPs show superior performance of Drazin bases and BARBs to BEBFs, Krylov bases, and PVFs. Scaling BARBs and Drazin bases to large MDPs requires addressing sampling issues, and exploiting structure in transition matrices, such as using factored representations. BARBs are computationally more tractable than Drazin bases, and merit further study. Reinforcement learning methods to estimate the first few terms of the Laurent series were proposed in [5], and can be adapted for basis construction. The Schultz expansion provides a way of rewriting the Neumann series using a multiplicative series of dyadic powers of the transition matrix, which is useful for multiscale bases [6]. Acknowledgements This research was supported in part by the National Science Foundation (NSF) under grants NSF IIS-0534999 and NSF IIS-0803288, and Air Force Office of Scientific Research (AFOSR) under grant FA9550-10-1-0383. 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 AFOSR or the NSF. 8 References [1] D. Bertsekas and D. Casta˜non. Adaptive aggregation methods for infinite horizon dynamic programming. IEEE Transactions on Automatic Control, 34:589–598, 1989. [2] S. Campbell and C. Meyer. Generalized Inverses of Linear Transformations. Pitman, 1979. [3] M. Lagoudakis and R. Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4:1107–1149, 2003. [4] B. Liu and S. Mahadevan. An investigation of basis construction from power series expansions of value functions. Technical report, University Massachusetts, Amherst, 2010. [5] S Mahadevan. Sensitive-discount optimality: Unifying discounted and average reward reinforcement learning. In Proceedings of the International Conference on Machine Learning, 1996. [6] S. Mahadevan. Learning representation and control in Markov Decision Processes: New frontiers. Foundations and Trends in Machine Learning, 1(4):403–565, 2009. [7] S. Mahadevan and M. Maggioni. Proto-value functions: A Laplacian framework for learning representation and control in Markov Decision Processes. Journal of Machine Learning Research, 8:2169–2231, 2007. [8] R. Parr, , Li. L., G. Taylor, C. Painter-Wakefield, and M. Littman. An analysis of linear models, linear value-function approximation, and feature selection for reinforcement learning. In Proceedings of the International Conference on Machine Learning (ICML), 2008. [9] R. Parr, C. Painter-Wakefield, L. Li, and M. Littman. Analyzing feature generation for value function approximation. In Proceedings of the International Conference on Machine Learning (ICML), pages 737–744, 2007. [10] M. Petrik. An analysis of Laplacian methods for value function approximation in MDPs. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pages 2574–2579, 2007. [11] M. L. Puterman. Markov Decision Processes. Wiley Interscience, New York, USA, 1994. [12] Y. Saad. Iterative Methods for Sparse Linear Systems. SIAM Press, 2003. [13] A. Schwartz. A reinforcement learning method for maximizing undiscounted rewards. In Proc. 10th International Conf. on Machine Learning. Morgan Kaufmann, San Francisco, CA, 1993. [14] William J. Stewart. Numerical methods for computing stationary distributions of finite irreducible markov chains. In Advances in Computational Probability. Kluwer Academic Publishers, 1997. [15] Y. Wei. Successive matrix squaring algorithm for computing the Drazin inverse. Applied Mathematics and Computation, 108:67–75, 2000. 9
2010
228
3,997
A Novel Kernel for Learning a Neuron Model from Spike Train Data Nicholas Fisher, Arunava Banerjee Department of Computer and Information Science and Engineering University of Florida Gainesville, FL 32611 {nfisher,arunava}@cise.ufl.edu Abstract From a functional viewpoint, a spiking neuron is a device that transforms input spike trains on its various synapses into an output spike train on its axon. We demonstrate in this paper that the function mapping underlying the device can be tractably learned based on input and output spike train data alone. We begin by posing the problem in a classification based framework. We then derive a novel kernel for an SRM0 model that is based on PSP and AHP like functions. With the kernel we demonstrate how the learning problem can be posed as a Quadratic Program. Experimental results demonstrate the strength of our approach. 1 Introduction Neurons are the predominant component of the nervous system and understanding them is a major challenge in modern neuroscience research [1]. Many neuron models have been proposed to understand the dynamics of individual and populations of neurons. Although these models vary in complexity, at a fundamental level they are mechanisms which transform input spike trains into an output spike train. This view has found expression in the Quantitative Single-Neuron Modeling competition where submitted models compete on how accurately they can predict the output spike train of a biological neuron given an input current [2]. Since the vast majority of neurons receive input from chemical synapses [3], a stricter stipulation would be to predict output spikes based on input spike trains at the various synapses of the neuron. There are advantages to this variation of the problem: complicated subthreshold fluctuations in the membrane potential need not be modeled, since models are now judged strictly on the basis of their performance at predicting the timing of output spikes. Models now have the liberty to focus on threshold crossings at the expense of being inaccurate in the subthreshold regime. Not only does the model better represent the functional complexity of the input/output transformation of a neuron, comparisons to the real neuron can be conducted in a non-invasive manner. In this paper we learn a Spike Response Model 0 (SRM0)[4] approximation of a neuron by only considering the timing of all afferent (incoming) and efferent (outgoing) spikes of the neuron over a bounded past. We begin by formulating the problem in a classification based supervised learning framework where spike train data is labeled according to whether the neuron is about to spike, or has recently spiked. We demonstrate that optimizing the model to properly classify this labeled data naturally leads to a quadratic programming problem when combined with an appropriate representation of the model via a dictionary of functions. We then derive a novel kernel on spike trains which is computed from a dictionary of post-synaptic potential (PSP) and after-hyperpolarizing potential (AHP) like functions. Finally, experimental results are presented to demonstrate the efficacy of the approach. For a complementary approach to learning a neuron model from spike train data, see [5]. 1 An SRM0 model was chosen for several reasons. First, SRM0 has been shown to be fairly versatile and accurate at modeling biological neurons [6]. Second, SRM0 is a relatively simple neuron model, and therefore is likely to display better generalizability on unseen input. Finally, the disparity between the learned neuron model and the actual neuron could shed light on the various operational modes of biological neurons. It is conceivable that the learned SRM0 model accurately predicts the behavior of the neuron a majority of the time. However, there could be states, bursting for example, where the prediction diverges. In such a case, the neuron can be seen as operating in two different modes, one SRM0 like, and the other not. Multiple models could then be learned to model the neuron in its various operational modes. 2 General model of the neuron It has been shown, that if one assumes a neuron to be a finite precision device with fading memory and a refractory period, then the membrane potential of the neuron, P, can be modeled as a function of the timing of the neuron’s afferent and efferent spikes which have occurred within a bounded past [7]. Spikes that have aged past this bound, denoted by Υ, are considered to have a negligible effect on the present value of P. We denote the arrival times of spikes at synapse j using the vector tj = ⟨tj 1, tj 2 . . . tj Nj⟩, where Nj is bounded from above by the number of spikes that can be present in an Υ window of time. t0 represents the output spike train of the neuron and vectors t1 . . . tm represent spike trains on the input synapses. tj i represents the time that has elapsed since that spike was generated or received by the neuron. Spikes are only considered if they occurred within Υ time. We can then formalize the membrane potential function P : RN →R, where N = Pm j=0 Nj. P(t0, . . . , tm) is defined over the space of all spike trains and reports the present membrane potential of the neuron. The neuron generates a spike when P(t0, . . . , tm) = Θ and dP/dt ≥0, where Θ is the threshold of the neuron. For notational simplicity, we define the spike configuration, s ∈RN, which represents the timing of all afferent and efferent spikes within the window of length Υ. s is the vector of vectors, s = ⟨t0, . . . , tm⟩. The neuron generates a spike when P(s) = Θ, dP/dt ≥0. As discussed in Section 1, we shall learn an SRM0 approximation of the neuron. The SRM0 model uses a bounded past history as described above to calculate the present membrane potential of the neuron. The present membrane potential ˆP is calculated as shown in Equation 1. η models the effect of a past generated spike, the AHP. ϵj represents the response of the neuron to a presynaptic spike at synapse j, the PSP. urest is the resting membrane potential. At any given time, the neuron generates a spike if the membrane potential crosses the threshold from below (i.e., ˆP(s) = Θ, d ˆP/dt ≥0). ˆP(s) = N0 X i=1 η(t0 i ) + m X j=1 Nj X i=1 ϵj(tj i) + urest (1) 3 Classification Problem In order to learn an SRM0 approximation of a neuron in a non-invasive manner, we pose a supervised learning classification problem which labels the given spike train data according to whether the neuron is about to spike or has recently spiked. We denote the former S−and the latter S+. This problem is equivalent to classifying subthreshold spike configurations ( ˆP(s) < Θ) from suprathreshold spike configurations ( ˆP(s) ≥Θ), which leads to the classification problem shown in Equation 2. It should be noted that the true membrane potential function, P, is a feasible solution to this problem since P(s) < Θ ∀s ∈S−and P(s) ≥Θ ∀s ∈S+. Min. ˆP(s) 2 s.t. ˆP(s) −Θ ≥1 ∀s ∈S+ AND ˆP(s) −Θ ≤−1 ∀s ∈S− (2) To generate training data which belong to S+ and S−, we provide the spike configurations which occur at a fixed infinitesimal time differential before and after the neuron generates a spike, as illustrated in Figure 1(a). The spike train at the instant the neuron generated a spike is shown by the solid lines. We shift the spike window infinitesimally into the past (future) to produce a spike configuration s ∈S−(S+), shown by the up (down) arrows. Notice that the spike which is currently 2 generated in the output spike train, t0, emphasized by the dashed circle, is not included in either spike configuration s. The reason it is not included in s ∈S−is that it simply has not been generated at that point in time. The reason it is not included in s ∈S+ is twofold. First, the spike would induce an AHP effect which would cause the membrane potential to fall below the threshold. Second, if it were included, this would cause the classifier to only consider whether or not that particular spike existed when classifying a given spike configuration as a member of S+ or S−. If it did exist, it would belong to S+, and if it did not exist it would belong to S−. Although this method would work well for the training data, it would not generalize to unseen live spike train data. 1 3 5 0 5 10 0 0.25 τ REEF as a function of β and τ β 0 33 66 100 0 0.5 1 Vary τ (β=0.5) Time (ms) τ = 10 τ = 20 τ = 30 τ = 40 0 33 66 100 0 0.5 1 Vary β (τ=20) Time (ms) β=0 β=5 β=10 β=15 Past t t t t 0 1 2 3 S + S − a) b) c) Figure 1: Figure (a) depicts the spike configurations used in the classification problem. Figure (b) shows the REEF for a fixed value of t = 1s and variable β and τ values. Figure (c) portrays the form of cross sections of the REEF as a function of t for different values of β and τ. Producing a hypersurface which can separate the supra-threshold spike configurations from the subthreshold spike configurations within the spike time feature space, would be extremely difficult. As discussed above, if we could map a given spike configuration s to its corresponding membrane potential P(s), then the classification problem is trivial. Although we do not have access to the membrane potential function, we can use a linear combination of functions from a dictionary to reproduce an approximation to the membrane potential function P. The choice of the dictionary is crucial. By choosing a dictionary which is tailored to the form of typical PSP and AHP functions, we increase the likelihood of successfully modeling the given neuron. The SRM0 model is an additively separable model [8], that is, the membrane potential is a sum of functions of the individual spikes of the spike configuration ( ˆP(s) = Pm j=0 PNj i=1 ˆPij(tj i)). This feature lends itself well to modeling the membrane potential using a linear combination of dictionary elements. The dictionary used here was one derived from a function used by MacGregor and Lewis for neuron modeling [9]. It consists of functions (parametrized by β and τ) of the form fβ,τ(t) = 1 τ · exp(−β/t) · exp(−t/τ) (3) We call this the reciprocal exponential – exponential function (REEF) dictionary. Figures1(b) and (c) present the dictionary for various cross sections of t, β and τ. 4 Approximation of the membrane potential function We would like to combine members of the chosen dictionary of functions to construct an approximation of the membrane potential function, P, which will yield a solution to the classification problem posed in Equation 2. We shall first discuss how this can be achieved in a discrete setting, where we combine a finite number of β and τ parametrized dictionary functions to model P. Following this we will discuss a continuous formulation, in which we combine elements drawn from an infinite continuous range of β and τ parametrized dictionary functions to model P. In the context of the continuous formulation, we will prove a specific instance of the Representer theorem which was first shown by Kimeldorf and Wahba [10]. The Representer theorem shows that the optimal solution to the posed classification problem must lie in the span of the data points which were used to train the classifier. In the discrete and continuous formulation, we will first model the effect of a single spike for simplicity. We will conclude this section by extending the continuous formulation to the case of multiple spikes on a single synapse, and the case of multiple spikes on multiple synapses. 3 4.1 Discrete Formulation In the discrete formulation, we wish to approximate the membrane potential function using a linear combination of a finite, predefined set of functions from the REEF dictionary. Focusing on the single spike case, our goal is to model the effect of a single spike on the membrane potential. We denote this effect on the membrane potential by ˆP and it is defined as a linear combination of parametrized REEF functions as shown in Equation 4. ft(β, τ) = 1 τ · exp(−β/t) · exp(−t/τ) is now a univariate function over t for fixed values of β and τ. A specific set of parameter settings {(β1, τ1), . . . , (βM, τ1), (β1, τ2), . . . , (βM, τN)} are used to construct a ˆP that can best reproduce the effect of the spike on the membrane potential. Inserting Equation 4 into Equation 2 yields a quadratic optimization problem on the mixing coefficients αi,j’s. ˆP(t) = M X i=1 N X j=1 αi,jft(βi, τj) (4) The major disadvantage of the discrete formulation is that for any given neuron, the optimal value set of the β’s and τ’s is unlikely to be known beforehand. While one can argue that the approximation ˆP can be improved by increasing M and N, as the number of functions increases, so does the dimensionality of the feature space. Since M and N can be increased independent of the size of the training dataset, the procedure is susceptible to over-fitting. To resolve this issue, we shift to a continuous formulation of the problem, which by virtue of the Representer theorem does not suffer from the rising feature space dimensionality issue. The dimensionality of the feature space is now controlled by the span of the training dataset. 4.2 Continuous formulation In the continuous formulation, we consider L2, the Hilbert space of square integrable functions on the domain {β, τ} ∈[0, ∞)2. We are concerned with finding a threshold dependent classification function ˆP, such that ˆP(t) ≥Θ + 1 when the spike t ∈S+ and ˆP(t) ≤Θ −1 when t ∈S−. This function is defined in Equation 5. ˆP(t) = ⟨α(β, τ), ft(β, τ)⟩= Z ∞ 0 Z ∞ 0 α(β, τ)ft(β, τ) dβ dτ (5) In this formulation, the mixing function, α(β, τ), is by definition a member of L2. Therefore, if ft(β, τ) ∈L2, then ˆP(t) is finite by the Cauchy-Schwartz inequality since ⟨α(β, τ), ft(β, τ)⟩≤ ∥α(β, τ)∥· ∥ft(β, τ)∥< ∞if both ∥α(β, τ)∥< ∞and ∥ft(β, τ)∥< ∞. To show that ft(β, τ) ∈ L2 we must show ⟨ft(β, τ), ft(β, τ)⟩< ∞. For ease of readability we shall henceforth suppress the domain variables in ft(β, τ) and α(β, τ) and refer to them as ft and α. 4.2.1 Proof ⟨fx, fy⟩= Z ∞ 0 Z ∞ 0 1 τ exp  −β x  exp  −x τ  1 τ exp  −β y  exp  −y τ  dβdτ (6) = xy (x + y)2 (7) Therefore ⟨ft, ft⟩= t·t (t+t)2 = 1 4 < ∞∀t ∈[ϵ, ∞) for some ϵ > 0. We must note here that by defining the membrane potential function in this manner, we have formulated a problem which yields a solution which is different from the solution to the discrete problem. Since the delta function centered at any arbitrary point (β∗, τ ∗) does not belong to L2, the mixing function α cannot be made up of a linear combination of these delta functions, as is the case in the discrete formulation. In addition, we are not working with a reproducing kernel Hilbert space since we are considering L2. However, our definition in Equation 5 defines the “point evaluation” of our membrane potential function. Since ˆP(t) is defined using the standard inner product in L2 with respect to particular members of L2, we can reformulate the classification problem in Equation 2 as shown in Equation 8. Here M is 4 the number of data points, m = 1 . . . M, and ym is the corresponding classification for spike time tm (that is, ym = +1 if tm ∈S+ and ym = −1 if tm ∈S−). Min. ∥α∥2 s.t. ym (⟨α, ftm⟩−Θ) ≥1 m = {1 . . . M} (8) We can now use a specific instance of the Representer theorem [10] to show that the optimal solution for α to the optimization problem specified in Equation 8 can be expressed as α = PM k=1 νkftk. We can then substitute this equality back into Equation 8 to produce a dual formulation of the optimization problem, which is a standard quadratic programming problem. 4.2.2 Representer Theorem For some ν1, ν2, . . . νM ∈R, the solution to Equation 8 can be written in the form α = M X k=1 νkftk (9) Proof We consider the subspace of L2 spanned by the REEF functions evaluated at the times of the given training data points (span{ ftk : 1 ≤k ≤M }). We then consider the projection α∥of α on this subspace. By noting α = α∥+ α⊥and rewriting Equation 8 in its Lagrangian form, we are left with Equation 10. However, by the definition of α⊥, ⟨α⊥, ftk⟩= 0, which then simplifies the summation term of Equation 10 to only depend upon α∥as shown in Equation 11. Min. ∥α∥2 + M X k=1 λk  1 −yk ⟨α∥, ftk⟩+ ⟨α⊥, ftk⟩−Θ  (10) Min. ∥α∥2 + M X k=1 λk  1 −yk ⟨α∥, ftk⟩−Θ  (11) In addition, by considering the relation shown in Equation 12, we find that the first term is minimized when α = α∥. Hence, the optimal solution to Equation 8 will lie in the aforementioned subspace and therefore have the form of Equation 9. ∥α∥2 = ∥α∥∥2 + ∥α⊥∥2 ≥∥α∥∥2 (12) 4.2.3 Dual Representation We can now substitute the form of the optimal solution shown in Equation 9 back into the original optimization problem shown in Equation 8. This leads to the problem in Equation 13 which is equivalent to Equation 14. The resultant quadratic programming problem is solvable given that we have access to the positive definite matrix K, which was derived in Section 4.2.1 and is shown in Equation 15. Min. M X k=1 νkftk 2 s.t. ym * M X k=1 νkftk, ftm + −Θ ! ≥1 m = {1 . . . M} (13) Min. M X i=1 M X j=1 νiνjK(ti, tj) s.t. ym M X k=1 νkK(tk, tm) −Θ ! ≥1 m = {1 . . . M} (14) K(ti, tj) = ⟨fti, ftj⟩= Z ∞ 0 Z ∞ 0 ftiftj dβ dτ = titj (ti + tj)2 (15) 4.3 Single Synapse We are now in a position to extend the framework to multiple spikes on a single synapse. Since we are learning an SRM0 approximation of a neuron, we assume that the effects of spikes are additively separable [8] and that each spike’s effect on the membrane potential for the given synapse is identical. Introducing the latter assumption is the core contribution of this section. We first define the threshold dependent classification function for a single spike in a manner identical to that of the single spike formulation shown in Equation 5. This will be the “stereotyped” effect that a spike arriving at this synapse has on the membrane potential. Note that the AHP effect of the output spike train can be modeled seamlessly (as a virtual synapse) in this framework. 5 4.3.1 Primal Problem We now consider the additive effects of multiple spikes arriving at a synapse. We define the vector tm = ⟨tm 1 , tm 2 , . . . , tm Nm⟩to be the mth data point, which consists of Nm spikes, represented by their spike times. Note that we have abused notation. Instead of the superscript repeatedly referring to the synapse in question, it now refers to the data point. The primal optimization problem, defined in Equation 16, is equivalent to Equation 17. Min. ∥α∥2 s.t. ym Nm X h=1 α, ftm h −Θ ! ≥1 m = {1 . . . M} (16) Min. ∥α∥2 s.t. ym * α, Nm X h=1 ftm h + −Θ ! ≥1 m = {1 . . . M} (17) The Representer theorem states that the optimal α must lie in span{PNk i=1 ftk i : 1 ≤k ≤M }. We omit the formal proof since it follows along the lines of the previous case. Therefore, the optimal α to Equation 17 will be of the form α = M X k=1 νk Nk X i=1 ftk i (18) 4.3.2 Dual Problem Substituting back Equation 18 yields the dual problem Equation 19, which can be solved given the positive definite kernel in Equation 20. Min. M X k=1 νk Nk X i=1 ftk i 2 s.t. ym * M X k=1 νk Nk X i=1 ftk i , Nm X h=1 ftm h + −Θ ! ≥1 m = {1 . . . M} (19) K(tp, tq) = * Np X i=1 ftp i , Nq X k=1 ftq k + = Np X i=1 Nq X k=1 D ftp i , ftq k E = Np X i=1 Nq X k=1 tp i · tq k (tp i + tq k)2 (20) 4.4 Multiple Synapses In the multiple synapse case, the principles are identical to that of the single synapse, with the exception that spikes arriving at different synapses could have different effects on the membrane potential, depending on the strength/type of the synaptic junction. Therefore, we keep the effects of each synapse on the membrane potential separate by assigning each synapse its own α function. 4.4.1 Primal Problem Since each synapse and the output has its own α function, this simply adds another summation term over the S synapses and the output (indexed by 0). The primal optimization problem is defined in Equation 21 which is equivalent to Equation 22. S is the number of synapses, Nm,s is the number of spikes on the sth synapse of the mth data point, and tm,s h is the timing of the hth spike on the sth synapse of the mth data point. Min. S X s=0 ∥αs∥2 s.t. ym   S X s=0 Nm,s X h=1 D αs, ftm,s h E −Θ  ≥1 m = {1 . . . M} (21) Min. S X s=0 ∥αs∥2 s.t. ym   S X s=0 * αs, Nm,s X h=1 ftm,s h + −Θ  ≥1 m = {1 . . . M} (22) The Representer theorem states that the optimal αs for the sth synapses must lie in span{PNk,s i=1 ftk,s i : 1 ≤k ≤M}. This is identical to the single synapse case for each synapse, 6 and therefore, the optimal αs to Equation 22 will be of the form αs = M X k=1 νk Nk,s X i=1 ftk,s i (23) 4.4.2 Dual Problem Substituting Equation 23 into Equation 22 yields the dual problem shown in Equation 24 which can be solved given access to the positive definite kernel defined in Equation 25. Min. S X s=0 M X k=1 νk Nk,s X i=1 ftk,s i 2 (24) s.t. ym   S X s=0 * M X k=1 νk Nk,s X i=1 ftk,s i , Nm,s X h=1 ftm,s h + −Θ  ≥1 m = {1 . . . M} K(tp, tq) = S X s=0 *Np,s X i=1 ftp,s i , Nq,s X k=1 ftq,s k + = S X s=0 Np,s X i=1 Nq,s X k=1 tp,s i · tq,s k (tp,s i + tq,s k )2 (25) 4.5 Summary With the above kernels we are able to formulate quadratic programming problems which can be solved with SVMlight [11]. The choice of the dictionary used to derive the kernel is critical to the success of this technique. A dictionary of functions tailored to the forms of PSPs and AHPs will perform better than a more general class of functions. The properties of the REEF dictionary which make it suitable for this problem are its exponential decay as well as its additive separability [8]. This explains why a Gaussian radial basis function (GRBF) does not work well for this problem. The GRBF kernel is not additive. A slight variation of the GRBF which takes the sum of Gaussian functions, rather than their product, was also explored. This performed better than the GRBF; however it did not perform well when applied to more complicated neurons. 5 Results To test the kernel we learned SRM0 neurons with increasing levels of complexity. We first considered a simplistic neuron which only received spikes on a single synapse. We then increased the complexity of the neuron, by introducing AHP effects as well as different types (excitatory and inhibitory) of afferent synapses with varying synaptic weights. The PSP effect was modeled via the classical alpha function [PSP(t) = C · t · exp(−t/τ)] while the AHP effect was modeled by an exponential function[AHP(t) = K · exp(−t/τ)]. Although we learned neurons with varying complexity, for want of space, we discuss here the case of a single neuron that received input spike trains from 4 excitatory synapses and 1 inhibitory synapse to mimic the ratio of connections observed in the cortex [12]. The stereotyped PSP for the excitatory and inhibitory synapses differed in their rise and fall times. The parameters for the stereotyped PSP were set as follows. For the excitatory PSP, C = 0.1 and τ = 10, where t is in units of milliseconds. For the inhibitory PSP, C = −0.39 and τ = 5. For the AHP, K = −16.667 and τ = 2. We first trained the classifier using 100,000 seconds of spike train data. Only the spike configurations occurring at fixed differentials before and after the neuron emitted a spike were considered. The input spike trains were generated using an inhomogeneous Poisson process, where the rate was varied sinusoidally around the intended mean spike rate in order to produce a more general set of training data. This resulted in 1,647,249 training data points, however only 10,681 of them were used in the solution as support vectors. After training, we tested our model using 100 seconds of unseen data. All spike configurations were considered when testing, regardless of temporal proximity to spike generation. To quantify our results, we first calculated the accuracy correct classifications total data points  , the sensitivity correct positive classifications total positive data points  , and specificity correct negative classifications total negative data points  . 7 0 20 40 60 10 0 10 1 10 2 10 3 Frequency Spike Time Difference (ms) 0 20 40 60 80 100 −1.5 −1 −0.5 0 0.5 1 Voltage Time (ms) 0 20 40 60 80 100 −20 −15 −10 −5 0 5 Voltage Time (ms) 0 0.2 0.4 0.6 0.8 1 10 0 10 1 10 2 10 3 Frequency Spike Time Difference (ms) b) c) a) Figure 2: Figure (a) shows histograms of the difference in time between the actual and predicted spike time by the learned model. Figure (b) shows the various PSP approximations (gray) in comparison to the PSP functions used by the neuron (black). Figure (c) depicts the AHP approximation (gray) and the AHP function used by the neuron (black). They were 0.9947, 0.9532 and 0.9948 respectively. We also calculated a histogram of how close the spike predictions were. For every spike produced by the neuron, we determined the temporal proximity of the closest spike time predicted by the model. We then histogrammed this data. Figure 2(a) shows two histograms depicting these calculations. The larger histogram contains predictions with time differences varying between 0 and 70 ms, with a bin size of 1 ms while the inlaid histogram ranges from 0 to 10 ms and has a bin size of 0.1 ms. Both use a logarithmic scale on the y-axis. From the histograms, we see that the vast majority of spikes were predicted correctly (with a temporal proximity of 0 ms) and that out of the mispredicted spike times, the temporal proximity of all predicted spikes fell within 70 ms of the actual spike time. In Figures 2(b) and 2(c) we display a comparison of the approximated PSP and AHP versus the true PSP and AHP. To calculate the classification model’s approximated PSP we artificially send a single spike across each input synapse. We artificially generate a spike to produce the AHP approximation. By considering the distance of the single spike data point from the classifier’s margin as the spike ages, we can get a scaled and translated version of the PSP and AHP. The figures show these approximations scaled and translated back appropriately. In Figure 2(b) we show the approximations of the PSPs for the input synapses. The approximations are shown in gray; the true PSPs are shown in black. The different line styles are representative of the different synapses and therefore have varying synaptic weights. A similar image for the AHP is shown in Figure 2(c). We note that there are small differences between the approximated and the true functions. If the PSP and AHP approximations were exact, we would have seen perfect classification results. However, as with most machine learning techniques, the quality of the solution is limited by the training data given. 6 Conclusion In this paper we have developed a classification framework which uses a novel kernel derived from a REEF dictionary to produce an SRM0 approximation of a neuron. The technique used is noninvasive in the sense that it only requires the timing of afferent and efferent spikes within a certain bounded past. The REEF dictionary was chosen due to its similarity to PSP and AHP functions used in a neuron model proposed by MacGregor and Lewis [9]. By producing an SRM0 approximation, which is additively separable [8], we produce a model which is both versatile and accurate [6]. In addition, it is a relatively simple model, which allows for increased generalizability to unseen input. The simplicity of the SRM0 model has the potential to allow us to observe deviations between the model and the neuron, which can lead to insights on the various behavioral modes of neurons. Acknowledgments This work was supported by a National Science Foundation grant (NSF IIS-0902230) to A.B. 8 References [1] R. Jolivet, A. Roth, F. Sch¨urmann, W. Gerstner, and W. Senn. Special issue on quantitative neuron modeling. Biological Cybernetics, 99(4):237–239, 2008. [2] W. Gerstner and R. Naud. How Good Are Neuron Models? Science, 326(5951):379–380, 2009. [3] W. Gerstner and W. Kistler. Spiking Neuron Models: An Introduction. Cambridge University Press New York, NY, USA, 2002. [4] R. Jolivet, T.J. Lewis, and W. Gerstner. The spike response model: a framework to predict neuronal spike trains. Artificial Neural Networks and Neural Information Processing– ICANN/ICONIP 2003, pages 173–173, 2003. [5] L. Paninski, J.W. Pillow, and E.P. Simoncelli. Maximum likelihood estimation of a stochastic integrate-and-fire neural encoding model. Neural Computation, 16(12):2533–2561, 2004. [6] R. Jolivet, T.J. Lewis, and W. Gerstner. Generalized integrate-and-fire models of neuronal activity approximate spike trains of a detailed model to a high degree of accuracy. Journal of Neurophysiology, 92(2):959–976, 2004. [7] A. Banerjee. On the phase-space dynamics of systems of spiking neurons. I: Model and experiments. Neural Computation, 13(1):161–193, 2001. [8] Tadeusz Stanisz. Functions with separated variables. Master’s thesis, Zeszyty Naukowe Uniwerstyetu Jagiellonskiego, 1969. [9] R.J. MacGregor and E.R. Lewis. Neural Modeling. Plenum Press, New York, 1977. [10] G. Kimeldorf and G. Wahba. Some results on Tchebycheffian spline functions. Journal of Mathematical Analysis and Applications, 33(1):82–95, 1971. [11] T. Joachims. Making large-scale support vector machine learning practical. In Advances in Kernel Methods, pages 169–184. MIT Press, 1999. [12] E.M. Izhikevich. Simple model of spiking neurons. IEEE Transactions on Neural Networks, 14(6):1569–1572, 2003. 9
2010
229
3,998
000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Switching state space model for simultaneously estimating state transitions and nonstationary firing rates Anonymous Author(s) Affiliation Address email Abstract We propose an algorithm for simultaneously estimating state transitions among neural states, the number of neural states, and nonstationary firing rates using a switching state space model (SSSM). This algorithm enables us to detect state transitions on the basis of not only the discontinuous changes of mean firing rates but also discontinuous changes in temporal profiles of firing rates, e.g., temporal correlation. We construct a variational Bayes algorithm for a non-Gaussian SSSM whose non-Gaussian property is caused by binary spike events. Synthetic data analysis reveals that our algorithm has the high performance for estimating state transitions, the number of neural states, and nonstationary firing rates compared to previous methods. We also analyze neural data that were recorded from the medial temporal area. The statistically detected neural states probably coincide with transient and sustained states that have been detected heuristically. Estimated parameters suggest that our algorithm detects the state transition on the basis of discontinuous changes in the temporal correlation of firing rates, which transitions previous methods cannot detect. This result suggests that our algorithm is advantageous in real-data analysis. 1 Introduction Elucidating neural encoding is one of the most important issues in neuroscience. Recent studies have suggested that cortical neuron activities transit among neural states in response to applied sensory stimuli[1-3]. Abeles et al. detected state transitions among neural states using a hidden Markov model whose output distribution is multivariate Poisson distribution (multivariate-Poisson hidden Markov model(mPHMM))[1]. Kemere et al. indicated the correspondence relationship between the time of the state transitions and the time when input properties change[2]. They also suggested that the number of neural states corresponds to the number of input properties. Assessing neural states and their transitions thus play a significant role in elucidating neural encoding. Firing rates have state-dependent properties because mean and temporal correlations are significantly different among all neural states[1]. We call the times of state transitions as change points. Change points are those times when the time-series data statistics change significantly and cause nonstationarity in time-series data. In this study, stationarity means that time-series data have temporally uniform statistical properties. By this definition, data that do not have stationarity have nonstationarity. Previous studies have detected change points on the basis of discontinuous changes in mean firing rates using an mPHMM. In this model, firing rates in each neural state take a constant value. However, actually in motor cortex, average firing rates and preferred direction change dynamically in motor planning and execution[4]. This makes it necessary to estimate state-dependent, instantaneous firing rates. On the other hand, when place cells burst within their place field[5], the inter-burst 1 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 intervals correspond to the θ rhythm frequency. Medial temporal (MT) area neurons show oscillatory firing rates when the target speed is modulated in the manner of a sinusoidal function[6]. These results indicate that change points also need to be detected when the temporal profiles of firing rates change discontinuously. One solution is to simultaneously estimate both change points and instantaneous firing rates. A switching state space model(SSSM)[7] can model nonstationary time-series data that include change points. An SSSM defines two or more system models, one of which is modeled to generate observation data through an observation model. It can model nonstationary time-series data while switching system models at change points. Each system model estimates stationary state variables in the region that it handles. Recent studies have been focusing on constructing algorithms for estimating firing rates using single-trial data to consider trial-by-trial variations in neural activities [8]. However, these previous methods assume firing rate stationarity within a trial. They cannot estimate nonstationary firing rates that include change points. An SSSM may be used to estimate nonstationary firing rates using single-trial data. We propose an algorithm for simultaneously estimating state transitions among neural states and nonstationary firing rates using an SSSM. We expect to be able to estimate change points when not only mean firing rates but also temporal profiles of firing rates change discontinuously. Our algorithm consists of a non-Gaussian SSSM, whose non-Gaussian property is caused by binary spike events. Learning and estimation algorithms consist of variational Bayes[9,10] and local variational methods[11,12]. Automatic relevance determination (ARD) induced by the variational Bayes method[13] enables us to estimate the number of neural states after pruning redundant ones. For simplicity, we focus on analyzing single-neuron data. Although many studies have discussed state transitions by analyzing multi-neuron data, some of them have suggested that single-neuron activities reflect state transitions in a recurrent neural network[14]. Note that we can easily extend our algorithm to multi-neuron analysis using the often-used assumption that change points are common among recorded neurons[1-3]. 2 Definitions of Probabilistic Model 2.1 Likelihood Function Observation time T consists of K time bins of widths ∆(ms), and each bin includes at most one spike (∆≪1). The spike timings are t = {t1, ..., tS} where S is the total number of observed spikes. We define ηk such that ηk = +1 if the kth bin includes a spike and ηk = −1 otherwise (k = 1, ..., K). The likelihood function is defined by the Bernoulli distribution p(t|λ) = ∏K k=1(λk∆) 1+ηk 2 (1 −λk∆) 1−ηk 2 , (1) where λ = {λ1, ..., λK} and λk is the firing rate at the kth bin. The product of firing rates and bin width corresponds to the spike-occurrence probability and λk∆∈[0, 1) since ∆≪1. The logit transformation of exp(2xk) = λk∆ 1−λk∆(xk ∈(−∞, ∞)) lets us consider the nonnegativity of firing rates in detail[11]. Hereinafter, we call x = {x1, ..., xK} the “firing rates”. Since K is a large because ∆≪1, the computational cost and memory accumulation do matter. We thus use coarse graining[15]. Observation time T consists of M coarse bins of widths r = C∆ (ms). A coarse bin includes many spikes and the firing rate in each bin is constant. The likelihood function which is obtained by applying the logit transformation and the coarse graining to eq. (1) is p(t|x) = ∏M m=1[exp(ˆηmxm −C log 2 cosh xm)], (2) where ˆηm = ∑C u=1 η(m−1)C+u. 2.2 Switching State Space Model x1 1 x2 1 xM 1 x1 N x2 N xM N 1 2 M z z z η1 η2 ηM Firing rate Label variable Spike train ^ ^ ^ Figure 1: Graphical model representation of SSSM. An SSSM consists of N system models; for each model, we define a prior distribution. We define label variables zn m such that zn m = 1 if the nth system model generates an observation in the mth bin and zn m = 0 otherwise (n = 1, ..., N, m = 1, ..., M). 2 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 We call N the number of labels and the nth system model the nth label. The joint distribution is defined by p(t, x, z|θ′) = p(t|x, z)p(z|π, a)p(x|µ, β), (3) where x = {x1, ..., xN}, xn = {xn 1, ..., xn M}, z = {z1 1, .., z1 M, ..., zN 1 , ..., zN M}, and θ′ = {π, a, µ, β} are parameters. The likelihood function, including label variables, is given by p(t|x, z) = ∏N n=1 ∏M m=1[exp(ˆηmxn m −C log 2 cosh xn m)]zn m. (4) We define the prior distributions of label variables as p(z1|π) = ∏N n=1(πn)zn 1 δ(∑N n=1 πn −1), (5) p(zm+1|zm, a) = ∏N n=1 ∏N k=1(ank)zn mzk m+1δ(∑N k=1 ank −1), (6) where πn and ank are the probabilities that the nth label is selected at the initial time and that the nth label switches to the kth one, respectively. The prior distributions of firing rates are Gaussian p(x) = ∏N n=1 p(xn|βn, µn) = ∏N n=1 √ |βnΛ| (2π)M exp(−βn 2 (xn −µn)T Λ(xn −µn)), (7) where βn, µn respectively mean the temporal correlation and the mean values of the nth-label firing rates (n = 1, ..., N). Here for simplicity, we introduced Λ, which is the structure of the temporal correlation satisfying p(xn|βn, µn) ∝∏ m exp(−βn 2 ((xm −µm) −(xm−1 −µm−1))2). Figure 1 depicts a graphical model representation of an SSSM. Ghahramani & Hinton (2000) did not introduce a priori knowledge about the label switching frequencies. However, in many cases, the time scale of state transitions is probably slower than that of the temporal variation of firing rates. We define prior distributions of π and a to introduce a priori knowledge about label switching frequencies using Dirichlet distributions p(π|γn) = C(γn) ∏N n=1(πn)γn−1δ(∑N n=1 πn −1), (8) p(a|γnk) = ∏N n=1 [ C(γnk) ∏N k=1(ank)γnk−1δ(∑N k=1 ank −1) ] , (9) where C(γn) = Γ(PN n=1 γn) Γ(γ1)...Γ(γN), C(γnk) = Γ(PN k=1 γnk) Γ(γn1)...Γ(γnN). C(γn) and C(γnk) correspond to the normalization constants of p(π|γn) and p(a|γnk), respectively. Γ(u) is the gamma function defined by Γ(u) = ∫∞ 0 dttu−1 exp(−t). γn, γnk are hyperparameters to control the probability that the nth label is selected at the initial time and that the nth label switches to the kth. We define the prior distributions of µn and βn using non-informative priors. Since we do not have a priori knowledge about neural states, µ and β, which characterize each neural state, should be estimated from scratch. 3 Estimation and Learning of non-Gaussian SSSM It is generally computationally difficult to calculate the marginal posterior distribution in an SSSM[6]. We thus use the variational Bayes method to calculate approximated posterior distributions q(w) and q(θ) that minimize the variational free energy F[q] = ∫∫ dwdθq(w)q(θ) log q(w)q(θ) p(t,w,θ) = U[q] −S[q] (10) where w = {z, x} are hidden variables, θ = {π, a} are parameters, U[q] = − ∫∫ dwdθq(w)q(θ) log p(t, w, θ) and S[q] = − ∫∫ dwdθq(w)q(θ) log ( q(w)q(θ) ) . We denote q(w) and q(θ) as test distributions. The variational free energy satisfies log p(t) = −F[q] + KL(q(w)q(θ)∥p(w, θ|t)), (11) where KL(q(w)q(θ)∥p(w, θ|t)) is the Kullback-Leibler divergence between test distributions and a posterior distribution p(w, θ|t) defined by KL(q(y)∥p(y|t)) = ∫ dyq(y) log q(y) p(y|t). Since the marginal likelihood log p(t) takes a constant value, the minimization of variational free energy indirectly minimizes Kullback-Leibler divergence. The variational Bayes method requires conjugacy between the likelihood function (eq. (4)) and the prior distribution (eq. (7)). However, eqs. (4) and (7) are not conjugate to each other because of the binary spike events. The local variational method enables us to construct a variational Bayes algorithm for a non-Gaussian SSSM. 3 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 3.1 Local Variational Method The local variational method, which was proposed by Jaakola & Jordan[11], approximately transforms a non-Gaussian distribution into a quadratic-form distribution by introducing variational parameters. Watanabe et al. have proven the effectiveness of this method in estimating stationary firing rates[12]. The exponential function in eq. (4) includes f(xn m) = log 2 cosh xn m, which is a concave function of y = (xn m)2. The concavity can be confirmed by showing the negativity of the second-order derivative of f(xn m) with respect to (xn m)2 for all xn m. Considering the tangent line of f(xn m) with respect to (xn m)2 at (xn m)2 = (ξn m)2, we get a lower bound for eq. (4) pξ(t|x, z) = ∏N n=1 ∏M m=1[exp(ˆηmxn m −C tanh ξn m 2ξn m ((xn m)2 −(ξn m)2)) −C log 2 cosh ξn m)]zn m, (12) where ξn m is a variational parameter. Equation (12) satisfies the inequality pξ(t|x, z) ≤p(t|x, z). We use eq. (12) as the likelihood function instead of eq. (4). The conjugacy between eqs. (12) and (7) enables us to construct the variational Bayes algorithm. Using eq. (12), we find that the variational free energy Fξ[q] = ∫∫ dwdθq(w)q(θ) log q(w)q(θ) pξ(t,w,θ) = Uξ[q] −S[q] (13) satisfies the inequality Fξ[q] ≥F[q], where Uξ[q] = − ∫∫ dwdθqξ(w)qξ(θ) log pξ(s, w, θ). Since the inequality log p(t, x, z) ≥−F[q] ≥−Fξ[q] is satisfied, the test distributions that minimize Fξ[q] can indirectly minimize F[q] which is analytically intractable. Using the EM algorithm to estimate variational parameters improves the approximation accuracy of Fξ[q][16]. 3.2 Variational Bayes Method We assume the test distributions that satisfy the constraints q(w) = ∏N n=1(q(xn|µn, βn))q(z) and q(θ) = q(π)q(a), where µ = {µ1, ..., µN}, β = {β1, ..., βN}. Under constraints ∫ dxq(x|µ, β) = 1, ∑ z q(z) = 1, ∫ dπq(π) = 1 and ∫ daq(a) = 1, we can obtain the test distributions of hidden variables xn, z that minimize eq. (13) as follows: q(xn|µn, βn) = √ |W n| (2π)M exp(−1 2(xn −ˆµn)T W n(xn −ˆµn)), (14) q(z) ∝∏N n=1 exp(ˆπn)zn 1 ∏N n=1 ∏M m=1 exp(ˆbn m)zn m ∏M−1 m=1 ∏N n=1 ∏N k=1 exp(ˆank m )zn mzk m+1, (15) where W n = CLn + βnΛ, ˆµn = (W n)−1(wn + βnΛµn), ˆπn = ⟨log πn⟩, ˆbn m = ˆηm⟨xn m⟩− C tanh ξn m 2ξn m (⟨(xn m)2⟩−(ξn m)2) −C log 2 cosh ξn m, ˆank = ⟨log ank⟩, Ln is the diagonal matrix whose (m, m) component is ⟨zn m⟩tanh ξn m ξn m , wn is the vector whose (1, m) component is ⟨zn m⟩ˆηm. ⟨·⟩means the average obtained using a test distribution q(·). The computational cost of calculating the inverse of each W is O(M) because Λ is defined by a tridiagonal and Ln is a diagonal matrix. In the calculation of q(xn), ⟨zn m⟩controls the effective variance of the likelihood function. A higher ⟨zn m⟩means the data are reliable for the nth label in the mth bin and lower ⟨zn m⟩means the data are unreliable. Under the constraint ∑N n=1⟨zn m⟩= 1, all labels estimate their firing rates on the basis of divide-and-conquer principle of data reliability. Using the equality (ξn m)2 = ⟨(xn m)2⟩that will be developed in the next section, we obtain ˆbn m = ˆηm⟨xn m⟩−C log 2 cosh⟨xn m⟩−C 2 log 2 cosh ( 1 + (W n)−1 (m,m)/⟨xn m⟩2) in eq. (15). When the mth bin includes many (few) spikes, the nth label tends to be selected if it estimates the highest (lowest) firing rate among the labels. But the variance of the nth label (W n)−1 (m,m) penalizes that label’s selection probability. We can also obtain the test distribution of parameters π, a as q(π) = C(ˆγn) ∏N n=1(πn)ˆγn−1δ(∑N n=1 πn −1), (16) q(a) = ∏N n=1 [ C(ˆγnk) ∏N k=1(ank)ˆγnk−1δ(∑N k=1 ank −1) ] , (17) where C(ˆγn) = Γ(PN n=1 ˆγn) Γ(ˆγ1)...Γ(ˆγN), C(ˆγnk) = Γ(PN k=1 ˆγnk) Γ(ˆγn1)...Γ(ˆγnN). C(ˆγn) and C(ˆγnk) correspond to the normalization constants of q(π) and q(a), and ˆγn = ⟨zn 1 ⟩+ γ1, ˆγnk = ∑M−1 m=1 ⟨zn mzk m+1⟩+ γnk. 4 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 We can see γn in ˆγn controls the probability that the nth label is selected at the initial time, and γnk in ˆγnk biases the probability of the transition from the nth label to the kth label. A forwardbackward algorithm enables us to calculate the first- and second-order statistics of q(z). Since an SSSM involves many local solutions, we search for a global one using deterministic annealing, which is proven to be effective for estimating and learning in an SSSM [7]. 3.3 EM algorithm The EM algorithm enables us to estimate variational parameters ξ and parameters µ and β. In the EM algorithm, the calculation of the Q function is computationally difficult because it requires us to calculate averages using the true posterior distribution. We thus calculate the Q function using test distributions instead of the true posterior distributions as follows: ˜Q(µ, β, ξ∥µ(t′), β(t′), ξ(t′)) = ∫ dxq(x|µ(t′), β(t′))q(z)q(π)q(a) log pξ(t, x, z, π, a|µ, β). (18) Since ˜Q(µ, β, ξ∥µ(t′), β(t′), ξ(t′)) = −U[q]ξ, maximizing the Q function with respect to µ, β, ξ is equivalent to minimizing the variational free energy (eq. (10) ). The update rules (ξn m)2 = ⟨(xn m)2⟩, µn m = ⟨xn m⟩, and βn = M Tr[Λ((Wn)−1+(⟨xn⟩−µn)(⟨xn⟩−µn)T )] (19) maximize the Q function. The following table summarizes our algorithm. Summary of our algorithm   Set γ1 and γnk. t′ ←1 Initialize parameters of model. Perform the following VB and EM algorithm until Fξ[q] converges. ξ(t′), µ(t′), β(t′) ←ξ, µ, β Variational Bayes algorithm Perform the VB-E and VB-M step until Fξ(t′)[q] converges. VB-E step: Compute q(x|µ(t′), β(t′)) and q(z) using eq. (14) and eq. (15). VB-M step: Compute q(π) and q(a) using eq. (16) and eq. (17). EM algorithm Compute ξ, µ, β using eq. (19). t′ ←t′ + 1   4 Results The estimated firing rate in the mth bin is defined by ˜xm = ⟨x˜nm m ⟩, where ˜nm satisfies ˜nm = arg maxn⟨zn m⟩. The estimated change points ˜mr = ˜mC∆satisfies ⟨zn ˜m⟩> ⟨zk ˜m⟩(∀k ̸= n) and ⟨zn ˜m+1⟩< ⟨zk ˜m+1⟩(∃k ̸= n). The estimated number of labels ˜N is given by ˜N = N −(the number of pruned labels), where we assume that the nth label is pruned out if ⟨zn m⟩< 10−5(∀m). We call our algorithm “the variational Bayes switching state space model” (VB-SSSM). 4.1 Synthetic data analysis and Comparison with previous methods We artificially generate spike trains from arbitrarily set firing rates with an inhomogeneous gamma process. Throughout this study, we set κ which means the spike irregularity to 2.4 in generating spike trains. We additionally confirmed that the following results are invariant if we generate spikes using inhomogeneous Poisson or inverse Gaussian process. In this section, we set parameters to N = 5, T = 4000, ∆= 0.001, r = 0.04, γn = 1, γnk = 100(n = k) or 2.5(n ̸= k). The hyperparameters γnk represent the a priori knowledge where the time scale of transitions among labels is sufficiently slower than that of firing-rate variations. 4.1.1 Accuracy of change-point detections This section discusses the comparative results between the VB-SSSM and mPHMM regarding the accuracy of change-point detections and number-of-labels estimation. We used the EM algorithm to 5 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 (a) mPHMM 0 < z >1 VB-SSSM0 40 80 120 Firing rate (Hz) True firing rate 1000 2000 3000 0 4000 Time (ms) 0 < z >1 1000 2000 3000 0 4000 (c) (b) (d) True firing rate 0 40 80 120 Firing rate (Hz) mPHMM VB-SSSM Time (ms) Figure 2: Comparative results of change-point detections for the VB-SSSM and the mPHMM. (a) and (c): Arbitrary set firing rates for validating the accuracy of change-point detections when firing rates include discontinuous changes in mean value (fig. (a)) or temporal correlation (fig. (c)). (b) and (d): Comparative results that correspond to firing rates in (a) ((b)) and (c) ((d)). The stronger the white color becomes, the more dominant the label is in the bin. estimate the label variables in the mPHMM[1-3]. Since the mPHMM is useful in analyzing multitrial data, in the estimation of mPHMM we used ten spike trains under the assumption that change points were common among ten spike trains. On the other hand, VB-SSSM uses single-trial data. Fig. 2(a) displays arbitrarily set firing rates to verify the change point detection accuracy when mean firing rates changed discontinuously. The firing rate at time t(ms) was set to λt = 0.0 ( t ∈ [0, 1000), t ∈[2000, 3000) ) , λt = 110.0 ( t ∈[1000, 2000) ) , and λt = 60.0 ( t ∈[3000, 4000] ) . The upper graph in fig. 2(b) indicates the label variables estimated with the VB-SSSM and the lower indicates those estimated with the mPHMM. In the VB-SSSM, ARD estimated the number of labels to be three after pruning redundant labels. As a result of ten-trial data analysis, the VBSSSM estimated the number of labels to be three in nine over ten spike trains. The estimated change points were 1000±0.0, 2000±0.0, and 2990±16.9ms. The true change points were 1000, 2000, and 3000ms. Fig. 2(c) plots the arbitrarily set firing rates for verifying the change point detection accuracy when temporal correlation changes discontinuously. The firing rate at time t(ms) was set to λt = λt−1 + 2.0zt ( t ∈[0, 2000) ) , λt = λt−1 + 20.0zt ( t ∈[2000, 4000] ) , where zt is a standard normal random variable that satisfies ⟨zt⟩= 0, ⟨ztzt′⟩= δtt′ (δtt′ = 0(t ̸= t′), 1(t = t′)). Fig. 2(d) shows the comparative results between the VB-SSSM and mPHMM. ARD estimates the number of labels to be two after pruning redundant labels. As a result of ten-trial data analysis, our algorithm estimated the number of labels to be two in nine over ten spike trains. The estimated change points was 1933±315.1ms and the true change point was 2000ms. 4.1.2 Accuracy of firing-rate estimation This section discusses the nonstationary firing rate estimation accuracy. The comparative methods include kernel smoothing (KS), kernel band optimization (KBO)[17], adaptive kernel smoothing (KSA)[18], Bayesian adaptive regression splines (BARS)[19], and Bayesian binning (BB)[20]. We used a Gaussian kernel in KS, KBO, and KSA. The kernel widths σ were set to σ = 30 (ms) (KS30), σ = 50 (ms) (KS50) and σ = 100 (ms) (KS100) in KS. In KSA, we used the bin widths estimated using KBO. Cunningham et al. have reviewed all of these compared methods [8]. A firing rate at time t(ms) was set to λt = 5.0 ( t ∈[0, 480), t ∈[3600, 4000] ) , λt = 90.0 × exp(−11 (t−480) 4000 ) ( t ∈[480, 2400) ) , λt = 80.0 × exp(−0.5(t −2400)/4000)) ( t ∈[2400, 3600) ) and we reset λt to 5.0 if λt < 5.0. We set these firing rates assuming an experiment in which transient and persistent inputs are applied to an observed neuron in a series. Note that input information, such as timings, properties, and sequences is entirely unknown. 6 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 0 40 80 120 Firing rate (Hz) Estimated firing rate True firing rate 1 2 3 4 5 Label number 0 < z >1 1000 2000 3000 0 4000 Time (ms) (a) (b) 1000 2000 3000 0 4000 Time (ms) 0 40 80 120 Firing rate (Hz) Estimated value using label 2 True firing rate Estimated value using label 3 Estimated value using label 1 1000 2000 3000 0 4000 Time (ms) (c) (d) 5 6 7 8 9 10 11 12 BARS Mean absolute error KS30 KS100 KS50 KBO KSA BB VB-SSSM ** ** ** * *・・・p<0.01 **・・・p<0.005 * ** ** Figure 3: Results of firing-rate estimation. (a): Estimated firing rates. Vertical bars above abscissa axes are spikes used for estimates. (b): Averaged label variables ⟨zn m⟩. (c): Estimated firing rates using each label. (d): Mean absolute error ± standard deviation when applying our algorithm and other methods to estimate firing rates plotted in (a). * indicates p<0.01 and ** indicates p<0.005. Fig. 3(a) plots the estimated firing rates (red line). Fig. 3(b) plots the estimated label variables and fig. 3(c) plots the estimated firing rates when all labels other than the pruned ones were used. ARD estimates the number of labels to be three after pruning redundant labels. As a result of ten spike trains analysis, the VB-SSSM estimated the number of labels to be three in eight over ten spike trains. The change points were estimated at 420±82.8, 2385±20.7, and 3605±14.1ms. The true change points were 480, 2400, and 3600ms. The mean-absolute-error (MAE) is defined by MAE = 1 K ∑K k=1 |λk −ˆλk|, where λk and ˆλk are the true and estimated firing rates in the kth bin. All the methods estimate the firing rates at ten times. Fig. 3(d) shows the mean MAE values averaged across ten trials and the standard deviations. We investigated the significant differences in firing-rate estimation among all the methods using Wilcoxon signed rank test. Both the VB-SSSM and BB show the high performance. Note that the VB-SSSM can estimate not only firing rates but change points and the number of neural states. 4.2 Real Data Analysis In area MT, neurons preferentially respond to the movement directions of visual inputs[21]. We analyzed the neural data recorded from area MT of a rhesus monkey when random dots were presented. These neural data are available from the Neural Signal Archive (http://www.neuralsignal.org.), and detailed experimental setups are described by Britten et al. [22]. The input onsets correspond to t = 0(ms), and the end of the recording corresponds to t = 2000(ms). This section discusses our analysis of the neural data included in nsa2004.1 j001 T2. These data were recorded from the same neuron of the same subject. Parameters were set as follows: T = 2000, ∆= 0.001, N = 5, r = 0.02, γn = 1(n = 1, ..., 5), γnk = 100(n = k) or 2.5(n ̸= k). Fig. 4 shows the analysis results when random dots have 3.2% coherence. Fig. 4 (a) plots the estimated firing rates (red line) and a Kolmogorov-Smirnov plot (K-S plot) (inset)[23]. Since the true firing rates for the real data are entirely unknown, we evaluated the reliability of estimated values from the confidence intervals. The black and gray lines in the inset denote the K-S plot and 95 % confidence intervals. The K-S plot supported the reliability of the estimated firing rates since it fits into the 95% confidence intervals. Fig. 4(b) depicts the estimated label variables, and fig. 4(c) shows the estimated firing rates using all labels other than the pruned ones. The VB-SSSM estimates the number of labels to be two. We call the label appearing on the right after the input onset “the 1st neural state” and that appearing after the 1st neural state “the 2nd neural state”. The 1st and 2nd neural states in fig. 4 might corresponded to transient and sustained states[6] that have been heuristically detected, e.g. assuming the sustained state lasts for a constant time[24]. We analyzed all 105 spike trains recorded under presentations of random dots with 3.2%, 6.4%, 12.8%, and 99.9% coherence, precluding the neural data in which the total spike count was less than 7 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 0 < z >1 1 2 3 4 5 Label number 500 1000 1500 0 2000 Time (ms) (a) (b) (c) 500 1000 1500 0 2000 0 100 200 Firing rate (Hz) Estimated firing rate K-S plot Estimated value using label 2 Estimated value using label 4 500 1000 1500 0 2000 Time (ms) 0 100 200 Firing rate (Hz) β (d) (e) Trial number 0 5 10 15 20 0.5 1.5 2.5 3.5 x 105 The 1st neural state The 2nd neural state -2.2 -1.8 -1.4 The 1st neural state The 2nd neural state Trial number <dμ> 0 5 10 15 20 p<0.0005 p>0.1 Figure 4: Estimated results when applying the VB-SSSM to area MT neural data. (a): Estimated firing rates. Vertical bars above abscissa axes are spikes used for estimates. Inset is result of Kolmogorov-Smirnov goodness-of-fit. Solid and gray lines correspond to K-S plot and 95% confidence interval. (b): Averaged label variables using test distribution. (c): Estimated firing rates using each label. (d) and (e): Estimated parameters in the 1st and the 2nd neural states. 20. The VB-SSSM estimated the number of labels to be two in 25 over 30 spike trains (3.2%), 19 over 30 spike trains (6.4%), 26 over 30 spike trains (12.8%), and 16 over 16 spike trains (99.9%). In summary, the number of labels is estimated to be two in 85 over 101 spike trains. Figs. 4(d) and (e) show the estimated parameters from 19 spike trains whose estimated number of labels was two (6.4% coherence). The horizontal axis denotes the arranged number of trials in ascending order. Figs. 4 (d) and (e) correspond to the estimated temporal correlation β and the time average of µ, which is defined by ⟨µn⟩= 1 Tn ∑Tn t=1 µn t , where Tn denotes the sojourn time in the nth label or the total observation time T. The estimated temporal correlation differed significantly between the 1st and 2nd neural states (Wilcoxon signed rank test, p<0.00005). On the other hand, the estimated mean firing rates did not differ significantly between these neural states (Wilcoxon signed rank test, p>0.1). Our algorithm thus detected the change points on the basis of discontinuous changes in temporal correlations. We could see the similar tendencies for all randomdot coherence conditions (data not shown). We confirmed that the mPHMM could not detect these change points (data not shown), which we were able to deduce from the results shown in fig. 2(d). These results suggest that our algorithm is effective in real data analysis. 5 Discussion We proposed an algorithm for simultaneously estimating state transitions, the number of neural states, and nonstationary firing rates using single-trial data. There are ways of extending our research to analyze multi-neuron data. The simplest one assumes that the time of state transitions is common among all recorded neurons[1-3]. Since this assumption can partially include the effect of inter-neuron interactions, we can define prior distributions that are independent between neurons. Because there are no loops in the statistical dependencies of firing rates under these conditions, the variational Bayes method can be applied directly. One important topic for future study is optimization of coarse bin widths r = C∆. A bin width that is too wide obscures both the time of change points and temporal profile of nonstationary firing rates. A bin width that is too narrow, on the other hand, increases computational costs and worsens estimation accuracy. Watanabe et al. proposed an algorithm for estimating the optimal bin width by maximization the marginal likelihood [15], which is probably applicable to our algorithm. 8 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 [1] Abeles, M. et al. (1995), PNAS, pp. 609-616. [2] Kemere, C. et al. (2008) J. Neurophyiol. 100(7):2441-2452. [3] Jones, L. M. et al. (2007), PNAS 104(47):18772-18777. [4] Rickert, J. et al. (2009) J. Neurosci. 29(44): 13870-13882. [5] Harvey, C. D. et al. (2009), Nature 461(15):941-946. [6] Lisberger, et al. (1999), J. Neurosci. 19(6):2224-2246. [7] Ghahramani, Z., and Hinton, G. E. (2000) Neural Compt. 12(4):831-864. [8] Cunningham J. P. et al. (2007), Neural Netw. 22(9):1235-1246. [9] Attias, H. (1999), Proc. 15th Conf. on UAI [10] Beal, M. (2003), Pd. D thesis University College London. [11] Jaakkola, T. S., and Jordan, M. I. (2000)., Stat. and Compt. 10(1): pp. 25-37. [12] Watanabe, K. and Okada, M. (2009) Lecture Notes in Computer Science 5506:655-662. [13] Corduneanu, A. and Bishop, C. M. (2001) Artificial Intelligence and Statistics: 27-34. [14] Fuzisawa, S. et al. (2005), Cerebral Cortex 16(5):639-654. [15] Watanabe, K. et al. (2009), IEICE E92-D(7):1362-1368. [16] Bishop, C. M. (2006), Pattern Recognition and Machine Learning, Springer. [17] Shimazaki, H., and Shinomoto, S. (2007), Neural Coding Abstract :120-123. [18] Richmond, B. J. et al. (1990), J. Neurophysiol. 64(2):351-369. [19] Dimatteo, I., et al. (2001), Biometrika 88(4):1055-1071. [20] Endres, D. et al. (2008), Adv. in NIPS 20:393-340. [21] Maunsell, J. H. and Van Essen, D. C. (1983) J. Neurophysiol. 49(5): 1127-1147. [22] Britten, K. H. et al. (1992), J. Neurosci. 12:4745-4765. [23] Brown, E. N. et al. (2002), Neural Compt. 14(2):325-346. [24] Bair, W. and Koch, C. (1996) Neural Compt. 8(6): 1185-1202. 9
2010
23
3,999
Nonparametric Bayesian Policy Priors for Reinforcement Learning Finale Doshi-Velez, David Wingate, Nicholas Roy and Joshua Tenenbaum Massachusetts Institute of Technology Cambridge, MA 02139 {finale,wingated,nickroy,jbt}@csail.mit.edu Abstract We consider reinforcement learning in partially observable domains where the agent can query an expert for demonstrations. Our nonparametric Bayesian approach combines model knowledge, inferred from expert information and independent exploration, with policy knowledge inferred from expert trajectories. We introduce priors that bias the agent towards models with both simple representations and simple policies, resulting in improved policy and model learning. 1 Introduction We address the reinforcement learning (RL) problem of finding a good policy in an unknown, stochastic, and partially observable domain, given both data from independent exploration and expert demonstrations. The first type of data, from independent exploration, is typically used by model-based RL algorithms [1, 2, 3, 4] to learn the world’s dynamics. These approaches build models to predict observation and reward data given an agent’s actions; the action choices themselves, since they are made by the agent, convey no statistical information about the world. In contrast, imitation and inverse reinforcement learning [5, 6] use expert trajectories to learn reward models. These approaches typically assume that the world’s dynamics is known. We consider cases where we have data from both independent exploration and expert trajectories. Data from independent observation gives direct information about the dynamics, while expert demonstrations show outputs of good policies and thus provide indirect information about the underlying model. Similarly, rewards observed during independent exploration provide indirect information about good policies. Because dynamics and policies are linked through a complex, nonlinear function, leveraging information about both these aspects at once is challenging. However, we show that using both data improves model-building and control performance. We use a Bayesian model-based RL approach to take advantage of both forms of data, applying Bayes rule to write a posterior over models M given data D as p(M|D) ∝p(D|M)p(M). In previous work [7, 8, 9, 10], the model prior p(M) was defined as a distribution directly on the dynamics and rewards models, making it difficult to incorporate expert trajectories. Our main contribution is a new approach to defining this prior: our prior uses the assumption that the expert knew something about the world model when computing his optimal policy. Different forms of these priors lead us to three different learning algorithms: (1) if we know the expert’s planning algorithm, we can sample models from p(M|D), invoke the planner, and weigh models given how likely it is the planner’s policy generated the expert’s data; (2) if, instead of a planning algorithm, we have a policy prior, we can similarly weight world models according to how likely it is that probable policies produced the expert’s data; and (3) we can search directly in the policy space guided by probable models. We focus on reinforcement learning in discrete action and observation spaces. In this domain, one of our key technical contributions is the insight that the Bayesian approach used for building models of transition dynamics can also be used as policy priors, if we exchange the typical role of actions and 1 observations. For example, algorithms for learning partially observable Markov decision processes (POMDPs) build models that output observations and take in actions as exogenous variables. If we reverse their roles, the observations become the exogenous variables, and the model-learning algorithm is exactly equivalent to learning a finite-state controller [11]. By using nonparametric priors [12], our agent can scale the sophistication of its policies and world models based on the data. Our framework has several appealing properties. First, our choices for the policy prior and a world model prior can be viewed as a joint prior which introduces a bias for world models which are both simple and easy to control. This bias is especially beneficial in the case of direct policy search, where it is easier to search directly for good controllers than it is to first construct a complete POMDP model and then plan with it. Our method can also be used with approximately optimal expert data; in these cases the expert data can be used to bias which models are likely but not set hard constraints on the model. For example, in Sec. 4 an application where we extract the essence of a good controller from good—but not optimal—trajectories generated by a randomized planning algorithm. 2 Background A partially observable Markov decision process (POMDP) model M is an n-tuple {S,A,O,T,Ω,R,γ}. S, A, and O are sets of states, actions, and observations. The state transition function T(s′|s, a) defines the distribution over next-states s′ to which the agent may transition after taking action a from state s. The observation function Ω(o|s′, a) is a distribution over observations o that may occur in state s′ after taking action a. The reward function R(s, a) specifies the immediate reward for each state-action pair, while γ ∈[0, 1) is the discount factor. We focus on learning discrete state, observation, and action spaces. Bayesian RL In Bayesian RL, the agent starts with a prior distribution P(M) over possible POMDP models. Given data D from an unknown , the agent can compute a posterior over possible worlds P(M|D) ∝P(D|M)P(M). The model prior can encode both vague notions, such as “favor simpler models,” and strong structural assumptions, such as topological constraints among states. Bayesian nonparametric approaches are well-suited for partially observable environments because they can also infer the dimensionality of the underlying state space. For example, the recent infinite POMDP (iPOMDP) [12] model, built from HDP-HMMs [13, 14], places prior over POMDPs with infinite states but introduces a strong locality bias towards exploring only a few. The decision-theoretic approach to acting in the Bayesian RL setting is to treat the model M as additional hidden state in a larger “model-uncertainty” POMDP and plan in the joint space of models and states. Here, P(M) represents a belief over models. Computing a Bayes-optimal policy is computationally intractable; methods approximate the optimal policy by sampling a single model and following that model’s optimal policy for a fixed period of time [8]; by sampling multiple models and choosing actions based on a vote or stochastic forward search [1, 4, 12, 2]; and by trying to approximate the value function for the full model-uncertainty POMDP analytically [7]. Other approaches [15, 16, 9] try to balance the off-line computation of a good policy (the computational complexity) and the cost of getting data online (the sample complexity). Finite State Controllers Another possibility for choosing actions—including in our partiallyobservable reinforcement learning setting—is to consider a parametric family of policies, and attempt to estimate the optimal policy parameters from data. This is the approach underlying, for example, much work on policy gradients. In this work, we focus on the popular case of a finite-state controller, or FSC [11]. An FSC consists of the n-tuple {N,A,O,π,β}. N, A, and O are sets of nodes, actions, and observations. The node transition function β(n′|n, o) defines the distribution over next-nodes n′ to which the agent may transition after taking action a from node n. The policy function π(a|n) is a distribution over actions that the finite state controller may output in node n. Nodes are discrete; we again focus on discrete observation and action spaces. 3 Nonparametric Bayesian Policy Priors We now describe our framework for combining world models and expert data. Recall that our key assumption is that the expert used knowledge about the underlying world to derive his policy. Fig. 1 2 Figure 1: Two graphical models of expert data generation. Left: the prior only addresses world dynamics and rewards. Right: the prior addresses both world dynamics and controllable policies. shows the two graphical models that summarize our approaches. Let M denote the (unknown) world model. Combined with the world model M, the expert’s policy πe and agent’s policy πa produce the expert’s and agent’s data De and Da. The data consist of a sequence of histories, where a history ht is a sequence of actions a1, · · · , at, observations o1, · · · , ot, and rewards r1, · · · , rt. The agent has access to all histories, but the true world model and optimal policy are hidden. Both graphical models assume that a particular world M is sampled from a prior over POMDPs, gM(M). In what would be the standard application of Bayesian RL with expert data (Fig. 1(a)), the prior gM(M) fully encapsulates our initial belief over world models. An expert, who knows the true world model M, executes a planning algorithm plan(M) to construct an optimal policy πe. The expert then executes the policy to generate expert data De, distributed according to p(De|M, πe), where πe = plan(M). However, the graphical model in Fig. 1(a) does not easily allow us to encode a prior bias toward more controllable world models. In Fig. 1(b), we introduce a new graphical model in which we allow additional parameters in the distribution p(πe). In particular, if we choose a distribution of the form p(πe|M) ∝fM(πe)gπ(πe) (1) where we interpret gπ(πe) as a prior over policies and fM(πe) as a likelihood of a policy given a model. We can write the distribution over world models as p(M) ∝ Z πe fM(πe)gπ(πe)gM(M) (2) If fM(πe) is a delta function on plan(M), then the integral in Eq. 2 reduces to p(M) ∝gπ(πM e )gM(M) (3) where πM e = plan(M), and we see that we have a prior that provides input on both the world’s dynamics and the world’s controllability. For example, if the policy class is the set of finite state controllers as discussed in Sec. 2, the policy prior gπ(πe) might encode preferences for a smaller number of nodes used the policy, while gM(M) might encode preferences for a smaller number of visited states in the world. The function fM(πe) can also be made more general to encode how likely it is that the expert uses the policy πe given world model M. Finally, we note that p(De|M, π) factors as p(Da e |π)p(Do,r e |M), where Da e are the actions in the histories De and Do,r e are the observations and rewards. Therefore, the conditional distribution over world models given data De and Da is: p(M|De, Da) ∝p(Do,r e , Da|M)gM(M) Z πe p(Da e |πe)gπ(πe)fM(πe) (4) The model in Fig. 1(a) corresponds to setting a uniform prior on gπ(πe). Similarly, the conditional distribution over policies given data De and Da is p(πe|De, Da) ∝gπ(πe)p(Da e |πe) Z M fM(πe)p(Do,r e , Da|M)gM(M) (5) We next describe three inference approaches for using Eqs. 4 and 5 to learn. 3 #1: Uniform Policy Priors (Bayesian RL with Expert Data). If fM(πe) = δ(plan(M)) and we believe that all policies are equally likely (graphical model 1(a)), then we can leverage the expert’s data by simply considering how well that world model’s policy plan(M) matches the expert’s actions for a particular world model M. Eq. 4 allows us to compute a posterior over world models that accounts for the quality of this match. We can then use that posterior as part of a planner by using it to evaluate candidate actions. The expected value of an action1 q(a) with respect to this posterior is given by: E [q(a)] = Z M q(a|M)p(M|Do,r e , Da) = Z M q(a|M)p(Do,r e , Da|M)gM(M)p(Da e |plan(M)) (6) We assume that we can draw samples from p(M|Do,r e , Da) ∝p(Do,r e , Da|M)gM(M), a common assumption in Bayesian RL [12, 9]; for our iPOMDP-based case, we can draw these samples using the beam sampler of [17]. We then weight those samples by p(Da e |πe), where πe = plan(M), to yield the importance-weighted estimator E [q(a)] ≈ X i q(a|Mi)p(Da e |Mi, πe), Mi ∼p(M|Do,r e , Da). Finally, we can also sample values for q(a) by first sampling a world model given the importanceweighted distribution above and recording the q(a) value associated with that model. #2: Policy Priors with Model-based Inference. The uniform policy prior implied by standard Bayesian RL does not allow us to encode prior biases about the policy. With a more general prior (graphical model 1(b) in Fig. 1), the expectation in Eq. 6 becomes E [q(a)] = Z M q(a|M)p(Do,r e , Da|M)gM(M)gπ(plan(M))p(Da e |plan(M)) (7) where we still assume that the expert uses an optimal policy, that is, fM(πe) = δ(plan(M)). Using Eq. 7 can result in somewhat brittle and computationally intensive inference, however, as we must compute πe for each sampled world model M. It also assumes that the expert used the optimal policy, whereas a more realistic assumption might be that the expert uses a near-optimal policy. We now discuss an alternative that relaxes fM(πe) = δ(plan(M)): let fM(πe) be a function that prefers policies that achieve higher rewards in world model M: fM(πe) ∝exp {V (πe|M)}, where V (πe|M) is the value of the policy πe on world M; indicating a belief that the expert tends to sample policies that yield high value. Substituting this fM(πe) into Eq. 4, the expected value of an action is E [q(a)] = Z M,πe q(a|M)p(Da e |πe) exp {V (πe|M)} gπ(πe)p(Do,r e , Da|M)gM(M) We again assume that we can draw samples from p(M|Do,r e , Da) ∝p(Do,r e , Da|M)gM(M), and additionally assume that we can draw samples from p(πe|Da e ) ∝p(Da e |πe)gπ(πe), yielding: E [q(a)] ≈ X i q(a|Mi) X j exp  V (πej|Mi) , Mi ∼p(M|Do,r e , Da), πej ∼p(πe|Da e ) (8) As in the case with standard Bayesian RL, we can also use our weighted world models to draw samples from q(a). #3: Policy Priors with Joint Model-Policy Inference. While the model-based inference for policy priors is correct, using importance weights often suffers when the proposal distribution is not near the true posterior. In particular, sampling world models and policies—both very high dimensional objects—from distributions that ignore large parts of the evidence means that large numbers of samples may be needed to get accurate estimates. We now describe an inference approach that alternates sampling models and policies that both avoids importance sampling and can be used even 1We omit the belief over world states b(s) from the equations that follow for clarity; all references to q(a|M) are q(a|bM(s), M). 4 in cases where fM(πe) = δ(plan(M)). Once we have a set of sampled models we can compute the expectation E[q(a)] simply as the average over the action values q(a|Mi) for each sampled model. The inference proceeds in two alternating stages: first, we sample a new policy given a sampled model. Given a world model, Eq. 5 becomes p(πe|De, Da, M) ∝gπ(πe)p(Da e |πe)fM(πe) (9) where making gπ(πe) and p(Da e |πe) conjugate is generally an easy design choice—for example, in Sec. 3.1, we use the iPOMDP [12] as a conjugate prior over policies encoded as finite state controllers. We then approximate fM(πe) with a function in the same conjugate family: in the case of the iPOMDP prior and count data Da e , we also approximate fM with a set of Dirichlet counts scaled by some temperature parameter a. As a is increased, we recover the desired fM(πe) = δ(plan(M)); the initial approximation speeds up the inference and does not affect its correctness. Next we sample a new world model given the policy. Given a policy, Eq. 4 reduces to p(M|De, Da) ∝p(Do,r e , Da|M)gM(M)fM(πe). (10) We apply a Metropolis-Hastings (MH) step to sample new world models, drawing a new model M ′ from p(Do,r e , Da|M)gM(M) and accepting it with ratio fM′(πe) fM(πe) . If fM(πe) is highly peaked, then this ratio is likely to be ill-defined; as when sampling policies, we apply a tempering scheme in the inference to smooth fM(πe). For example, if we desired fM(πe) = δ(plan(M)), then we could use smoothed version ˆ fM(πe) ∝exp(a·(V (πe|M)−V (πM e |M))2), where b is a temperature parameter for the inference. While applying MH can suffer from the same issues as the importance sampling in the model-based approach, Gibbs sampling new policies removes one set of proposal distributions from the inference, resulting in better estimates with fewer samples. 3.1 Priors over State Controller Policies We now turn to the definition of the policy prior p(πe). In theory, any policy prior can be used, but there are some practical considerations. Mathematically, the policy prior serves as a regularizer to avoid overfitting the expert data, so it should encode a preference toward simple policies. It should also allow computationally tractable sampling from the posterior p(πe|De) ∝p(De|πe)p(πe). In discrete domains, one choice for the policy prior (as well as the model prior) is the iPOMDP [12]. To use the iPOMDP as a model prior (its intended use), we treat actions as inputs and observations as outputs. The iPOMDP posits that there are an infinite number of states s but a few popular states are visited most of the time; the beam sampler [17] can efficiently draw samples of state transition, observation, and reward models for visited states. Joint inference over the model parameters T, Ω, R and the state sequence s allows us to infer the number of visited states from the data. To use the iPOMDP as a policy prior, we simply reverse the roles of actions and observations, treating the observations as inputs and the actions as outputs. Now, the iPOMDP posits that there is a state controller with an infinite number of nodes n, but probable polices use only a small subset of the nodes a majority of the time. We perform joint inference over the node transition and policy parameters β and π as well as the visited nodes n. The ‘policy state’ representation learned is not the world state, rather it is a summary of previous observations which is sufficient to predict actions. Assuming that the training action sequences are drawn from the optimal policy, the learner will learn just enough “policy state” to control the system optimally. As in the model prior application, using the iPOMDP as a policy prior biases the agent towards simpler policies—those that visit fewer nodes—but allows the number of nodes to grow as with new expert experience. 3.2 Consistency and Correctness In all three inference approaches, the sampled models and policies are an unbiased representation of the true posterior and are consistent in that in the limit of infinite samples, we will recover the true model and policy posteriors conditioned on their respective data Da, Do,r e and Da e . There are some mild conditions on the world and policy priors to ensure consistency: since the policy prior and model prior are specified independently, we require that there exist models for which both the policy prior and model prior are non-zero in the limit of data. Formally, we also require that the expert provide optimal trajectories; in practice, we see that this assumption can be relaxed. 5 0 1000 2000 3000 −1000 0 1000 2000 3000 4000 Rewards for Multicolored Gridworld Cumulative Reward Iterations of Experience iPOMDP Inference #1 Inference #2 Inference #3 0 1000 2000 3000 4000 5000 6000 7000 8000 0 20 40 60 80 100 120 Rewards for Snakes Cumulative Reward Iterations of Experience iPOMDP Approach 1 Approach 2 Approach 3 Figure 2: Learning curves for the multicolored gridworld (left) and snake (right). Error bars are 95% confidence intervals of the mean. On the far right is the snake robot. 3.3 Planning with Distributions over Policies and Models All the approaches in Sec. 3 output samples of models or policies to be used for planning. As noted in Section 2, computing the Bayes optimal action is typically intractable. Following similar work [4, 1, 2, 12], we interpret these samples as beliefs. In the model-based approaches, we first solve each model (all of which are generally small) using standard POMDP planners. During the testing phase, the internal belief state of the models (in the model-based approaches) or the internal node state of the policies (in the policy-based approaches), is updated after each action-observation pair. Models are also reweighted using standard importance weights so that they continue to be an unbiased approximation of the true belief. Actions are chosen by first selecting, depending on the approach, a model or policy based on their weights, and then performing its most preferred action. While this approach is clearly approximate (it considers state uncertainty but not model uncertainty), we found empirically that this simple, fast approach to action selection produced nearly identical results to the much slower (but asymptotically Bayes optimal) stochastic forward search in [12].2 4 Experiments We first describe a pair of demonstrations that show two important properties of using policy priors: (1) that policy priors can be useful even in the absence of expert data and (2) that our approach works even when the expert trajectories are not optimal. We then compare policy priors with the basic iPOMDP [12] and finite-state model learner trained with EM on several standard problems. In all cases, the tasks were episodic. Since episodes could be of variable length—specifically, experts generally completed the task in fewer iterations—we allowed each approach N = 2500 iterations, or interactions with the world, during each learning trial. The agent was provided with an expert trajectory with probability .5 n N , where n was the current amount of experience. No expert trajectories were provided in the last quarter of the iterations. We ran each approach for 10 learning trials. Models and policies were updated every 100 iterations, and each episode was capped at 50 iterations (though it could be shorter, if the task was achieved in fewer iterations). Following each update, we ran 50 test episodes (not included in the agent’s experience) with the new models and policies to empirically evaluate the current value of the agents’ policy. For all of the nonparametric approaches, 50 samples were collected, 10 iterations apart, after a burn-in of 500 iterations. Sampled models were solved using 25 backups of PBVI [18] with 500 sampled beliefs. One iteration of bounded policy iteration [19] was performed per sampled model. The finite-state learner was trained using min(25, |S|), where |S| was the true number of underlying states. Both the nonparametric and finite learners were trained from scratch during each update; we found empirically that starting from random points made the learner more robust than starting it at potentially poor local optima. Policy Priors with No Expert Data The combined policy and model prior can be used to encode a prior bias towards models with simpler control policies. This interpretation of policy priors can 2We suspect that the reason the two planning approaches yield similar results is that the stochastic forward search never goes deep enough to discover the value of learning the model and thus acts equivalently to our sampling-based approach, which only considers the value of learning more about the underlying state. 6 be useful even without expert data: the left pane of Fig. 2 shows the performance of the policy prior-biased approaches and the standard iPOMDP on a gridworld problem in which observations correspond to both the adjacent walls (relevant for planning) and the color of the square (not relevant for planning). This domain has 26 states, 4 colors, standard NSEW actions, and an 80% chance of a successful action. The optimal policy for this gridworld was simple: go east until the agent hits a wall, then go south. However, the varied observations made the iPOMDP infer many underlying states, none of which it could train well, and these models also confused the policy-inference in Approach 3. Without expert data, Approach 1 cannot do better than iPOMDP. By biasing the agent towards worlds that admit simpler policies, the model-based inference with policy priors (Approach 2) creates a faster learner. Policy Priors with Imperfect Experts While we focused on optimal expert data, in practice policy priors can be applied even if the expert is imperfect. Fig. 2(b) shows learning curves for a simulated snake manipulation problem with a 40-dimensional continuous state space, corresponding to (x,y) positions and velocities of 10 body segments. Actions are 9-dimensional continuous vectors, corresponding to desired joint angles between segments. The snake is rewarded based on the distance it travels along a twisty linear “maze,” encouraging it to wiggle forward and turn corners. We generated expert data by first deriving 16 motor primitives for the action space using a clustering technique on a near-optimal trajectory produced by a rapidly-exploring random tree (RRT). A reasonable—but not optimal—controller was then designed using alternative policy-learning techniques on the action space of motor primitives. Trajectories from this controller were treated as expert data for our policy prior model. Although the trajectories and primitives are suboptimal, Fig. 2(b) shows that knowledge of feasible solutions boosts performance when using the policybased technique. Tests on Standard Problems We also tested the approaches on ten problems: tiger [20] (2 states), network [20] (7 states), shuttle [21] (8 states), an adapted version of gridworld [20] (26 states), an adapted version of follow [2] (26 states) hallway [20] (57 states), beach (100 states), rocksample(4,4) [22] (257 states), tag [18] (870 states), and image-search (16321 states). In the beach problem, the agent needed to track a beach ball on a 2D grid. The image-search problem involved identifying a unique pixel in an 8x8 grid with three type of filters with varying cost and scales. We compared our inference approaches with two approaches that did not leverage the expert data: expectation-maximization (EM) used to learn a finite world model of the correct size and the infinite POMDP [12], which placed the same nonparametric prior over world models as we did. 0 1000 2000 3000 −2500 −2000 −1500 −1000 −500 0 Rewards for tiger Cumulative Reward iPOMDP Inference #1 Inference #2 Inference #3 EM 0 1000 2000 3000 4000 −1.5 −1 −0.5 0 0.5 1 1.5 x 10 4 Rewards for network 0 1000 2000 −100 −50 0 50 100 Rewards for shuttle 0 1000 2000 3000 −6000 −5000 −4000 −3000 −2000 −1000 0 Rewards for follow 0 1000 2000 3000 −2500 −2000 −1500 −1000 −500 0 500 Rewards for gridworld 0 1000 2000 3000 −2 0 2 4 6 8 Rewards for hallway Cumulative Reward Iterations of Experience 0 1000 2000 3000 0 50 100 150 200 250 Rewards for beach Iterations of Experience 0 1000 2000 3000 4000 −3000 −2500 −2000 −1500 −1000 −500 0 Rewards for rocksample Iterations of Experience 0 1000 2000 3000 4000 5000 −15000 −10000 −5000 0 Rewards for tag Iterations of Experience 0 1000 2000 3000 4000 −6000 −5000 −4000 −3000 −2000 −1000 0 Rewards for image Iterations of Experience Figure 3: Performance on several standard problems, with 95% confidence intervals of the mean. 7 Fig. 3 shows the learning curves for our policy priors approaches (problems ordered by state space size); the cumulative rewards and final values are shown in Table 1. As expected, approaches that leverage expert trajectories generally perform better than those that ignore the near-optimality of the expert data. The policy-based approach is successful even among the larger problems. Here, even though the inferred state spaces could grow large, policies remained relatively simple. The optimization used in the policy-based approach—recall we use the stochastic search to find a probable policy—was also key to producing reasonable policies with limited computation. Cumulative Reward Final Reward iPOMDP App. 1 App. 2 App. 3 EM iPOMDP App. 1 App. 2 App. 3 EM tiger -2.2e3 -1.4e3 -5.3e2 -2.2e2 -3.0e3 -2.0e1 -1.0e1 -2.3 1.6 -2.0e1 network -1.5e4 -6.3e3 -2.1e3 1.9e4 -2.6e3 -1.1e1 -1.2e1 -4.0e-1 1.1e1 -4.7 shuttle -5.3e1 7.9e1 1.5e2 5.1e1 0.0 1.7e-1 3.3e-1 6.5e-1 8.6e-1 0.0 follow -6.3e3 -2.3e3 -1.9e3 -1.6e3 -5.0e3 -5.9 -3.1 -1.4 -1.1 -5.0 gridworld -2.0e3 -6.2e2 -7.0e2 4.6e2 -3.7e3 -1.3 5.3e-1 1.8 2.3 -2.1 hallway 2.0e-1 1.4 1.6 6.6 0.0 8.6e-4 7.4e-3 1.4e-2 1.9e-2 0.0 beach 1.9e2 1.4e2 1.8e2 1.9e2 3.5e2 2.0e-1 1.1e-1 1.4e-1 2.7e-1 3.4e-1 rocksample -3.2e3 -1.7e3 -1.8e3 -1.0e3 -3.5e3 -1.6 -5.3e-1 -1.3 1.2 -2.0 tag -1.6e4 -6.9e3 -7.4e3 -3.5e3 -9.4 -2.8 -4.1 -1.7 -9.1 image -7.8e3 -5.3e3 -6.1e3 -3.9e3 -5.0 -3.6 -4.2 1.3e1 -5.0 Table 1: Cumulative and final rewards on several problems. Bold values highlight best performers. 5 Discussion and Related Work Several Bayesian approaches have been developed for RL in partially observable domains. These include [7], which uses a set of Gaussian approximations to allow for analytic value function updates in the POMDP space; [2], which jointly reasons over the space of Dirichlet parameters and states when planning in discrete POMDPs, and [12], which samples models from a nonparametric prior. Both [1, 4] describe how expert data augment learning. The first [1] lets the agent to query a state oracle during the learning process. The computational benefit of a state oracle is that the information can be used to directly update a prior over models. However, in large or complex domains, the agent’s state might be difficult to define. In contrast, [4] lets the agent query an expert for optimal actions. While policy information may be much easier to specify—incorporating the result of a single query into the prior over models is challenging; the particle-filtering approach of [4] can be brittle as model-spaces grow large. Our policy priors approach uses entire trajectories; by learning policies rather than single actions, we can generalize better and evaluate models more holistically. By working with models and policies, rather than just models as in [4], we can also consider larger problems which still have simple policies. Targeted criteria for asking for expert trajectories, especially one with performance guarantees such as [4], would be an interesting extension to our approach. 6 Conclusion We addressed a key gap in the learning-by-demonstration literature: learning from both expert and agent data in a partially observable setting. Prior work used expert data in MDP and imitationlearning cases, but less work exists for the general POMDP case. Our Bayesian approach combined priors over the world models and policies, connecting information about world dynamics and expert trajectories. Taken together, these priors are a new way to think about specifying priors over models: instead of simply putting a prior over the dynamics, our prior provides a bias towards models with simple dynamics and simple optimal policies. We show with our approach expert data never reduces performance, and our extra bias towards controllability improves performance even without expert data. Our policy priors over nonparametric finite state controllers were relatively simple; classes of priors to address more problems is an interesting direction for future work. 8 References [1] R. Jaulmes, J. Pineau, and D. Precup. Learning in non-stationary partially observable Markov decision processes. ECML Workshop, 2005. [2] Stephane Ross, Brahim Chaib-draa, and Joelle Pineau. Bayes-adaptive POMDPs. In Neural Information Processing Systems (NIPS), 2008. [3] Stephane Ross, Brahim Chaib-draa, and Joelle Pineau. Bayesian reinforcement learning in continuous POMDPs with application to robot navigation. In ICRA, 2008. [4] Finale Doshi, Joelle Pineau, and Nicholas Roy. Reinforcement learning with limited reinforcement: Using Bayes risk for active learning in POMDPs. In International Conference on Machine Learning, volume 25, 2008. [5] Pieter Abbeel, Morgan Quigley, and Andrew Y. Ng. Using inaccurate models in reinforcement learning. In In International Conference on Machine Learning (ICML) Pittsburgh, pages 1–8. ACM Press, 2006. [6] Nathan Ratliff, Brian Ziebart, Kevin Peterson, J. Andrew Bagnell, Martial Hebert, Anind K. Dey, and Siddhartha Srinivasa. Inverse optimal heuristic control for imitation learning. In Proc. AISTATS, pages 424–431, 2009. [7] P. Poupart and N. Vlassis. Model-based Bayesian reinforcement learning in partially observable domains. In ISAIM, 2008. [8] M. Strens. A Bayesian framework for reinforcement learning. In ICML, 2000. [9] John Asmuth, Lihong Li, Michael Littman, Ali Nouri, and David Wingate. A Bayesian sampling approach to exploration in reinforcement learning. In Uncertainty in Artificial Intelligence (UAI), 2009. [10] R. Dearden, N. Friedman, and D. Andre. Model based Bayesian exploration. pages 150–159, 1999. [11] E. J. Sondik. The Optimial Control of Partially Observable Markov Processes. PhD thesis, Stanford University, 1971. [12] Finale Doshi-Velez. The infinite partially observable Markov decision process. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 477–485. 2009. [13] Matthew J. Beal, Zoubin Ghahramani, and Carl E. Rasmussen. The infinite hidden Markov model. In Machine Learning, pages 29–245. MIT Press, 2002. [14] Yee Whye Teh, Michael I. Jordan, Matthew J. Beal, and David M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101:1566–1581, 2006. [15] Tao Wang, Daniel Lizotte, Michael Bowling, and Dale Schuurmans. Bayesian sparse sampling for on-line reward optimization. In International Conference on Machine Learning (ICML), 2005. [16] J. Zico Kolter and Andrew Ng. Near-Bayesian exploration in polynomial time. In International Conference on Machine Learning (ICML), 2009. [17] J. van Gael, Y. Saatci, Y. W. Teh, and Z. Ghahramani. Beam sampling for the infinite hidden Markov model. In ICML, volume 25, 2008. [18] J. Pineau, G. Gordon, and S. Thrun. Point-based value iteration: An anytime algorithm for POMDPs. IJCAI, 2003. [19] Pascal Poupart and Craig Boutilier. Bounded finite state controllers. In Neural Information Processing Systems, 2003. [20] M. L. Littman, A. R. Cassandra, and L. P. Kaelbling. Learning policies for partially observable environments: scaling up. ICML, 1995. [21] Lonnie Chrisman. Reinforcement learning with perceptual aliasing: The perceptual distinctions approach. In In Proceedings of the Tenth National Conference on Artificial Intelligence, pages 183–188. AAAI Press, 1992. [22] T. Smith and R. Simmons. Heuristic search value iteration for POMDPs. In Proc. of UAI 2004, Banff, Alberta, 2004. 9
2010
230