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,800
No evidence for active sparsification in the visual cortex Pietro Berkes, Benjamin L. White, and J´ozsef Fiser Volen Center for Complex Systems Brandeis University, Waltham, MA 02454 Abstract The proposal that cortical activity in the visual cortex is optimized for sparse neural activity is one of the most established ideas in computational neuroscience. However, direct experimental evidence for optimal sparse coding remains inconclusive, mostly due to the lack of reference values on which to judge the measured sparseness. Here we analyze neural responses to natural movies in the primary visual cortex of ferrets at different stages of development and of rats while awake and under different levels of anesthesia. In contrast with prediction from a sparse coding model, our data shows that population and lifetime sparseness decrease with visual experience, and increase from the awake to anesthetized state. These results suggest that the representation in the primary visual cortex is not actively optimized to maximize sparseness. 1 Introduction It is widely believed that one of the main principles underlying functional organization of the early visual system is the reduction of the redundancy of relayed input from the retina. Such a transformation would form an optimally efficient code, in the sense that the amount of information transmitted to higher visual areas would be maximal. Sparse coding refers to a possible implementation of this general principle, whereby each stimulus is encoded by a small subset of neurons. This would allow the visual system to transmit information efficiently and with a small number of spikes, improving the signal-to-noise ratio, reducing the energy cost of encoding, improving the detection of “suspicious coincidences”, and increasing storage capacity in associative memories [1, 2]. Computational models that optimize the sparseness of the responses of hidden units to natural images have been shown to reproduce the basic features of the receptive fields (RFs) of simple cells in V1 [3, 4, 5]. Moreover, manipulation of the statistics of the environment of developing animals leads to changes in the RF structure that can be predicted by sparse coding models [6]. Unfortunately, attempts to verify this principle experimentally have so far remained inconclusive. Electrophysiological studies performed in primary visual cortex agree in reporting high sparseness values for neural activity [7, 8, 9, 10, 11, 12]. However, it is contested whether the high degree of sparseness is due to a neural representation which is optimally sparse, or is an epiphenomenon due to neural selectivity [10, 12]. This controversy is mostly due to a lack of reference measurement with which to judge the sparseness of the neural representation in relative, rather than absolute terms. Another problem is that most of these studies have been performed on anesthetized animals [7, 9, 10, 11, 12], even though the effect of anesthesia might bias sparseness measurements (cf. Sec. 6). In this paper, we report results from electrophysiological recordings from primary visual cortex (V1) of ferrets at various stages of development, from eye opening to adulthood, and of rats at different levels of anesthesia, from awake to deeply anesthetized, with the goal of testing the optimality of the neural code by studying changes in sparseness under different conditions. We compare this data 1 with theoretical predictions: 1) sparseness should increase with visual experience, and thus with age, as the visual system adapts to the statistics of the visual environment; 2) sparseness should be maximal in the “working regime” of the animal, i.e. for alert animals, and decrease with deeper levels of anesthesia. In both cases, the neural data shows a trend opposite to the one expected in a sparse coding system, suggesting that the visual system is not actively optimizing the sparseness of its representation. The paper is organized as follows: We first introduce and discuss the lifetime and population sparseness measures we will be using throughout the paper. Next, we present the classical, linear sparse coding model of natural images, and derive an equivalent, stochastic neural network, whose output firing rates correspond to Monte Carlo samples from the posterior distribution of visual elements given an image. In the rest of the paper, we make use of this neural architecture in order to predict changes in sparseness over development and under anesthesia, and compare these predictions with electrophysiological recordings. 2 Lifetime and population sparseness The diverse benefits of sparseness mentioned in the introduction rely on different aspects of the neural code, which are captured to a different extent by two sparseness measures, referred to as lifetime and population sparseness. Lifetime sparseness measures the distribution of the response of an individual cell to a set of stimuli, and is thus related to the cell’s selectivity. This quantity characterizes the energy costs of coding with a set of neurons. On the other hand, the assessment of coding efficiency, as used by Treves and Rolls [13], is based upon the assumption that different stimuli activate small, distinct subsets of cells. These requirements of efficient coding are based upon the instantaneous population activity to stimuli and need to take into consideration the population sparseness of neural response. Average lifetime and population sparseness are identical if the units are statistically independent, in which case the distribution is called ergodic [10, 14]. In practice, neural dependencies (Fig. 3C) and residual dependencies in models [15] cause the two measures to be different. Here we will use three measures of sparseness, two quantifying population sparseness, and one lifetime sparseness. To make a comparison with previous studies easier, we computed population and lifetime sparseness using a common measure introduced by Treves and Rolls [13] and perfected by Vinje and Gallant [8]: TR =  1 − PN i=1 |ri|/N 2 PN i=1 r2 i /N   , (1 −1/N) , (1) where ri represents firing rates, and i indexes time in the case of lifetime sparseness, and neurons for population sparseness. TR is defined between zero (less sparse) and one (more sparse), and depends on the shape of the distribution. For monotonic, non-negative distributions, such as that of firing rates, an exponential decay corresponds to TR = 0.5, and values smaller and larger than 0.5 indicate distributions with lighter and heavier tails, respectively [14]. For population sparseness, we rescale the firing rate distribution by their standard deviation in time for the modelling results, and by qPT t=1 r2 t /T for experimental data, as firing rate is non-negative. Moreover, in neural recordings we discard bins with no neural activity, as population TR is undefined in this case. TR does not depend on multiplicative changes firing rate, since it is invariant to rescaling the rates by a constant factor. However, it is not invariant to additive firing rate changes. This seems to be adequate for our purposes, as the arguments for sparseness involve metabolic costs and coding arguments like redundancy reduction that are sensitive to overall firing rates. Previous studies have shown that alternative measures of population and lifetime sparseness are highly correlated, therefore our choice does not affect the final results [15, 10]. We also report a second measure of population sparseness known as activity sparseness (AS), which is a direct translation of the definition of sparse codes as having a small number of neurons active at any time [15]: AS = 1 −nt/N , (2) 2 Figure 1: Generative weights of the sparse coding model at the beginning (A) and end (B) of learning. where nt is defined as the number of neurons with activity larger than a given threshold at time t, and N is the number of units. AS = 1 means that no neuron was active above the threshold, while AS = 0 means that all of all neurons were active. The threshold is set to be one standard deviation for the modeling results, or equivalently the upper 68th percentile of the distribution for neural firing rates. AS gives a very intuitive account of population sparseness, and is invariant to both multiplicative and additive changes in firing rate. However, since it discards most of the information about the shape of the distribution, it is a less sensitive measure than TR. 3 Sparse coding model The sparseness assumption that natural scenes can be described by a small number of elements is generally translated in a model with sparsely distributed hidden units xk, representing visual elements, that combine linearly to form an image y [3]: p(xk) = psparse(xk) ∝exp(f(xk)) , k = 1, . . . , K (3) p(y|x) = Normal(y; Gx, σ2 y) , (4) where K is the number of hidden units, G is the mixing matrix (also called the generative weights) and σ2 y is the variance of the input noise. Here we set the sparse prior distribution to a Student-t distribution with α degrees of freedom, p(xk) = 1 Z  1 + 1 α xk λ 2−α+1 2 , (5) with λ chosen such that the distribution has unit variance. This is a common prior for sparse coding models [3], and its analytical form allows the development of efficient inference and learning algorithms [16, 17]. The goal of learning is to adapt the model’s parameters in order to best explain the observed data, i.e., to maximize the marginal likelihood X t log p(yt|G) = X t Z log p(yt|x, G)p(x)dx (6) with respect to G. We learn the weights using a Variational Expectation Maximization (VEM) algorithm, as described by Berkes et al. [17], with the difference that the generative weights are not treated as random variables, but as parameters with norm fixed to 1, in order to avoid potential confounds in successive analysis. The model was applied to 9 × 9 pixel natural image patches, randomly chosen from 36 natural images from the van Hateren database, preprocessed as described in [5]. The dimensionality of the patches was reduced to 36 and the variances normalized by Principal Component Analysis. The model parameters were chosen to be K = 48 and α = 2.5, a very sparse, slightly overcomplete representation. These parameters are very close to the ones that were found to be optimal for natural images [17]. The input noise was fixed to σ2 y = 0.08. The generative weights were initialized at random, with norm 1. We performed 1500 iterations of the VEM algorithm, using a new batch of 3600 patches at each iteration. Fig. 1 shows the generative weights at the start and at the end of learning. As expected from previous studies [3, 5], after learning the basis vectors are shaped like Gabor wavelets and resemble simple cell RFs. 3 Figure 2: Neural implementation of Gibbs sampling in a sparse coding model. A) Neural network architecture. B) Mode of the activation probability of a neuron as a function of the total (feed-forward and recurrent) input, for a Student-t prior with α = 2.05 and unit variance. 4 Sampling, sparse coding neural network In order to gain some intuition about the neural operations that may underlie inference in this model, we derive an equivalent neural network architecture. It has been suggested that neural activity is best interpreted as samples from the posterior probability of an internal, probabilistic model of the sensory input. This assumption is consistent with many experimental observations, including high trial-by-trial variability and spontaneous activity in awake animals [18, 19, 20]. Moreover, sampling can be performed in parallel and asynchronously, making it suitable for a neural architecture. Assuming that neural activity corresponds to Gibbs sampling from the posterior probability over visual elements in the sparse coding model, we obtain the following expression for the distribution of the firing rate of a neuron, given a visual stimulus and the current state of the other neurons representing the image [18]: p(xk|xi̸=k, y) ∝p(y|x)p(xk) (7) ∝exp  −1 2σ2y (yT y −2yT Gx −xT Rx) + f(xk)  , (8) where R = −GT G. Expanding the exponent, eliminating the terms that do not depend on xk, and noting that Rkk = −1, since the generative weights have unit norm, we get p(xk|xi̸=k, y) ∝exp  1 σ2y ( X i Gikyi)xk + 1 σ2y ( X j̸=k Rjkxj)xk − 1 2σ2y x2 k + f(xk)  . (9) Sampling in a sparse coding model can thus be achieved by a simple neural network, where the k-th neuron integrates visual information through feed–forward connections from input yi with weights Gik/σ2 y, and information from other neurons via recurrent connections Rjk/σ2 y (Fig. 2A). Neural activity is then generated stochastically according to Eq. 9: The exponential activation function gives higher probability to higher rates with increasing input to the neuron, while the terms depending on x2 k and f(xk) penalize large firing rates. Fig. 2B shows the mode of the activation probability (Eq. 9) as a function of the total input to a neuron. 5 Active sparsification over learning A simple, intuitive prediction for a system that optimizes for sparseness is that the sparseness of its representation should increase over learning. Since a sparse coding system, including our model, might not directly maximize our measures of sparseness, TR and AS, we verify this intuition by analyzing the model’s representation of images at various stages of learning. We selected at random a new set of 1800 patches to be used as test stimuli. For every patch, we collected 50 Monte Carlo samples, using Gibbs sampling (Eq. 9) combined with an annealing scheme that starts by drawing samples from the model’s prior distribution and continues to sample as the prior is deformed into the posterior [21]. This procedure ensures that the final samples come from the whole posterior distribution, which is highly multimodal in overcomplete models, and therefore that our analysis is not 4 Figure 3: Development of sparseness, (A) over learning for the sparse coding model of natural images and (B) over age for neural responses in ferrets. (A) The lines indicate the average sparseness over units and samples. Error bars are one standard deviation over samples. Since the three measures have very different values, we report the change in sparseness in percent of the first iteration. Colored text: absolute values of sparseness at the end of learning. (B) The lines indicate the average sparseness for different animals. Error bars represent standard error of the mean (SEM). (C) KL divergence between the distribution of neural responses and the factorized distribution of neural responses. Error bars are SEM. biased by the posterior distribution becoming more (or less) complex over learning. Fig. 3A shows the evolution of sparseness with learning. As anticipated, both population and lifetime sparseness increase monotonically. Having confirmed our intuition with the sparse coding model, we turn to data from electrophysiological recordings. We analyzed multi-unit recordings from arrays of 16 electrodes implanted in the primary visual cortex of 15 ferrets at various stages of development, from eye opening at postnatal day 29 or 30 (P29-30) to adulthood at P151 (see Suppl Mat for experimental details). Over this maturation period, the visual system of ferrets adapts to the statistics of the environment [22, 23]. For each animal, neural activity was recorded and collected in 10 ms bins for 15 sessions of 100 seconds each (for a total of 25 minutes), during which the animal was shown scenes from a movie. We find that all three measures of sparseness decrease significantly with age1. Thus, during a period when the cortex actively adapts to the visual environment, the representation in primary visual cortex becomes less sparse, suggesting that the optimization of sparseness is not a primary objective for learning in the visual system. The decrease in population sparseness seems to be due to an increase in the dependencies between neurons: Fig. 3C shows the Kullback-Leibler divergence between the joint distribution P of neural activity in 2 ms bins and the same distribution, factorized to eliminate neural dependencies, i.e., ˜P(r1, . . . rN) := QN i=1 P(ri). The KL divergence increases with age (Spearman’s ρ = 0.73, P < 0.01), indicating an increase in neural dependencies. 6 Active sparsification and anesthesia The sparse coding neural network architecture of Fig. 2 makes explicit that an optimal sparse coding representation requires a process of active sparsification: In general, because of input noise and the overcompleteness of the representation, there are multiple possible combinations of visual elements that could account for a given image. To select among these combinations the most sparse solution, a competition between possible alternative interpretations must occur. Consider for example a simple system with one input variable and two hidden units, such that y = x1 + 1.3 · x2 + ϵ, with Gaussian noise ϵ. Given an observed value, y, there are infinitely many solutions to this equality, as shown by the dotted line in Fig. 4B for y = 2. These stimulus–induced correlations in the posterior are known as explaining away. Among all the solutions, the ones compatible with the sparse prior over x1 and x2 are given higher probability, giving raise to a bimodal 1Lifetime sparseness, TR: effect of age is significant, Spearman’s ρ = −0.65, P < 0.01; differences in mean between the four age groups in Fig. 3 are significant, ANOVA, P = 0.02, multiple comparison tests with Tukey-Kramer correction shows the mean of group P29-30 is different from that of groups P83-92 and P129151 with P < 0.05; Population sparseness, TR: Spearman’s ρ = −0.75, P < 0.01; ANOVA P < 0.01, multiple comparison shows the mean of group P29-30 is different from that of group P129-151 with P < 0.05; Activity sparseness, AS: Spearman’s ρ = −0.79, P < 0.01; ANOVA P < 0.01, multiple comparison shows the mean of group P29-30 is different from that of groups P83-92 and P129-151 with P < 0.05. 5 Figure 4: Active sparsification. Contour lines correspond to the 5, 25, 50, 75, 90, and 95 percentile of the distributions. A) Prior probability. B) Posterior probability given observed value y = 2. The dotted line indicates all solutions to 2 = x1+1.3·x2. C) Posterior probability with weakened recurrent weights (α = 0.5). Figure 5: Active sparsification and anesthesia. A) Percent change in sparseness as the recurrent connections are weakened for various values of α. Error bars are one standard deviation over samples. Colored text: absolute values of sparseness at the end of learning. B) Average sparseness measures for V1 responses at various levels of anesthesia. Error bars are SEM. distribution centered around the two sparse solutions x1 = 0, x2 = 1.54, and x1 = 2, x2 = 0. From Eq. 9, it is clear that the recurrent connections are necessary in order to keep the activity of the neurons on the solution line, while the stochastic activation function makes sparse neural responses more likely. This active sparsification process is stronger for overcomplete representations, for when the generative weights are non-orthogonal (in which cases |rij| ≫0), and for when the input noise is large, which makes the contribution from the prior more important. In a system that optimizes sparseness, disrupting the active sparsification process will lead to lower lifetime and population sparseness. For example, if we reduce the strength of the recurrent connections in the neural network architecture (Eq. 9) by a factor α, p(xk|xi̸=k, y) ∝exp  1 σ2y ( X i Gikyi)xk + 1 σ2y α( X j̸=k Rjkxj)xk − 1 2σ2y x2 k + f(xk)  , (10) the neurons become more decoupled, and try to separately account for the input, as illustrated in Fig. 4C. The decoupling will result in a reduction of population sparseness, as multiple neurons become active to explain the same input. Also, lifetime sparseness will decrease, as the lack of competition between units means that individual units will be active more often. Fig. 5 shows the effect of reducing the strength of recurrent connections in the model of natural images. We analyzed the parameters of the sparse coding model at the end of learning, and substituted the Gibbs sampling posterior distribution of Eq. 9 with the one in Eq. 10 for various values of α. As predicted, decreasing α leads to a decrease in all sparseness measures. We argue that a similar disruption of the active sparsification process can be obtained in electrophysiological experiments by comparing neural responses at different levels of isoflurane anesthesia. In general, the evoked, feed-forward responses of V1 neurons under anesthesia are thought to remain 6 Figure 6: Neuronal response to a 3.75 Hz full-field stimulation under different levels of anesthesia. Error bars are SEM. A) Signal and noise amplitudes. B) Signal-to-noise ratio. largely intact: Despite a decrease in average firing rate, the selectivity of neurons to orientation, frequency, and direction of motion has been shown to be very similar in awake and anesthetized animals [24, 25, 26]. On the other hand, anesthesia disrupts contextual effects like figure-ground modulation [26] and pattern motion [27], which are known to be mediated by top-down and recurrent connections. Other studies have shown that, at low concentrations, isoflurane anesthesia leaves the visual input to the cortex mostly intact, while the intracortical recurrent and top-down signals are disrupted [28, 29]. Thus, if the representation in the visual cortex is optimally sparse, disrupting the active sparsification by anesthesia should decrease sparseness. We analyzed multi-unit neural activity from bundles of 16 electrodes implanted in primary visual cortex of 3 adult Long-Evans rats (5-11 units per recording session, for a total of 39 units). Recordings were made in the awake state and under four levels on anesthesia, from very light to deep (corresponding to concentrations of isoflurane between 0.6 and 2.0%) (see Suppl Mat for experimental details). In order to confirm that the effect of the anesthetic does not prevent visual information to reach the cortex, we presented the animals with a full-field periodic stimulus (flashing) at 3.75 Hz for 2 min in the awake state, and 3 min under anesthesia. The Fourier spectrum of the spikes trains on individual channels shows sharp peaks at the stimulation frequency in all states. We measured the response to the signal by the average amplitude of the Fourier spectrum between 3.7 and 3.8 Hz, and defined the amplitude of the noise, due to spontaneous activity and neural variability, as the average amplitude between 1 and 3.65 Hz (the amplitudes in this band are found to be noisy but uniform). The amplitude of the evoked signal decreases with increasing isoflurane concentration, due to a decrease in overall firing rate; however, the background noise is also suppressed with anesthesia, so that overall the signal-to-noise ratio does not decrease significantly with anesthesia (Fig. 6, ANOVA, P=0.46). We recorded neural responses while the rats were shown a two minute movie recorded from a camera mounted on the head of a person walking in the woods. Neural activity was collected in 25 ms bins. All three sparseness measures increase significantly with increasing concentration of isoflurane2 (Fig. 5B). Contrary to what is expected in a sparse-coding system, the data suggests that the contribution of lateral and top-down connections in the awake state leads to a less sparse code. 7 Discussion We examined multi-electrode recordings from primary visual cortex of ferrets over development, and of rats at different levels of anesthesia. We found that, contrary to predictions based on theoretical considerations regarding optimal sparse coding systems, sparseness decreases with visual experience, and increases with increasing concentration of anesthetic. These data suggest that the 2Lifetime sparseness, TR: ANOVA with different anesthesia groups, P < 0.01; multiple comparison tests with Tukey-Kramer correction shows the mean of awake group is different from the mean of all other groups with P < 0.05; Population sparseness, TR: ANOVA, P < 0.01; multiple comparison shows the mean of the awake group is different from that of the light, medium, and deep anesthesia groups, P < 0.05; Activity sparseness, AS: ANOVA P < 0.01, multiple comparison shows the mean of the awake group is different from that of the light, medium, and deep anesthesia groups, P < 0.05. 7 high sparseness levels that have been reported in previous accounts of sparseness in the visual cortex [7, 8, 9, 10, 11, 12], and which are otherwise consistent with our measurements (Fig. 3B, 5), are most likely a side effect of the high selectivity of neurons, or an overestimation due to the effect of anesthesia (Fig. 5; with the exception of [8], where sparseness was measured on awake animals), but do not indicate an active optimization of sparse responses (cf. [10]). Our measurements of sparseness from neural data are based on multi-unit recording. By collecting spikes from multiple cells, we are in fact reporting a lower bound of the true sparseness values. While a precise measurement of the absolute value of these quantities would require single-unit measurement, our conclusions are based on relative comparisons of sparseness under different conditions, and are thus not affected. Our theoretical predictions were verified with a common sparse coding model [3]. The model assumes linear summation in the generative process, and a particular sparse prior over the hidden unit. Despite these specific choices, we expect the model results to be general to the entire class of sparse coding models. In particular, the choice of comparing neural responses with Monte Carlo samples from the model’s posterior distribution was taken in agreement with experimental results that report high neural variability. Alternatively, one could assume a deterministic neural architecture, with a network dynamic that would drive the activity of the units to values that maximize the image probability [3, 30, 31]. In this scenario, neural activity would converge to one of the modes of the distributions in Fig. 4, leading us to the same conclusions regarding the evolution of sparseness. Although our analysis found no evidence for active sparsification in the primary visual cortex, ideas derived from and closely related to the sparse coding principle are likely to remain important for our understanding of visual processing. Efficient coding remains a most plausible functional account of coding in more peripheral parts of the sensory pathway, and particularly in the retina, from where raw visual input has to be sent through the bottleneck formed by the optic nerve without significant loss of information [32, 33]. Moreover, computational models of natural images are being extended from being strictly related to energy constraints and information transmission, to the more general view of density estimation in probabilistic, generative models [34, 35]. This view is compatible with our finding that the representation in the visual cortex becomes more dependent with age, and is less sparse in the awake condition than under anesthesia: We speculate that such dependencies reflect inference in a hierarchical generative model, where signals from lateral, recurrent connections in V1 and from feedback projections from higher areas are integrated with incoming evidence, in order to solve ambiguities at the level of basic image features using information from a global interpretation of the image [26, 19, 27, 20]. References [1] D.J. Field. What is the goal of sensory coding? Neural Computation, 6(4):559–601, 1994. [2] B.A. Olshausen and D.J. Field. Sparse coding of sensory inputs. Current Opinion in Neurobiology, 14(4):481–487, 2004. [3] B.A. Olshausen and D.J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607–609, 1996. [4] A.J. Bell and T.J. Sejnowski. The ‘independent components’ of natural scenes are edge filters. Vision Research, 37(23):3327–3338, 1997. [5] J.H. van Hateren and A. van der Schaaf. Independent component filters of natural images compared with simple cells in primary visual cortex. Proc. R. Soc. Lond. B, 265:359–366, 1998. [6] A.S. Hsu and P. Dayan. An unsupervised learning model of neural plasticity: Orientation selectivity in goggle-reared kittens. Vision Research, 47(22):2868–2877, 2007. [7] R. Baddeley, L.F. Abbott, M.C.A. Booth, F. Sengpiel, T. Freeman, E. Wakeman, and E.T. Rolls. Responses of neurons in primary and inferior temporal visual cortices to natural scenes. Proceedings of the Royal Society B: Biological Sciences, 264(1389):1775–1783, 1997. [8] W.E. Vinje and J.L. Gallant. Sparse coding and decorrelation in primary visual cortex during natural vision. Science, 297(5456):1273–1276, 2000. [9] M. Weliky, J. Fiser, R.H. Hunt, and D.N. Wagner. Coding of natural scenes in primary visual cortex. Neuron, 37(4):703–718, 2003. [10] S.R. Lehky, T.J. Sejnowski, and R. Desimone. Selectivity and sparseness in the responses of striate complex cells. Vision Research, 45(1):57–73, 2005. 8 [11] S.C. Yen, J. Baker, and C.M. Gray. Heterogeneity in the responses of adjacent neurons to natural stimuli in cat striate cortex. Journal of Neurophysiology, 97(2):1326–1341, 2007. [12] D.J. Tolhurst, D. Smyth, and I.D. Thompson. The sparseness of neuronal responses in ferret primary visual cortex. Journal of Neuroscience, 29(9):2355–2370, 2009. [13] A. Treves and E.T. Rolls. What determines the capacity of autoassociative memories in the brain? Network: Computation in Neural Systems, 2(4):371–397, 1991. [14] P. Foldiak and D. Endres. Sparse coding. Scholarpedia, 3(1):2984, 2008. [15] B. Willmore and D.J. Tolhurst. Characterizing the sparseness of neural codes. Network: Computation in Neural Systems, 12:255–270, 2001. [16] S. Osindero, M. Welling, and G.E. Hinton. Topographic product models applied to natural scene statistics. Neural Computation, 18:381–344, 2006. [17] P. Berkes, R. Turner, and M. Sahani. On sparsity and overcompleteness in image models. In Advances in Neural Information Processing Systems, volume 20. MIT Press, 2008. Cambridge, MA. [18] P.O. Hoyer and A. Hyvarinen. Interpreting neural response variability as monte carlo sampling of the posterior. In Advances in Neural Information Processing Systems, volume 15. MIT Press, 2003. Cambridge, MA. [19] T.S. Lee and D. Mumford. Hierarchical Bayesian inference in the visual cortex. Journal of the Optical Society of America A, 20(7):1434–1448, 2003. [20] P. Berkes, G. Orban, M. Lengyel, and J. Fiser. Matching spontaneous and evoked activity in V1: a hallmark of probabilistic inference. Frontiers in Systems Neuroscience, 2009. Conference Abstract: Computational and systems neuroscience. [21] S. Kirkpatrick, C.D. Gelatt, and M.P. Vecchi. Optimization by simulated annealing. Science, 220:671– 680, 1983. [22] B. Chapman and M.P. Stryker. Development of orientation selectivity in ferret visual cortex and effects of deprivation. Journal of Neuroscience, 13:5251–5262, 1993. [23] L.E. White, D.M. Coppola, and D. Fitzpatrick. The contribution of sensory experience to the maturation of orientation selectivity in ferret visual cortex. Nature, 411:1049–1052, 2001. [24] P.H. Schiller, B.L. Finlay, and S.F. Volman. Quantitative studies of single-cell properties in monkey striate cortex. I. Spatiotemporal organization of receptive fields. Journal of Neurophysiology, 39(6):1288–1319, 1976. [25] D.M. Snodderly and M. Gur. Organization of striate cortex of alert, trained monkeys (Macaca fascicularis): ongoing activity, stimulus selectivity, and widths of receptive field activating regions. Journal of Neurophysiology, 74(5):2100–2125, 1995. [26] V.A.F. Lamme, K. Zipser, and H. Spekreijse. Figure-ground activity in primary visual cortex is suppressed by anesthesia. PNAS, 95:3263–3268, 1998. [27] K. Guo, P.J. Benson, and C. Blakemore. Pattern motion is present in V1 of awake but not anaesthetized monkeys. European Journal of Neuroscience, 19:1055–1066, 2004. [28] O. Detsch, C. Vahle-Hinz, E. Kochs, M. Siemers, and B. Bromm. Isoflurane induces dose-dependent changes of thalamic somatosensory information transfer. Brain Research, 829:77–89, 1999. [29] H. Hentschke, C. Schwarz, and A. Bernd. Neocortex is the major target of sedative concentrations of volatile anaesthetics: strong depression of firing rates and increase of GABA-A receptor-mediated inhibition. European Jounal of Neuroscience, 21(1):93–102, 2005. [30] P. Dayan and L.F. Abbott. Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. MIT Press, 2001. [31] 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:2526–2563, 2008. [32] J.J. Atick. Could information theory provide an ecological theory of sensory processing? Network: Computation in Neural Systems, 3(2):213–251, 1992. [33] V. Balasubramanian and M.J. Berry. Evidence for metabolically efficient codes in the retina. Network: Computation in Neural Systems, 13(4):531–553, 2002. [34] Y. Karklin and M.S. Lewicki. A hierarchical bayesian model for learning non-linear statistical regularities in non-stationary natural signals. Neural Computation, 17(2):397–423, 2005. [35] M.J. Wainwright and E.P. Simoncelli. Scale mixtures of gaussians and the statistics of natural images. In Advances in Neural Information Processing Systems. MIT Press, 2000. Cambridge, MA. 9
2009
51
3,801
Distribution Matching for Transduction Novi Quadrianto RSISE, ANU & SML, NICTA Canberra, ACT, Australia novi.quad@gmail.com James Petterson RSISE, ANU & SML, NICTA Canberra, ACT, Australia james.petterson@nicta.com.au Alex J. Smola Yahoo! Research Santa Clara, CA, USA alex@smola.org Abstract Many transductive inference algorithms assume that distributions over training and test estimates should be related, e.g. by providing a large margin of separation on both sets. We use this idea to design a transduction algorithm which can be used without modification for classification, regression, and structured estimation. At its heart we exploit the fact that for a good learner the distributions over the outputs on training and test sets should match. This is a classical two-sample problem which can be solved efficiently in its most general form by using distance measures in Hilbert Space. It turns out that a number of existing heuristics can be viewed as special cases of our approach. 1 Introduction Transduction relies on the fundamental assumption that training and test data should exhibit similar behavior. For instance, in large margin classification a popular concept is to assume that both training and test data should be separable with a large margin [4]. A similar matching assumption is made by [8, 15] in requiring that class means are balanced between training and test set. Corresponding distributional assumptions are made for classification by [5], for regression by [10], and in the context of sufficient statistics on the marginal polytope by [3, 6]. Such matching assumptions are well founded: after all, we assume that both training data X = {x1, . . . , xm} ⊆X and test data X′ := {x′ 1, . . . , x′ m′} ⊆X are drawn independently and identically distributed from the same distribution p(x) on a domain X. It therefore follows that for any function (or set of functions) f : X →R the distribution of f(x) where x ∼p(x) should also behave in the same way on both training and test set. Note that this is not automatically true if we get to choose f after seeing X and X′. Rather than indirectly incorporating distributional similarity, e.g. by a large margin heuristic, we cast this goal as a two-sample problem which will allow us to draw on a rich body of literature for comparing distributions. One advantage of our setting is its full generality. That is, it is applicable without much need for customization to all estimation problems, whether structured or not. Furthermore, our approach is scalable and can be used easily with online optimization algorithms requiring no additional storage and only an additional O(1) computation per observation. This allows us to perform a multi-category classification on a dataset with 3.2·106 observations. At its heart it uses the following: rather than minimizing only the empirical risk, regularized risk, log-posterior, or related quantities obtained only on the training set, let us add a divergence term characterizing the mismatch in distributions between training and test set. We show that the Maximum-Mean-Discrepancy [7] is a suitable quantity for this purpose. Moreover, we show that for certain choices of kernels we are able to recover a number of existing transduction constraints as a special case. Note that our setting is entirely complementary to the notion of modifying the function space due to the availability of additional data. The latter stream of research led to the use of graph kernels and similar density-related algorithms [1]. It is often referred to as the cluster assumption in semisupervised learning. In other words, both methods can be combined as needed. That said, while 1 distribution matching always holds thus making our method always applicable, it is not entirely clear whether the cluster assumption is always satisfied (e.g. assume a noisy classification problem). Distribution matching, however, comes with a nontrivial price: the objective of the optimization problem ceases to be convex except for rather special cases (which correspond to algorithms that have been proposed as previous work). While this is a downside, it is a property inherent in most transduction algorithms — after all, we are dealing with algorithms to obtain self-consistent labelings, predictions, or regressions on the data and there may exist more than one potential solution. 2 The Model Supervised Learning Denote by X and Y the domains of data and labels and let Pr(x, y) be a distribution on X × Y from which we are drawing observations. Moreover, denote by X, Y sets of data and labels of the training set and by X′, Y ′ test data and labels respectively. In general, when designing an estimator one attempts to minimize some regularized risk functional Rreg[f, X, Y ] := 1 m m X i=1 l(xi, yi, f) + λΩ[f] (1) or alternatively (in a Bayesian setting) one deals with a log-posterior probability log p(f|X, Y ) = m X i=1 log p(yi|xi, f) + log p(f) + const. (2) Here p(f) is the prior of the parameter choice f and p(yi|xi, f) denotes the likelihood. f typically is a mapping X →R (for scalar problems such as regression or classification) or X →Rd (for multivariate problems such as named entity tagging, image annotation, matching, ranking, or more generally the clique potentials of graphical models). Note that we are free to choose f from one of many function classes such as decision trees, neural networks, or (nonparametric) linear models. The specific choice boils down to the ability to control the complexity of f efficiently, to one’s prior knowledge of what constitutes a simple function, to runtime constraints, and to the availability of scalable algorithms. In general, we will denote the training-data dependent term by Rtrain[f, X, Y ] (3) and we assume that finding some f for which Rtrain[f, X, Y ] is small is desirable. An analogous reasoning applies to sampling-based algorithms, however we skip them for the sake of conciseness. Distribution Matching Denote by f(X) := {f(x1), . . . , f(xm)} and by f(X′) := {f(x′ 1), . . . , f(x′ m′)} the applications of our estimator (and any related quantities) to training and test set respectively. For f chosen a-priori, the distributions from which f(X) and f(X′) are drawn coincide. Clearly, this should also hold whenever f is chosen by an estimation process. After all, we want that the empirical risk on the training and test sets match. While this cannot be checked directly, we can at least check closeness between the distributions of f(x). This reasoning leads us to the following additional term for the objective function of a transduction problem: D(f(X), f(X′)) (4) Here D(f(X), f(X′)) denotes the distance between the two distributions f(X) and f(X′). This leads to an overall objective for learning Rtrain[f, X, Y ] + γD(f(X), f(X′)) for some γ > 0 (5) when performing transductive inference. For instance, we could use the Kolmogorov-Smirnov statistic between both sets as our criterion, that is, we could use D(f(X), f(X′)) = ∥F(f(X)) −F(f(X′))∥∞ (6) the L∞norm between the cumulative distribution functions F associated with the empirical distributions f(X) and f(X′) to quantify the differences between both distributions. The problem with the above choice of distance is that it is not easily computable: we first need to evaluate f on both X and X′, then sort the arguments, and finally compute the largest deviation between both sets before 2 we can even attempt computing gradients or using a similar optimization procedure. Such a choice is clearly computationally undesirable. Instead, we propose the following: denote by H a Reproducing Kernel Hilbert Space with kernel k defined on X. In this case one can show [7] that whenever k is characteristic (or universal), the map µ : p →µ[p] := Ex∼p(x)[k(x, ·)] with associated distance D(p, p′) := ∥µ[p] −µ[p′]∥2 (7) characterizes a distribution uniquely. Examples of a characteristic kernel is Gaussian RBF, Laplacian and B2n+1-splines. It is possible to design online estimates of the distance quantity which can be used for fast two-sample tests between µ[X] and µ[X′]. Details on how this can be achieved are deferred to Section 4. 3 Special Cases Before discussing a specific algorithm let us consider a number of special cases to show that this basic idea is rather common in the literature (albeit not as explicit as in the present paper). Mean Matching for Classification Joachims [8] uses the following balancing constraint in the objective function of a binary classifier where ˆy(x) = sgn(f(x)) for f(x) = ⟨w, x⟩. In order to balance the outputs between training and test set, [8] imposes the linear constraint 1 m m X i=1 f(xi) = 1 m′ m′ X i=1 f(x′ i). (8) Assuming a linear kernel k on R this constraint is equivalent to requiring that µ[f(X)] = 1 m m X i=1 ⟨f(xi), ·⟩= 1 m′ m′ X i=1 ⟨f(x′ i), ·⟩= µ[f(X′)]. (9) Note that [8] uses the margin distribution as an additional criterion which will be discussed later. This setting can be extended to multiclass categorization and estimation with structured random variables in a straightforward fashion [15] simply by requiring a constraint corresponding to (9) to be satisfied for all possible values of y via 1 m m X i=1 ⟨f(xi, y), ·⟩= 1 m′ m′ X i=1 ⟨f(x′ i, y), ·⟩for all y ∈Y. (10) This is equivalent to a linear kernel on RY and the requirement that the distributions of the values f(x, y) match for all y. Distribution Matching for Classification G¨artner et. al. [5] propose to perform transduction by requiring that the conditional class probabilities on training and test set match. That is, for classifiers generating a distribution of the form y′ i ∼p(y′ i|x′ i, w) they require that the marginal class probability on the test set matches the empirical class probability on the training set. Again, this can be cast in terms of distribution matching via µ[g ◦f(X)] = 1 m m X i=1 ⟨g ◦f(xi), ·⟩= 1 m′ m′ X i=1 ⟨g ◦f(x′ i), ·⟩= µ[g ◦f(X′)] Here g(χ) = 1 1+e−χ denotes the likelihood of y = 1 in logistic regression for the model p(y|χ) = 1 1+e−yχ . Note that instead of choosing the logistic transform g we could have picked a large number of other transformations. Indeed, we may strengthen the requirement above to hold for all g in some given function class G as follows: D(f(X), f(X′)) := sup g∈G  1 m m X i=1 g ◦f(xi) −1 m′ m′ X i=1 g ◦f(x′ i)   (11) If we restrict ourselves to g having bounded norm in a Reproducing Kernel Hilbert Space we obtain exactly the criterion (7). Gretton et. al. [7] show by duality that this is equivalent to the distance proposed in (11). In other words, generalizing distribution matching to apply to transforms other than the logistic leads us directly to our new transduction criterion. 3 Figure 1: Score distribution of f(x) = ⟨w, x⟩+ b on the ’iris’ toy dataset. From left to right: induction scores on the training set; test set; transduction scores on the training set; test set; Note that while the margin distributions on training and test set are very different for induction, the ones for transduction match rather well. It results in a 10% reduction of the misclassification error. Distribution Matching for Regression A similar idea for transduction was proposed by [10] in the context of regression: requiring that both means and predictive variances of the estimate agree between training and test set. For a heteroscedastic regression estimate this constraint between training and test set is met simply by ensuring that the distributions over first and second order moments of a Gaussian exponential family distribution match. The same goal can be achieved by using a polynomial kernel of second degree on the estimates, which shows that regression transduction can be viewed as a special case. Large Margin Hypothesis A key assumption in transduction is that a good hypothesis is characterized by a large margin of separation on both training and test set. Typically, the latter is enforced by some nonconvex function, e.g. of the form max(0, 1 −|f(x)|), thus leading to a nonconvex optimization problem. Generalizations of this approach to multiclass and structured estimation settings is not entirely trivial and requires a number of heuristic choices (e.g. how to define the equivalent of the hat function max(0, 1 −|χ|) that is commonly used in binary transduction). Instead, if we require that the distribution of values f(x, ·) on X′ match those on X, we automatically obtain a loss function which enforces the large margin hypothesis whenever it is actually achievable on the training set. After all, assume that f(X) exhibits a large margin of separation whereas f(X′) does not. In this case, D(f(X), f(X′)) is large and we obtain better risk minimizers by minimizing the discrepancy of the distributions. The key point is that by using a two-sample criterion it is possible to obtain such criteria automatically without the need for heuristic choices. See Figure 1 for illustrations of this idea. 4 Algorithm Streaming Approximation In general, minimizing D(f(X), f(X′)) is computationally infeasible since the estimation of the distributional distance requires access to f(X) and f(X′) rather than evaluations on a small sample. However, for Hilbert-Space based distance measures it is possible to find an online estimate of D as follows [7]: D(p, p′) := ∥µ[p] −µ[p′]∥2 = Ex∼p(x)[k(x, ·)] −Ex′∼p′(x′)[k(x′, ·)] (12) = Ex,˜x∼pEx′,˜x′∼p′[k(x, ˜x) −k(x, ˜x′) −k(˜x, x′) + k(x′, ˜x′)] (13) The symbol ˜(.) denotes a second set of observations drawn from the same distribution. Note that (13) decomposes into a sum over 4 kernel functions, each of which takes as arguments a pair of instances drawn from p and p′ respectively. Hence we can find an unbiased estimate via ˆD := 1 m m X i=1 Di where Di := [k(f(xi), f(xi+1)) −k(f(xi), f(x′ i+1)) −k(f(xi+1), f(x′ i)) + k(f(x′ i), f(x′ i+1))] (14) under the assumption that X and X′ contain iid data. Note that the assumption automatically fails if there is sequential dependence within the sets X or X′ (e.g. we see all positive labels before we see the negative ones). In this case it is necessary to randomize X and X′. 4 Stochastic Gradient Descent The fact that the estimator of the distance ˆD decomposes into an average over a function of pairs from the training and test set respectively means that we can use Di as a stochastic approximation. Applying the same reasoning to the loss function in the regularized risk (1) we obtain the following loss ¯l(xi, xi+1, yi, yi+1, x′ i, x′ i+1, f) (15) := l(xi, yi, f) + l(xi+1, yi+1, f) + 2λΩ[f]+ γ[k(f(xi), f(xi+1)) −k(f(xi), f(x′ i+1)) −k(f(xi+1), f(x′ i)) + k(f(x′ i), f(x′ i+1))] as a stochastic estimate of the objective function defined in (5). This suggests Algorithm 1, which is a nonconvex variant of [12]. Note that at no time we need to store past data even for computing the distance between both distributions. Algorithm 1 Stochastic Gradient Descent Input: Convex set A, objective function ¯l Initialize w = 0 for t = 1 to N do Sample (xi, yi), (xi+1, yi+1) ∼p(x, y) and x′ i, x′ i+1 ∼p(x) Update w ←w −ηt∂w¯l(xi, xi+1, yi, yi+1, x′ i, x′ i+1, f) where f(x) = ⟨φ(x), w⟩ Project w onto A via w ←argmin ¯ w∈A ∥w −¯w∥. end for Remark: The streaming formulation does not impose any in-principle limitation regarding matching sample sizes. The only difference is that in the unmatched case we want to give samples from both distributions different weights (1/m and 1/m’ respectively), e.g. by modifying the sampling procedure (see Table 3, Section 5). DC Programming Alternatively, the Concave Convex Procedure, best known as DC programming in optimization [2], can be used to find an approximate solution of the problem in (5) by solving a succession of convex programs. DC programming has been used extensively in almost any other transductive algorithms to deal with non-convexity of the objective function. It works as follows: for a given function F(x) that can be written as a difference of two convex functions G and H via F(x) = G(x) −H(x), the below inequality F(x) ≤¯F(x, x0) := G(x) −H(x0) −⟨x −x0, ∂xH(x0)⟩ (16) holds for all x0 with equality for x = x0, due to the convexity of H(x). This implies an iterative algorithm for finding a local minimum of F by minimizing the upper bound ¯F(x, x0) and subsequently updating x0 ←argminx F(x, x0) to the minimizer of the upper bound. In order to minimize an additively decomposable objective function as in our transductive estimation, we could use stochastic gradient descent on the convex upper bound. Note that here the convex upper bound is given by a sum over the convex upper bounds for all terms. This strategy, however, is deficient in a significant aspect: the convex upper bounds on each of the loss terms become increasingly loose as we move f away from the current point of approximation. It would be considerably better if we updated the upper bound after every stochastic gradient descent step. This variant, however, is identical to stochastic gradient descent on the original objective function due to the following: ∂xF(x)|x=x0 = ∂x ¯F(x, x0)|x=x0 = ∂xG(x)|x=x0 −∂xH(x)|x=x0 for all x0. (17) In other words, in order to compute the gradient of the upper bound we need not compute the upper bound itself. Instead we may use the nonconvex objective directly, hence we did not pursue DC programming approach and Algorithm 1 applies. 5 Experiments To demonstrate the applicability of our approach, we apply transduction to binary and multiclass classification both on toy datasets from the UCI repository [16] and the LibSVM site [17], plus 5 a larger scale multi-category classification dataset with 3.2 · 106 observations. We also perform experiments on a structured estimation problem, i.e. Japanese named entity recognition task and CoNLL-2000 base NP chunking task. Algorithms Since we are not aware of other transductive algorithms which can be applied easily to all the problems we consider, we choose problem-specific transduction algorithms as competitors. Multi Switch Transductive SVM (MultiSwitch) is used for binary classification [14]. This method is a variant of transductive SVM algorithm [8] tailored for linear semi-supervised binary classification on large and sparse datasets and involves switching of more than a single pair of labels at a time. For multiclass categorization we pick a Gaussian processes based transductive algorithm with distribution matching term (GPDistMatch) [5]. We use stochastic gradient descent for optimization in both inductive and transductive settings for binary and multiclass losses. More specifically, for transduction we use the Gaussian RBF kernel to compare distributions in (14). Note that, in the multiclass case, the additional distribution matching term measures the distance between multivariate functions. Small Scale Experiments We used the following datasets: binary (breastcancer, derm, optdigits, wdbc, ionosphere, iris, specft, pageblock, tae, heart, splice, adult, australian, bupa, cmc, german, pima, tic, yeast, sonar, cleveland, svmguide3 and musk) from the UCI repository and multiclass (usps, satimage, segment, svmguide2, vehicle). The data was preprocessed to have zero mean and unit variance. Since we anticipate the relevant length scale in the margin distribution to be in the order of 1 (after all, we use a loss function, i.e. a hinge loss, which uses a margin of 1) we pick a Gaussian RBF kernel width of 0.2 for binary classification. Moreover, to take scaling in the number of classes into account we choose a kernel width of 0.1√c for multicategory classification. Here c denotes the number of classes. We could indeed vary this width but we note in our experiments that the proposed method is not sensitive to this kernel width. We split data equally into training and test sets, performing model selection on the training set and assessing performance on the test set. In these small scale experiments, we tune hyperparameters via 5-fold cross validation on the entire training set. The whole procedure was then repeated 5 times to obtain confidence bounds. More specifically, in the model selection stage, for transduction we adjust the regularization λ and the transductive weight term γ (obviously, for inductive inference we only need to adjust λ). For MultiSwitch Transduction the positive class fraction of unlabeled data was estimated using the training set [14]. Likewise, the two associated regularization parameters were tuned on the training set. For GP transduction both the regularization and divergence parameters were adjusted. Results The experimental results are summarized in Figure 2 for a binary setting and in Table 1 for a multiclass problem. In 23 binary datasets, transduction outperforms the inductive setup in 20 of them. Arguably, our proposed transductive method performs on a par with state-of-the-art transductive approach for each learning problem. In the binary estimation, out of 23 datasets, our method performs significantly worse than MultiSwitch transduction algorithm in 4 datasets (adult, bupa, pima, and svmguide3) and significantly better on 2 datasets (ionosphere and pageblock), using a one-sided paired t-test with 95% confidence. Overall, both algorithms are very comparable. The advantage of our approach is that it is ‘plug and play’, i.e. for different problems we only need to use the appropriate supervised loss function. The distribution matching penalty itself remains unchanged. Further, by casting the transductive solution as an online optimization method, our approach scales well. Larger Scale Experiments Since one of the key points of our approach is that it can be applied to large problems, we performed transduction on the DMOZ ontology [20] of topics. We selected the top 2 levels of the topic tree (575) and removed all but the 100 most frequent ones, since a large number of topics occurs only very rarely. This left us with 89.2% of the initial webpages. As feature vectors we used the standard bag of words representation of the web page descriptions with TF-IDF weighting. The dictionary size (and therefore the dimensionality of our features) is 6 Figure 2: Error rate on 23 binary estimation problems. Left panel, DistMatch against Induction; Right panel, DistMatch against MultiSwitch. DistMatch: distribution matching (ours) and MultiSwitch: Multi switch transductive SVM, [14]. Height of the box encodes standard error of DistMatch and width of the box encodes standard error of Induction / MultiSwitch. Table 1: Error rate ± standard deviation on a multi-category estimation problem. DistMatch: distribution matching (ours) and GPDistMatch: Gaussian Process transduction, [5]. dataset m classes Induction DistMatch GPDistMatch usps 730 10 0.143±0.021 0.125±0.019 0.140±0.034 satimage 620 6 0.190±0.052 0.186±0.037 0.212±0.034 segment 693 7 0.279±0.090 0.206±0.047 0.181±0.020 svmguide2 391 3 0.280±0.028 0.256±0.020 0.231±0.018 vehicle 423 4 0.385±0.070 0.333±0.048 0.336±0.060 Table 2: Error rate on the DMOZ ontology for increasing training / test set sizes. training / test set size 50,000 100,000 200,000 400,000 800,000 1,600,000 induction 0.365 0.362 0.337 0.299 0.300 0.268 transduction 0.344 0.326 0.330 0.288 0.263 0.250 Table 3: Error rate on the DMOZ ontology for fixed training set size of 100,000 samples. test set size 100,000 200,000 400,000 800,000 1,600,000 induction 0.358 0.358 0.357 0.357 0.357 transduction 0.326 0.316 0.306 0.322 0.329 Table 4: Accuracy, precision, recall and Fβ=1 score on the Japanese named entity task. Accuracy Precision Recall F1 Score induction 96.82 84.15 72.49 77.89 transduction 97.13 84.46 75.30 79.62 Table 5: Accuracy, precision, recall and Fβ=1 score on the CoNLL-2000 base NP chunking task. Accuracy Precision Recall F1 Score induction 95.72 90.99 90.72 90.85 transduction 96.05 91.73 91.97 91.85 1,319,489. For these larger scale experiments, we use a dataset of up to 3.2 · 106 observations. To our knowledge, our proposed transduction method is the only one that scales very well due to the stochastic approximation. For each experiment, we split data into training and test sets. Model selection is perform on the training set by putting aside part of the training data as a validation set which is then used exclusively for tuning the hyperparameters. In large scale transduction two issues matter: firstly, the algorithm needs to be scalable with respect to the training set size. Secondly, we need to be able to scale the algorithm with respect to the test set. Both results can be seen in Tables 2 and 3. Note that Table 2 uses an equal split between training and test sets, while Table 3 uses an unequal split where the test 7 set has many more observations. We see that the algorithm improves with increasing data size, both for training and test sets. In the latter case, only up to some point: for the larger test sets (800,000 and 1,600,000) it decreases (although still stays better than inductive’s). We suspect that a locationdependent transduction score would be useful in this context – i.e. instead of only minimizing the discrepancy between decision function values on training and test set D(f(X), f(X′)) we could also introduce local features D((X, f(X)), (X′, f(X′))). Japanese Named Entity Recognition Experiments A key advantage of our transduction algorithm is it can be applied to structured estimation without modification. We used the Japanese named-entity recognition dataset provided with the CRF++ toolkit [18]. The data contains 716 Japanese sentences with 17 annotated named entities. The task is to detect and classify proper nouns and numerical information in a document into categories such as names of persons, organizations, locations, times and quantities. Conditional random fields (CRFs) [9] are considered to be the stateof-the-art framework for this sequential labeling problem [11]. As the basis of our implementation we used Leon Bottou’s CRF code [19]. We use simple 1D chain CRFs with first order Markov dependency between name tags. That is, we have clique potentials joining adjacent labels (yi, yi+1), but which are independent of the text itself, and clique potentials joining words and labels (xi, yi). Since the former do not depend on the test data there is no need to enforce distribution matching. For the latter, though, we want to enforce that clique potentials are distributed in the same way between training and test set. The stationarity assumption in the potentials implies that this needs to hold uniformly over all such cliques. Since the number of tokens per sentence is variable, i.e. the chain length itself is a random variable, we perform distribution matching on a per-token basis — we oversample each token 10 times in our experiments. This strikes a balance between statistical accuracy and computational efficiency. The additional distribution matching term is then measuring the distance between these over-sampled clique potentials. As before, we split data equally into training and test sets and put aside part of the training data as a validation set which is used exclusively for tuning the hyperparameters. We relied on the feature template provided in CRF++ for this task. We report results in Table 4, that is precision (fraction of name tags which match the reference tags), recall (fraction of reference tags returned), and their harmonic mean, Fβ=1 are reported. Transduction outperforms induction in all metrics. CoNLL-2000 Base NP Chunking Experiments Our second structured estimation experiment is the CoNLL-2000 base NP chunking dataset [13] as provided in the CRF++ toolkit. The task is to divide text into syntactically correlated parts. The dataset has 900 sentences and the goal is to label each word with a label indicating whether the word is outside a chunk, starts a chunk, or continues a chunk. Similarly to Japanese named entity recognition task, 1D chain CRFs with only first order Markov dependency between chunk tags are modeled. We considered binary-valued features which depend on the words, part-of-speech tags, and labels in the neighborhood of a given word as encoded in the CRF++ feature template. The same experimental setup as in named entity experiments is used. The results in terms of accuracy, precision, recall and F1 score are summarized in Table 5. Again, transduction outperforms the inductive setup. 6 Summary and Discussion We proposed a transductive estimation algorithm which is a) simple, b) general c) scalable and d) works well when compared to the state of the art algorithms applied to each specific problem. Not only is it useful for classical binary and multiclass categorization problems but it also applies to ontologies and structured estimation problems. It is not surprising that it performs very comparably to existing algorithms, since they can, in many cases, be seen as special instances of the general purpose distribution matching setting. Extensions of distribution matching beyond simply modeling f(X) and instead, modeling (X, f(X)), that is, the introduction of local features, obtaining good theoretical bounds on the shrinkage of the function class via the distribution matching constraint, and applications to other function classes (e.g. balancing decision trees) are subject of future research. 8 References [1] O. Chapelle, B. Sch¨olkopf, and A. Zien, editors. Semi-Supervised Learning. MIT Press, Cambridge, MA, 2006. [2] 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. [3] G. Druck, G.S. Mann, and A. McCallum. Learning from labeled features using generalized expectation criteria. In S.-H. Myaeng, D.W. Oard, F. Sebastiani, T.-S. Chua, and M.-K. Leong, editors, SIGIR, pages 595–602. ACM, 2008. [4] A. Gammerman, Volodya Vovk, and Vladimir Vapnik. Learning by transduction. In Proceedings of Uncertainty in AI, pages 148–155, Madison, Wisconsin, 1998. [5] T. G¨artner, Q.V. Le, S. Burton, A. J. Smola, and S. V. N. Vishwanathan. Large-scale multiclass transduction. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 411–418, Cambride, MA, 2006. MIT Press. [6] J. Grac¸a, K. Ganchev, and B. Taskar. Expectation maximization and posterior constraints. In J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, editors, NIPS. MIT Press, 2007. [7] A. Gretton, K. Borgwardt, M. Rasch, B. Sch¨olkopf, and A. Smola. A kernel method for the two sample problem. Technical Report 157, MPI for Biological Cybernetics, 2008. [8] T. Joachims. Transductive inference for text classification using support vector machines. In I. Bratko and S. Dzeroski, editors, Proc. Intl. Conf. Machine Learning, pages 200–209, San Francisco, 1999. Morgan Kaufmann Publishers. [9] J. D. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic modeling for segmenting and labeling sequence data. In Proc. Intl. Conf. Machine Learning, volume 18, pages 282–289, San Francisco, CA, 2001. Morgan Kaufmann. [10] Q.V. Le, A.J. Smola, T. G¨artner, and Y. Altun. Transductive gaussian process regression with automatic model selection. In J. F¨urnkranz, T. Scheffer, and M. Spiliopoulou, editors, European Conference of Machine Learning, volume 4212 of LNAI. 306-317, 2006. [11] A. McCallum and W. Li. Early results for named entity recognition with conditional random fields, feature induction and web enhanced lexicons. In CoNLL, 2003. [12] Y. Nesterov and J.-P. Vial. Confidence level solutions for stochastic programming. Technical Report 2000/13, Universit´e Catholique de Louvain - Center for Operations Research and Economics, 2000. [13] E.F. Tjong Kim Sang and S. Buchholz. Introduction to the CoNLL-2000 shared task: Chunking. In Proc. Conf. Computational Natural Language Learning, pages 127–132, Lisbon, Portugal, 2000. [14] V. Sindhwani and S.S. Keerthi. Large scale semi-supervised linear SVMs. In SIGIR ’06: Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval, pages 477–484, New York, NY, USA, 2006. ACM Press. [15] A. Zien, U. Brefeld, and T. Scheffer. Transductive support vector machines for structured variables. In ICML, pages 1183–1190, 2007. [16] UCI repository, http://archive.ics.uci.edu/ml/ [17] LibSVM, http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/ [18] CRF++, http://chasen.org/˜taku/software/CRF++ [19] Stochastic Gradient Descent code, http://leon.bottou.org/projects/sgd [20] DMOZ ontology, http://www.dmoz.org 9
2009
52
3,802
Canonical Time Warping for Alignment of Human Behavior Feng Zhou Robotics Institute Carnegie Mellon University www.f-zhou.com Fernando de la Torre Robotics Institute Carnegie Mellon University ftorre@cs.cmu.edu Abstract Alignment of time series is an important problem to solve in many scientific disciplines. In particular, temporal alignment of two or more subjects performing similar activities is a challenging problem due to the large temporal scale difference between human actions as well as the inter/intra subject variability. In this paper we present canonical time warping (CTW), an extension of canonical correlation analysis (CCA) for spatio-temporal alignment of human motion between two subjects. CTW extends previous work on CCA in two ways: (i) it combines CCA with dynamic time warping (DTW), and (ii) it extends CCA by allowing local spatial deformations. We show CTW’s effectiveness in three experiments: alignment of synthetic data, alignment of motion capture data of two subjects performing similar actions, and alignment of similar facial expressions made by two people. Our results demonstrate that CTW provides both visually and qualitatively better alignment than state-of-the-art techniques based on DTW. 1 Introduction Temporal alignment of time series has been an active research topic in many scientific disciplines such as bioinformatics, text analysis, computer graphics, and computer vision. In particular, temporal alignment of human behavior is a fundamental step in many applications such as recognition [1], temporal segmentation [2] and synthesis of human motion [3]. For instance consider Fig. 1a which shows one subject walking with varying speed and different styles and Fig. 1b which shows two subjects reading the same text. Previous work on alignment of human motion has been addressed mostly in the context of recognizing human activities and synthesizing realistic motion. Typically, some models such as hidden Markov models [4, 5, 6], weighted principal component analysis [7], independent component analysis [8, 9] or multi-linear models [10] are learned from training data and in the testing phase the time series is aligned w.r.t. the learned dynamic model. In the context of computer vision a key aspect for successful recognition of activities is building view-invariant representations. Junejo et al. [1] proposed a view-invariant descriptor for actions making use of the affinity matrix between time instances. Caspi and Irani [11] temporally aligned videos from two closely attached cameras. Rao et al. [12, 13] aligned trajectories of two moving points using constraints from the fundamental matrix. In the literature of computer graphics, Hsu et al. [3] proposed the iterative motion warping, a method that finds a spatio-temporal warping between two instances of motion captured data. In the context of data mining there have been several extensions of DTW [14] to align time series. Keogh and Pazzani [15] used derivatives of the original signal to improve alignment with DTW. Listgarten et al. [16] proposed continuous profile models, a probabilistic method for simultaneously aligning and normalizing sets of time series. A relatively unexplored problem in behavioral analysis is the alignment between the motion of the body of face in two or more subjects (e.g., Fig. 1). Major challenges to solve human motion align1 (a) (b) Figure 1: Temporal alignment of human behavior. (a) One person walking in normal pose, slow speed, another viewpoint and exaggerated steps (clockwise). (b) Two people reading the same text. ment problems are: (i) allowing alignment between different sets of multidimensional features (e.g., audio/video), (ii) introducing a feature selection or feature weighting mechanism to compensate for subject variability or irrelevant features and (iii) execution rate [17]. To solve these problems, this paper proposes canonical time warping (CTW) for accurate spatio-temporal alignment between two behavioral time series. We pose the problem as finding the temporal alignment that maximizes the spatial correlation between two behavioral samples coming from two subjects. To accommodate for subject variability and take into account the difference in the dimensionally of the signals, CTW uses CCA as a measure of spatial alignment. To allow temporal changes CTW incorporates DTW. CTW extends DTW by adding a feature weighting mechanism that is able to align signals of different dimensionality. CTW also extends CCA by incorporating time warping and allowing local spatial transformations. The remainder of the paper is organized as follows. Section 2 reviews related work on dynamic time warping and canonical correlation analysis. Section 3 describes the new CTW algorithm. Section 4 extends CTW to take into account local transformations. Section 5 provides experimental results. 2 Previous work This section describes previous work on canonical correlation analysis and dynamic time warping. 2.1 Canonical correlation analysis Canonical correlation analysis (CCA) [18] is a technique to extract common features from a pair of multivariate data. CCA identifies relationships between two sets of variables by finding the linear combinations of the variables in the first set1 (X ∈Rdx×n) that are most correlated with the linear combinations of the variables in the second set (Y ∈Rdy×n). Assuming zero-mean data, CCA finds a combination of the original variables that minimizes: Jcca(Vx, Vy) = ∥VT x X −VT y Y∥2 F s.t. VT x XXT Vx = VT y YYT Vy = Ib, (1) where Vx ∈Rdx×b is the projection matrix for X (similarly for Vy). The pair of canonical variates (vT x X, vT y Y) is uncorrelated with other canonical variates of lower order. Each successive canonical variate pair achieves the maximum correlation orthogonal to the preceding pairs. Eq. 1 has a closed form solution in terms of a generalized eigenvalue problem. See [19] for a unification of several component analysis methods and a review of numerical techniques to efficiently solve the generalized eigenvalue problems. In computer vision, CCA has been used for matching sets of images in problems such as activity recognition from video [20] and activity correlation from cameras [21]. Recently, Fisher et al. [22] 1Bold capital letters denote a matrix X, bold lower-case letters a column vector x. xi represents the ith column of the matrix X. xij denotes the scalar in the ith row and jth column of the matrix X. All non-bold letters represent scalars. 1m×n, 0m×n ∈Rm×n are matrices of ones and zeros. In ∈Rn×n is an identity matrix. ∥x∥= √ xT x denotes the Euclidean distance. ∥X∥2 F = Tr(XT X) designates the Frobenious norm. X ◦Y and X ⊗Y are the Hadamard and Kronecker product of matrices. Vec(X) denotes the vectorization of matrix X. {i : j} lists the integers, {i, i + 1, · · · , j −1, j}. 2 1 2 3 4 5 6 7 2 3 45 1 2 3 4 5 6 7 8 9 2 3 45 (a) (b) (c) (d) 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 Figure 2: Dynamic time warping. (a) 1-D time series (nx = 7 and ny = 9). (b) DTW alignment. (c) Binary distance matrix. (d) Policy function at each node, where ↑, ↖, ←denote the policy, π(pt) = [1, 0]T , [1, 1]T , [0, 1]T , respectively. The optimal alignment path is denoted in bold. proposed an extension of CCA with parameterized warping functions to align protein expressions. The learned warping function is a linear combination of hyperbolic tangent functions with nonnegative coefficients, ensuring monotonicity. Unlike our method, the warping function is unable to deal with feature weighting. 2.2 Dynamic time warping Given two time series, X = [x1, x2, · · · , xnx] ∈Rd×nx and Y = [y1, y2, · · · , yny] ∈Rd×ny, dynamic time warping [14] is a technique to optimally align the samples of X and Y such that the following sum-of-squares cost is minimized: Jdtw(P) = m X t=1 ∥xpx t −ypy t ∥2, (2) where m is the number of indexes (or steps) needed to align both signals. The correspondence matrix P can be parameterized by a pair of path vectors, P = [px, py]T ∈R2×m, in which px ∈ {1 : nx}m×1 and py ∈{1 : ny}m×1 denote the composition of alignment in frames. For instance, the ith frame in X and the jth frame in Y are aligned iff there exists pt = [px t , py t ]T = [i, j]T for some t. P has to satisfy three additional constraints: boundary condition (p1 ≡[1, 1]T and pm ≡[nx, ny]T ), continuity (0 ≤pt −pt−1 ≤1) and monotonicity (t1 ≥t2 ⇒pt1 −pt2 ≥0). Although the number of possible ways to align X and Y is exponential in nx and ny, dynamic programming [23] offers an efficient (O nxny  ) approach to minimize Jdtw using Bellman’s equation: L∗(pt) = min π(pt) ∥xpx t −ypy t ∥2 + L∗(pt+1), (3) where the cost-to-go value function, L∗(pt), represents the remaining cost starting at tth step to be incurred following the optimum policy π∗. The policy function, π : {1 : nx} × {1 : ny} → {[1, 0]T , [0, 1]T , [1, 1]T }, defines the deterministic transition between consecutive steps, pt+1 = pt + π(pt). Once the policy queue is known, the alignment steps can be recursively constructed from the starting point, p1 = [1, 1]T . Fig. 2 shows an example of DTW to align two 1-D time series. 3 Canonical time warping (CTW) This section describes the energy function and optimization strategies for CTW. 3.1 Energy function for CTW In order to have a compact and compressible energy function for CTW, it is important to notice that Eq. 2 can be rewritten as: Jdtw(Wx, Wy) = nx X i=1 ny X j=1 wx i T wy j ∥xi −yj∥2 = ∥XWT x −YWT y ∥2 F , (4) where Wx ∈{0, 1}m×nx, Wy ∈{0, 1}m×ny are binary selection matrices that need to be inferred to align X and Y. In Eq. 4 the matrices Wx and Wy encode the alignment path. For instance, 3 wx tpx t = wy tpy t = 1 assigns correspondence between the px t th frame in X and py t th frame in Y. For convenience, we denote, Dx = WT x Wx, Dy = WT y Wy and W = WT x Wy. Observe that Eq. 4 is very similar to the CCA’s objective (Eq. 1). CCA applies a linear transformation to the rows (features), while DTW applies binary transformations to the columns (time). In order to accommodate for differences in style and subject variability, add a feature selection mechanism, and reduce the dimensionality of the signals, CTW adds a linear transformation (VT x , VT y ) (as CCA) to the least-squares form of DTW (Eq. 4). Moreover, this transformation allows aligning temporal signals with different dimensionality (e.g., video and motion capture). CTW combines DTW and CCA by minimizing: Jctw(Wx, Wy, Vx, Vy) = ∥VT x XWT x −VT y YWT y ∥2 F , (5) where Vx ∈Rdx×b, Vy ∈Rdy×b, b ≤min(dx, dy) parameterize the spatial warping by projecting the sequences into the same coordinate system. Wx and Wy warp the signal in time to achieve optimum temporal alignment. Similar to CCA, to make CTW invariant to translation, rotation and scaling, we impose the following constraints: (i) XWT x 1m = 0dx, YWT y 1m = 0dy, (ii) VT x XDxXT Vx = VT y YDyYT Vy = Ib and (iii) VT x XWYT Vy to be a diagonal matrix. Eq. 5 is the main contribution of this paper. CTW is a direct and clean extension of CCA and DTW to align two signals X and Y in space and time. It extends previous work on CCA by adding temporal alignment and on DTW by allowing a feature selection and dimensionality reduction mechanism for aligning signals of different dimensions. 3.2 Optimization for CTW Algorithm 1: Canonical Time Warping input : X, Y output: Vx, Vy, Wx, Wy begin Initialize Vx = Idx, Vy = Idy repeat Use dynamic programming to compute, Wx, Wy, for aligning the sequences, VT x X, VT y Y Set columns of, VT = [VT x , VT y ], be the leading b generalized eigenvectors of:  0 XWYT YWT XT 0  V =  XDxXT 0 0 YDyYT  VΛ until Jctw converges end Optimizing Jctw is a non-convex optimization problem with respect to the alignment matrices (Wx, Wy) and projection matrices (Vx, Vy). We alternate between solving for Wx, Wy using DTW, and optimally computing the spatial projections using CCA. These steps monotonically decrease Jctw and since the function is bounded below it will converge to a critical point. Alg. 1 illustrates the optimization process (e.g., Fig. 3e). The algorithm starts by initializing Vx and Vy with identity matrices. Alternatively, PCA can be applied independently to each set, and used as initial estimation of Vx and Vy if dx ̸= dy. In the case of high-dimensional data, the generalized eigenvalue problem is solved by regularizing the covariance matrices adding a scaled identity matrix. The dimension b is selected to preserve 90% of the total correlation. We consider the algorithm to converge when the difference between two consecutive values of Jctw is small. 4 Local canonical time warping (LCTW) In the previous section we have illustrated how CTW can align in space and time two time series of different dimensionality. However, there are many situations (e.g., aligning long sequences) where a global transformation of the whole time series is not accurate. For these cases, local models have been shown to provide better performance [3, 24, 25]. This section extends CTW by allowing multiple local spatial deformations. 4 4.1 Energy function for LCTW Let us assume that the spatial transformation for each frame in X and Y can be model as a linear combination of kx or ky bases. Let be Vx = [Vx 1 T , · · · , Vx kx T ]T ∈Rkxdx×b, Vy = [Vy 1 T , · · · , Vy ky T ]T ∈Rkydy×b and b ≤min(kxdx, kydy). CTW allows for a more flexible spatial warping by minimizing: Jlctw(Wx, Wy, Vx, Vy, Rx, Ry) (6) = nx X i=1 ny X j=1 wx i T wy j ∥  kx X cx=1 rx icxVx cx T  xi −  ky X cy=1 ry jcyVy cy T  yj∥2 + kx X cx=1 ∥Fxrx cx∥2 + ky X cy=1 ∥Fyry cy∥2 =∥VT x h (1kx ⊗X) ◦(RT x ⊗1dx) i WT x −VT y h (1ky ⊗Y) ◦(RT y ⊗1dy) i WT y ∥2 F + ∥FxRx∥2 F + ∥FyRy∥2 F , where Rx ∈Rnx×kx, Ry ∈Rny×ky are the weighting matrices. rx icx denotes the coefficient (or weight) of the cth x basis for the ith frame of X (similarly for ry jcy). We further constrain the weights to be positive (i.e., Rx, Ry ≥0) and the sum of weights to be one (i.e., Rx1kx = 1nx, Ry1ky = 1ny) for each frame. The last two regularization terms, Fx ∈Rnx×nx, Fy ∈Rny×ny, are 1st order differential operators of rx cx ∈Rnx×1, ry cy ∈Rny×1, encouraging smooth solutions over time. Observe that Jctw is a special case of Jlctw when kx = ky = 1. 4.2 Optimization for LCTW Algorithm 2: Local Canonical Time Warping input : X, Y output: Wx, Wy, Vx, Vy, Rx, Ry begin Initialize, Vx = 1kx ⊗Idx, Vy = 1ky ⊗Idy rx icx = 1 for ⌊(cx −1)nx kx ⌋< i ≤⌊cxnx kx ⌋, ry jcy = 1 for ⌊(cy −1)ny ky ⌋< j ≤⌊cyny ky ⌋ repeat Denote, Zx = (1kx ⊗X) ◦(RT x ⊗1dx), Zy = (1ky ⊗Y) ◦(RT y ⊗1dy) Qx = VT x (Ikx ⊗X), Qy = VT y (Iky ⊗Y) Use dynamic programming to compute, Wx, Wy, between the sequences, VT x Zx, VT y Zy Set columns of, VT = [VT x , VT y ], be the leading b generalized eigenvectors,  0 ZxWZT y ZyWT ZT x 0  V =  ZxDxZT x 0 0 ZyDyZT y  VΛ Set, r = Vec([Rx, Ry]), be the solution of the quadratic programming problem, min r rT  1kx×kx ⊗Dx ◦QT x Qx + Ikx ⊗FT x Fx −1kx×ky ⊗W ◦QT x Qy −1ky×kx ⊗WT ◦QT y Qx 1ky×ky ⊗Dy ◦QT y Qy + Iky ⊗FT y Fy  r s.t.  1T kx ⊗Inx 0 0 1T ky ⊗Iny  r = 1nx+ny r ≥0nxkx+nyky until Jlctw converges end As in the case of CTW, we use an alternating scheme for optimizing Jlctw, which is summarized in Alg. 2. In the initialization, we assume that each time series is divided into kx or ky equal parts, being the identity matrix the starting value for Vx cx, Vy cy and block structure matrices for Rx, Ry. 5 The main difference between the alternating scheme of Alg. 1 and Alg. 2 is that the alternation step is no longer unique. For instance, when fixing Vx, Vy, one can optimize either Wx, Wy or Rx, Ry. Consider a simple example of warping sin(t1) towards sin(t2), one could shift the first sequence along time axis by δt = t2 −t1 or do the linear transformation, at1 sin(t1) + bt1, where at1 = cos(t2 −t1) and bt1 = cos(t1) sin(t2 −t1). In order to better control the tradeoff between time warping and spatial transformation, we propose a stochastic selection process. Let us denote pw|v the conditional probability of optimizing W when fixing V. Given the prior probabilities [pw, pv, pr], we can derive the conditional probabilities using Bayes’ theorem and the fact that, [pr|w, pr|v, pv|r] = 1 −[pv|w, pw|v, pw|r]. [pv|w, pw|v, pw|r]T = A−1b , where A = " pw −pv 0 pw 0 pr 0 −pv pr # and b = " 0 pw −pv + pr # . Fig. 3f (right-lower corner) shows the optimization strategy, pw = .5, pv = .3, pr = .2, where the time warping process is more often optimized. 5 Experiments This section demonstrates the benefits of CTW and LCTW against state-of-the-art DTW approaches to align synthetic data, motion capture data of two subjects performing similar actions, and similar facial expressions made by two people. 5.1 Synthetic data In the first experiment we synthetically generated two spatio-temporal signals (3-D in space and 1-D in time) to evaluate the performance of CTW and LCTW. The first two spatial dimensions and the time dimension are generated as follows: X = UT x ZMT x and Y = UT y ZMT y , where Z ∈R2×m is a curve in two dimensions (Fig. 3a). Ux, Uy ∈R2×2 are randomly generated affine transformation matrices for the spatial warping and Mx ∈Rnx×m, My ∈Rny×m, m ≥max(nx, ny) are randomly generated matrices for time warping2. The third spatial dimension is generated by adding a (1×nx) or (1 × ny) extra row to X and Y respectively, with zero-mean Gaussian noise (see Fig. 3a-b). We compared the performance of CTW and LCTW against three other methods: (i) dynamic time warping (DTW) [14], (ii) derivative dynamic time warping (DDTW) [15] and (iii) iterative time warping (IMW) [3]. Recall that in the case of synthetic data we know the ground truth alignment matrix Wtruth = MxMT y . The error between the ground truth and a given alignment Walg is computed by the area enclosed between both paths (see Fig. 3g). Fig. 3c-f show the spatial warping estimated by each algorithm. DDTW (Fig. 3c) cannot deal with this example because the feature derivatives do not capture well the structure of the sequence. IMW (Fig. 3d) warps one sequence towards the other by translating and re-scaling each frame in each dimension. Fig. 3h shows the testing error (space and time) for 100 new generated time series. As it can be observed CTW and LCTW obtain the best performance. IMW has more parameters (O(dn)) than CTW (O(db)) and LCTW (O(kdb + kn)), and hence IMW is more prone to overfitting. IMW tries to fit the noisy dimension (3rd spatial component) biasing alignment in time (Fig. 3g), whereas CTW and LCTW have a feature selection mechanism which effectively cancels the third dimension. Observe that the null space for the projection matrices in CTW is vT x = [.002, .001, −.067]T , vT y = [−.002, −.001, −.071]T . 5.2 Motion capture data In the second experiment we apply CTW and LCTW to align human motion with similar behavior. The motion capture data is taken from the CMU-Multimodal Activity Database [26]. We selected a pair of sub-sequences from subject 1 and subject 3 cooking brownies. Typically, each sequence contains 500-1000 frames. For each instance we computed the quaternions for the 20 joints resulting in a 60 dimensional feature vector that describes the body configuration. CTW and LCTW are initialized as described in previous sections and optimized until convergence. The parameters of LCTW are manually set to kx = 3, ky = 3 and pw = .5, pv = .3, pr = .2. 2The generation of time transformation matrix Mx (similar for My) is initialized by setting Mx = Inx. Then, randomly pick and replicate m −nx columns of Mx. We normalize each row Mx1m = 1nx to make the new frame to be an interpolation of zi. 6 (a) (b) (c) (d) (e) (f) −10 0 10 20 30 −10 0 10 20 30 40 −202 −2 0 2 −2 0 2 4 −4 −2 0 2 4 5 10 15 20 25 30 35 25 30 35 40 45 −202 20 40 60 80 10 20 30 40 50 60 70 80 90 Truth DTW DDTW IMW CTW LCTW −0.1 0 0.1 0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 5 10 15 0.2 0.4 5 10 15 20 W V −0.1 0 0.1 0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 5 10 15 0 2 4 5 10 15 20 W V R (g) (h) −10 0 10 20 30 40 −10 0 10 20 30 40 DTW DDTW IMW CTW LCTW 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 Figure 3: Example with synthetic data. Time series are generated by (a) spatio-temporal transformation of 2-D latent sequence (b) adding Gaussian noise in the 3rd dimension. The result of space warping is computed by (c) derivative dynamic time warping (DDTW), (d) iterative time warping (IMW), (e) canonical time warping (CTW) and (f) local canonical time warping (LCTW). The energy function and order of optimizing the parameters for CTW and LCTW are shown in the top right and lower right corner of the graphs. (g) Comparison of the alignment results for several methods. (h) Mean and variance of the alignment error. (a) (b) (c) (d) −0.5 0 0.5 −0.5 0 0.5 0 0.05 0.1 0.15 −0.05 0 0.05 −0.15 −0.1 −0.05 0 −0.05 0 0.05 200 400 600 800 100 200 300 400 500 600 700 DTW CTW LCTW DTW CTW LCTW (e) Figure 4: Example of motion capture data alignment. (a) PCA. (b) CTW. (c) LCTW. (d) Alignment path. (e) Motion capture data. 1st row subject one, rest of the rows aligned subject two. Fig. 4 shows the alignment results for the action of opening a cabinet. The projection on the principal components for both sequences can be seen in Fig. 4a. CTW and LCTW project the sequences in a low dimensional space that maximizes the correlation (Fig. 4b-c). Fig. 4d shows the alignment path. In this case, we do not have ground truth data, and we evaluated the results visually. The first row of Fig. 4e shows few instances of the first subject, and the last three rows the alignment of the third subject for DTW, CTW and LCTW. Observe that CTW and LCTW achieve better temporal alignment. 7 5.3 Facial expression data In this experiment we tested the ability of CTW and LCTW to align facial expressions. We took 29 subjects from the RU-FACS database [27] which consists of interviews with men and women of varying ethnicity. The action units (AUs) in this database have been manually coded, and we selected AU12 (smiling) to run our experiments. Each event of AU12 is coded with an onset (start), peak and offset (end). We used person-specific AAM [28] to track 66 landmark points on the face. For the alignment of AU12 we only used 18 landmarks corresponding to the outline of the mouth, so for each frame we have a vector (R36×1) with (x, y) coordinates. We took subject 14 and 30 and ran CTW and LCTW on the segments where the AU12 was coded. The parameters of LCTW are manually set to kx = 3, ky = 3 and pw = .5, pv = .3, pr = .2. Fig. 5 shows the results of the alignment. Fig. 5b-c shows that the low dimensional projection obtained with CTW and LCTW has better alignment than DTW in Fig. 5a. Fig. 5d shows the position of the peak frame as the intersection of the two dotted lines. As we can observe from Fig. 5d, the alignment paths found by CTW and LCTW are closer to the manually labeled peak than the ones found by DTW. This shows that CTW and LCTW provide better alignment because the manually labeled peaks in both sequences should be aligned. Fig. 5e shows several frames illustrating the alignment. (a) (e) DTW CTW LCTW −150 −100 −50 0 50 100 −50 0 50 (b) −0.2 −0.1 0 0.1 0.2 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 (c) −0.2 −0.1 0 0.1 −0.2 −0.1 0 0.1 0.2 (d) 50 100 150 10 20 30 40 50 60 70 80 90 DTW CTW LCTW Figure 5: Example of facial expression alignment. (a) PCA. (b) CTW. (c) LCTW. (d) Alignment path. (e) Frames from an AU12 event. The AU peaks are indicated by arrows. 6 Conclusions In this paper we proposed CTW and LCTW for spatio-temporal alignment of time series. CTW integrates the benefits of DTW and CCA into a clean and simple formulation. CTW extends DTW by adding a feature selection mechanism and enables alignment of signals with different dimensionality. CTW extends CCA by adding temporal alignment and allowing temporal local projections. We illustrated the benefits of CTW for alignment of motion capture data and facial expressions. 7 Acknowledgements This material is based upon work partially supported by the National Science Foundation under Grant No. EEC-0540865. 8 References [1] I. N. Junejo, E. Dexter, I. Laptev, and P. P´erez. Cross-view action recognition from temporal selfsimilarities. In ECCV, pages 293–306, 2008. [2] F. Zhou, F. de la Torre, and J. K. Hodgins. Aligned cluster analysis for temporal segmentation of human motion. In FGR, pages 1–7, 2008. [3] E. Hsu, K. Pulli, and J. Popovic. Style translation for human motion. In SIGGRAPH, 2005. [4] M. Brand, N. Oliver, and A. Pentland. Coupled hidden Markov models for complex action recognition. In CVPR, pages 994–999, 1997. [5] M. Brand and A. Hertzmann. Style machines. In SIGGRAPH, pages 183–192, 2000. [6] G. W. Taylor, G. E. Hinton, and S. T. Roweis. Modeling human motion using binary latent variables. In NIPS, volume 19, page 1345, 2007. [7] A. Heloir, N. Courty, S. Gibet, and F. Multon. Temporal alignment of communicative gesture sequences. J. Visual. Comp. Animat., 17(3-4):347–357, 2006. [8] A. Shapiro, Y. Cao, and P. Faloutsos. Style components. In Graphics Interface, pages 33–39, 2006. [9] G. Liu, Z. Pan, and Z. Lin. Style subspaces for character animation. J. Visual. Comp. Animat., 19(34):199–209, 2008. [10] A. M. Elgammal and C.-S. Lee. Separating style and content on a nonlinear manifold. In CVPR, 2004. [11] Y. Caspi and M. Irani. Aligning non-overlapping sequences. Int. J. Comput. Vis., 48(1):39–51, 2002. [12] C. Rao, A. Gritai, M. Shah, and T. Fathima Syeda-Mahmood. View-invariant alignment and matching of video sequences. In ICCV, pages 939–945, 2003. [13] A. Gritai, Y. Sheikh, C. Rao, and M. Shah. Matching trajectories of anatomical landmarks under viewpoint, anthropometric and temporal transforms. Int. J. Comput. Vis., 2009. [14] L. Rabiner and B.-H. Juang. Fundamentals of speech recognition. Prentice Hall, 1993. [15] E. J. Keogh and M. J. Pazzani. Derivative dynamic time warping. In SIAM ICDM, 2001. [16] J. Listgarten, R. M. Neal, S. T. Roweis, and A. Emili. Multiple alignment of continuous time series. In NIPS, pages 817–824, 2005. [17] Y. Sheikh, M. Sheikh, and M. Shah. Exploring the space of a human action. In ICCV, 2005. [18] T. W. Anderson. An introduction to multivariate statistical analysis. Wiley-Interscience, 2003. [19] F. de la Torre. A unification of component analysis methods. Handbook of Pattern Recognition and Computer Vision, 2009. [20] T. K. Kim and R. Cipolla. Canonical correlation analysis of video volume tensors for action categorization and detection. IEEE Trans. Pattern Anal. Mach. Intell., 31:1415–1428, 2009. [21] C. C. Loy, T. Xiang, and S. Gong. Multi-camera activity correlation analysis. In CVPR, 2009. [22] B. Fischer, V. Roth, and J. Buhmann. Time-series alignment by non-negative multiple generalized canonical correlation analysis. BMC bioinformatics, 8(10), 2007. [23] D. P. Bertsekas. Dynamic programming and optimal control. 1995. [24] Z. Ghahramani and G. E. Hinton. The EM algorithm for mixtures of factor analyzers. University of Toronto Tec. Rep., 1997. [25] J. J. Verbeek, S. T. Roweis, and N. A. Vlassis. Non-linear CCA and PCA by alignment of local models. In NIPS, 2003. [26] F. de la Torre, J. K. Hodgins, J. Montano, S. Valcarcel, A. Bargteil, X. Martin, J. Macey, A. Collado, and P. Beltran. Guide to the Carnegie Mellon University Multimodal Activity (CMU-MMAC) Database. Carnegie Mellon University Tec. Rep., 2009. [27] M. S. Bartlett, G. C. Littlewort, M. G. Frank, C. Lainscsek, I. Fasel, and J. R. Movellan. Automatic recognition of facial actions in spontaneous expressions. J. Multimed., 1(6):22–35, 2006. [28] I. Matthews and S. Baker. Active appearance models revisited. Int. J. Comput. Vis., 60(2):135–164, 2004. 9
2009
53
3,803
A Parameter-free Hedging Algorithm Kamalika Chaudhuri ITA, UC San Diego kamalika@soe.ucsd.edu Yoav Freund CSE, UC San Diego yfreund@ucsd.edu Daniel Hsu CSE, UC San Diego djhsu@cs.ucsd.edu Abstract We study the problem of decision-theoretic online learning (DTOL). Motivated by practical applications, we focus on DTOL when the number of actions is very large. Previous algorithms for learning in this framework have a tunable learning rate parameter, and a barrier to using online-learning in practical applications is that it is not understood how to set this parameter optimally, particularly when the number of actions is large. In this paper, we offer a clean solution by proposing a novel and completely parameter-free algorithm for DTOL. We introduce a new notion of regret, which is more natural for applications with a large number of actions. We show that our algorithm achieves good performance with respect to this new notion of regret; in addition, it also achieves performance close to that of the best bounds achieved by previous algorithms with optimally-tuned parameters, according to previous notions of regret. 1 Introduction In this paper, we consider the problem of decision-theoretic online learning (DTOL), proposed by Freund and Schapire [1]. DTOL is a variant of the problem of prediction with expert advice [2, 3]. In this problem, a learner must assign probabilities to a fixed set of actions in a sequence of rounds. After each assignment, each action incurs a loss (a value in [0, 1]); the learner incurs a loss equal to the expected loss of actions for that round, where the expectation is computed according to the learner’s current probability assignment. The regret (of the learner) to an action is the difference between the learner’s cumulative loss and the cumulative loss of that action. The goal of the learner is to achieve, on any sequence of losses, low regret to the action with the lowest cumulative loss (the best action). DTOL is a general framework that captures many learning problems of interest. For example, consider tracking the hidden state of an object in a continuous state space from noisy observations [4]. To look at tracking in a DTOL framework, we set each action to be a path (sequence of states) over the state space. The loss of an action at time t is the distance between the observation at time t and the state of the action at time t, and the goal of the learner is to predict a path which has loss close to that of the action with the lowest cumulative loss. The most popular solution to the DTOL problem is the Hedge algorithm [1, 5]. In Hedge, each action is assigned a probability, which depends on the cumulative loss of this action and a parameter η, also called the learning rate. By appropriately setting the learning rate as a function of the iteration [6, 7] and the number of actions, Hedge can achieve a regret upper-bounded by O( √ T ln N), for each iteration T, where N is the number of actions. This bound on the regret is optimal as there is a Ω( √ T ln N) lower-bound [5]. In this paper, motivated by practical applications such as tracking, we consider DTOL in the regime where the number of actions N is very large. A major barrier to using online-learning for practical problems is that when N is large, it is not understood how to set the learning rate η. [7, 6] suggest 1 Actions Total loss ε Figure 1: A new notion of regret. Suppose each action is a point on a line, and the total losses are as given in the plot. The regret to the top ǫ-quantile is the difference between the learner’s total loss and the total loss of the worst action in the indicated interval of measure ǫ. setting η as a fixed function of the number of actions N. However, this can lead to poor performance, as we illustrate by an example in Section 3, and the degradation in performance is particularly exacerbated as N grows larger. One way to address this is by simultaneously running multiple copies of Hedge with multiple values of the learning rate, and choosing the output of the copy that performs the best in an online way. However, this solution is impractical for real applications, particularly as N is already very large. (For more details about these solutions, please see Section 4.) In this paper, we take a step towards making online learning more practical by proposing a novel, completely adaptive algorithm for DTOL. Our algorithm is called NormalHedge. NormalHedge is very simple and easy to implement, and in each round, it simply involves a single line search, followed by an updating of weights for all actions. A second issue with using online-learning in problems such as tracking, where N is very large, is that the regret to the best action is not an effective measure of performance. For problems such as tracking, one expects to have a lot of actions that are close to the action with the lowest loss. As these actions also have low loss, measuring performance with respect to a small group of actions that perform well is extremely reasonable – see, for example, Figure 1. In this paper, we address this issue by introducing a new notion of regret, which is more natural for practical applications. We order the cumulative losses of all actions from lowest to highest and define the regret of the learner to the top ǫ-quantile to be the difference between the cumulative loss of the learner and the ⌊ǫN⌋-th element in the sorted list. We prove that for NormalHedge, the regret to the top ǫ-quantile of actions is at most O r T ln 1 ǫ + ln2 N ! , which holds simultaneously for all T and ǫ. If we set ǫ = 1/N, we get that the regret to the best action is upper-bounded by O √ T ln N + ln2 N  , which is only slightly worse than the bound achieved by Hedge with optimally-tuned parameters. Notice that in our regret bound, the term involving T has no dependence on N. In contrast, Hedge cannot achieve a regret-bound of this nature uniformly for all ǫ. (For details on how Hedge can be modified to perform with our new notion of regret, see Section 4). NormalHedge works by assigning each action i a potential; actions which have lower cumulative loss than the algorithm are assigned a potential exp(R2 i,t/2ct), where Ri,t is the regret of action i and ct is an adaptive scale parameter, which is adjusted from one round to the next, depending on the loss-sequences. Actions which have higher cumulative loss than the algorithm are assigned potential 1. The weight assigned to an action in each round is then proportional to the derivative of its potential. One can also interpret Hedge as a potential-based algorithm, and under this interpretation, the potential assigned by Hedge to action i is proportional to exp(ηRi,t). This potential used by Hedge differs significantly from the one we use. Although other potential-based methods have been considered in the context of online learning [8], our potential function is very novel, and to the best 2 Initially: Set Ri,0 = 0, pi,1 = 1/N for each i. For t = 1, 2, . . . 1. Each action i incurs loss ℓi,t. 2. Learner incurs loss ℓA,t = PN i=1 pi,tℓi,t. 3. Update cumulative regrets: Ri,t = Ri,t−1 + (ℓA,t −ℓi,t) for each i. 4. Find ct > 0 satisfying 1 N PN i=1 exp  ([Ri,t]+)2 2ct  = e. 5. Update distribution for round t + 1: pi,t+1 ∝[Ri,t]+ ct exp  ([Ri,t]+)2 2ct  for each i. Figure 2: The Normal-Hedge algorithm. of our knowledge, has not been studied in prior work. Our proof techniques are also different from previous potential-based methods. Another useful property of NormalHedge, which Hedge does not possess, is that it assigns zero weight to any action whose cumulative loss is larger than the cumulative loss of the algorithm itself. In other words, non-zero weights are assigned only to actions which perform better than the algorithm. In most applications, we expect a small set of the actions to perform significantly better than most of the actions. The regret of the algorithm is guaranteed to be small, which means that the algorithm will perform better than most of the actions and thus assign them zero probability. [9, 10] have proposed more recent solutions to DTOL in which the regret of Hedge to the best action is upper bounded by a function of L, the loss of the best action, or by a function of the variations in the losses. These bounds can be sharper than the bounds with respect to T. Our analysis (and in fact, to our knowledge, any analysis based on potential functions in the style of [11, 8]) do not directly yield these kinds of bounds. We therefore leave open the question of finding an adaptive algorithm for DTOL which has regret upper-bounded by a function that depends on the loss of the best action. The rest of the paper is organized as follows. In Section 2, we provide NormalHedge. In Section 3, we provide an example that illustrates the suboptimality of standard online learning algorithms, when the parameter is not set properly. In Section 4, we discuss Related Work. In Section 5, we present some outlines of the proof. The proof details are in the Supplementary Materials. 2 Algorithm 2.1 Setting We consider the decision-theoretic framework for online learning. In this setting, the learner is given access to a set of N actions, where N ≥2. In round t, the learner chooses a weight distribution pt = (p1,t, . . . , pN,t) over the actions 1, 2, . . . , N. Each action i incurs a loss ℓi,t, and the learner incurs the expected loss under this distribution: ℓA,t = N X i=1 pi,tℓi,t. The learner’s instantaneous regret to an action i in round t is ri,t = ℓA,t −ℓi,t, and its (cumulative) regret to an action i in the first t rounds is Ri,t = t X τ=1 ri,τ. We assume that the losses ℓi,t lie in an interval of length 1 (e.g. [0, 1] or [−1/2, 1/2]; the sign of the loss does not matter). The goal of the learner is to minimize this cumulative regret Ri,t to any action i (in particular, the best action), for any value of t. 3 2.2 Normal-Hedge Our algorithm, Normal-Hedge, is based on a potential function reminiscent of the half-normal distribution, specifically φ(x, c) = exp ([x]+)2 2c  for x ∈R, c > 0 (1) where [x]+ denotes max{0, x}. It is easy to check that this function is separately convex in x and c, differentiable, and twice-differentiable except at x = 0. In addition to tracking the cumulative regrets Ri,t to each action i after each round t, the algorithm also maintains a scale parameter ct. This is chosen so that the average of the potential, over all actions i, evaluated at Ri,t and ct, remains constant at e: 1 N N X i=1 exp ([Ri,t]+)2 2ct  = e. (2) We observe that since φ(x, c) is convex in c > 0, we can determine ct with a line search. The weight assigned to i in round t is set proportional to the first-derivative of the potential, evaluated at Ri,t−1 and ct−1: pi,t ∝ ∂ ∂xφ(x, c) x=Ri,t−1,c=ct−1 = [Ri,t−1]+ ct−1 exp ([Ri,t−1]+)2 2ct−1  . Notice that the actions for which Ri,t−1 ≤0 receive zero weight in round t. We summarize the learning algorithm in Figure 2. 3 An Illustrative Example In this section, we present an example to illustrate that setting the parameters of DTOL algorithms as a function of N, the total number of actions, is suboptimal. To do this, we compare the performance of NormalHedge with two representative algorithms: a version of Hedge due to [7], and the Polynomial Weights algorithm, due to [12, 11]. Our experiments with this example indicate that the performance of both these algorithms suffer because of the suboptimal setting of the parameters; on the other hand, NormalHedge automatically adapts to the loss-sequences of the actions. The main feature of our example is that the effective number of actions n (i.e. the number of distinct actions) is smaller than the total number of actions N. Notice that without prior knowledge of the actions and their loss-sequences, one cannot determine the effective number actions in advance; as a result, there is no direct method by which Hedge and Polynomial Weights could set their parameters as a function of n. Our example attempts to model a practical scenario where one often finds multiple actions with loss-sequences which are almost identical. For example, in the tracking problem, groups of paths which are very close together in the state space, will have very close loss-sequences. Our example indicates that in this case, the performance of Hedge and the Polynomial Weights will depend on the discretization of the state space, however, NormalHedge will comparatively unaffected by such discretization. Our example has four parameters: N, the total number of actions; n, the effective number of actions (the number of distinct actions); k, the (effective) number of good actions; and ǫ, which indicates how much better the good actions are compared to the rest. Finally, T is the number of rounds. The instantaneous losses of the N actions are represented by a N × T matrix Bε,k N ; the loss of action i in round t is the (i, t)-th entry in the matrix. The construction of the matrix is as follows. First, we construct a (preliminary) n × T matrix An based on the 2d × 2d Hadamard matrix, where n = 2d+1 −2. This matrix An is obtained from the 2d × 2d Hadamard matrix by (1) deleting the constant row, (2) stacking the remaining rows on top of their negations, (3) repeating each row 4 horizontally T/2d times, and finally, (4) halving the first column. We show A6 for concreteness: A6 =   −1/2 +1 −1 +1 −1 +1 −1 +1 −1 +1 −1 +1 . . . −1/2 −1 +1 +1 −1 −1 +1 +1 −1 −1 +1 +1 . . . −1/2 +1 +1 −1 −1 +1 +1 −1 −1 +1 +1 −1 . . . +1/2 −1 +1 −1 +1 −1 +1 −1 +1 −1 +1 −1 . . . +1/2 +1 −1 −1 +1 +1 −1 −1 +1 +1 −1 −1 . . . +1/2 −1 −1 +1 +1 −1 −1 +1 +1 −1 −1 +1 . . .   If the rows of An give the losses for n actions over time, then it is clear that on average, no action is better than any other. Therefore for large enough T, for these losses, a typical algorithm will eventually assign all actions the same weight. Now, let Aε,k n be the same as An except that ε is subtracted from each entry of the first k rows, e.g. Aε,2 6 =   −1/2 −ε +1 −ε −1 −ε +1 −ε −1 −ε +1 −ε −1 −ε +1 −ε . . . −1/2 −ε −1 −ε +1 −ε +1 −ε −1 −ε −1 −ε +1 −ε +1 −ε . . . −1/2 +1 +1 −1 −1 +1 +1 −1 . . . +1/2 −1 +1 −1 +1 −1 +1 −1 . . . +1/2 +1 −1 −1 +1 +1 −1 −1 . . . +1/2 −1 −1 +1 +1 −1 −1 +1 . . .   . Now, when losses are given by Aε,k n , the first k actions (the good actions) perform better than the remaining n −k; so, for large enough T, a typical algorithm will eventually recognize this and assign the first k actions equal weights (giving little or no weight to the remaining n −k). Finally, we artificially replicate each action (each row) N/n times to yield the final loss matrix Bε,k N for N actions: Bε,k N =   Aε,k n Aε,k n... Aε,k n            N/n replicates of Aε,k n . The replication of actions significantly affects the behavior of algorithms that set parameters with respect to the number of actions N, which is inflated compared to the effective number of actions n. NormalHedge, having no such parameters, is completely unaffected by the replication of actions. We compare the performance of NormalHedge to two other representative algorithms, which we call “Exp” and “Poly”. Exp is a time/variation-adaptive version of Hedge (exponential weights) due to [7] (roughly, ηt = O( p (log N)/Vart), where Vart is the cumulative loss variance). Poly is polynomial weights [12, 11], which has a parameter p that is typically set as a function of the number of actions; we set p = 2 ln N as is recommended to guarantee a regret bound comparable to that of Hedge. Figure 3 shows the regrets to the best action versus the replication factor N/n, where the effective number of actions n is held fixed. Recall that Exp and Poly have parameters set with respect to the number of actions N. We see from the figures that NormalHedge is completely unaffected by the replication of actions; no matter how many times the actions may be replicated, the performance of NormalHedge stays exactly the same. In contrast, increasing the replication factor affects the performance of Exp and Poly: Exp and Poly become more sensitive to the changes in the total losses of the actions (e.g. the base of the exponent in the weights assigned by Exp increases with N); so when there are multiple good actions (i.e. k > 1), Exp and Poly are slower to stabilize their weights over these good actions. When k = 1, Exp and Poly actually perform better using the inflated value N (as opposed to n), as this causes the slight advantage of the single best action to be magnified. However, this particular case is an anomaly; this does not happen even for k = 2. We note that if the parameters of Exp and Poly were set to be a function of n, instead of N, then, then their performance would also not depend on the replication factor (the peformance would be the same as the N/n = 1 case). Therefore, the degradation in performance of Exp and Poly is solely due to the suboptimality in setting their parameters. 5 10 0 10 1 10 2 10 3 100 150 200 250 300 350 400 Replication factor Regret to best action after T=32768 Exp. Poly. Normal 10 0 10 1 10 2 10 3 400 450 500 550 600 650 Replication factor Regret to best action after T=32768 Exp. Poly. Normal k = 1 k = 2 10 0 10 1 10 2 10 3 400 500 600 700 800 900 Replication factor Regret to best expert after T=32768 Exp. Poly. Normal 10 0 10 1 10 2 10 3 400 500 600 700 800 900 Replication factor Regret to best action after T=32768 Exp. Poly. Normal k = 8 k = 32 Figure 3: Regrets to the best action after T = 32768 rounds, versus replication factor N/n. Recall, k is the (effective) number of good actions. Here, we fix n = 126 and ǫ = 0.025. 4 Related work There has been a large amount of literature on various aspects of DTOL. The Hedge algorithm of [1] belongs to a more general family of algorithms, called the exponential weights algorithms; these are originally based on Littlestone and Warmuth’s Weighted Majority algorithm [2], and they have been well-studied. The standard measure of regret in most of these works is the regret to the best action. The original Hedge algorithm has a regret bound of O(√T log N). Hedge uses a fixed learning rate η for all iterations, and requires one to set η as a function of the total number of iterations T. As a result, its regret bound also holds only for a fixed T. The algorithm of [13] guarantees a regret bound of O(√T log N) to the best action uniformly for all T by using a doubling trick. Time-varying learning rates for exponential weights algorithms were considered in [6]; there, they show that if ηt = p 8 ln(N)/t, then using exponential weights with η = ηt in round t guarantees regret bounds of √ 2T ln N + O(ln N) for any T. This bound provides a better regret to the best action than we do. However, this method is still susceptible to poor performance, as illustrated in the example in Section 3. Moreover, they do not consider our notion of regret. Though not explicitly considered in previous works, the exponential weights algorithms can be partly analyzed with respect to the regret to the top ǫ-quantile. For any fixed ǫ, Hedge can be modified by setting η as a function of this ǫ such that the regret to the top ǫ-quantile is at most O( p T log(1/ǫ)). The problem with this solution is that it requires that the learning rate to be set as a function of that particular ǫ (roughly η = p (log 1/ǫ)/T). Therefore, unlike our bound, this bound does not hold uniformly for all ǫ. One way to ensure a bound for all ǫ uniformly is to run log N copies of Hedge, each with a learning rate set as a function of a different value of ǫ. A final master copy of the Hedge algorithm then looks at the probabilities given by these subordinate copiesto give the final probabilities. However, this procedure adds an additive O(√T log log N) factor to the regret to the ǫ quantile of actions, for any ǫ. More importantly, this procedure is also impractical for real applications, where one might be already working with a large set of actions. In contrast, our solution NormalHedge is clean and simple, and we guarantee a regret bound for all values of ǫ uniformly, without any extra overhead. 6 More recent work in [14, 7, 10] provide algorithms with significantly improved bounds when the total loss of the best action is small, or when the total variation in the losses is small. These bounds do not explicitly depend on T, and thus can often be sharper than ones that do (including ours). We stress, however, that these methods use a different notion of regret, and their learning rates depend explicitly on N. Besides exponential weights, another important class of online learning algorithms are the polynomial weights algorithms studied in [12, 11, 8]. These algorithms too require a parameter; this parameter does not depend on the number of rounds T, but depends crucially on the number of actions N. The weight assigned to action i in round t is proportional to ([Ri,t−1]+)p−1 for some p > 1; setting p = 2 ln N yields regret bounds of the form p 2eT(ln N −0.5) for any T. Our algorithm and polynomial weights share the feature that zero weight is given to actions that are performing worse than the algorithm, although the degree of this weight sparsity is tied to the performance of the algorithm. Finally, [15] derive a time-adaptive variation of the follow-the-(perturbed) leader algorithm [16, 17] by scaling the perturbations by a parameter that depends on both t and N. 5 Analysis 5.1 Main results Our main result is the following theorem. Theorem 1. If Normal-Hedge has access to N actions, then for all loss sequences, for all t, for all 0 < ǫ ≤1 and for all 0 < δ ≤1/2, the regret of the algorithm to the top ǫ-quantile of the actions is at most s (1 + ln(1/ǫ))  3(1 + 50δ)t + 16 ln2 N δ (10.2 δ2 + ln N)  . In particular, with ǫ = 1/N, the regret to the best action is at most s (1 + ln N)  3(1 + 50δ)t + 16 ln2 N δ (10.2 δ2 + ln N)  . The value δ in Theorem 1 appears to be an artifact of our analysis; we divide the sequence of rounds into two phases – the length of the first is controlled by the value of δ – and bound the behavior of the algorithm in each phase separately. The following corollary illustrates the performance of our algorithm for large values of t, in which case the effect of this first phase (and the δ in the bound) essentially goes away. Corollary 2. If Normal-Hedge has access to N actions, then, as t →∞, the regret of NormalHedge to the top ǫ-quantile of actions approaches an upper bound of p 3t(1 + ln(1/ǫ)) + o(t) . In particular, the regret of Normal-Hedge to the best action approaches an upper bound of of p 3t(1 + ln N) + o(t) . The proof of Theorem 1 follows from a combination of Lemmas 3, 4, and 5, and is presented in detail at the end of the current section. 5.2 Regret bounds from the potential equation The following lemma relates the performance of the algorithm at time t to the scale ct. Lemma 3. At any time t, the regret to the best action can be bounded as max i Ri,t ≤ p 2ct(ln N + 1) . Moreover, for any 0 ≤ǫ ≤1 and any t, the regret to the top ǫ-quantile of actions is at most p 2ct(ln(1/ǫ) + 1) . 7 Proof. We use Et to denote the actions that have non-zero weight on iteration t. The first part of the lemma follows from the fact that, for any action i ∈Et, exp (Ri,t)2 2ct  = exp ([Ri,t]+)2 2ct  ≤ N X i′=1 exp ([Ri′,t]+)2 2ct  ≤Ne which implies Ri,t ≤ p 2ct(ln N + 1). For the second part of the lemma, let Ri,t denote the regret of our algorithm to the action with the ǫN-th highest regret. Then, the total potential of the actions with regrets greater than or equal to Ri,t is at least ǫN exp ([Ri,t]+)2 2ct  ≤Ne from which the second part of the lemma follows. 5.3 Bounds on the scale ct and the proof of Theorem 1 In Lemmas 4 and 5, we bound the growth of the scale ct as a function of the time t. The main outline of the proof of Theorem 1 is as follows. As ct increases monotonically with t, we can divide the rounds t into two phases, t < t0 and t ≥t0, where t0 is the first time such that ct0 ≥4 ln2 N δ + 16 ln N δ3 , for some fixed δ ∈(0, 1/2). We then show bounds on the growth of ct for each phase separately. Lemma 4 shows that ct is not too large at the end of the first phase, while Lemma 5 bounds the per-round growth of ct in the second phase. The proofs of these two lemmas are quite involved, so we defer them to the supplementary appendix. Lemma 4. For any time t, ct+1 ≤2ct(1 + ln N) + 3 . Lemma 5. Suppose that at some time t0, ct0 ≥4 ln2 N δ + 16 ln N δ3 , where 0 ≤δ ≤1 2 is a constant. Then, for any time t ≥t0, ct+1 −ct ≤3 2(1 + 49.19δ) . We now combine Lemmas 4 and 5 together with Lemma 3 to prove the main theorem. Proof of Theorem 1. Let t0 be the first time at which ct0 ≥4 ln2 N δ + 16 ln N δ3 . Then, from Lemma 4, ct0 ≤2ct0−1(1 + ln N) + 3, which is at most 8 ln3 N δ + 34 ln2 N δ3 + 32 ln N δ3 + 3 ≤8 ln3 N δ + 81 ln2 N δ3 . The last inequality follows because N ≥2 and δ ≤1/2. By Lemma 5, we have that for any t ≥t0, ct ≤3 2(1 + 49.19δ)(t −t0) + ct0. Combining these last two inequalities yields ct ≤3 2(1 + 49.19δ)t + 8 ln3 N δ + 81 ln2 N δ3 . Now the theorem follows by applying Lemma 3. 8 References [1] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55:119–139, 1997. [2] N. Littlestone and M. Warmuth. The weighted majority algorithm. Information and Computation, 108:212–261, 1994. [3] V. Vovk. A game of prediction witih expert advice. Journal of Computer and System Sciences, 56(2):153– 173, 1998. [4] K. Chaudhuri, Y. Freund, and D. Hsu. Tracking using explanation-based modeling, 2009. arXiv:0903.2862. [5] Y. Freund and R. E. Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29:79–103, 1999. [6] P. Auer, N. Cesa-Bianchi, and C. Gentile. Adaptive and self-confident on-line learning algorithms. Journal of Computer and System Sciences, 64(1), 2002. [7] N. Cesa-Bianchi, Y. Mansour, and G. Stoltz. Improved second-order bounds for prediction with expert advice. Machine Learning, 66(2–3):321–352, 2007. [8] N. Cesa-Bianchi and G. Lugosi. Potential-based algorithms in on-line prediction and game theory. Machine Learning, 51:239–261, 2003. [9] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning and Games. Cambridge University Press, 2006. [10] E. Hazan and S. Kale. Extracting certainty from uncertainty: Regret bounded by variation in costs. In COLT, 2008. [11] C. Gentile. The robustness of p-norm algorithms. Machine Learning, 53(3):265–299, 2003. [12] A. J. Grove, N. Littlestone, and D. Schuurmans. General convergence results for linear discriminant updates. Machine Learning, 43(3):173–210, 2001. [13] N. Cesa-Bianchi, Y. Freund, D. Haussler, D. P. Hembold, R. E. Schapire, and M. Warmuth. How to use expert advice. Journal of the ACM, 44(3):427–485, 1997. [14] R. Yaroshinsky, R. El-Yaniv, , and S. Seiden. How to better use expert advice. Machine Learning, 55(3):271–309, 2004. [15] M. Hutter and J. Poland. Adaptive online prediction by following the perturbed leader. Journal of Machine Learning Research, 6:639–660, 2005. [16] J. Hannan. Approximation to bayes risk in repeated play. Contributions to the Theory of Games, 3:97– 139, 1957. [17] A. Kalai and S. Vempala. Efficient algorithms for the online optimization. Journal of Computer and System Sciences, 71(3):291–307, 2005. 9
2009
54
3,804
Learning Bregman Distance Functions and Its Application for Semi-Supervised Clustering Lei Wu†♯, Rong Jin‡, Steven C.H. Hoi†, Jianke Zhu♮, and Nenghai Yu♯ †School of Computer Engineering, Nanyang Technological University, Singapore ‡Department of Computer Science & Engineering, Michigan State University ♮Computer Vision Lab, ETH Zurich, Swiss ♯Univeristy of Science and Technology of China, P.R. China Abstract Learning distance functions with side information plays a key role in many machine learning and data mining applications. Conventional approaches often assume a Mahalanobis distance function. These approaches are limited in two aspects: (i) they are computationally expensive (even infeasible) for high dimensional data because the size of the metric is in the square of dimensionality; (ii) they assume a fixed metric for the entire input space and therefore are unable to handle heterogeneous data. In this paper, we propose a novel scheme that learns nonlinear Bregman distance functions from side information using a nonparametric approach that is similar to support vector machines. The proposed scheme avoids the assumption of fixed metric by implicitly deriving a local distance from the Hessian matrix of a convex function that is used to generate the Bregman distance function. We also present an efficient learning algorithm for the proposed scheme for distance function learning. The extensive experiments with semi-supervised clustering show the proposed technique (i) outperforms the state-of-the-art approaches for distance function learning, and (ii) is computationally efficient for high dimensional data. 1 Introduction An effective distance function plays an important role in many machine learning and data mining techniques. For instance, many clustering algorithms depend on distance functions for the pairwise distance measurements; most information retrieval techniques rely on distance functions to identify the data points that are most similar to a given query; k-nearest-neighbor classifier depends on distance functions to identify the nearest neighbors for data classification. In general, learning effective distance functions is a fundamental problem in both data mining and machine learning. Recently, learning distance functions from data has been actively studied in machine learning. Instead of using a predefined distance function (e.g., Euclidean distance), researchers have attempted to learn distance functions from side information that is often provided in the form of pairwise constraints, i.e., must-link constraints for pairs of similar data points and cannot-link constraints for pairs of dissimilar data points. Example algorithms include [16, 2, 8, 11, 7, 15]. Most distance learning methods assume a Mahalanobis distance. Given two data points x and x′, the distance between x and x′ is calculated by d(x, x′) = (x −x′)⊤A(x −x′), where A is the distance metric that needs to be learned from the side information. [16] learns a global distance metric (GDM) by minimizing the distance between similar data points while keeping dissimilar data points far apart. It requires solving a Semi-Definite Programming (SDP) problem, which is computationally expensive when the dimensionality is high. BarHillel et al [2] proposed the Relevant Components Analysis (RCA), which is computationally efficient and achieves comparable results as GDM. The main drawback with RCA is that it is unable to handle the cannot-link constraints. This problem was addressed by Discriminative Component Analysis (DCA) in [8], which learns a distance metric by minimizing the distance between similar data points and in the meantime maximizing the distance 1 between dissimilar data points. The authors in [4] proposed an information-theoretic based metric learning approach (ITML) that learns the Mahalanobis distance by minimizing the differential relative entropy between two multivariate Gaussians. Neighborhood Component Analysis (NCA) [5] learns a distance metric by extending the nearest neighbor classifier. The maximum-margin nearest neighbor (LMNN) classifier [14] extends NCA through a maximum margin framework. Yang et al. [17] propose a Local Distance Metric (LDM) that addresses multimodal data distributions. Hoi et al. [7] propose a semi-supervised distance metric learning approach that explores the unlabeled data for metric learning. In addition to learning a distance metric, several studies [12, 6] are devoted to learning a distance function, mostly non-metric, from the side information. Despite the success, the existing approaches for distance metric learning are limited in two aspects. First, most existing methods assume a fixed distance metric for the entire input space, which make it difficult for them to handle the heterogeneous data. This issue was already demonstrated in [17] when learning distance metrics from multi-modal data distributions. Second, the existing methods aim to learn a full matrix for the target distance metric that is in the square of the dimensionality, making it computationally unattractive for high dimensional data. Although the computation can be reduced significantly by assuming certain forms of the distance metric (e.g., diagonal matrix), these simplifications often lead to suboptimal solutions. To address these two limitations, we propose a novel scheme that learns Bregman distance functions from the given side information. Bregman distance or Bregman divergence [3] has several salient properties for distance measure. Bregman distance generalizes the class of Mahalanobis distance by deriving a distance function from a given convex function φ(x). Since the local distance metric can be derived from the local Hessian matrix of ϕ(x), Bregman distance function avoids the assumption of fixed distance metric. Recent studies [1] also reveal the connection between Bregman distances and exponential families of distributions. For example, Kullback-Leibler divergence is a special Bregman distance when choosing the negative entropy function for the convex function ϕ(x). The objective of this work is to design an efficient and effective algorithm that learns a Bregman distance function from pairwise constraints. Although Bregman distance or Bregman divergence has been explored in [1], all these studies assume a predefined Bregman distance function. To the best of our knowledge, this is the first work that addresses the problem of learning Bregman distances from the pairwise constraints. We present a non-parametric framework for Bregman distance learning, together with an efficient learning algorithm. Our empirical study with semi-supervised clustering show that the proposed approach (i) outperforms the state-of-the-art algorithms for distance metric learning, and (ii) is computationally efficient for high dimensional data. The rest of the paper is organized as follows. Section 2 presents the proposed framework of learning Bregman distance functions from the pairwise constraints, together with an efficient learning algorithm. Section 3 presents the experimental results with semi-supervised clustering by comparing the proposed algorithms with a number of state-of-the-art algorithms for distance metric learning. Section 5 concludes this work. 2 Learning Bregman Distance Functions 2.1 Bregman Distance Function Bregman distance function is defined based on a given convex function. Let ϕ(x) : Rd 7→R be a strictly convex function that is twice differentiable. Given ϕ(x), the Bregman distance function is defined as d(x1, x2) = ϕ(x1) −ϕ(x2) −(x1 −x2)⊤∇ϕ(x2) For the convenience of discussion, we consider a symmetrized version of the Bregman distance function that is defined as follows d(x1, x2) = (∇ϕ(x1) −∇ϕ(x2))⊤(x1 −x2) (1) The following proposition shows the properties of d(x1, x2). Proposition 1. The distance function defined in (1) satisfies the following properties if ϕ(x) is a strictly convex function: (a) d(x1, x2) = d(x2, x1), (b) d(x1, x2) ≥0, (c) d(x1, x2) = 0 ↔x1 = x2 Remark To better understand the Bregman distance function, we can rewrite d(x1, x2) in (1) as d(x1, x2) = (x1 −x2)⊤∇2ϕ(˜x)(x1 −x2) 2 where ˜x is a point on the line segment between x1 and x2. As indicated by the above expression, the Bregman distance function can be viewed as a general Mahalanobis distance that introduces a local distance metric A = ∇2ϕ(˜x). Unlike the conventional Mahalanobis distance where metric A is a constant matrix throughout the entire space, the local distance metric A = ∇2ϕ(˜x) is introduced via the Hessian matrix of convex function ϕ(x) and therefore depends on the location of x1 and x2. Although the Bregman distance function defined in (1) does not satisfy the triangle inequality, the following proposition shows the degree of violation could be bounded if the Hessian matrix of ϕ(x) is bounded. Proposition 2. Let Ωbe the closed domain for x. If ∃m, M ∈R, M > m > 0 and mI ⪯min x∈Ω∇2ϕ(x) ⪯max x∈Ω∇2ϕ(x) ⪯MI where I is the identity matrix, we have the following inequality p d(xa, xb) ≤ p d(xa, xc) + p d(xc, xb) + ( √ M −√m)[d(xa, xc)d(xc, xb)]1/4 (2) The proof of this proposition can be found in Appendix A. As indicated by Proposition 2, the degree of violation of the triangle inequality is essentially controlled by √ M −√m. Given a smooth convex function with almost constant Hessian matrix, we would expect that to a large degree, Bregman distance will satisfy the triangle inequality. In the extreme case when ϕ(x) = x⊤Ax/2 and ∇2ϕ(x) = A, we have a constant Hessian matrix, leading to a complete satisfaction of the triangle inequality. 2.2 Problem Formulation To a learn a Bregman distance function, the key is to find the appropriate convex function ϕ(x) that is consistent with the given pairwise constraints. In order to learn the convex function ϕ(x), we take a non-parametric approach by assuming that ϕ(·) belongs to a Reproducing Kernel Hilbert Space Hκ. Given a kernel function κ(x, x′) : Rd × Rd 7→R, our goal is to search for a convex function ϕ(x) ∈Hκ such that the induced Bregman distance function, denoted by dϕ(x, x′), minimizes the overall training error with respect to the given pairwise constraints. We denote by D = {(x1 i , x2 i , yi), i = 1, . . . , n} the collection of pairwise constraints for training. Each pairwise constraint consists of a pair of instances x1 i and x2 i , and a label yi that is +1 if x1 i and x2 i are similar and −1 if x1 i and x2 i are dissimilar. We also introduce X = (x1, . . . , xN) to include the input patterns of all training instances in D. Following the maximum margin framework for classification, we cast the problem of learning a Bregman distance function from pairwise constraints into the following optimization problem, i.e., min ϕ∈Ω(Hκ),b∈R+ 1 2|ϕ|2 Hκ + C n X i=1 ℓ(yi[d(x1 i , x2 i ) −b]) (3) where Ω(H) = {f ∈H : f is convex} refers to the subspace of functional space H that only includes convex functions, ℓ(z) = max(0, 1 −z) is a hinge loss, and C is a penalty cost parameter. The main challenge with solving the variational problem in (3) is that it is difficult to derive a representer theorem for ϕ(x) because it is ∇ϕ(x) used in the definition of distance function, not ϕ(x). Note that although it seems to be convenient to regularize ∇ϕ(x), it will be difficult to restrict ϕ(x) to be convex. To resolve this problem, we consider a special family of kernel functions κ(x, x′) that has the form κ(x1, x2) = h(x⊤ 1 x2) where h : R 7→R is a strictly convex function. Examples of h(z) that guarantees κ(·, ·) to be positive semi-definite are h(z) = |z|d (d ≥1), h(z) = |z + 1|d (d ≥1), and h(z) = exp(z). For the convenience of discussion, we assume h(0) = 0 throughout this paper. First, since ϕ(x) ∈Hκ, we have ϕ(x) = Z dyκ(x, y)q(y) = Z dyh(x⊤y)q(y) (4) where q(y) is a weighting function. Given the training instances x1, . . . , xN, we divide the space Rd into A and ¯ A that are defined as A = span{x1, . . . , xN}, ¯ A = Null(x1, . . . , xN) (5) 3 We define H∥and H⊥as follows H∥= span{κ(x, ·), ∀x ∈A}, H⊥= span{κ(x, ·), ∀x ∈¯ A} (6) The following proposition summarizes an important property of reproducing kernel Hilbert space Hκ when kernel function κ(·, ·) is restricted to the form in Eq. (2.2). Proposition 3. If the kernel function κ(·, ·) is written in the form of Equation (2.2) with h(0) = 0, we have H∥and H⊥form a complete partition of Hκ, i.e., Hκ = H∥∪H⊥, and H∥⊥H⊥. We therefore have the following representer theorem for ϕ(x) that minimizes (3) Theorem 1. The function ϕ(x) that minimizes (3) admits the following expression ϕ(x) ∈H∥= Z y∈A dyq(y)h(x⊤y) = Z duq(u)h(x⊤Xu) (7) where u ∈RN and X = (x1, . . . , xN). The proof of the above theorem can be found in Appendix B. 2.3 Algorithm To further derive a concrete expression for ϕ(x), we restrict q(y) in (7) to the special form: q(y) = PN i=1 αiδ(y −xi) where αi ≥0, i = 1, . . . , N are non-negative combination weights. This results in ϕ(x) = PN i=1 αih(x⊤ i x), and consequently d(xa, xb) as follows d(xa, xb) = N X i=1 αi(h′(x⊤ a xi) −h′(x⊤ b xi))x⊤ i (xa −xb) (8) By defining h(xa) = (h′(x⊤ a x1), . . . , h′(x⊤ a xN))⊤, we can express d(xa, xb) as follows d(xa, xb) = (xa −xb)⊤X(α ◦[h(xa) −h(xb)]) (9) Notice that when h(z) = z2/2, we have d(xa, xb) expressed as d(xa, xb) = (xa −xb)⊤Xdiag(α)X⊤(xa −xb). (10) This is a Mahanalobis distance with metric A = Xdiag(α)X⊤= PN i=1 αixix⊤ i . When h(z) = exp(z), we have h(x) = (exp(x⊤x1), . . . , exp(x⊤xN)), and the resulting distance function is no longer stationary due to the non-linear function exp(z). Given the assumption that q(y) = PN i=1 αiδ(y −xi), we have (3) simplified as min α∈RN,b 1 2α⊤Kα + C n X i=1 εi (11) s. t. yi ¡ (x1 i −x2 i )⊤X(α ◦[h(x1 i ) −h(x2 i )]) −b ¢ ≥1 −εi, εi ≥0, i = 1, . . . , n, αk ≥0, k = 1, . . . , N Note that the constraint αk ≥0 is introduced to ensure ϕ(x) = PN k=1 αkh(x⊤xk) is a convex function. By defining zi = [h(x1 i ) −h(x2 i )] ◦[X⊤(x1 i −x2 i )], (12) we simplify the problem in (11) as follows min α∈RN + ,b L = 1 2α⊤Kα + C n X i=1 ℓ(yi[z⊤ i α −b]) (13) where ℓ(z) = max(0, 1 −z). 4 We solve the above problem by a simple subgradient descent approach. In particular, at iteration t, given the current solution αt and bt, we compute the gradients as ∇αL = Kαt + C n X i=1 ∂ℓ(yi[z⊤ i αt −bt])yizi, ∇bL = −C n X i=1 ∂ℓ(yi[z⊤ i αt −bt])yi (14) where ∂ℓ(z) stands for the subgradient of ℓ(z). Let S+ t ∈D denotes the set of training instances for which (αt, bt) suffers a non-zeros loss, i.e., S+ t = {(zi, yi) ∈D : yi(z⊤ i αt −bt) < 1} (15) We can then express the sub-gradients of L at αt and bt as follows: ∇αL = Kα −C X (zi,yi)∈S+ t yizi, ∇bL = C X (zi,yi)∈S+ t yi (16) The new solution, denoted by αt+1 and bt+1, is computed as follows: αt+1 k = π[0,+∞] ¡ αt k −γt[∇αL]k ¢ , bt+1 = bt −γt∇bL (17) where αt+1 k is the k-th element of vector αt+1, πG(x) projects x into the domain G, and γt is the step size that is set to be γt = C t by following the Pegasos algorithm [10] for solving SVMs. The pseudo-code of the proposed algorithm is summarized in Algorithm 1. Algorithm 1 Algorithm of Learning Bregman Distance Functions INPUT: • data matrix: X ∈RN×d • pair-wise constraint {(x1 i , x2 i , yi), i = 1, . . . , n} • kernel function: κ(x1, x2) = h(x⊤ 1 x2) • penalty cost parameter C OUTPUT: • Bregman coefficients α ∈RN +, b ∈R PROCEDURE 1: initialize Bregman coefficients: α = α0, b = b0 2: calculate kernel matrix: K = [h(x⊤ i xj)]N×N 3: calculate vectors zi: zi = [h(x1 i ) −h(x2 i )] ◦[X⊤(x1 i −x2 i )] 4: set iteration step t = 1; 5: repeat 6: (1) update the learning rate: γ = C/t, t = t + 1 7: (2) update subset of training instances: S+ t = {(zi, yi) ∈D : yi(z⊤ i α −b) < 1} 8: (3) compute the gradients w.r.t α and b: 9: ∇αL = Kα −C P zi∈S+ t yizi, ∇bL = C P zi∈S+ t yi 10: (4) update Bregman coefficients α = (α1, . . . , αn) and threshold b: 11: b ←b −γ∇bL, αk ←π[0,+∞] (αk −γ[∇αL]k) , k = 1, . . . , N 12: until convergence Computational complexity One of the major computational costs for Algorithm 1 is the preparation of kernel matrix K and vector {zi}n i=1, which fortunately can be pre-computed. Each step of the subgradient descent algorithm has a linear complexity, i.e., O(max(N, n)), which makes it reasonable even for large data sets with high dimensionality. The number of iterations for convergence is O(1/ϵ2) where ϵ is the target accuracy. It thus works fine if we are not critical about the accuracy of the solution. 3 Experiments We evaluate the proposed distance learning technique by semi-supervised clustering. In particular, we first learn a distance function from the given pairwise constraints and then apply the learned distance function to data clustering. We verify the efficacy and efficiency of the proposed technique by comparing it with a number of state-of-the-art algorithms for distance metric learning. 3.1 Experimental Testbed and Settings We adopt six well-known datasets from UCI machine learning repository, and six popular text benchmark datasets1 in our experiments. These datasets are chosen for clustering because they vary signif1The Reuter dataset is available at: http://renatocorrea.googlepages.com/textcategorizationdatasets 5 icantly in properties such as the number of clusters/classes, the number of features, and the number of instances. The diversity of datasets allows us to examine the effectiveness of the proposed learning technique more comprehensively. The details of the datasets are shown in Table 1. dataset #samples #feature #classes dataset #samples #feature #classes breast-cancer 683 10 2 w1a 2,477 300 2 diabetes 768 8 2 w2a 3,470 300 2 ionosphere 251 34 2 w6a 17,188 300 2 liver-disorders 345 6 2 WebKB 4,291 19,687 6 sonar 208 60 2 newsgroup 7,149 47,411 11 a1a 1,605 123 2 Reuter 10,789 5,189 79 Table 1: The details of our experimental testbed Similar to previous work [16], the pairwise constraints are created by random sampling. More specifically, we randomly sample a subset of pairs from the pool of all possible pairs (every two instances forms a pair). Two instances form a must-link constraint (i.e., yi = +1) if they share the same class label, and form a cannot-link constraint (i.e., yi = −1) if they are assigned to different classes. To calculate the Bregman function, in this experiment, we adopt the non-linear function h(x) = (exp(x⊤x1), . . . , exp(x⊤xN)). To perform data clustering, we run the k-means algorithm using the distance function learned from 500 randomly sampled positive constraints 500 random negative constraints. The number of clusters is simply set to the number of classes in the ground truth. The initial cluster centroids are randomly chosen from the dataset. To enable fair comparisons, all comparing algorithms start with the same set of initial centroids. We repeat each clustering experiment for 20 times, and report the final results by averaging over the 20 runs. We compare the proposed Bregman distance learning method using the k-means algorithm for semisupervised clustering, termed Bk-means, with the following approaches: (1) a standard k-means, (2) the constrained k-means [13] (Ck-means), (3) Ck-means with distance learned by RCA [2], (4) Ck-means with distance learned by DCA [8], (5) Ck-means with distance learned by the Xing’s algorithm [16] (Xing), (6) Ck-means with information-theoretic metric learning (ITML) [4], and (7) Ck-means with a distance function learned by a boosting algorithm (DistBoost) [12]. To evaluate the clustering performance, we use the some standard performance metrics, including pairwise Precision, pairwise Recall, and pairwise F1 measures [9], which are evaluated base on the pairwise results. Specifically, pairwise precision is the ratio of the number of correct pairs placed in the same cluster over the total number of pairs placed in the same cluster, pairwise recall is the ratio of the number of correct pairs placed in the same cluster over the total number of pairs actually placed in the same cluster, and pairwise F1 equals to 2 × precision × recall/(precision + recall). 3.2 Performance Evaluation on Low-dimensional Datasets The first set of experiments evaluates the clustering performance on six UCI datasets. Table 2 shows the average precision, recall, and F1 measurements of all the competing algorithms given a set of 1, 000 random constraints. The top two highest average F1 scores on each dataset were highlighted in bold font. From the results in Table 2, we observe that the proposed Bregman distance based k-means clustering approach (Bk-means) is either the best or the second best for almost all datasets, indicating that the proposed algorithm is in general more effective than the other algorithms for distance metric learning. 3.3 Performance Evaluation on High-dimensional Text Data We evaluate the clustering performance on six text datasets. Since some of the methods are infeasible for text clustering due to the high dimensionality, we only include the results for the methods which are feasible for this experiment (i.e., OOM indicates the method takes more than 10 hours, and OOT indicates the method needs more than 16G REM). Table 3 summarizes the F1 performance of all feasible methods for datasets w1a, w2a, w6a, WebKB, 20newsgroup and reuter. Since cosine similarity is commonly used in textual domain, we use k-means, Ck-means in both Euclidian space and Cosine similarity space as baselines. The best F1 scores are marked in bold in Table 3. The results show that the learned Bregman distance function is applicable for high dimensional data, and it outperforms the other commonly used text clustering methods for four out of six datasets. 6 breast diabetes method precision recall F1 precision recall F1 baseline 72.85±3.77 72.52±2.30 72.73±3.42 52.47±8.93 57.17±3.68 56.41±4.53 Ck-means 98.10±2.20 81.01±0.10 85.31±1.48 60.06±1.13 55.98±0.64 57.57±0.85 ITML 97.05±2.77 88.96±0.30 91.94±2.15 73.93±1.28 70.11±0.41 71.55±0.81 Xing 93.61±0.14 84.19±0.83 88.11±0.22 58.11±0.48 58.31±0.16 58.21±0.31 RCA 85.40±0.14 94.16±0.29 90.18±2.94 59.86±2.99 62.70±2.18 61.22±2.59 DCA 94.53±0.34 93.23±0.29 93.88±0.22 61.23±2.05 64.88±0.56 63.00±0.75 DistBoost 94.76±0.24 93.83±0.31 94.29±0.29 64.45±1.02 68.33±0.98 66.33±1.00 Bk-means 99.04±0.10 98.33±0.24 98.37±0.19 99.42±0.40 64.68±0.63 77.43±0.92 ionosphere liver-disorders method precision recall F1 precision recall F1 baseline 62.35±6.30 53.39±2.74 57.28±6.20 63.92±8.60 50.50±0.40 55.67±5.96 Ck-means 57.05±1.24 51.28±1.58 61.46±1.36 62.90±8.43 50.35±1.68 55.13±1.63 ITML 97.10±2.70 59.99±0.31 72.62±1.24 93.53±3.28 55.57±0.10 68.73±1.40 Xing 63.46±0.11 64.10±0.03 63.52±0.39 95.42±2.85 49.65±0.08 65.31±1.10 RCA 100.00±6.19 50.36±1.44 66.99±0.45 59.56±18.95 52.15±1.68 54.92±5.76 DCA 66.36±3.01 67.01±2.12 66.68±0.00 70.18±4.27 50.41±0.07 58.67±1.63 DistBoost 75.91±1.11 69.34±0.91 72.72±1.03 51.60±1.43 52.88±1.31 52.23±1.37 Bk-means 97.64±1.93 62.71±1.94 73.28±1.93 96.89±4.11 50.29±2.09 66.86±3.10 sonar a1a method precision recall F1 precision recall F1 baseline 52.98±2.05 50.84±1.69 51.87±1.47 55.81±1.01 69.99±0.91 62.10±0.99 Ck-means 60.44±4.53 51.71±1.17 55.32±1.37 69.91±0.08 80.34±0.18 77.01±0.12 ITML 98.68±2.46 56.31±2.28 70.46±2.35 99.99±0.98 70.30±0.54 81.76±0.76 Xing 96.99±4.53 69.81±0.05 79.83±2.70 57.70±1.32 70.89±1.01 63.62±1.21 RCA 100.00±13.69 69.81±1.33 79.83±5.85 76.64±0.08 66.96±0.35 69.96±0.18 DCA 100.00±0.64 59.75±0.30 73.11±0.57 57.15±1.32 71.76±1.87 63.63±1.55 DistBoost 76.64±0.57 74.48±0.69 75.54±0.62 n/a n/a n/a Bk-means 99.20±1.62 74.24±1.23 82.52±1.44 99.98±0.21 77.72±0.17 86.32±0.19 Table 2: Evaluation of clustering performance (average precision, recall, and F1) on six UCI datasets. The top two F1 scores are highlighted in bold font for each dataset. methods w1a w2a w6a WebKB newsgroup Reuter k-means(EU) 76.68±0.25 72.59±0.77 76.52±0.97 35.78±0.17 16.54±0.05 43.88±0.23 k-means(Cos) 76.87±5.61 73.47±1.35 77.16±1.27 35.18±3.41 18.87±0.14 45.42±0.73 Ck-means(EU) 87.04±1.15 97.23±1.21 76.52±1.01 70.84±2.29 19.12±0.54 56.00±0.42 Ck-means(Cos) 87.14±2.14 97.14±2.12 75.32±0.91 75.84±1.08 20.08±0.49 58.24±0.82 RCA 91.00±1.02 96.45±1.17 93.51±1.13 OOM OOM OOT DCA 92.13±1.04 94.30±2.56 87.44±1.99 OOM OOM OOT ITML 92.31±0.84 94.12±0.92 96.95 ±0.13 OOT OOM OOT Bk-means 93.43±1.07 96.92±1.02 98.64±0.24 73.94±1.25 25.17±1.27 64.51±0.95 Table 3: Evaluation of clustering F1 performance on the high dimensional text data. Only applicable methods are shown. OOM indicates “out of memory”, and OOT indicates “out of time”. 3.4 Computational Complexity Here, we evaluate the running time of semi-supervised clustering. For a conventional clustering algorithm such as k-means, its computational complexity is determined by both the calculation of distance and the clustering scheme. For a semi-supervised clustering algorithm based on distance learning, the overall computational time include both the time for training an appropriate distance function and the time for clustering data points. The average running times of semi-supervised clustering over the six UCI datasets are listed in Table 4. It is clear that the Bregman distance based clustering has comparable efficiency with simple methods like RCA and DCA on low dimensional data, and runs much faster than Xing, ITML, and DistBoost. On the high dimensional text data, it is much faster than other applicable DML methods. Algorithm k-means Ck-means ITML Xing RCA DCA DistBoost Bk-means UCI data(Sec.) 0.51 0.72 7.59 8.56 0.88 0.90 13.09 1.70 Text data(Min.) 0.78 4.56 71.55 n/a 68.90 69.34 n/a 3.84 Table 4: Comparison of average running time over the six UCI datasets and subsets of six text datasets (10% sampling from the datasets in Table 1). 7 4 Conclusions In this paper, we propose to learn a Bregman distance function for clustering algorithms using a non-parametric approach. The proposed scheme explicitly address two shortcomings of the existing approaches for distance fuction/metric learning, i.e., assuming a fixed distance metric for the entire input space and high computational cost for high dimensional data. We incorporate the Bregman distance function into the k-means clustering algorithm for semi-supervised data clustering. Experiments of semi-supervised clustering with six UCI datasets and six high dimensional text datasets have shown that the Bregman distance function outperforms other distance metric learning algorithms in F1 measure. It also verifies that the proposed distance learning algorithm is computationally efficient, and is capable of handling high dimensional data. Acknowledgements This work was done when Mr. Lei Wu was an RA at Nanyang Technological University, Singapore. This work was supported in part by MOE tier-1 Grant (RG67/07), NRF IDM Grant (NRF2008IDM-IDM-004-018), National Science Foundation (IIS-0643494), and US Navy Research Office (N00014-09-1-0663). APPENDIX A: Proof of Proposition 2 Proof. First, let us denote by f as follows: f = ( √ M −√m)[d(xa, xc)d(xc, xb)]1/4 The square of the right side of Eq. (2) is ( p d(xa, xc) + p d(xc, xb) + f 1/4)2 = d(xa, xb) −η(xa, xb, xc) + δ(xa, xb, xc) where δ(xa, xb, xc) = f 2 + 2f p d(xa, xc) + 2f p d(xc, xb) + 2 p d(xa, xc)d(xc, xb) η(xa, xb, xc) = (∇ϕ(xa) −∇ϕ(xc))(xc −xb) + (∇ϕ(xc) −∇ϕ(xb))(xa −xc). From this above equation, the proposition holds if and only if δ(xa, xb, xc) −η(xa, xb, xc) ≥0. From the fact that δ(xa, xb, xc) −η(xa, xb, xc) = ( √ M −√m)2 + 2( √ M −√m) ³ d(xa, xc) 3 4 d(xc, xb) 1 4 + d(xc, xb) 3 4 d(xa, xc) 1 4 ´ + 2d(xa, xc)d(xc, xb) p d(xa, xc)d(xc, xb) since √ M > √m and the distance function d(·) ≥0, we get δ(xa, xb, xc)−η(xa, xb, xc) ≥0. APPENDIX B: Proof of Theorem 1 Proof. We write ϕ(x) = ϕ∥(x) + ϕ⊥(x) where ϕ∥(x) ∈H∥= Z y∈A dyq(y)h(x⊤y), ϕ⊥(x) ∈H⊥= Z y∈¯ A dyq(y)h(x⊤y) Thus, the distance function defined in (1) is then expressed as d(xa, xb) = (xa −xb)⊤¡ ∇ϕ∥(xa) −∇ϕ∥(xb) ¢ + (xa −xb)⊤(∇ϕ⊥(xa) −∇ϕ⊥(xb)) = Z y∈A q(y)(h′(x⊤ a y) −h′(x⊤ b y))y⊤(xa −xb) + Z y∈¯ A q(y)(h′(x⊤ a y) −h′(x⊤ b y))y⊤(xa −xb) = Z y∈A q(y)(h′(x⊤ a y) −h′(x⊤ b y))y⊤(xa −xb) = (xa −xb)⊤¡ ∇ϕ∥(xa) −∇ϕ∥(xb) ¢ Since |ϕ(x)|2 Hκ = |ϕ∥(x)|2 Hκ +|ϕ⊥(x)|2 Hκ, the minimizer of (1) should have |ϕ⊥(x)|2 Hκ = 0. Since |ϕ⊥(x)| = ⟨ϕ⊥(·), κ(x, ·)⟩Hκ ≤|κ(x, ·)|Hκ|ϕ⊥|Hκ = 0,, we have ϕ⊥(x) = 0 for any x. We thus have ϕ(x) = ϕ∥(x), which leads to the result in the theorem. 8 References [1] A. Banerjee, S. Merugu, I. Dhillon, and J. Ghosh. Clustering with bregman divergences. In Journal of Machine Learning Research, pages 234–245, 2004. [2] A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning a mahalanobis metric from equivalence constraints. JMLR, 6:937–965, 2005. [3] L. Bregman. The relaxation method of finding the common points of convex sets and its application to the solution of problems in convex programming. USSR Computational Mathematics and Mathematical Physics, 7:200–217, 1967. [4] J. V. Davis, B. Kulis, P. Jain, S. Sra, and I. S. Dhillon. Information-theoretic metric learning. In ICML’07, pages 209–216, Corvalis, Oregon, 2007. [5] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighborhood component analysis. In NIPS. [6] T. Hertz, A. B. Hillel, and D. Weinshall. Learning a kernel function for classification with small training samples. In ICML ’06: Proceedings of the 23rd international conference on Machine learning, pages 401–408. ACM, 2006. [7] S. C. H. Hoi, W. Liu, and S.-F. Chang. Semi-supervised distance metric learning for collaborative image retrieval. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR2008), June 2008. [8] S. C. H. Hoi, W. Liu, M. R. Lyu, and W.-Y. Ma. Learning distance metrics with contextual constraints for image retrieval. In Proc. CVPR2006, New York, US, June 17–22 2006. [9] Y. Liu, R. Jin, and A. K. Jain. Boostcluster: boosting clustering by pairwise constraints. In KDD’07, pages 450–459, San Jose, California, USA, 2007. [10] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for svm. In ICML ’07: Proceedings of the 24th international conference on Machine learning, pages 807–814, New York, NY, USA, 2007. ACM. [11] L. Si, R. Jin, S. C. H. Hoi, and M. R. Lyu. Collaborative image retrieval via regularized metric learning. ACM Multimedia Systems Journal, 12(1):34–44, 2006. [12] T. H. Tomboy, A. Bar-hillel, and D. Weinshall. Boosting margin based distance functions for clustering. In In Proceedings of the Twenty-First International Conference on Machine Learning, pages 393–400, 2004. [13] K. Wagstaff, C. Cardie, S. Rogers, and S. Schr¨odl. Constrained k-means clustering with background knowledge. In ICML’01, pages 577–584, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. [14] K. Weinberger, J. Blitzer, and L. Saul. Distance metric learning for large margin nearest neighbor classification. In NIPS 18, pages 1473–1480, 2006. [15] L. Wu, S. C. H. Hoi, J. Zhu, R. Jin, and N. Yu. Distance metric learning from uncertain side information with application to automated photo tagging. In Proceedings of ACM International Conference on Multimedia (MM2009), Beijing, China, Oct. 19–24 2009. [16] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning with application to clustering with side-information. In NIPS2002, 2002. [17] L. Yang, R. Jin, R. Sukthankar, and Y. Liu. An efficient algorithm for local distance metric learning. In Proceedings of the Twenty-Second Conference on Artificial Intelligence (AAAI), 2006. 9
2009
55
3,805
Ranking Measures and Loss Functions in Learning to Rank Wei Chen∗ Chinese Academy of sciences chenwei@amss.ac.cn Tie-Yan Liu Microsoft Research Asia tyliu@micorsoft.com Yanyan Lan Chinese Academy of sciences lanyanyan@amss.ac.cn Zhiming Ma Chinese Academy of sciences mazm@amt.ac.cn Hang Li Microsoft Research Asia hangli@micorsoft.com Abstract Learning to rank has become an important research topic in machine learning. While most learning-to-rank methods learn the ranking functions by minimizing loss functions, it is the ranking measures (such as NDCG and MAP) that are used to evaluate the performance of the learned ranking functions. In this work, we reveal the relationship between ranking measures and loss functions in learningto-rank methods, such as Ranking SVM, RankBoost, RankNet, and ListMLE. We show that the loss functions of these methods are upper bounds of the measurebased ranking errors. As a result, the minimization of these loss functions will lead to the maximization of the ranking measures. The key to obtaining this result is to model ranking as a sequence of classification tasks, and define a so-called essential loss for ranking as the weighted sum of the classification errors of individual tasks in the sequence. We have proved that the essential loss is both an upper bound of the measure-based ranking errors, and a lower bound of the loss functions in the aforementioned methods. Our proof technique also suggests a way to modify existing loss functions to make them tighter bounds of the measure-based ranking errors. Experimental results on benchmark datasets show that the modifications can lead to better ranking performances, demonstrating the correctness of our theoretical analysis. 1 Introduction Learning to rank has become an important research topic in many fields, such as machine learning and information retrieval. The process of learning to rank is as follows. In training, a number of sets are given, each set consisting of objects and labels representing their rankings (e.g., in terms of multi-level ratings1). Then a ranking function is constructed by minimizing a certain loss function on the training data. In testing, given a new set of objects, the ranking function is applied to produce a ranked list of the objects. Many learning-to-rank methods have been proposed in the literature, with different motivations and formulations. In general, these methods can be divided into three categories [3]. The pointwise approach, such as subset regression [5] and McRank [10], views each single object as the learning instance. The pairwise approach, such as Ranking SVM [7], RankBoost [6], and RankNet [2], regards a pair of objects as the learning instance. The listwise approach, such as ListNet [3] and ∗The work was performed when the first and the third authors were interns at Microsoft Research Asia. 1In information retrieval, such a label represents the relevance of a document to the given query. 1 ListMLE [16], takes the entire ranked list of objects as the learning instance. Almost all these methods learn their ranking functions by minimizing certain loss functions, namely the pointwise, pairwise, and listwise losses. On the other hand, however, it is the ranking measures that are used to evaluate the performance of the learned ranking functions. Taking information retrieval as an example, measures such as Normalized Discounted Cumulative Gain (NDCG) [8] and Mean Average Precision (MAP) [1] are widely used, which obviously differ from the loss functions used in the aforementioned methods. In such a situation, a natural question to ask is whether the minimization of the loss functions can really lead to the optimization of the ranking measures.2 Actually people have tried to answer this question. It has been proved in [5] and [10] that the regression and classification based losses used in the pointwise approach are upper bounds of (1−NDCG). However, for the pairwise and listwise approaches, which are regarded as the state-of-the-art of learning to rank [3, 11], limited results have been obtained. The motivation of this work is to reveal the relationship between ranking measures and the pairwise/listwise losses. The problem is non-trivial to solve, however. Note that ranking measures like NDCG and MAP are defined with the labels of objects (i.e., in terms of multi-level ratings). Therefore it is relatively easy to establish the connection between the pointwise losses and the ranking measures, since the pointwise losses are also defined with the labels of objects. In contrast, the pairwise and listwise losses are defined with the partial or total order relations among objects, rather than their individual labels. As a result, it is much more difficult to bridge the gap between the pairwise/listwise losses and the ranking measures. To tackle the challenge, we propose making a transformation of the labels on objects to a permutation set. All the permutations in the set are consistent with the labels, in the sense that an object with a higher rating is ranked before another object with a lower rating in the permutation. We then define an essential loss for ranking on the permutation set as follows. First, for each permutation, we construct a sequence of classification tasks, with the goal of each task being to distinguish an object from the objects ranked below it in the permutation. Second, the weighted sum of the classification errors of individual tasks in the sequence is computed. Third, the essential loss is defined as the minimum value of the weighted sum over all the permutations in the set. Our study shows that the essential loss has several nice properties, which help us reveal the relationship between ranking measures and the pairwise/listwise losses. First, it can be proved that the essential loss is an upper bound of measure-based ranking errors such as (1−NDCG) and (1−MAP). Furthermore, the zero value of the essential loss is a sufficient and necessary condition for the zero values of (1−NDCG) and (1−MAP). Second, it can be proved that the pairwise losses in Ranking SVM, RankBoost, and RankNet, and the listwise loss in ListMLE are all upper bounds of the essential loss. As a consequence, we come to the conclusion that the loss functions used in these methods can bound (1−NDCG) and (1−MAP) from above. In other words, the minimization of these loss functions can effectively maximize NDCG and MAP. The proofs of the above results suggest a way to modify existing pairwise/listwise losses so as to make them tighter bounds of (1−NDCG). We hypothesize that tighter bounds will lead to better ranking performances; we tested this hypothesis using benchmark datasets. The experimental results show that the methods minimizing the modified losses can outperform the original methods, as well as many other baseline methods. This validates the correctness of our theoretical analysis. 2 Related work In this section, we review the widely-used loss functions in learning to rank, ranking measures in information retrieval, and previous work on the relationship between loss functions and ranking measures. 2Note that recently people try to directly optimize ranking measures [17, 12, 14, 18]. The relationship between ranking measures and the loss functions in such work is explicitly known. However, for other methods, the relationship is unclear. 2 2.1 Loss functions in learning to rank Let x = {x1, · · · , xn} be the objects be to ranked.3 Suppose the labels of the objects are given as multi-level ratings L = {l(1), ..., l(n)}, where l(i) ∈{r1, ..., rK} denotes the label of xi [11]. Without loss of generality, we assume l(i) ∈{0, 1, ..., K −1} and name the corresponding labels as K-level ratings. If l(i) > l(j), then xi should be ranked before xj. Let F be the function class and f ∈F be a ranking function. The optimal ranking function is learned from the training data by minimizing a certain loss function defined on the objects, their labels, and the ranking function. Several approaches have been proposed to learn the optimal ranking function. In the pointwise approach, the loss function is defined on the basis of single objects. For example, in subset regression [5], the loss function is as follows, Lr(f; x, L) = n X i=1 f(xi) −l(i) 2. (1) In the pairwise approach, the loss function is defined on the basis of pairs of objects whose labels are different. For example, the loss functions of Ranking SVM [7], RankBoost [6], and RankNet [2] all have the following form, Lp(f; x, L) = n−1 X s=1 n X i=1,l(i)<l(s) φ f(xs) −f(xi)  , (2) where the φ functions are hinge function (φ(z) = (1 −z)+), exponential function (φ(z) = e−z), and logistic function (φ(z) = log(1 + e−z)) respectively, for the three algorithms. In the listwise approach, the loss function is defined on the basis of all the n objects. For example, in ListMLE [16], the following loss function is used, Ll(f; x, y) = n−1 X s=1  −f(xy(s)) + ln n X i=s exp(f(xy(i)))  , (3) where y is a randomly selected permutation (i.e., ranked list) that satisfies the following condition: for any two objects xi and xj, if l(i) > l(j), then xi is ranked before xj in y. Notation y(i) represents the index of the object ranked at the i-th position in y. 2.2 Ranking measures Several ranking measures have been proposed in the literature to evaluate the performance of a ranking function. Here we introduce two of them, NDCG [8] and MAP[1], which are popularly used in information retrieval. NDCG is defined with respect to K-level ratings L, NDCG(f; x, L) = 1 Nn n X r=1 G l(πf(r))  D(r), where πf is the ranked list produced by ranking function f, G is an increasing function (named the gain function), D is a decreasing function (named the position discount function), and Nn = maxπ Pn r=1 G l(π(r))  D(r). In practice, one usually sets G(z) = 2z −1; D(z) = 1 log2(1+z) if z ≤C, and D(z) = 0 if z > C (C is a fixed integer). MAP is defined with respect to 2-level ratings as follows, MAP(f; x, L) = 1 n1 X s:l(πf (s))=1 P i≤s I{l(πf (i))=1} s . (4) where I{·} is the indicator function, and n1 is the number of objects with label 1. When the labels are given in terms of K-level ratings (K > 2), a common practice of using MAP is to fix a level k∗, and regard all the objects whose levels are lower than k∗as having label 0, and regard the other objects as having label 1 [11]. From the definitions of NDCG and MAP, we can see that their maximum values are both one. Therefore, we can consider (1−NDCG) and (1−MAP) as ranking errors. For ease of reference, we call them measure-based ranking errors. 3For example, for information retrieval, x represents the documents associated with a query. 3 2.3 Previous bounds For the pointwise approach, the following results have been obtained in [5] and [10].4 The regression based pointwise loss is an upper bound of (1−NDCG), 1 −NDCG(f; x, L) ≤ 1 Nn  2 n X i=1 D(i)21/2 Lr(f; x, L)1/2. The classification based pointwise loss is also an upper bound of (1−NDCG), 1 −NDCG(f; x, L) ≤15 √ 2 Nn  n X i=1 D(i)2 −n n Y i=1 D(i)2/n1/2 n X i=1 I{ˆl(i)̸=l(i)} 1/2 , where ˆl(i) is the label of object xi predicted by the classifier, in the setting of 5-level ratings. For the pairwise approach, the following result has been obtained [9], 1 −MAP(f; x, L) ≤1 −1 n1 (Lp(f; x, L) + C2 n1+1)−1( n1 X i=1 √ i)2. According to the above results, minimizing the regression and classification based pointwise losses will minimize (1−NDCG). Note that the zero values of these two losses are sufficient but not necessary conditions for the zero value of (1−NDCG). That is, when (1−NDCG) is zero, the loss functions may still be very large [10]. For the pairwise losses, the result is even weaker: their zero values are even not sufficient for the zero value of (1-MAP). To the best of our knowledge, there was no other theoretical result for the pairwise/listwise losses. Given that the pairwise and listwise approaches are regarded as the state-of-the-art in learning to rank [3, 11], it is very meaningful and important to perform more comprehensive analysis on these two approaches. 3 Main results In this section, we present our main results on the relationship between ranking measures and the pairwise/listwise losses. The basic conclusion is that many pairwise and listwise losses are upper bounds of a quantity which we call the essential loss, and the essential loss is an upper bound of both (1−NDCG) and (1−MAP). Furthermore, the zero value of the essential loss is a sufficient and necessary condition for the zero values of (1−NDCG) and (1−MAP). 3.1 Essential loss: ranking as a sequence of classifications In this subsection, we describe the essential loss for ranking. First, we propose an alternative representation of the labels of objects (i.e., multi-level ratings). The basic idea is to construct a permutation set, with all the permutations in the set being consistent with the labels. The definition that a permutation is consistent with multi-level ratings is given as below. Definition 1. Given multi-level ratings L and permutation y, we say y is consistent with L, if ∀i, s ∈{1, ..., n} satisfying i < s, we always have l(y(i)) ≥l(y(s)), where y(i) represents the index of the object that is ranked at the i-th position in y. We denote YL = {y|y is consistent with L}. According to the definition, it is clear that the NDCG and MAP of a ranking function equal one, if and only if the ranked list (permutation) given by the ranking function is consistent with the labels. Second, given each permutation y ∈YL, we decompose the ranking of objects x into several sequential steps. For each step s, we distinguish xy(s), the object ranked at the s-th position in y, from all the other objects ranked below the s-th position in y, using ranking function f.5 Specifically, we denote x(s) = {xy(s), · · · , xy(n)} and define a classifier based on f, whose target output is y(s), Tf(x(s)) = arg max j∈{y(s),··· ,y(n)} f(xj). (5) 4Note that the bounds given in the original papers of [5] and [10] are with respect to DCG. Here we give their equivalent forms in terms of NDCG, and set P(·|xi, S) = δl(i)(·) in the bound of [5], for ease of comparison. 5For simplicity and clarity, we assume f(xi) ̸= f(xj) ∀i ̸= j, such that the classifier will have a unique output. It can be proved (see [4]) that the main results in this paper still hold without this assumption. 4 It is clear that there are n −s possible outputs of this classifier, i.e., {y(s), · · · , y(n)}. The 0-1 loss for this classification task can be written as follows, where the second equality is based on the definition of Tf, ls f; x(s), y(s)  = I{Tf (x(s))̸=y(s)} = 1 − n Y i=s+1 I{f(xy(s))>f(xy(i))}. We give a simple example in Figure 1 to illustrate the aforementioned process of decomposition. y π y π y π   A B C     B A C   incorrect ======⇒ remove A  B C   B C  correct =======⇒ remove B C  C  Figure 1: Modeling ranking as a sequence of classifications Suppose there are three objects, A, B, and C, and a permutation y = (A, B, C). Suppose the output of the ranking function for these objects is (2, 3, 1), and accordingly the predicted ranked list is π = (B, A, C). At step one of the decomposition, the ranking function predicts object B to be on the top of the list. However, A should be on the top according to y. Therefore, a prediction error occurs. For step two, we remove A from both y and π. Then the ranking function predicts object B to be on the top of the remaining list. This is in accordance with y and there is no prediction error. After that, we further remove object B, and it is easy to verify there is no prediction error in step three either. Overall, the ranking function makes one error in this sequence of classification tasks. Third, we assign a non-negative weight β(s)(s = 1, · · · , n −1) to the classification task at the s-th step, representing its importance to the entire sequence. We compute the weighted sum of the classification errors of all individual tasks, Lβ(f; x, y) ≜ n−1 X s=1 β(s) 1 − n Y i=s+1 I{f(xy(s))>f(xy(i))}  , (6) and then define the minimum value of the weighted sum over all the permutations in YL as the essential loss for ranking. Lβ(f; x, L) = min y∈YL Lβ(f; x, y). (7) According to the above definition of the essential loss, we can obtain its following nice property. Denote the ranked list produced by f as πf. Then it is easy to verify that, Lβ(f; x, L) = 0 ⇐⇒∃y ∈YL satisfying Lβ(f; x, y) = 0 ⇐⇒πf = y ∈YL. In other words, the essential loss is zero if and only if the permutation given by the ranking function is consistent with the labels. Further considering the discussions on the consistent permutation at the begining of this subsection, we can come to the conclusion that the zero value of the essential loss is a sufficient and necessary condition for the zero values of (1-NDCG) and (1-MAP). 3.2 Essential loss: upper bound of measure-based ranking errors In this subsection, we show that the essential loss is an upper bound of (1−NDCG) and (1−MAP), when specific weights β(s) are used. Theorem 1. Given K-level rating data (x, L) with nk objects having label k and PK i=k∗ni > 0, then ∀f, the following inequalities hold, (1) 1 −NDCG(f; x, L) ≤ 1 Nn Lβ1(f; x, L), where β1(s) = G l(y(s))  D(s), ∀y ∈YL; (2) 1 −MAP(f; x, L) ≤ 1 PK i=k∗ni Lβ2(f; x, L), where β2(s) ≡1. Proof. (1) We now prove the inequality for (1−NDCG). First, we reformulate NDCG using the permutation set YL. This can be done by changing the index of the sum in NDCG from the rank 5 position r in πf to the rank position s in ∀y ∈YL. Considering that s = y−1πf(r)  and r = π−1 f y(s)  , it is easy to verify, NDCG(f; x, L) = 1 Nn n X s=1 G  l πf(π−1 f y(s))  D π−1 f (y(s))  = 1 Nn n X s=1 G l(y(s))  D π−1 f (y(s))  . Second, we consider the essential loss case by case. Note that Lβ1(f; x, L) = min y∈YL n−1 X s=1 G l(y(s))  D(s) 1 − n Y i=s+1 I{π−1 f (y(s))<π−1 f (y(i))}  . Then ∀y ∈YL, if position s satisfies Qn i=s+1 I{π−1 f (y(s))<π−1 f (y(i))} = 1 (i.e., ∀i > s, π−1 f (y(s)) < π−1 f (y(i))), we have π−1 f (y(s)) ≤s. As a consequence, D(s) Qn i=s+1 I{π−1 f (y(s))<π−1 f (y(i))} = D(s) ≤D π−1 f (y(s))  . Otherwise, if Qn i=s+1 I{π−1 f (y(s))<π−1 f (y(i))} = 0, it is easy to see that D(s) Qn i=s+1 I{π−1 f (y(s))<π−1 f (y(i))} = 0 ≤D π−1 f (y(s))  . To sum up, ∀s ∈{1, 2, ..., n −1}, D(s) Qn i=s+1 I{π−1 f (y(s))<π−1 f (y(i))} ≤D π−1 f (y(s))  . Further considering π−1 f (y(n)) ≤n and D(·) is a decreasing function, we have D(n) ≤D π−1 f (y(n))  . As a result, we obtain, 1 −NDCG(f; x, L) = 1 Nn n X s=1 G l(y(s))  D(s) −D π−1 f (y(s))  ≤ 1 Nn Lβ1(f; x, L). (2) We then prove the inequality for (1−MAP). First, we prove the result for 2-level ratings. Given 2-level rating data (x, L), it can be proved (see Lemma 1 in [4]) that Lβ2(f; x, L) = n1 −i0 + 1, where i0 denotes the position of the first object with label 0 in πf, and i0 ≤n1+1. We then consider n1 1 −MAP(f; x, L)  = n1 −P s: l(πf (s))=1 P i≤s I{l(πf (i))=1} s case by case. If i0 > n1 (i.e., the first object with label 0 is ranked after position n1 in πf), then all the objects with label 1 are ranked before the objects with label 0. Thus n1(1 −MAP(f; x, L)) = n1 −n1 = 0 = Lβ2(f; x, L). If i0(πf) ≤n1, there are i0(πf) −1 objects with label 1 ranked before all the objects with label 0. Thus n1(1 −MAP(f; x, L)) ≤n1 −i0(πf) + 1 = Lβ2(f; x, L). This proves the theorem for 2-level ratings. Second, given K-level rating data (x, L), we denote the 2-level ratings induced by L as L′. Then it is easy to verify YL ⊆YL′. As a result, we have, Lβ2(f; x, L′) = min y∈YL′ Lβ2(f; x, y) ≤min y∈YL Lβ2(f; x, y) = Lβ2(f; x, L). Using the result for 2-level ratings, we obtain 1 −MAP(f; x, L) = 1 −MAP(f; x, L′) ≤ 1 PK−1 i=k∗ni Lβ2(f; x, L′) ≤ 1 PK−1 i=k∗ni Lβ2(f; x, L). 3.3 Essential loss: lower bound of loss functions In this section, we show that many pairwise/listwise losses are upper bounds of the essential loss. Theorem 2. The pairwise losses in Ranking SVM, RankBoost, and RankNet, and the listwise loss in ListMLE are all upper bounds of the essential loss, i.e., (1) Lβ(f; x, L) ≤ max 1≤s≤n−1 β(s)  Lp(f; x, L); (2) Lβ(f; x, L) ≤ 1 ln 2 max 1≤s≤n−1 β(s)  Ll(f; x, y), ∀y ∈YL. Proof. (1) We now prove the inequality for the pairwise losses. First, we reformulate the pairwise losses using permutation set YL, Lp(f; x, L) = n−1 X s=1 n X i=s+1, l(y(s))̸=l(y(i)) φ f(xy(s)) −f(xy(i))  = n−1 X s=1 n X i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  , 6 where y is an arbitrary permutation in YL, a(i, j) = 1 if l(i) ̸= l(j); a(i, j) = 0 otherwise. Note that only those pairs whose first object has a larger label than the second one are counted in the pairwise loss. Thus, the value of the pairwise loss is equal ∀y ∈YL. Second, we consider the value of a Tf(x(s)), y(s)  case by case. ∀y and ∀s ∈{1, 2, ..., n −1}, if a Tf(x(s)), y(s)  = 1 (i.e., ∃i0 > s, satisfying l(y(i0)) ̸= l(y(s)) and f(xy(i0)) > f(xy(s))), considering that function φ in Ranking SVM, RankBoost and RankNet are all non-negative, nonincreasing, and φ(0) = 1, we have, n X i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  ≥ a y(i0), y(s)  φ f(xy(s)) −f(xy(i0))  = φ f(xy(s)) −f(xy(i0))  > 1 = a Tf(x(s)), y(s)  . If a Tf(x(s)), y(s)  = 0, it is clear that Pn i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  ≥0 = a Tf(x(s)), y(s)  . Therefore, n−1 X s=1 β(s) n X i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  ≥ n−1 X s=1 β(s)a Tf(x(s)), y(s)  . (8) Third, it can be proved (see Lemma 2 in [4]) that the following inequality holds, Lβ(f; x, L) ≤max y∈YL n−1 X s=1 β(s)a Tf(x(s)), y(s)  . Considering inequality (8) and noticing that the pairwise losses are equal ∀y ∈YL, we have Lβ(f; x, L) ≤max y∈YL n−1 X s=1 β(s) n X i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  ≤ max 1≤s≤n−1 β(s)  Lp(f; x, L). (2) We then prove the inequality for the loss function of ListMLE. Again, we prove the result case by case. Consider the loss of ListMLE in Eq.(3). ∀y and ∀s ∈{1, 2, ..., n −1}, if I{Tf (x(s))̸=y(s)} = 1 (i.e., ∃i0 > s satisfying f(xy(i0)) > f(xy(s))), then ef(xy(s)) < 1 2 Pn i=s ef(xy(s)). Therefore, we have −ln e f(xy(s)) P n i=s e f(xy(i)) > ln 2 = ln 2 I{Tf (x(s))̸=y(s)}. If I{Tf (x(s))̸=y(s)} = 0, then it is clear −ln e f(xy(s)) P n i=s e f(xy(i)) > 0 = ln 2 I{Tf (x(s))̸=y(s)}. To sum up, we have, n−1 X s=1 β(s)  −ln ef(xy(s)) Pn i=s ef(xy(i))  > n−1 X s=1 β(s) ln 2 I{Tf (x(s))̸=y(s)} ≥ln 2 min y∈YL Lβ(πf, y) = ln 2 Lβ(πf, L). By further relaxing the inequality, we obtain the following result, Lβ(f; x, L) ≤ 1 ln 2 max 1≤s≤n−1 β(s)  Ll(f; x, y), ∀y ∈YL. 3.4 Summary We have the following inequalities by combining the results obtained in the previous subsections. (1) The pairwise losses in Ranking SVM, RankBoost, and RankNet are upper bounds of (1−NDCG) and (1−MAP). 1 −NDCG(f; x, L) ≤G(K −1)D(1) Nn Lp(f; x, L); 1 −MAP(f; x, L) ≤ 1 PK i=k∗ni Lp(f; x, L). (2) The listwise loss in ListMLE is an upper bound of (1−NDCG) and (1−MAP). 1 −NDCG(f; x, L) ≤G(K −1)D(1) Nn ln 2 Ll(f; x, y), ∀y ∈YL; 1 −MAP(f; x, L) ≤ 1 ln 2 PK i=k∗ni Ll(f; x, y), ∀y ∈YL. 7 Table 1: Ranking accuracy on OHSUMED Methods RankNet W-RankNet ListMLE W-ListMLE NDCG@5 0.4568 0.4868 0.4471 0.4588 NDCG@10 0.4414 0.4604 0.4347 0.4453 Methods Regression Ranking SVM RankBoost FRank ListNet SVMMAP NDCG@5 0.4278 0.4164 0.4494 0.4588 0.4432 0.4516 NDCG@10 0.4110 0.414 0.4302 0.4433 0.441 0.4319 4 Discussion The proofs of Theorems 1 and 2 actually suggest a way to improve existing loss functions. The key idea is to introduce weights related to β1(s) to the loss functions so as to make them tighter bounds of (1−NDCG). Specifically, we introduce weights to the pairwise and listwise losses in the following way, ˜Lp(f; x, L) = n−1 X s=1 G l(y(s))  D  1 + K−1 X k=l(y(s))+1 nk  n X i=s+1 a y(i), y(s)  φ f(xy(s)) −f(xy(i))  , ∀y ∈YL; ˜Ll(f; x, y) = n−1 X s=1 G l(y(s))  D(s)  −f(xy(s)) + ln n X i=s exp(f(xy(i)))  . It can be proved (see Proposition 1 in [4]) that the above weighted losses are still upper bounds of (1−NDCG) and they are lower bounds of the original pairwise and listwise losses. In other words, the above weighted loss functions are tighter bounds of (1−NDCG) than existing loss functions. We tested the effectiveness of the weighted loss functions on the OHSUMED dataset in LETOR 3.0.6 We took RankNet and ListMLE as example algorithms. The methods that minimize the weighted loss functions are referred to as W-RankNet and W-ListMLE. From Table 1, we can see that (1) W-RankNet and W-ListMLE significantly outperform RankNet and ListMLE. (2) W-RankNet and W-ListMLE also outperform other baselines on LETOR such as Regression, Ranking SVM, RankBoost, FRank [15], ListNet and SVMMAP [18]. These experimental results seem to indicate that optimizing tighter bounds of the ranking measures can lead to better ranking performances. 5 Conclusion and future work In this work, we have proved that many pairwise/listwise losses in learning to rank are actually upper bounds of measure-based ranking errors. We have also shown a way to improve existing methods by introducing appropriate weights to their loss functions. Experimental results have validated our theoretical analysis. As future work, we plan to investigate the following issues. (1) We have modeled ranking as a sequence of classifications, when defining the essential loss. We believe this modeling has its general implication for ranking, and will explore its other usages. (2) We have taken NDCG and MAP as two examples in this work. We will study whether the essential loss is an upper bound of other measure-based ranking errors. (3) We have taken the loss functions in Ranking SVM, RankBoost, RankNet and ListMLE as examples in this study. We plan to investigate the loss functions in other pairwise and listwise ranking methods, such as RankCosine [13], ListNet [3], FRank [15] and QBRank [19]. (4) While we have mainly discussed the upper-bound relationship in this work, we will study whether loss functions in existing learning-to-rank methods are statistically consistent with the essential loss and the measure-based ranking errors. 6http://research.microsoft.com/˜letor 8 References [1] R. Baeza-Yates and B. Ribeiro-Neto. Modern Information Retrieval. Addison Wesley, May 1999. [2] C. Burges, T. Shaked, E. Renshaw, A. Lazier, M. Deeds, N. Hamilton, and G. Hullender. Learning to rank using gradient descent. In ICML ’05: Proceedings of the 22nd International Conference on Machine learning, pages 89–96, New York, NY, USA, 2005. ACM. [3] Z. Cao, T. Qin, T.-Y. Liu, M.-F. Tsai, and H. Li. Learning to rank: from pairwise approach to listwise approach. In ICML ’07: Proceedings of the 24th International Conference on Machine learning, pages 129–136, New York, NY, USA, 2007. ACM. [4] W. Chen, T.-Y. Liu, Y. Lan, Z. Ma, and H. Li. Essential loss: Bridge the gap between ranking measures and loss functions in learning to rank. Technical report, Microsoft Research, MSRTR-2009-141, 2009. [5] D. Cossock and T. Zhang. Statistical analysis of bayes optimal subset ranking. Information Theory, 54:5140–5154, 2008. [6] Y. Freund, R. Iyer, R. E. Schapire, and Y. Singer. An efficient boosting algorithm for combining preferences. Journal of Machine Learning Research, 4:933–969, 2003. [7] R. Herbrich, K. Obermayer, and T. Graepel. Large margin rank boundaries for ordinal regression. In Advances in Large Margin Classifiers, pages 115–132, Cambridge, MA, 1999. MIT. [8] K. J¨arvelin and J. Kek¨al¨ainen. Cumulated gain-based evaluation of ir techniques. ACM Transactions on Information Systems, 20(4):422–446, 2002. [9] T. Joachims. Optimizing search engines using clickthrough data. In KDD ’02: Proceedings of the 8th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 133–142, New York, NY, USA, 2002. ACM. [10] P. Li, C. Burges, and Q. Wu. Mcrank: Learning to rank using multiple classification and gradient boosting. In NIPS ’07: Advances in Neural Information Processing Systems 20, pages 897–904, Cambridge, MA, 2008. MIT. [11] T.-Y. Liu, J. Xu, T. Qin, W.-Y. Xiong, and H. Li. Letor: Benchmark dataset for research on learning to rank for information retrieval. In SIGIR ’07 Workshop, San Francisco, 2007. Morgan Kaufmann. [12] Q. L. Olivier Chapelle and A. Smola. Large margin optimization of ranking measures. In NIPS workshop on Machine Learning for Web Search 2007, 2007. [13] T. Qin, X.-D. Zhang, M.-F. Tsai, D.-S. Wang, T.-Y. Liu, , and H. Li. Query-level loss functions for information retrieval. Information Processing and Management, 44(2):838–855, 2008. [14] M. Taylor, J. Guiver, S. Robertson, and T. Minka. Softrank: optimizing non-smooth rank metrics. In Proceedings of the International Conference on Web search and web data mining, pages 77–86, Palo Alto, California, USA, 2008. ACM. [15] M.-F. Tsai, T.-Y. Liu, T. Qin, H.-H. Chen, and W.-Y. Ma. Frank: a ranking method with fidelity loss. In SIGIR ’07: Proceedings of the 30th annual ACM SIGIR conference, pages 383–390, Amsterdam, The Netherlands, 2007. ACM. [16] F. Xia, T.-Y. Liu, J. Wang, W. Zhang, and H. Li. Listwise approach to learning to rank - theory and algorithm. In ICML ’08: Proceedings of the 25th International Conference on Machine learning, pages 1192–1199. Omnipress, 2008. [17] J. Xu and H. Li. Adarank: a boosting algorithm for information retrieval. In SIGIR ’07: Proceedings of the 30th annual international ACM SIGIR conference on Research and development in information retrieval, pages 391–398, 2007. [18] Y. Yue, T. Finley, F. Radlinski, and T. Joachims. A support vector method for optimizing average precision. In SIGIR ’07: Proceedings of the 30th annual international ACM SIGIR conference on Research and development in information retrieval, pages 271–278, New York, NY, USA, 2007. ACM. [19] Z. Zheng, H. Zha, T. Zhang, O. Chapelle, K. Chen, and G. Sun. A general boosting method and its application to learning ranking functions for web search. In NIPS ’07: Advances in Neural Information Processing Systems 20, pages 1697–1704. MIT, Cambridge, MA, 2008. 9
2009
56
3,806
Constructing Topological Maps using Markov Random Fields and Loop-Closure Detection Roy Anati Kostas Daniilidis GRASP Laboratory Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 {royanati,kostas}@cis.upenn.edu Abstract We present a system which constructs a topological map of an environment given a sequence of images. This system includes a novel image similarity score which uses dynamic programming to match images using both the appearance and relative positions of local features simultaneously. Additionally, an MRF is constructed to model the probability of loop-closures. A locally optimal labeling is found using Loopy-BP. Finally we outline a method to generate a topological map from loop closure data. Results, presented on four urban sequences and one indoor sequence, outperform the state of the art. 1 Introduction The task of generating a topological map from video data has gained prominence in recent years. Topological representations of routes spanning multiple kilometers are robuster than metric and cognitively more plausible for use by humans. They are used to perform path planning, providing waypoints, and defining reachability of places. Topological maps can correct for the drift in visual odometry systems and can be part of hybrid representations where the environment is represented metrically locally but topologically globally. We identify two challenges in constructing a topological map from video: how can we say whether two images have been taken from the same place; and how can we reduce the original set of thousands of video frames to a reduced representative set of keyframes for path planning. We take into advantage the fact that our input is video as opposed to an unorganized set of pictures. Video guarantees that keyframes will be reachable to each other but it also provides temporal ordering constraints on deciding about loop closures. The paper has three innovations: We define a novel image similarity score which uses dynamic programming to match images using both the appearance and the layout of the features in the environment. Second, graphical models are used to detect loop-closures which are locally consistent with neighboring images. Finally, we show how the temporal assumption can be used to generate compact topological maps using minimum dominating sets. We formally define a topological map T as a graph T = (K, ET ), where K is a set of keyframes and ET edges describing connectivity between keyframes. We will see later that keyframes are representatives of locations. We desire the following properties of T: Loop closure For any two locations i, j ∈K, ET contains the edge (i, j) if and only if it is possible to reach location j from location i without passing through any other location k ∈K. Compactness Two images taken at the “same location” should be represented by the same keyframe. 1 Spatial distinctiveness Two images from “different locations” cannot be represented by the same keyframe. Note that spatial distinctiveness requires that we distinguish between separate locations, however compactness encourages agglomeration of geographically similar images. This distinction is important, as lack of compactness does not lead to errors in either path planning or visual odometry while breaking spatial distinctiveness does. Our approach to building topological maps is divided into three modules: calculating image similarity, detecting loop closures, and map construction. As defined it is possible to implement each module independently, providing great flexibility in the algorithm selection. We now define the interfaces between each pair of modules. Starting with I, a sequence of n images, the result of calculating image similarity scores is a matrix Mn×n where Mij represents a relative similarity between images i and j. In section 2 we describe how we use local image features to compute the matrix M. To detect loop-closures we have to discretize M into a binary decision matrix Dn×n where Dij = 1 indicates that images i and j are geographically equivalent and form a loop closure. Section 3 describes the construction of D by defining a Markov Random Field (MRF) on M and perform approximate inference using Loopy Belief Propagation (Loopy-BP). In the final step, the topological map T is generated from D. We calculate the set of keyframes K and their associated connectivity ET using the minimum dominating set of the graph represented by D (Section 4). Related Work The state of the art in topological mapping of images is the FAB-MAP [8] algorithm. FAB-MAP uses bag of words to model locations using a generative appearance approach that models dependencies and correlations between visual words rendering FAB-MAP extremely successful in dealing with the challenge of perceptual aliasing (different locations sharing common visual characteristics). Its implementation outperforms any other in speed averaging an intra-image comparison of less than 1ms. Bayesian inference is also used in [1] where bags of words on local image descriptors model locations whose consistency is validated with epipolar geometry. Ranganathan et al. [14] incorporate both odometry and appearance and maintain several hypotheses of topological maps. Older approaches like ATLAS [5] and Tomatis et al. [17] define maps on two levels, creating global (topological) maps by matching independent local (metric) data and combining loop -closure detection with visual SLAM (Self Localization and Mapping). The ATLAS framework [5] matches local maps through the geometric structures defined by their 2D schematics whose correspondences define loop-closures. Tomatis et al [17] detect loop closures by examining the modality of the robot position’s density function (PDF). A PDF with two modes traveling in sync is the result of a missed loop-closure, which is identified and merged through backtracking. Approaches like [3] [19] [18] and [9] represent the environment using only an image similarity matrix. Booij et al [3] use the similarity matrix to define a weighted graph for robot navigation. Navigation is conducted on a node by node basis, using new observations and epipolar geometry to estimate the direction of the next node. Valgren et al [19] avoid exhaustively computing the similarity matrix by searching for and sampling cells which are more likely to describe existing loop-closures. In [18], they employ exhaustive search, but use spectral clustering to reduce the search space incrementally when new images are processed. Fraundoerfer et al [9] use hierarchical vocabulary trees [13] to quickly compute image similarity scores. They show improved results by using feature distances to weigh the similarity score. In [15] a novel image feature is constructed from patches centered around vertical lines from the scene (radial lines in the image). These are then used to track the bearing of landmarks and localize the robot in the environment. Goedeme [10] proposes ‘invariant column segments’ combined with color information to compare images. This is followed by agglomerative clustering of images into locations. Potential loop-closures are identified within clusters and confirmed u sing Dempster-Shafer probabilities. Our approach advances the state of the art by using a powerful image alignment score without employing full epipolar geometry, and more robust loop colsure detection by applying MRF inference on the similarity matrix. It is together with [4] the only video-based approach that provides a greatly reduced set of nodes for the final topological representation, making thus path planning tractable. 2 2 Image similarity score For any two images i and j, we calculate the similarity score Mij in three steps: generate image features, sort image features into sequences, calculate optimal alignment between both sequences. To detect and generate image features we use Scale Invariant Feature Transform (SIFT) [12]. SIFT was selected as it is invariant to rotation and scale, and partially immune to other affine transformations. Feature sequences Simply matching the SIFT features by value [12] yields satisfactory results (see later in figure 2). However, to mitigate perceptual aliasing, we take advantage of the fact that features represent real world structures with fixed spatial arrangements and therefore the similarity score should take their relative positions into account. A popular approach, employed in [16], is to enforce scene rigidity by validating the epipolar geometry between two images. This process, although extremely accurate, is expensive and very time-consuming. Instead, we make the assumption that the gravity vector is known so that we can split image position into bearing and elevation and we take into account only the bearing of each feature. Sorting the features by their bearing, results in ordered sequences of SIFT features. We then search for an optimal alignment between pairs of sequences, incorporating both the value and ordering of SIFT features into our similarity score. Sequence alignment To solve for the optimal alignment between two ordered sequences of features we employ dynamic programming. Here a match between two features, fa and fb, occurs if their L1 norm is below a threshold, Score(a, b) = 1 if |fa−fb|1 < tmatch. A key aspect to dynamic programming is the enforcement of the ordering constraint. This ensures that the relative order of features matched is consistent in both sequences, exactly the property desired to ensure consistency between two scene appearances. Since bearing is not given with respect to an absolute orientation, ordering is meant only cyclically, which can be handled easily in dynamic programming by replicating one of the input sequences. Modifying the first and last rows of the score matrix to allow for arbitrary start and end locations yields the optimal cyclical alignment in most cases. This comes at the cost of allowing one-to-many matches which can result in incorrect alignment scores. The score of the optimal alignment between both sequences of features provides the basis for the similarity score between two images and the entries of the matrix M. We calculate the values of Mij for all i < j −w. Here w represents a window used to ignore images immediately before/after our query. 3 Loop closure-detection using MRF Using the image similarity measure matrix M, we use Markov Random Fields to detect loopclosures. A lattice H is defined as an n × n lattice of binary nodes where a node vi,j represents the probability of images i and j forming a loop-closure. The matrix M provides an initial estimate of this value. We define the factor φi,j over the node vi,j as follows: φi,j(1) = Mij/F and φi,j(0) = 1 −φi,j(1) where F = max(M) is used to normalize the values in M to the range [0, 1]. Loops closures in the score matrix M appear as one of three possible shapes. In an intersection the score matrix contains an ellipse. A parallel traversal, when a vehicle repeats part of its trajectory, is seen as a diagonal band. An inverse traversal, when a vehicle repeats a part of its trajectory in the opposite direction, is an inverted diagonal band. The length and thickness of these shapes vary with the speed of the vehicle (see figure 1 for examples of these shapes). Therefore we define lattice H with eight way connectivity, as it better captures the structure of possible loop closures. As adjacent nodes in H represent sequential images in the sequence, we expect significant overlap in their content. So two neighboring nodes (in any orientation), are expected to have similar scores. Sudden changes occur when either a loop is just closed (sudden increase) or when a loop closure is complete (sudden decrease) or due to noise caused by a sudden occlusion in one of the scenes. By imposing smoothness on the labeling we capture loop closures while discarding noise. Edge potentials are therefore defined as Gaussians of differences in M. Letting G(x, y) = e−(x−y)2 σ2 , k = {i −1, i, i + 1} and l = {j −1, j, j + 1} then φi,j,k,l(0, 0) = φi,j,k,l(1, 1) = α · G (Mij, Mkl) φi,j,k,l(0, 1) = φi,j,k,l(1, 0) = 1, 3 (a) Intersection (b) Parallel Traversal (c) Inverse Traversal Figure 1: A small ellipse resulting from an intersection (a) and two diagonal bands from a parallel (b) and inverse (c) traversals. All extracted from a score matrix M. where 1 ≤α (we ignore the case when both k = i and j = l). Overall, H models a probability distribution over a labeling v ∈{1, 0}n×n where: P(v) = 1 Z Y i,j∈[1,n] φi,j(vi,j) Y i,j∈[1,n] Y k=[i−1,i+1] Y l=[j−1,j+1] φi,j,k,l(vi,j, vk,l) In order to solve for the MAP labeling of H, v∗= arg maxv P(v), the lattice must first be transformed into a cluster graph C. This transformation allows us to model the beliefs of all factors in the graph and the messages being passed during inference. We model every node and every edge in H as a node in the cluster graph C. An edge exists between two nodes in the cluster graph if the relevant factors share variables. In addition this construction presents a two step update schedule, alternating between ‘node’ clusters and ‘edge’ clusters as each class only connects to instances of the other. Once defined, a straightforward implementation of the generalized max-product belief propagation algorithm (described in both [2] and [11]) serves to approximate the final labeling. We initialize the cluster graph directly from the lattice H with ψi,j = φi,j for nodes and ψi,j,k,l = φi,j,k,l for edges. The MAP labeling found here defines our matrix D determining whether two images i and j close a loop. Note, that the above MAP labeling is guaranteed to be locally optimal, but is not necessarily consistent across the entire lattice. Generally, finding the globally consistent optimal assignment is NP-hard [11]. Instead, we rely on our definition of D, which specifies which pairs of images are equivalent, and our construction in section 4 to generate consistent results. 4 Constructing the topological map Finally the decision matrix D is used to define keyframes K and determine the map connectivity ET . D can be viewed as an adjacency matrix of an undirected graph. Since there is no guarantee that D found through belief propagation is symmetric, we initially treat D as an adjacency matrix for a directed graph, and then remove the direction from all the edges resulting in a symmetric graph D′ = D ∨DT. It is possible to use the graph defined by D′ as a topological map. However this representation is practically useless because multiple nodes represent the same location. To achieve compactness, D′ needs to be pruned while remaining faithful to the overall structure of the environment. Booij [4] achieve this by approximating for the minimum connected dominating set. By using the temporal assumption we can remove the connectedness requirement and use minimum dominating set to prune D′. We find the keyframes K by finding the minimum dominating set of D′. Finding the optimal solution is NP-Complete, however algorithm 1 provides a greedy approximation. This approximation has a guaranteed bound of H(dmax) (harmonic function of the maximal degree in the graph dmax) [6]. The dominating set itself serves as our keyframes K. Each dominating node k ∈K is also associated with the set of nodes it dominates Nk. Each set Nk represent images which have the “same location”. The sets {Nk : k ∈K} in conjunction with our underlying temporal assumption are used to connect the map T. An edge (k, j) is added if Nk and Nl contain two consecutive images from our sequence, i.e. (k, j) ∈ET if ∃i such that i ∈Nk and i + 1 ∈Nl. This yields our final topological map T. 4 Algorithm 1: Approximate Minimum Dominating Set Input: Adjacency matric D′ Output: K,{Nk : k ∈K} K ←∅ while D′ is not empty do k ←node with largest degree K ←K ∪{k} Nk ←{k} ∪Nb(k) Remove all nodes Nk from matrix D′ end 5 Experiments The system was applied to five image sequences. Results are shown for the system as described, as well as for FAB-MAP ([8]) and for different methods of calculating image similarity scores. Image sets Three image sequences, indoors, Philadelphia and Pittsburgh1 were captured with a Point Gray Research Ladybug camera. The Ladybug is composed of five wide-angle lens camera arranged in circle around the base and one camera on top facing upwards. The resulting output is a sequence of frames each containing a set of images captured by the six cameras. For the outdoor sequences the camera was mounted on top of a vehicle which was driven around an urban setting, in this case the cities of Philadelphia and Pittsburgh. In the indoor sequence, the camera was mounted on a tripod set on a cart and moved inside the building covering the ground and 1st floors. Ladybug images were processed independently for each camera using the SIFT detector and extractor provided in the VLFeat toolbox [20]. The resulting features for every camera were merged into a single set and sorted by their spherical coordinates. The two remaining sequences, City Centre and New College were captured in an outdoor setting by Cummins [7] from a limited field of view camera mounted on a mobile robot. Table 1 summarizes some basic properties of the sequences we use. All the outdoor sequences were provided with GPS location of the vehicle / robot. For Philadelphia Data Set Length No. of frames Camera Type Format Indoors Not available 852 spherical raw Ladybug stream file Philadelphia[16] 2.5km 1,266 spherical raw Ladybug stream file Pittsburgh 12.5km 1,256 spherical rectified images New College[7] 1.9km 1,237 limited field of view standard images City Centre[7] 2km 1,073 limited field of view standard images Table 1: Summary of image sequences processed. and Pittsburgh, these were used to generate ground truth decision matrices using a threshold of 10 meters. Ground truth matrices were provided for New College and City Centre. For the indoor sequence the position of the camera was manually determined using building schematics at an arbitrary scale. A ground truth decision matrix was generated using a manually determined threshold. The entire system was implemented in Matlab with the exception of the SIFT detector and extractor implemented by [20]. Parameters Both the image similarity scores and the MRF contain a number of parameters that need to be set. When calculating the image similarity score, there are five parameters. The first tmatch is the threshold on th L1 norm at which two SIFT features are considered matched. In addition, dynamic programming requires three parameters to define the score of an optimal alignment: smatch,sgap,smiss. smatch is the value by which the score of an alignment is improved by including correctly matched pairs of features. sgap is the cost of ignoring a feature in the optimal alignment (insertion and deletion), and smiss is the cost of including incorrectly matched pairs (substitution). We use tmatch = 1000, smatch = 1, sgap = −0.1 and smiss = 0. Finally we use w = 30 as our window size, to avoid calculating similarity scores for images taken within very short time of each 1The Pittsburgh dataset has been provided by Google for research purposes 5 Indoors Philadelphia Pittsburgh City Centre New College Precision 91.67% 91.72% 63.85% 97.42% 91.57% Recall 79.31% 51.46% 54.60% 40.04% 84.35% Table 2: Precision and recall after performing inference. other. Constructing the MRF requires three parameters, F, σ and α. The normalization factor, F, has already been defined as max(M). The σ used in defining edge potentials is σ = 0.05F where F is again used to rescale the data in the interval [0, 1]. Finally we set α = 2 to rescale the Gaussian to favor edges between similarly valued nodes. Inference using loopy belief propagation features two parameters, a dampening factor λ = 0.5 used to mitigate the effect of cyclical inferencing and n = 20, the number of iterations over which to perform inference. Results In addition to the image similarity score defined above, we also processed the image sequences using alternative similarity measures. We show results for M SIF T ij = number of SIFT matches, M REC ij = number of reciprocal SIFT matches (the intersection of matches from image i to image j and from j to i). We also show results using FAB-MAP [8]. To process spherical images using FAB-MAP we limited ourselves to using images captured by camera 0 (Directly forwards / backwards). Figure 2 shows precision-recall curves for all sequences and similarity measures. The curves were generated by thresholding the similarity scores. Our method outperforms state of the art in terms of precision and recall in all sequences. The gain from using our system is most pronounced in the Philadelphia sequence, where FAB-MAP yields extremely low recall rates. Table 2 shows the results of performing inference on the image similarity matrices. Finally figure 3 shows the topological map resulting from running dominating sets on the decision matrices D. We use the ground truth GPS positions for display purposes only. The blue dots represent the locations of the keyframes K with the edges ET drawn in blue. Red dots mark keyframes which are also loop-closures. For reference, figure 4 provides ground truth maps and loop-closures. 6 Outlook We presented a system that constructs purely topological maps from video sequences captured from moving vehicles. Our main assumption is that the images are presented in a temporally consistent manner. A highly accurate image similarity score is found by a cyclical alignment of sorted feature sequences. This score is then refined via loopy-belief propagation to detect loop-closures. Finally we constructed a topological map for the sequence in question. This map can be used for either path planning or for bundle adjustment in visual SLAM systems. The bottleneck of the system is computing the image similarity score. In some instances, taking over 166 hours to process a single sequence while FAB-MAP [8] accomplishes the same task in 20 minutes. In addition to implementing score calculation with a parallel algorithm (either on a multicore machine or using graphics hardware), we plan to construct approximations to our image similarity score. These include using visual bags of words in a hierarchical fashion [13] and building the score matrix M incrementally [19, 18]. Acknowledgments Financial support by the grants NSF-IIS-0713260, NSF-IIP-0742304, NSF-IIP-0835714, and ARL/CTA DAAD19-01-2-0012 is gratefully acknowledged. 6 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Indoors − Precision Recall Recall Precision Dynamic Programming FAB−MAP No. SIFT Symmetric SIFT (a) Indoors 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Philadelphia − Precision Recall Recall Precision Dynamic Programming FAB−MAP No. SIFT Symmetric SIFT (b) Philadelphia 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Pittsburgh − Precision Recall Recall Precision Dynamic Programming FAB−MAP No. SIFT Symmetric SIFT (c) Pittsburgh 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 City Centre − Precision Recall Recall Precision Dynamic Programming FAB−MAP No. SIFT Symmetric SIFT (d) City Centre 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 New College − Precision Recall Recall Precision Dynamic Programming FAB−MAP No. SIFT Symmetric SIFT (e) New College Figure 2: Precision-recall curves for different thresholds on image similarity scores. 7 (a) Indoors (b) Philadelphia (c) Pittsburgh (d) City Centre (e) New College Figure 3: Loop-closures generated using minimum dominating set approximation. Blue dots represent positions of keyframes K with edges ET drawn in blue. Red dots mark keyframes with loop-closures. (a) Indoors (b) Philadelphia (c) Pittsburgh (d) City Centre (e) New College Figure 4: Ground truth maps and loop-closures. Blue dots represent positions of keyframes K with edges ET drawn in blue. Red dots mark keyframes with loop-closures. 8 References [1] A. Angeli, D. Filliat, S. Doncieux, and J.-A. Meyer. Fast and incremental method for loopclosure detection using bags of visual words. Robotics, IEEE Transactions on, 24(5):1027– 1037, Oct. 2008. [2] Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer, August 2006. [3] O. Booij, B. Terwijn, Z. Zivkovic, and B. Krose. Navigation using an appearance based topological map. In 2007 IEEE International Conference on Robotics and Automation, pages 3927–3932, 2007. [4] O. Booij, Z. Zivkovic, and B. Krose. Pruning the image set for appearance based robot localization. In In Proceedings of the Annual Conference of the Advanced School for Computing and Imaging, 2005. [5] M. Bosse, P. Newman, J. Leonard, M. Soika, W. Feiten, and S. Teller. An atlas framework for scalable mapping. In IEEE International Conference on Robotics and Automation, 2003. Proceedings. ICRA’03, volume 2, 2003. [6] V. Chvatal. A greedy heuristic for the set-covering problem. Mathematics of Operations Research, 4(3):233–235, 1979. [7] M. Cummins and P. Newman. Accelerated appearance-only SLAM. In Proc. IEEE International Conference on Robotics and Automation (ICRA’08), Pasadena,California, April 2008. [8] M. Cummins and P. Newman. FAB-MAP: Probabilistic Localization and Mapping in the Space of Appearance. The International Journal of Robotics Research, 27(6):647–665, 2008. [9] F. Fraundorfer, C. Wu, J.-M. Frahm, and M. Pollefeys. Visual word based location recognition in 3d models using distance augmented weighting. In Fourth International Symposium on 3D Data Processing, Visualization and Transmission, 2008. [10] T. Goedem´e, M. Nuttin, T. Tuytelaars, and L. Van Gool. Omnidirectional vision based topological navigation. Int. J. Comput. Vision, 74(3):219–236, 2007. [11] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [12] D. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60:91–110, 2004. [13] D. Nister and H. Stewenius. Scalable recognition with a vocabulary tree. volume 2, pages 2161–2168, 2006. [14] A. Ranganathan, E. Menegatti, and F. Dellaert. Bayesian inference in the space of topological maps. IEEE Transactions on Robotics, 22(1):92–107, 2006. [15] D. Scaramuzza, N. Criblez, A. Martinelli, and R. Siegwart. Robust feature extraction and matching for omnidirectional images. Springer Tracts in Advanced Robotics, Field and Service Robotics, 2008. [16] J.-P. Tardif, Y. Pavlidis, and K. Daniilidis. Monocular visual odometry in urban environments using an omnidirectional camera. pages 2531–2538, Sept. 2008. [17] N. Tomatis, I. Nourbakhsh, and R. Siegwart. Hybrid simultaneous localization and map building: a natural integration of topological and metric. Robotics and Autonomous Systems, 44(1):3–14, 2003. [18] C. Valgren, T. Duckett, and A. J. Lilienthal. Incremental spectral clustering and its application to topological mapping. In Proc. IEEE Int. Conf. on Robotics and Automation, pages 4283– 4288, 2007. [19] C. Valgren, A. J. Lilienthal, and T. Duckett. Incremental topological mapping using omnidirectional vision. In Proc. IEEE Int. Conf. On Intelligent Robots and Systems, pages 3441–3447, 2006. [20] A. Vedaldi and B. Fulkerson. VLFeat: An open and portable library of computer vision algorithms. http://www.vlfeat.org/, 2008. 9
2009
57
3,807
Replicated Softmax: an Undirected Topic Model Ruslan Salakhutdinov Brain and Cognitive Sciences and CSAIL Massachusetts Institute of Technology rsalakhu@mit.edu Geoffrey Hinton Department of Computer Science University of Toronto hinton@cs.toronto.edu Abstract We introduce a two-layer undirected graphical model, called a “Replicated Softmax”, that can be used to model and automatically extract low-dimensional latent semantic representations from a large unstructured collection of documents. We present efficient learning and inference algorithms for this model, and show how a Monte-Carlo based method, Annealed Importance Sampling, can be used to produce an accurate estimate of the log-probability the model assigns to test data. This allows us to demonstrate that the proposed model is able to generalize much better compared to Latent Dirichlet Allocation in terms of both the log-probability of held-out documents and the retrieval accuracy. 1 Introduction Probabilistic topic models [2, 9, 6] are often used to analyze and extract semantic topics from large text collections. Many of the existing topic models are based on the assumption that each document is represented as a mixture of topics, where each topic defines a probability distribution over words. The mixing proportions of the topics are document specific, but the probability distribution over words, defined by each topic, is the same across all documents. All these models can be viewed as graphical models in which latent topic variables have directed connections to observed variables that represent words in a document. One major drawback is that exact inference in these models is intractable, so one has to resort to slow or inaccurate approximations to compute the posterior distribution over topics. A second major drawback, that is shared by all mixture models, is that these models can never make predictions for words that are sharper than the distributions predicted by any of the individual topics. They are unable to capture the essential idea of distributed representations which is that the distributions predicted by individual active features get multiplied together (and renormalized) to give the distribution predicted by a whole set of active features. This allows individual features to be fairly general but their intersection to be much more precise. For example, distributed representations allow the topics “government”, ”mafia” and ”playboy” to combine to give very high probability to a word “Berlusconi” that is not predicted nearly as strongly by each topic alone. To date, there has been very little work on developing topic models using undirected graphical models. Several authors [4, 17] used two-layer undirected graphical models, called Restricted Boltzmann Machines (RBMs), in which word-count vectors are modeled as a Poisson distribution. While these models are able to produce distributed representations of the input and perform well in terms of retrieval accuracy, they are unable to properly deal with documents of different lengths, which makes learning very unstable and hard. This is perhaps the main reason why these potentially powerful models have not found their application in practice. Directed models, on the other hand, can easily handle unobserved words (by simply ignoring them), which allows them to easily deal with different-sized documents. For undirected models marginalizing over unobserved variables is generally a non-trivial operation, which makes learning far more difficult. Recently, [13] attempted to fix this problem by proposing a Constrained Poisson model that would ensure that the mean Poisson 1 rates across all words sum up to the length of the document. While the parameter learning has been shown to be stable, the introduced model no longer defines a proper probability distribution over the word counts. In the next section we introduce a “Replicated Softmax” model. The model can be efficiently trained using Contrastive Divergence, it has a better way of dealing with documents of different lengths, and computing the posterior distribution over the latent topic values is easy. We will also demonstrate that the proposed model is able to generalize much better compared to a popular Bayesian mixture model, Latent Dirichlet Allocation (LDA) [2], in terms of both the log-probability on previously unseen documents and the retrieval accuracy. 2 Replicated Softmax: A Generative Model of Word Counts Consider modeling discrete visible units v using a restricted Boltzmann machine, that has a twolayer architecture as shown in Fig. 1. Let v ∈{1, ..., K}D, where K is the dictionary size and D is the document size, and let h ∈{0, 1}F be binary stochastic hidden topic features. Let V be a K ×D observed binary matrix with vk i = 1 if visible unit i takes on kth value. We define the energy of the state {V, h} as follows: E(V, h) = − D X i=1 F X j=1 K X k=1 W k ijhjvk i − D X i=1 K X k=1 vk i bk i − F X j=1 hjaj, (1) where {W, a, b} are the model parameters: W k ij is a symmetric interaction term between visible unit i that takes on value k, and hidden feature j, bk i is the bias of unit i that takes on value k, and aj is the bias of hidden feature j (see Fig. 1). The probability that the model assigns to a visible binary matrix V is: P(V) = 1 Z X h exp (−E(V, h)), Z = X V X h exp (−E(V, h)), (2) where Z is known as the partition function or normalizing constant. The conditional distributions are given by softmax and logistic functions: p(vk i = 1|h) = exp (bk i + PF j=1 hjW k ij) PK q=1 exp bq i + PF j=1 hjW q ij  (3) p(hj = 1|V) = σ aj + D X i=1 K X k=1 vk i W k ij ! , (4) where σ(x) = 1/(1 + exp(−x)) is the logistic function. Now suppose that for each document we create a separate RBM with as many softmax units as there are words in the document. Assuming we can ignore the order of the words, all of these softmax units can share the same set of weights, connecting them to binary hidden units. Consider a document that contains D words. In this case, we define the energy of the state {V, h} to be: E(V, h) = − F X j=1 K X k=1 W k j hjˆvk − K X k=1 ˆvkbk −D F X j=1 hjaj, (5) where ˆvk = PD i=1 vk i denotes the count for the kth word. Observe that the bias terms of the hidden units are scaled up by the length of the document. This scaling is crucial and allows hidden topic units to behave sensibly when dealing with documents of different lengths. Given a collection of N documents {Vn}N n=1, the derivative of the log-likelihood with respect to parameters W takes the form: 1 N N X n=1 ∂log P(Vn) ∂W k j = EPdata  ˆvkhj  −EPModel  ˆvkhj  , where EPdata[·] denotes an expectation with respect to the data distribution Pdata(h, V) = p(h|V)Pdata(V), with Pdata(V) = 1 N P n δ(V −Vn) representing the empirical distribution, 2 W1 W1 W2 W2 h v W1 W1 W1 W2 W2 W2 W1 W2 Latent Topics Observed Softmax Visibles Latent Topics Multinomial Visible Figure 1: Replicated Softmax model. The top layer represents a vector h of stochastic, binary topic features and and the bottom layer represents softmax visible units v. All visible units share the same set of weights, connecting them to binary hidden units. Left: The model for a document containing two and three words. Right: A different interpretation of the Replicated Softmax model, in which D softmax units with identical weights are replaced by a single multinomial unit which is sampled D times. and EPModel[·] is an expectation with respect to the distribution defined by the model. Exact maximum likelihood learning in this model is intractable because exact computation of the expectation EPModel[·] takes time that is exponential in min{D, F}, i.e the number of visible or hidden units. To avoid computing this expectation, learning is done by following an approximation to the gradient of a different objective function, called the “Contrastive Divergence” (CD) ([7]): ∆W k j = α  EPdata  ˆvkhj  −EPT  ˆvkhj   , (6) where α is the learning rate and PT represents a distribution defined by running the Gibbs chain, initialized at the data, for T full steps. The special bipartite structure of RBM’s allows for quite an efficient Gibbs sampler that alternates between sampling the states of the hidden units independently given the states of the visible units, and vise versa (see Eqs. 3, 4). Setting T = ∞recovers maximum likelihood learning. The weights can now be shared by the whole family of different-sized RBM’s that are created for documents of different lengths (see Fig. 1). We call this the “Replicated Softmax” model. A pleasing property of this model is that computing the approximate gradients of the CD objective (Eq. 6) for a document that contains 100 words is computationally not much more expensive than computing the gradients for a document that contains only one word. A key observation is that using D softmax units with identical weights is equivalent to having a single multinomial unit which is sampled D times, as shown in Fig. 1, right panel. If instead of sampling, we use real-valued softmax probabilities multiplied by D, we exactly recover the learning algorithm of a Constrained Poisson model [13], except for the scaling of the hidden biases with D. 3 Evaluating Replicated Softmax as a Generative Model Assessing the generalization performance of probabilistic topic models plays an important role in model selection. Much of the existing literature, particularly for undirected topic models [4, 17], uses extremely indirect performance measures, such as information retrieval or document classification. More broadly, however, the ability of the model to generalize can be evaluated by computing the probability that the model assigns to the previously unseen documents, which is independent of any specific application. For undirected models, computing the probability of held-out documents exactly is intractable, since computing the global normalization constant requires enumeration over an exponential number of terms. Evaluating the same probability for directed topic models is also difficult, because there are an exponential number of possible topic assignments for the words. Recently, [14] showed that a Monte Carlo based method, Annealed Importance Sampling (AIS) [12], can be used to efficiently estimate the partition function of an RBM. We also find AIS attractive because it not only provides a good estimate of the partition function in a reasonable amount of computer time, but it can also just as easily be used to estimate the probability of held-out documents for directed topic models, including Latent Dirichlet Allocation (for details see [16]). This will allow us to properly measure and compare generalization capabilities of Replicated Softmax and 3 Algorithm 1 Annealed Importance Sampling (AIS) run. 1: Initialize 0 = β0 < β1 < ... < βS = 1. 2: Sample V1 from p0. 3: for s = 1 : S −1 do 4: Sample Vs+1 given Vs using Ts(Vs+1 ←Vs). 5: end for 6: Set wAIS = QS s=1 p∗ s(Vs)/p∗ s−1(Vs). LDA models. We now show how AIS can be used to estimate the partition function of a Replicated Softmax model. 3.1 Annealed Importance Sampling Suppose we have two distributions: pA(x) = p∗ A(x)/ZA and pB(x) = p∗ B(x)/ZB. Typically pA(x) is defined to be some simple proposal distribution with known ZA, whereas pB represents our complex target distribution of interest. One way of estimating the ratio of normalizing constants is to use a simple importance sampling method: ZB ZA = X x p∗ B(x) p∗ A(x) pA(x) = EpA p∗ B(x) p∗ A(x)  ≈1 N N X i=1 p∗ B(x(i)) p∗ A(x(i)), (7) where x(i) ∼pA. However, if the pA and pB are not close enough, the estimator will be very poor. In high-dimensional spaces, the variance of the importance sampling estimator will be very large, or possibly infinite, unless pA is a near-perfect approximation to pB. Annealed Importance Sampling can be viewed as simple importance sampling defined on a much higher dimensional state space. It uses many auxiliary variables in order to make the proposal distribution pA be closer to the target distribution pB. AIS starts by defining a sequence of intermediate probability distributions: p0, ..., pS, with p0 = pA and pS = pB. One general way to define this sequence is to set: pk(x) ∝p∗ A(x)1−βkp∗ B(x)βk, (8) with “inverse temperatures” 0 = β0 < β1 < ... < βK = 1 chosen by the user. For each intermediate distribution, a Markov chain transition operator Tk(x′; x) that leaves pk(x) invariant must also be defined. Using the special bipartite structure of RBM’s, we can devise a better AIS scheme [14] for estimating the model’s partition function. Let us consider a Replicated Softmax model with D words. Using Eq. 5, the joint distribution over {V, h} is defined as1: p(V, h) = 1 Z exp   F X j=1 K X k=1 W k j hjˆvk  , (9) where ˆvk = PD i=1 vk i denotes the count for the kth word. By explicitly summing out the latent topic units h we can easily evaluate an unnormalized probability p∗(V). The sequence of intermediate distributions, parameterized by β, can now be defined as follows: ps(V) = 1 Zs p∗(V) = 1 Zs X h p∗ s(V, h) = 1 Zs F Y j=1 1 + exp βs K X k=1 W k j ˆvk !! . (10) Note that for s = 0, we have βs = 0, and so p0 represents a uniform distribution, whose partition function evaluates to Z0 = 2F , where F is the number of hidden units. Similarly, when s = S, we have βs = 1, and so pS represents the distribution defined by the Replicated Softmax model. For the intermediate values of s, we will have some interpolation between uniform and target distributions. Using Eqs. 3, 4, it is also straightforward to derive an efficient Gibbs transition operator that leaves ps(V) invariant. 1We have omitted the bias terms for clarity of presentation 4 A single run of AIS procedure is summarized in Algorithm 1. It starts by first sampling from a simple uniform distribution p0(V) and then applying a series of transition operators T1, T2, . . . , TS−1 that “move” the sample through the intermediate distributions ps(V) towards the target distribution pS(V). Note that there is no need to compute the normalizing constants of any intermediate distributions. After performing M runs of AIS, the importance weights w(i) AIS can be used to obtain an unbiased estimate of our model’s partition function ZS: ZS Z0 ≈ 1 M M X i=1 w(i) AIS, (11) where Z0 = 2F . Observe that the Markov transition operators do not necessarily need to be ergodic. In particular, if we were to choose dumb transition operators that do nothing, Ts(V′ ←V) = δ(V′ −V) for all s, we simply recover the simple importance sampling procedure of Eq. 7. When evaluating the probability of a collection of several documents, we need to perform a separate AIS run per document, if those documents are of different lengths. This is because each differentsized document can be represented as a separate RBM that has its own global normalizing constant. 4 Experimental Results In this section we present experimental results on three three text datasets: NIPS proceedings papers, 20-newsgroups, and Reuters Corpus Volume I (RCV1-v2) [10], and report generalization performance of Replicated Softmax and LDA models. 4.1 Description of Datasets The NIPS proceedings papers2 contains 1740 NIPS papers. We used the first 1690 documents as training data and the remaining 50 documents as test. The dataset was already preprocessed, where each document was represented as a vector containing 13,649 word counts. The 20-newsgroups corpus contains 18,845 postings taken from the Usenet newsgroup collection. The corpus is partitioned fairly evenly into 20 different newsgroups, each corresponding to a separate topic.3 The data was split by date into 11,314 training and 7,531 test articles, so the training and test sets were separated in time. We further preprocessed the data by removing common stopwords, stemming, and then only considering the 2000 most frequent words in the training dataset. As a result, each posting was represented as a vector containing 2000 word counts. No other preprocessing was done. The Reuters Corpus Volume I is an archive of 804,414 newswire stories4 that have been manually categorized into 103 topics. The topic classes form a tree which is typically of depth 3. For this dataset, we define the relevance of one document to another to be the fraction of the topic labels that agree on the two paths from the root to the two documents. The data was randomly split into 794,414 training and 10,000 test articles. The available data was already in the preprocessed format, where common stopwords were removed and all documents were stemmed. We again only considered the 10,000 most frequent words in the training dataset. For all datasets, each word count wi was replaced by log(1 + wi), rounded to the nearest integer, which slightly improved retrieval performance of both models. Table 1 shows description of all three datasets. 4.2 Details of Training For the Replicated Softmax model, to speed-up learning, we subdivided datasets into minibatches, each containing 100 training cases, and updated the parameters after each minibatch. Learning was carried out using Contrastive Divergence by starting with one full Gibbs step and gradually increaing to five steps during the course of training, as described in [14]. For all three datasets, the total number of parameter updates was set to 100,000, which took several hours to train. For the 2Available at http://psiexp.ss.uci.edu/research/programs data/toolbox.htm. 3Available at http://people.csail.mit.edu/jrennie/20Newsgroups (20news-bydate.tar.gz). 4Available at http://trec.nist.gov/data/reuters/reuters.html 5 Data set Number of docs K ¯D St. Dev. Avg. Test perplexity per word (in nats) Train Test LDA-50 LDA-200 R. Soft-50 Unigram NIPS 1,690 50 13,649 98.0 245.3 3576 3391 3405 4385 20-news 11,314 7,531 2,000 51.8 70.8 1091 1058 953 1335 Reuters 794,414 10,000 10,000 94.6 69.3 1437 1142 988 2208 Table 1: Results for LDA using 50 and 200 topics, and Replaced Softmax model that uses 50 topics. K is the vocabulary size, ¯D is the mean document length, St. Dev. is the estimated standard deviation in document length. 2500 3000 3500 4000 4500 5000 2500 3000 3500 4000 4500 5000 Replicated Softmax LDA 600 800 1000 1200 1400 1600 600 800 1000 1200 1400 1600 Replicated Softmax LDA 0 500 1000 1500 2000 2500 0 500 1000 1500 2000 2500 Replicated Softmax LDA NIPS Proceedings 20-newsgroups Reuters Figure 2: The average test perplexity scores for each of the 50 held-out documents under the learned 50dimensional Replicated Softmax and LDA that uses 50 topics. LDA model, we used the Gibbs sampling implementation of the Matlab Topic Modeling Toolbox5 [5]. The hyperparameters were optimized using stochastic EM as described by [15]. For the 20newsgroups and NIPS datasets, the number of Gibbs updates was set to 100,000. For the large Reuters dataset, it was set to 10,000, which took several days to train. 4.3 Assessing Topic Models as Generative Models For each of the three datasets, we estimated the log-probability for 50 held-out documents.6 For both the Replicated Softmax and LDA models we used 10,000 inverse temperatures βs, spaced uniformly from 0 to 1. For each held-out document, the estimates were averaged over 100 AIS runs. The average test perplexity per word was then estimated as exp  −1/N PN n=1 1/Dn log p(vn)  , where N is the total number of documents, Dn and vn are the total number of words and the observed word-count vector for a document n. Table 1 shows that for all three datasets the 50-dimensional Replicated Softmax consistently outperforms the LDA with 50-topics. For the NIPS dataset, the undirected model achieves the average test perplexity of 3405, improving upon LDA’s perplexity of 3576. The LDA with 200 topics performed much better on this dataset compared to the LDA-50, but its performance only slightly improved upon the 50-dimensional Replicated Softmax model. For the 20-newsgroups dataset, even with 200 topics, the LDA could not match the perplexity of the Replicated Softmax model with 50 topic units. The difference in performance is particularly striking for the large Reuters dataset, whose vocabulary size is 10,000. LDA achieves an average test perplexity of 1437, substantially reducing it from 2208, achieved by a simple smoothed unigram model. The Replicated Softmax further reduces the perplexity down to 986, which is comparable in magnitude to the improvement produced by the LDA over the unigram model. LDA with 200 topics does improve upon LDA-50, achieving a perplexity of 1142. However, its performance is still considerably worse than that of the Replicated Softmax model. 5The code is available at http://psiexp.ss.uci.edu/research/programs data/toolbox.htm 6For the 20-newsgroups and Reuters datasets, the 50 held-out documents were randomly sampled from the test sets. 6 0.02 0.1 0.4 1.6 6.4 25.6 100 10 20 30 40 50 60 Recall (%) Precision (%) Replicated Softmax 50−D LDA 50−D 0.001 0.006 0.051 0.4 1.6 6.4 25.6 100 10 20 30 40 50 Recall (%) Precision (%) Replicated Softmax 50−D LDA 50−D 20-newsgroups Reuters Figure 3: Precision-Recall curves for the 20-newsgroups and Reuters datasets, when a query document from the test set is used to retrieve similar documents from the training corpus. Results are averaged over all 7,531 (for 20-newsgroups) and 10,000 (for Reuters) possible queries. Figure 2 further shows three scatter plots of the average test perplexity per document. Observe that for almost all test documents, the Replicated Softmax achieves a better perplexity compared to the corresponding LDA model. For the Reuters dataset, as expected, there are many documents that are modeled much better by the undirected model than an LDA. Clearly, the Replicated Softmax is able to generalize much better. 4.4 Document Retrieval We used 20-newsgroup and Reuters datasets to evaluate model performance on a document retrieval task. To decide whether a retrieved document is relevant to the query document, we simply check if they have the same class label. This is the only time that the class labels are used. For the Replicated Softmax, the mapping from a word-count vector to the values of the latent topic features is fast, requiring only a single matrix multiplication followed by a componentwise sigmoid non-linearity. For the LDA, we used 1000 Gibbs sweeps per test document in order to get an approximate posterior over the topics. Figure 3 shows that when we use the cosine of the angle between two topic vectors to measure their similarity, the Replicated Softmax significantly outperforms LDA, particularly when retrieving the top few documents. 5 Conclusions and Extensions We have presented a simple two-layer undirected topic model that be used to model and automatically extract distributed semantic representations from large collections of text corpora. The model can be viewed as a family of different-sized RBM’s that share parameters. The proposed model have several key advantages: the learning is easy and stable, it can model documents of different lengths, and computing the posterior distribution over the latent topic values is easy. Furthermore, using stochastic gradient descent, scaling up learning to billions of documents would not be particularly difficult. This is in contrast to directed topic models, where most of the existing inference algorithms are designed to be run in a batch mode. Therefore one would have to make further approximations, for example by using particle filtering [3]. We have also demonstrated that the proposed model is able to generalize much better than LDA in terms of both the log-probability on held-out documents and the retrieval accuracy. In this paper we have only considered the simplest possible topic model, but the proposed model can be extended in several ways. For example, similar to supervised LDA [1], the proposed Replicated Softmax can be easily extended to modeling the joint the distribution over words and a document label, as shown in Fig. 4, left panel. Recently, [11] introduced a Dirichlet-multinomial regression model, where a prior on the document-specific topic distributions was modeled as a function of observed metadata of the document. Similarly, we can define a conditional Replicated Softmax model, where the observed document-specific metadata, such as author, references, etc., can be used 7 Latent Topics Multinomial Visible Label Latent Topics Multinomial Visible Metadata Figure 4: Left: A Replicated Softmax model that models the joint distribution of words and document label. Right: Conditional Replicated Softmax model where the observed document-specific metadata affects binary states of the hidden topic units. to influence the states of the latent topic units, as shown in Fig. 4, right panel. Finally, as argued by [13], a single layer of binary features may not the best way to capture the complex structure in the count data. Once the Replicated Softmax has been trained, we can add more layers to create a Deep Belief Network [8], which could potentially produce a better generative model and further improve retrieval accuracy. Acknowledgments This research was supported by NSERC, CFI, and CIFAR. References [1] D. Blei and J. McAuliffe. Supervised topic models. In NIPS, 2007. [2] D. Blei, A. Ng, and M. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [3] K. Canini, L. Shi, and T. Griffiths. Online inference of topics with latent Dirichlet allocation. In Proceedings of the International Conference on Artificial Intelligence and Statistics, volume 5, 2009. [4] P. Gehler, A. Holub, and M. Welling. The Rate Adapting Poisson (RAP) model for information retrieval and object recognition. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [5] T. Griffiths and M. Steyvers. Finding scientific topics. In Proceedings of the National Academy of Sciences, volume 101, pages 5228–5235, 2004. [6] Thomas Griffiths and Mark Steyvers. Finding scientific topics. PNAS, 101(suppl. 1), 2004. [7] G. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1711–1800, 2002. [8] G. Hinton, S. Osindero, and Y. W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [9] T. Hofmann. Probabilistic latent semantic analysis. In Proceedings of the 15th Conference on Uncertainty in AI, pages 289–296, San Fransisco, California, 1999. Morgan Kaufmann. [10] D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [11] D. Mimno and A. McCallum. Topic models conditioned on arbitrary features with dirichlet-multinomial regression. In UAI, pages 411–418, 2008. [12] R. Neal. Annealed importance sampling. Statistics and Computing, 11:125–139, 2001. [13] R. Salakhutdinov and G. Hinton. Semantic Hashing. In SIGIR workshop on Information Retrieval and applications of Graphical Models, 2007. [14] R. Salakhutdinov and I. Murray. On the quantitative analysis of deep belief networks. In Proceedings of the International Conference on Machine Learning, volume 25, pages 872 – 879, 2008. [15] H. Wallach. Topic modeling: beyond bag-of-words. In ICML, volume 148, pages 977–984, 2006. [16] H. Wallach, I. Murray, R. Salakhutdinov, and D. Mimno. Evaluation methods for topic models. In Proceedings of the 26th International Conference on Machine Learning (ICML 2009), 2009. [17] E. Xing, R. Yan, and A. Hauptmann. Mining associated text and images with dual-wing harmoniums. In Proceedings of the 21st Conference on Uncertainty in Artificial Intelligence (UAI-2005), 2005. 8
2009
58
3,808
Fast, smooth and adaptive regression in metric spaces Samory Kpotufe UCSD CSE Abstract It was recently shown that certain nonparametric regressors can escape the curse of dimensionality when the intrinsic dimension of data is low ([1, 2]). We prove some stronger results in more general settings. In particular, we consider a regressor which, by combining aspects of both tree-based regression and kernel regression, adapts to intrinsic dimension, operates on general metrics, yields a smooth function, and evaluates in time O(log n). We derive a tight convergence rate of the form n−2/(2+d) where d is the Assouad dimension of the input space. 1 Introduction Relative to parametric methods, nonparametric regressors require few structural assumptions on the function being learned. However, their performance tends to deteriorate as the number of features increases. This so-called curse of dimensionality is quantified by various lower bounds on the convergence rates of the form n−2/(2+D) for data in RD (see e.g. [3, 4]). In other words, one might require a data size exponential in D in order to attain a low risk. Fortunately, it is often the case that data in RD has low intrinsic complexity, e.g. the data is near a manifold or is sparse, and we hope to exploit such situations. One simple approach, termed manifold learning (e.g. [5, 6, 7]), is to embed the data into a lower dimensional space where the regressor might work well. A recent approach with theoretical guarantees for nonparametric regression, is the study of adaptive procedures, i.e. ones that operate in RD but attain convergence rates that depend just on the intrinsic dimension of data. An initial result [1] shows that for data on a ddimensional manifold, the asymptotic risk at a point x ∈RD depends just on d and on the behavior of the distribution in a neighborhood of x. Later, [2] showed that a regressor based on the RPtree of [8] (a hierarchical partitioning procedure) is not only fast to evaluate, but is adaptive to Assouad dimension, a measure which captures notions such as manifold dimension and data sparsity. The related notion of box dimension (see e.g. [9]) was shown in an earlier work [10] to control the risk of nearest neighbor regression, although adaptivity was not a subject of that result. This work extends the applicability of such adaptivity results to more general uses of nonparametric regression. In particular, we present an adaptive regressor which, unlike RPtree, operates on a general metric space where only distances are provided, and yields a smooth function, an important property in many domains (see e.g. [11] which considers the smooth control of a robotic tool based on noisy outside input). In addition, our regressor can be evaluated in time just O(log n), unlike kernel or nearest neighbor regression. The evaluation time for these two forms of regression is lower bounded by the number of sample points contributing to the regression estimate. For nearest neighbor regression, this number is given by a parameter kn whose optimal setting (see [12]) is O ( n2/(2+d)) . For kernel regression, given an optimal bandwidth h ≈n−1/(2+d) (see [12]), we would expect about nhd ≈n2/(2+d) points in the ball B(x, h) around a query point x. We note that there exist many heuristics for speeding up kernel regression, which generally combine fast proximity search procedures with other elaborate methods for approximating the kernel weights (see e.g. [13, 14, 15]). There are no rigorous bounds on either the achievable speedup or the risk of the resulting regressor. 1 Figure 1: Left and Middle- Two r-nets at different scales r, each net inducing a partition of the sample X. In each case, the gray points are the r-net centers. For regression each center contributes the average Y value of the data points assigned to them (points in the cells). Right- Given an r-net and a bandwidth h, a kernel around a query point x weights the Y -contribution of each center to the regression estimate for x. Our regressor integrates aspects of both tree-based regression and kernel regression. It constructs partitions of the input dataset X = {Xi}n 1, and uses a kernel to select a few sets within a given partition, each set contributing its average output Y value to the estimate. We show that such a regressor achieves an excess risk of O ( n−2/(2+d)) , where d is the Assouad dimension of the input data space. This is a tighter convergence rate than the O ( n−2/(2+O(d log d)) of RPtree regression (see [2]). Finally, the evaluation time of O(log n) is arrived at by modifying the cover tree proximity search procedure of [16]. Unlike in [16], this guarantee requires no growth assumption on the data distribution. We’ll now proceed with a more detailed presentation of the results in the next section, followed by technical details in sections 3 and 4. 2 Detailed overview of results We’re given i.i.d training data (X, Y) = {(Xi, Yi)}n 1, where the input variable X belongs to a metric space X where the distance between points is given by the metric ρ, and the output Y belongs to a subset Y of some Euclidean space. We’ll let ∆X and ∆Y denote the diameters of X and Y. Assouad dimension: The Assouad or doubling dimension of X is defined as the smallest d such that any ball can be covered by 2d balls of half its radius. Examples: A d-dimensional affine subspace of a Euclidean space RD has Assouad dimension O(d) [9]. A d-dimensional submanifold of a Euclidean space RD has Assouad dimension O(d) subject to a bound on its curvature [8]. A d-sparse data space in RD, i.e. one where each data point has at most d non zero coordinates, has Assouad dimension O(d log D) [8, 2]. The algorithm has no knowledge of the dimension d, nor of ∆Y, although we assume ∆X is known (or can be upper-bounded). Regression function: We assume the regression function f(x) .= E [Y |X = x] is Lipschitz, i.e. there exists λ , unknown, such that ∀x, x′ ∈X, ∥f(x) −f(x′)∥≤λ · ρ (x, x′). Excess risk: Our performance criteria for a regressor fn(x) is the integrated excess l2 risk: ∥fn −f∥2 .= E X ∥fn(X) −f(X)∥2 = E X,Y ∥fn(X) −Y ∥2 −E X,Y ∥f(X) −Y ∥2 . (1) 2.1 Algorithm overview We’ll consider a set of partitions of the data induced by a hierarchy of r-nets of X. Here an r-net Qr is understood to be both an r-cover of X (all points in X are within r of some point in Qr), and an r-packing (the points in Qr are at least r apart). The details on how to build the r-nets are covered in section 4. For now, we’ll consider a class of regressors defined over these nets (as illustrated in Figure 1), and we’ll describe how to select a good regressor out of this class. Partitions of X: The r-nets are denoted by { Qr, r ∈{∆X /2i}I+2 0 } , where I .= ⌈log n⌉, and Qr ⊂X. Each Q ∈ { Qr, r ∈{∆X /2i}I+2 0 } induces a partition {X(q), q ∈Q} of X, where 2 X(q) designate all those points in X whose closest point in Q is q. We set nq .= |X(q)|, and ¯Yq = 1 nq ∑ i:Xi∈X(q) Yi. Admissible kernels: We assume that K(u) is a non increasing function of u ∈[0, ∞); K is positive on u ∈[0, 1), maximal at u = 0, and vanishes for u ≥1. To simplify notation, we’ll often let K(x, q, h) denote K(ρ (x, q) /h). Regressors: For each Q ∈ { Qr, r ∈{∆X /2i}I+2 0 } , and given a bandwidth h, we define the following regressor: fn,Q(x) = ∑ q∈Q wq(x) ¯Yq, where wq = nq(K(x, q, h) + ϵ) ∑ q′∈Q nq′(K(x, q′, h) + ϵ). (2) The positive constant ϵ ensures that the estimate remains well defined when K(x, q, h) = 0. We assume ϵ ≤K(1/2)/n2. We can view (K(·) + ϵ) as the effective kernel which never vanishes. It is clear that the learned function fn,Q inherits any degree of smoothness from the kernel function K, i.e. if K is of class Ck, then so is fn,Q. Selecting the final regressor: For fixed n, K(·), and {Qr, r ∈{∆X /2i}I+2 0 }, equation (2) above defines a class of regressors parameterized by r ∈{∆X /2i}I+2 0 , and the bandwidth h. We want to pick a good regressor out of this class. We can reduce the search space right away by noticing that we need r = θ(h): if r >> h then B(x, h) ∩Qr is empty for most x since the points in Qr are over r apart, and if r << h then B(x, h) ∩Qr might contain a lot of points, thus increasing evaluation time. So for each choice of h, we will set r = h/4, which will yield good guarantees on computational and prediction performance. The final regressor is selected as follows. Draw a new sample (X′, Y′) of size n. As before let I .= ⌈log n⌉, and define H .= {∆X /2i}I 0. For every h ∈H, pick the r-net Qh/4 and test fn,Qh/4 on (X′, Y′); let the empirical risk be minimized at ho, i.e. ho .= argminh∈H 1 n ∑n i=1 fn,Qh/4(X′ i) −Y ′ i 2. Return fn,Qho/4 as the final regressor. Fast evaluation: Each regressor fn,Qh/4(x) can be estimated quickly on points x by traversing (nested) r-nets as described in detail in section 4. 2.2 Computational and prediction performance The cover property ensures that for some h, Qh/4 is a good summary of local information (for prediction performance), while the packing property ensures that few points in Qh/4 fall in B(x, h) (for fast evaluation). We have the following main result. Theorem 1. Let d be the Assouad dimension of X and let n ≥max ( 9, ( ∆Y λ∆X )2 , ( λ∆X ∆Y )2) . (a) The final regressor selected satisfies E fn,Qho/4 −f 2 ≤C (λ∆X )2d/(2+d) (∆2 Y n )2/(2+d) + 3∆2 Y √ ln(n log n) n , where C depends on the Assouad dimension d and on K(0)/K(1/2). (b) fn,Qho/4(x) can be computed in time C′ log n, where C′ depends just on d. Part (a) of Theorem 1 is given by Corollary 1 of section 3, and does not depend on how the r-nets are built; part (b) follows from Lemma 4 of section 4 which specifies the nets. 3 Risk analysis Throughout this section we assume 0 < h < ∆X and we let Q = Qh/4. We’ll bound the risk for fn,Q for any fixed choice of h, and then show that the final h0 selected yields a good risk. The results in this section only require the fact that Q is a cover of data and thus preserves local information, while the packing property is needed in the next section for fast evaluation. 3 Define efn,Q(x) .= EY|X fn,Q(x), i.e. the conditional expectation of the estimate, for X fixed. We have the following standard decomposition of the excess risk into variance and bias terms: ∀x ∈X, E Y|X ∥fn,Q(x) −f(x)∥2 = E Y|X fn,Q(x) −efn,Q(x) 2 + efn,Q(x) −f(x) 2 . (3) We’ll proceed by bounding each term separately in the following two lemmas, and then combining these bounds in Lemma 3. We’ll let µ denote the marginal measure over X and µn denote the corresponding empirical measure. Lemma 1 (Variance at x). Fix X, and let Q be an h 4 -net of X, 0 < h < ∆X . Consider x ∈X such that X ∩(B(x, h/4)) ̸= ∅. We have E Y|X fn,Q(x) −efn,Q(x) 2 ≤ 2K(0)∆2 Y K(1/2) · nµn (B(x, h/4)). Proof. Remember that for independent random vectors vi with expectation 0, E ∥∑ i vi∥2 = ∑ i E ∥vi∥2. We apply this fact twice in the inequalities below, given that, conditioned on X and Q ⊂X, the Yi values are mutually independent and so are the ¯Yq values. We have E Y|X fn,Q(x) −efn,Q(x) 2 = E Y|X ∑ q∈Q wq(x) ( ¯Yq −E Y|X ¯Yq ) 2 ≤ ∑ q∈Q w2 q(x) E Y|X ¯Yq −E Y|X ¯Yq 2 = ∑ q∈Q w2 q(x) E Y|X ∑ i:Xi∈X(q) 1 nq ( Yi −E Y|X Yi ) 2 ≤ ∑ q∈Q w2 q(x)∆2 Y nq ≤ ( max q∈Q { wq(x)∆2 Y nq }) ∑ q∈Q wq = max q∈Q { wq(x)∆2 Y nq } = max q∈Q (K(x, q, h) + ϵ)∆2 Y ∑ q′∈Q nq′(K(x, q′, h) + ϵ) ≤ 2K(0)∆2 Y ∑ q∈Q nqK(x, q, h). (4) To bound the fraction in (4), we lower-bound the denominator as: ∑ q∈Q nqK(x, q, h) ≥ ∑ q:ρ(x,q)≤h/2 nqK(x, q, h) ≥ ∑ q:ρ(x,q)≤h/2 nqK(1/2) ≥K(1/2) · nµn(B(x, h/4)). The last inequality follows by remarking that, since Q is an h 4 -cover of X, the ball B(x, h/4) can only contain points from ∪q:ρ(x,q)≤h/2X(q). Plug this last inequality into (4) and conclude. Lemma 2 (Bias at x). As before, fix X, and let Q be an h 4 -net of X, 0 < h < ∆X . Consider x ∈X such that X ∩(B(x, h/4)) ̸= ∅. We have efn,Q(x) −f(x) 2 ≤2λ2h2 + ∆2 Y n . Proof. We have efn,Q(x) −f(x) 2 = ∑ q∈Q wq(x) nq ∑ Xi∈X(q) (f(Xi) −f(x)) 2 ≤ ∑ q∈Q wq(x) nq ∑ Xi∈X(q) ∥f(Xi) −f(x)∥2 , where we just applied Jensen’s inequality on the norm square. We bound the r.h.s by breaking the summation over two subsets of Q as follows. ∑ q:ρ(x,q)<h wq(x) nq ∑ Xi∈X(q) ∥f(Xi) −f(x)∥2 ≤ ∑ q:ρ(x,q)<h wq(x) nq ∑ Xi∈X(q) λ2ρ (Xi, x)2 ≤ ∑ q:ρ(x,q)<h wq(x) nq ∑ Xi∈X(q) λ2 (ρ (x, q) + ρ (q, Xi))2 ≤ ∑ q:ρ(x,q)<h wq(x) nq ∑ Xi∈X(q) 25 16λ2h2 ≤2λ2h2. 4 Next, we have ∑ q:ρ(x,q)≥h wq(x) nq ∑ Xi∈X(q) ∥f(Xi) −f(x)∥2 ≤ ∑ q:ρ(x,q)≥h wq(x)∆2 Y = ∆2 Y ∑ q:ρ(x,q)≥h nqϵ ∑ q:ρ(x,q)≥h nqϵ + ∑ q:ρ(x,q)<h nq (K(x, q, h) + ϵ) = ∆2 Y     1 + ∑ q:ρ(x,q)<h nq (K(x, q, h) + ϵ) ∑ q:ρ(x,q)≥h nqϵ      −1 ≤ ∆2 Y ( 1 + K(1/2) ∑ q:ρ(x,q)≥h nqϵ )−1 ≤∆2 Y ( 1 + K(1/2) nϵ )−1 ≤ ∆2 Y 1 + n, where the second inequality is due to the fact that, since µn(B(x, h/4)) > 0, the set B(x, h/2) ∩Q cannot be empty (remember that Q is an h 4 -cover of X). This concludes the argument. Lemma 3 (Integrated excess risk). Let Q be an h 4 -net of X, 0 < h < ∆X . We have E (X,Y) ∥fn,Q −f∥2 ≤C0 ∆2 Y n · (h/∆X )d + 2λ2h2, where C0 depends on the Assouad dimension d and on K(0)/K(1/2). Proof. Applying Fubini’s theorem, the expected excess risk, E(X,Y) ∥fn,Q −f∥2, can be written as E X E (X,Y) ∥fn,Q(X) −f(X)∥2 ( 1{µn(B(X,h/4))>0} + 1{µn(B(X,h/4))=0} ) . By lemmas 1 and 2 we have for X = x fixed, E (X,Y) ∥fn,Q(x) −f(x)∥2 1{µn(B(x,h/4))>0} ≤ C1 E X [∆2 Y1{µn(B(x,h/4))>0} nµn(B(x, h/4)) ] + 2λ2h2 + ∆2 Y n ≤ C1 ( 2∆2 Y nµ(B(x, h/4)) ) + 2λ2h2 + ∆2 Y n , (5) where for the last inequality we used the fact that for a binomial b(n, p), E [ 1{b(n,p)>0} b(n,p) ] ≤ 2 np (see lemma 4.1 of [12]). For the case where B(x, h/4) is empty, we have E (X,Y) ∥fn,Q(x) −f(x)∥2 1{µn(B(x,h/4))=0} ≤ ∆2 Y E X 1{µn(B(x,h/4))=0} = ∆2 Y (1 −µ(B(x, h/4))n ≤ ∆2 Ye−nµ(B(x,h/4)) ≤ ∆2 Y nµ(B(x, h/4)). (6) Combining (6) and (5), we can then bound the expected excess risk as E (X,Y) ∥fn,Q −f∥2 ≤3C1∆2 Y n E X [ 1 µ(B(X, h/4)) ] + 2λ2h2 + ∆2 Y n . (7) The expectation on the r.h.s is bounded using a standard covering argument (see e.g. [12]). Let {zi}N 1 be an h 8 -cover of X. Notice that for any zi, x ∈B(zi, h/8) implies B(x, h/4) ⊃B(zi, h/8). We therefore have E X [ 1 µ(B(X, h/4)) ] ≤ N ∑ i=1 E X [1{X∈B(zi,h/8)} µ(B(X, h/4)) ] ≤ N ∑ i=1 E X [1{X∈B(zi,h/8)} µ(B(X, h/8)) ] = N ≤C2 (∆X h )d , where C2 depends just on d. We conclude by combining the above with (7) to obtain E (X,Y) ∥fn,Q −f∥2 ≤3C1C2∆2 Y n(h/∆X )d + 2λ2h2 + ∆2 Y n . 5 Corollary 1. Let n ≥max ( 9, ( ∆Y λ∆X )2 , ( λ∆X ∆Y )2) . The final regressor selected satisfies E fn,Qho/4 −f 2 ≤C (λ∆X )2d/(2+d) (∆2 Y n )2/(2+d) + 3∆2 Y √ ln(n log n) n , where C depends on the Assouad dimension d and on K(0)/K(1/2). Proof outline. Let ˜h = C3 ( ∆d/(2+d) X ( ∆2 Y λ2n )1/(2+d)) ∈H. We note that n is lower bounded so that such an ˜h is in H. We have by Lemma 3 that for ˜h, E X,Y fn,Q˜h/4 −f 2 ≤C0 (λ∆X )2d/(2+d) (∆2 Y n )2/(2+d) . Applying McDiarmid’s to the empirical risk followed by a union bound over H, we have that, with probability at least 1 −1/√n over the choice of (X′, Y′), for all h ∈H E X,Y fn,Qh/4(X) −Y 2 −1 n n ∑ i=0 fn,Qh/4(X′ i) −Y ′ i ≤∆2 Y √ ln(|H| √n) n . It follows that E X,Y fn,Qho/4(X) −Y 2 ≤E X,Y fn,Q˜h/4(X) −Y 2 + 2∆2 Y √ ln(|H| √n) n , which by (1) implies fn,Qho/4 −f 2 ≤ fn,Q˜h/4 −f 2 +2∆2 Y √ ln(|H|√n) n . Take the expectation (given the randomness in the two samples) over this last inequality and conclude. 4 Fast evaluation In this section we show how to modify the cover-tree procedure of [16] to enable fast evaluation of fn,Qh/4 for any h ∈H .= {∆X /2i}I 1, I = ⌈log n⌉. The cover-tree performs proximity search by navigating a hierarchy of nested r-nets of X. The navigating-nets of [17] implement the same basic idea. They require additional book-keeping to enable range queries of the form X ∩B(x, h), for a query point x. Here we need to perform range searches of the form Qh/4 ∩B(x, h) and our book-keeping will therefore be different from [17]. Note that, for each h and Qh/4, one could use a generic range search procedure such as [17] with the data in Qh/4 as input, but this requires building a separate data structure for each h, which is expensive. We use a single data structure. 4.1 The hierarchy of nets Consider an ordering { X(i) }n 1 of the data points obtained as follows: X(1) and X(2) are the farthest points in X; inductively for 2 < i < n, X(i) in X is the farthest point from { X(1), . . . , X(i−1) } , where the distance to a set is defined as the minimum distance to a point in the set. For r ∈ { ∆X /2i}I+2 0 , define Qr = { X(1), . . . , X(i) } where i ≥1 is the highest index such that ρ ( X(i), { X(1), . . . , X(i−1) }) ≥r. Notice that, by construction, Qr is an r-net of X. 4.2 Data structure The data structure consists of an acyclic directed graph, and range sets defined below. Neighborhood graph: The nodes of the graph are the { X(i) }n 1, and the edges are given by the following parent-child relationship: starting at r = ∆X /2, the parent of each node in Qr \ Q2r is the point it is closest to in Q2r. The graph is implemented by maintaining an ordered list of children for each node, where the order is given by the children’s appearance in the sequence { X(i) }n 1. These relationships are depicted in Figure 2. 6                               X(1) X(2) X(3) X(4) X(5) X(6) X(1) X(2) X(3) X(4) X(5) X(6) Figure 2: The r-nets (rows of left subfigure) are implicit to an ordering of the data. They define a parent-child relationship implemented by the neighborhood graph (right), the structure traversed for fast evaluation. These ordered lists of children are used to implement the operation nextChildren defined iteratively as follows. Given Q ⊂ { X(i) }n 1, let visited children denote any child of q ∈Q that a previous call to nextChildren has already returned. The call nextChildren (Q) returns children of q ∈Q that have not yet been visited, starting with the unvisited child with lowest index in { X(i) }n 1, say X(i), and returning all unvisited children in Qr, the first net containing X(i), i.e. X(i) ∈Qr \ Q2r ; r is also returned. The children returned are then marked off as visited. The time complexity of this routine is just the number of children returned. Range sets: For each node X(i) and each r ∈ { ∆X /2i}∞ 0 , we maintain a set of neighbors of X(i) in Qr defined as R(i),r .= { q ∈Qr : ρ ( X(i), q ) ≤8r } . 4.3 Evaluation Procedure evaluate(x, h) Q ←Q∆X ; repeat Q′, r ←nextChildren (Q); Q′′ ←Q ∪Q′; if r < h/4 or Q′ = ∅then // We reached past Qh/4. X(i) ←argminq∈Q ρ (x, q); // Closest point to x in Qh/4. Q ←R(i),h/4 ∩B(x, h); // Search in a range of 2h around X(i). Break loop ; if ρ (x, Q′′) ≥h + 2r then // The set Qh/4 ∩B(x, h) is empty. Q ←∅; Break loop ; Q ←{q ∈Q′′, ρ (x, q) < ρ (x, Q′′) + 2r}; until . . . ; //At this point Q = Qh/4 ∩B(x, h). return fn,Qh/4(x) ← P q∈Q nq(K(x, q, h) + ϵ) ¯Yq + ϵ “P q∈Qh/4 nq ¯Yq −P q∈Q nq ¯Yq ” P q∈Q nq(K(x, q, h) + ϵ) + ϵ “ n −P q∈Q nq ” ; The evaluation procedure consists of quickly identifying the closest point X(i) to x in Qh/4 and then searching in the range of X(i) for the points in Qh/4 ∩B(x, h). The identification of X(i) is done by going down the levels of nested nets, and discarding those points (and their descendants) that are certain to be farther to x than X(i) (we will argue that “ρ (x, Q′′) + 2r” is an upper-bound on ρ ( x, X(i) ) ). Also, if x is far enough from all points at the current level (second if-clause), we can safely stop early because B(x, h) is unlikely to contain points from Qh/4 (we’ll see that points in Qh/4 are all within 2r of their ancestor at the current level). Lemma 4. The call to procedure evaluate (x,h) correctly evaluates fn,Qh/4(x) and has time complexity C log (∆X /h) + log n where C is at most 28d. 7 Proof. We first show that the algorithm correctly returns fn,Qαh(x), and we then argue its run time. Correctness of evaluate. The procedure works by first finding the closest point to x in Qh/4, say X(i), and then identifying all nodes in ( R(i),h/4 ∩B(x, h) ) = ( Qh/4 ∩B(x, h) ) (see the first if-clause). We just have to show that this closest point X(i) is correctly identified. We’ll argue the following loop invariant I: at the beginning of the loop, X(i) is either in Q′′ = Q ∪Q′ or is a descendant of a node in Q′. Let’s consider some iteration where I holds (it certainly does in the first iteration). If the first if-clause is entered, then Q is contained in Qh/4 but Q′ is not, so X(i) must be in Q and we correctly return. Suppose the first if-clause is not entered. Now let X(j) be the ancestor in Q′ of X(i) or let it be X(i) itself if it’s in Q′′. Let r be as defined in evaluate, we have ρ ( X(i), X(j) ) < ∑∞ k=0 r/2k = 2r by going down the parent-child relations. It follows that ρ (x, Q′′) ≤ρ ( x, X(j) ) ≤ρ ( x, X(i) ) + ρ ( X(i), X(j) ) < ρ ( x, X(i) ) + 2r. In other words, we have ρ ( x, X(i) ) > ρ (x, Q′′) −2r. Thus, if the second if-clause is entered, we necessarily have ρ ( x, X(i) ) > h, i.e. B(x, h) ∩Qh/4 = ∅and we correctly return. Now assume none of the if-clauses is entered. Let X(j) ∈Q′′ be any of the points removed from Q′′ to obtain the next Q. Let X(k) be a child of X(j) that has not yet been visited, or a descendant of such a child. If neither such X(j) or X(k) is X(i) then, by definition, I must hold at the next iteration. We sure have X(j) ̸= X(i) since ρ ( x, X(j) ) ≥ρ (x, Q′′) + 2r ≥ρ ( x, X(i) ) + 2r. Now notice that, by the same argument as above, ρ ( X(j), X(k) ) < ∑∞ k=0 r/2k = 2r. We thus have ρ ( x, X(k) ) > ρ ( x, X(j) ) −2r ≥ρ ( x, X(i) ) so we know X(j) ̸= X(i). Runtime of evaluate. Starting from Q∆X , a different net Qr is reached at every iteration, and the loop stops when we reach past Qh/4. Therefore the loop is entered at most log (∆X /h/4) times. In each iteration, most of the work is done parsing through Q′′, besides time spent for the range search in the last iteration. So the total runtime is O (log (∆X /h/4) · max |Q′′|) + range search time. We just need to bound max |Q′′| ≤max |Q| + max |Q′| and the range search time. The following fact (see e.g. Lemma 4.1 of [9]) will come in handy: consider r1 and r2 such that r1/r2 is a power of 2, and let B ⊂X be a ball of radius r1; since X has Assouad dimension d, the smallest r2-cover of B is of size at most (r1/r2)d, and the largest r2-packing of B is of size at most (r1/r2)2d. This is true for any metric space, and therefore holds for X which is of Assouad dimension at most d by inclusion in X. Let Q′ ⊂Qr so that Q ⊂Q2r at the beginning of some iteration. Let q ∈Q, the children of q in Q′ are not in Q2r and therefore are all within 2r of Q; since these children an r-packing of B(q, 2r), there are at most 22d of them. Thus, max |Q′| ≤22d max |Q|. Initially Q = Q∆X so we have |Q| ≤22d since Q∆X is a ∆X -packing of X ⊂B ( X(1), 2∆X ) . At the end of each iteration we have Q ⊂B(x, ρ (x, Q′′) + 2r). Now ρ (x, Q′′) ≤h + 2r ≤4r + 2r since the if-clauses were not entered if we got to the end of the iteration. Thus, Q is an r-packing of B(x, 8r), and therefore max |Q| ≤28d. To finish, the range search around X(i) takes time R(i),h/4 ≤28d since R(i),h/4 is an h 4 -packing of B ( X(i), 2h ) . Acknowledgements This work was supported by the National Science Foundation (under grants IIS-0347646, IIS0713540, and IIS-0812598) and by a fellowship from the Engineering Institute at the Los Alamos National Laboratory. Many thanks to the anonymous NIPS reviewers for the useful comments, and thanks to Sanjoy Dasgupta for advice on the presentation. 8 References [1] P. Bickel and B. Li. Local polynomial regression on unknown manifolds. Tech. Re. Dep. of Stats. UC Berkley, 2006. [2] S. Kpotufe. Escaping the curse of dimensionality with a tree-based regressor. COLT, 2009. [3] C. J. Stone. Optimal rates of convergence for non-parametric estimators. Ann. Statist., 8:1348–1360, 1980. [4] C. J. Stone. Optimal global rates of convergence for non-parametric estimators. Ann. Statist., 10:1340– 1353, 1982. [5] S. Roweis and L. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [6] M. Belkin and N. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15:1373–1396, 2003. [7] J.B. TenenBaum, V. De Silva, and J. Langford. A global geometric framework for non-linear dimensionality reduction. Science, 290:2319–2323, 2000. [8] S. Dasgupta and Y. Freund. Random projection trees and low dimensional manifolds. STOC, 2008. [9] K. Clarkson. Nearest-neighbor searching and metric space dimensions. Nearest-Neighbor Methods for Learning and Vision: Theory and Practice, 2005. [10] S. Kulkarni and S. Posner. Rates of convergence of nearest neighbor estimation under arbitrary sampling. IEEE Transactions on Information Theory, 41, 1995. [11] S. Schaal and C. Atkeson. Robot Juggling: An Implementation of Memory-based Learning. Control Systems Magazine, IEEE, 1994. [12] L. Gyorfi, M. Kohler, A. Krzyzak, and H. Walk. A Distribution Free Theory of Nonparametric Regression. Springer, New York, NY, 2002. [13] D. Lee and A. Grey. Faster gaussian summation: Theory and experiment. UAI, 2006. [14] D. Lee and A. Grey. Fast high-dimensional kernel summations using the monte carlo multipole method. NIPS, 2008. [15] C. Atkeson, A. Moore, and S. Schaal. Locally weighted learning. AI Review, 1997. [16] A. Beygelzimer, S. Kakade, and J. Langford. Cover trees for nearest neighbors. ICML, 2006. [17] R. Krauthgamer and J. Lee. Navigating nets: Simple algorithms for proximity search. SODA, 2004. 9
2009
59
3,809
Neurometric function analysis of population codes Philipp Berens, Sebastian Gerwinn, Alexander S. Ecker and Matthias Bethge Max Planck Institute for Biological Cybernetics Center for Integrative Neuroscience, University of T¨ubingen Computational Vision and Neuroscience Group Spemannstrasse 41, 72076, T¨ubingen, Germany first.last@tuebingen.mpg.de Abstract The relative merits of different population coding schemes have mostly been analyzed in the framework of stimulus reconstruction using Fisher Information. Here, we consider the case of stimulus discrimination in a two alternative forced choice paradigm and compute neurometric functions in terms of the minimal discrimination error and the Jensen-Shannon information to study neural population codes. We first explore the relationship between minimum discrimination error, JensenShannon Information and Fisher Information and show that the discrimination framework is more informative about the coding accuracy than Fisher Information as it defines an error for any pair of possible stimuli. In particular, it includes Fisher Information as a special case. Second, we use the framework to study population codes of angular variables. Specifically, we assess the impact of different noise correlations structures on coding accuracy in long versus short decoding time windows. That is, for long time window we use the common Gaussian noise approximation. To address the case of short time windows we analyze the Ising model with identical noise correlation structure. In this way, we provide a new rigorous framework for assessing the functional consequences of noise correlation structures for the representational accuracy of neural population codes that is in particular applicable to short-time population coding. 1 Introduction The relative merits of different population coding schemes have mostly been studied (e.g. [1, 12], for a review see [2]) in the framework of stimulus reconstruction (figure 1a), where the performance of a code is judged on the basis of the mean squared error E[(θ −ˆθ)2]. That is, if a stimulus θ is encoded by a population of N neurons with tuning curves fi, we ask how well, on average, can an estimator reconstruct the true value of the presented stimulus based on the neural responses r, which were generated by the density p(r|θ). The average reconstruction error can be written as Eθ,r[(θ −ˆθ(r))2] = Eθ[Varˆθ|θ] + Eθ[b2 θ]. Here Varˆθ|θ = Er[(θ −ˆθ(r))2|θ] denotes the error variance and bθ = Er[ˆθ(r)|θ] −θ the bias of the estimator ˆθ. For the sake of analytical tractability, most studies have employed Fisher Information (FI) (e.g. [1, 12]) Jθ =  −∂2 ∂θ2 log p(r|θ) θ  to bound the conditional error variance Varˆθ|θ of an unbiased estimator from below according to the Cramer-Rao bound: Varˆθ|θ ≥1 Jθ . 1 a Stimulus Neural Response Stimulus reconstruction b Stimulus discrimination c Error θ θ1 2 Figure 1: Illustration of the two frameworks for studying population codes. a. In stimulus reconstruction, an estimator tries to reconstruct the orientation of a stimulus based on a noisy neural response. The quality of a code is based on the average error of this estimator. b. In stimulus discrimination, an ideal observer needs to choose one of two possible stimuli based on a noisy neural response (2AFC task). c. A neurometric function shows the error E as a function of ∆θ, the difference between a reference direction θ1 and a second direction θ2. This framework is often used in psychophysical studies. For the comparison of different coding schemes, it is important that an estimator exists which can actually attain this lower bound. For short time windows and certain types of tuning functions, this may not always be the case [4]. In particular, it is unclear how different population coding schemes affect the fidelity with which a population of binary neurons can encode a stimulus variable. 1.1 A new approach for the analysis of population coding Here we view the population coding problem from a different perspective: We consider the case of stimulus discrimination in a two alternative forced choice paradigm (2AFC, figure 1b) with equally probable stimuli and compute two natural measures of coding accuracy: (1) the minimal discrimination error E(θ1, θ2) of an ideal observer classifying a stimulus s based on the response distribution as either being θ1 or θ2 and (2) the Jensen-Shannon information IJS between the response distributions p(r|θ1) and p(r|θ2). The minimal discrimination error is achieved by the Bayes optimal classifier ˆθ = argmaxs p(s|r) where s ∈{θ1, θ2} and the prior distribution p(s) = 1 2. It is given by E(θ1, θ2) = Z min (p(s = θ1, r), p(s = θ2, r)) dr = 1 2 Z min (p(r|θ1), p(r|θ2)) dr (1) and the Jensen-Shannon Information [13] is defined as IJS(θ1, θ2) = 1 2DKL [p(r|θ1)∥p(r)] + 1 2DKL [p(r|θ2)∥p(r)] , (2) where p(r) = P s∈θ1,θ2 p(s)p(r|s) = 1 2(p(r|θ1) + p(r|θ2)) is the arithmetic average between the two densities, which in our case is the same as the marginal distribution. DKL[q1∥q2] = R q1(x) log q1(x) q2(x)dx is the Kullback-Leibler divergence. IJS is an interesting measure of coding accuracy since it directly measures the mutual information between the neural responses and the ‘class label’, i.e. the stimulus identity. By observing a population response pattern r, the uncertainty (in terms of entropy) about the stimulus is reduced by MI(r, s) = X s p(s) Z p(r|s) log p(r|s) P s p(r|s)p(s)dr = IJS, with prior distribution as above. In the following, we will restrict our analysis to the special case of shift-invariant population codes for angular variables and compute neurometric functions E(∆θ) and IJS(∆θ) (figure 1c) by setting θ1 = θ and θ2 = θ + ∆θ. In the limit of large populations, the dependence of these curves on θ can be ignored. 2 0 0.2 0.4 0.6 0.8 1 H[E] (bits) 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 MDE Upper/Lower Bound Upper/Lower Bound (FI) 0 0.1 0.3 0.5 Error 0 0.1 0.3 0.5 Error 0 0.2 0.4 0.6 0.8 1 a b c ∆ θ (deg) JS Information Error Upper/Lower Bound (equ. 4, 5) Lin’s lower bound Figure 2: a. Illustration of equations 5: The entropy H[E] (black) intersects 1 −IJS (grey) at E∗(dashed). Because of Fano’s inequality, E > E∗. b. Functional form of the bounds in equations 4 and 5 (black). Our lower bound is tighter than the lower bound proposed in [13] (grey). c. Illustration of the connections between the proposed measures of coding accuracy. Minimal discrimination error E(∆θ) (red) is shown as a neurometric curve as a function of ∆θ and is bounded in terms of the Jensen-Shannon information IJS(∆θ) via equations 4 and 5 (black). Fisher Information links to E via equation 3 and the bounds imposed by IJS (grey). This approximation is only valid for small ∆θ. The computations have been caried out for a population of N = 50 neurons, with average correlations ¯ρ = .15 and correlation structure as in figure 3e. 1.2 Computing E and IJS While the integrals in equation (1) and (2) often cannot be solved, they are relatively easy to evaluate numerically using Monte-Carlo techniques [10]. For the minimal discrimination error, we use E(∆θ) = 1 2 Z min (p(r|θ), p(r|θ + ∆θ)) dr ≈1 2 M X i=1 min  p(r(i)|θ), p(r(i)|θ + ∆θ)  /p(r(i)), where r(i) is one of M samples, drawn from the mixture distribution p(r) = 1 2 (p(r|θ) + p(r|θ + ∆θ)). To approximate IJS, we evaluate each DKL term separately as DKL [p(r|θ)∥p(r)] = Z p(r|θ) log p(r|θ) p(r) dr ≈1 M M X i=1 log p(r(i)|θ) −log p(r(i)) where we draw samples r(i) from p(r(i)|θ). We use an analogous expression for DKL [p(r|θ + ∆θ)∥p(r)] and plug these estimates into equation 2. This scheme provides consistent estimates of the desired quantities. For all simulations below we used M = 105 samples. 2 Links between the proposed measures In this section, we link the Fisher Information Jθ of a population code p(r|θ) to the minimum discrimination error E(∆θ) and the Jensen-Shannon Information IJS(∆θ) in the 2AFC paradigm. First, we link Fisher Information to Jensen-Shannon information IJS. Second, we bound the minimum discrimination error in terms of the Jensen-Shannon information. 2.1 From Fisher Information to Jensen-Shannon Information In order to obtain a relationship between IJS and Fisher Information, we use an expression already derived in [7], where p(r|θ + ∆θ) is expanded up to second order in ∆θ, which yields: IJS(∆θ) ≈1 8(∆θ)2Jθ. (3) 3 0 10 20 30 40 50 Response (Hz) d a c e f 0 50 100 150 0 10 20 30 40 50 Stimulus orientation (deg) Response (Hz) b Figure 3: Illustration of the model. Tuning functions: a. Cosine-type tuning functions with rates between 5 and 50 Hz. b. Box-like tuning function with matched minimal and maximal firing rates. Cosine tuning function resembles the orientation tuning functions of many cortical neurons. They are characterized by approximately constant Fisher Information independent of the stimulus orientation. Box-like tuning functions, in contrast, have non-constant Fisher Information due to their steep non-linearity. They have been shown to exhibit superior performance over cosine-like tuning functions with respect to the mean squared error [4]. Correlation matrices: c. stimulus-independent, no limited range (SI, α = ∞) , d. stimulus-independent, limited range (SI, α = 2), e. stimulus-dependent, no limited range (SD, α = ∞), f. stimulus-dependent, limited range (SD, α = 2) Therefore, Fisher Information provides a good approximation of the Jensen-Shannon Information for sufficiently small ∆θ. 2.2 From Jensen-Shannon Information to Minimal Discrimination Error The minimal discrimination error E(∆θ) of an ideal observer is bounded from above and below in terms of IJS(∆θ). An upper bound derived by [13] is given by E(∆θ) ≤1 2 −1 2IJS(∆θ). (4) Next, we derive a new lower bound on E, which is tighter than a bound derived by Lin [13]. To this end, we observe that from Fano’s inequality [8] it follows that H [E] ≥ H[s|r] −E log(|s| −1) = H[s|r] = H[s] −MI[r, s] = 1 −IJS(∆θ), (5) where H[E] is the entropy of a Bernoulli distribution with p = E. The equality from first to second line follows as the number of stimuli or classes |s| = 2. Since the entropy is monotonic in E on the interval [0, 0.5], we have the lower bound E ≥E∗, where E∗is chosen such that equality holds. For an illustration, see figure 2a. The shape of both bounds, as well as Lin’s lower bound, are illustrated in figure 2b. In figure 2c we show the minimal discrimination error for a population code (red) together with the upper and lower bound (black) obtained by inserting IJS(∆θ) into equations 4 and 5. Both bounds follow nicely the neurometric function E(∆θ). For comparison, we also show the upper and lower bound obtained by plugging Fisher Information into equation 3 and computing the bounds 4 and 5 based on this approximation of IJS(∆θ) (grey). Clearly, the approximation is valid for small ∆θ and becomes successively worse for large ones. 4 a b c 0 20 40 60 80 0 0.2 0.4 0.6 ∆ θ (deg) Error 0 20 40 60 80 0 0.2 0.4 0.6 ∆ θ (deg) Error 0 20 40 60 80 0 0.2 0.4 0.6 ∆ θ (deg) Error Cosine Cosine FI bound Box Box FI bound Box d’ Cosine d’ Figure 4: Comparison of box-like (red) vs. cosine (black) tuning functions in short-term population codes of a. N = 10 b. N = 50 c. N = 250 independent neurons. Although box-like tuning functions are much broader than cosine tuning functions, Ebox lies usually below Ecos. For the cosine case, FI (dashed, approximation as in figure 2c and Ed′ (grey) provide accurate accounts of coding accuracy. In contrast, FI grossly overestimates the discrimination error for box-like tuning functions in small and medium sized populations. In this case, Ed′ is only a good approximation of E in the range where ∆θ is small (dark red). Beyond this point, it underestimates E (a,b). For N = 250, bounds are not shown for clarity but they capture the true beaviour of E better than in figure 4a and b. 2.3 Previous work Only a small number of studies on neural population coding have used other measures than Fisher Information [18, 3, 6, 4]. Two approaches are most closely related to ours: Snippe and Koenderink [18] and Averbeck and Lee [3] used a measure analogous to the sensitivity index d′ (d′)2 = ∆µΣ−1∆µ (6) ∆µ := f(θ + ∆θ) −f(θ) as a measure of coding accuracy. While Snippe and Koenderink have considered only the limit ∆θ →0, Averbeck and Lee evaluated equation 6 for finite ∆θ using Σ = 1 2(Σθ + Σθ+∆θ) and converted d′ to a discrimination error Ed′ = 1 −erf(d′/2). This approximation is exact only if the class conditional distribution p(r|θ) is Gaussian with fixed covariance Σθ = Σ for all ∆θ. In that particular case, the entire neurometric function is fully determined by the Fisher Information [9]: d′ = (∆θ) p Jθ = (∆θ) Jmean Jmean is the linear part of the Fisher Information (cf. equation 7). In the general case, it is not obvious what aspects of the quality of a population code are captured by the above measure. Therefore, both Fisher Information and the class-conditional second-order approximation used by Averbeck and Lee have shortcomings: The latter does not account for information originating from changes in the covariance matrix as is quantified by Jcov (cf. equation 7). Fisher Information, on the other hand, can be quite uninformative about the coding accuracy of the population, especially when the tuning functions are highly nonlinear (see figure 3) or noise is large, as in these cases it is not certain whether the Cramer-Rao bound can actually be attained [4]. The examples studied in the next section demonstrate how these shortcomings can be overcome using the minimal discrimination error (equation 1). 3 Results After describing the population model used in this study, we will illustrate in a simple example, how our proposed framework is more informative than previous approaches. Second, we will investigate how different noise correlations structures impact population coding on different timescales. 3.1 The population model In this section, we describe in detail the population model used in the remainder of the study. To facilitate comparability, we closely follow the model used in a recent study by Josic et al. [12] 5 where applicable. We consider a population of N neurons tuned to orientation, where the firing rate of neuron i follows an average tuning profile fi(θ) with (a) a cosine-like shape fi(θ) = λ1 + λ2ak(θ −φi) with k = 1 in section 3.2 and k = 6 in section 3.3 and a(φ) = 1 2(1+cos(φ)) or (b) a box-like shape fi(θ) =  |cos(θ −φi)| 1 j · sgn cos(θ −φi) + 1  · λ2 2 + λ1. Here, φi is the preferred orientation of neuron i and we use j = 12. We consider two scenarios: 1. Long-term coding: r(θ) ∼N (f(θ), Σ(θ)), where the trial-to-trial fluctuations are assumed to be normally distributed with mean f(θ) and covariance matrix Σ(θ). 2. Short-term coding: r(θ) ∼I (f(θ), Σ(θ)), where ri ∈{0, 1} and I(µ, Σ) is the maximum entropy distribution consistent with the constraints provided by µ and Σ, the Ising model [16]. That is, for short-term population coding, we assume the population acitivity to be binary with each neuron either emitting one spike or none. The parameters of the Ising model were computed using gradient descent on the log likelihood. Following Josic et al. [12], we model the stimulus-dependent covariance matrix as Σij(θ) = δijvi(θ) + (1 −δij)ρij(θ) p vi(θ)vj(θ), where vi(θ) is the variance of cell i and ρij(θ) the correlation coefficient. For long-term coding, we set vi(θ) = fi(θ) and for short-term coding, we set vi(θ) = fi(θ)(1 −fi(θ)). We allow for both stimulus and spatial influences on ρ by setting ρij(θ) = σij(θ)c(φi −φj), where φi is the preferred orientation of neuron i. The function s models the influence of the stimulus, while the function c models the spatial component of the correlation structure. We use σij(θ) = σi(θ)σj(θ), where σi(θ) = κ1 + κ2a2(θ). We set c(φi −φj) = C exp (−|φi −φj|/α), where α controls the length of the spatial decay. To obtain a desired mean level of correlation ¯ρ, we use the method described in [12]. 3.2 Minimum discrimination error is more informative than Fisher Information As has been pointed out in [4], the shape of unimodal tuning functions can strongly influence the coding accuracy of population codes of angular variables. In particular, box-like tuning functions can be superior to cosine tuning functions. However, numerical evaluation of the minimum mean squared error for angular variables is much more difficult than the evaluation of the minimal discrimination error proposed here, and the above claim has only been verified up to N = 20 neurons. Here we compute the full neurometric functions for N = 10, 50, 250 binary neurons (figure 4). In this way, we show that the advantage of box-like tuning functions also holds for large numbers of neurons (compare red and black curves in figure 4 a-c). In addition, we note that Fisher Information does not provide an accurate account of the performance of box-like tuning functions: it fails as soon as the nonlinearity in the tuning functions becomes effective and overestimates the true minimal discrimination error E. Similarly, the approximate neurometric functions Ed′(∆θ) obtained from equation 6 do not capture the shape of neurometric functions E(∆θ) but underestimate the minimal discrimination error. In contrast, the deviation between both curves stays rather small for cosine tuning functions. 3.3 Stimulus-dependent correlations have opposite effects for long- and short-term population coding The shape of the noise covariance matrix Σθ can strongly influence the coding fidelity of a neural population. In order to evaluate these effects it is important to take differences in the noise covariance for different stimuli into account. In this section, we will use our new framework to study different noise correlation structures for short- and long-term population coding. Previous studies so far have investigated the effect of noise correlations in the long-term case: Most studies assumed p(r|θ) to follow a multivariate Gaussian distribution, so that firing rates r|θ ∼ N (f(θ), Σ(θ)) (for detailed description of the population model see section 3.1). In this case, the 6 0 50 100 0 0.2 0.4 0.6 0.8 1 ∆ θ (deg) 0 10 20 0 0.2 0.4 0.6 0.8 1 ∆ θ (deg) 0 5 10 0 0.2 0.4 0.6 0.8 1 ∆ θ (deg) Information (bits) 0 50 100 0 0.1 0.2 0.3 0.4 0.5 0 10 20 0 0.1 0.2 0.3 0.4 0.5 0 5 10 0 0.1 0.2 0.3 0.4 0.5 Error SI, α=inf SI, α=1 SD, α=inf SD, α=1 b a d e f c 7 8 9 10 0.05 0.1 0.15 Figure 5: Neurometric functions E(∆θ) (a-c) and IJS(∆θ) (d-f) for four different noise correlation structures. a. and d. Large population (N = 100) and long-term coding. b. and e. Medium sized population (N = 15) and long-term coding. The inset is a magnification for clarity. c. and f. Medium sized population (N = 15) and short-term coding. The impact of stimulus-dependent noise correlations in the absence of limited range correlations changes from b/e to c/f (red line). While they are beneficial in long-term coding, they are beneficial in short-term coding only for close angles. The exact point of this transition is not the same for E and IJS, since they are only related via the bounds described in section 2.2. Note that the scale of the x-axis varies. FI of the population takes a particularly simple form. It can be decomposed into: Jθ = Jmean + Jcov Jmean = f ′⊤Σ−1f ′, Jcov = 1 2Tr[Σ′Σ−1Σ′Σ−1], (7) where we omit the dependence on θ for clarity and f ′, Σ′ are the derivatives of f and Σ with respect to θ. Jmean, Jcov are the Fisher information, when either only the mean or only the covariance are assumed to depend on θ. For this case, various studies have investigated noise structures where correlations were either uniform across the population (figure 3c) or their magnitude decayed with difference in preferred orientations (figure 3d), ‘limited range structure’ or ‘spatial decay’, see e.g. [1]). Only recently have stimulus-dependent correlations been analyzed in terms of Fisher information [12]. Josic et al. find that in the absence of limited range correlations, stimulus-dependent noise correlations (figure 3e) are beneficial for a population code, while in their presence (figure 3f), they are detrimental. We first compute the neurometric functions E(∆θ) and IJS(∆θ) for a population of 100 neurons in the case of long-term coding with a Gaussian noise model for the four possible noise correlation structures (figure 5a). We corroborate the results of Josic et al. in that we find that the lowest E or the highest IJS is achieved for a population with stimulus-dependent noise correlations and no limited range structure, while a population with stimulus-dependent noise correlations in the presence of spatial decay performs worst. Spatially uniform correlations (figure 3c) provide almost as good a code as the best coding scheme. 7 Next, we directly compare long- and short-term population coding in a population of 15 neurons1. For short-term coding, we assume that the population activity is of binary nature, i.e. each neuron spikes at most once. Again, we compute neurometric functions E(∆θ) and IJS(∆θ) for all four possible correlation structures. The results for long-term coding do not differ between large and small populations (figure 5b), although relative differences between different coding schemes are less prominent. In contrast, we find that the beneficial impact of stimulus-dependent correlations in the absence of limited range structure reverses in short-term codes for large ∆θ (figure 5c). 4 Discussion In this paper, we introduce the computation of neurometric functions as a new framework for studying the representational accuracy of neural population codes. Importantly, it allows for a rigorous treatment of nonlinear population codes (e.g. box-like tuning functions) and noise correlations for non-Gaussian noise models. This is particularly important for binary population codes on timescales where neurons fire at most one spike. Such codes are of special interest since psychophysical experiments have demonstrated that efficient computations can be performed in cortex on short time scales [19]. Previous studies have mostly focussed on long-term population codes, since in this case it is possible to study many question analytically using Fisher Information. Although the structure of neural population acitivity on short timescales has recently attracted much interest [16, 17, 15], population codes for binary population activity and, in particular, the impact of different noise correlation structures on such codes are not well understood. In contrast to previous work [14], neurometric function analysis allows for a comprehensive treatment of both short- and long-term population codes in a single framework. In section 3.3, we have started to study population codes on short timescales and found important differences in the effect of noise correlations between short- and long-term population codes. In the future, we will extend these results to much larger populations adapting new techniques for approximate fitting of Ising models [15]. The example discussed in section 3.2 demonstrates that neurometric functions can provide additional information compared to Fisher Information: While Fisher Information is a single number for each potential population code, neurometric functions in terms of E or IJS assess the coding quality for each pair of stimuli. This also enables us to detect effects like the dependence of the relative performance of different population codes on ∆θ as shown in figure 5 c and f. We can furthermore easily extend the framework to take unequal prior probabilities into account. In equations 1 and 2 we have assumed equal prior probabilities p(θ1) = p(θ2) = 1 2. Both E and IJS, however, are also well defined if this is not the case. The framework of stimulus discrimination in a 2AFC task has long been used in psychophysical and neurophysiological studies for measuring the accuracy of orientation coding in the visual system (e.g. [5, 21]). It is therefore appealing to use the same framework also in theoretical investigations on neural population coding since this facilitates the comparison with experimental data. Furthermore, it allows studying population codes for categorial variables since, in contrast to Fisher Information, it does not require the variable of interest to be continuous. This is of advantage, as many neurophysiological studies investigate the encoding of categories, such as objects [11] or numbers [20]. Acknowledgments We thank A. Tolias and J. Cotton for discussions. This work has been supported by the Bernstein award to MB (BMBF; FKZ: 01GQ0601) and a scholarship of the German National academic foundation to PB. 1We are limited in the number of neurons as fitting the required Ising model is computationally very expensive. For the present purpose, we chose N = 15, which is sufficient to demonstrate our point. 8 References [1] L. F. Abbott and Peter Dayan. The effect of correlated variability on the accuracy of a population code. Neural Comp., 11(1):91–101, 1999. [2] B. B. Averbeck, P. E. Latham, and A. Pouget. Neural correlations, population coding and computation. Nat Rev Neurosci, 7(5):358–366, 2006. [3] B. B. Averbeck and D. Lee. Effects of noise correlations on information encoding and decoding. J Neurophysiol, 95(6):3633–3644, 2006. [4] M. Bethge, D. Rotermund, and K. Pawelzik. Optimal Short-Term population coding: When fisher information fails. Neural Comp., 14(10):2317–2351, 2002. [5] A. Bradley, B. C. Skottun, I. Ohzawa, G. Sclar, and R. D. Freeman. Visual orientation and spatial frequency discrimination: a comparison of single neurons and behavior. J Neurophysiol, 57(3):755–772, 1987. [6] N. Brunel and J. P. Nadal. Mutual information, fisher information, and population coding. Neural Computation, 10(7):1731–1757, 1998. [7] M. Casas, P. W. Lamberti, A. Plastino, and A. R. Plastino. Jensen-Shannon divergence, fisher information, and wootters’ hypothesis. Arxiv preprint quant-ph/0407147, 2004. [8] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley-Interscience, 2006. [9] P. Dayan and L. F. Abbott. Theoretical neuroscience: Computational and mathematical modeling of neural systems. MIT Press, 2001. [10] J.R. Hershey and P.A. Olsen. Approximating the kullback leibler divergence between gaussian mixture models. In Acoustics, Speech and Signal Processing, 2007. ICASSP 2007. IEEE International Conference on, volume 4, pages IV–317–IV–320, 2007. [11] C. P. Hung, G. Kreiman, T. Poggio, and J. J. DiCarlo. Fast readout of object identity from macaque inferior temporal cortex. Science, 310(5749):863–866, 2005. [12] K. Josic, E. Shea-Brown, B. Doiron, and J. de la Rocha. Stimulus-dependent correlations and population codes. Neural Computation, 21(10):2774–2804, 2009. [13] J. Lin. Divergence measures based on the shannon entropy. Information Theory, IEEE Transactions on, 37(1):145–151, 1991. [14] S. Panzeri, A. Treves, S. Schultz, and E. T. Rolls. On decoding the responses of a population of neurons from short time windows. Neural Computation, 11(7):1553–1577, 1999. [15] Y. Roudi, J. Tyrcha, and J. Hertz. The ising model for neural data: Model quality and approximate methods for extracting functional connectivity. Phys. Rev. E, 79:051915, February 2009. [16] E. Schneidman, M. J. Berry, R. Segev, and W. Bialek. Weak pairwise correlations imply strongly correlated network states in a neural population. Nature, 440(7087):1007–1012, 2006. [17] J. Shlens, G. D. Field, J. L. Gauthier, M. Greschner, A. Sher, A. M. Litke, and E. J. Chichilnisky. The structure of Large-Scale synchronized firing in primate retina. Journal of Neuroscience, 29(15):5022, 2009. [18] H. Snippe and J. Koenderink. Information in channel-coded systems: correlated receivers. Biological Cybernetics, 67(2):183–190, June 1992. [19] S. Thorpe, D. Fize, and C. Marlot. Speed of processing in the human visual system. Nature, 381(6582):520–522, 1996. [20] O. Tudusciuc and A. Nieder. Neuronal population coding of continuous and discrete quantity in the primate posterior parietal cortex. Proceedings of the National Academy of Sciences of the United States of America, 104(36):14513–8, 2007. [21] P. Vazquez, M. Cano, and C. Acuna. Discrimination of line orientation in humans and monkeys. J Neurophysiol, 83(5):2639–2648, 2000. 9
2009
6
3,810
Bayesian Belief Polarization Alan Jern Department of Psychology Carnegie Mellon University ajern@cmu.edu Kai-min K. Chang Language Technologies Institute Carnegie Mellon University kkchang@cs.cmu.edu Charles Kemp Department of Psychology Carnegie Mellon University ckemp@cmu.edu Abstract Empirical studies have documented cases of belief polarization, where two people with opposing prior beliefs both strengthen their beliefs after observing the same evidence. Belief polarization is frequently offered as evidence of human irrationality, but we demonstrate that this phenomenon is consistent with a fully Bayesian approach to belief revision. Simulation results indicate that belief polarization is not only possible but relatively common within the set of Bayesian models that we consider. Suppose that Carol has requested a promotion at her company and has received a score of 50 on an aptitude test. Alice, one of the company’s managers, began with a high opinion of Carol and became even more confident of her abilities after seeing her test score. Bob, another manager, began with a low opinion of Carol and became even less confident about her qualifications after seeing her score. On the surface, it may appear that either Alice or Bob is behaving irrationally, since the same piece of evidence has led them to update their beliefs about Carol in opposite directions. This situation is an example of belief polarization [1, 2], a widely studied phenomenon that is often taken as evidence of human irrationality [3, 4]. In some cases, however, belief polarization may appear much more sensible when all the relevant information is taken into account. Suppose, for instance, that Alice was familiar with the aptitude test and knew that it was scored out of 60, but that Bob was less familiar with the test and assumed that the score was a percentage. Even though only one interpretation of the score can be correct, Alice and Bob have both made rational inferences given their assumptions about the test. Some instances of belief polarization are almost certain to qualify as genuine departures from rational inference, but we argue in this paper that others will be entirely compatible with a rational approach. Distinguishing between these cases requires a precise normative standard against which human inferences can be compared. We suggest that Bayesian inference provides this normative standard, and present a set of Bayesian models that includes cases where polarization can and cannot emerge. Our work is in the spirit of previous studies that use careful rational analyses in order to illuminate apparently irrational human behavior (e.g. [5, 6, 7]). Previous studies of belief polarization have occasionally taken a Bayesian approach, but often the goal is to show how belief polarization can emerge as a consequence of approximate inference in a Bayesian model that is subject to memory constraints or processing limitations [8]. In contrast, we demonstrate that some examples of polarization are compatible with a fully Bayesian approach. Other formal accounts of belief polarization have relied on complex versions of utility theory [9], or have focused on continuous hypothesis spaces [10] unlike the discrete hypothesis spaces usually considered by psychological studies of belief polarization. We focus on discrete hypothesis spaces and require no additional machinery beyond the basics of Bayesian inference. We begin by introducing the belief revision phenomena considered in this paper and developing a Bayesian approach that clarifies whether and when these phenomena should be considered irrational. We then consider several Bayesian models that are capable of producing belief polarization and illustrate them with concrete examples. Having demonstrated that belief polarization is compatible 1 0.5 0.5 0.5 beliefs Updated beliefs Prior beliefs Prior beliefs Prior beliefs B A Parallel updating Contrary updating Divergence Convergence (b) (i) (ii) Updated (a) beliefs Updated P(h1) Figure 1: Examples of belief updating behaviors for two individuals, A (solid line) and B (dashed line). The individuals begin with different beliefs about hypothesis h1. After observing the same set of evidence, their beliefs may (a) move in opposite directions or (b) move in the same direction. with a Bayesian approach, we present simulations suggesting that this phenomenon is relatively generic within the space of models that we consider. We finish with some general comments on human rationality and normative models. 1 Belief revision phenomena The term “belief polarization” is generally used to describe situations in which two people observe the same evidence and update their respective beliefs in the directions of their priors. A study by Lord, et al. [1] provides one classic example in which participants read about two studies, one of which concluded that the death penalty deters crime and another which concluded that the death penalty has no effect on crime. After exposure to this mixed evidence, supporters of the death penalty strengthened their support and opponents strengthened their opposition. We will treat belief polarization as a special case of contrary updating, a phenomenon where two people update their beliefs in opposite directions after observing the same evidence (Figure 1a). We distinguish between two types of contrary updating. Belief divergence refers to cases in which the person with the stronger belief in some hypothesis increases the strength of his or her belief and the person with the weaker belief in the hypothesis decreases the strength of his or her belief (Figure 1a(i)). Divergence therefore includes cases of traditional belief polarization. The opposite of divergence is belief convergence (Figure 1a(ii)), in which the person with the stronger belief decreases the strength of his or her belief and the person with the weaker belief increases the strength of his or her belief. Contrary updating may be contrasted with parallel updating (Figure 1b), in which the two people update their beliefs in the same direction. Throughout this paper, we consider only situations in which both people change their beliefs after observing some evidence. All such situations can be unambiguously classified as instances of parallel or contrary updating. Parallel updating is clearly compatible with a normative approach, but the normative status of divergence and convergence is less clear. Many authors argue that divergence is irrational, and many of the same authors also propose that convergence is rational [2, 3]. For example, Baron [3] writes that “Normatively, we might expect that beliefs move toward the middle of the range when people are presented with mixed evidence.” (p. 210) The next section presents a formal analysis that challenges the conventional wisdom about these phenomena and clarifies the cases where they can be considered rational. 2 A Bayesian approach to belief revision Since belief revision involves inference under uncertainty, Bayesian inference provides the appropriate normative standard. Consider a problem where two people observe data d that bear on some hypothesis h1. Let P1(·) and P2(·) be distributions that capture the two people’s respective beliefs. Contrary updating occurs whenever one person’s belief in h1 increases and the other person’s belief in h1 decreases, or when [P1(h1|d) −P1(h1)] [P2(h1|d) −P2(h1)] < 0 . (1) 2 V H D H D H D H D H D H D H D D H Family 2 (b) (c) (d) (e) (f) (g) (h) (a) Family 1 V V V V V V Figure 2: (a) A simple Bayesian network that cannot produce either belief divergence or belief convergence. (b) – (h) All possible three-node Bayes nets subject to the constraints described in the text. Networks in Family 1 can produce only parallel updating, but networks in Family 2 can produce both parallel and contrary updating. We will use Bayesian networks to capture the relationships between H, D, and any other variables that are relevant to the situation under consideration. For example, Figure 2a captures the idea that the data D are probabilistically generated from hypothesis H. The remaining networks in Figure 2 show several other ways in which D and H may be related, and will be discussed later. We assume that the two individuals agree on the variables that are relevant to a problem and agree about the relationships between these variables. We can formalize this idea by requiring that both people agree on the structure and the conditional probability distributions (CPDs) of a network N that captures relationships between the relevant variables, and that they differ only in the priors they assign to the root nodes of N. If N is the Bayes net in Figure 2a, then we assume that the two people must agree on the distribution P(D|H), although they may have different priors P1(H) and P2(H). If two people agree on network N but have different priors on the root nodes, we can create a single expanded Bayes net to simulate the inferences of both individuals. The expanded network is created by adding a background knowledge node B that sends directed edges to all root nodes in N, and acts as a switch that sets different root node priors for the two different individuals. Given this expanded network, distributions P1 and P2 in Equation 1 can be recovered by conditioning on the value of the background knowledge node and rewritten as [P(h1|d, b1) −P(h1|b1)] [P(h1|d, b2) −P(h1|b2)] < 0 (2) where P(·) represents the probability distribution captured by the expanded network. Suppose that there are exactly two mutually exclusive hypotheses. For example, h1 and h0 might state that the death penalty does or does not deter crime. In this case Equation 2 implies that contrary updating occurs when [P(d|h1, b1) −P(d|h0, b1)] [P(d|h1, b2) −P(d|h0, b2)] < 0 . (3) Equation 3 is derived in the supporting material, and leads immediately to the following result: R1: If H is a binary variable and D and B are conditionally independent given H, then contrary updating is impossible. Result R1 follows from the observation that if D and B are conditionally independent given H, then the product in Equation 3 is equal to (P(d|h1) −P(d|h0))2, which cannot be less than zero. R1 implies that the simple Bayes net in Figure 2a is incapable of producing contrary updating, an observation previously made by Lopes [11]. Our analysis may help to explain the common intuition that belief divergence is irrational, since many researchers seem to implicitly adopt a model in which H and D are the only relevant variables. Network 2a, however, is too simple to capture the causal relationships that are present in many real world situations. For example, the promotion example at the beginning of this paper is best captured using a network with an additional node that represents the grading scale for the aptitude test. Networks with many nodes may be needed for some real world problems, but here we explore the space of three-node networks. We restrict our attention to connected graphs in which D has no outgoing edges, motivated by the idea that the three variables should be linked and that the data are the final result of some generative process. The seven graphs that meet these conditions are shown in Figures 2b–h, where the additional variable has been labeled V . These Bayes nets illustrate cases in which (b) V is an additional 3 Models Conventional wisdom Family 1 Family 2 Belief divergence ✓ Belief convergence ✓ ✓ Parallel updating ✓ ✓ ✓ Table 1: The first column represents the conventional wisdom about which belief revision phenomena are normative. The models in the remaining columns include all three-node Bayes nets. This set of models can be partitioned into those that support both belief divergence and convergence (Family 2) and those that support neither (Family 1). piece of evidence that bears on H, (c) V informs the prior probability of H, (d)–(e) D is generated by an intervening variable V , (f) V is an additional generating factor of D, (g) V informs both the prior probability of H and the likelihood of D, and (h) H and D are both effects of V . The graphs in Figure 2 have been organized into two families. R1 implies that none of the graphs in Family 1 is capable of producing contrary updating. The next section demonstrates by example that all three of the graphs in Family 2 are capable of producing contrary updating. Table 1 compares the two families of Bayes nets to the informal conclusions about normative approaches that are often found in the psychological literature. As previously noted, the conventional wisdom holds that belief divergence is irrational but that convergence and parallel updating are both rational. Our analysis suggests that this position has little support. Depending on the causal structure of the problem under consideration, a rational approach should allow both divergence and convergence or neither. Although we focus in this paper on Bayes nets with no more than three nodes, the class of all network structures can be partitioned into those that can (Family 2) and cannot (Family 1) produce contrary updating. R1 is true for Bayes nets of any size and characterizes one group of networks that belong to Family 1. Networks where the data provide no information about the hypotheses must also fail to produce contrary updating. Note that if D and H are conditionally independent given B, then the left side of Equation 3 is equal to zero, meaning contrary updating cannot occur. We conjecture that all remaining networks can produce contrary updating if the cardinalities of the nodes and the CPDs are chosen appropriately. Future studies can attempt to verify this conjecture and to precisely characterize the CPDs that lead to contrary updating. 3 Examples of rational belief divergence We now present four scenarios that can be modeled by the three-node Bayes nets in Family 2. Our purpose in developing these examples is to demonstrate that these networks can produce belief divergence and to provide some everyday examples in which this behavior is both normative and intuitive. 3.1 Example 1: Promotion We first consider a scenario that can be captured by Bayes net 2f, in which the data depend on two independent factors. Recall the scenario described at the beginning of this paper: Alice and Bob are responsible for deciding whether to promote Carol. For simplicity, we consider a case where the data represent a binary outcome—whether or not Carol’s r´esum´e indicates that she is included in The Directory of Notable People—rather than her score on an aptitude test. Alice believes that The Directory is a reputable publication but Bob believes it is illegitimate. This situation is represented by the Bayes net and associated CPDs in Figure 3a. In the tables, the hypothesis space H = {‘Unqualified’ = 0, ‘Qualified’ = 1} represents whether or not Carol is qualified for the promotion, the additional factor V = {‘Disreputable’ = 0, ‘Reputable’ = 1} represents whether The Directory is a reputable publication, and the data variable D = {‘Not included’ = 0, ‘Included’ = 1} represents whether Carol is featured in it. The actual probabilities were chosen to reflect the fact that only an unqualified person is likely to pad their r´esum´e by mentioning a disreputable publication, but that 4 V2 H D H D H D H D V H P(D=1) 0 0 0.5 0 1 0.1 1 0 0.1 1 1 0.9 V P(H=1) 0 0.1 1 0.9 V H P(D=1) 0 0 0.4 0 1 0.01 1 0 0.4 1 1 0.6 V P(H=1) 0 1 1 1 2 0 3 0 V P(D=0) P(D=1) P(D=2) P(D=3) 0 0.7 0.1 0.1 0.1 1 0.1 0.7 0.1 0.1 2 0.1 0.1 0.7 0.1 3 0.1 0.1 0.1 0.7 V1 V2 P(H=1) 0 0 0.5 0 1 0.1 1 0 0.5 1 1 0.9 V2 P(D=1) 0 0.1 1 0.9 B P(V=1) Alice 0.01 Bob 0.9 B P(H=1) Alice 0.6 Bob 0.4 B P(V=1) Alice 0.9 Bob 0.1 B P(V=0) P(V=1) P(V=2) P(V=3) Alice 0.6 0.2 0.1 0.1 Bob 0.1 0.1 0.2 0.6 B P(V1=1) Alice 0.9 Bob 0.1 B P(V2=1) Alice 0.5 Bob 0.5 (a) (b) (c) (d) V V V V1 Figure 3: The Bayes nets and conditional probability distributions used in (a) Example 1: Promotion, (b) Example 2: Religious belief, (c) Example 3: Election polls, (d) Example 4: Political belief. only a qualified person is likely to be included in The Directory if it is reputable. Note that Alice and Bob agree on the conditional probability distribution for D, but assign different priors to V and H. Alice and Bob therefore interpret the meaning of Carol’s presence in The Directory differently, resulting in the belief divergence shown in Figure 4a. This scenario is one instance of a large number of belief divergence cases that can be attributed to two individuals possessing different mental models of how the observed evidence was generated. For instance, suppose now that Alice and Bob are both on an admissions committee and are evaluating a recommendation letter for an applicant. Although the letter is positive, it is not enthusiastic. Alice, who has less experience reading recommendation letters interprets the letter as a strong endorsement. Bob, however, takes the lack of enthusiasm as an indication that the author has some misgivings [12]. As in the promotion scenario, the differences in Alice’s and Bob’s experience can be effectively represented by the priors they assign to the H and V nodes in a Bayes net of the form in Figure 2f. 3.2 Example 2: Religious belief We now consider a scenario captured by Bayes net 2g. In our example for Bayes net 2f, the status of an additional factor V affected how Alice and Bob interpreted the data D, but did not shape their prior beliefs about H. In many cases, however, the additional factor V will influence both people’s prior beliefs about H as well as their interpretation of the relationship between D and H. Bayes net 2g captures this situation, and we provide a concrete example inspired by an experiment conducted by Batson [13]. Suppose that Alice believes in a “Christian universe:” she believes in the divinity of Jesus Christ and expects that followers of Christ will be persecuted. Bob, on the other hand, believes in a “secular universe.” This belief leads him to doubt Christ’s divinity, but to believe that if Christ were divine, his followers would likely be protected rather than persecuted. Now suppose that both Alice and Bob observe that Christians are, in fact, persecuted, and reassess the probability of Christ’s divinity. This situation is represented by the Bayes net and associated CPDs in Figure 3b. In the tables, the hypothesis space H = {‘Human’ = 0, ‘Divine’ = 1} represents the divinity of Jesus Christ, the additional factor V = {‘Secular’ = 0, ‘Christian’ = 1} represents the nature of the universe, and the data variable D = {‘Not persecuted’ = 0, ‘Persecuted’ = 1} represents whether Christians are subject to persecution. The exact probabilities were chosen to reflect the fact that, regardless of worldview, people will agree on a “base rate” of persecution given that Christ is not divine, but that more persecution is expected if the Christian worldview is correct than if the secular worldview is correct. Unlike in the previous scenario, Alice and Bob agree on the CPDs for both D and H, but 5 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 Prior beliefs Prior beliefs Prior beliefs Updated beliefs Updated beliefs Updated beliefs (a) (b) (c) (d) A B Prior beliefs Updated beliefs P(H = 1) Figure 4: Belief revision outcomes for (a) Example 1: Promotion, (b) Example 2: Religious belief, (c) Example 3: Election polls, and (d) Example 4: Political belief. In all four plots, the updated beliefs for Alice (solid line) and Bob (dashed line) are computed after observing the data described in the text. The plots confirm that all four of our example networks can lead to belief divergence. differ in the priors they assign to V . As a result, Alice and Bob disagree about whether persecution supports or undermines a Christian worldview, which leads to the divergence shown in Figure 4b. This scenario is analogous to many real world situations in which one person has knowledge that the other does not. For instance, in a police interrogation, someone with little knowledge of the case (V ) might take a suspect’s alibi (D) as strong evidence of their innocence (H). However, a detective with detailed knowledge of the case may assign a higher prior probability to the subject’s guilt based on other circumstantial evidence, and may also notice a detail in the suspect’s alibi that only the culprit would know, thus making the statement strong evidence of guilt. In all situations of this kind, although two people possess different background knowledge, their inferences are normative given that knowledge, consistent with the Bayes net in Figure 2g. 3.3 Example 3: Election polls We now consider two qualitatively different cases that are both captured by Bayes net 2h. The networks considered so far have all included a direct link between H and D. In our next two examples, we consider cases where the hypotheses and observed data are not directly linked, but are coupled by means of one or more unobserved causal factors. Suppose that an upcoming election will be contested by two Republican candidates, Rogers and Rudolph, and two Democratic candidates, Davis and Daly. Alice and Bob disagree about the various candidates’ chances of winning, with Alice favoring the two Republicans and Bob favoring the two Democrats. Two polls were recently released, one indicating that Rogers was most likely to win the election and the other indicating that Daly was most likely to win. After considering these polls, they both assess the likelihood that a Republican will win the election. This situation is represented by the Bayes net and associated CPDs in Figure 3c. In the tables, the hypothesis space H = {‘Democrat wins’ = 0, ‘Republican wins’ = 1} represents the winning party, the variable V = {‘Rogers’ = 0, ‘Rudolph’ = 1, ‘Davis’ = 2, ‘Daly’ = 3} represents the winning candidate, and the data variables D1 = D2 = {‘Rogers’ = 0, ‘Rudolph’ = 1, ‘Davis’ = 2, ‘Daly’ = 3} represent the results of the two polls. The exact probabilities were chosen to reflect the fact that the polls are likely to reflect the truth with some noise, but whether a Democrat or Republican wins is completely determined by the winning candidate V . In Figure 3c, only a single D node is shown because D1 and D2 have identical CPDs. The resulting belief divergence is shown in Figure 4c. Note that in this scenario, Alice’s and Bob’s different priors cause them to discount the poll that disagrees with their existing beliefs as noise, thus causing their prior beliefs to be reinforced by the mixed data. This scenario was inspired by the death penalty study [1] alluded to earlier, in which a set of mixed results caused supporters and opponents of the death penalty to strengthen their existing beliefs. We do not claim that people’s behavior in this study can be explained with exactly the model employed here, but our analysis does show that selective interpretation of evidence is sometimes consistent with a rational approach. 6 3.4 Example 4: Political belief We conclude with a second illustration of Bayes net 2h in which two people agree on the interpretation of an observed piece of evidence but disagree about the implications of that evidence. In this scenario, Alice and Bob are two economists with different philosophies about how the federal government should approach a major recession. Alice believes that the federal government should increase its own spending to stimulate economic activity; Bob believes that the government should decrease its spending and reduce taxes instead, providing taxpayers with more spending money. A new bill has just been proposed and an independent study found that the bill was likely to increase federal spending. Alice and Bob now assess the likelihood that this piece of legislation will improve the economic climate. This scenario can be modeled by the Bayes net and associated CPDs in Figure 3d. In the tables, the hypothesis space H = {‘Bad policy’ = 0, ‘Good policy’ = 1} represents whether the new bill is good for the economy and the data variable D = {‘No spending’ = 0, ‘Spending increase’ = 1} represents the conclusions of the independent study. Unlike in previous scenarios, we introduce two additional factors, V 1 = {‘Fiscally conservative’ = 0, ‘Fiscally liberal’ = 1}, which represents the optimal economic philosophy, and V 2 = {‘No spending’ = 0, ‘Spending increase’ = 1}, which represents the spending policy of the new bill. The exact probabilities in the tables were chosen to reflect the fact that if the bill does not increase spending, the policy it enacts may still be good for other reasons. A uniform prior was placed on V 2 for both people, reflecting the fact that they have no prior expectations about the spending in the bill. However, the priors placed on V 1 for Alice and Bob reflect their different beliefs about the best economic policy. The resulting belief divergence behavior is shown in Figure 4d. The model used in this scenario bears a strong resemblance to the probabilogical model of attitude change developed by McGuire [14] in which V 1 and V 2 might be logical “premises” that entail the “conclusion” H. 4 How common is contrary updating? We have now described four concrete cases where belief divergence is captured by a normative approach. It is possible, however, that belief divergence is relatively rare within the Bayes nets of Family 2, and that our four examples are exotic special cases that depend on carefully selected CPDs. To rule out this possibility, we ran simulations to explore the space of all possible CPDs for the three networks in Family 2. We initially considered cases where H, D, and V were binary variables, and ran two simulations for each model. In one simulation, the priors and each row of each CPD were sampled from a symmetric Beta distribution with parameter 0.1, resulting in probabilities highly biased toward 0 and 1. In the second simulation, the probabilities were sampled from a uniform distribution. In each trial, a single set of CPDs were generated and then two different priors were generated for each root node in the graph to simulate two individuals, consistent with our assumption that two individuals may have different priors but must agree about the conditional probabilities. 20,000 trials were carried out in each simulation, and the proportion of trials that led to convergence and divergence was computed. Trials were only counted as instances of convergence or divergence if |P(H = 1|D = 1) −P(H = 1)| > ϵ for both individuals, with ϵ = 1 × 10−5. The results of these simulations are shown in Table 2. The supporting material proves that divergence and convergence are equally common, and therefore the percentages in the table show the frequencies for contrary updating of either type. Our primary question was whether contrary updating is rare or anomalous. In all but the third simulation, contrary updating constituted a substantial proportion of trials, suggesting that the phenomenon is relatively generic. We were also interested in whether this behavior relied on particular settings of the CPDs. The fact that percentages for the uniform distribution are approximately the same or greater than for the biased distribution indicates that contrary updating appears to be a relatively generic behavior for the Bayes nets we considered. More generally, these results directly challenge the suggestion that normative accounts are not suited for modeling belief divergence. The last two columns of Table 2 show results for two simulations with the same Bayes net, the only difference being whether V was treated as 2-valued (binary) or 4-valued. The 4-valued case is included because both Examples 3 and 4 considered multi-valued additional factor variables V . 7 2-valued V 4-valued V V H D V H D V H D V H D Biased 9.6% 12.7% 0% 23.3% Uniform 18.2% 16.0% 0% 20.0% Table 2: Simulation results. The percentages indicate the proportion of trials that produced contrary updating using the specified Bayes net (column) and probability distributions (row). The prior and conditional probabilities were either sampled from a Beta(0.1, 0.1) distribution (biased) or a Beta(1, 1) distribution (uniform). The probabilities for the simulation results shown in the last column were sampled from a Dirichlet([0.1, 0.1, 0.1, 0.1]) distribution (biased) or a Dirichlet([1, 1, 1, 1]) distribution (uniform). In Example 4, we used two binary variables, but we could have equivalently used a single 4-valued variable. Belief convergence and divergence are not possible in the binary case, a result that is proved in the supporting material. We believe, however, that convergence and divergence are fairly common whenever V takes three or more values, and the simulation in the last column of the table confirms this claim for the 4-valued case. Given that belief divergence seems relatively common in the space of all Bayes nets, it is natural to explore whether cases of rational divergence are regularly encountered in the real world. One possible approach is to analyze a large database of networks that capture everyday belief revision problems, and to determine what proportion of networks lead to rational divergence. Future studies can explore this issue, but our simulations suggest that contrary updating is likely to arise in cases where it is necessary to move beyond a simple model like the one in Figure 2a and consider several causal factors. 5 Conclusion This paper presented a family of Bayes nets that can account for belief divergence, a phenomenon that is typically considered to be incompatible with normative accounts. We provided four concrete examples that illustrate how this family of networks can capture a variety of settings where belief divergence can emerge from rational statistical inference. We also described a series of simulations that suggest that belief divergence is not only possible but relatively common within the family of networks that we considered. Our work suggests that belief polarization should not always be taken as evidence of irrationality, and that researchers who aim to document departures from rationality may wish to consider alternative phenomena instead. One such phenomenon might be called “inevitable belief reinforcement” and occurs when supporters of a hypothesis update their belief in the same direction for all possible data sets d. For example, a gambler will demonstrate inevitable belief reinforcement if he or she becomes increasingly convinced that a roulette wheel is biased towards red regardless of whether the next spin produces red, black, or green. This phenomenon is provably inconsistent with any fully Bayesian approach, and therefore provides strong evidence of irrationality. Although we propose that some instances of polarization are compatible with a Bayesian approach, we do not claim that human inferences are always or even mostly rational. We suggest, however, that characterizing normative behavior can require careful thought, and that formal analyses are invaluable for assessing the rationality of human inferences. In some cases, a formal analysis will provide an appropriate baseline for understanding how human inferences depart from rational norms. In other cases, a formal analysis will suggest that an apparently irrational inference makes sense once all of the relevant information is taken into account. 8 References [1] C. G. Lord, L. Ross, and M. R. Lepper. Biased assimilation and attitude polarization: The effects of prior theories on subsequently considered evidence. Journal of Personality and Social Psychology, 37(1):2098–2109, 1979. [2] L. Ross and M. R. Lepper. The perseverance of beliefs: Empirical and normative considerations. In New directions for methodology of social and behavioral science: Fallible judgment in behavioral research. Jossey-Bass, San Francisco, 1980. [3] J. Baron. Thinking and Deciding. Cambridge University Press, Cambridge, 4th edition, 2008. [4] A. Gerber and D. Green. Misperceptions about perceptual bias. Annual Review of Political Science, 2:189–210, 1999. [5] M. Oaksford and N. Chater. A rational analysis of the selection task as optimal data selection. Psychological Review, 101(4):608–631, 1994. [6] U. Hahn and M. Oaksford. The rationality of informal argumentation: A Bayesian approach to reasoning fallacies. Psychological Review, 114(3):704–732, 2007. [7] S. Sher and C. R. M. McKenzie. Framing effects and rationality. In N. Chater and M. Oaksford, editors, The probablistic mind: Prospects for Bayesian cognitive science. Oxford University Press, Oxford, 2008. [8] B. O’Connor. Biased evidence assimilation under bounded Bayesian rationality. Master’s thesis, Stanford University, 2006. [9] A. Zimper and A. Ludwig. Attitude polarization. Technical report, Mannheim Research Institute for the Economics of Aging, 2007. [10] A. K. Dixit and J. W. Weibull. Political polarization. Proceedings of the National Academy of Sciences, 104(18):7351–7356, 2007. [11] L. L. Lopes. Averaging rules and adjustment processes in Bayesian inference. Bulletin of the Psychonomic Society, 23(6):509–512, 1985. [12] A. Harris, A. Corner, and U. Hahn. “Damned by faint praise”: A Bayesian account. In A. D. De Groot and G. Heymans, editors, Proceedings of the 31th Annual Conference of the Cognitive Science Society, Austin, TX, 2009. Cognitive Science Society. [13] C. D. Batson. Rational processing or rationalization? The effect of disconfirming information on a stated religious belief. Journal of Personality and Social Psychology, 32(1):176–184, 1975. [14] W. J. McGuire. The probabilogical model of cognitive structure and attitude change. In R. E. Petty, T. M. Ostrom, and T. C. Brock, editors, Cognitive Responses in Persuasion. Lawrence Erlbaum Associates, 1981. 9
2009
60
3,811
Linearly constrained Bayesian matrix factorization for blind source separation Mikkel N. Schmidt Department of Engineering University of Cambridge mns@imm.dtu.dk Abstract We present a general Bayesian approach to probabilistic matrix factorization subject to linear constraints. The approach is based on a Gaussian observation model and Gaussian priors with bilinear equality and inequality constraints. We present an efficient Markov chain Monte Carlo inference procedure based on Gibbs sampling. Special cases of the proposed model are Bayesian formulations of nonnegative matrix factorization and factor analysis. The method is evaluated on a blind source separation problem. We demonstrate that our algorithm can be used to extract meaningful and interpretable features that are remarkably different from features extracted using existing related matrix factorization techniques. 1 Introduction Source separation problems arise when a number of signals are mixed together, and the objective is to estimate the underlying sources based on the observed mixture. In the supervised, modelbased approach to source separation, examples of isolated sources are used to train source models, which are then combined in order to separate a mixture. Oppositely, in unsupervised, blind source separation, only very general information about the sources is available. Instead of estimating models of the sources, blind source separation is based on relatively weak criteria such as minimizing correlations, maximizing statistical independence, or fitting data subject to constraints. Under the assumptions of linear mixing and additive noise, blind source separation can be expressed as a matrix factorization problem, X I×J = A I×K B K×J + N I×J, or equivalently, xij = K X k=1 aikbkj + nij, (1) where the subscripts below the matrices denote their dimensions. The columns of A represent K unknown sources, and the elements of B are the mixing coefficients. Each of the J columns of X contains an observation that is a mixture of the sources plus additive noise represented by the columns of N. The objective is to estimate the sources, A, as well as the mixing coefficients, B, when only the data matrix, X, is observed. In a Bayesian formulation, the aim is not to compute a single value for A and B, but to infer their posterior distribution under a set of model assumptions. These assumptions are specified in the likelihood function, p(X|A, B), which expresses the probability of the data given the factorizing matrices, and in the prior, p(A, B), which describes available knowledge before observing the data. Depending on the specific choice of likelihood and priors, matrix factorizations with different characteristics can be devised. Non-negative matrix factorization (NMF), which is distinguished from other matrix factorization techniques by its non-negativity constraints, has been shown to decompose data into meaningful, interpretable parts [3]; however, a parts-based decomposition is not necessarily useful, unless it 1 Linear subspace Affine subspace Simplicial cone Simplicial cone in non-neg. orthant No constraints P kbkj = 1 bkj ≥0 aik ≥0, bkj ≥0 (a) (b) (c) (d) Polytope Polytope in non-neg. orthant Polytope on unit simplex Polytope in unit hypercube bkj ≥0, P kbkj = 1 aik ≥0, bkj ≥0, P kbkj = 1 aik ≥0, P iaik = 1, bkj ≥0, P kbkj = 1 0 ≤aik ≤1, bkj ≥0, P kbkj = 1 (e) (f) (g) (h) Figure 1: Examples of model spaces that can be attained using matrix factorization with different linear constraints in A and B. The red hatched area indicates the feasible region for the source vectors (columns of A). Dots, , are examples of specific positions of source vectors, and the black hatched area, , is the corresponding feasible region for the data vectors. Special cases include (a) factor analysis and (d) non-negative matrix factorization. finds the “correct” parts. The main contribution in this paper is that specifying relevant constraints other than non-negativity substantially changes the qualities of the results obtained using matrix factorization. Some intuition about how the incorporation of different constraints affects the matrix factorization can be gained by considering their geometric implications. Figure 1 shows how different linear constraints on A and B constrain the model space. For example, if the mixing coefficients are constrained to be non-negative, data is modelled as the convex hull of a simplicial cone, and if the mixing coefficients are further constrained to sum to unity, data is modelled as the hull of a convex polytope. In this paper, we develop a general and flexible framework for Bayesian matrix factorization, in which the unknown sources and the mixing coefficients are treated as hidden variables. Furthermore, we allow any number of linear equality or inequality constraints to be specified. On an unsupervised image separation problem, we demonstrate, that when relevant constraints are specified, the method finds interpretable features that are remarkably different from features computed using other matrix factorization techniques. The proposed method is related to recently proposed Bayesian matrix factorization techniques: Bayesian matrix factorization based on Gibbs sampling has been demonstrated [7, 8] to scale up to very large datasets and to avoid the problem of overfitting associated with non-Bayesian techniques. Bayesian methods for non-negative matrix factorization have also been proposed, either based on variational inference [1] or Gibbs sampling [4, 9]. The latter can be seen as special cases of the algorithm proposed here. The paper is structured as follows: In section 2, the linearly constrained Bayesian matrix factorization model is described. Section 3 presents an inference procedure based on Gibbs sampling. In Section 4, the method is applied to an unsupervised source separation problem and compared to other existing matrix factorization methods. We discuss our results and conclude in Section 5. 2 2 The linearly constrained Bayesian matrix factorization model In the following, we describe the linearly constrained Bayesian matrix factorization model. We make specific choices for the likelihood and priors that keep the formulation general while allowing for efficient inference based on Gibbs sampling. 2.1 Noise model We choose an iid. zero mean Gaussian noise model, p(nij) = N(nij|0, vij) = 1 √ 2πvij exp  − n2 ij 2vij  , (2) where, in the most general formulation, each matrix element has its own variance, vij; however, the variance parameters can easily be joined, e.g., to have a single noise variance per row or just one overall variance, which corresponds to an isotropic noise model. The noise model gives rise to the likelihood, i.e., the probability of the observations given the parameters of the model. The likelihood is given by p(x|θ) = IY i=1 J Y j=1 N  xij K X k=1 aikbkj, vij  = IY i=1 J Y j=1 1 p2πvij exp  −(x −PK k=1 aikbkj)2 2vij  , (3) where θ =  A, B, {vij} denotes all parameters in the model. For the noise variance parameters we choose conjugate inverse-gamma priors, p(vij) = IG(vij|α, β) = βα Γ(α)v−(α+1) ij exp −β vij  . (4) 2.2 Priors for sources and mixing coefficients We now define the prior distribution for the factorizing matrices, A and B. To simplify the notation, we specify the matrices by vectors a = vec(A⊤) = [a11, a12, . . . , aIK]⊤and b = vec(B) = [b11, b21, . . . , bKJ]⊤. We choose a Gaussian prior over a and b subject to inequality constraints, Q, and equality constraints, R, p(a, b) ∝          N  a b   µa µb  | {z } ≡µ ,  Σa Σab Σ⊤ ab Σb  | {z } ≡Σ ! , if Q(a, b) ≤0, R(a, b) = 0, 0, otherwise. (5) In slight abuse of denotation, we refer to µ and Σ as the mean and covariance matrix, although the actual mean and covariance of a and b depends on the constraints. In the most general formulation, the constraints, Q:RIK×RKJ→RNQ and R:RIK×RKJ→RNR, are biaffine maps, that define NQ inequality and NR equality constraints jointly in a and b. Specifically, each inequality constraint has the form Qm(a, b) = qm + a⊤q(a) m + b⊤q(b) m + a⊤Q(ab) m b ≤0. (6) By rearranging terms and combining the NQ constraints in matrix notation, we may write h q(a) 1 +Q(ab) 1 b · · · q(a) NQ+Q(ab) NQ b i | {z } ≡Qa ⊤ a ≤   −q1−b⊤q(b) 1 ... −qNQ−b⊤q(b) NQ   | {z } ≡qa , Q⊤ a a ≤qa, (7) from which it is clear that the constraints are linear in a. Likewise, the constraints can be rearranged to a linear form in b. The equality constraints, R, are defined analogously. This general formulation of the priors allows all elements of a and b to have prior dependencies both through their covariance matrix, Σab, and through the joint constraints; however, in some 3 aik bkj xij vij i=1...I j=1...J k=1...K α, β µ, Σ, Q, R Figure 2: Graphical model for linearly constrained Bayesian matrix factorization, when A and B are independent in the prior. White and grey nodes represent latent and observed variables respectively, and arrows indicate stochastic dependensies. The colored plates denote repeated variables over the indicated indices. applications it is not relevant or practical to specify all of these dependencies in advance. We may restrict the model such that a and b are independent a priori by setting Σab, Q(ab) m , and R(ab) m to zero, and restricting q(a) m = 0 for all m where q(b) m ̸= 0 and vice versa. Furthermore, we can decouple the elements of A, or groups of elements such as rows or columns, by choosing Σa, Qa, and Ra to have an appropriate block structure. Similarly we can decouple elements of B. 2.3 Posterior distribution Having specified the model and the prior densities, we can now write the posterior, which is the distribution of the parameters conditioned on the observed data and hyper-parameters. The posterior is given by p(θ|x, ψ) ∝p(a, b)p(x|θ) IY i=1 J Y j=1 p(vij), (8) where ψ = {α, β, µ, Σ, Q, R} denotes all hyper-parameters in the model. A graphical representation of the model is given in Figure 2. 3 Inference In a Bayesian framework, we are interested in computing the posterior distribution over the parameters, p(θ|x, ψ). The posterior, given in Eq. (8), is only known up to a multiplicative constant, and direct computation of this normalizing constant involves integrating over the unnormalized posterior, which is not analytically tractable. Instead, we approximate the posterior distribution using Markov chain Monte Carlo (MCMC). 3.1 Gibbs sampling We propose an inference procedure based on Gibbs sampling. Gibbs sampling is applicable when the joint density of the parameters is not known, but the parameters can be partitioned into groups, such that their posterior conditional densities are known. We iteratively sweep through the groups of parameters and generate a random sample for each, conditioned on the current value of the others. This procedure forms a homogenous Markov chain and its stationary distribution is exactly the joint posterior. In the following, we derive the posterior conditional densities required in the Gibbs sampler. First, we consider the noise variances, vij. Due to the choice of conjugate prior, the posterior density is an inverse-gamma, p(vij|θ\vij) = IG(vij|¯α, ¯β), (9) ¯α = α + 1 2, ¯β = β + 1 2 xij −PK k=1 aikbkj 2, (10) 4 from which samples can be generated using standard acceptance-rejection methods. Next, we consider the factorizing matrices, represented by the vectors a and b. We only discuss generating samples from a, since the sampling procedure for b is identical due to the symmetry of the model. Conditioned on b, the prior density of a is a constrained Gaussian, p(a|b) ∝ ( N(a|˜µa, ˜Σa), if Q⊤ a a ≤qa, R⊤ a a = ra, 0, otherwise, (11) ˜µa = µa + ΣabΣ−1 b (b −µb), ˜Σa = Σa −ΣabΣ−1 b Σ⊤ ab, (12) where we have used Eq. (7) and the standard result for a conditional Gaussian density. In the special case when a and b are independent in the prior, we simply have ˜µa = µa and ˜Σa = Σa. Further, conditioning on the data leads to the final expression for the posterior conditional density of a, p(a|x, θ\a) ∝ ( N(a|¯µa, ¯Σa), if Q⊤ a a ≤qa, R⊤ a a = ra, 0, otherwise, (13) ¯Σa = ˜Σ −1 a + ˜ BV −1 ˜ B ⊤−1, ¯µa = ¯Σa ˜Σ −1 a ˜µa + ˜ BV −1x  , (14) where V = diag(v11, v12, . . . , vIJ) and ˜ B = diag(B, . . . , B) is a diagonal block matrix with I repetitions of B. The Gibbs sampler proceeds iteratively: First, the noise variance is generated from the inversegamma density in Eq. (9); second, a is generated from the constrained Gaussian density in Eq. (13); and third, b is generated from a constrained Gaussian analogous to Eq. (13). 3.2 Sampling from a constrained Gaussian An essential component in the proposed matrix factorization method is an algorithm for generating random samples from a multivariate Gaussian density subject to linear equality and inequality constraints. With a slight change of notation, we consider generating x ∈RN from the density p(x) ∝ ( N(x|µx, Σx), if Q⊤ xx ≤qx, R⊤ xx = rx, 0, otherwise. (15) A similar problem has previously been treated by Geweke [2], who proposes a Gibbs sampling procedure, that does not handle equality constraints and no more than N inequality constraints. Rodriguez-Yam et al. [6] extends the method in [2] to an arbitrary number of inequality constraints, but do not provide an algorithm for handling equality constraints. Here, we present a general Gibbs sampling procedure that handles any number of equality and inequality constraints. The equality constraints restrict the distribution to an affine subspace of dimensionality N −R, where R is the number of linearly independent constraints. The conditional distribution on that subspace is a Gaussian subject to inequality constraints. To handle the equality constraints, we map the distribution onto this subspace. Using the singular value decomposition (SVD), we can robustly compute an orthonormal basis, T , for the constraints, as well as its orthogonal complement, T⊥, Rx = USV ⊤=  T T⊥ ⊤ ST 0 0 0  V ⊤, (16) where ST = diag(s1, . . . , sR) holds the R non-zero singular values. We now define a transformed variable, y, that is related to x by y = T⊥(x −x0), y ∈RN−R (17) where x0 is some vector that satisfies the equality constraints, e.g., computed using the pseudoinverse, x0 = R†⊤ x rx. This transformation ensures, that for any value of y, the corresponding x satisfies the equality constraints. We can now compute the distribution of y conditioned on the equality constraints, which is Gaussian subject to inequality constraints, p(y|R⊤ xx = rx) ∝ ( N(y|µy, Σy) if Q⊤ yy ≤qy 0 otherwise, (18) µy = Λ(µx −x0), Σy = ΛΣxT ⊤ ⊥, Qy = T⊥Qx, qy = qx −Q⊤ xx0, (19) 5 where Λ = T⊥(I −ΣxT ⊤(T ΣxT ⊤)−1T ). We introduce a second transformation with the purpose of reducing the correlations between the variables. This may potentially improve the sampling procedure, because Gibbs sampling can suffer from slow mixing when the distribution is highly correlated. Correlations between the elements of y are due to both the Gaussian covariance structure and the inequality constraints; however, for simplicity we only decorrelate with respect to the covariance of the underlying unconstrained Gaussian. To this end, we define the transformed variable, z, given by z = L−⊤(y −µy), (20) where L is the Cholesky factorization of the covariance matrix, LL⊤= Σy. The distribution of z is then a standard Gaussian subject to inequality constraints, p(z|R⊤ xx = rx) ∝ ( N(z|0, I), if Q⊤ zz ≤qz, 0, otherwise, (21) Qz = LQy, qz = qy −Q⊤ yµy. (22) We can now sample from z using a Gibbs sampling procedure by sweeping over the elements zi and generating samples from their conditional distributions, which are univariate truncated standard Gaussian, p(zi|z\zi) = q 2 π exp  −z2 i 2  erf  ui √ 2  −erf  ℓi √ 2  ∝  N(zi|0, 1), ℓi ≤zi ≤ui, 0, otherwise. (23) Samples from this density can be generated using standard methods such as inverse transform sampling (transforming a uniform random variable by the inverse cumulative density function); the efficient mixed rejection sampling algorithm proposed by Geweke [2]; or slice sampling [5]. The upper and lower points of truncation can be computed as Q⊤ zz ≤ qz (24) [Qz]⊤ i: | {z } d zi ≤ qz −[Qz]⊤ ˜i: z˜i | {z } n (25) ℓi = max  −∞, nk dk : dk < 0 ≤zi ≤min  ∞, nk dk : dk > 0 = ui, (26) where [Qz]i: denotes the ith row of Qz, [Qz]˜i: denotes all rows except the ith, and z˜i denotes the vector of all elements of z except the ith. Finally, when a sample of z has been generated after a number of Gibbs sweeps, it can be transformed into a sample of the original variable, x, using x = T ⊤ ⊥(L⊤z + µy) + x0. (27) The sampling procedure is illustrated in Figure 3. 4 Experiments We demonstrate the proposed linearly constrained Bayesian matrix factorization method on a blind image separation problem, and compare it to two other matrix factorization techniques: independent component analysis (ICA) and non-negative matrix factorization (NMF). Data We used a subset from the MNIST dataset which consists of 28 × 28 pixel grayscale images of handwritten digits (see Figure 4.a). We selected the first 800 images of each digit, 0–9, which gave us 8, 000 unique images. From these images we created 4, 000 image mixtures by adding the grayscale intensities of the images two and two, such that the different digits were combined in equal proportion. We rescaled the mixed images so that their pixel intensities were in the 0–1 interval, and arranged the vectorized images as the columns of the matrix X ∈RI×J, where I = 784 and J = 4, 000. Examples of the image mixtures are shown in Figure 4.b. 6 ℓ u x1 x2 x∗ ℓ u x1 p(x1|x2 = x∗) x1 x2 1 2 3 4 5 (a) (b) (c) Figure 3: Gibbs sampling from a multivariate Gaussian density subject to linear constraints. a) Twodimensional Gaussian subject to three inequality constraints. b) The conditional distribution of x1 given x2 = x∗is a truncated Gaussian. c) Gibbs sampling proceeds iteratively by sweeping over the dimensions and sampling from the conditional distribution in each dimension conditioned on the current value in the other dimensions. Task The objective is to factorize the data matrix in order to find a number of source images that explain the data. Ideally, the sources should correspond to the original digits. We cannot hope to find exactly 10 sources that each corresponds to a digit, because there are large variations as to how each digit is written. For that reason, we used 40 hidden sources in our experiments, which allowed 4 exemplars on average for each digit. Method For comparison we factorized the mixed image data using two standard matrix factorization techniques: ICA, where we used the FastICA algorithm, and NMF, where we used Lee and Seung’s multiplicative update algorithm [3]. The sources determined using these methods are shown in Figure 4.c–d. For the linearly constrained Bayesian matrix factorization, we used an isotropic noise model. We chose a decoupled prior for A and B with zero mean, µ = 0, and unit diagonal covariance matrix, Σ = I. The hidden sources were constrained to have the same range of pixel intensities as the image mixtures, 0 ≤aik ≤1. This constraint allows the sources to be interpreted as images since pixel intensities outside this interval are not meaningful. The mixing coefficients were constrained to be non-negative, bkj ≥0, and sum to unity, PK k=1 bkj = 1; thus, the observed data is modeled as a convex combination of the sources. The constraints ensure that only additive combinations of the sources are allowed, and introduces a negative correlation between the mixing coefficients. This negative correlation implies that if one source contributes more to a mixture the other sources must correspondingly contribute less. The idea behind this constraint is that it will lead the sources to compete as opposed to collaborate to explain the data. A geometric interpretation of the constraints is illustrated in Figure 1.h: The data vectors are modeled by a convex polytope in the non-negative unit hypercube, and the hidden sources are the vertices of this polytope. We computed 10, 000 Gibbs samples, which appeared sufficient for the sampler to converge. The result of the matrix factorization are shown in Figure 4.e, which displays a single sample of A at the last iteration. Results In ICA (see Figure 4.c) the sources are not constrained to be non-negative, and therefore do not have a direct interpretation as images. Most of the computed sources are complex patterns, that appear to be dominated by a single digit. While ICA certainly does find structure in the data, the estimated sources lack a clear interpretation. The sources computed using NMF (see Figure 4.d) have the property which Lee and Seung [3] refer to as a parts-based representation. Spatially, the sources are local as opposed to global. The decomposition has an intuitive interpretation: Each source is a short line segment or a dot, and the different digits can be constructed by combining these parts. Linearly constrained Bayesian matrix factorization (see Figure 4.e) computes sources with a very clear and intuitive interpretation: Almost all of the 40 computed sources visually resemble handwritten digits, and are thus well aligned with the sources that were used to generate the mixtures. Compared to the original data, the computed sources are a bit bolder and have slightly smeared 7 (a) Original dataset: MNIST digits (b) Training data: Mixture of digits (c) Independent component analysis (d) Non-negative matrix factorization (e) Linearly constrained Bayesian matrix factorization Figure 4: Data and results of the analyses of an image separation problem. a) The MNIST digits data (20 examples shown) used to generate the mixture data. b) The mixture data consists of 4000 images of two mixed digits (20 examples shown). c) Sources computed using independent component analysis (color indicate sign). d) Sources computed using non-negative matrix factorization. e) Sources computed using linearly constrained Bayesian matrix factorization (details explained in the text). edges. Two sources stand out: One is a black blob of approximately the same size as the digits, and another is an all white feature, which are useful for adjusting the brightness. 5 Conclusions We presented a linearly constrained Bayesian matrix factorization method as well as an inference procedure for this model. On an unsupervised image separation problem, we have demonstrated that the method finds sources that have a clear an interpretable meaning. As opposed to ICA and NMF, our method finds sources that visually resemble handwritten digits. We formulated the model in general terms, which allows specific prior information to be incorporated in the factorization. The Gaussian priors over the sources can be used if knowledge is available about the covariance structure of the sources, e.g., if the sources are known to be smooth. The constraints we used in our experiments were separate for A and B, but the framework allows bilinearly dependent constraints to be specified, which can be used for example to specify constraints in the data domain, i.e., on the product AB. As a general framework for constrained Bayesian matrix factorization, the proposed method has applications in many other areas than blind source separation. Interesting applications include blind deconvolution, music transcription, spectral unmixing, and collaborative filtering. The method can also be used in a supervised source separation setting, where the distributions over sources and mixing coefficients are learned from a training set of isolated sources. It is an interesting challenge to develop methods for learning relevant constraints from data. 8 References [1] A. T. Cemgil. Bayesian inference for nonnegative matrix factorisation models. Computational Intelligence and Neuroscience, 2009. doi: 10.1155/2009/785152. [2] J. Geweke. Efficient simulation from the multivariate normal and student-t distributions subject to linear constraints and the evaluation of constraint probabilities. In Computer Sciences and Statistics, Proceedings the 23rd Symposium on the Interface between, pages 571–578, 1991. doi: 10.1.1.26.6892. [3] D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, pages 788–791, October 1999. doi: 10.1038/44565. [4] S. Moussaoui, D. Brie, A. Mohammad-Djafari, and C. Carteret. Separation of non-negative mixture of non-negative sources using a Bayesian approach and MCMC sampling. Signal Processing, IEEE Transactions on, 54(11):4133–4145, Nov 2006. doi: 10.1109/TSP.2006.880310. [5] R. M. Neal. Slice sampling. Annals of Statistics, 31(3):705–767, 2003. [6] G. Rodriguez-Yam, R. Davis, and L. Scharf. Efficient gibbs sampling of truncated multivariate normal with application to constrained linear regression. Technical report, Colorado State University, Fort Collins, 2004. [7] R. Salakhutdinov and A. Mnih. Probabilistic matrix factorization. In Neural Information Processing Systems, Advances in (NIPS), pages 1257–1264, 2008. [8] R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Machine Learning, International Conference on (ICML), pages 880–887, 2008. [9] M. N. Schmidt, O. Winther, and L. K. Hansen. Bayesian non-negative matrix factorization. In Independent Component Analysis and Signal Separation, International Conference on, volume 5441 of Lecture Notes in Computer Science (LNCS), pages 540–547. Springer, 2009. doi: 10. 1007/978-3-642-00599-2 68. 9
2009
61
3,812
Sparse and Locally Constant Gaussian Graphical Models Jean Honorio, Luis Ortiz, Dimitris Samaras Department of Computer Science Stony Brook University Stony Brook, NY 11794 {jhonorio,leortiz,samaras}@cs.sunysb.edu Nikos Paragios Laboratoire MAS Ecole Centrale Paris Chatenay-Malabry, France nikos.paragios@ecp.fr Rita Goldstein Medical Department Brookhaven National Laboratory Upton, NY 11973 rgoldstein@bnl.gov Abstract Locality information is crucial in datasets where each variable corresponds to a measurement in a manifold (silhouettes, motion trajectories, 2D and 3D images). Although these datasets are typically under-sampled and high-dimensional, they often need to be represented with low-complexity statistical models, which are comprised of only the important probabilistic dependencies in the datasets. Most methods attempt to reduce model complexity by enforcing structure sparseness. However, sparseness cannot describe inherent regularities in the structure. Hence, in this paper we first propose a new class of Gaussian graphical models which, together with sparseness, imposes local constancy through ℓ1-norm penalization. Second, we propose an efficient algorithm which decomposes the strictly convex maximum likelihood estimation into a sequence of problems with closed form solutions. Through synthetic experiments, we evaluate the closeness of the recovered models to the ground truth. We also test the generalization performance of our method in a wide range of complex real-world datasets and demonstrate that it captures useful structures such as the rotation and shrinking of a beating heart, motion correlations between body parts during walking and functional interactions of brain regions. Our method outperforms the state-of-the-art structure learning techniques for Gaussian graphical models both for small and large datasets. 1 Introduction Structure learning aims to discover the topology of a probabilistic network of variables such that this network represents accurately a given dataset while maintaining low complexity. Accuracy of representation is measured by the likelihood that the model explains the observed data, while complexity of a graphical model is measured by its number of parameters. Structure learning faces several challenges: the number of possible structures is super-exponential in the number of variables while the required sample size might be even exponential. Therefore, finding good regularization techniques is very important in order to avoid over-fitting and to achieve a better generalization performance. In this paper, we propose local constancy as a prior for learning Gaussian graphical models, which is natural for spatial datasets such as those encountered in computer vision [1, 2, 3]. For Gaussian graphical models, the number of parameters, the number of edges in the structure and the number of non-zero elements in the inverse covariance or precision matrix are equivalent 1 measures of complexity. Therefore, several techniques focus on enforcing sparsity of the precision matrix. An approximation method proposed in [4] relied on a sequence of sparse regressions. Maximum likelihood estimation with an ℓ1-norm penalty for encouraging sparseness is proposed in [5, 6, 7]. The difference among those methods is the optimization technique: a sequence of boxconstrained quadratic programs in [5], solution of the dual problem by sparse regression in [6] or an approximation via standard determinant maximization with linear inequality constraints in [7]. It has been shown theoretically and experimentally, that only the covariance selection [5] as well as graphical lasso [6] converge to the maximum likelihood estimator. In datasets which are a collection of measurements for variables with some spatial arrangement, one can define a local neighborhood for each variable or manifold. Such variables correspond to points in silhouettes, pixels in 2D images or voxels in 3D images. Silhouettes define a natural one-dimensional neighborhood in which each point has two neighbors on each side of the closed contour. Similarly, one can define a four-pixel neighborhood for 2D images as well as six-pixel neighborhood for 3D images. However, there is little research on spatial regularization for structure learning. Some methods assume a one-dimensional spatial neighborhood (e.g. silhouettes) and that variables far apart are only weakly correlated [8], interaction between a priori known groups of variables as in [9], or block structures as in [10] in the context of Bayesian networks. Our contribution in this paper is two-fold. First, we propose local constancy, which encourages finding connectivities between two close or distant clusters of variables, instead of between isolated variables. It does not heavily constrain the set of possible structures, since it only imposes restrictions of spatial closeness for each cluster independently, but not between clusters. We impose an ℓ1-norm penalty for differences of spatially neighboring variables, which allows obtaining locally constant models that preserve sparseness, unlike ℓ2-norm penalties. Our model is strictly convex and therefore has a global minimum. Positive definiteness of the estimated precision matrix is also guaranteed, since this is a necessary condition for the definition of a multivariate normal distribution. Second, since optimization methods for structure learning on Gaussian graphical models [5, 6, 4, 7] are unable to handle local constancy constraints, we propose an efficient algorithm by maximizing with respect to one row and column of the precision matrix at a time. By taking directions involving either one variable or two spatially neighboring variables, the problem reduces to minimization of a piecewise quadratic function, which can be performed in closed form. We initially test the ability of our method to recover the ground truth structure from data, of a complex synthetic model which includes locally and not locally constant interactions as well as independent variables. Our method outperforms the state-of-the-art structure learning techniques [5, 6, 4] for datasets with both small and large number of samples. We further show that our method has better generalization performance on real-world datasets. We demonstrate the ability of our method to discover useful structures from datasets with a diverse nature of probabilistic relationships and spatial neighborhoods: manually labeled silhouettes in a walking sequence, cardiac magnetic resonance images (MRI) and functional brain MRI. Section 2 introduces Gaussian graphical models as well as techniques for learning such structures from data. Section 3 presents our sparse and locally constant Gaussian graphical models. Section 4 describes our structure learning algorithm. Experimental results on synthetic and real-world datasets are shown and explained in Section 5. Main contributions and results are summarized in Section 6. 2 Background In this paper, we use the notation in Table 1. For convenience, we define two new operators: the zero structure operator and the diagonal excluded product. A Gaussian graphical model [11] is a graph in which all random variables are continuous and jointly Gaussian. This model corresponds to the multivariate normal distribution for N variables x ∈RN with mean vector µ ∈RN and a covariance matrix Σ ∈RN×N, or equivalently x ∼N(µ, Σ) where Σ ≻0. Conditional independence in a Gaussian graphical model is simply reflected in the zero entries of the precision matrix Ω= Σ−1 [11]. Let Ω= {ωn1n2}, two variables xn1 and xn2 are conditionally independent if and only if ωn1n2 = 0. The precision matrix representation is preferred because it allows detecting cases in which two seemingly correlated variables, actually depend on a third confounding variable. 2 Notation Description ∥c∥1 ℓ1-norm of c ∈RN, i.e. P n |cn| ∥c∥∞ ℓ∞-norm of c ∈RN, i.e. maxn |cn| |c| entrywise absolute value of c ∈RN, i.e. (|c1|, |c2|, . . . , |cN|)T diag(c) ∈RN×N matrix with elements of c ∈RN on its diagonal ∥A∥1 ℓ1-norm of A ∈RM×N, i.e. P mn |amn| ⟨A, B⟩ scalar product of A, B ∈RM×N, i.e. P mn amnbmn A ◦B ∈RM×N Hadamard or entrywise product of A, B ∈RM×N, i.e. (A ◦B)mn = amnbmn J(A) ∈RM×N zero structure operator of A ∈RM×N, by using the Iverson bracket jmn(A) = [amn = 0] A ⊘B ∈RM×N diagonal excluded product of A ∈RM×N and B ∈RN×N, i.e. A ⊘B = J(A) ◦(AB). It has the property that no diagonal entry of B is used in A ⊘B A ≻0 A ∈RN×N is symmetric and positive definite diag(A) ∈RN×N matrix with diagonal elements of A ∈RN×N only vec(A) ∈RMN vector containing all elements of A ∈RM×N Table 1: Notation used in this paper. The concept of robust estimation by performing covariance selection was first introduced in [12] where the number of parameters to be estimated is reduced by setting some elements of the precision matrix Ωto zero. Since finding the most sparse precision matrix which fits a dataset is a NP-hard problem [5], in order to overcome it, several ℓ1-regularization methods have been proposed for learning Gaussian graphical models from data. Covariance selection [5] starts with a dense sample covariance matrix bΣ and fits a sparse precision matrix Ωby solving a maximum likelihood estimation problem with a ℓ1-norm penalty which encourages sparseness of the precision matrix or conditional independence among variables: max Ω≻0 ³ log det Ω−⟨bΣ, Ω⟩−ρ∥Ω∥1 ´ (1) for some ρ > 0. Covariance selection computes small perturbations on the sample covariance matrix such that it generates a sparse precision matrix, which results in a box-constrained quadratic programming. This method has moderate run time. The Meinshausen-B¨uhlmann approximation [4] obtains the conditional dependencies by performing a sparse linear regression for each variable, by using lasso regression [13]. This method is very fast but does not yield good estimates for lightly regularized models, as noted in [6]. The constrained optimization version of eq.(1) is solved in [7] by applying a standard determinant maximization with linear inequality constraints, which requires iterative linearization of ∥Ω∥1. This technique in general does not yield the maximum likelihood estimator, as noted in [14]. The graphical lasso technique [6] solves the dual form of eq.(1), which results in a lasso regression problem. This method has run times comparable to [4] without sacrificing accuracy in the maximum likelihood estimator. Structure learning through ℓ1-regularization has been also proposed for different types of graphical models: Markov random fields (MRFs) by a clique selection heuristic and approximate inference [15]; Bayesian networks on binary variables by logistic regression [16]; Conditional random fields by pseudo-likelihood and block regularization in order to penalize all parameters of an edge simultaneously [17]; and Ising models, i.e. MRFs on binary variables with pairwise interactions, by logistic regression [18] which is similar in spirit to [4]. There is little work on spatial regularization for structure learning. Adaptive banding on the Cholesky factors of the precision matrix has been proposed in [8]. Instead of using the traditional lasso penalty, a nested lasso penalty is enforced. Entries at the right end of each row are promoted to zero faster than entries close to the diagonal. The main drawback of this technique is the assumption that the more far apart two variables are the more likely they are to be independent. Grouping of entries in the precision matrix into disjoint subsets has been proposed in [9]. Such subsets can model for instance dependencies between different groups of variables in the case of block structures. Although such a formulation allows for more general settings, its main disadvantage is the need for an a priori segmentation of the entries in the precision matrix. 3 Related approaches have been proposed for Bayesian networks. In [10] it is assumed that variables belong to unknown classes and probabilities of having edges among different classes were enforced to account for structure regularity, thus producing block structures only. 3 Sparse and Locally Constant Gaussian Graphical Models First, we describe our local constancy assumption and its use to model the spatial coherence of dependence/independence relationships. Local constancy is defined as follows: if variable xn1 is dependent (or independent) of variable xn2, then a spatial neighbor xn′ 1 of xn1 is more likely to be dependent (or independent) of xn2. This encourages finding connectivities between two close or distant clusters of variables, instead of between isolated variables. Note that local constancy imposes restrictions of spatial closeness for each cluster independently, but not between clusters. In this paper, we impose constraints on the difference of entries in the precision matrix Ω∈RN×N for N variables, which correspond to spatially neighboring variables. Let bΣ ∈RN×N be the dense sample covariance matrix and D ∈RM×N be the discrete derivative operator on the manifold, where M ∈O(N) is the number of spatial neighborhood relationships. For instance, in a 2D image, M is the number of pixel pairs that are spatial neighbors on the manifold. More specifically, if pixel n1 and pixel n2 are spatial neighbors, we include a row m in D such that dmn1 = 1, dmn2 = −1 and dmn3 = 0 for n3 /∈{n1, n2}. The following penalized maximum likelihood estimation is proposed: max Ω≻0 ³ log det Ω−⟨bΣ, Ω⟩−ρ∥Ω∥1 −τ∥D ⊘Ω∥1 ´ (2) for some ρ, τ > 0. The first two terms model the quality of the fit of the estimated multivariate normal distribution to the dataset. The third term ρ∥Ω∥1 encourages sparseness while the fourth term τ∥D ⊘Ω∥1 encourages local constancy in the precision matrix by penalizing the differences of spatially neighboring variables. In conjunction with the ℓ1-norm penalty for sparseness, we introduce an ℓ1-norm penalty for local constancy. As discussed further in [19], ℓ1-norm penalties lead to locally constant models which preserve sparseness, where as ℓ2-norm penalties of differences fail to do so. The use of the diagonal excluded product for penalizing differences instead of the regular product of matrices, is crucial. The regular product of matrices would penalize the difference between the diagonal and off-diagonal entries of the precision matrix, and potentially destroy positive definiteness of the solution for strongly regularized models. Even though the choice of the linear operator in eq.(2) does not affect the positive definiteness properties of the estimated precision matrix or the optimization algorithm, in the following Section 4, we discuss positive definiteness properties and develop an optimization algorithm for the specific case of the discrete derivative operator D. 4 Coordinate-Direction Descent Algorithm Positive definiteness of the precision matrix is a necessary condition for the definition of a multivariate normal distribution. Furthermore, strict convexity is a very desirable property in optimization, since it ensures the existence of a unique global minimum. Notice that the penalized maximum likelihood estimation problem in eq.(2) is strictly convex due to the convexity properties of log det Ωon the space of symmetric positive definite matrices [20]. Maximization can be performed with respect to one row and column of the precision matrix Ωat a time. Without loss of generality, we use the last row and column in our derivation, since permutation of rows and columns is always possible. Also, note that rows in D can be freely permuted without affecting the objective function. Let: Ω= · W y yT z ¸ , bΣ = · S u uT v ¸ , D = · D1 0M−L D2 d3 ¸ (3) where W, S ∈RN−1×N−1, y, u ∈RN−1, d3 ∈RL is a vector with all entries different than zero, which requires a permutation of rows in D, D1 ∈RM−L×N−1 and D2 ∈RL×N−1. 4 In term of the variables y, z and the constant matrix W, the penalized maximum likelihood estimation problem in eq.(2) can be reformulated as: max Ω≻0 ¡ log(z −yTW−1y) −2uTy −(v + ρ)z −2ρ ∥y∥1 −τ ∥Ay −b∥1 ¢ (4) where ∥Ay −b∥1 can be written in an extended form: ∥Ay −b∥1 = ∥D1y∥1 + °°vec(J(D2) ◦(d3yT + D2W)) °° 1 (5) Intuitively, the term ∥D1y∥1 penalizes differences across different rows of Ωwhich affect only values in y, while the term °°vec(J(D2) ◦(d3yT + D2W)) °° 1 penalizes differences across different columns of Ωwhich affect values of y as well as W. It can be shown that the precision matrix Ωis positive definite since its Schur complement z − yTW−1y is positive. By maximizing eq.(4) with respect to z, we get: z −yTW−1y = 1 v + ρ (6) and since v > 0 and ρ > 0, this implies that the Schur complement in eq.(6) is positive. Maximization with respect to one variable at a time leads to a strictly convex, non-smooth, piecewise quadratic function. By replacing the optimal value for z given by eq.(6) into the objective function in eq.(4), we get: min y∈RN−1 ¡ 1 2yT(v + ρ)W−1y + uTy + ρ ∥y∥1 + τ 2 ∥Ay −b∥1 ¢ (7) Since the objective function in eq.(7) is non-smooth, its derivative is not continuous and therefore methods such as gradient descent cannot be applied. Although coordinate descent methods [5, 6] are suitable when only sparseness is enforced, they are not when local constancy is encouraged. As shown in [21], when penalizing an ℓ1-norm of differences, a coordinate descent algorithm can get stuck at sharp corners of the non-smooth optimization function; the resulting coordinates are stationary only under single-coordinate moves but not under diagonal moves involving two coordinates at a time. For a discrete derivative operator D used in the penalized maximum likelihood estimation problem in eq.(2), it suffices to take directions involving either one variable g = (0, . . . , 0, 1, 0, . . . , 0)T or two spatially neighboring variables g = (0, . . . , 0, 1, 0, . . . , 0, 1, 0, . . . , 0)T such that 1s appear in the position corresponding to the two neighbor variables. Finally, assuming an initial value y0 and a direction g, the objective function in eq.(7) can be reduced to find t in y(t) = y0 + tg such that it minimizes: mint∈R ¡ 1 2pt2 + qt + P m rm|t −sm| ¢ p = (v + ρ)gTW−1g , q = ((v + ρ)W−1y0 + u)Tg r = · ρ|g| τ 2|Ag| ¸ , s = · −diag(g)−1(y0) −diag(Ag)−1(Ay0 −b) ¸ (8) For simplicity of notation, we assume that r, s ∈RM use only non-zero entries of g and Ag on its definition in eq.(8). We sort and remove duplicate values in s, and propagate changes to r by adding the entries corresponding to the duplicate values in s. Note that these apparent modifications do not change the objective function, but they simplify its optimization. The resulting minimization problem in eq.(8) is convex, non-smooth and piecewise quadratic. Furthermore, since the objective function is quadratic on each interval [−∞; s1], [s1; s2], . . . , [sM−1; sM], [sM; +∞], it admits a closed form solution. The coordinate-direction descent algorithm is presented in detail in Table 2. A careful implementation of the algorithm allows obtaining a time complexity of O(KN 3) for K iterations and N variables, in which W−1, W−1y and Ay are updated at each iteration. In our experiments, the 5 Coordinate-direction descent algorithm 1. Given a dense sample covariance matrix bΣ, sparseness parameter ρ, local constancy parameter τ and a discrete derivative operator D, find the precision matrix Ω≻0 that maximizes: log det Ω−⟨bΣ, Ω⟩−ρ∥Ω∥1 −τ∥D ⊘Ω∥1 2. Initialize Ω= diag(bΣ)−1 3. For each iteration 1, . . . K and each variable 1, . . . , N (a) Split Ωinto W, y, z and bΣ into S, u, v as described in eq.(3) (b) Update W−1 by using the Sherman-Woodbury-Morrison formula (Note that when iterating from one variable to the next one, only one row and column change on matrix W) (c) Transform local constancy regularization term from D into A and b as described in eq.(5) (d) Compute W−1y and Ay (e) For each direction g involving either one variable or two spatially neighboring variables i. Find t that minimizes eq.(8) in closed form ii. Update y ←y + tg iii. Update W−1y ←W−1y + tW−1g iv. Update Ay ←Ay + tAg (f) Update z ← 1 v+ρ + yTW−1y Table 2: Coordinate-direction descent algorithm for learning sparse and locally constant Gaussian graphical models. 0.45 -0.35 0.4 1 2 3 4 5 6 7 8 9 (a) (b) (c) (d) Figure 1: (a) Ground truth model on an open contour manifold. Spatial neighbors are connected with black dashed lines. Positive interactions are shown in blue, negative interactions in red. The model contains two locally constant interactions between (x1, x2) and (x6, x7), and between (x4, x5) and (x8, x9), a not locally constant interaction between x1 and x4, and an independent variable x3; (b) colored precision matrix of the ground truth, red for negative entries, blue for positive entries; learnt structure from (c) small and (d) large datasets. Note that for large datasets all connections are correctly recovered. algorithm converges quickly in usually K = 10 iterations. The polynomial dependency on the number of variables of O(N 3) is expected since we cannot produce an algorithm faster than computing the inverse of the sample covariance in the case of an infinite sample. Finally, in the spirit of [5], a method for reducing the size of the original problem is presented. Given a P-dimensional spatial neighborhood or manifold (e.g. P = 1 for silhouettes, P = 2 for a four-pixel neighborhood on 2D images, P = 3 for a six-pixel neighborhood on 3D images), the objective function in eq.(7) has the maximizer y = 0 for variables on which ∥u∥∞≤ρ−Pτ. Since this condition does not depend on specific entries in the iterative estimation of the precision matrix, this property can be used to reduce the size of the problem in advance by removing such variables. 5 Experimental Results Convergence to Ground Truth. We begin with a small synthetic example to test the ability of the method for recovering the ground truth structure from data, in a complex scenario in which our method has to deal with both locally and not locally constant interactions as well as independent variables. The ground truth Gaussian graphical model is shown in Figure 1 and it contains 9 variables arranged in an open contour manifold. In order to measure the closeness of the recovered models to the ground truth, we measure the Kullback-Leibler divergence, average precision (one minus the fraction of falsely included edges), average recall (one minus the fraction of falsely excluded edges) as well as the Frobenius norm between the recovered model and the ground truth. For comparison purposes, we picked two of the 6 0 1 2 3 4 5 Kullback−Leibler divergence Full MB−or MB−and CovSel GLasso SLCGGM 0.2 0.4 0.6 0.8 1 1.2 Precision Full MB−or MB−and CovSel GLasso SLCGGM 0.4 0.6 0.8 1 Recall MB−or MB−and CovSel GLasso SLCGGM 0 1 2 3 4 5 6 7 Frobenius norm Indep Full MB−or MB−and CovSel GLasso SLCGGM Figure 2: Kullback-Leibler divergence with respect to the best method, average precision, recall and Frobenius norm between the recovered model and the ground truth. Our method (SLCGGM) outperforms the fully connected model (Full), Meinshausen-B¨uhlmann approximation (MB-or, MB-and), covariance selection (CovSel), graphical lasso (GLasso) for small datasets (in blue solid line) and for large datasets (in red dashed line). The fully independent model (Indep) resulted in relative divergences of 2.49 for small and 113.84 for large datasets. state-of-the-art structure learning techniques: covariance selection [5] and graphical lasso [6], since it has been shown theoretically and experimentally that they both converge to the maximum likelihood estimator. We also test the Meinshausen-B¨uhlmann approximation [4]. The fully connected as well as fully independent model are also included as baseline methods. Two different scenarios are tested: small datasets of four samples, and large datasets of 400 samples. Under each scenario, 50 datasets are randomly generated from the ground truth Gaussian graphical model. It can be concluded from Figure 2 that our method outperforms the state-of-the-art structure learning techniques both for small and large datasets. This is due to the fact that the ground truth data contains locally constant interactions, and our method imposes a prior for local constancy. Although this is a complex scenario which also contains not locally constant interactions as well as an independent variable, our method can recover a more plausible model when compared to other methods. Note that even though other methods may exhibit a higher recall for small datasets, our method consistently recovers a better probability distribution. A visual comparison of the ground truth versus the best recovered model by our method from small and large datasets is shown in Figure 1. The image shows the precision matrix in which red squares represent negative entries, while blue squares represent positive entries. There is very little difference between the ground truth and the recovered model from large datasets. Although the model is not fully recovered from small datasets, our technique performs better than the MeinshausenB¨uhlmann approximation, covariance selection and graphical lasso in Figure 2. Real-World Datasets. In the following experiments, we demonstrate the ability of our method to discover useful structures from real-world datasets. Datasets with a diverse nature of probabilistic relationships are included in our experiments: from cardiac MRI [22], our method recovers global deformation in the form of rotation and shrinking; from a walking sequence1, our method finds the long range interactions between different parts; and from functional brain MRI [23], our method recovers functional interactions between different regions and discover differences in processing monetary rewards between cocaine addicted subjects versus healthy control subjects. Each dataset is also diverse in the type of spatial neighborhood: one-dimensional for silhouettes in a walking sequence, two-dimensional for cardiac MRI and three-dimensional for functional brain MRI. Generalization. Cross-validation was performed in order to measure the generalization performance of our method in estimating the underlying distribution. Each dataset was randomly split into five sets. On each round, four sets were used for training and the remaining set was used for measuring the log-likelihood. Table 3 shows that our method consistently outperforms techniques that encourage sparsity only. This is strong evidence that datasets that are measured over a spatial manifold are locally constant, as well as that our method is a good regularization technique that avoids over-fitting and allows for better generalization. Another interesting fact is that for the brain MRI dataset, which is high dimensional and contains a small number of samples, the model that assumes full independence performed better than the Meinshausen-B¨uhlmann approximation, covariance selection and graphical lasso. Similar observations has been already made in [24, 25] where it was found that assuming independence often performs better than learning dependencies among variables. 1Human Identification at a Distance dataset http://www.cc.gatech.edu/cpl/projects/hid/ 7 (a) (b) (c) (d) (e) (f) Figure 3: Real-world datasets: cardiac MRI displacement (a) at full contraction and (b) at full expansion, (c) 2D spatial manifold and (d) learnt structure, which captures contraction and expansion (in red), and similar displacements between neighbor pixels (in blue); (e) silhouette manifold and (f) learnt structure from a manually labeled walking sequence, showing similar displacements from each independent leg (in blue) and opposite displacements between both legs as well as between hands and feet (in red); and structures learnt from functional brain MRI in a monetary reward task for (g) drug addicted subjects with more connections in the cerebellum (in yellow) versus (h) control subjects with more connections in the prefrontal cortex (in green). Method Synthetic Cardiac Walking Brain MRI Brain MRI MRI Sequence Drug-addicted Control Indep -6428.23 -5150.58 -12957.72 -324724.24 -302729.54 MB-and -5595.87* -5620.45 -12542.15 -418605.02 -317034.67 MB-or -5595.13* -4135.98* -11317.24 -398725.04 -298186.66 CovSel -5626.32 -5044.41 -12051.51 -409402.60 -300829.98 GLasso -5625.79 -5041.52 -12035.50 -413176.45 -305307.25 SLCGGM -5623.52 -4017.56 -10718.62 -297318.61 -278678.35 Table 3: Cross-validated log-likelihood on the testing set. Our method (SLCGGM) outperforms the Meinshausen-B¨uhlmann approximation (MB-and, MB-or), covariance selection (CovSel), graphical lasso (GLasso) and the fully independent model (Indep). Values marked with an asterisk are not statistically significantly different from our method. 6 Conclusions and Future Work In this paper, we proposed local constancy for Gaussian graphical models, which encourages finding probabilistic connectivities between two close or distant clusters of variables, instead of between isolated variables. We introduced an ℓ1-norm penalty for local constancy into a strictly convex maximum likelihood estimation. Furthermore, we proposed an efficient optimization algorithm and proved that our method guarantees positive definiteness of the estimated precision matrix. We tested the ability of our method to recover the ground truth structure from data, in a complex scenario with locally and not locally constant interactions as well as independent variables. We also tested the generalization performance of our method in a wide range of complex real-world datasets with a diverse nature of probabilistic relationships as well as neighborhood type. There are several ways of extending this research. Methods for selecting regularization parameters for sparseness and local constancy need to be further investigated. Although the positive definiteness properties of the precision matrix as well as the optimization algorithm still hold when including operators such as the Laplacian for encouraging smoothness, benefits of such a regularization approach need to be analyzed. In practice, our technique converges in a small number of iterations, but a more precise analysis of the rate of convergence needs to be performed. Finally, model selection consistency when the number of samples grows to infinity needs to be proved. Acknowledgments This work was supported in part by NIDA Grant 1 R01 DA020949-01 and NSF Grant CNS-0721701 8 References [1] D. Crandall, P. Felzenszwalb, and D. Huttenlocher. Spatial priors for part-based recognition using statistical models. IEEE Conf. Computer Vision and Pattern Recognition, 2005. [2] P. Felzenszwalb and D. Huttenlocher. Pictorial structures for object recognition. International Journal of Computer Vision, 2005. [3] L. Gu, E. Xing, and T. Kanade. Learning GMRF structures for spatial priors. IEEE Conf. Computer Vision and Pattern Recognition, 2007. [4] N. Meinshausen and P. B¨uhlmann. High dimensional graphs and variable selection with the lasso. The Annals of Statistics, 2006. [5] O. Banerjee, L. El Ghaoui, A. d’Aspremont, and G. Natsoulis. Convex optimization techniques for fitting sparse Gaussian graphical models. International Conference on Machine Learning, 2006. [6] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 2007. [7] M. Yuan and Y. Lin. Model selection and estimation in the Gaussian graphical model. Biometrika, 2007. [8] E. Levina, A. Rothman, and J. Zhu. Sparse estimation of large covariance matrices via a nested lasso penalty. The Annals of Applied Statistics, 2008. [9] J. Duchi, S. Gould, and D. Koller. Projected subgradient methods for learning sparse Gaussians. Uncertainty in Artificial Intelligence, 2008. [10] V. Mansinghka, C. Kemp, J. Tenenbaum, and T. Griffiths. Structured priors for structure learning. Uncertainty in Artificial Intelligence, 2006. [11] S. Lauritzen. Graphical Models. Oxford Press, 1996. [12] A. Dempster. Covariance selection. Biometrics, 1972. [13] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, 1996. [14] O. Banerjee, L. El Ghaoui, and A. d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate Gaussian or binary data. Journal of Machine Learning Research, 2008. [15] S. Lee, V. Ganapathi, and D. Koller. Efficient structure learning of Markov networks using ℓ1regularization. Advances in Neural Information Processing Systems, 2006. [16] M. Schmidt, A. Niculescu-Mizil, and K. Murphy. Learning graphical model structure using ℓ1regularization paths. AAAI Conf. Artificial Intelligence, 2007. [17] M. Schmidt, K. Murphy, G. Fung, and R. Rosales. Structure learning in random fields for heart motion abnormality detection. IEEE Conf. Computer Vision and Pattern Recognition, 2008. [18] M. Wainwright, P. Ravikumar, and J. Lafferty. High dimensional graphical model selection using ℓ1regularized logistic regression. Advances in Neural Information Processing Systems, 2006. [19] R. Tibshirani, M. Saunders, S. Rosset, J. Zhu, and K. Knight. Sparsity and smoothness via the fused lasso. Journal of the Royal Statistical Society, 2005. [20] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2006. [21] J. Friedman, T. Hastie, H. H¨ofling, and R. Tibshirani. Pathwise coordinate optimization. The Annals of Applied Statistics, 2007. [22] J. Deux, A. Rahmouni, and J. Garot. Cardiac magnetic resonance and 64-slice cardiac CT of lipomatous metaplasia of chronic myocardial infarction. European Heart Journal, 2008. [23] R. Goldstein, D. Tomasi, N. Alia-Klein, L. Zhang, F. Telang, and N. Volkow. The effect of practice on a sustained attention task in cocaine abusers. NeuroImage, 2007. [24] P. Domingos and M. Pazzani. On the optimality of the simple Bayesian classifier under zero-one loss. Machine Learning, 1997. [25] N. Friedman, D. Geiger, and M. Goldszmidt. Bayesian network classifiers. Machine Learning, 1997. 9
2009
62
3,813
Sparse Metric Learning via Smooth Optimization Yiming Ying†, Kaizhu Huang‡, and Colin Campbell† †Department of Engineering Mathematics, University of Bristol, Bristol BS8 1TR, United Kingdom ‡National Laboratory of Pattern Recognition, Institute of Automation, The Chinese Academy of Sciences, 100190 Beijing, China Abstract In this paper we study the problem of learning a low-rank (sparse) distance matrix. We propose a novel metric learning model which can simultaneously conduct dimension reduction and learn a distance matrix. The sparse representation involves a mixed-norm regularization which is non-convex. We then show that it can be equivalently formulated as a convex saddle (min-max) problem. From this saddle representation, we develop an efficient smooth optimization approach [17] for sparse metric learning, although the learning model is based on a nondifferentiable loss function. Finally, we run experiments to validate the effectiveness and efficiency of our sparse metric learning model on various datasets. 1 Introduction For many machine learning algorithms, the choice of a distance metric has a direct impact on their success. Hence, choosing a good distance metric remains a challenging problem. There has been much work attempting to exploit a distance metric in many learning settings, e.g. [8, 9, 10, 12, 20, 22, 23, 25]. These methods have successfully indicated that a good distance metric can significantly improve the performance of k-nearest neighbor classification and k-means clustering, for example. A good choice of a distance metric generally preserves the distance structure of the data: the distance between examples exhibiting similarity should be relatively smaller, in the transformed space, than between examples exhibiting dissimilarity. For supervised classification, the label information indicates whether the pair set is in the same class (similar) or in the different classes (dissimilar). In semi-supervised clustering, the side information conveys the information that a pair of samples are similar or dissimilar to each other. Since it is very common that the presented data is contaminated by noise, especially for high-dimensional datasets, a good distance metric should also be minimally influenced by noise. In this case, a low-rank distance matrix would produce a better generalization performance than non-sparse counterparts and provide a much faster and efficient distance calculation for test samples. Hence, a good distance metric should also pursue dimension reduction during the learning process. In this paper we present a novel approach to learn a low-rank (sparse) distance matrix. We first propose in Section 2 a novel metric learning model for estimating the linear transformation (equivalently distance matrix) that combines and retains the advantages of existing methods [8, 9, 12, 20, 22, 23, 25]. Our method can simultaneously conduct dimension reduction and learn a low-rank distance matrix. The sparse representation is realized by a mixed-norm regularization used in various learning settings [1, 18, 21]. We then show that this non-convex mixed-norm regularization framework is equivalent to a convex saddle (min-max) problem. Based on this equivalent representation, we develop, in Section 3, Nesterov’s smooth optimization approach [16, 17] for sparse metric learning using smoothing approximation techniques, although the learning model is based on a non-differentiable loss function. In Section 4, we demonstrate the effectiveness and efficiency of our sparse metric learning model with experiments on various datasets. 1 2 Sparse Distance Matrix Learning Model We begin by introducing necessary notation. Let Nn = {1, 2, . . . , n} for any n ∈N. The space of symmetric d times d matrices will be denoted by Sd. If S ∈Sd is positive definite, we write it as S ⪰0. The cone of positive semi-definite matrices is denoted by Sd + and denote by Od the set of d times d orthonormal matrices. For any X, Y ∈Rd×q, ⟨X, Y ⟩:= Tr(X⊤Y ) where Tr(·) denotes the trace of a matrix. The standard Euclidean norm is denoted by ∥· ∥. Denote by z := {(xi, yi) : i ∈Nn} a training set of n labeled examples with input xi = (x1 i , . . . , xd i ) ∈Rd, class label yi (not necessary binary) and let xij = xi −xj. Let P = (Pℓk)ℓ,k∈Nd ∈Rd×d be a transformation matrix. Denote by ˆxi = Pxi for any i ∈Nn and by ˆx = { ˆxi : i ∈Nn} the transformed data matrix. The linear transformation matrix P induces a distance matrix M = P ⊤P which defines a distance between xi and xj given by dM(xi, xj) = (xi −xj)⊤M(xi −xj). Our sparse metric learning model is based on two principal hypotheses: 1) a good choice of distance matrix M should preserve the distance structure, i.e. the distance between similar examples should be relatively smaller than between dissimilar examples; 2) a good distance matrix should also be able to effectively remove noise leading to dimension reduction. For the first hypothesis, the distance structure in the transformed space can be specified, for example, by the following constraints: ∥P(xj −xk)∥2 ≥∥P(xi −xj)∥2 + 1, ∀(xi, xj) ∈S and (xj, xk) ∈ D, where S denotes the similarity pairs and D denotes the dissimilarity pairs based on the label information. Equivalently, ∥ˆxj −ˆxk)∥2 ≥∥ˆxi −ˆxj∥2 + 1, ∀(xi, xj) ∈S and (xj, xk) ∈D. (1) For the second hypothesis, we use a sparse regularization to give a sparse solution. This regularization ranges from element-sparsity for variable selection to a low-rank matrix for dimension reduction [1, 2, 3, 13, 21]. In particular, for any ℓ∈Nd, denote the ℓ-th row vector of P by Pℓ and ∥Pℓ∥= (P k∈Nd P 2 ℓk) 1 2 . If ∥Pℓ∥= 0 then the ℓ-th variable in the transformed space becomes zero, i.e. xℓ i = Pℓxi = 0 which means that ∥Pℓ∥= 0 has the effect of eleminating ℓ-th variable. Motivated by the above observation, a direct way would be to enforce a L1-norm across the vector (∥P1∥, . . . , ∥Pd∥), i.e. P ℓ∈Nd ∥Pℓ∥. This L1-regularization yields row-vector (feature) sparsity of ˆx which plays the role of feature selection. Let W = P ⊤P = (W1, . . . , Wd) and we can easily show that Wℓ≡0 ⇐⇒Pℓ≡0. Motivated by this observation, instead of L1-regularization over vector (∥P1∥, . . . , ∥Pd∥) we can enforce L1-norm regularization across the vector (∥W1∥, . . . , ∥Wd∥). However, a low-dimensional projected space ˆx does not mean that its row-vector (feature) should be sparse. Ideally, we expect that the principal component of ˆx can be sparse. Hence, we introduce an extra orthonormal transformation U ∈Od and let ˆxi = PUxi. Denote a set of triplets T by T = {τ = (i, j, k) : i, j, k ∈Nn , (xi, xj) ∈S and (xj, xk) ∈D}. (2) By introducing slack variables ξ in constraints (1), we propose the following sparse (low-rank) distance matrix learning formulation: min U∈Od min W ∈Sd + P τ ξτ + γ||W||2 (2,1) s.t. 1 + x⊤ ijU ⊤WUxij ≤x⊤ kjU ⊤WUxkj + ξτ, ξτ ≥0, ∀τ = (i, j, k) ∈T , and W ∈Sd +. (3) where ||W||(2,1) = P ℓ(P k w2 kℓ) 1 2 denotes the (2, 1)-norm of W. A similar mixed (2, 1)-norm regularization was used in [1, 18] for multi-task learning and multi-class classification to learn the sparse representation shared across different tasks or classes. 2.1 Equivalent Saddle Representation We now turn our attention to an equivalent saddle (min-max) representation for sparse metric learning (3) which is essential for developing optimization algorithms in the next section. To this end, we need the following lemma which develops and extends a similar version in multi-task learning [1, 2] to the case of learning a positive semi-definite distance matrix. 2 Lemma 1. Problem (3) is equivalent to the following convex optimization problem min M⪰0 X τ=(i,j,k)∈T (1 + x⊤ ijMxij −x⊤ kjMxkj)+ + γ(Tr(M))2 (4) Proof. Let M = UWU ⊤in equation (3) and then W = U ⊤MU. Hence, (3) is reduced to the following min M∈Sd + min U∈Od X τ ξτ + γ||U ⊤MU||2 (2,1) (5) s.t. x⊤ ijMxij ≤x⊤ kjMxkj + ξτ, ξτ ≥0 ∀τ = (i, j, k) ∈T , and M ∈Sd +. Now, for any fixed M in equation (5), by the eigen-decomposition of M there exists eU ∈Od such that M = eU ⊤λ(M)eU. Here, the diagonal matrix λ(M) = diag(λ1, λ2, . . . , λd) where λi is the i-th eigenvalue of M. Let V = eUU ∈Od, and then we have minU∈Od ||U ⊤MU||(2,1) = minU∈Od ||(eUU)⊤λ(M)eUU||(2,1) = minV ∈Od ||V ⊤λ(M)V ||(2,1). Observe that ||V ⊤λ(M)V ||(2,1) = P i(P j(P k VkiλkVkj)2) 1 2 = P i ¡P k,k′(P j VkiVk′i)λkVkjλk′Vk′j ¢ 1 2 = P i ¡P k λ2 kV 2 ki ¢ 1 2 (6) where, in the last equality, we use the fact that V ∈Od, i.e. P j VkjVk′j = δkk′. Applying CauchySchwartz’s inequality implies that P k λkV 2 ki ≤ ¡P k λ2 kV 2 ki ¢ 1 2 (P k V 2 ki) 1 2 = ¡P k λ2 kV 2 ki ¢ 1 2 . Putting this back into (6) yields ||V ⊤λ(M)V ||(2,1) ≥P i P k λkV 2 ki = P k λk = Tr(M), where we use the fact V ∈Od again. However, if we select V to be identity matrix Id, ||V ⊤λ(M)V ||(2,1) = Tr(M). Hence, minU∈Od ||U ⊤MU||(2,1) = minV ∈Od ||V ⊤λ(M)V ||(2,1) = Tr(M). Putting this back into equation (5) the result follows. From the above lemma, we are ready to present an equivalent saddle (min-max) representation of problem (3). First, let Q1 = {uτ : τ ∈T , 0 ≤uτ ≤1} and Q2 = {M ∈Sd + : Tr(M) ≤ p T/γ } where T is the cardinality of triplet set T i.e. T = #{τ ∈T }. Theorem 1. Problem (4) is equivalent to the following saddle representation min u∈Q1 max M∈Q2 n ⟨ X τ=(i,j,k)∈T uτ(xjkx⊤ jk −xijx⊤ ij), M⟩−γ(Tr(M))2o − X t∈T uτ (7) Proof. Suppose that M ∗is an optimal solution of problem (4). By its definition, there holds γ(Tr(M ∗))2 ≤P τ∈T (1 + x⊤ kjMxik −x⊤ kjMxkj)+ + γ(Tr(M))2 for any M ⪰0. Letting M = 0 yields that Tr(M ∗) ≤ p T/γ. Hence, problem (4) is identical to min M∈Q2 X τ=(i,j,k)∈T (1 + x⊤ ijMxij −x⊤ kjMxkj)+ + γ(Tr(M))2. (8) Observe that s+ = max{0, s} = maxα{sα : 0 ≤ α ≤ 1}. Consequently, the above equation can be written as minM∈Q2 max0≤u≤1 P τ∈T uτ(1 + x⊤ kjMxik −x⊤ ijMxij) + γ(Tr(M))2. By the min-max theorem (e.g. [5]), the above problem is equivalent to minu∈Q1 maxM∈Q2 nP τ∈T uτ(−x⊤ ijMxij + x⊤ jkMxjk) −γ(Tr(M))2o −P τ∈T ut. Combining this with the fact that x⊤ jkMxjk −x⊤ ijMxij = ⟨xjkx⊤ jk −xijx⊤ ij, M⟩completes the proof of the theorem. 2.2 Related Work There is a considerable amount of work on metric learning. In [9], an information-theoretic approach to metric learning (ITML) is developed which equivalently transforms the metric learning problem 3 to that of learning an optimal Gaussian distribution with respect to an relative entropy. The method of Relevant Component analysis (RCA)[7] attempts to find a distance metric which can minimize the covariance matrix imposed by the equivalence constraints. In [25], a distance metric for k-means clustering is then learned to shrink the averaged distance within the similar set while enlarging the average distance within the dissimilar set simultaneously. All the above methods generally do not yield sparse solutions and only work within their special settings. Maximally Collapsing Metric Learning (MCML) tries to map all points in a same class to a single location in the feature space via a stochastic selection rule. There are many other metric learning approaches in either unsupervised or supervised learning setting, see [26] for a detailed review. We particularly mention the following work which is more related to our sparse metric learning model (3). • Large Margin Nearest Neighbor (LMNN) [23, 24]: LMNN aims to explore a large margin nearest neighbor classifier by exploiting nearest neighbor samples as side information in the training set. Specifically, let Nk(x) denotes the k-nearest neighbor of sample x and define the similar set S = {(xi, xj) : xi ∈N(xj), yi = yj} and D = {(xj, xk) : xk ∈N(xj), yk ̸= yj}. Then, recall that the triplet set T is given by equation (2), the framework LMNN can be rewritten as the following: min M⪰0 X τ=(i,j,k)∈T (1 + x⊤ ijMxij −x⊤ kjMxkj)+ + γTr(CM) (9) where the covariance matrix C over the similar set S is defined by C = P (xi,xj)∈S(xi −xj)(xi − xj)⊤. From the above reformulation, we see that LMNN also involves a sparse regularization term Tr(CM). However, the sparsity of CM does not imply the sparsity of M, see the discussion in the experimental section. Large Margin Component Analysis (LMCA) [22] is designed for conducting classification and dimensionality reduction simultaneously. However, LMCA controls the sparsity by directly specifying the dimensionality of the transformation matrix and it is an extended version of LMNN. In practice, this low dimensionality is tuned by ad hoc methods such as cross-validation. • Sparse Metric Learning via Linear Programming (SMLlp) [20]: the spirit of this approach is closer to our method where the following sparse framework was proposed: min M⪰0 X t=(i,j,k)∈T (1 + x⊤ ijMxij −x⊤ kjMxkj)+ + γ X ℓ,k∈Nd |Mℓk| (10) However, the above 1-norm term P ℓ,k∈Nd |Mℓk| can only enforce the element sparsity of M. The learned sparse model would not generate an appropriate low-ranked principal matrix M for metric learning. In order to solve the above optimization problem, [10] further proposed to restrict M to the space of diagonal dominance matrices: a small subspace of the positive semi-definite cone. Such a restriction would only result in a sub-optimal solution, although the final optimization is an efficient linear programming problem. 3 Smooth Optimization Algorithms Nesterov [17, 16] developed an efficient smooth optimization method for solving convex programming problems of the form minx∈Q f(x) where Q is a bounded closed convex set in a finitedimensional real vector space E. This smooth optimization usually requires f to be differentiable with Lipschitz continuous gradient and it has an optimal convergence rate of O(1/t2) for smooth problems where t is the iteration number. Unfortunately, we can not directly apply the smooth optimization method to problem (4) since the hinge loss there is not continuously differentiable. Below we show the smooth approximation method [17] can be approached through the saddle representation (7). 3.1 Nesterov’s Smooth Approximation Approach We briefly review Nesterov’s approach [17] in the setting of a general min-max problem using smoothing techiniques. To this end, we introduce some useful notation. Let Q1 (resp. Q2) be nonempty convex compact sets in finite-dimensional real vector spaces E1 (resp. E2) endowed with norm ∥· ∥1 (resp. ∥· ∥2). Let E∗ 2 be the dual space of E2 with standard norm defined, for any s ∈E∗ 2, by ∥s∥∗ 2 = max{⟨s, x⟩2 : ∥x∥2 = 1}, where the scalar product ⟨·, ·⟩2 denotes the value of s at x. Let A : E1 →E∗ 2 be a linear operator. Its adjoint operator A∗: E2 →E∗ 1 is defined, 4 Smooth Optimization Algorithm for Sparse Metric Learning (SMLsm) 1. Let ε > 0, t = 0 and initialize u(0) ∈Q1, M (−1) = 0 and let L = 1 2µ P τ∈T ∥Xτ∥2 2 2. Compute Mµ(u(t)) and ∇φµ(u(t)) = (−1 + ⟨Xτ, Mµ(u(t))⟩: τ ∈T ) and let M (t) = t t+2M (t−1) + 2 t+2Mµ(ut) 3. Compute z(t) = arg minz∈Q1 n L 2 ∥u(t) −z∥2 + ∇φµ(u(t))⊤(z −u(t)) o 4. Compute v(t) = arg minv∈Q1 n L 2 ∥u(0) −v∥2 + Pt i=0( i+1 2 ) ¡ φµ(u(i)) + ∇φµ(u(i))⊤(v −u(i)) ¢o 5. Set u(t+1) = 2 t+3v(t) + t+1 t+3z(t) 6. Set t ←t + 1. Go to step 2 until the stopping criterion less than ε Table 1: Pseudo-code of first order Nesterov’s method for any x ∈E2 and u ∈E1, by ⟨Au, x⟩2 = ⟨A∗x, u⟩1. The norm of such a operator is defined by ∥A∥1,2 = maxx,u {⟨Au, x⟩2 : ∥x∥2 = 1, ∥u∥1 = 1} . Now, the min-max problem considered in [17, Section 2] has the following special structure: min u∈Q1 n φ(u) = bφ(u) + max{⟨Au, x⟩2 −ˆf(x) : x ∈Q2} o . (11) Here, bφ(u) is assumed to be continuously differentiable and convex with Lipschitz continuous gradient and ˆf(x) is convex and differentiable. The above min-max problem is usually not smooth and Nesterov [17] proposed a smoothing approximation approach to solve the above problem: min u∈Q1 n φµ(u) = bφ(u) + max{⟨Au, x⟩2 −ˆf(x) −µd2(x) : x ∈Q2} o . (12) Here, d2(·) is a continuous proxy-function, strongly convex on Q2 with some convexity parameter σ2 > 0 and µ > 0 is a small smoohting parameter. Let x0 = arg minx∈Q2 d2(x). Without loss of generality, assume d2(x0) = 0. The strong convexity of d2(·) with parameter σ2 means that d2(x) ≥1 2σ2∥x −x0∥2 2. Since d2(·) is strongly convex, the solution of the maximization problem ˆφµ(u) := max{⟨Au, x⟩2 −ˆf(x) −µd2(x) : x ∈Q2} is unique and differentiable, see [6, Theorem 4.1]. Indeed, it was established in [17, Theorem 1 ] that the gradient of φµ is given by ∇ˆφµ(u) = A∗xµ(u) (13) and it has a Lipschitz constant L = ∥A∥2 1,2 µσ2 , i.e. ∥A∗xµ(u1) −A∗xµ(u2)∥∗ 1 ≤ ∥A∥2 1,2 µσ2 ∥u1 −u2∥1. Hence, the proxy-function d2 can be regarded as a generalized Moreau-Yosida regularization term to smooth out the objective function. As mentioned above, function φµ in problem (12) is differentiable with Lipschitz continuous gradients. Hence, we can apply the optimal smooth optimization scheme [17, Section 3] to the smooth approximate problem (12). The optimal scheme needs another proxy-function d(u) associated with Q1. Assume that d(u0) = minu∈Q1 d(u) = 0 and it has convexity parameter σ i.e. d(u) ≥1 2σ∥u −u0∥1. For this special problem (12), the primal solution u∗∈Q1 and dual solution x∗∈Q2 can be simultaneously obtained, see [17, Theorem 3]. Below, we will apply this general scheme to solve the min-max representation (7) of the sparse metric learning problem (3), and hence solves the original problem (4). 3.2 Smooth Optimization Approach for Sparse Metric Learning We now turn our attention to developing a smooth optimization approach for problem (4). Our main idea is to connect the saddle representation (7) in Theorem 1 with the special formulation (11). To this end, firstly let E1 = RT with standard Euclidean norm ∥· ∥1 = ∥· ∥and E2 = Sd with Frobenius norm defined, for any S ∈Sd, by ∥S∥2 2 = P i,j∈Nd S2 ij. Secondly, the closed convex sets are respectively given by Q1 = {u = (uτ : τ ∈T ) ∈[0, 1]T } and Q2 = {M ∈Sd + : Tr(M) ≤ p T/γ}. Then, define the proxy-function d2(M) = ∥M∥2. Consequently, the proxy-function d2(·) is strongly convex on Q2 with convexity parameter σ2 = 2. Finally, for any τ = (i, j, k) ∈T , let 5 Xτ = xjkx⊤ jk −xijx⊤ ij. In addition, we replace the variable x by M and bφ(u) = −P τ∈T uτ in (12), ˆf(M) = γ(Tr(M))2. Finally, define the linear operator A : RT →(Sd)∗, for any u ∈RT , by Au = X τ∈T uτXτ. (14) With the above preparations, the saddle representation (7) exactly matches the special structure (11) which can be approximated by problem (12) with µ sufficiently small. The norm of the linear operator A can be estimated as follows. Lemma 2. Let the linear operator A be defined as above, then ∥A∥1,2 ≤ ³P τ∈T ∥Xτ∥2 2 ´ 1 2 where, for any M ∈Sd, ∥M∥2 denotes the Frobenius norm of M. Proof. For any u ∈Q1 and M ∈Sd, we have that Tr ¡¡P τ∈T uτXτ ¢ M ¢ ≤ ¡P τ∈T uτ∥Xτ∥2 ¢ ∥M∥2 ≤∥M∥2 ¡P τ∈T u2 τ ¢ 1 2 ¡P τ∈T ∥Xτ∥2 2 ¢ 1 2 = ∥M∥2∥u∥1 ¡P τ∈T ∥Xτ∥2 2 ¢ 1 2 . Combining the above inequality with the definition that ∥A∥1,2 = max © Tr ³ (P τ∈T uτXτ)M ´ : ∥u∥1 = 1, ∥M∥2 = 1 ª yields the desired result. We now can adapt the smooth optimization [17, Section 3 and Theorem 3] to solve the smooth approximation formulation (12) for metric learning. To this end, let the proxy-function d in Q1 be the standard Euclidean norm i.e. for some u(0) ∈Q1 ⊆RT , d(u) = ∥u −u(0)∥2. The smooth optimization pseudo-code for problem (7) (equivalently problem (4)) is outlined in Table 1. One can stop the algorithm by monitoring the relative change of the objective function or change in the dual gap. The efficiency of Nesterov’s smooth optimization largely depends on Steps 2, 3, and 4 in Table 1. Steps 3 and 4 can be solved straightforward where z(t) = min(max(0, u(t) −∇φµ(u(t))/L), 1) and v(t) = min(max(0, u(0) −Pt i=0(i + 1)∇φµ(u(i))/2L), 1). The solution Mγ(u) in Step 2 involves the following problem Mµ(u) = arg max{⟨ X τ∈T uτXτ, M⟩−γ(Tr(M))2 −µ∥M∥2 2 : M ∈Q2}. (15) The next lemma shows it can be efficiently solved by quadratic programming (QP). Lemma 3. Problem (15) is equivalent to the following s∗= arg max n X i∈Nd λisi −γ( X i∈Nd si)2 −µ X i∈Nd s2 i : X i∈Nd si ≤ p T/γ, and si ≥0 ∀i ∈Nd o (16) where λ = (λ1, . . . , λd) are the eigenvalues of P t∈T utXt. Moreover, if we denotes the eigendecomposition P t∈T utXt by P t∈T utXt = Udiag(λ)U ⊤with some U ∈Od then the optimal solution of problem (15) is given by Mµ(u) = Udiag(s∗)U ⊤. Proof. We know from Von Neumann’s inequality (see [14] or [4, Page 10]), for all X, Y ∈Sd, that Tr(XY ) ≤P i∈Nd λi(X)λi(Y ) where λi(X) and λi(Y ) are the eigenvalues of X and Y in non-decreasing order, respectively. The equality is attained whenever X = Udiag(λ(X))U ⊤, Y = Udiag(λ(Y ))U ⊤for some U ∈Od. The desired result follows by applying the above inequality with X = P τ∈T uτXτ and Y = M. It was shown in [17, Theorem 3] that the iteration complexity is of O(1/ε) for finding a ε-optimal solution if we choose µ = O(ε). This is usually much better than the standard sub-gradient descent method with iteration complexity typically O(1/ε2). As listed in Table 1, the complexity for each iteration mainly depends on the eigen-decomposition on P t∈Nt utXt and the quadratic programming to solve problem (15) which has complexity O(d3). Hence, the overall iteration complexity of the smooth optimization approach for sparse metric learning is of the order O(d3/ε) for finding an ε-optimal solution. As a final remark, the Lipschitz given by the L = 1 2µ P τ ∥Xτ∥2 could be too loose in reality. One can use the line search scheme [15] to further accelerate the algorithm. 6 4 Experiments In this section we compared our proposed method with four other methods including (1) the LMNN method [23], (2) the Sparse Metric Learning via Linear Programming (SMLlp) [20], (3) the information-theoretic approach for metric learning (ITML) [9], and (4) the Euclidean distance based k-Nearest Neighbor (KNN) method (called Euc for brevity). We also implemented the iterative sub-gradient descent algorithm [24] to solve the proposed framework (4) (called SMLgd) in order to evaluate the efficiency of the proposed smooth optimization algorithm SMLsm. We try to exploit all these methods to learn a good distance metric and a KNN classifier is used to examine the performance of these different learned metrics. The comparison is done on four benchmark data sets: Wine, Iris, Balance Scale, and Ionosphere, which were obtained from the UCI machine learning repository. We randomly partitioned the data sets into a training and test sets by using a ratio 0.85. We then trained each approach on the training set, and performed evaluation on the test sets. We repeat the above process 10 times and then report the averaged result as the final performance. All the approaches except the Euclidean distance need to define a triplet set T before training. Following [20], we randomly generated 1500 triplets for SMLsm, SMLgd, SMLlp, and LMNN. The number of nearest neighbors was adapted via cross validation for all the methods in the range of {1, 3, 5, 7}. The trade-off parameter for SMLsm, SMLgd, SMLlp, and LMNN was also tuned via cross validation from {10−5, 10−4, 10−3, 10−2, 10−1, 100, 101, 102}. The first part of our evaluations focuses on testing the learning accuracy. The result can be seen in Figure 1 (a)-(d) respectively for the four data sets. Clearly, the proposed SMLsm demonstrates best performance. Specifically, SMLsm outperforms the other four methods in Wine and Iris, while it ranks the second in Balance Scale and Ionosphere with slightly lower accuracy than the best method. SMLgd showed different results with SMLsm due to the different optimization methods, which we will discuss shortly in Figure 1 (i)-(l). We also report the dimension reduction Figure 1(e)(h). It is observed that our model outputs the most sparse metric. This validates the advantages of our approach. That is, our method directly learns both an accurate and sparse distance metric simultaneously. In contrast, other methods only touch this topic marginally: SMLlp is not optimal, as they exploited the one-norm regularization term and also relaxed the learning problem; LMNN aims to learn a metric with a large-margin regularization term, which is not directly related to sparsity of the distance matrix. ITML and Euc do not generate a sparse metric at all. Finally, in order to examine the efficiency of the proposed smooth optimization algorithm, we plot the convergence graphs of SMLsm versus those of SMLgd in Figure 1(i)-(l). As observed, SMLsm converged much faster than SMLgd in all the data sets. SMLgd sometimes oscillated and may incur a long tail due to the non-smooth nature of the hinge loss. For some data sets, it converged especially slow, which can be observed in Figure (k) and (l). 5 Conclusion In this paper we proposed a novel regularization framework for learning a sparse (low-rank) distance matrix. This model was realized by a mixed-norm regularization term over a distance matrix which is non-convex. Using its special structure, it was shown to be equivalent to a convex min-max (saddle) representation involving a trace norm regularization. Depart from the saddle representation, we successfully developed an efficient Nesterov’s first-order optimization approach [16, 17] for our metric learning model. Experimental results on various datasets show that our sparse metric learning framework outperforms other state-of-the-art methods with higher accuracy and significantly smaller dimensionality. In future, we are planning to apply our model to large-scale datasets with higher dimensional features and use the line search scheme [15] to further accelerate the algorithm. Acknowledgements The second author is partially supported by the Excellent SKL Project of NSFC (No.60723005), China. The first and third author is supported by EPSRC grant EP/E027296/1. 7 0.74 SMLsm 1.95 SMLgd 1.48 SMLlp 2.48 ITML 1.48 LMNN 3.7 EUC Wine−Average Error Rate (%) (a) 1.3 SMLsm 1.4 SMLgd 2.17 SMLlp 1.74 ITML 1.74 LMNN 3.04 EUC Iris−Average Error Rate (%) (b) 8.19 SMLsm 9.21 SMLgd 18.62 SMLlp 6.81 ITML 8.09 LMNN 20.11 EUC Bal−Average Error Rate (%) (c) 9.06 SMLsm 8.87 SMLgd 10.2 SMLlp 12.45 ITML 10.19 LMNN 15.28 EUC Iono−Average Error Rate (%) (d) 5.7 SMLsm 9.3 SMLgd 12.1 SMLlp 13 ITML 10.7 LMNN 13 EUC Wine−Average Dim (e) 1 SMLsm 1 SMLgd 4 SMLlp 4 ITML 2 LMNN 4 EUC Iris−Average Dim (f) 3.3 SMLsm 3.7 SMLgd 4 SMLlp 4 ITML 3.3 LMNN 4 EUC Bal−Average Dim (g) 4.9 SMLsm 11 SMLgd 15.1 SMLlp 33 ITML 9.3 LMNN 33 EUC Iono−Average Dim (h) 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Epoch Normalized Objective Values Convergence Curve for Wine SMLgd SMLsm (i) 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Epoch Normalized Objective Values Convergence curves for Iris SMLgd SMLsm (j) 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 Epoch Normalized Objective Values Convergence Curves for Balance SMLgd SMLsm (k) 0 100 200 300 400 500 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Epoch Normalized Objective Values Convergence Curves for Ionosphere SMLgd SMLsm (l) Figure 1: Performance comparison among different methods. Subfigures (a)-(d) present the average error rates; (e)-(h) plots the average dimensionality used in different methods; (i)-(l) give the convergence graph for the sub-gradient algorithm and the proposed smooth optimization algorithm. 8 References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. NIPS, 2007. [2] A. Argyriou, C. A. Micchelli, M. Pontil, and Y. Ying. A spectral regularization framework for multi-task structure learning. NIPS, 2008. [3] F. R. Bach. Consistency of trace norm minimization. J. of Machine Learning Research, 9: 1019–1048, 2008. [4] J. M. Borwein and A. S. Lewis. Convex Analysis and Nonlinear Optimization: Theory and Examples. CMS Books in Mathematics. Springer, 2005. [5] S. Boyd and L . Vandenberghe. Convex optimization. Cambridge University Press, 2004. [6] J. F. Bonnans and A. Shapiro. Optimization problems with perturbation: A guided tour. SIAM Review, 40:202–227 ,1998. [7] A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning a mahalanobis metric from equivalence constraints. J. of Machine Learning Research, 6: 937-965, 2005. [8] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively with application to face verification. CVPR, 2005. [9] J. Davis, B. Kulis, P. Jain, S. Sra, and I. Dhillon. Information-theoretic metric learning. ICML, 2007. [10] G. M. Fung, O. L. Mangasarian, and A. J. Smola. Minimal kernel classifiers. J. of Machine Learning Research, 3: 303–321, 2002. [11] A. Globerson, S. Roweis, Metric learning by collapsing classes. NIPS, 2005. [12] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood component analysis. NIPS, 2004. [13] T. Hastie, R.Tibshirani, and Robert Friedman. The Elements of Statistical Learning. SpringerVerlag New York, LLC, 2003. [14] R.A. Horn and C.R. Johhnson. Topics in Matrix Analysis. Cambridge University Press, 1991. [15] A. Nemirovski. Efficient methods in convex programming. Lecture Notes, 1994. [16] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer, 2003. [17] Y. Nesterov. Smooth minimization of non-smooth functions. Mathematical Programming, 103:127-152, 2005. [18] Obozinski, B. Taskar, and M. I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing. In press, 2009. [19] J. D. M. Rennie, and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. ICML, 2005. [20] R. Rosales and G. Fung. Learning sparse metrics via linear programming. KDD, 2006. [21] N. Srebro, J.D. M. Rennie, and T. S. Jaakkola. Maximum-margin matrix factorization. NIPS, 2005. [22] L. Torresani and K. Lee. Large margin component analysis. NIPS, 2007. [23] K. Q. Weinberger, J. Blitzer, and L. Saul. Distance metric learning for large margin nearest neighbour classification. NIPS, 2006. [24] K. Q. Weinberger and L. K. Saul. Fast solvers and efficient implementations for distance metric learning. ICML, 2008. [25] E. Xing, A. Ng, M. Jordan, and S. Russell. Distance metric learning with application to clustering with side information. NIPS, 2002. [26] L. Yang and R. Jin. Distance metric learning: A comprehensive survey. In Technical report, Department of Computer Science and Engineering, Michigan State University, 2007. 9
2009
63
3,814
The "tree-dependent components" of natural scenes are edge filters Daniel Zoran Interdisciplinary Center for Neural Computation Hebrew University of Jerusalem daniez@cs.huji.ac.il Yair Weiss School of Computer Science Hebrew University of Jerusalem yweiss@cs.huji.ac.il Abstract We propose a new model for natural image statistics. Instead of minimizing dependency between components of natural images, we maximize a simple form of dependency in the form of tree-dependencies. By learning filters and tree structures which are best suited for natural images we observe that the resulting filters are edge filters, similar to the famous ICA on natural images results. Calculating the likelihood of an image patch using our model requires estimating the squared output of pairs of filters connected in the tree. We observe that after learning, these pairs of filters are predominantly of similar orientations but different phases, so their joint energy resembles models of complex cells. 1 Introduction and related work Many models of natural image statistics have been proposed in recent years [1, 2, 3, 4]. A common goal of many of these models is finding a representation in which components or sub-components of the image are made as independent or as sparse as possible [5, 6, 2]. This has been found to be a difficult goal, as natural images have a highly intricate structure and removing dependencies between components is hard [7]. In this work we take a different approach, instead of minimizing dependence between components we try to maximize a simple form of dependence - tree dependence. It would be useful to place this model in context of previous works about natural image statistics. Many earlier models are described by the marginal statistics solely, obtaining a factorial form of the likelihood: p(x) = Y i pi(xi) (1) The most notable model of this approach is Independent Component Analysis (ICA), where one seeks to find a linear transformation which maximizes independence between components (thus fitting well with the aforementioned factorization). This model has been applied to many scenarios, and proved to be one of the great successes of natural image statistics modeling with the emergence of edge-filters [5]. This approach has two problems. The first is that dependencies between components are still very strong, even with those learned transformation seeking to remove them. Second, it has been shown that ICA achieves, after the learned transformation, only marginal gains when measured quantitatively against simpler method like PCA [7] in terms of redundancy reduction. A different approach was taken recently in the form of radial Gaussianization [8], in which components which are distributed in a radially symmetric manner are made independent by transforming them non-linearly into a radial Gaussian, and thus, independent from one another. A more elaborate approach, related to ICA, is Independent Subspace Component Analysis or ISA. In this model, one looks for independent subspaces of the data, while allowing the sub-components 1 Figure 1: Our model with respect to marginal models such as ICA (a), and ISA like models (b). Our model, being a tree based model (c), allows components to belong to more than one subspace, and the subspaces are not required to be independent. of each subspace to be dependent: p(x) = Y k pk(xi∈K) (2) This model has been applied to natural images as well and has been shown to produce the emergence of phase invariant edge detectors, akin to complex cells in V1 [2]. Independent models have several shortcoming, but by far the most notable one is the fact that the resulting components are, in fact, highly dependent. First, dependency between the responses of ICA filters has been reported many times [2, 7]. Also, dependencies between ISA components has also been observed [9]. Given these robust dependencies between filter outputs, it is somewhat peculiar that in order to get simple cell properties one needs to assume independence. In this work we ask whether it is possible to obtain V1 like filters in a model that assumes dependence. In our model we assume the filter distribution can be described by a tree graphical model [10] (see Figure 1). Degenerate cases of tree graphical models include ICA (in which no edges are present) and ISA (in which edges are only present within a subspace). But in its non-degenerate form, our model assumes any two filter outputs may be dependent. We allow components to belong to more than one subspace, and as a result, do not require independence between them. 2 Model and learning Our model is comprised of three main components. Given a set of patches, we look for the parameters which maximize the likelihood of a whitened natural image patch z: p(z; W, β, T) = p(y1) N Y i=1 p(yi|ypai; β) (3) Where y = Wz, T is the tree structure, pai denotes the parent of node i and β is a parameter of the density model (see below for the details). The three components we are trying to learn are: 1. The filter matrix W, where every row defines one of the filters. The response of these filters is assumed to be tree-dependent. We assume that W is orthogonal (and is a rotation of a whitening transform). 2. The tree structure T which specifies which components are dependent on each other. 3. The probability density function for connected nodes in the tree, which specify the exact form of dependency between nodes. All three together describe a complete model for whitened natural image patches, allowing likelihood estimation and exact inference [11]. We perform the learning in an iterative manner: we start by learning the tree structure and density model from the entire data set, then, keeping the structure and density constant, we learn the filters via gradient ascent in mini-batches. Going back to the tree structure we repeat the process many times iteratively. It is important to note that both the filter set and tree structure are learned from the data, and are continuously updated during learning. In the following sections we will provide details on the specifics of each part of the model. 2 x1 x2 β=0.0 −2 0 2 −3 −2 −1 0 1 2 3 x1 x2 β=0.5 −2 0 2 −3 −2 −1 0 1 2 3 x1 x2 β=1.0 −2 0 2 −3 −2 −1 0 1 2 3 x1 x2 β=0.0 −2 0 2 −3 −2 −1 0 1 2 3 x1 x2 β=0.5 −2 0 2 −3 −2 −1 0 1 2 3 x1 x2 β=1.0 −2 0 2 −3 −2 −1 0 1 2 3 Figure 2: Shape of the conditional (Left three plots) and joint (Right three plots) density model in log scale for several values of β, from dependence to independence. 2.1 Learning tree structure In their seminal paper, Chow and Liu showed how to learn the optimal tree structure approximation for a multidimensional probability density function [12]. This algorithm is easy to apply to this scenario, and requires just a few simple steps. First, given the current estimate for the filter matrix W, we calculate the response of each of the filters with all the patches in the data set. Using these responses, we calculate the mutual information between each pair of filters (nodes) to obtain a fully connected weighted graph. The final step is to find a maximal spanning tree over this graph. The resulting unrooted tree is the optimal tree approximation of the joint distribution function over all nodes. We will note that the tree is unrooted, and the root can be chosen arbitrarily - this means that there is no node, or filter, that is more important than the others - the direction in the tree graph is arbitrary as long as it is chosen in a consistent way. 2.2 Joint probability density functions Gabor filter responses on natural images exhibit highly kurtotic marginal distributions, with heavy tails and sharp peaks [13, 3, 14]. Joint pair wise distributions also exhibit this same shape with varying degrees of dependency between the components [13, 2]. The density model we use allows us to capture both the highly kurtotic nature of the distributions, while still allowing varying degrees of dependence using a mixing variable. We use a mix of two forms of finite, zero mean Gaussian Scale Mixtures (GSM). In one, the components are assumed to be independent of each other and in the other, they are assumed to be spherically distributed. The mixing variable linearly interpolates between the two, allowing us to capture the whole range of dependencies: p(x1, x2; β) = βpdep(x1, x2) + (1 −β)pind(x1, x2) (4) When β = 1 the two components are dependent (unless p is Gaussian), whereas when β = 0 the two components are independent. For the density functions themselves, we use a finite GSM. The dependent case is a scale mixture of bivariate Gaussians: pdep(x1, x2) = X k πkN(x1, x2; σ2 kI) (5) While the independent case is a product of two independent univariate Gaussians: pind(x1, x2) = X k πkN(x1; σ2 k) ! X k πkN(x2; σ2 k) ! (6) Estimating parameters πk and σ2 k for the GSM is done directly from the data using Expectation Maximization. These parameters are the same for all edges and are estimated only once on the first iteration. See Figure 2 for a visualization of the conditional distribution functions for varying values of β. We will note that the marginal distributions for the two types of joint distributions above are the same. The mixing parameter β is also estimated using EM, but this is done for each edge in the tree separately, thus allowing our model to theoretically capture the fully independent case (ICA) and other degenerate models such as ISA. 2.3 Learning tree dependent components Given the current tree structure and density model, we can now learn the matrix W via gradient ascent on the log likelihood of the model. All learning is performed on whitened, dimensionally 3 reduced patches. This means that W is a N × N rotation (orthonormal) matrix, where N is the number of dimensions after dimensionality reduction (see details below). Given an image patch z we multiply it by W to get the response vector y: y = Wz (7) Now we can calculate the log likelihood of the given patch using the tree model (which we assume is constant at the moment): log p(y) = log p(yroot) + N X i=1 log p(yi|ypai) (8) Where pai denotes the parent of node i. Now, taking the derivative w.r.t the r-th row of W: ∂log p(y) ∂Wr = ∂log p(y) ∂yr zT (9) Where z is the whitened natural image patch. Finally, we can calculate the derivative of the log likelihood with respect to the r-th element in y: ∂log p(y) ∂yr = ∂log p(ypar, yr) ∂yr + X c∈C(r) ∂log p(yr, yc) ∂yr −∂log p(yr) ∂yr (10) Where C(r) denote the children of node r. In summary, the gradient ascent rule for updating the rotation matrix W is given by: Wt+1 r = Wt r + η ∂log p(y) ∂yr zT (11) Where η is the learning rate constant. After update, the rows of W are orthonormalized. This gradient ascent rule is applied for several hundreds of patches (see details below), after which the tree structure is learned again as described in Section 2.1, using the new filter matrix W, repeating this process for many iterations. 3 Results and analysis 3.1 Validation Before running the full algorithm on natural image data, we wanted to validate that it does produce sensible results with simple synthetic data. We generated noise from four different models, one is 1/f independent Gaussian noise with 8 Discrete Cosine Transform (DCT) filters, the second is a simple ICA model with 8 DCT filters, and highly kurtotic marginals. The third was a simple ISA model - 4 subspaces, each with two filters from the DCT filter set. Distribution within the subspace was a circular, highly kurtotic GSM, and the subspaces were sampled independently. Finally, we generated data from a simple synthetic tree of DCT filters, using the same joint distributions as for the ISA model. These four synthetic random data sets were given to the algorithm - results can be seen in Figure 3 for the ICA, ISA and tree samples. In all cases the model learned the filters and distribution correctly, reproducing both the filters (up to rotations within the subspace in ISA) and the dependency structure between the different filters. In the case of 1/f Gaussian noise, any whitening transformation is equally likely and any value of beta is equally likely. Thus in this case, the algorithm cannot find the tree or the filters. 3.2 Learning from natural image patches We then ran experiments with a set of natural images [9]1. These images contain natural scenes such as mountains, fields and lakes. . The data set was 50,000 patches, each 16 × 16 pixels large. The patches’ DC was removed and they were then whitened using PCA. Dimension was reduced from 256 to 128 dimensions. The GSM for the density model had 16 components. Several initial 1available at http://www.cis.hut.fi/projects/ica/imageica/ 4 Figure 3: Validation of the algorithm. Noise was generated from three models - top row is ICA, middle row is ISA and bottom row is a tree model. Samples were then given to the algorithm. On the right are the resulting learned tree models. Presented are the learned filters, tree model (with white edges meaning β = 0, black meaning β = 1 and grays intermediate values) and an example of a marginal histogram for one of the filters. It can be seen that in all cases all parts of the model were correctly learned. Filters in the ISA case were learned up to rotation within the subspace, and all filters were learned up to sign. β values for the ICA case were always below 0.1, as were the values of β between subspaces in ISA. conditions for the matrix W were tried out (random rotations, identity) but this had little effect on results. Mini-batches of 10 patches each were used for the gradient ascent - the gradient of 10 patches was summed, and then normalized to have unit norm. The learning rate constant η was set to 0.1. Tree structure learning and estimation of the mixing variable β were done every 500 mini-batches. All in all, 50 iterations were done over the data set. 3.3 Filters and tree structure Figures 4 and 5 show the learned filters (WQ where Q is the whitening matrix) and tree structure (T) learned from natural images. Unlike the ISA toy data in figure 3, here a full tree was learned and β is approximately one for all edges. The GSM that was learned for the marginals was highly kurtotic. It can be seen that resulting filters are edge filters at varying scales, positions and orientations. This is similar to the result one gets when applying ICA to natural images [5, 15]. More interesting is Figure 4: Left: Filter set learned from 16 × 16 natural image patches. Filters are ordered by PCA eigenvalues, largest to smallest. Resulting filters are edge filters having different orientations, positions, frequencies and phases. Right: The “feature” set learned, that is, columns of the pseudo inverse of the filter set. 5 Figure 5: The learned tree graph structure and feature set. It can be seen that neighboring features on the graph have similar orientation, position and frequency. See Figure 4 for a better view of the feature details, and see text for full detail and analysis. Note that the figure is rotated CW. 6 0 1 2 3 4 0 0.5 1 1.5 2 2.5 3 3.5 Optimal Orientation Parent Child 0 2 4 6 8 0 1 2 3 4 5 6 7 Optimal Frequency Parent Child 0 1 2 3 4 5 6 0 1 2 3 4 5 6 Optimal Phase Parent Child 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Optimal Position Y Parent Child Figure 6: Correlation of optimal parameters in neighboring nodes in the tree graph. Orientation, frequency and position are highly correlated, while phase seems to be entirely uncorrelated. This property of correlation in frequency and orientation, while having no correlation in phase is related to the ubiquitous energy model of complex cells in V1. See text for further details. Figure 7: Left: Comparison of log likelihood values of our model with PCA, ICA and ISA. Our model gives the highest likelihood. Right: Samples taken at random from ICA, ISA and our model. Samples from our model appear to contain more long-range structure. the tree graph structure learned along with the filters which is shown in Figure 5. It can be seen that neighboring filters (nodes) in the tree tend to have similar position, frequency and orientation. Figure 6 shows the correlation of optimal frequency, orientation and position for neighboring filters in the tree - it is obvious that all three are highly correlated. Also apparent in this figure is the fact that the optimal phase for neighboring filters has no significant correlation. It has been suggested that filters which have the same orientation, frequency and position with different phase can be related to complex cells in V1 [2, 16]. 3.4 Comparison to other models Since our model is a generalization of both ICA and ISA we use it to learn both models. In order to learn ICA we used the exact same data set, but the tree had no edges and was not learned from the data (alternatively, we could have just set β = 0). For ISA we used a forest architecture of 2 node trees, setting β = 1 for all edges (which means a spherical symmetric distribution), no tree structure was learned. Both models produce edge filters similar to what we learn (and to those in [5, 15, 6]). The ISA model produces neighboring nodes with similar frequency and orientation, but different phase, as was reported in [2]. We also compare to a simple PCA whitening transform, using the same whitening transform and marginals as in the ICA case, but setting W = I. We compare the likelihood each model gives for a test set of natural image patches, different from the one that was used in training. There were 50,000 patches in the test set, and we calculate the mean log likelihood over the entire set. The table in Figure 7 shows the result - as can be seen, our model performs better in likelihood terms than both ICA and ISA. Using a tree model, as opposed to more complex graphical models, allows for easy sampling from the model. Figure 7 shows 20 random samples taken from our tree model along with samples from the ICA and ISA models. Note the elongated structures (e.g. in the bottom left sample) in the samples from the tree model, and compare to patches sampled from the ICA and ISA models. 7 0 2 4 0 0.2 0.4 0.6 0.8 1 Phase 0 2 4 6 8 0 10 20 30 40 Frequency 0 1 2 3 4 0 10 20 30 40 Orientation Figure 8: Left: Interpretation of the model. Given a patch, the response of all edge filters is computed (“simple cells”), then at each edge, the corresponding nodes are squared and summed to produce the response of the “complex cell” this edge represents. Both the response of complex cells and simple cells is summed to produce the likelihood of the patch. Right: Response of a “complex cell” in our model to changing phase, frequency and orientation. Response in the y-axis is the sum of squares of the two filters in this “complex cell”. Note that while the cell is selective to orientation and frequency, it is rather invariant to phase. 3.5 Tree models and complex cells One way to interpret the model is looking at the likelihood of a given patch under this model. For the case of β = 1 substituting Equation 4 into Equation 3 yields: log L(z) = X i ρ( q y2 i + y2pai) −ρ(|ypai|) (12) Where ρ(x) = log P k πkN(x; σ2 k)  . This form of likelihood has an interesting similarity to models of complex cells in V1 [2, 4]. In Figure 8 we draw a simple two-layer network that computes the likelihood. The first layer applies linear filters (“simple cells”) to the image patch, while the second layer sums the squared outputs of similarly oriented filters from the first layer, having different phases, which are connected in the tree (“complex cells”). Output is also dependent on the actual response of the “simple cell” layer. The likelihood here is maximized when both the response of the parent filter ypai and the child yi is zero, but, given that one filter has responded with a non-zero value, the likelihood is maximized when the other filter also fires (see the conditional density in Figure 2). Figure 8 also shows an example of the phase invariance which is present in the learned "complex cell" (energy of a pair of learned filters connected in the tree) - it seems that sum squared response of the shown pair of nodes is relatively invariant to the phase of the stimulus, while it is selective to both frequency and orientation - the hallmark of “complex cells”. Quantifying this result with the AC/DC ratio, as is common [17] we find that around 60% percent of the edges have an AC/DC ratio which is smaller than one - meaning they would be classified as complex cells using standard methods [17]. 4 Discussion We have proposed a new model for natural image statistics which, instead of minimizing dependency between components, maximizes a simple form of dependency - tree dependency. This model is a generalization of both ICA and ISA. We suggest a method to learn such a model, including the tree structure, filter set and density model. When applied to natural image data, our model learns edge filters similar to those learned with ICA or ISA. The ordering in the tree, however, is interesting neighboring filters in the tree tend to have similar orientation, position and frequency, but different phase. This decorrelation of phase, in conjunction with correlations in frequency and orientation are the hallmark of energy models for complex cells in V1. Future work will include applications of the model to several image processing scenarios. We have started experimenting with application of this model to image denoising by using belief propagation for inference, and results are promising. Acknowledgments This work has been supported by the AMN foundation and the ISF. The authors wish to thank the anonymous reviewers for their helpful comments. 8 References [1] Y. Weiss and W. Freeman, “What makes a good model of natural images?” Computer Vision and Pattern Recognition, 2007. CVPR ’07. IEEE Conference on, pp. 1–8, June 2007. [2] A. Hyvarinen and P. Hoyer, “Emergence of phase-and shift-invariant features by decomposition of natural images into independent feature subspaces,” Neural Computation, vol. 12, no. 7, pp. 1705–1720, 2000. [3] A. Srivastava, A. B. Lee, E. P. Simoncelli, and S.-C. Zhu, “On advances in statistical modeling of natural images,” J. Math. Imaging Vis., vol. 18, no. 1, pp. 17–33, 2003. [4] Y. Karklin and M. Lewicki, “Emergence of complex cell properties by learning to generalize in natural scenes,” Nature, November 2008. [5] A. J. Bell and T. J. Sejnowski, “The independent components of natural scenes are edge filters,” Vision Research, vol. 37, pp. 3327–3338, 1997. [6] B. Olshausen et al., “Emergence of simple-cell receptive field properties by learning a sparse code for natural images,” Nature, vol. 381, no. 6583, pp. 607–609, 1996. [7] M. Bethge, “Factorial coding of natural images: how effective are linear models in removing higher-order dependencies?” vol. 23, no. 6, pp. 1253–1268, June 2006. [8] S. Lyu and E. P. Simoncelli, “Nonlinear extraction of ’independent components’ of natural images using radial Gaussianization,” Neural Computation, vol. 21, no. 6, pp. 1485–1519, Jun 2009. [9] A. Hyvrinen, P. Hoyer, and M. Inki, “Topographic independent component analysis: Visualizing the dependence structure,” in Proc. 2nd Int. Workshop on Independent Component Analysis and Blind Signal Separation (ICA2000), Espoo, Finland. Citeseer, 2000, pp. 591–596. [10] F. Bach and M. Jordan, “Beyond independent components: trees and clusters,” The Journal of Machine Learning Research, vol. 4, pp. 1205–1233, 2003. [11] J. Yedidia, W. Freeman, and Y. Weiss, “Understanding belief propagation and its generalizations,” Exploring artificial intelligence in the new millennium, pp. 239–236, 2003. [12] C. Chow and C. Liu, “Approximating discrete probability distributions with dependence trees,” IEEE transactions on Information Theory, vol. 14, no. 3, pp. 462–467, 1968. [13] E. Simoncelli, “Bayesian denoising of visual images in the wavelet domain,” LECTURE NOTES IN STATISTICS-NEW YORK-SPRINGER VERLAG-, pp. 291–308, 1999. [14] A. Levin, A. Zomet, and Y. Weiss, “Learning to perceive transparency from the statistics of natural scenes,” Advances in Neural Information Processing Systems, pp. 1271–1278, 2003. [15] J. van Hateren, “Independent component filters of natural images compared with simple cells in primary visual cortex,” Proceedings of the Royal Society B: Biological Sciences, vol. 265, no. 1394, pp. 359–366, 1998. [16] C. Zetzsche, E. Barth, and B. Wegmann, “The importance of intrinsically two-dimensional image features in biological vision and picture coding,” in Digital images and human vision. MIT Press, 1993, p. 138. [17] K. Kording, C. Kayser, W. Einhauser, and P. Konig, “How are complex cell properties adapted to the statistics of natural stimuli?” Journal of Neurophysiology, vol. 91, no. 1, pp. 206–212, 2004. 9
2009
64
3,815
Bootstrapping from Game Tree Search Joel Veness University of NSW and NICTA Sydney, NSW, Australia 2052 joelv@cse.unsw.edu.au David Silver University of Alberta Edmonton, AB Canada T6G2E8 silver@cs.ualberta.ca William Uther NICTA and the University of NSW Sydney, NSW, Australia 2052 William.Uther@nicta.com.au Alan Blair University of NSW and NICTA Sydney, NSW, Australia 2052 blair@cse.unsw.edu.au Abstract In this paper we introduce a new algorithm for updating the parameters of a heuristic evaluation function, by updating the heuristic towards the values computed by an alpha-beta search. Our algorithm differs from previous approaches to learning from search, such as Samuel’s checkers player and the TD-Leaf algorithm, in two key ways. First, we update all nodes in the search tree, rather than a single node. Second, we use the outcome of a deep search, instead of the outcome of a subsequent search, as the training signal for the evaluation function. We implemented our algorithm in a chess program Meep, using a linear heuristic function. After initialising its weight vector to small random values, Meep was able to learn high quality weights from self-play alone. When tested online against human opponents, Meep played at a master level, the best performance of any chess program with a heuristic learned entirely from self-play. 1 Introduction The idea of search bootstrapping is to adjust the parameters of a heuristic evaluation function towards the value of a deep search. The motivation for this approach comes from the recursive nature of tree search: if the heuristic can be adjusted to match the value of a deep search of depth D, then a search of depth k with the new heuristic would be equivalent to a search of depth k + D with the old heuristic. Deterministic, two-player games such as chess provide an ideal test-bed for search bootstrapping. The intricate tactics require a significant level of search to provide an accurate position evaluation; learning without search has produced little success in these domains. Much of the prior work in learning from search has been performed in chess or similar two-player games, allowing for clear comparisons with existing methods. Samuel (1959) first introduced the idea of search bootstrapping in his seminal checkers player. In Samuel’s work the heuristic function was updated towards the value of a minimax search in a subsequent position, after black and white had each played one move. His ideas were later extended by Baxter et al. (1998) in their chess program Knightcap. In their algorithm, TD-Leaf, the heuristic function is adjusted so that the leaf node of the principal variation produced by an alpha-beta search is moved towards the value of an alpha-beta search at a subsequent time step. Samuel’s approach and TD-Leaf suffer from three main drawbacks. First, they only update one node after each search, which discards most of the information contained in the search tree. Second, their updates are based purely on positions that have actually occurred in the game, or which lie on the computed line of best play. These positions may not be representative of the wide variety of positions that must be evaluated by a search based program; many of the positions occurring in 1 time = t+1 time = t TD-Leaf TD-Root TD time = t time = t+1 RootStrap(minimax) and TreeStrap(minimax) TreeStrap(minimax) only Figure 1: Left: TD, TD-Root and TD-Leaf backups. Right: RootStrap(minimax) and TreeStrap(minimax). large search trees come from sequences of unnatural moves that deviate significantly from sensible play. Third, the target search is performed at a subsequent time-step, after a real move and response have been played. Thus, the learning target is only accurate when both the player and opponent are already strong. In practice, these methods can struggle to learn effectively from self-play alone. Work-arounds exist, such as initializing a subset of the weights to expert provided values, or by attempting to disable learning once an opponent has blundered, but these techniques are somewhat unsatisfactory if we have poor initial domain knowledge. We introduce a new framework for bootstrapping from game tree search that differs from prior work in two key respects. First, all nodes in the search tree are updated towards the recursive minimax values computed by a single depth limited search from the root position. This makes full use of the information contained in the search tree. Furthermore, the updated positions are more representative of the types of positions that need to be accurately evaluated by a search-based player. Second, as the learning target is based on hypothetical minimax play, rather than positions that occur at subsequent time steps, our methods are less sensitive to the opponent’s playing strength. We applied our algorithms to learn a heuristic function for the game of chess, starting from random initial weights and training entirely from self-play. When applied to an alpha-beta search, our chess program learnt to play at a master level against human opposition. 2 Background The minimax search algorithm exhaustively computes the minimax value to some depth D, using a heuristic function Hθ(s) to evaluate non-terminal states at depth D, based on a parameter vector θ. We use the notation V D s0 (s) to denote the value of state s in a depth D minimax search from root state s0. We define T D s0 to be the set of states in the depth D search tree from root state s0. We define the principal leaf, lD(s), to be the leaf state of the depth D principal variation from state s. We use the notation θ←to indicate a backup that updates the heuristic function towards some target value. Temporal difference (TD) learning uses a sample backup Hθ(st) θ←Hθ(st+1) to update the estimated value at one time-step towards the estimated value at the subsequent time-step (Sutton, 1988). Although highly successful in stochastic domains such as Backgammon (Tesauro, 1994), direct TD performs poorly in highly tactical domains. Without search or prior domain knowledge, the target value is noisy and improvements to the value function are hard to distinguish. In the game of chess, using a naive heuristic and no search, it is hard to find checkmate sequences, meaning that most games are drawn. The quality of the target value can be significantly improved by using a minimax backup to update the heuristic towards the value of a minimax search. Samuel’s checkers player (Samuel, 1959) introduced this idea, using an early form of bootstrapping from search that we call TD-Root. The parameters of the heuristic function, θ, were adjusted towards the minimax search value at the next complete time-step (see Figure 1), Hθ(st) θ←V D st+1(st+1). This approach enabled Samuel’s check2 ers program to achieve human amateur level play. Unfortunately, Samuel’s approach was handicapped by tying his evaluation function to the material advantage, and not to the actual outcome from the position. The TD-Leaf algorithm (Baxter et al., 1998) updates the value of a minimax search at one timestep towards the value of a minimax search at the subsequent time-step (see Figure 1). The parameters of the heuristic function are updated by gradient descent, using an update of the form V D st (st) θ←V D st+1(st+1). The root value of minimax search is not differentiable in the parameters, as a small change in the heuristic value can result in the principal variation switching to a completely different path through the tree. The TD-Leaf algorithm ignores these non-differentiable boundaries by assuming that the principal variation remains unchanged, and follows the local gradient given that variation. This is equivalent to updating the heuristic function of the principal leaf, Hθ(lD(st)) θ←V D st+1(st+1). The chess program Knightcap achieved master-level play when trained using TD-Leaf against a series of evenly matched human opposition, whose strength improved at a similar rate to Knightcap’s. A similar algorithm was introduced contemporaneously by Beal and Smith (1997), and was used to learn the material values of chess pieces. The world champion checkers program Chinook used TD-Leaf to learn an evaluation function that compared favorably to its hand-tuned heuristic function (Schaeffer et al., 2001). Both TD-Root and TD-Leaf are hybrid algorithms that combine a sample backup with a minimax backup, updating the current value towards the search value at a subsequent time-step. Thus the accuracy of the learning target depends both on the quality of the players, and on the quality of the search. One consequence is that these learning algorithms are not robust to variations in the training regime. In their experiments with the chess program Knightcap (Baxter et al., 1998), the authors found that it was necessary to prune training examples in which the opponent blundered or made an unpredictable move. In addition, the program was unable to learn effectively from games of self-play, and required evenly matched opposition. Perhaps most significantly, the piece values were initialised to human expert values; experiments starting from zero or random weights were unable to exceed weak amateur level. Similarly, the experiments with TD-Leaf in Chinook also fixed the important checker and king values to human expert values. In addition, both Samuel’s approach and TD-Leaf only update one node of the search tree. This does not make efficient use of the large tree of data, typically containing millions of values, that is constructed by memory enhanced minimax search variants. Furthermore, the distribution of root positions that are used to train the heuristic is very different from the distribution of positions that are evaluated during search. This can lead to inaccurate evaluation of positions that occur infrequently during real games but frequently within a large search tree; these anomalous values have a tendency to propagate up through the search tree, ultimately affecting the choice of best move at the root. In the following section, we develop an algorithm that attempts to address these shortcomings. 3 Minimax Search Bootstrapping Our first algorithm, RootStrap(minimax), performs a minimax search from the current position st, at every time-step t. The parameters are updated so as to move the heuristic value of the root node towards the minimax search value, Hθ(st) θ←V D st (st). We update the parameters by stochastic gradient descent on the squared error between the heuristic value and the minimax search value. We treat the minimax search value as a constant, to ensure that we move the heuristic towards the search value, and not the other way around. δt = V D st (st) −Hθ(st) ∆θ = −η 2 ∇θδ2 t = ηδt∇θHθ(st) where η is a step-size constant. RootStrap(αβ) is equivalent to RootStrap(minimax), except it uses the more efficient αβ-search algorithm to compute V D st (st). For the remainder of this paper we consider heuristic functions that are computed by a linear combination Hθ(s) = φ(s)T θ, where φ(s) is a vector of features of position s, and θ is a parameter vector specifying the weight of each feature in the linear combination. Although simple, this form of heuristic has already proven sufficient to achieve super-human performance in the games of Chess 3 Algorithm Backup TD Hθ(st) θ←Hθ(st+1) TD-Root Hθ(st) θ←V D st+1(st+1) TD-Leaf Hθ(lD(st)) θ←V D st+1(st+1) RootStrap(minimax) Hθ(st) θ←V D st (st) TreeStrap(minimax) Hθ(s) θ←V D st (s), ∀s ∈T D st TreeStrap(αβ) Hθ(s) θ←[bD st(s), aD st(s)], ∀s ∈T αβ t Table 1: Backups for various learning algorithms. Algorithm 1 TreeStrap(minimax) Randomly initialise θ Initialise t ←1, s1 ←start state while st is not terminal do V ←minimax(st, Hθ, D) for s ∈search tree do δ ←V (s) −Hθ(s) ∆θ ←∆θ + ηδφ(s) end for θ ←θ + ∆θ Select at = argmax a∈A V (st ◦a) Execute move at, receive st+1 t ←t + 1 end while Algorithm 2 DeltaFromTransTbl(s, d) Initialise ∆θ ←⃗0, t ←probe(s) if t is null or depth(t) < d then return ∆θ end if if lowerbound(t) > Hθ(s) then ∆θ ←∆θ + η(lowerbound(t) −Hθ(s))∇Hθ(s) end if if upperbound(t) < Hθ(s) then ∆θ ←∆θ + η(upperbound(t) −Hθ(s))∇Hθ(s) end if for s′ ∈succ(s) do ∆θ ←DeltaFromTransTbl(s′) end for return ∆θ (Campbell et al., 2002), Checkers (Schaeffer et al., 2001) and Othello (Buro, 1999). The gradient descent update for RootStrap(minimax) then takes the particularly simple form ∆θt = ηδtφ(st). Our second algorithm, TreeStrap(minimax), also performs a minimax search from the current position st. However, TreeStrap(minimax) updates all interior nodes within the search tree. The parameters are updated, for each position s in the tree, towards the minimax search value of s, Hθ(s) θ←V D st (s), ∀s ∈T D st . This is again achieved by stochastic gradient descent, δt(s) = V D st (s) −Hθ(s) ∆θ = −η 2 ∇θ X s∈T D st δt(s)2 = η X s∈T D st δt(s)φ(s) The complete algorithm for TreeStrap(minimax) is described in Algorithm 1. 4 Alpha-Beta Search Bootstrapping The concept of minimax search bootstrapping can be extended to αβ-search. Unlike minimax search, alpha-beta does not compute an exact value for the majority of nodes in the search tree. Instead, the search is cut off when the value of the node is sufficiently high or low that it can no longer contribute to the principal variation. We consider a depth D alpha-beta search from root position s0, and denote the upper and lower bounds computed for node s by aD s0(s) and bD s0(s) respectively, so that bD s0(s) ≤V D s0 (s) ≤aD s0(s). Only one bound applies in cut off nodes: in the case of an alpha-cut we define bD s0(s) to be −∞, and in the case of a beta-cut we define aD s0(s) to be ∞. If no cut off occurs then the bounds are exact, i.e. aD s0(s) = bD s0(s) = V D s0 (s). The bounded values computed by alpha-beta can be exploited by search bootstrapping, by using a one-sided loss function. If the value from the heuristic evaluation is larger than the a-bound of the deep search value, then it is reduced towards the a-bound, Hθ(s) θ←aD st(s). Similarly, if the value from the heuristic evaluation is smaller than the b-bound of the deep search value, then it is increased 4 towards the b-bound, Hθ(s) θ←bD st(s). We implement this idea by gradient descent on the sum of one-sided squared errors: δa t (s) = ½ aD st(s) −Hθ(s) if Hθ(s) > aD st(s) 0 otherwise δb t(s) = ½ bD st(s) −Hθ(s) if Hθ(s) < bD st(s) 0 otherwise giving ∆θt = η 2 ∇θ X s∈T αβ t δa t (s)2 + δb t(s)2 = η X s∈T αβ t ³ δa t (s) + δb t(s) ´ φ(s) where T αβ t is the set of nodes in the alpha-beta search tree at time t. We call this algorithm TreeStrap(αβ), and note that the update for each node s is equivalent to the TreeStrap(minimax) update when no cut-off occurs. 4.1 Updating Parameters in TreeStrap(αβ) High performance αβ-search routines rely on transposition tables for move ordering, reducing the size of the search space, and for caching previous search results (Schaeffer, 1989). A natural way to compute ∆θ for TreeStrap(αβ) from a completed αβ-search is to recursively step through the transposition table, summing any relevant bound information. We call this procedure DeltaFromTransTbl, and give the pseudo-code for it in Algorithm 2. DeltaFromTransTbl requires a standard transposition table implementation providing the following routines: • probe(s), which returns the transposition table entry associated with state s. • depth(t), which returns the amount of search depth used to determine the bound estimates stored in transposition table entry t. • lowerbound(t), which returns the lower bound stored in transposition entry t. • upperbound(t), which returns the upper bound stored in transposition entry t. In addition, DeltaFromTransTbl requires a parameter d ≥1, that limits updates to ∆θ from transposition table entries based on a minimum of search depth of d. This can be used to control the number of positions that contribute to ∆θ during a single update, or limit the computational overhead of the procedure. 4.2 The TreeStrap(αβ) algorithm The TreeStrap(αβ) algorithm can be obtained by two straightforward modifications to Algorithm 1. First, the call to minimax(st, Hθ, D) must be replaced with a call to αβ-search(st, Hθ, D). Secondly, the inner loop computing ∆θ is replaced by invoking DeltaFromTransTbl(st). 5 Learning Chess Program We implemented our learning algorithms in Meep, a modified version of the tournament chess engine Bodo. For our experiments, the hand-crafted evaluation function of Bodo was removed and replaced by a weighted linear combination of 1812 features. Given a position s, a feature vector φ(s) can be constructed from the 1812 numeric values of each feature. The majority of these features are binary. φ(s) is typically sparse, with approximately 100 features active in any given position. Five wellknown, chess specific feature construction concepts: material, piece square tables, pawn structure, mobility and king safety were used to generate the 1812 distinct features. These features were a strict subset of the features used in Bodo, which are themselves simplistic compared to a typical tournament engine (Campbell et al., 2002). The evaluation function Hθ(s) was a weighted linear combination of the features i.e. Hθ(s) = φ(s)T θ. All components of θ were initialised to small random numbers. Terminal positions were 5 evaluated as −9999.0, 0 and 9999.0 for a loss, draw and win respectively. In the search tree, mate scores were adjusted inward slightly so that shorter paths to mate were preferred when giving mate, and vice-versa. When applying the heuristic evaluation function in the search, the heuristic estimates were truncated to the interval [−9900.0, 9900.0]. Meep contains two different modes: a tournament mode and a training mode. When in tournament mode, Meep uses an enhanced alpha-beta based search algorithm. Tournament mode is used for evaluating the strength of a weight configuration. In training mode however, one of two different types of game tree search algorithms are used. The first is a minimax search that stores the entire game tree in memory. This is used by the TreeStrap(minimax) algorithm. The second is a generic alpha-beta search implementation, that uses only three well known alpha-beta search enhancements: transposition tables, killer move tables and the history heuristic (Schaeffer, 1989). This simplified search routine was used by the TreeStrap(αβ) and RootStrap(αβ) algorithms. In addition, to reduce the horizon effect, checking moves were extended by one ply. During training, the transposition table was cleared before the search routine was invoked. Simplified search algorithms were used during training to avoid complicated interactions with the more advanced heuristic search techniques (such as null move pruning) useful in tournament play. It must be stressed that during training, no heuristic or move ordering techniques dependent on knowing properties of the evaluation weights were used by the search algorithms. Furthermore, a quiescence search (Beal, 1990) that examined all captures and check evasions was applied to leaf nodes. This was to improve the stability of the leaf node evaluations. Again, no knowledge based pruning was performed inside the quiescence search tree, which meant that the quiescence routine was considerably slower than in Bodo. 6 Experimental Results We describe the details of our training procedures, and then proceed to explore the performance characteristics of our algorithms, RootStrap(αβ), TreeStrap(minimax) and TreeStrap(αβ) through both a large local tournament and online play. We present our results in terms of Elo ratings. This is the standard way of quantifying the strength of a chess player within a pool of players. A 300 to 500 Elo rating point difference implies a winning rate of about 85% to 95% for the higher rated player. 6.0.1 Training Methodology At the start of each experiment, all weights were initialised to small random values. Games of selfplay were then used to train each player. To maintain diversity during training, a small opening book was used. Once outside of the opening book, moves were selected greedily from the results of the search. Each training game was played within 1m 1s Fischer time controls. That is, both players start with a minute on the clock, and gain an additional second every time they make a move. Each training game would last roughly five minutes. We selected the best step-size for each learning algorithm, from a series of preliminary experiments: α = 1.0 × 10−5 for TD-Leaf and RootStrap(αβ), α = 1.0 × 10−6 for TreeStrap(minimax) and 5.0 × 10−7 for TreeStrap(αβ). The TreeStrap variants used a minimum search depth parameter of d = 1. This meant that the target values were determined by at least one ply of full-width search, plus a varying amount of quiescence search. 6.1 Relative Performance Evaluation We ran a competition between many different versions of Meep in tournament mode, each using a heuristic function learned by one of our algorithms. In addition, a player based on randomly initialised weights was included as a reference, and arbitrarily assigned an Elo rating of 250. The best ratings achieved by each training method are displayed in Table 2. We also measured the performance of each algorithm at intermediate stages throughout training. Figure 2 shows the performance of each learning algorithm with increasing numbers of games on a single training run. As each training game is played using the same time controls, this shows the 6 10 1 10 2 10 3 10 4 0 500 1000 1500 2000 2500 Number of training games Rating (Elo) Learning from self−play: Rating versus Number of training games TreeStrap(alpha−beta) RootStrap(alpha−beta) TreeStrap(minimax) TD−Leaf Untrained Figure 2: Performance when trained via self-play starting from random initial weights. 95% confidence intervals are marked at each data point. The x-axis uses a logarithmic scale. Algorithm Elo TreeStrap(αβ) 2157 ± 31 TreeStrap(minimax) 1807 ± 32 RootStrap(αβ) 1362 ± 59 TD-Leaf 1068 ± 36 Untrained 250 ± 63 Table 2: Best performance when trained by self play. 95% confidence intervals given. performance of each learning algorithm given a fixed amount of computation. Importantly, the time used for each learning update also took away from the total thinking time. The data shown in Table 2 and Figure 2 was generated by BayesElo, a freely available program that computes maximum likelihood Elo ratings. In each table, the estimated Elo rating is given along with a 95% confidence interval. All Elo values are calculated relative to the reference player, and should not be compared with Elo ratings of human chess players (including the results of online play, described in the next section). Approximately 16000 games were played in the tournament. The results demonstrate that learning from many nodes in the search tree is significantly more efficient than learning from a single root node. TreeStrap(minimax) and TreeStrap(αβ) learn effective weights in just a thousand training games and attain much better maximum performance within the duration of training. In addition, learning from alpha-beta search is more effective than learning from minimax search. Alpha-beta search significantly boosts the search depth, by safely pruning away subtrees that cannot affect the minimax value at the root. Although the majority of nodes now contain one-sided bounds rather than exact values, it appears that the improvements to the search depth outweigh the loss of bound information. Our results demonstrate that the TreeStrap based algorithms can learn a good set of weights, starting from random weights, from self-play in the game of chess. Our experiences using TD-Leaf in this setting were similar to those described in (Baxter et al., 1998); within the limits of our training scheme, learning occurred, but only to the level of weak amateur play. Our results suggest that TreeStrap based methods are potentially less sensitive to initial starting conditions, and allow for speedier convergence in self play; it will be interesting to see whether similar results carry across to domains other than chess. 7 Algorithm Training Partner Rating TreeStrap(αβ) Self Play 1950-2197 TreeStrap(αβ) Shredder 2154-2338 Table 3: Blitz performance at the Internet Chess Club 6.2 Evaluation by Internet Play We also evaluated the performance of the heuristic function learned by TreeStrap(αβ), by using it in Meep to play against predominantly human opposition at the Internet Chess Club. We evaluated two heuristic functions, the first using weights trained by self-play, and the second using weights trained against Shredder, a grandmaster strength commercial chess program. The hardware used online was a 1.8Ghz Opteron, with 256Mb of RAM being used for the transposition table. Approximately 350K nodes per second were seen when using the learned evaluation function. A small opening book was used to make the engine play a variety of different opening lines. Compared to Bodo, the learned evaluation routine was approximately 3 times slower, even though the evaluation function contained less features. This was due to a less optimised implementation, and the heavy use of floating point arithmetic. Approximately 1000 games were played online, using 3m 3s Fischer time controls, for each heuristic function. Although the heuristic function was fixed, the online rating fluctuates significantly over time. This is due to the high K factor used by the Internet Chess Club to update Elo ratings, which is tailored to human players rather than computer engines. The online rating of the heuristic learned by self-play corresponds to weak master level play. The heuristic learned from games against Shredder were roughly 150 Elo stronger, corresponding to master level performance. Like TD-Leaf, TreeStrap also benefits from a carefully chosen opponent, though the difference between self-play and ideal conditions is much less drastic. Furthermore, a total of 13.5/15 points were scored against registered members who had achieved the title of International Master. We expect that these results could be further improved by using more powerful hardware, a more sophisticated evaluation function, or a better opening book. Furthermore, we used a generic alphabeta search algorithm for learning. An interesting follow-up would be to explore the interaction between our learning algorithms and the more exotic alpha-beta search enhancements. 7 Conclusion Our main result is demonstrating, for the first time, an algorithm that learns to play master level Chess entirely through self play, starting from random weights. To provide insight into the nature of our algorithms, we focused on a single non-trivial domain. However, the ideas that we have introduced are rather general, and may have applications beyond deterministic two-player game tree search. Bootstrapping from search could, in principle, be applied to many other search algorithms. Simulation-based search algorithms, such as UCT, have outperformed traditional search algorithms in a number of domains. The TreeStrap algorithm could be applied, for example, to the heuristic function that is used to initialise nodes in a UCT search tree with prior knowledge (Gelly & Silver, 2007). Alternatively, in stochastic domains the evaluation function could be updated towards the value of an expectimax search, or towards the one-sided bounds computed by a *-minimax search (Hauk et al., 2004; Veness & Blair, 2007). This approach could be viewed as a generalisation of approximate dynamic programming, in which the value function is updated from a multi-ply Bellman backup. 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. 8 References Baxter, J., Tridgell, A., & Weaver, L. (1998). Knightcap: a chess program that learns by combining td(lambda) with game-tree search. Proc. 15th International Conf. on Machine Learning (pp. 28–36). Morgan Kaufmann, San Francisco, CA. Beal, D. F. (1990). A generalised quiescence search algorithm. Artificial Intelligence, 43, 85–98. Beal, D. F., & Smith, M. C. (1997). Learning piece values using temporal differences. Journal of the International Computer Chess Association. Buro, M. (1999). From simple features to sophisticated evaluation functions. First International Conference on Computers and Games (pp. 126–145). Campbell, M., Hoane, A., & Hsu, F. (2002). Deep Blue. Artificial Intelligence, 134, 57–83. Gelly, S., & Silver, D. (2007). Combining online and offline learning in UCT. 17th International Conference on Machine Learning (pp. 273–280). Hauk, T., Buro, M., & Schaeffer, J. (2004). Rediscovering *-minimax search. Computers and Games (pp. 35–50). Samuel, A. L. (1959). Some studies in machine learning using the game of checkers. IBM Journal of Research and Development, 3. Schaeffer, J. (1989). The history heuristic and alpha-beta search enhancements in practice. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-11, 1203–1212. Schaeffer, J., Hlynka, M., & Jussila, V. (2001). Temporal difference learning applied to a high performance game playing program. IJCAI, 529–534. Sutton, R. (1988). Learning to predict by the method of temporal differences. Machine Learning, 3, 9–44. Tesauro, G. (1994). TD-gammon, a self-teaching backgammon program, achieves master-level play. Neural Computation, 6, 215–219. Veness, J., & Blair, A. (2007). Effective use of transposition tables in stochastic game tree search. IEEE Symposium on Computational Intelligence and Games (pp. 112–116). 9
2009
65
3,816
Object discovery and identification Charles Kemp & Alan Jern Department of Psychology Carnegie Mellon University {ckemp,ajern}@cmu.edu Fei Xu Department of Psychology University of California, Berkeley fei xu@berkeley.edu Abstract Humans are typically able to infer how many objects their environment contains and to recognize when the same object is encountered twice. We present a simple statistical model that helps to explain these abilities and evaluate it in three behavioral experiments. Our first experiment suggests that humans rely on prior knowledge when deciding whether an object token has been previously encountered. Our second and third experiments suggest that humans can infer how many objects they have seen and can learn about categories and their properties even when they are uncertain about which tokens are instances of the same object. From an early age, humans and other animals [1] appear to organize the flux of experience into a series of encounters with discrete and persisting objects. Consider, for example, a young child who grows up in a home with two dogs. At a relatively early age the child will solve the problem of object discovery and will realize that her encounters with dogs correspond to views of two individuals rather than one or three. The child will also solve the problem of identification, and will be able to reliably identify an individual (e.g. Fido) each time it is encountered. This paper presents a Bayesian approach that helps to explain both object discovery and identification. Bayesian models are appealing in part because they help to explain how inferences are guided by prior knowledge. Imagine, for example, that you see some photographs taken by your friends Alice and Bob. The first shot shows Alice sitting next to a large statue and eating a sandwich, and the second is similar but features Bob rather than Alice. The statues in each photograph look identical, and probably you will conclude that the two photographs are representations of the same statue. The sandwiches in the photographs also look identical, but probably you will conclude that the photographs show different sandwiches. The prior knowledge that contributes to these inferences appears rather complex, but we will explore some much simpler cases where prior knowledge guides identification. A second advantage of Bayesian models is that they help to explain how learners cope with uncertainty. In some cases a learner may solve the problem of object discovery but should maintain uncertainty when faced with identification problems. For example, I may be quite certain that I have met eight different individuals at a dinner party, even if I am unable to distinguish between two guests who are identical twins. In other cases a learner may need to reason about several related problems even if there is no definitive solution to any one of them. Consider, for example, a young child who must simultaneously discover which objects her world contains (e.g. Mother, Father, Fido, and Rex) and organize them into categories (e.g. people and dogs). Many accounts of categorization seem to implicitly assume that the problem of identification must be solved before categorization can begin, but we will see that a probabilistic approach can address both problems simultaneously. Identification and object discovery have been discussed by researchers from several disciplines, including psychology [2, 3, 4, 5, 6], machine learning [7, 8], statistics [9], and philosophy [10]. Many machine learning approaches can handle identity uncertainty, or uncertainty about whether two tokens correspond to the same object. Some approaches such such as BLOG [8] are able in addition to handle problems where the number of objects is not specified in advance. We propose 1 that some of these approaches can help to explain human learning, and this paper uses a simple BLOG-style approach [8] to account for human inferences. There are several existing psychological models of identification, and the work of Shepard [11], Nosofsky [3] and colleagues is probably the most prominent. Models in this tradition usually focus on problems where the set of objects is specified in advance and where identity uncertainty arises as a result of perceptual noise. In contrast, we focus on problems where the number of objects must be inferred and where identity uncertainty arises from partial observability rather than noise. A separate psychological tradition focuses on problems where the number of objects is not fixed in advance. Developmental psychologists, for example, have used displays where only one object token is visible at any time to explore whether young infants can infer how many different objects have been observed in total [4]. Our work emphasizes some of the same themes as this developmental research, but we go beyond previous work in this area by presenting and evaluating a computational approach to object identification and discovery. The problem of deciding how many objects have been observed is sometimes called individuation [12] but here we treat individuation as a special case of object discovery. Note, however, that object discovery can also refer to cases where learners infer the existence of objects that have never been observed. Unobserved-object discovery has received relatively little attention in the psychological literature, but is addressed by statistical models including including species-sampling models [9] and capture-recapture models [13]. Simple statistical models of this kind will not address some of the most compelling examples of unobserved-object discovery, such as the discovery of the planet Neptune, or the ability to infer the existence of a hidden object by following another person’s gaze [14]. We will show, however, that a simple statistical approach helps to explain how humans infer the existence of objects that they have never seen. 1 A probabilistic account of object discovery and identification Object discovery and identification may depend on many kinds of observations and may be supported by many kinds of prior knowledge. This paper considers a very simple setting where these problems can be explored. Suppose that an agent is learning about a world that contains nw white balls and n −nw gray balls. Let f(oi) indicate the color of ball oi, where each ball is white (f(oi) = 1) or gray (f(oi) = 0). An agent learns about the world by observing a sequence of object tokens. Suppose that label l(j) is a unique identifier of token j—in other words, suppose that the jth token is a token of object ol(j). Suppose also that the jth token is observed to have feature value g(j). Note the difference between f and g: f is a vector that specifies the color of the n balls in the world, and g is a vector that specifies the color of the object tokens observed thus far. We define a probability distribution over token sequences by assuming that a world is sampled from a prior P(n, nw) and that tokens are sampled from this world. The full generative model is: P(n) ∝  1 n if n ≤1000 0 otherwise (1) nw | n ∼Uniform(0, n) (2) l(j) | n ∼Uniform(1, n) (3) g(j) = f(ol(j)) (4) A prior often used for inferences about a population of unknown size is the scale-invariant Jeffreys prior P(n) = 1 n [15]. We follow this standard approach here but truncate at n = 1000. Choosing some upper bound is convenient when implementing the model, and has the advantage of producing a prior that is proper (note that the Jeffreys prior is improper). Equation 2 indicates that the number of white balls nw is sampled from a discrete uniform distribution. Equation 3 indicates that each token is generated by sampling one of the n balls in the world uniformly at random, and Equation 4 indicates that the color of each token is observed without noise. The generative assumptions just described can be used to define a probabilistic approach to object discovery and identification. Suppose that the observations available to a learner consist of a fully-observed feature vector g and a partially-observed label vector lobs. Object discovery and identification can be addressed by using the posterior distribution P(l|g, lobs) to make inferences about the number of distinct objects observed and about the identity of each token. Computing the posterior distribution P(n|g, lobs) allows the learner to make inferences about the total number of objects 2 in the world. In some cases, the learner may solve the problem of unobserved-object discovery by realizing that the world contains more objects than she has observed thus far. The next sections explore the idea that the inferences made by humans correspond approximately to the inferences of this ideal learner. Since the ideal learner allows for the possible existence of objects that have not yet been observed, we refer to our model as the open world model. Although we make no claim about the psychological mechanisms that might allow humans to approximate the predictions of the ideal learner, in practice we need some method for computing the predictions of our model. Since the domains we consider are relatively small, all results in this paper were computed by enumerating and summing over the complete set of possible worlds. 2 Experiment 1: Prior knowledge and identification The introduction described a scenario (the statue and sandwiches example) where prior knowledge appears to guide identification. Our first experiment explores a very simple instance of this idea. We consider a setting where participants observe balls that are sampled with replacement from an urn. In one condition, participants sample the same ball from the urn on four consecutive occasions and are asked to predict whether the token observed on the fifth draw is the same ball that they saw on the first draw. In a second condition participants are asked exactly the same question about the fifth token but sample four different balls on the first four draws. We expect that these different patterns of data will shape the prior beliefs that participants bring to the identification problem involving the fifth token, and that participants in the first condition will be substantially more likely to identify the fifth token as a ball that they have seen before. Although we consider an abstract setting involving balls and urns the problem we explore has some real-world counterparts. Suppose, for example, that a colleague wears the same tie to four formal dinners. Based on this evidence you might be able to estimate the total number of ties that he owns, and might guess that he is less likely to wear a new tie to the next dinner than a colleague who wore different ties to the first four dinners. Method. 12 adults participated for course credit. Participants interacted with a computer interface that displayed an urn, a robotic arm and a beam of UV light. The arm randomly sampled balls from the urn, and participants were told that each ball had a unique serial number that was visible only under UV light. After some balls were sampled, the robotic arm moved them under the UV light and revealed their serial numbers before returning them to the urn. Other balls were returned directly to the urn without having their serial numbers revealed. The serial numbers were alphanumeric strings such as “QXR182”—note that these serial numbers provide no information about the total number of objects, and that our setting is therefore different from the Jeffreys tramcar problem [15]. The experiment included five within-participant conditions shown in Figure 1. The observations for each condition can be summarized by a string that indicates the number of tokens and the serial numbers of some but perhaps not all tokens. The 1 1 1 1 1 condition in Figure 1a is a case where the same ball (without loss of generality, we call it ball 1) is drawn from the urn on five consecutive occasions. The 5 1 2 3 4 condition in Figure 1b is a case where five different balls are drawn from the urn. The 1 condition in Figure 1d is a case where five draws are made, but only the serial number of the first ball is revealed. Within any of the five conditions, all of the balls had the same color (white or gray), but different colors were used across different conditions. For simplicity, all draws in Figure 1 are shown as white balls. On the second and all subsequent draws, participants were asked two questions about any token that was subsequently identified. They first indicated whether the token was likely to be the same as the ball they observed on the first draw (the ball labeled 1 in Figure 1). They then indicated whether the token was likely to be a ball that they had never seen before. Both responses were provided on a scale from 1 (very unlikely) to 7 (very likely). At the end of each condition, participants were asked to estimate the total number of balls in the urn. Twelve options were provided ranging from “exactly 1” to “exactly 12,” and a thirteenth option was labeled “more than 12.” Responses to each option were again provided on a seven point scale. Model predictions and results. The comparisons of primary interest involve the identification questions in conditions 1a and 1b. In condition 1a the open world model infers that the total number of balls is probably low, and becomes increasingly confident that each new token is the same as the 3 1 3 5 7 1 3 5 7 0 0.33 0.66 1 (1)(?) (1)(2)(?) (1)(2)(3)(?) (1)(2)(3)(4)(?) (1)(?) (1)(2)(?) (1)(2)(3)(?) (1)(2)(3)(4)(?) 0 0.33 0.66 1 (1)(?) (1)(1)(?) (1)(1)(1)(?) (1)(1)(1)(1)(?) (1)(?) (1)(1)(?) (1)(1)(1)(?) (1)(1)(1)(1)(?) Open world Human b) BALL (1) NEW 1 5 9 13 1 3 5 7 9 11 +12 1 3 5 7 0 0.33 0.66 1 0 0.33 0.66 1 0 0.33 0.66 1 a) BALL (1) NEW 0 0.33 0.66 1 Open world Human 1 3 5 7 1 3 5 7 1 3 5 7 1 5 9 13 1 3 5 7 9 11 +12 1 5 9 13 1 3 5 7 9 11 +12 1 5 9 13 1 3 5 7 9 11 +12 c) e) PY mixture d) DP mixture BALL (1) NEW ? ? 1 2 3 4 2 1 2 3 1 1 1 3 5 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? ? ? ? ? ? ? ? 1 5 9 13 1 3 5 7 9 11 +12 ? ? ? ? 1 2 3 4 2 1 2 3 1 1 ? ? # Balls # Balls # Balls # Balls # Balls = = = = NEW NEW 1 1 1 1 1 1 1 1 ? 1 ? ? 1 2 3 4 5 ? Figure 1: Model predictions and results for the five conditions in experiment 1. The left columns in (a) and (b) show inferences about the identification questions. In each plot, the first group of bars shows predictions about the probability that each new token is the same ball as the first ball drawn from the urn. The second group of bars shows the probability that each new token is a ball that has never been seen before. The right columns in (a) and (b) and the plots in (c) through (e) show inferences about the total number of balls in each urn. All human responses are shown on the 1-7 scale used for the experiment. Model predictions are shown as probabilities (identification questions) or ranks (population size questions). first object observed. In condition 1b the model infers that the number of balls is probably high, and becomes increasingly confident that each new token is probably a new ball. The rightmost charts in Figures 1a and 1b show inferences about the total number of balls and confirm that humans expect the number of balls to be low in condition 1a and high in condition 1b. Note that participants in condition 1b have solved the problem of unobserved-object discovery and inferred the existence of objects that they have never seen. The leftmost charts in 1a and 1b show responses to the identification questions, and the final bar in each group of four shows predictions about the fifth token sampled. As predicted by the model, participants in 1a become increasingly confident that each new token is the same object as the first token, but participants in 1b become increasingly confident that each new token is a new object. The increase in responses to the new ball questions in Figure 1b is replicated in conditions 2d and 2e of Experiment 2, and therefore appears to be reliable. 4 The third and fourth rows of Figures 1a and 1b show the predictions of two alternative models that are intuitively appealing but that fail to account for our results. The first is the Dirichlet Process (DP) mixture model, which was proposed by Anderson [16] as an account of human categorization. Unlike most psychological models of categorization, the DP mixture model reserves some probability mass for outcomes that have not yet been observed. The model incorporates a prior distribution over partitions—in most applications of the model these partitions organize objects into categories, but Anderson suggests that the model can also be used to organize object tokens into classes that correspond to individual objects. The DP mixture model successfully predicts that the ball 1 questions will receive higher ratings in 1a than 1b, but predicts that responses to the new ball question will be identical across these two conditions. According to this model, the probability that a new token corresponds to a new object is θ m+θ where θ is a hyperparameter and m is the number of tokens observed thus far. Note that this probability is the same regardless of the identities of the m tokens previously observed. The Pitman Yor (PY) mixture model in the fourth row is a generalization of the DP mixture model that uses a prior over partitions defined by two hyperparameters [17]. According to this model, the probability that a new token corresponds to a new object is θ+kα m+θ , where θ and α are hyperparameters and k is the number of distinct objects observed so far. The flexibility offered by a second hyperparameter allows the model to predict a difference in responses to the new ball questions across the two conditions, but the model does not account for the increasing pattern observed in condition 1b. Most settings of θ and α predict that the responses to the new ball questions will decrease in condition 1b. A non-generic setting of these hyperparameters with θ = 0 can generate the flat predictions in Figure 1, but no setting of the hyperparameters predicts the increase in the human responses. Although the PY and DP models both make predictions about the identification questions, neither model can predict the total number of balls in the urn. Both models assume that the population of balls is countably infinite, which does not seem appropriate for the tasks we consider. Figures 1c through 1d show results for three control conditions. Like condition 1a, 1c and 1d are cases where exactly one serial number is observed. Like conditions 1a and 1b, 1d and 1e are cases where exactly five tokens are observed. None of these control conditions produces results similar to conditions 1a and 1b, suggesting that methods which simply count the number of tokens or serial numbers will not account for our results. In each of the final three conditions our model predicts that the posterior distribution on the number of balls n should decay as n increases. This prediction is not consistent with our data, since most participants assigned equal ratings to all 13 options, including “exactly 12 balls” and “more than 12 balls.” The flat responses in Figures 1c through 1e appear to indicate a generic desire to express uncertainty, and suggest that our ideal learner model accounts for human responses only after several informative observations have been made. 3 Experiment 2: Object discovery and identity uncertainty Our second experiment focuses on object discovery rather than identification. We consider cases where learners make inferences about the number of objects they have seen and the total number of objects in the urn even though there is substantial uncertainty about the identities of many of the tokens observed. Our probabilistic model predicts that observations of unidentified tokens can influence inferences about the total number of objects, and our second experiment tests this prediction. Method. 12 adults participated for course credit. The same participants took part in Experiments 1 and 2, and Experiment 2 was always completed after Experiment 1. Participants interacted with the same computer interface in both conditions, and the seven conditions in Experiment 2 are shown in Figure 2. Note that each condition now includes one or more gray tokens. In 2a, for example, there are four gray tokens and none of these tokens is identified. All tokens were sampled with replacement, and the condition labels in Figure 2 summarize the complete set of tokens presented in each condition. Within each condition the tokens were presented in a pseudo-random order—in 2a, for example, the gray and white tokens were interspersed with each other. Model predictions and results. The cases of most interest are the inferences about the total number of balls in conditions 2a and 2c. In both conditions participants observe exactly four white tokens and all four tokens are revealed to be the same ball. The gray tokens in each condition are never identified, but the number of these tokens varies across the conditions. Even though the identities 5 1 5 9 13 1 3 5 7 9 11 +12 1 3 5 7 1 5 9 13 1 3 5 7 9 11 +12 1 3 5 7 1 3 5 7 1 3 5 7 1 3 5 7 0 0.33 0.66 1 [ ]x3 (1)(?) [ ]x6 (1)(1)(?) [ ]x9 (1)(1)(1)(?) [ ]x3 (1)(?) [ ]x6 (1)(1)(?) [ ]x9 (1)(1)(1)(?) 1 3 5 7 d) c) g) f) e) b) 1 5 9 13 1 3 5 7 9 11 +12 a) NEW BALL (1) NEW 1 3 5 7 BALL (1) 1 3 5 7 Open world Human Open world Human Open world Human 1 3 5 7 0 0.33 0.66 1 (1)(?) [ ]x1 (1)(2)(?) [ ]x1 (1)(2)(3)(?) (1)(?) [ ]x1 (1)(2)(?) [ ]x1 (1)(2)(3)(?) 1 5 9 13 1 3 5 7 9 11 +12 1 5 9 13 1 3 5 7 9 11 +12 0 0.33 0.66 1 [ ]x1 (1)(?) [ ]x1 (1)(2)(?) [ ]x3 (1)(2)(3)(?) [ ]x1 (1)(?) [ ]x1 (1)(2)(?) [ ]x3 (1)(2)(3)(?) 1 5 9 13 1 3 5 7 9 11 +12 1 3 5 7 1 3 5 7 0 0.33 0.66 1 [ ]x3 (1)(?) [ ]x3 (1)(?) 0 0.33 0.66 1 [ ]x2 (1)(?) [ ]x3 (1)(1)(?) [ ]x3 (1)(1)(1)(?) [ ]x2 (1)(?) [ ]x3 (1)(1)(?) [ ]x3 (1)(1)(1)(?) 1 3 5 7 NEW BALL (1) 1 5 9 13 1 3 5 7 9 11 +12 NEW BALL (1) NEW BALL (1) # Balls # Balls # Balls # Balls # Balls # Balls # Balls 1 x2 x3 x3 x2 x3 x3 1 1 1 1 1 1 1 1 1 1 ? ? x3 x3 = NEW = = NEW = = NEW = ? ? ? 1 ? ? ? 1 x3 x6 x9 x3 x9 x6 1 1 1 1 1 1 1 1 1 1 ? 3 2 ? 2 ? 1 ? 3 2 ? 2 ? 1 x1 x1 x3 x1 x1 x3 ? ? ? 1 ? ? ? = NEW = = NEW = ? 3 2 ? 2 ? 1 x1 x1 x1 1 1 ? 3 2 ? 2 ? 1 x1 x1 x1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? ? 1 ? 2 3 4 1 1 ? 1 ? 1 1 ? ? 1 ? ? 1 ? 1 2 3 4 1 1 1 1 Figure 2: Model predictions and results for the seven conditions in Experiment 2. The left columns in (a) through (e) show inferences about the identification questions, and the remaining plots show inferences about the total number of balls in each urn. of the gray tokens are never revealed, the open world model can use these observations to guide its inference about the total number of balls. In 2a, the proportions of white tokens and gray tokens are equal and there appears to be only one white ball, suggesting that the total number of balls is around two. In 2c grey tokens are now three times more common, suggesting that the total number of balls is larger than two. As predicted, the human responses in Figure 2 show that the peak of the distribution in 2a shifts to the right in 2c. Note, however, that the model does not accurately predict the precise location of the peak in 2c. Some of the remaining conditions in Figure 2 serve as controls for the comparison between 2a and 2c. Conditions 2a and 2c differ in the total number of tokens observed, but condition 2b shows that 6 this difference is not the critical factor. The number of tokens observed is the same across 2b and 2c, yet the inference in 2b is more similar to the inference in 2a than in 2c. Conditions 2a and 2c also differ in the proportion of white tokens observed, but conditions 2f and 2g show that this difference is not sufficient to explain our results. The proportion of white tokens observed is the same across conditions 2a, 2f, and 2g, yet only 2a provides strong evidence that the total number of balls is low. The human inferences for 2f and 2g show the hint of an alternating pattern consistent with the inference that the total number of balls in the urn is even. Only 2 out of 12 participants generated this pattern, however, and the majority of responses are near uniform. Finally, conditions 2d and 2e replicate our finding from Experiment 1 that the identity labels play an important role. The only difference between 2a and 2e is that the four labels are distinct in the latter case, and this single difference produces a predictable divergence in human inferences about the total number of balls. 4 Experiment 3: Categorization and identity uncertainty Experiment 2 suggested that people make robust inferences about the existence and number of unobserved objects in the presence of identity uncertainty. Our final experiment explores categorization in the presence of identity uncertainty. We consider an extreme case where participants make inferences about the variability of a category even though the tokens of that category have never been identified. Method. The experiment included two between subject conditions, and 20 adults were recruited for each condition. Participants were asked to reason about a category including eggs of a given species, where eggs in the same category might vary in size. The interface used in Experiments 1 and 2 was adapted so that the urn now contained two kinds of objects: notepads and eggs. Participants were told that each notepad had a unique color and a unique label written on the front. The UV light played no role in the experiment and was removed from the interface: notepads could be identified by visual inspection, and identifying labels for the eggs were never shown. In both conditions participants observed a sequence of 16 tokens sampled from the urn. Half of the tokens were notepads and the others were eggs, and all egg tokens were identical in size. Whenever an egg was sampled, participants were told that this egg was a Kwiba egg. At the end of the condition, participants were shown a set of 11 eggs that varied in size and asked to rate the probability that each one was a Kwiba egg. Participants then made inferences about the total number of eggs and the total number of notepads in the urn. The two conditions were intended to lead to different inferences about the total number of eggs in the urn. In the 4 egg condition, all items (notepad and eggs) were sampled with replacement. The 8 notepad tokens included two tokens of each of 4 notepads, suggesting that the total number of notepads was 4. Since the proportion of egg tokens and notepad tokens was equal, we expected participants to infer that the total number of eggs was roughly four. In the 1 egg condition, four notepads were observed in total, but the first three were sampled without replacement and never returned to the urn. The final notepad and the egg tokens were always sampled with replacement. After the first three notepads had been removed from the urn, the remaining notepad was sampled about half of the time. We therefore expected participants to infer that the urn probably contained a single notepad and a single egg by the end of the experiment, and that all of the eggs they had observed were tokens of a single object. Model. We can simultaneously address identification and categorization by combining the open world model with a Gaussian model of categorization. Suppose that the members of a given category (e.g. Kwiba eggs) vary along a single continuous dimension (e.g. size). We assume that the egg sizes are distributed according to a Gaussian with known mean and unknown variance σ2. For convenience, we assume that the mean is zero (i.e. we measure size with respect to the average) and use the standard inverse-gamma prior on the variance: p(σ2) ∝(σ2)−(α+1)e−β σ2 . Since we are interested only in qualitative predictions of the model, the precise values of the hyperparameters are not very important. To generate the results shown in Figure 3 we set α = 0.5 and β = 2. Before observing any eggs, the marginal distribution on sizes is p(x) = R p(x|σ2)p(σ2)dσ2. Suppose now that we observe m random samples from the category and that each one has size zero. If m is large then these observations provide strong evidence that the variance σ2 is small, and the posterior distribution p(x|m) will be tightly peaked around zero. If m, is small, however, then the posterior distribution will be broader. 7 Category pdf (4 eggs) a) Model differences −4 −2 0 2 4 −0.4 −0.2 0 0.2 0.4 1 3 5 7 2 4 6 8 10 12 b) Human differences Number of eggs (4 eggs) Number of eggs (1 egg) 1 3 5 7 2 4 6 8 10 12 c) −2 0 2 0 1 2 −2 0 2 0 1 2 −2 0 2 −0.1 0 0.1 Category pdf (1 egg) = − p4(x) (size) x (size) x (size) x (size) p4(x) −p1(x) p1(x) Figure 3: (a) Model predictions for Experiment 3. The first two panels show the size distributions inferred for the two conditions, and the final panel shows the difference of these distributions. The difference curve for the model rises to a peak of around 1.6 but has been truncated at 0.1. (b) Human inferences about the total number of eggs in the urn. As predicted, participants in the 4 egg condition believe that the urn contains more eggs. (c) The difference of the size distributions generated by participants in each condition. The central peak is absent but otherwise the curve is qualitatively similar to the model prediction. The categorization model described so far is entirely standard, but note that our experiment considers a case where T, the observed stream of object tokens, is not sufficient to determine m, the number of distinct objects observed. We therefore use the open world model to generate a posterior distribution over m, and compute a marginal distribution over size by integrating out both m and σ2: p(x|T) = R p(x|σ2)p(σ2|m)p(m|T)dσ2dm. Figure 3a shows predictions of this “open world + Gaussian” model for the two conditions in our experiment. Note that the difference between the curves for the two conditions has the characteristic Mexican-hat shape produced by a difference of Gaussians. Results. Inferences about the total number of eggs suggested that our manipulation succeeded. Figure 3b indicates that participants in the 4 egg condition believed that they had seen more eggs than participants in the 1 egg condition. Participants in both conditions generated a size distribution for the category of Kwiba eggs, and the difference of these distributions is shown in Figure 3c. Although the magnitude of the differences is small, the shape of the difference curve is consistent with the model predictions. The x = 0 bar is the only case that diverges from the expected Mexican hat shape, and this result is probably due to a ceiling effect—80% of participants in both conditions chose the maximum possible rating for the egg with mean size (size zero), leaving little opportunity for a difference between conditions to emerge. To support the qualitative result in Figure 3c we computed the variance of the curve generated by each individual participant and tested the hypothesis that the variances were greater in the 1 egg condition than in the 4 egg condition. A Mann-Whitney test indicated that this difference was marginally significant (p < 0.1, one-sided). 5 Conclusion Parsing the world into stable and recurring objects is arguably our most basic cognitive achievement [2, 10]. This paper described a simple model of object discovery and identification and evaluated it in three behavioral experiments. Our first experiment confirmed that people rely on prior knowledge when solving identification problems. Our second and third experiments explored problems where the identities of many object tokens were never revealed. Despite the resulting uncertainty, we found that participants in these experiments were able to track the number of objects they had seen, to infer the existence of unobserved objects, and to learn and reason about categories. Although the tasks in our experiments were all relatively simple, future work can apply our approach to more realistic settings. For example, a straightforward extension of our model can handle problems where objects vary along multiple perceptual dimensions and where observations are corrupted by perceptual noise. Discovery and identification problems may take several different forms, but probabilistic inference can help to explain how all of these problems are solved. Acknowledgments We thank Bobby Han, Faye Han and Maureen Satyshur for running the experiments. 8 References [1] E. A. Tibbetts and J. Dale. Individual recognition: it is good to be different. Trends in Ecology and Evolution, 22(10):529–237, 2007. [2] W. James. Principles of psychology. Holt, New York, 1890. [3] R. M. Nosofsky. Attention, similarity, and the identification-categorization relationship. Journal of Experimental Psychology: General, 115:39–57, 1986. [4] F. Xu and S. Carey. Infants’ metaphysics: the case of numerical identity. Cognitive Psychology, 30:111–153, 1996. [5] L. W. Barsalou, J. Huttenlocher, and K. Lamberts. Basing categorization on individuals and events. Cognitive Psychology, 36:203–272, 1998. [6] L. J. Rips, S. Blok, and G. Newman. Tracing the identity of objects. Psychological Review, 113(1):1–30, 2006. [7] A. McCallum and B. Wellner. Conditional models of identity uncertainty with application to noun coreference. In L. K. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems 17, pages 905–912. MIT Press, Cambridge, MA, 2005. [8] B. Milch, B. Marthi, S. Russell, D. Sontag, D. L. Ong, and A. Kolobov. BLOG: Probabilistic models with unknown objects. In Proceedings of the 19th International Joint Conference on Artificial Intelligence, pages 1352–1359, 2005. [9] J. Bunge and M. Fitzpatrick. Estimating the number of species: a review. Journal of the American Statistical Association, 88(421):364–373, 1993. [10] R. G. Millikan. On clear and confused ideas: an essay about substance concepts. Cambridge University Press, New York, 2000. [11] R. N. Shepard. Stimulus and response generalization: a stochastic model relating generalization to distance in psychological space. Psychometrika, 22:325–345, 1957. [12] A. M. Leslie, F. Xu, P. D. Tremoulet, and B. J. Scholl. Indexing and the object concept: developing ‘what’ and ‘where’ systems. Trends in Cognitive Science, 2(1):10–18, 1998. [13] J. D. Nichols. Capture-recapture models. Bioscience, 42(2):94–102, 1992. [14] G. Csibra and A. Volein. Infants can infer the presence of hidden objects from referential gaze information. British Journal of Developmental Psychology, 26:1–11, 2008. [15] H. Jeffreys. Theory of Probability. Oxford University Press, Oxford, 1961. [16] J. R. Anderson. The adaptive nature of human categorization. Psychological Review, 98(3): 409–429, 1991. [17] J. Pitman. Combinatorial stochastic processes, 2002. Notes for Saint Flour Summer School. 9
2009
66
3,817
Modeling Social Annotation Data with Content Relevance using a Topic Model Tomoharu Iwata Takeshi Yamada Naonori Ueda NTT Communication Science Laboratories 2-4 Hikaridai, Seika-cho, Soraku-gun, Kyoto, Japan {iwata,yamada,ueda}@cslab.kecl.ntt.co.jp Abstract We propose a probabilistic topic model for analyzing and extracting contentrelated annotations from noisy annotated discrete data such as web pages stored in social bookmarking services. In these services, since users can attach annotations freely, some annotations do not describe the semantics of the content, thus they are noisy, i.e. not content-related. The extraction of content-related annotations can be used as a preprocessing step in machine learning tasks such as text classification and image recognition, or can improve information retrieval performance. The proposed model is a generative model for content and annotations, in which the annotations are assumed to originate either from topics that generated the content or from a general distribution unrelated to the content. We demonstrate the effectiveness of the proposed method by using synthetic data and real social annotation data for text and images. 1 Introduction Recently there has been great interest in social annotations, also called collaborative tagging or folksonomy, created by users freely annotating objects such as web pages [7], photographs [9], blog posts [23], videos [26], music [19], and scientific papers [5]. Delicious [7], which is a social bookmarking service, and Flickr [9], which is an online photo sharing service, are two representative social annotation services, and they have succeeded in collecting huge numbers of annotations. Since users can attach annotations freely in social annotation services, the annotations include those that do not describe the semantics of the content, and are, therefore, not content-related [10]. For example, annotations such as ’nikon’ or ’canon’ in a social photo service often represent the name of the manufacturer of the camera with which the photographs were taken, or annotations such as ’2008’ or ’november’ indicate when they were taken. Other examples of content-unrelated annotations include those designed to remind the annotator such as ’toread’, those identifying qualities such as ’great’, and those identifying ownership. Content-unrelated annotations can often constitute noise if used for training samples in machine learning tasks, such as automatic text classification and image recognition. Although the performance of a classifier can generally be improved by increasing the number of training samples, noisy training samples have a detrimental effect on the classifier. We can improve classifier performance if we can employ huge amounts of social annotation data from which the content-unrelated annotations have been filtered out. Content-unrelated annotations may also constitute noise in information retrieval. For example, a user may wish to retrieve a photograph of a Nikon camera rather than a photograph taken by a Nikon camera. In this paper, we propose a probabilistic topic model for analyzing and extracting content-related annotations from noisy annotated data. A number of methods for automatic annotation have been proposed [1, 2, 8, 16, 17]. However, they implicitly assume that all annotations are related to content, 1 Table 1: Notation Symbol Description D number of documents W number of unique words T number of unique annotations K number of topics Nd number of words in the dth document Md number of annotations in the dth document wdn nth word in the dth document, wdn ∈{1, · · · , W} zdn topic of the nth word in the dth document, zdn ∈{1, · · · , K} tdm mth annotation in the dth document, tdm ∈{1, · · · , T} cdm topic of the mth annotation in the dth document, cdm ∈{1, · · · , K} rdm relevance to the content of the mth annotation of the dth document, rdm = 1 if relevant, rdm = 0 otherwise and to the best of our knowledge, no attempt has been made to extract content-related annotations automatically. The extraction of content-related annotations can improve performance of machine learning and information retrieval tasks. The proposed model can also be used for the automatic generation of content-related annotations. The proposed model is a generative model for content and annotations. It first generates content, and then generates the annotations. We assume that each annotation is associated with a latent variable that indicates whether it is related to the content or not, and the annotation originates either from the topics that generated the content or from a content-unrelated general distribution depending on the latent variable. The inference can be achieved based on collapsed Gibbs sampling. Intuitively speaking, this approach considers an annotation to be content-related when it is almost always attached to objects in a specific topic. As regards real social annotation data, the annotations are not explicitly labeled as content related/unrelated. The proposed model is an unsupervised model, and so can extract content-related annotations without content relevance labels. The proposed method is based on topic models. A topic model is a hierarchical probabilistic model, in which a document is modeled as a mixture of topics, and where a topic is modeled as a probability distribution over words. Topic models are successfully used for a wide variety of applications including information retrieval [3, 13], collaborative filtering [14], and visualization [15] as well as for modeling annotated data [2]. The proposed method is an extension of the correspondence latent Dirichlet allocation (CorrLDA) [2], which is a generative topic model for contents and annotations. Since Corr-LDA assumes that all annotations are related to the content, it cannot be used for separating content-related annotations from content-unrelated ones. A topic model with a background distribution [4] assumes that words are generated either from a topic-specific distribution or from a corpus-wide background distribution. Although this is a generative model for documents without annotations, the proposed model is related to the model in the sense that data may be generated from a topic-unrelated distribution depending on a latent variable. In the rest of this paper, we assume that the given data are annotated document data, in which the content of each document is represented by words appearing in the document, and each document has both content-related and content-unrelated annotations. The proposed model is applicable to a wide range of discrete data with annotations. These include annotated image data, where each image is represented with visual words [6], and annotated movie data, where each movie is represented by user ratings. 2 Proposed method Suppose that, we have a set of D documents, and each document consists of a pair of words and annotations (wd, td), where wd = {wdn}Nd n=1 is the set of words in a document that represents the content, and td = {tdm}Md m=1 is the set of assigned annotations, or tags. Our notation is summarized in Table 1. 2 α θ z N c M D λ r η t w φ ψ K+1 K β γ Figure 1: Graphical model representation of the proposed topic model with content relevance. The proposed topic model first generates the content, and then generates the annotations. The generative process for the content is the same as basic topic models, such as latent Dirichlet allocation (LDA) [3]. Each document has topic proportions θd that are sampled from a Dirichlet distribution. For each of the Nd words in the document, a topic zdn is chosen from the topic proportions, and then word wdn is generated from a topic-specific multinomial distribution φzdn. In the generative process for annotations, each annotation is assessed as to whether it is related to the content or not. In particular, each annotation is associated with a latent variable rdm with value rdm = 0 if annotation tdm is not related to the content; rdm = 1 otherwise. If the annotation is not related to the content, rdm = 0, annotation tdm is sampled from general topic-unrelated multinomial distribution ψ0. If the annotation is related to the content, rdm = 1, annotation tdm is sampled from topic-specific multinomial distribution ψcdm, where cdm is the topic for the annotation. Topic cdm is sampled uniform randomly from topics zd = {zdn}Nd n=1 that have previously generated the content. This means that topic cdm is generated from a multinomial distribution, in which P(cdm = k) = Nkd Nd , where Nkd is the number of words that are assigned to topic k in the dth document. In summary, the proposed model assumes the following generative process for a set of annotated documents {(wd, td)}D d=1, 1. Draw relevance probability λ ∼Beta(η) 2. Draw content-unrelated annotation probability ψ0 ∼Dirichlet(γ) 3. For each topic k = 1, · · · , K: (a) Draw word probability φk ∼Dirichlet(β) (b) Draw annotation probability ψk ∼Dirichlet(γ) 4. For each document d = 1, · · · , D: (a) Draw topic proportions θd ∼Dirichlet(α) (b) For each word n = 1, · · · , Nd: i. Draw topic zdn ∼Multinomial(θd) ii. Draw word wdn ∼Multinomial(φzdn) (c) For each annotation m = 1, · · · , Md: i. Draw topic cdm ∼Multinomial({ Nkd Nd }K k=1) ii. Draw relevance rdm ∼Bernoulli(λ) iii. Draw annotation tdm ∼ {Multinomial(ψ0) if rdm = 0 Multinomial(ψcdm) otherwise where α, β and γ are Dirichlet distribution parameters, and η is a beta distribution parameter. Figure 1 shows a graphical model representation of the proposed model, where shaded and unshaded nodes indicate observed and latent variables, respectively. As with Corr-LDA, the proposed model first generates the content and then generates the annotations by modeling the conditional distribution of latent topics for annotations given the topics for the content. Therefore, it achieves a comprehensive fit of the joint distribution of content and annotations and finds superior conditional distributions of annotations given content [2]. The joint distribution on words, annotations, topics for words, topics for annotations, and relevance given parameters is described as follows: P(W , T , Z, C, R|α, β, γ, η) = P(Z|α)P(W |Z, β)P(T |C, R, γ)P(R|η)P(C|Z), (1) 3 where W = {wd}D d=1, T = {td}D d=1, Z = {zd}D d=1, C = {cd}D d=1, cd = {cdm}Md m=1, R = {rd}D d=1, and rd = {rdm}Md m=1. We can integrate out multinomial distribution parameters, {θd}D d=1, {φk}K k=1 and {ψk′}K k′=0, because we use Dirichlet distributions for their priors, which are conjugate to multinomial distributions. The first term on the right hand side of (1) is calculated by P(Z|α) = ∏D d=1 ∫ P(zd|θd)P(θd|α)dθd, and we have the following equation by integrating out {θd}D d=1, P(Z|α) = ( Γ(αK) Γ(α)K )D ∏ d Q k Γ(Nkd+α) Γ(Nd+αK) , where Γ(·) is the gamma function. Similarly, the second term is given as follows, P(W |Z, β) = ( Γ(βW ) Γ(β)W )K ∏ k Q w Γ(Nkw+β) Γ(Nk+βW ) , where Nkw is the number of times word w has been assigned to topic k, and Nk = ∑ w Nkw. The third term is given as follows, P(T |C, R, γ) = ( Γ(γT ) Γ(γ)T )K+1 ∏ k′ Q t Γ(Mk′t+γ) Γ(Mk′+γT ) , where k′ ∈{0, · · · , K}, and k′ = 0 indicates irrelevant to the content. Mk′t is the number of times annotation t has been identified as content-unrelated if k′ = 0, or as content-related topic k′ if k′ ̸= 0, and Mk′ = ∑ t Mk′t. The Bernoulli parameter λ can also be integrated out because we use a beta distribution for the prior, which is conjugate to a Bernoulli distribution. The fourth term is given as follows, P(R|η) = Γ(2η) Γ(η)2 Γ(M0+η)Γ(M−M0+η) Γ(M+2η) , where M is the number of annotations, and M0 is the number of contentunrelated annotations. The fifth term is given as follows, P(C|Z) = ∏ d ∏ k ( Nkd Nd )M′ kd, where M ′ kd is the number of annotations that are assigned to topic k in the dth document. The inference of the latent topics Z given content W and annotations T can be efficiently computed using collapsed Gibbs sampling [11]. Given the current state of all but one variable, zj, where j = (d, n), the assignment of a latent topic to the nth word in the dth document is sampled from, P(zj = k|W , T , Z\j, C, R) ∝Nkd\j + α Nd\j + αK Nkwj\j + β Nk\j + βW (Nkd\j + 1 Nkd\j Nd −1 Nd )M ′ kd , where \j represents the count when excluding the nth word in the dth document. Given the current state of all but one variable, ri, where i = (d, m), the assignment of either relevant or irrelevant to the mth annotation in the dth document is estimated as follows, P(ri = 0|W , T , Z, C, R\i) ∝M0\i + η M\i + 2η M0ti\i + γ M0\i + γT , P(ri = 1|W , T , Z, C, R\i) ∝M\i −M0\i + η M\i + 2η Mciti\i + γ Mci\i + γT . (2) The assignment of a topic to a content-unrelated annotation is estimated as follows, P(ci = k|ri = 0, W , T , Z, C\i, R\i) ∝Nkd Nd , (3) and the assignment of a topic to a content-related annotation is estimated as follows, P(ci = k|ri = 1, W , T , Z, C\i, R\i) ∝Mkti\i + γ Mk\i + γT Nkd Nd . (4) The parameters α, β, γ, and η can be estimated by maximizing the joint distribution (1) by the fixed-point iteration method described in [21]. 3 Experiments 3.1 Synthetic content-unrelated annotations We evaluated the proposed method quantitatively by using labeled text data from the 20 Newsgroups corpus [18] and adding synthetic content-unrelated annotations. The corpus contains about 20,000 articles categorized into 20 discussion groups. We considered these 20 categories as content-related annotations, and we also randomly attached dummy categories to training samples as contentunrelated annotations. We created two types of training data, 20News1 and 20News2, where the 4 former was used for evaluating the proposed method when analyzing data with different numbers of content-unrelated annotations per document, and the latter was used with different numbers of unique content-unrelated annotations. Specifically, in the 20News1 data, the unique number of content-unrelated annotations was set at ten, and the number of content-unrelated annotations per document was set at {1, · · · , 10}. In the 20News2 data, the unique number of content-unrelated annotations was set at {1, · · · , 10}, and the number of content-unrelated annotations per document was set at one. We omitted stop-words and words that occurred only once. The vocabulary size was 52,647. We sampled 100 documents from each of the 20 categories, for a total of 2,000 documents. We used 10 % of the samples as test data. We compared the proposed method with MaxEnt and Corr-LDA. MaxEnt represents a maximum entropy model [22] that estimates the probability distribution that maximizes entropy under the constraints imposed by the given data. MaxEnt is a discriminative classifier and achieves high performance as regards text classification. In MaxEnt, the hyper-parameter that maximizes the performance was chosen from {10−3, 10−2, 10−1, 1}, and the input word count vector was normalized so that the sum of the elements was one. Corr-LDA [2] is a topic model for words and annotations that does not take the relevance to content into consideration. For the proposed method and Corr-LDA, we set the number of latent topics, K, to 20, and estimated latent topics and parameters by using collapsed Gibbs sampling and the fixed-point iteration method, respectively. We evaluated the predictive performance of each method using the perplexity of held-out contentrelated annotations given the content. A lower perplexity represents higher predictive performance. In the proposed method, we calculated the probability of content-related annotation t in the dth document given the training samples as follows, P(t|d, D) ≈∑ k ˆθdk ˆψkt, where ˆθdk = Nkd Nd is a point estimate of the topic proportions for annotations, and ˆψkt = Mkt+γ Mk+γT is a point estimate of the annotation multinomial distribution. Note that no content-unrelated annotations were attached to the test samples. The average perplexities and standard deviations over ten experiments on the 20News1 and 20News2 data are shown in Figure 2 (a). In all cases, when content-unrelated annotations were included, the proposed method achieved the lowest perplexity, indicating that it can appropriately predict content-related annotations. Although the perplexity achieved by MaxEnt was slightly lower than that of the proposed method without content-unrelated annotations, the performance of MaxEnt deteriorated greatly when even one content-unrelated annotation was attached. Since MaxEnt is a supervised classifier, it considers all attached annotations to be content-related even if they are not. Therefore, its perplexity is significantly high when there are fewer content-related annotations per document than unrelated annotations as with the 20News1 data. In contrast, since the proposed method considers the relevance to the content for each annotation, it always offered low perplexity even if the number of content-unrelated annotations was increased. The perplexity achieved by Corr-LDA was high because it does not consider the relevance to the content as in MaxEnt. We evaluated the performance in terms of extracting content-related annotations. We considered extraction as a binary classification problem, in which each annotation is classified as either contentrelated or content-unrelated. As the evaluation measurement, we used F-measure, which is the harmonic mean of precision and recall. We compared the proposed method to a baseline method in which the annotations are considered to be content-related if any of the words in the annotations appear in the document. In particular, when the category name is ’comp.graphics’, if ’computer’ or ’graphics’ appears in the document, it is considered to be content-related. We assume that the baseline method knows that content-unrelated annotations do not appear in any document. Therefore, the precision of the baseline method is always one, because the number of false positive samples is zero. Note that this baseline method does not support image data, because words in the annotations never appear in the content. F-measures for the 20News1 and 20News2 data are shown in Figure 2 (b). A higher F-measure represents higher classification performance. The proposed method achieved high F-measures with a wide range of ratios of content-unrelated annotations. All of the F-measures achieved by the proposed method exceeded 0.89, and the F-measure without unrelated annotations was one. This result implies that it can flexibly handle cases with different ratios of content-unrelated annotations. The F-measures achieved by the baseline method were low because annotations might be related to the content even if the annotations did not appear in the document. On the other hand, the proposed method considers that annotations are related to the content when the topic, or latent semantics, of the content and the topic of the annotations are similar even if the annotations did not appear in the document. 5 20News1 5 10 15 20 25 30 35 40 45 50 0 2 4 6 8 10 perplexity number of content-unrelated annotations per document Proposed Corr-LDA MaxEnt 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 F-measure number of content-unrelated annotations per document Proposed Baseline 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 lambda number of content-unrelated annotations per document Estimated True 20News2 6 8 10 12 14 16 18 0 2 4 6 8 10 perplexity number of unique content-unrelated annotations Proposed Corr-LDA MaxEnt 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 F-measure number of unique content-unrelated annotations Proposed Baseline 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 lambda number of unique content-unrelated annotations Estimated True (a) Perplexity (b) F-measure (c) ˆλ Figure 2: (a) Perplexities of the held-out content-related annotations, (b) F-measures of content relevance, and (c) Estimated content-related annotation ratios in 20News data. Figure 2 (c) shows the content-related annotation ratios as estimated by the following equation, ˆλ = M−M0+η M+2η , with the proposed method. The estimated ratios are about the same as the true ratios. 3.2 Social annotations We analyzed the following three sets of real social annotation data taken from two social bookmarking services and a photo sharing service, namely Hatena, Delicious, and Flickr. From the Hatena data, we used web pages and their annotations in Hatena::Bookmark [12], which is a social bookmarking service in Japan, that were collected using a similar method to that used in [25, 27]. Specifically, first, we obtained a list of URLs of popular bookmarks for October 2008. We then obtained a list of users who had bookmarked the URLs in the list. Next, we obtained a new list of URLs that had been bookmarked by the users. By iterating the above process, we collected a set of web pages and their annotations. We omitted stop-words and words and annotations that occurred in fewer than ten documents. We omitted documents with fewer than ten unique words and also omitted those without annotations. The numbers of documents, unique words, and unique annotations were 39,132, 8,885, and 43,667, respectively. From the Delicious data, we used web pages and their annotations [7] that were collected using the same method used for the Hatena data. The numbers of documents, unique words, and unique annotations were 65,528, 30,274, and 21,454, respectively. From the Flickr data, we used photographs and their annotations Flickr [9] that were collected in November 2008 using the same method used for the Hatena data. We transformed photo images into visual words by using scale-invariant feature transformation (SIFT) [20] and k-means as described in [6]. We omitted annotations that were attached to fewer than ten images. The numbers of images, unique visual words, and unique annotations were 12,711, 200, and 2,197, respectively. For the experiments, we used 5,000 documents that were randomly sampled from each data set. Figure 3 (a)(b)(c) shows the average perplexities over ten experiments and their standard deviation for held-out annotations in the three real social annotation data sets with different numbers of topics. Figure 3 (d) shows the result with the Patent data as an example of data without content unrelated annotations. The Patent data consist of patents published in Japan from January to March in 2004, to which International Patent Classification (IPC) codes were attached by experts according to their content. The numbers of documents, unique words, and unique annotations (IPC codes) were 9,557, 6 1000 1500 2000 2500 3000 3500 4000 0 20 40 60 80 100 perplexity number of topics Proposed CorrLDA 2000 3000 4000 5000 6000 7000 8000 9000 0 20 40 60 80 100 perplexity number of topics Proposed CorrLDA (a) Hatena (b) Delicious 800 1000 1200 1400 1600 1800 2000 2200 0 20 40 60 80 100 perplexity number of topics Proposed CorrLDA 600 800 1000 1200 1400 1600 1800 2000 0 20 40 60 80 100 perplexity number of topics Proposed CorrLDA (c) Flickr (d) Patent Figure 3: Perplexities of held-out annotations with different numbers of topics in social annotation data (a)(b)(c), and in data without content unrelated annotations (d). canada banking toread London river london history reference imported England blog ruby rails cell person misc Ruby plugin cpu ajax javascript exif php future distribution internet prediction Internet computer computers no_tag bandwidth film Art good mindfuck movies list blog ricette cucina cooking italy search recipes italian food cook news reference searchengine list italiano links ruby git diff useful triage imported BookmarksBar blog SSD toread ssd c# interview programming C# .net todo language tips microsoft google gmail googlecalendar Web-2.0 Gmail via:mento.info Figure 4: Examples of content-related annotations in the Delicious data extracted by the proposed method. Each row shows annotations attached to a document; content-unrelated annotations are shaded. 104,621, and 6,117, respectively. With the Patent data, the perplexities of the proposed method and Corr-LDA were almost the same. On the other hand, with the real social annotation data, the proposed method achieved much lower perplexities than Corr-LDA. This result implies that it is important to consider relevance to the content when analyzing noisy social annotation data. The perplexity of Corr-LDA with social annotation data gets worse as the number of topics increases because Corr-LDA overfits noisy content-unrelated annotations. The upper half of each table in Table 2 shows probable content-unrelated annotations in the leftmost column, and probable annotations for some topics, which were estimated with the proposed method using 50 topics. The lower half in (a) and (b) shows probable words in the content for each topic. With the Hatena data, we translated Japanese words into English, and we omitted words that had the same translated meaning in a topic. For content-unrelated annotations, words that seemed to be irrelevant to the content were extracted, such as ’toread’, ’later’, ’*’, ’?’, ’imported’, ’2008’, ’nikon’, and ’cannon’. Each topic has characteristic annotations and words, for example, Topic1 in the Hatena data is about programming, Topic2 is about games, and Topic3 is about economics. Figure 4 shows some examples of the extraction of content-related annotations. 7 Table 2: The ten most probable content-unrelated annotations (leftmost column), and the ten most probable annotations for some topics (other columns), estimated with the proposed method using 50 topics. Each column represents one topic. The lower half in (a) and (b) shows probable words in the content. (a) Hatena unrelated Topic1 Topic2 Topic3 Topic4 Topic5 Topic6 Topic7 Topic8 Topic9 toread programming game economics science food linux politics pc medical web development animation finance research cooking tips international apple health later dev movie society biology gourmet windows oversea iphone lie great webdev Nintendo business study recipe security society hardware government document php movie economy psychology cook server history gadget agriculture troll java event reading mathematics life network china mac food * software xbox360 investment pseudoscience fooditem unix world cupidity mentalhealth ? ruby DS japan knowledge foods mysql international technology mental summary opensource PS3 money education alcohol mail usa ipod environment memo softwaredev animation company math foodie Apache news electronics science development game year science eat in japan yen rice web animation article researcher use setting country product banana series movie finance answer omission file usa digital medical hp story economics spirit water server china pc diet technology work investment question decision case politics support hospital management create company human broil mail aso in poison source PG day ehara face address mr note eat usage mr management proof input connection korea price incident project interesting information mind miss access human equipment korea system world nikkei brain food security people model jelly (b) Delicious reference money video opensource food windows art shopping iphone education web finance music software recipes linux photo shop mobile learning imported economics videos programming recipe sysadmin photography Shopping hardware books design business fun development cooking Windows photos home games book internet economy entertainment linux Food security Photography wishlist iPhone language online Finance funny tools Recipes computer Art buy apple library cool financial movies rails baking microsoft inspiration store tech school toread investing media ruby health network music fashion gaming teaching tools bailout Video webdev vegetarian Linux foto gifts mac Education blog finances film rubyonrails diy ubuntu fotografia house game research money music project recipe windows art buy iphone book financial video code food system photography online apple legal credit link server recipes microsoft photos price ipod theory market tv ruby make linux camera cheap mobile books economic movie rails wine software vol product game law october itunes source made file digital order games university economy film file add server images free pc students banks amazon version love user 2008 products phone learning government play files eat files photo rating mac education bank interview development good ubuntu tracks card touch language (c) Flickr 2008 dance sea autumn rock beach family island nikon bar sunset trees house travel portrait asia canon dc sky tree party vacation cute landscape white digital clouds mountain park camping baby rock yellow concert mountains fall inn landscape boy blue red bands ocean garden coach texas kids tour photo music panorama bortescristian creature lake brown plant italy washingtondc south geotagged halloween cameraphone closeup tourguidesoma california dancing ireland mud mallory md 08 koh color work oregon natura night sun galveston samui 4 Conclusion We have proposed a topic model for extracting content-related annotations from noisy annotated data. We have confirmed experimentally that the proposed method can extract content-related annotations appropriately, and can be used for analyzing social annotation data. In future work, we will determine the number of topics automatically by extending the proposed model to a nonparametric Bayesian model such as the Dirichlet process mixture model [24]. Since the proposed method is, theoretically, applicable to various kinds of annotation data, we will confirm this in additional experiments. 8 References [1] K. Barnard, P. Duygulu, D. Forsyth, N. de Freitas, D. M. Blei, and M. I. Jordan. Matching words and pictures. Journal of Machine Learning Research, 3:1107–1135, 2003. [2] D. M. Blei and M. I. Jordan. Modeling annotated data. In SIGIR ’03: Proceedings of the 26th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 127–134, 2003. [3] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [4] C. Chemudugunta, P. Smyth, and M. Steyvers. Modeling general and specific aspects of documents with a probabilistic topic model. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 241–248. MIT Press, 2007. [5] CiteULike. http://www.citeulike.org. [6] G. Csurka, C. Dance, J. Willamowski, L. Fan, and C. Bray. Visual categorization with bags of keypoints. In ECCV International Workshop on Statistical Learning in Computer Vision, 2004. [7] Delicious. http://delicious.com. [8] S. Feng, R. Manmatha, and V. Lavrenko. Multiple Bernoulli relevance models for image and video annotation. In CVPR ’04: Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2, pages 1002–1009, 2004. [9] Flickr. http://flickr.com. [10] S. Golder and B. A. Huberman. Usage patterns of collaborative tagging systems. Journal of Information Science, 32(2):198–208, 2006. [11] T. L. Griffiths and M. Steyvers. Finding scientific topics. Proceedings of the National Academy of Sciences, 101 Suppl 1:5228–5235, 2004. [12] Hatena::Bookmark. http://b.hatena.ne.jp. [13] T. Hofmann. Probabilistic latent semantic analysis. In UAI ’99: Proceedings of 15th Conference on Uncertainty in Artificial Intelligence, pages 289–296, 1999. [14] T. Hofmann. Collaborative filtering via Gaussian probabilistic latent semantic analysis. In Proceedings of the 26th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 259–266. ACM Press, 2003. [15] T. Iwata, T. Yamada, and N. Ueda. Probabilistic latent semantic visualization: topic model for visualizing documents. In KDD ’08: Proceeding of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 363–371. ACM, 2008. [16] J. Jeon, V. Lavrenko, and R. Manmatha. Automatic image annotation and retrieval using cross-media relevance models. In SIGIR ’03: Proceedings of the 26th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 119–126. ACM, 2003. [17] J. Jeon and R. Manmatha. Using maximum entropy for automatic image annotation. In CIVR ’04: Proceedings of the 3rd International Conference on Image and Video Retrieval, pages 24–32, 2004. [18] K. Lang. NewsWeeder: learning to filter netnews. In ICML ’95: Proceedings of the 12th International Conference on Machine Learning, pages 331–339, 1995. [19] Last.fm. http://www.last.fm. [20] D. G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. [21] T. Minka. Estimating a Dirichlet distribution. Technical report, M.I.T., 2000. [22] K. Nigam, J. Lafferty, and A. McCallum. Using maximum entropy for text classification. In Proceedings of IJCAI-99 Workshop on Machine Learning for Information Filtering, pages 61–67, 1999. [23] Technorati. http://technorati.com. [24] 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. [25] X. Wu, L. Zhang, and Y. Yu. Exploring social annotations for the semantic web. In WWW ’06: Proceedings of the 15th International Conference on World Wide Web, pages 417–426. ACM, 2006. [26] YouTube. http://www.youtube.com. [27] D. Zhou, J. Bian, S. Zheng, H. Zha, and C. L. Giles. Exploring social annotations for information retrieval. In WWW ’08: Proceeding of the 17th International Conference on World Wide Web, pages 715–724. ACM, 2008. 9
2009
67
3,818
Convergent Temporal-Difference Learning with Arbitrary Smooth Function Approximation Hamid R. Maei University of Alberta Edmonton, AB, Canada Csaba Szepesv´ari∗ University of Alberta Edmonton, AB, Canada Shalabh Bhatnagar Indian Institute of Science Bangalore, India Doina Precup McGill University Montreal, QC, Canada David Silver University of Alberta, Edmonton, AB, Canada Richard S. Sutton University of Alberta, Edmonton, AB, Canada Abstract We introduce the first temporal-difference learning algorithms that converge with smooth value function approximators, such as neural networks. Conventional temporal-difference (TD) methods, such as TD(λ), Q-learning and Sarsa have been used successfully with function approximation in many applications. However, it is well known that off-policy sampling, as well as nonlinear function approximation, can cause these algorithms to become unstable (i.e., the parameters of the approximator may diverge). Sutton et al. (2009a, 2009b) solved the problem of off-policy learning with linear TD algorithms by introducing a new objective function, related to the Bellman error, and algorithms that perform stochastic gradient-descent on this function. These methods can be viewed as natural generalizations to previous TD methods, as they converge to the same limit points when used with linear function approximation methods. We generalize this work to nonlinear function approximation. We present a Bellman error objective function and two gradient-descent TD algorithms that optimize it. We prove the asymptotic almost-sure convergence of both algorithms, for any finite Markov decision process and any smooth value function approximator, to a locally optimal solution. The algorithms are incremental and the computational complexity per time step scales linearly with the number of parameters of the approximator. Empirical results obtained in the game of Go demonstrate the algorithms’ effectiveness. 1 Introduction We consider the problem of estimating the value function of a given stationary policy of a Markov Decision Process (MDP). This problem arises as a subroutine of generalized policy iteration and is generally thought to be an important step in developing algorithms that can learn good control policies in reinforcement learning (e.g., see Sutton & Barto, 1998). One widely used technique for value-function estimation is the TD(λ) algorithm (Sutton, 1988). A key property of the TD(λ) algorithm is that it can be combined with function approximators in order to generalize the observed data to unseen states. This generalization ability is crucial when the state space of the MDP is large or infinite (e.g., TD-Gammon, Tesauro, 1995; elevator dispatching, Crites & Barto, 1997; job-shop scheduling, Zhang & Dietterich, 1997). TD(λ) is known to converge when used with linear function approximators, if states are sampled according to the policy being evaluated – a scenario called onpolicy learning (Tsitsiklis & Van Roy, 1997). However, the absence of either of these requirements can cause the parameters of the function approximator to diverge when trained with TD methods (e.g., Baird, 1995; Tsitsiklis & Van Roy, 1997; Boyan & Moore, 1995). The question of whether it is possible to create TD-style algorithms that are guaranteed to converge when used with nonlinear function approximation has remained open until now. Residual gradient algorithms (Baird, 1995) ∗On leave from MTA SZTAKI, Hungary. 1 attempt to solve this problem by performing gradient descent on the Bellman error. However, unlike TD, these algorithms usually require two independent samples from each state. Moreover, even if two samples are provided, the solution to which they converge may not be desirable (Sutton et al., 2009b provides an example). In this paper we define the first TD algorithms that are stable when used with smooth nonlinear function approximators (such as neural networks). Our starting point is the family of TD-style algorithms introduced recently by Sutton et al. (2009a, 2009b). Their goal was to address the instability of TD learning with linear function approximation, when the policy whose value function is sought differs from the policy used to generate the samples (a scenario called off-policy learning). These algorithms were designed to approximately follow the gradient of an objective function whose unique optimum is the fixed point of the original TD(0) algorithm. Here, we extend the ideas underlying this family of algorithms to design TD-like algorithms which converge, under mild assumptions, almost surely, with smooth nonlinear approximators. Under some technical conditions, the limit points of the new algorithms correspond to the limit points of the original (not necessarily convergent) nonlinear TD algorithm. The algorithms are incremental, and the cost of each update is linear in the number of parameters of the function approximator, as in the original TD algorithm. Our development relies on three main ideas. First, we extend the objective function of Sutton et al. (2009b), in a natural way, to the nonlinear function approximation case. Second, we use the weight-duplication trick of Sutton et al. (2009a) to derive a stochastic gradient algorithm. Third, in order to implement the parameter update efficiently, we exploit a nice idea due to Pearlmutter (1994), allowing one to compute exactly the product of a vector and a Hessian matrix in linear time. To overcome potential instability issues, we introduce a projection step in the weight update. The almost sure convergence of the algorithm then follows from standard two-time-scale stochastic approximation arguments. In the rest of the paper, we first introduce the setting and our notation (Section 2), review previous relevant work (Section 3), introduce the algorithms (Section 4), analyze them (Section 5) and illustrate the algorithms’ performance (Section 6). 2 Notation and Background We consider policy evaluation in finite state and action Markov Decision Processes (MDPs).1 An MDP is described by a 5-tuple (S, A, P, r, γ), where S is the finite state space, A is the finite action space, P = (P(s￿|s, a))s,s￿∈S,a∈A are the transition probabilities (P(s￿|s, a) ≥0, ￿ s￿∈S P(s￿|s, a) = 1, for all s ∈S, a ∈A), r = (r(s, a, s￿))s,s￿∈S,a∈A are the real-valued immediate rewards and γ ∈(0, 1) is the discount factor. The policy to be evaluated is a mapping π : S × A →[0, 1]. The value function of π, V π : S →R, maps each state s to a number representing the infinite-horizon expected discounted return obtained if policy π is followed from state s. Formally, let s0 = s and for t ≥0 let at ∼π(st, ·), st+1 ∼P(·|st, at) and rt+1 = r(st, at, st+1). Then V π(s) = E[￿∞ t=0 γtrt+1]. Let Rπ : S →R, with Rπ(s) = ￿ s￿∈S ￿ a∈A π(s, a)P(s￿|s, a)r(s, a, s￿), and let P π : S × S →[0, 1] be defined as P π(s, s￿) = ￿ a∈A π(s, a)P(s￿|s, a). Assuming a canonical ordering on the elements of S, we can treat V π and Rπ as vectors in R|S|, and P π as a matrix in R|S|×|S|. It is well-known that V π satisfies the so-called Bellman equation: V π = Rπ + γP πV π. Defining the operator T π : R|S| →R|S| as T πV = Rπ+γP πV, the Bellman equation can be written compactly as V π = T πV π. To simplify the notation, from now on we will drop the superscript π everywhere, since the policy to be evaluated will be kept fixed. Assume that the policy to be evaluated is followed and it gives rise to the trajectory (s0, a0, r1, s1, a1, r2, s2, . . .). The problem is to estimate V , given a finite prefix of this trajectory. More generally, we may assume that we are given an infinite sequence of 3-tuples, (sk, rk, s￿ k), that satisfies the following: Assumption A1 (sk)k≥0 is an S-valued stationary Markov process, sk ∼d(·), rk = R(sk) and s￿ k ∼P(sk, ·). 1Under appropriate technical conditions, our results, can be generalized to MDPs with infinite state spaces, but we do not address this here. 2 We call (sk, rk, s￿ k) the kth transition. Since we assume stationarity, we will sometimes drop the index k and use (s, r, s￿) to denote a random transition. Here d(·) denotes the probability distribution over initial states for a transition; let D ∈R|S|×|S| be the corresponding diagonal matrix. The problem is still to estimate V given a finite number of transitions. When the state space is large (or infinite) a function approximation method can be used to facilitate the generalization of observed transitions to unvisited or rarely visited states. In this paper we focus on methods that are smoothly parameterized with a finite-dimensional parameter vector θ ∈Rn. We denote by Vθ(s) the value of state s ∈S returned by the function approximator with parameters θ. The goal of policy evaluation becomes to find θ such that Vθ ≈V . 3 TD Algorithms with function approximation The classical TD(0) algorithm with function approximation (Sutton, 1988; Sutton & Barto, 1998) starts with an arbitrary value of the parameters, θ0. Upon observing the kth transition, it computes the scalar-valued temporal-difference error, δk = rk + γVθk(s￿ k) −Vθk(sk), which is then used to update the parameter vector as follows: θk+1 ←θk + αk δk∇Vθk(sk). (1) Here αk is a deterministic positive step-size parameter, which is typically small, or (for the purpose of convergence analysis) is assumed to satisfy the Robbins-Monro conditions: ￿∞ k=0 αk = ∞, ￿∞ k=0 α2 k < ∞. We denote by ∇Vθ(s) ∈Rn the gradient of V w.r.t. θ at s. When the TD algorithm converges, it must converge to a parameter value where, in expectation, the parameters do not change: E[δ ∇Vθ(s)] = 0, (2) where s, δ are random and share the common distribution underlying (sk, δk); in particular, (s, r, s￿) are drawn as in Assumption A1 and δ = r + γVθ(s￿) −Vθ(s). However, it is well known that TD(0) may not converge; the stability of the algorithm is affected both by the actual function approximator Vθ and by the way in which transitions are sampled. Sutton et al (2009a, 2009b) tackled this problem in the case of linear function approximation, in which Vθ(s) = θ￿φ(s), where φ : S →Rn, but where transitions may be sampled in an off-policy manner. From now on we use the shorthand notation φ = φ(s), φ￿= φ(s￿). Sutton et al. (2009b) rely on an error function, called mean-square projected Bellman error (MSPBE)2, which has the same unique optimum as Equation (2). This function, which we denote J, projects the Bellman error measure, TVθ −Vθ onto the linear space M = {Vθ | θ ∈Rn} with respect to the metric ￿· ￿D. Hence, ΠV = arg min V ￿∈M ￿V ￿−V ￿2 D. More precisely: J(θ) =￿Π(TVθ −Vθ) ￿2 D=￿Π TVθ −Vθ ￿2 D= E[δφ]￿E[φφ￿]−1E[δφ], (3) where ￿V ￿D is the weighted quadratic norm defined by ￿V ￿2 D = ￿ s∈S d(s)V (s)2, and the scalar TD(0) error for a given transition (s, r, s￿) is δ = r + γθ￿φ￿−θ￿φ. The negative gradient of the MSPBE objective function is: −1 2∇J(θ) = E ￿ (φ −γφ￿)φ￿w ￿ = E[δφ] −γE ￿ φ￿φ￿￿ w, (4) where w = E[φφ￿]−1E[δφ]. Note that δ depends on θ, hence w depends on θ. In order to develop an efficient (O(n)) stochastic gradient algorithm, Sutton et al. (2009a) use a weight-duplication trick. They introduce a new set of weights, wk, whose purpose is to estimate w for a fixed value of the θ parameter. These weights are updated on a “fast” timescale, as follows: wk+1 = wk + βk(δk −φ￿ k wk)φk. (5) The parameter vector θk is updated on a “slower” timescale. Two update rules can be obtained, based on two slightly different calculations: θk+1 = θk + αk(φk −γφ￿ k)(φ￿ k wk) (an algorithm called GTD2), or (6) θk+1 = θk + αkδkφk −αkγφ￿ k(φ￿ k wk) (an algorithm called TDC). (7) 2This error function was also described in (Antos et al., 2008), although the algorithmic issue of how to minimize it is not pursued there. Algorithmic issues in a batch setting are considered by Farahmand et al. (2009) who also study regularization. 3 4 Nonlinear Temporal Difference Learning Our goal is to generalize this approach to the case in which Vθ is a smooth, nonlinear function approximator. The first step is to find a good objective function on which to do gradient descent. In the linear case, MSPBE was chosen as a projection of the Bellman error on a natural hyperplane–the subspace to which Vθ is restricted. However, in the nonlinear case, the value function is no longer restricted to a plane, but can move on a nonlinear surface. More precisely, assuming that Vθ is a differentiable function of θ, M = {Vθ ∈R|S| | θ ∈Rn} becomes a differentiable submanifold of R|S|. Projecting onto a nonlinear manifold is not computationally feasible; to get around this problem, we will assume that the parameter vector θ changes very little in one step (given that learning rates are usually small); in this case, the surface is locally close to linear, and we can project onto the tangent plane at the given point. We now detail this approach and show that this is indeed a good objective function. The tangent plane PMθ of M at θ is the hyperplane of R|S| that (i) passes through Vθ and (ii) is orthogonal to the normal of M at θ. The tangent space TMθ is the translation of PMθ to the origin. Note that TMθ = {Φθa | a ∈Rn}, where Φθ ∈R|S|×n is defined by (Φθ)s,i = ∂ ∂θi Vθ(s). Let Πθ be the projection that projects vectors of (R|S|, ￿· ￿D) to TMθ. If Φ￿ θ DΦθ is non-singular then Πθ can be written as: Πθ = Φθ(Φ￿ θ DΦθ)−1Φ￿ θ D. (8) The objective function that we will optimize is: J(θ) = ￿Πθ(TVθ −Vθ) ￿2 D . (9) This is a natural generalization of the objective function defined by (3), as the plane on which we project is parallel to the tangent plane at θ. More precisely, let Υθ be the projection to PMθ and let Πθ be the projection to TMθ. Because the two hyperplanes are parallel, for any V ∈R|S|, ΥθV −Vθ = Πθ(V −Vθ). In other words, projecting onto the tangent space gives exactly the same distance as projecting onto the tangent plane, while being mathematically more convenient. Fig. 1 illustrates visually this objective function. Vθ ΥθTVθ T TVθ ￿ J(θ) Υθ Tangent plane Υθ∗TVθ∗= Vθ∗ Vθ∗ TVθ∗ TD(0) solution Figure 1: The MSPBE objective for nonlinear function approximation at two points in the value function space. The figure shows a point, Vθ, at which, J(θ), is not 0 and a point, Vθ∗, where J(θ∗) = 0, thus Υθ∗TVθ∗= Vθ∗, so this is a TD(0) solution. We now show that J(θ) can be re-written in the same way as done in (Sutton et al., 2009b). Lemma 1. Assume Vθ(s0) is continuously differentiable as a function of θ, for any s0 ∈S s.t. d(s0) > 0. Let (s, δ) be jointly distributed random variables as in Section 3 and assume that E[∇Vθ(s)∇Vθ(s)￿] is nonsingular. Then J(θ) = E[ δ ∇Vθ(s) ]￿E[ ∇Vθ(s)∇Vθ(s)￿]−1 E[ δ ∇Vθ(s) ]. (10) Proof. The identity is obtained similarly to Sutton et. al (2009b), except that here Πθ is expressed by (8). Details are omitted for brevity. Note that the assumption that E[ ∇Vθ(s)∇Vθ(s)￿]−1 is non-singular is akin to the assumption that the feature vectors are independent in the linear function approximation case. We make this assumption here for convenience; it can be lifted, but the proofs become more involved. Corollary 1. Under the conditions of Lemma 1, J(θ) = 0, if and only if Vθ satisfies (2). 4 This is an important corollary, because it shows that the global optima of the proposed objective function will not modify the set of solutions that the usual TD(0) algorithm would find (if it would indeed converge). We now proceed to compute the gradient of this objective. Theorem 1. Assume that (i) Vθ(s0) is twice continuously differentiable in θ for any s0 ∈ S s.t. d(s0) > 0 and (ii) W(·) defined by W(ˆθ) = E[∇Vˆθ ∇V ￿ ˆθ ] is non-singular in a small neighborhood of θ. Let (s, δ) be jointly distributed random variables as in Section 3. Let φ ≡∇Vθ(s), φ￿≡∇Vθ(s￿) and h(θ, u) = −E[ (δ −φ￿u) ∇2Vθ(s)u ], (11) where u ∈Rn. Then −1 2∇J(θ) = −E[(γφ￿−φ)φ￿w] + h(θ, w) = −E[δφ] −γE[φ￿φ￿w] + h(θ, w), (12) where w = E[φ φ￿]−1 E[δφ]. The main difference between Equation (12) and Equation (4), which shows the gradient for the linear case, is the appearance of the term h(θ, w), which involves second-order derivatives of Vθ (which are zero when Vθ is linear in θ). Proof. The conditions of Lemma 1 are satisfied, so (10) holds. Denote ∂i = ∂ ∂θi . From its definition and the assumptions, W(u) is a symmetric, positive definite matrix, so d du(W −1)|u=θ = −W −1(θ) ( d duW|u=θ) W −1(θ), where we use the assumption that d duW exists at θ and W −1 exists in a small neighborhood of θ. From this identity, we have: −1 2 [∇J(θ)]i = −(∂iE[δφ])￿E[φφ￿]−1E[δφ] −1 2 E[δφ]￿∂i ￿ E[φφ￿]−1￿ E[δφ] = −(∂iE[δφ])￿E[φφ￿]−1E[δφ] + 1 2 E[δφ]￿E[φφ￿]−1(∂iE[φφ￿]) E[φφ￿]−1 E[δφ] = −E[∂i(δφ)]￿(E[φφ￿]−1E[δφ]) + 1 2 (E[φφ￿]−1E[δφ])￿E[∂i(φφ￿)] (E[φφ￿]−1E[δφ]). The interchange between the gradient and expectation is possible here because of assumptions (i) and (ii) and the fact that S is finite. Now consider the identity 1 2x￿∂i(φφ￿)x = φ￿x (∂iφ￿)x, which holds for any vector x ∈Rn. Hence, using the definition of w, −1 2 [∇J(θ)]i = −E[∂i(δφ)]￿w + 1 2w￿E[∂i(φφ￿)]w = −E[(∂iδ)φ￿w] −E[δ(∂iφ￿)w] + E[φ￿w(∂iφ￿)w]. Using ∇δ = γφ￿−φ and ∇φ￿= ∇2Vθ(s), we get −1 2∇J(θ) = −E[(γφ￿−φ)φ￿w] −E[(δ −φ￿w)∇2V (s)w], Finally, observe that : E[(γφ￿−φ)φ￿w] = E[(φ −γφ￿)φ]￿ (E[φφ￿]−1E[δφ]) = E[δφ] −E[γφ￿φ￿](E[φφ￿]−1E[δφ]) = E[δφ] −E[γφ￿φ￿w]. which concludes the proof. Theorem 1 suggests straightforward generalizations of GTD2 and TDC (cf. Equations (6) and (7)) to the nonlinear case. Weight wk is updated as before on a “faster” timescale: wk+1 = wk + βk(δk −φ￿ k wk)φk. (13) The parameter vector θk is updated on a “slower” timescale, either according to θk+1 = Γ ￿ θk + αk ￿ (φk −γφ￿ k)(φ￿ k wk) −hk ￿￿ , (non-linear GTD2) (14) 5 or, according to θk+1 = Γ ￿ θk + αk ￿ δkφk −γφ￿ k(φ￿ k wk) −hk ￿￿ , (non-linear TDC) (15) where hk = (δk −φ￿ k wk) ∇2Vθk(sk)wk. (16) Besides hk, the only new ingredient compared to the linear case is Γ : Rn →Rn, a mapping that projects its argument into an appropriately chosen compact set C with a smooth boundary. The purpose of this projection is to prevent the parameters to diverge in the initial phase of the algorithm, which could happen due to the presence of the nonlinearities in the algorithm. Projection is a common technique for stabilizing the transient behavior of stochastic approximation algorithms (see, e.g., Kushner & Yin, 2003). In practice, if one selects C large enough so that it contains the set of possible solutions U = { θ | E[ δ ∇Vθ(s)] = 0 } (by using known bounds on the size of the rewards and on the derivative of the value function), it is very likely that no projections will take place at all during the execution of the algorithm. We expect this to happen frequently in practice: the main reason for the projection is to facilitate convergence analysis. Let us now analyze the computational complexity per update. Assume that Vθ(s) and its gradient can each be computed in O(n) time, the usual case for approximators of interest (e.g., neural networks). Equation (16) also requires computing the product of the Hessian of Vθ(s) and w. Pearlmutter (1994) showed that this can be computed exactly in O(n) time. The key is to note that ∇2Vθk(sk)wk = ∇(∇Vθk(s)￿wk), because wk does not depend on θk. The scalar term ∇Vθk(s)￿wk can be computed in O(n) and its gradient, which is a vector, can also be computed in O(n). Hence, the computation time per update for the proposed algorithms is linear in the number of parameters of the function approximator (just like in TD(0)). 5 Convergence Analysis Given the compact set C ⊂Rn, let C(C) be the space of C →Rn continuous functions. Given projection Γ onto C, let operator ˆΓ : C(C) →C(Rn) be ˆΓv (θ) = lim 0<ε→0 Γ ￿ θ + ε v(θ) ￿ −θ ε . By assumption, Γ(θ) = arg minθ￿∈C ￿θ￿−θ￿and the boundary of C is smooth, so ˆΓ is well defined. In particular, ˆΓv (θ) = v(θ) when θ ∈C◦, otherwise, if θ ∈∂C, ˆΓv (θ) is the projection of v(θ) to the tangent space of ∂C at θ. Consider the following ODE: ˙θ = ˆΓ(−1 2∇J)(θ), θ(0) ∈C. (17) Let K be the set of all asymptotically stable equilibria of (17). By the definitions, K ⊂C. Furthermore, U ∩C ⊂K. The next theorem shows that under some technical conditions, the iterates produced by nonlinear GTD2 converge to K with probability one. Theorem 2 (Convergence of nonlinear GTD2). Let (sk, rk, s￿ k)k≥0 be a sequence of transitions that satisfies A1. Consider the nonlinear GTD2 updates (13), (14). with positive step-size sequences that satisfy ￿∞ k=0 αk = ￿∞ k=0 βk = ∞, ￿∞ k=0 α2 k, ￿∞ k=0 β2 k < ∞and αk βk →0, as k →∞. Assume that for any θ ∈C and s0 ∈S s.t. d(s0) > 0, Vθ(s0) is three times continuously differentiable. Further assume that for each θ ∈C, E[φθφ￿ θ ] is nonsingular. Then θk →K, with probability one, as k →∞. Proof. Let (s, r, s￿) be a random transition. Let φθ = ∇Vθ(s), φ￿ θ = ∇Vθ(s￿), φk = ∇Vθk(sk), and φ￿ k = ∇Vθk(s￿ k). We begin by rewriting the updates (13)-(14) as follows: wk+1 = wk + βk(f(θk, wk) + Mk+1), (18) θk+1 = Γ ￿ θk + αk(g(θk, wk) + Nk+1) ￿ , (19) where f(θk, wk) = E[δkφk|θk] −E[φkφ￿ k |θk]wk, Mk+1 = (δk −φ￿ k wk)φk −f(θk, wk), g(θk, wk) = E ￿ (φk −γφ￿ k)φ￿ k wk −hk|θk, wk ￿ , Nk+1 = ((φk −γφ￿ k)φ￿ k wk −hk) −g(θk, wk). 6 We need to verify that there exists a compact set B ⊂R2n such that (a) the functions f(θ, w), g(θ, w) are Lipschitz continuous over B, (b) (Mk, Gk), (Nk, Gk), k ≥1 are martingale difference sequences, where Gk = σ(ri, θi, wi, si, i ≤k; s￿ i, i < k), k ≥1 are increasing sigma fields, (c) {(wk(θ), θ)} with wk(θ) obtained as δk(θ) = rk + γVθ(s￿ k) −Vθ(sk), φk(θ) = ∇Vθ(sk), wk+1(θ) = wk(θ) + βk ￿ δk(θ) −φk(θ)￿wk(θ) ￿ φk(θ) almost surely stays in B for any choice of (w0(θ), θ) ∈B, and (d) {(w, θk)} almost surely stays in B for any choice of (w, θ0) ∈B. From these and the conditions on the step-sizes, using standard arguments (c.f. Theorem 2 of Sutton et al. (2009b)), it follows that θk converges almost surely to the set of asymptotically stable equilibria of ˙θ = ˆΓF (θ), (θ(0) ∈C), where F(θ) = g(θ, wθ). Here for θ ∈C fixed, wθ is the (unique) equilibrium point of ˙w = E[δθφθ] −E[φθφ￿ θ ]w, (20) where δθ = r + γVθ(s￿) −Vθ(s). Clearly, wθ = E ￿ φθφ￿ θ ￿−1 E[δθφθ], which exists by assumption. Then by Theorem 1 it follows that F(θ) = −1 2 ∇J(θ). Hence, the statement will follow once (a)–(d) are verified. Note that (a) is satisfied because Vθ is three times continuously differentiable. For (b), we need to verify that for any k ≥0, E[Mk+1 | Gk] = 0 and E[Nk+1 | Gk] = 0, which in fact follow from the definitions. Condition (c) follows since, by a standard argument (e.g., Borkar & Meyn, 2000), wk(θ) converges to wθ, which by assumption stays bounded if θ comes from a bounded set. For condition (d), note that {θk} is uniformly bounded since for any k ≥0, θk ∈C, and by assumption C is a compact set. Theorem 3 (Convergence of nonlinear TDC). Under the same conditions as in Theorem 2, the iterates computed via (13), (15) satisfy θk →K, with probability one, as k →∞. The proof follows in a similar manner as that of Theorem 2 and is omitted for brevity. 6 Empirical results To illustrate the convergence properties of the algorithms, we applied them to the “spiral” counterexample of Tsitsikilis & Van Roy (1997), originally used to show the divergence of TD(0) with nonlinear function approximation. The Markov chain with 3 states is shown in the left panel of Figure 2. The reward is always zero and the discount factor is γ = 0.9. The value function has a single parameter, θ, and takes the nonlinear spiral form Vθ(s) = ￿ a(s) cos (ˆλθ) −b(s) sin (ˆλθ) ￿ e￿θ. The true value function is V = (0, 0, 0)￿which is achieved as θ →−∞. Here we used V0 = (100, −70, −30)￿, a = V0, b = (23.094, −98.15, 75.056)￿, ˆλ = 0.866 and ￿= 0.05. Note that this is a degenerate example, in which our theorems do not apply, because the optimal parameter values are infinite. Hence, we run our algorithms without a projection step. We also use constant learning rates, in order to facilitate gradient descent through an error surface which is essentially flat. For TDC we used α = 0.5, β = 0.05, and for GTD2, α = 0.8 and β = 0.1. For TD(0) we used α = 2×10−3 (as argued by Tsitsiklis & Van Roy (1997), tuning the step-size does not help with the divergence problem). All step sizes are then normalized by ￿V ￿ θ D d dθVθ￿. The graph shows the performance measure, √ J, as a function of the number of updates (we used expected updates for all algorithms). GTD2 and TDC converge to the correct solution, while TD(0) diverges. We note that convergence happens despite the fact that this example is outside the scope of the theory. To assess the performance of the new algorithms on a large scale problem, we used them to learn an evaluation function in 9x9 computer Go. We used a version of RLGO (Silver, 2009), in which a logistic function is fit to evaluate the probability of winning from a given position. Positions were described using 969,894 binary features corresponding to all possible shapes in every 3x3, 2x2, and 1x1 region of the board. Using weight sharing to take advantage of symmetries, the million features were reduced to a parameter vector of n = 63, 303 components. Experience was generated by selfplay, with actions chosen uniformly randomly among the legal moves. All rewards were zero, except upon winning the game, when the reward was 1. We applied four algorithms to this problem: TD(0), the proposed algorithms (GTD2 and TDC) and residual gradient (RG). In the experiments, RG was 7 0 1000 2000 3000 0 5 10 15 Time step √J GTD2 TD TDC 1 2 3 1 2 1 2 1 2 1 2 1 2 1 2 0.40 0.45 0.50 0.55 0.60 .00001 .0001 .001 .01 .1 α RMSE TD GTD2 TDC RG TDC TDC TD RG Figure 2: Empirical evaluation results. Left panel: example MDP from Tsitsiklis & Van Roy (1994). Right panel: 9x9 Computer Go. run with only one sample3. In each run, θ was initialized to random values uniformly distributed in [−0.1, 0.1]; for GTD2 and TDC, the second parameter vector, w, was initialized to 0. Training then proceeded for 5000 complete games, after which θ was frozen. This problem is too large to compute the objective function J. Instead, to assess the quality of the solutions obtained, we estimated the average prediction error of each algorithm. More precisely, we generated 2500 test games; for every state occurring in a game, we computed the squared error between its predicted value and the actual return that was obtained in that game. We then computed the root of the mean-squared error, averaged over all time steps. The right panel in Figure 2 plots this measure over a range of values of the learning rate α. The results are averages over 50 independent runs. For TDC and GTD we used several values of the β parameter, which generate the different curves. As was noted in previous empirical work, TD provides slightly better estimates than the RG algorithm. TDC’s performance is very similar to TD, for a wide range of parameter values. GTD2 is slightly worse. These results are very similar in flavor to those obtained in Sutton et al. (2009b) using the same domain, but with linear function approximation. 7 Conclusions and future work In this paper, we solved a long-standing open problem in reinforcement learning, by establishing a family of temporal-difference learning algorithms that converge with arbitrary differentiable function approximators (including neural networks). The algorithms perform gradient descent on a natural objective function, the projected Bellman error. The local optima of this function coincide with solutions that could be obtained by TD(0). Of course, TD(0) need not converge with non-linear function approximation. Our algorithms are on-line, incremental and their computational cost per update is linear in the number of parameters. Our theoretical results guarantee convergence to a local optimum, under standard technical assumptions. Local optimality is the best one can hope for, since nonlinear function approximation creates non-convex optimization problems. The early empirical results obtained for computer Go are very promising. However, more practical experience with these algorithms is needed. We are currently working on extensions of these algorithms using eligibility traces, and on using them for solving control problems. Acknowledgments This research was supported in part by NSERC, iCore, AICML and AIF. We thank the three anonymous reviewers for their useful comments on previous drafts of this paper. 3Unlike TD, RG would require two independent transition samples from a given state. This requires knowledge about the model of the environment which is not always available. In the experiments only one transition sample was used following Baird’s original recommendation. 8 References Antos, A., Szepesv´ari, Cs. & Munos, R. (2008). Learning near-optimal policies with Bellmanresidual minimization based fitted policy iteration and a single sample path. Machine Learning 71: 89–129. Baird, L. C. (1995). Residual algorithms: Reinforcement learning with function approximation. In Proceedings of the Twelfth International Conference on Machine Learning, pp. 30–37. Morgan Kaufmann. Borkar, V. S. & Meyn, S. P. (2000). The ODE method for convergence of stochastic approximation and reinforcement learning. SIAM Journal on Control And Optimization 38(2): 447–469. Boyan, J. A. & Moore, A.W. (1995). Generalization in Reinforcement Learning: Safely Approximating the Value Function. In Advances in Neural Information Processing Systems 7, pp. 369–376, MIT Press. Crites, R. H. & Barto, A.G. (1995). Improving Elevator Performance Using Reinforcement Learning In Advances in Neural Information Processing Systems 8, pp. 1017-1023. MIT Press. Farahmand, A.m., Ghavamzadeh, M., Szepesvari, C. & Mannor, S. (2009). Regularized Policy Iteration In Advances in Neural Information Processing Systems 21, pp. 441–448. Kushner, H. J. & Yin, G. G. (2003). Stochastic Approximation Algorithms and Applications. Second Edition, Springer-Verlag. Pearlmutter, B. A (1994). Fast exact multiplication by the Hessian. Neural Computation 6(1), pp. 147–160. Silver, D. (2009). Reinforcement Learning and Simulation-Based Search in Computer Go. University of Alberta Ph.D. thesis. Sutton, R. S. (1988). Learning to predict by the method of temporal differences. Machine Learning 3:9–44. Sutton, R. S. & Barto, A. G. (1998). Reinforcement Learning: An Introduction. MIT Press. Sutton, R. S., Szepesv´ari, Cs. & Maei, H. R. (2009a). A convergent O(n) algorithm for off-policy temporal-difference learning with linear function approximation. In Advances in Neural Information Processing Systems 21, pp. 1609–1616. MIT Press. Sutton, R. S., Maei, H. R, Precup, D., Bhatnagar, S., Silver, D., Szepesv´ari, Cs. & Wiewiora, E. (2009b). Fast gradient-descent methods for temporal-difference learning with linear function approximation. In Proceedings of the 26th International Conference on Machine Learning, pp. 993–1000. Omnipress. Tesauro, G. (1992) Practical issues in temporal difference learning. Machine Learning 8: 257-277. Tsitsiklis, J. N. & Van Roy, B. (1997). An analysis of temporal-difference learning with function approximation. IEEE Transactions on Automatic Control 42:674–690. Zhang, W. & Dietterich, T. G. (1995) A reinforcement learning approach to job-shop scheduling. In Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence, pp. 11141120. AAAI Press. 9
2009
68
3,819
Group Sparse Coding Samy Bengio Google Mountain View, CA bengio@google.com Fernando Pereira Google Mountain View, CA pereira@google.com Yoram Singer Google Mountain View, CA singer@google.com Dennis Strelow Google Mountain View, CA strelow@google.com Abstract Bag-of-words document representations are often used in text, image and video processing. While it is relatively easy to determine a suitable word dictionary for text documents, there is no simple mapping from raw images or videos to dictionary terms. The classical approach builds a dictionary using vector quantization over a large set of useful visual descriptors extracted from a training set, and uses a nearest-neighbor algorithm to count the number of occurrences of each dictionary word in documents to be encoded. More robust approaches have been proposed recently that represent each visual descriptor as a sparse weighted combination of dictionary words. While favoring a sparse representation at the level of visual descriptors, those methods however do not ensure that images have sparse representation. In this work, we use mixed-norm regularization to achieve sparsity at the image level as well as a small overall dictionary. This approach can also be used to encourage using the same dictionary words for all the images in a class, providing a discriminative signal in the construction of image representations. Experimental results on a benchmark image classification dataset show that when compact image or dictionary representations are needed for computational efficiency, the proposed approach yields better mean average precision in classification. 1 Introduction Bag-of-words document representations are widely used in text, image, and video processing [14, 1]. Those representations abstract from spatial and temporal order to encode a document as a vector of the numbers of occurrences in the document of descriptors from a suitable dictionary. For text documents, the dictionary might consist of all the words or of all the n-grams of a certain minimum frequency in the document collection [1]. For images or videos, however, there is no simple mapping from the raw document to descriptor counts. Instead, visual descriptors must be first extracted and then represented in terms of a carefully constructed dictionary. We will not discuss further here the intricate processes of identifying useful visual descriptors, such as color, texture, angles, and shapes [14], and of measuring them at appropriate document locations, such as on regular grids, on special interest points, or at multiple scales [6]. For dictionary construction, the standard approach in computer vision is to use some unsupervised vector quantization (VQ) technique, often k-means clustering [14], to create the dictionary. A new image is then represented by a vector indexed by dictionary elements (codewords), which for element d counts the number of visual descriptors in the image whose closest codeword is d. VQ 1 representations are maximally sparse per descriptor occurrence since they pick a single codeword for each occurrence, but they may not be sparse for the image as a whole; furthermore, such representations are not that robust with respect to descriptor variability. Sparse representations have obvious computational benefits, by saving both processing time in handling visual descriptors and space in storing encoded images. To alleviate the brittleness of VQ representations, several studies proposed representation schemes where each visual descriptor is encoded as a weighted sum of dictionary elements, where the encoding optimizes a tradeoff between reconstruction error and the ℓ1 norm of the reconstruction weights [3, 5, 7, 8, 9, 16]. These techniques promote sparsity in determining a small set of codewords from the dictionary that can be used to efficiently represent each visual descriptor of each image [13]. However, those approaches consider each visual descriptor in the image as a separate coding problem and do not take into account the fact that descriptor coding is just an intermediate step in creating a bag of codewords representation for the whole image. Thus, sparse coding of each visual descriptor does not guarantee sparse coding of the whole image. This might prevent the use of such methods in real large scale applications that are constrained by either time or space resources. In this study, we propose and evaluate the mixed-norm regularizers [12, 10, 2] to take into account the structure of bags of visual descriptors present in images. Using this approach, we can for example specify an encoder that exploits the fact that once a codeword has been selected to help represent one of the visual descriptors of an image, it may as well be used to represent other visual descriptors of the same image without much additional regularization cost. Furthermore, while images are represented as bags, the same idea could be used for sets of images, such as all the images from a given category. In this case, mixed regularization can be used to specify that when a codeword has been selected to help represent one of the visual descriptors of an image of a given category, it could as well be used to represent other visual descriptors of any image of the same category at no additional regularization cost. This form of regularization thus promotes the use of a small subset of codewords for each category that could be different from category to category, thus including an indirect discriminative signal in code construction. Mixed regularization can be applied at two levels: for image encoding, which can be expressed as a convex optimization problem, and for dictionary learning, using an alternating minimization procedure. Dictionary regularization promotes a small dictionary size directly, instead of indirectly through the sparse encoding step. The paper is organized as follows: Sec. 2 introduces the notation used in the rest of the paper, and summarizes the technical approach. Sec. 3 describes and solves the convex optimization problem for mixed-regularization encoding. Sec. 4 extends the technique to learn the dictionary by alternating optimization. Finally, Sec. 5 presents experimental results on a well-known image database. 2 Problem Statement We denote scalars with lower-case letters, vectors with bold lower-case letters such as v. We assume that the instance space is Rn endowed with the standard inner product between two vectors u and v, u·v = Pn j=1 ujvj. We also use the standard ℓp norms ∥·∥p over Rn with p ∈1, 2, ∞. We often make use of the fact that u · u = ∥u∥2, where as usual we omit the norm subscript for p = 2.. Our main goal is to encode effectively groups of instances in terms of a set of dictionary codewords D = {dj}|D| j=1. For example, if instances are image patches, each group may be the set of patches in a particular image, and each codeword may represent some kind of average patch. The m’th group is denoted Gm where Gm = {xm,i}|Gm| i=1 where each xm,i ∈Rn is an instance. When discussing operations on a single group, we use G for the group in discussion and denote by xi its i’th instance. Given D and G, our first subgoal, encoding, is to minimize a tradeoff between the reconstruction error for G in terms of D, and a suitable mixed norm for the matrix of reconstruction weights that express each xi as a positive linear combination of dj ∈D. The tradeoff between accurate reconstruction or compact encoding is governed through a regularization parameter λ. Our second subgoal, learning, is to estimate a good dictionary D given a set of training groups {Gm}n m=1. We achieve these goals by alternating between (i) fixing the dictionary to find recon2 struction weights that minimize the sum of encoding objectives for all groups, and (ii) fixing the reconstruction weights for all groups to find the dictionary that minimizes a tradeoff between the sum of group encoding objectives and the mixed norm of the dictionary. 3 Group Coding To encode jointly all the instances in a group G with dictionary D, we solve the following convex optimization problem: A⋆= arg minA Q(A, G, D) where Q(A, G, D) = 1 2 P i∈G xi −P|D| j=1 αi jdj 2 + λ P|D| j=1 ∥αj∥p and αi j ≥ 0 ∀i, j . (1) The reconstruction matrix A = {αj}|D| j=1 consists of non-negative vectors αj = (α1 j, . . . , α|G| j ) specifying the contribution of dj to each instance. The second term of the objective weighs the mixed ℓ1/ℓp norm of A, which measures reconstruction complexity, with the regularization parameter λ that balances reconstruction quality (the first term) and reconstruction complexity. The problem of Eq. (1) can be solved by coordinate descent. Leaving all indices intact except for index r, omitting fixed arguments of the objective, and denoting by c1 and c2 terms which do not depend on αr, we obtain the following reduced objective: Q(αr) =1 2 X i∈G xi − X j̸=r αi jdj −αi rdr 2 + λ ∥αr∥p + c1 = X i∈G  X j̸=r αi jαi r(dj · dr)−αi r(xi · dr)+ 1 2(αi r)2∥dr∥2  +λ ∥αr∥p+c2 . (2) We next show how to find the optimum αr for p = 1 and p = 2. Let ˜Q be just the reconstruction term of the objective. Its partial derivatives with respect to each αi r are ∂ ∂αir ˜Q = X j̸=r αi j(dj · dr) −xi · dr + αi r∥dr∥2 . (3) Let us make the following abbreviation for a given index r, µi = xi · dr − X j̸=r αi j(dj · dr) . (4) It is clear that if µi ≤0 then the optimum for αi r is zero. In the derivation below we therefore employ µ+ i = [µi]+ where [z]+ = max{0, z}. Next we derive the optimal solution for each of the norms we consider starting with p = 1. For p = 1 the objective function is separable and we get the following sub-gradient condition for optimality, 0 ∈−µ+ i + αi r∥dr∥2 + λ ∂ ∂αir |αi r| | {z } ∈[0,1] ⇒αi r ∈µ+ i −[0, λ] ∥dr∥2 . (5) Since αr i ≥0 the above subgradient condition for optimality implies that αr i = 0 when µ+ i ≤λ and otherwise αr i = (µ+ i −λ)/∥dr∥2. The objective function is not separable when p = 2. In this case we need to examine the entire set of values {µ+ i }. We denote by µ+ the vector whose i’th value is µ+ i . Assume for now that the optimal solution has a non-zero norm, ∥αr∥2 > 0. In this case, the gradient of Q(αr) with an ℓ2 regularization term is ∥dr∥2αr −µ+ + λ αr ∥αr∥. 3 At the optimum this vector must be zero, so after rearranging terms we obtain αr =  ∥dr∥2 + λ ∥αr∥ −1 µ+ . (6) Therefore, the vector αr is in the same direction as µ+ which means that we can simply write αr = s µ+ where s is a non-negative scalar. We thus can rewrite Eq. (6) solely as a function of the scaling parameter s s µ+ =  ∥dr∥2 + λ s∥µ+∥ −1 µ+ , which implies that s = 1 ∥dr∥2  1 − λ ∥µ+∥  . (7) We now revisit the assumption that the norm of the optimal solution is greater than zero. Since s cannot be negative the above expression also provides the condition for obtaining a zero vector for αr. Namely, the term 1 −λ/∥µ+∥must be positive, thus, we get that αr = 0 if ∥µ+∥≤λ and otherwise αr = sµ+ where s is defined in Eq. (7). Once the optimal group reconstruction matrix A is found, we compress the matrix into a single vector. This vector is of fixed dimension and does not depend on the number of instances that constitute the group. To do so we simply take the p-norm of each αj, thus yielding a |D| dimensional vector. Since we use mixed-norms which are sparsity promoting, in particular the ℓ1/ℓ2 mixed-norm, the resulting vector is likely to be sparse, as we show experimentally in Section 6. Since visual descriptors and dictionary elements are only accessed through inner products in the above method, it could be easily generalized to work with Mercer kernels instead. 4 Dictionary Learning Now that we know how to achieve optimal reconstruction for a given dictionary, we examine how to learn a good dictionary, that is, a dictionary that balances between reconstruction error, reconstruction complexity, overall complexity relative to the given training set. In particular, we seek a learning method that facilitates both induction of new dictionary words and the removal of dictionary words with low predictive power. To achieve this goal, we will apply ℓ1/ℓ2 regularization controlled by a new hyperparameter γ, to dictionary words. For this approach to work, we assume that instances have been mean-subtracted so that the zero vector 0 is the (uninformative) mean of the data and regularization towards 0 is equivalent to removing words that do not contribute much to compact representation of groups. Let G = {G1, . . . , Gn} be a set of groups and A = {A1, . . . , An} the corresponding reconstruction coefficients relative to dictionary D. Then, the following objective meets the above requirements: Q(A, D) = n X m=1 Q(Am, Gm, D) + γ |D| X k=1 ∥dk∥p s.t. αi m,j ≥0 ∀i, j, m , (8) where the single group objective Q(Am, Gm, D) is as in Eq. (1). In our application we set p = 2 as the norm penalty of the dictionary words. For fixed A, the objective above is convex in D. Moreover, the same coordinate descent technique described above for finding the optimum reconstruction weights can be used again here after simple algebraic manipulations. Define the following auxiliary variables: vr = X m X i αi m,rxm,i and νj,k = X m X i αi m,jαi m,k . (9) Then, we can express dr compactly as follows. As before, assume that ∥dr∥> 0. Calculating the gradient with respect to each dr and equating it to zero, we obtain X m X i∈Gm  X j̸=r αi m,jαi m,rdj + (αi m,r)2dr −αi m,rxm,i  + γ dr ∥dr∥= 0 . 4 Swapping the sums over m and i with the sum over j, using the auxiliary variables, and noting that dj does not depend neither on m nor on i, we obtain X j̸=r νj,rdj + νr,rdr −vr + γ dr ∥dr∥= 0 . (10) Similarly to the way we solved for αr, we now define the vector ur = vr −P j̸=r νj,rdj to get the following iterate for dr: dr = ν−1 r,r  1 − γ ∥ur∥  + ur , (11) where, as above, we incorporated the case dr = 0, by applying the operator [·]+ to the term 1 −γ/∥ur∥. The form of the solution implies that we can eliminate dr, as it becomes 0, whenever the norm of the residual vector ur is smaller than γ. Thus, the dictionary learning procedure naturally facilitates the ability to remove dictionary words whose predictive power falls below the regularization parameter. 5 Experimental Setting We compare our approach to image coding with previous sparse coding methods by measuring their impact on classification performance on the PASCAL VOC (Visual Object Classes) 2007 dataset [4]. The VOC datasets contain images from 20 classes, including people, animals (bird), vehicles (aeroplane), and indoor objects (chair), and are considered natural, difficult images for classification. There are around 2500 training images, 2500 validation images and 5000 test images in total. For each coding technique under consideration, we explore a range of values for the hyperparameters λ and γ. In the past, many features have been used for VOC classification, with bag-of-words histograms of local descriptors like SIFT [6] being most popular. In our experiments, we extract local descriptors based on a regular grid for each image. The grid points are located at every seventh pixel horizontally and vertically, which produces an average of 3234 descriptors per image. We used a custom local descriptor that collects Gabor wavelet responses at different orientations, spatial scales, and spatial offsets from the interest point. Four orientations (0◦, 45◦, 90◦, 135◦) and 27 (scale, offset) combinations are used, for a total of 108 components. The 27 (scale, offset) pairs were chosen by optimizing a previous image recognition task, unrelated to this paper, using a genetic algorithm. Tola et al. [15] independently described a descriptor that similarly uses responses at different orientations, scales, and offsets (see their Figure 2). Overall, this descriptor is generally comparable to SIFT and results in similar performance. To build an image feature vector from the descriptors, we thus investigate the following methods: 1. Build a bag-of-words histogram over hierarchical k-means codewords by looking up each descriptor in a hierarchical k-means tree [11]. We use branching factors of 6 to 13 and a depth of 3 for a total of between 216 and 2197 codewords. When used with multiple feature types, this method results in very good classification performance on the VOC task. 2. Jointly train a dictionary and encode each descriptor using an ℓ1 sparse coding approach with γ = 0, which was studied previously [5, 7, 9]. 3. Jointly train a dictionary and encode sets of descriptors where each set corresponds to a single image, using ℓ1/ℓ2 group sparse coding, varying both γ and λ. 4. Jointly train a dictionary and encode sets of descriptors where each set corresponds to all descriptors or all images of a single class, using ℓ1/ℓ2 sparse coding, varying both γ and λ. Then, use ℓ1/ℓ2 sparse coding to encode the descriptors in individual images and obtain a single α vector per image. As explained before, we normalized all descriptors to have zero mean so that regularizing dictionary words towards the zero vector implies dictionary sparsity. In all cases, the initial dictionary used during training was obtained from the same hierarchical kmeans tree, with a branching factor of 10 and depth 4 rather than 3 as used in the baseline method. This scheme yielded an initial dictionary of size 7873. 5 ℓ1/ℓ2 ;γ vary;λ vary;group=class ℓ1/ℓ2 ;γ = 0;λ vary;group=class ℓ1/ℓ2 ;γ vary;λ = 6.8e −5;group=image ℓ1/ℓ2 ;γ = 0;λ vary;group=image ℓ1 ;γ = 0;λ vary HKMeans Mean Average Precision vs Dictionary Size Dictionary Size Mean Average Precision 2000 1500 1000 500 0.4 0.35 0.3 0.25 0.2 0.15 Figure 1: Mean Average Precision on the 2007 PASCAL VOC database as a function of the size of the dictionary obtained by both ℓ1 and ℓ1/ℓ2 regularization approaches when varying λ or γ. We show results where descriptors are grouped either by image or by class. The baseline system using hierarchical k-means is also shown. To evaluate the impact of different coding methods on an important end-to-end task, image classification, we selected the VOC 2007 training set for classifier training, the VOC 2007 validation set for hyperparameter selection, and the VOC 2007 test set for for evaluation. After the datasets are encoded with each of the methods being evaluated, a one-versus-all linear SVM is trained on the encoded training set for each of the 20 classes, and the best SVM hyperparameter C is chosen on the validation set. Class average precisions on the encoded test set are then averaged across the 20 classes to produce the mean average precision shown in our graphs. 6 Results and Discussion In Figure 1 we compare the mean average precisions of the competing approaches as encoding hyperparameters are varied to control the overall dictionary size. For the ℓ1 approach, achieving different dictionary size was obtained by tuning λ while setting γ = 0. For the ℓ1/ℓ2 approach, since it was not possible to compare all possible combinations of λ and γ, we first fixed γ to be zero, so that it could be comparable to the standard ℓ1 approach with the same setting. Then we fixed λ to a value which proved to yield good results and varied γ. As it can be seen in Figure 1, when the dictionary is allowed to be very large, the pure ℓ1 approach yields the best performance. On the other hand, when the size of the dictionary matters, then all the approaches based on ℓ1/ℓ2 regularization performed better than the ℓ1 counterpart. Even hierarchical k-means performed better than the pure ℓ1 in that case. The version of ℓ1/ℓ2 in which we allowed γ to vary provided the best tradeoff between dictionary size and classification performance when descriptors were grouped per image, which was to be expected as γ directly promotes sparse dictionaries. More interestingly, when grouping descriptors per class instead of per image, we get even better performance for small dictionary sizes by varying λ. In Figure 2 we compare the mean average precisions of ℓ1 and ℓ1/ℓ2 regularization as average image size varies. When image size is constrained, which is often the case is large-scale applications, all 6 ℓ1/ℓ2 ;γ vary;λ vary;group=class ℓ1/ℓ2 ;γ = 0;λ vary;group=class ℓ1/ℓ2 ;γ vary;λ = 6.8e −5;group=image ℓ1/ℓ2 ;γ = 0;λ vary;group=image ℓ1 ;γ = 0;λ vary HKMeans Mean Average Precision vs Average Image Size Average Image Size Mean Average Precision 2000 1500 1000 500 0.4 0.35 0.3 0.25 0.2 0.15 Figure 2: Mean Average Precision on the 2007 PASCAL VOC database as a function of the average size of each image as encoded using the trained dictionary obtained by both ℓ1 and ℓ1/ℓ2 regularization approaches when varying λ and γ. We show results where descriptors are grouped either by image or by class. The baseline system using hierarchical k-means is also shown. 100 200 300 400 500 600 700 800 900 1000 200 400 600 800 1000 1200 1400 100 200 300 400 500 600 700 800 900 1000 200 400 600 800 1000 1200 1400 1600 1800 2000 Figure 3: Comparison of the dictionary words used to reconstruct the same image. A pure ℓ1 coding was used on the left, while a mixed ℓ1/ℓ2 encoding was used on the right plot. Each row represents the number of times each dictionary word was used in the reconstruction of the image. the ℓ1/ℓ2 regularization choices yield better performance than ℓ1 regularization. Once again ℓ1 regularization performed even worse than hierarchical k-means for small image sizes Figure 3 compares the usage of dictionary words to encode the same image, either using ℓ1 (on the left) or ℓ1/ℓ2 (on the right) regularization. Each graph shows the number of times a dictionary word (a row in the plot) was used in the reconstruction of the image. Clearly, ℓ1 regularization yields an overall sparser representation in terms of total number of dictionary coefficients that are used. However, almost all of the resulting dictionary vectors are non-zero and used at least once in the coding process. As expected, with ℓ1/ℓ2 regularization, a dictionary word is either always used or never used yielding a much more compact representation in terms of the total number of dictionary words that are used. 7 Overall, mixed-norm regularization yields better performance when the problem to solve includes resource constraints, either time (a smaller dictionary yields faster image encoding) or space (one can store or convey more images when they take less space). They might thus be a good fit when a tradeoff between pure performance and resources is needed, as is often the case for large-scale applications or online settings. Finally, grouping descriptors per class instead of per image during dictionary learning promotes the use of the same dictionary words for all images of the same class, hence yielding some form of weak discrimination which appears to help under space or time constraints. Acknowledgments We would like to thanks John Duchi for numerous discussions and suggestions. References [1] R. Baeza-Yates and B. Ribeiro-Neto. Modern Information Retrieval. Addison Wesley, Harlow, England, 1999. [2] J. Duchi and Y. Singer. Boosting with structural sparsity. In International Conference on Machine Learning (ICML), 2009. [3] M. Elad and M. Aharon. Image denoising via sparse and redundant representation over learned dictionaries. IEEE Transaction on Image Processing, 15(12):3736–3745, 2006. [4] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. [5] H. Lee, A. Battle, R. Raina, and A. Y. Ng. Efficient sparse coding algorithms. In Advances in Neural Information Processing Systems (NIPS), 2007. [6] D. G. Lowe. Object recognition from local scale-invariant features. In International Conference on Computer Vision (ICCV), pages 1150–1157, 1999. [7] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online dictionary learning for sparse coding. In International Conference on Machine Learning (ICML), 2009. [8] J. Mairal, M. Elad, and G. Sapiro. Sparse representation for color image restoration. IEEE Transaction on Image Processing, 17(1), 2008. [9] 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 (ECCV), 2008. [10] S. Negahban and M. Wainwright. Phase transitions for high-dimensional joint support recovery. In Advances in Neural Information Processing Systems 22, 2008. [11] D. Nister and H. Stewenius. Scalable recognition with a vocabulary tree. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2006. [12] G. Obozinski, B. Taskar, and M. Jordan. Joint covariate selection for grouped classification. Technical Report 743, Dept. of Statistics, University of California Berkeley, 2007. [13] B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision Research, 37, 1997. [14] P. Quelhas, F. Monay, J. M. Odobez, D. Gatica-Perez, T. Tuytelaars, and L. J. Van Gool. Modeling scenes with local descriptors and latent aspects. In International Conference on Computer Vision (ICCV), 2005. [15] E. Tola, V. Lepetit, and P. Fua. A fast local descriptor for dense matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2008. [16] J. yang, K. Yu, Y. Gong, and T. Huang. Linear spatial pyramid matching using sparse coding for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2009. 8
2009
69
3,820
Slow, Decorrelated Features for Pretraining Complex Cell-like Networks James Bergstra University of Montreal james.bergstra@umontreal.ca Yoshua Bengio University of Montreal yoshua.bengio@umontreal.ca Abstract We introduce a new type of neural network activation function based on recent physiological rate models for complex cells in visual area V1. A single-hiddenlayer neural network of this kind of model achieves 1.50% error on MNIST. We also introduce an existing criterion for learning slow, decorrelated features as a pretraining strategy for image models. This pretraining strategy results in orientation-selective features, similar to the receptive fields of complex cells. With this pretraining, the same single-hidden-layer model achieves 1.34% error, even though the pretraining sample distribution is very different from the fine-tuning distribution. To implement this pretraining strategy, we derive a fast algorithm for online learning of decorrelated features such that each iteration of the algorithm runs in linear time with respect to the number of features. 1 Introduction Visual area V1 is the first area of cortex devoted to handling visual input in the human visual system (Dayan & Abbott, 2001). One convenient simplification in the study of cell behaviour is to ignore the timing of individual spikes, and to look instead at their frequency. Some cells in V1 are described well by a linear filter that has been rectified to be non-negative and perhaps bounded. These so-called simple cells are similar to sigmoidal activation functions: their activity (firing frequency) is greater as an image stimulus looks more like some particular linear filter. However, these simple cells are a minority in visual area V1 and the characterization of the remaining cells there (and even beyond in visual areas V2, V4, MT, and so on) is a very active area of ongoing research. Complex cells are the next-simplest kind of cell. They are characterized by an ability to respond to narrow bars of light with particular orientations in some region (translation invariance) but to turn off when all those overlapping bars are presented at once. This non-linear response has been modeled by quadrature pairs (Adelson & Bergen, 1985; Dayan & Abbott, 2001): pairs of linear filters with the property that the sum of their squared responses is constant for an input image with particular spatial frequency and orientation (i.e. edges). It has also been modeled by max-pooling across two or more linear filters (Riesenhuber & Poggio, 1999). More recently, it has been argued that V1 cells exhibit a range of behaviour that blurs distinctions between simple and complex cells and between energy models and max-pooling models (Rust et al., 2005; Kouh & Poggio, 2008; Finn & Ferster, 2007). Another theme in neural modeling is that cells do not react to single images, they react to image sequences. It is a gross approximation to suppose that each cell implements a function from image to activity level. Furthermore, the temporal sequence of images in a video sequence contains a lot of information about the invariances that we would like our models to learn. Throwing away that temporal structure makes learning about objects from images much more difficult. The principle of identifying slowly moving/changing factors in temporal/spatial data has been investigated by many (Becker & Hinton, 1993; Wiskott & Sejnowski, 2002; Hurri & Hyv¨arinen, 2003; K¨ording et al., 2004; Cadieu & Olshausen, 2009) as a principle for finding useful representations of images, 1 and as an explanation for why V1 simple and complex cells behave the way they do. A good overview can be found in (Berkes & Wiskott, 2005). This work follows the pattern of initializing neural networks with unsupervised learning (pretraining) before fine-tuning with a supervised learning criterion. Supervised gradient descent explores the parameter space sufficiently to get low training error on smaller training sets (tens of thousands of examples, like MNIST). However, models that have been pretrained with appropriate unsupervised learning procedures (such as RBMs and various forms of auto-encoders) generalize better (Hinton et al., 2006; Larochelle et al., 2007; Lee et al., 2008; Ranzato et al., 2008; Vincent et al., 2008). See Bengio (2009) for a comprehensive review and Erhan et al. (2009) for a thorough experimental analysis of the improvements obtained. It appears that unsupervised pretraining guides the learning dynamics in better regions of parameter space associated with basins of attraction of the supervised gradient procedure corresponding to local minima with lower generalization error, even for very large training sets (unlike other regularizers whose effects tend to quickly vanish on large training sets) with millions of examples. Recent work in the pretraining of neural networks has taken a generative modeling perspective. For example, the Restricted Boltzmann Machine is an undirected graphical model, and training it (by maximum likelihood) as such has been demonstrated to also be a good initialization. However, it is an interesting open question whether a better generative model is necessarily (or even typically) a better point of departure for fine-tuning. Contrastive divergence (CD) is not maximum likelihood, and works just fine as pretraining. Reconstruction error is an even poorer approximation of the maximum likelihood gradient, and sometimes works better than CD (with additional twists like sparsity or the denoising of (Vincent et al., 2008)). The temporal coherence and decorrelation criterion is an alternative to training generative models such as RBMs or auto-encoder variants. Recently (Mobahi et al., 2009) demonstrated that a slowness criterion regularizing the top-most internal layer of a deep convolutional network during supervised learning helps their model to generalize better. Our model is similar in spirit to pre-training with the semi-supervised embedding criterion at each level (Weston et al., 2008; Mobahi et al., 2009), but differs in the use of decorrelation as a mechanism for preventing trivial solutions to a slowness criterion. Whereas RBMs and denoising autoencoders are defined for general input distributions, the temporal coherence and decorrelation criterion makes sense only in the context of data with slowly-changing temporal or spatial structure, such as images, video, and sound. In the same way that simple cell models were the inspiration for sigmoidal activation units in artificial neural networks and validated simple cell models, we investigate in artificial neural network classifiers the value of complex cell models. This paper builds on these results by showing that the principle of temporal coherence is useful for finding initial conditions for the hidden layer of a neural network that biases it towards better generalization in object recognition. We introduce temporal coherence and decorrelation as a pretraining algorithm. Hidden units are initialized so that they are invariant to irrelevant transformations of the image, and sensitive to relevant ones. In order for this criterion to be useful in the context of large models, we derive a fast online algorithm for decorrelating units and maximizing temporal coherence. 2 Algorithm 2.1 Slow, decorrelated feature learning algorithm (K¨ording et al., 2004) introduced a principle (and training criterion) to explain the formation of complex cell receptive fields. They based their analysis on the complex-cell model of (Adelson & Bergen, 1985), which describes a complex cell as a pair of half-rectified linear filters whose outputs are squared and added together and then a square root is applied to that sum. Suppose x is an input image and we have F complex cells h1, ..., hF such that hi = p (ui · x)2 + (vi · x)2. (K¨ording et al., 2004) showed that by minimizing the following cost, LK2004 = α X i!=j Covt(hi, hj)2 Var(hi)Var(hj) + X t X i (hi,t −hi,t−1)2 Var(hi) (1) 2 over consecutive natural movie frames (with respect to model parameters), the filters ui and vi of each complex cell form local Gabor filters whose phases are offset by about 90 degrees, like the sine and cosine curves that implement a Fourier transform. The criterion in Equation 1 requires a batch minimization algorithm because of the variance and covariance statistics that must be collected. This makes the criterion too slow for use with large datasets. At the same time, the size of the covariance matrix is quadratic in the number of features, so it is computationally expensive (perhaps prohibitively) to apply the criterion to train large numbers of features. 2.1.1 Online Stochastic Estimation of Covariance This section presents an algorithm for approximately minimizing LK2004 using an online algorithm whose iterations run in linear time with respect to the number of features. One way to apply the criterion to large or infinite datasets is by estimating the covariance (and variance) from consecutive minibatches of N movie frames. Then the cost can be minimized by stochastic gradient descent. We used an exponentially-decaying moving average to track the mean of each feature over time. ¯hi(t) = ρ¯hi(t −1) + (1 −ρ)hi(t) For good results, ρ should be chosen so that the estimates change very slowly. We used a value of 1.0 −5.0 × 10−5. Then we estimated the variance of each feature over a minibatch like this: Var(h) ≈ 1 N −1 t+N−1 X τ=t (hi(t) −¯hi(t))2 With this mean and variance, we computed normalized features for each minibatch: zi(t) = (hi(t) −¯hi(t))/ p Var(h) + 10−10 Letting Z denote an F ×N matrix with N columns of F normalized feature values, we estimate the correlation between features hi by the covariance in these normalized features: C(t) = 1 N Z(t)Z(t)′. We can now write down L(t), a minibatch-wise approximation to Eq. 1: L(t) = α X i!=j C2 ij(t) + N−1 X τ=0 X i (zi(t + τ) −zi(t + τ −1))2 (2) The time complexity of evaluating L(t) from Z using this expression is O(FFN +NF). In practice we use small minibatches and our model has lots of features, so the fact that the time complexity of the algorithm is quadratic in F is troublesome. There is, however, a way to compute this value exactly in time linear in F. The key observation is that the sum of the squared elements of C can be computed from the N × N Gram matrix G(t) = Z(t)′Z(t). F X i=1 F X j=1 C2 ij(t) = Tr(C(t)C(t)) = 1 N 2 Tr(Z(t)Z(t)′Z(t)Z(t)′) = 1 N 2 Tr(Z(t)′Z(t)Z(t)′Z(t)) = 1 N 2 Tr(G(t)G(t)) = 1 N 2 Tr(G(t)G(t)′) = 1 N 2 N X k=1 N X l=1 G2 kl(t) .= 1 N 2 |Z(t)′Z(t)|2 3 Subtracting the C2 ii terms from the sum of all squared elements lets us rewrite Equation 2 in a way that suggests the linear-time implementation. L(t) = α N 2 |Z(t)Z′(t)|2 − F X i=1 ( N X τ=1 zi(τ)2)2 ! + 1 N −1 N−1 X τ=1 F X i=1 (zi(τ) −zi(τ −1))2 (3) The time complexity of computing L(t) using Equation 3 from Z(t) is O(NNF). The sum of squared correlations is still the most expensive term, but for the case where N << F, this expression makes L(t)’s computation linear in F. Considering that each iteration treats N training examples, the per-training-example cost of this algorithm can be seen as O(NF). In implementation, an additional factor of two in runtime can be obtained by only computing half of the Gram matrix G, which is symmetric. 2.2 Complex-cell activation function Recently, (Rust et al., 2005) have argued that existing models, such as that of (Adelson & Bergen, 1985) cannot account for the variety of behaviour found in visual area V1. Some complex cells behave like simple cells to some extent and vice versa; there is a continuous range of simple to complex cells. They put forward a similar but more involved expression that can capture the simple and complex cells as special cases, but ultimately parameterizes a larger class of cell-response functions (Eq. 4). a + β  max(0, wx)2 + PI i=1(u(i)x)2ζ −δ PJ j=1(v(j)x)2ζ 1 + γ  max(0, wx)2 + PI i=1(u(i)x)2 ζ + ϵ PJ j=1(v(j)x)2 ζ (4) The numerator in Eq 4 describes the difference between an excitation term and a shunting inhibition term. The denominator acts to normalize this difference. Parameters w, u(i), v(j) have the same shape as the input image x, and can be thought of as image filters like the first layer of a neural network or the codebook of a sparse-coding model. The parameters a, β, δ, γ, ϵ, ζ are scalars that control the range and shape of the activation function, given all the filter responses. The numbers I and J of quadratic filters required to explain a particular cellular response were on the order of 2-16. We introduce the approximation in Equation 5 because it is easier to learn by gradient descent. We replaced the max operation with a softplus(x) = log(1 + ex) function so that there is always a gradient on w and b, even when wx + b is negative. We fixed the scalar parameters to prevent the system from entering regimes of extreme non-linearity. We fixed β, δ, γ, ϵ to 1, and a to 0. We chose to fix the exponent ζ to 0.5 because (Rust et al., 2005) found that values close to 0.5 offered good fits to cell firing-rate data. Future work might look at choosing these constants in a principled way or adapting them; we found that these values worked well. The range of this activation function (as a function of x) is a connected set on the (−1, 1) interval. However, the whole (−1, 1) range is not always available, depending on the parameters. If the inhibition term is always 0 for example, then the activation function will be non-negative. q log(1 + ewx+b)2 + PI i=1(u(i)x)2 − qPJ j=1(v(j)x)2 1.0 + q log(1 + ewx+b)2 + PI i=1(u(i)x)2 + qPJ j=1(v(j)x)2 (5) 3 Results Classification results were obtained by adding a logistic regression model on top of the features learned, and treating the resulting model as a single-hidden-layer neural network. The weights of the logistic regression were always initialized to zero. All work was done on 28x28 images (MNIST-sized), using a model with 300 hidden units. Each hidden unit had one linear filter w, a bias b, two quadratic excitatory filters u1, u2 and two quadratic inhibitory filters v1, v2. The computational cost of evaluating each unit was thus five times the cost of evaluating a normal sigmoidal activation function of the form tanh(w′x + b). 4 3.1 Random initialization As a baseline, our model parameters were initialized to small random weights and used as the hidden layer of a neural network. Training this randomly-initialized model by stochastic gradient descent yielded test-set performance of 1.56% on MNIST. The filters learned by this procedure looked somewhat noisy for the most part, but had low-frequency trends. For example, some of the quadratic filters had small local Gabor-like filters. We believe that these phase-offset pairs of Gabor-like functions allow the units to implement some shift-invariant response to edges with a specific orientation (Fig. 1). Figure 1: Four of the three hundred activation functions learned by training our model from random initialization to perform classification. Top row: the red and blue channels are the two quadratic filters of the excitation term. Bottom row: the red and blue channels are the two quadratic filters of the shunting inhibition term. Training approximately yields locally orientation-selective edge filters, opposite-orientation edges are inhibitory. 3.2 Pretraining with natural movies Under the hypothesis that the matched Gabor functions (see Fig. 1) allowed our model to generalize better across slight translations of the image, we appealed to a pretraining process to initialize our model with values better than random noise. We pretrained the hidden layer according to the online version of the cost in Eq. 3, using movies (MIXED-movies) made by sliding a 28 x 28 pixel window across large photographs. Each of these movies was short (just four frames long) and ten movies were used in each minibatch (N = 40). The sliding speed was sampled uniformly between 0.5 and 2 pixels per frame. The sliding direction was sampled uniformly from 0 to 2π. The sliding initial position was sampled uniformly from image coordinates. Any sampled movie that slid off of the underlying image was rejected. We used two photographs to generate the movies. The first photograph was a grey-scale forest scene (resolution 1744x1308). The second photograph was a tiling of 100x100 MNIST digits (resolution 2800x2800). As a result of this procedure, digits are not at all centered in MIXED-movies: there might part of a ’3’ in the upper-left part of a frame, and part of a ’7’ in the lower right. The shunting inhibition filters (v1, v2) learned after five hundred thousand movies (fifty thousand iterations of stochastic gradient descent) are shown in Figure 2. The filters learn to implement orientation-selective, shift-invariant filters at different spatial frequencies. The filters shown in figure 2 have fairly global receptive fields, but smaller more local receptive fields were obtained by applying ℓ1 weight-penalization during pretraining. The α parameter that balances decorrelation and slowness was chosen manually on the basis of the trained filters. We were looking for a diversity of filters with relatively low spatial frequency. The excitatory filters learned similar Gabor pairs but the receptive fields tended to be both smaller (more localized) and lower-frequency. Fine-tuning this pre-trained model with a learning rate of 0.003 with L1 weight decay of 10−5 yielded a test error rate of 1.34% on MNIST. 3.3 Pretraining with MNIST movies We also tried pretraining with videos whose frames follow a similar distribution to the images used for fine-tuning and testing. We created MNIST movies by sampling an image from the training set, and moving around (translating it) according to a Brownian motion. The initial velocity was sampled from a zero-mean normal distribution with std-deviation 0.2. Changes in that velocity between each 5 Figure 2: Filters from some of the units of the model, pretrained on small sliding image patches from two large images. The features learn to be direction-selective for moving edges by approximately implementing windowed Fourier transforms. These features have global receptive field, but become more local when an ℓ1 weight penalization is applied during pretraining. Excitatory filters looked similar, but tended to be more localized and with lower spatial frequency (fewer, shorter, broader stripes). Columns of the figure are arranged in triples: linear filter w in grey, u(1), u(2) in red and green, v(1), v(2) in blue and green. frame were sampled from zero-mean normal distribution with std-deviation 0.2. Furthermore, the digit image in each frame was modified according to a randomly chosen elastic deformation, as in (Loosli et al., 2007). As before, movies of four frames were created in this way and training was conducted on minibatches of ten movies (N = 4 ∗10 = 40). Unlike the mnist frames in MIXED-movies, the frames of MNIST-movies contain a single digit that is approximately centered. The activation functions learned by minimizing Equation 3 on these MNIST movies were qualitatively different from the activation functions learned from the MIXED movies. The inhibitory weights (v1, v2) learned from MNIST movies are shown in 3. Once again, the inhibitory weights exhibit the narrow red and green stripes that indicate edge-orientation selectivity. But this time they are not parallel straight stripes, they follow contours that are adapted to digit edges. The excitation filters u1, u2 were also qualitatively different. Instead of forming localized Gabor pairs, some formed large smooth blob-like shapes but most converged toward zero. Fine-tuning this pre-trained model with a learning rate of 0.003 with L1 weight decay of 10−5 yielded a test error rate of 1.37 % on MNIST. Figure 3: Filters of our model, pretrained on movies of centered MNIST training images subjected to Brownian translation. The features learn to be direction-selective for moving edges by approximately implementing windowed Fourier transforms. The filters are tuned to the higher spatial frequency in MNIST digits, as compared with the natural scene. Columns of the figure are arranged in triples: linear filter w in grey, u(1), u(2) in red and green, v(1), v(2) in blue and green. 6 Table 1: Generalization error (% error) from 100 labeled MNIST examples after pretraining on MIXED-movies and MNIST-movies. Pre-training Dataset Number of pretraining iterations (×104) 0 1 2 3 4 5 MIXED-movies 23.1 21.2 20.8 20.8 20.6 20.6 MNIST-movies 23.1 19.0 18.7 18.8 18.4 18.6 4 Discussion The results on MNIST compare well with many results in the literature. A single-hidden layer neural network of sigmoidal units can achieve 1.8% error by training from random initial conditions, and our model achieves 1.5% from random initial conditions. A single-hidden layer sigmoidal neural network pretrained as a denoising auto-encoder (and then fine-tuned) can achieve 1.4% error on average, and our model is able to achieve 1.34% error from many different fine-tuned models (Erhan et al., 2009). Gaussian SVMs trained just on the original MNIST data achieve 1.4%; our pretraining strategy allows our single-layer model be better than Gaussian SVMs (Decoste & Sch¨olkopf, 2002). Deep learning algorithms based on denoising auto-encoders and RBMs are typically able to achieve slightly lower scores in the range of 1.2 −1.3% (Hinton et al., 2006; Erhan et al., 2009). The best convolutional architectures and models that have access to enriched datasets for fine-tuning can achieve classification accuriacies under 0.4% (Ranzato et al., 2007). In future work, we will explore strategies for combining these methods and with our decorrelation criterion to train deep networks of models with quadratic input interactions. We will also look at comparative performance on a wider variety of tasks. 4.1 Transfer learning, the value of pretraining To evaluate our unsupervised criterion of slow, decorrelated features as a pretraining step for classification by a neural network, we fine-tuned the weights obtained after ten, twenty, thirty, forty, and fifty thousand iterations of unsupervised learning. We used only a small subset (the first 100 training examples) from the MNIST data to magnify the importance of pre-training. The results are listed in Table 1. Training from random weights initial led to 23.1 % error. The value of pretraining is evident right away: after two unsupervised passes over the MNIST training data (100K movies and 10K iterations), the weights have been initialized better. Fine-tuning the weights learned on the MIXED-movies led to test error rate of 21.2%, and fine-tuning the weights learned on the MNIST-movies led to a test error rate of 19.0%. Further pretraining offers a diminishing marginal return, although after ten unsupervised passes through the training data (500K movies) there is no evidence of over-pretraining. The best score (20.6%) on MIXED-movies occurs at both eight and ten unsupervised passes, and the best score on MNIST-movies (18.4%) occurs after eight. A larger test set would be required to make a strong conclusion about a downward trend in test set scores for larger numbers of pretraining iterations. The results with MNIST-movies pretraining are slightly better than MIXED-movies but these results suggest strong transfer learning: the videos featuring digits in random locations and natural image patches are almost as good for pretraining as compared with videos featuring images very similar to those in the test set. 4.2 Slowness in normalized features encourages binary activations Somewhat counter-intuitively, the slowness criterion requires movement in the features h. Suppose a feature hi has activation levels that are normally distributed around 0.1 and 0.2, but the activation at each frame of a movie is independent of previous frames. Since the features has a small variance, then the normalized feature zi will oscillate in the same way, but with unit variance. This will cause zi(t) −zi(t −1) to be relatively high, and for our slowness criterion not to be well satisfied. In this way the lack of variance in hi can actually make for a relatively fast normalized feature zi rather than a slow one. However, if hi has activation levels that are normally distributed around .1 and .2 for some image sequences and around .8 and .9 for other image sequences, the marginal variance in hi will be larger. 7 The larger marginal variance will make the oscillations between .1 and .2 lead to much smaller changes in the normalized feature zi(t). In this sense, the slowness objective can be maximally satisfied by features hi(t) that take near-minimum and near-maximum values for most movies, and never transition from a near-minimum to a near-maximum value during a movie. When training on multiple short videos instead of one continuous one, it is possible for large changes in normalized-feature-activation never [or rarely] to occur during a video. Perhaps this is one of the roles of saccades in the visual system: to suspend the normal objective of temporal coherence during a rapid widespread change of activation levels. 4.3 Eigenvalue interpretation of decorrelation term What does our unsupervised cost mean? One way of thinking about the decorrelation term (first term in Eq. 1) which helped us to design an efficient algorithm for computing it, is to think of it as flattening the eigen-spectrum of the correlation matrix of our features h (over time). It is helpful to rewrite this cost in terms of normalized features: zi = hi−¯ hi σi , and to consider that we sum over all the elements of the correlation matrix including the diagonal. X i!=j Covt(hi, hj)2 Var(hi)Var(hj) = 2 F −1 X i=1 F X j=i+1 Covt(zi, zj)2 =   F X i=1 F X j=1 Covt(zi, zj)2  −F If we use C to denote the matrix whose i, j entry is Covt(zi, zj), and we use U ′ΛU to denote the eigen-decomposition of C, then we can transform this sum over i! = j further. ( F X i=1 F X j=1 Covt(zi, zj)2) −F = Tr(C′C) −F = Tr(CC) −F = Tr(U ′ΛUU ′ΛU) −F = Tr(UU ′ΛUU ′Λ) −F = F X k=1 Λ2 k −F We can interpret the first term of Eq. 1 as penalizing the squared eigenvalues of the covariance matrix between features in a normalized feature space (z as opposed to h), or as minimizing the squared eigenvalues of the correlation matrix between features h. 5 Conclusion We have presented an activation function for use in neural networks that is a simplification of a recent rate model of visual area V1 complex cells. This model learns shift-invariant, orientationselective edge filters from purely supervised training on MNIST and achieves lower generalization error than conventional neural nets. Temporal coherence and decorrelation has been put forward as a principle for explaining the functional behaviour of visual area V1 complex cells. We have described an online algorithm for minimizing correlation that has linear time complexity in the number of hidden units. Pretraining our model with this unsupervised criterion yields even lower generalization error: better than Gaussian SVMs, and competitive with deep denoising auto-encoders and 3-layer deep belief networks. The good performance of our model compared with poorer approximations of V1 is encouraging machine learning research inspired by neural information processing in the brain. It also helps to validate the corresponding computational neuroscience theories by showing that these neuron activations and unsupervised criteria have value in terms of learning. Acknowledgments This research was performed thanks to funding from NSERC, MITACS, and the Canada Research Chairs. 8 References Adelson, E. H., & Bergen, J. R. (1985). Spatiotemporal energy models for the perception of motion. Journal of the Optical Society of America, 2, 284–99. Becker, S., & Hinton, G. E. (1993). Learning mixture models of spatial coherence. Neural Computation, 5, 267–277. Bengio, Y. (2009). Learning deep architectures for AI. Foundations and Trends in Machine Learning, to appear. Berkes, P., & Wiskott, L. (2005). Slow feature analysis yields a rich repertoire of complex cell properties. Journal of Vision, 5, 579–602. Cadieu, C., & Olshausen, B. (2009). Learning transformational invariants from natural movies. In Advances in neural information processing systems 21 (nips’08), 209–216. MIT Press. Dayan, P., & Abbott, L. F. (2001). Theoretical neuroscience. The MIT Press. Decoste, D., & Sch¨olkopf, B. (2002). Training invariant support vector machines. Machine Learning, 46, 161–190. Erhan, D., Manzagol, P.-A., Bengio, Y., Bengio, S., & Vincent, P. (2009). The difficulty of training deep architectures and the effect of unsupervised pre-training. AISTATS’2009 (pp. 153–160). Clearwater (Florida), USA. Finn, I., & Ferster, D. (2007). Computational diversity in complex cells of cat primary visual cortex. Journal of Neuroscience, 27, 9638–48. Hinton, G. E., Osindero, S., & Teh, Y. (2006). A fast learning algorithm for deep belief nets. Neural Computation, 18, 1527–1554. Hurri, J., & Hyv¨arinen, A. (2003). Temporal coherence, natural image sequences, and the visual cortex. Advances in Neural Information Processing Systems 15 (NIPS’02) (pp. 141–148). K¨ording, K. P., Kayser, C., Einh¨auser, W., & K¨onig, P. (2004). How are complex cell properties adapted to the statistics of natural stimuli? Journal of Neurophysiology, 91, 206–212. Kouh, M. M., & Poggio, T. T. (2008). A canonical neural circuit for cortical nonlinear operations. Neural Computation, 20, 1427–1451. Larochelle, H., Erhan, D., Courville, A., Bergstra, J., & Bengio, Y. (2007). An empirical evaluation of deep architectures on problems with many factors of variation. ICML 2007 (pp. 473–480). Corvallis, OR: ACM. Lee, H., Ekanadham, C., & Ng, A. (2008). Sparse deep belief net model for visual area V2. In Advances in neural information processing systems 20 (nips’07). Cambridge, MA: MIT Press. Loosli, G., Canu, S., & Bottou, L. (2007). Training invariant support vector machines using selective sampling. In L. Bottou, O. Chapelle, D. DeCoste and J. Weston (Eds.), Large scale kernel machines, 301–320. Cambridge, MA.: MIT Press. Mobahi, H., Collobert, R., & Weston, J. (2009). Deep learning from temporal coherence in video. ICML 2009. ACM. To appear. Ranzato, M., Boureau, Y., & LeCun, Y. (2008). Sparse feature learning for deep belief networks. NIPS 20. Ranzato, M., Poultney, C., Chopra, S., & LeCun, Y. (2007). Efficient learning of sparse representations with an energy-based model. NIPS 19. Riesenhuber, M., & Poggio, T. (1999). Hierarchical models of object recognition in cortex. Nature Neuroscience, 2, 1019–1025. Rust, N., Schwartz, O., Movshon, J. A., & Simoncelli, E. (2005). Spatiotemporal elements of macaque V1 receptive fields. Neuron, 46, 945–956. Vincent, P., Larochelle, H., Bengio, Y., & Manzagol, P.-A. (2008). Extracting and composing robust features with denoising autoencoders. ICML 2008 (pp. 1096–1103). ACM. Weston, J., Ratle, F., & Collobert, R. (2008). Deep learning via semi-supervised embedding. ICML 2008 (pp. 1168–1175). New York, NY, USA: ACM. Wiskott, L., & Sejnowski, T. (2002). Slow feature analysis: Unsupervised learning of invariances. Neural Computation, 14, 715–770. 9
2009
7
3,821
Decoupling Sparsity and Smoothness in the Discrete Hierarchical Dirichlet Process Chong Wang Computer Science Department Princeton University chongw@cs.princeton.edu David M. Blei Computer Science Department Princeton University blei@cs.princeton.edu Abstract We present a nonparametric hierarchical Bayesian model of document collections that decouples sparsity and smoothness in the component distributions (i.e., the “topics”). In the sparse topic model (sparseTM), each topic is represented by a bank of selector variables that determine which terms appear in the topic. Thus each topic is associated with a subset of the vocabulary, and topic smoothness is modeled on this subset. We develop an efficient Gibbs sampler for the sparseTM that includes a general-purpose method for sampling from a Dirichlet mixture with a combinatorial number of components. We demonstrate the sparseTM on four real-world datasets. Compared to traditional approaches, the empirical results will show that sparseTMs give better predictive performance with simpler inferred models. 1 Introduction The hierarchical Dirichlet process (HDP) [1] has emerged as a powerful model for the unsupervised analysis of text. The HDP models documents as distributions over a collection of latent components, which are often called “topics” [2, 3]. Each word is assigned to a topic, and is drawn from a distribution over terms associated with that topic. The per-document distributions over topics represent systematic regularities of word use among the documents; the per-topic distributions over terms encode the randomness inherent in observations from the topics. The number of topics is unbounded. Given a corpus of documents, analysis proceeds by approximating the posterior of the topics and topic proportions. This posterior bundles the two types of regularity. It is a probabilistic decomposition of the corpus into its systematic components, i.e., the distributions over topics associated with each document, and a representation of our uncertainty surrounding observations from each of those components, i.e., the topic distributions themselves. With this perspective, it is important to investigate how prior assumptions behind the HDP affect our inferences of these regularities. In the HDP for document modeling, the topics are typically assumed drawn from an exchangeable Dirichlet, a Dirichlet for which the components of the vector parameter are equal to the same scalar parameter. As this scalar parameter approaches zero, it affects the Dirichlet in two ways. First, the resulting draws of random distributions will place their mass on only a few terms. That is, the resulting topics will be sparse. Second, given observations from such a Dirichlet, a small scalar parameter encodes increased confidence in the estimate from the observed counts. As the parameter approaches zero, the expectation of each per-term probability becomes closer to its empirical estimate. Thus, the expected distribution over terms becomes less smooth. The single scalar Dirichlet parameter affects both the sparsity of the topics and smoothness of the word probabilities within them. When employing the exchangeable Dirichlet in an HDP, these distinct properties of the prior have consequences for both the global and local regularities captured by the model. Globally, posterior inference will prefer more topics because more sparse topics are needed to account for the observed 1 words of the collection. Locally, the per-topic distribution over terms will be less smooth—the posterior distribution has more confidence in its assessment of the per-topic word probabilities—and this results in less smooth document-specific predictive distributions. The goal of this work is to decouple sparsity and smoothness in the HDP. With the sparse topic model (sparseTM), we can fit sparse topics with more smoothing. Rather than placing a prior for the entire vocabulary, we introduce a Bernoulli variable for each term and each topic to determine whether or not the term appears in the topic. Conditioned on these variables, each topic is represented by a multinomial distribution over its subset of the vocabulary, a sparse representation. This prior smoothes only the relevant terms and thus the smoothness and sparsity are controlled through different hyper-parameters. As we will demonstrate, sparseTMs give better predictive performance with simpler models than traditional approaches. 2 Sparse Topic Models Sparse topic models (sparseTMs) aim to separately control the number of terms in a topic, i.e., sparsity, and the probabilities of those words, i.e., smoothness. Recall that a topic is a pattern of word use, represented as a distribution over the fixed vocabulary of the collection. In order to decouple smoothness and sparsity, we define a topic on a random subset of the vocabulary (giving sparsity), and then model uncertainty of the probabilities on that subset (giving smoothness). For each topic, we introduce a Bernoulli variable for each term in the vocabulary that decides whether the term appears in the topic. Similar ideas of using Bernoulli variables to represent “on” and “off” have been seen in several other models, such as the noisy-OR model [4] and aspect Bernoulli model [5]. We can view this approach as a particular “spike and slab” prior [6] over Dirichlet distributions. The “spike” chooses the terms for the topic; the “slab” only smoothes those terms selected by the spike. Assume the size of the vocabulary is V . A Dirichlet distribution over the topic is defined on a V −1-simplex, i.e., β ∼Dirichlet(γ1), (1) where 1 is a V -length vector of 1s. In an sparseTM, the idea of imposing sparsity is to use Bernoulli variables to restrict the size of the simplex over which the Dirichlet distribution is defined. Let b be a V -length binary vector composed of V Bernoulli variables. Thus b specifies a smaller simplex through the “on”s of its elements. The Dirichlet distribution over the restricted simplex is β ∼Dirichlet(γb), (2) which is a degenerate Dirichlet distribution over the sub-simplex specified by b. In [7], Friedman and Singer use this type of distributions for language modeling. Now we introduce the generative process of the sparseTM. The sparseTM is built on the hierarchical Dirichlet process for text, which we shorthand HDP-LDA. 1 In the Bayesian nonparametric setting the number of topics is not specified in advance or found by model comparison. Rather, it is inferred through posterior inference. The sparseTM assumes the following generative process: 1. For each topic k ∈{1, 2, . . .}, draw term selection proportion πk ∼Beta(r, s). (a) For each term v, 1 ≤v ≤V , draw term selector bkv ∼Bernoulli(πk). (b) Let bV +1 = 1[PV v=1 bkv = 0] and bk = [bkv]V +1 v=1 . Draw topic distribution βk ∼Dirichlet(γbk). 2. Draw stick lengths α ∼GEM(λ), which are the global topic proportions. 3. For document d: (a) Draw per-document topic proportions θd ∼DP(τ, α). (b) For the ith word: i. Draw topic assignment zdi ∼Mult(θd). ii. Draw word wdi ∼Mult(βzdi) Figure 1 illustrates the sparseTM as a graphical model. 1This acronym comes from the fact that the HDP for text is akin to a nonparametric Bayesian version of latent Dirichlet allocation (LDA). 2 Figure 1: A graphical model representation for sparseTMs. The distinguishing feature of the sparseTM is step 1, which generates the latent topics in such a way that decouples sparsity and smoothness. For each topic k there is a corresponding Beta random variable πk and a set of Bernoulli variables bkvs, one for each term in the vocabulary. Define the sparsity of the topic as sparsityk ≜1 −PV v=1 bkv/V. (3) This is the proportion of zeros in its bank of Bernoulli random variables. Conditioned on the Bernoulli parameter πk, the expectation of the sparsity is E [sparsityk|πk] = 1 −πk. (4) The conditional distribution of the topic βk given the vocabulary subset bk is Dirichlet(γbk). Thus, topic k is represented by those terms with non-zero bkvs, and the smoothing is only enforced over these terms through hyperparameter γ. Sparsity, which is determined by the pattern of ones in bk, is controlled by the Bernoulli parameter. Smoothing and sparsity are decoupled. One nuance is that we introduce bV +1 = 1[PV v=1 bkv = 0]. The reason is that when bk,1:V = 0, Dirichlet(γbk,1:V ) is not well defined. The term bV +1 extends the vocabulary to V + 1 terms, where the V + 1th term never appears in the documents. Thus, Dirichlet(γbk,1:V +1) is always well defined. We next compute the marginal distribution of βk, after integrating out Bernoullis bk and their parameter πk: p(βk |γ, r, s) = Z dπk p(βk |γ, πk)p(πk|r, s) = X bk p(βk |γ, bk) Z dπk p(bk|πk)p(πk|r, s). We see that p(βk |γ, r, s) and p(βk |γ, πk) are mixtures of Dirichlet distributions, where the mixture components are defined over simplices of different dimensions. In total, there are 2V components; each configuration of Bernoulli variables bk specifies one particular component. In posterior inference we will need to sample from this distribution. Sampling from such a mixture is difficult in general, due to the combinatorial sum. In the supplement, we present an efficient procedure to overcome this issue. This is the central computational challenge for the sparseTM. Step 2 and 3 mimic the generative process of HDP-LDA [1]. The stick lengths α come from a Griffiths, Engen, and McCloskey (GEM) distribution [8], which is drawn using the stick-breaking construction [9], ηk ∼Beta(1, λ), αk = ηk Qk−1 j=1(1 −ηj), k ∈{1, 2, . . . }. Note that P k αk = 1 almost surely. The stick lengths are used as a base measure in the Dirichlet process prior on the per-document topic proportions, θd ∼DP(τ, α). Finally, the generative process for the topic assignments z and observed words w is straightforward. 3 Approximate posterior inference using collapsed Gibbs sampling Since the posterior inference is intractable in sparseTMs, we turn to a collapsed Gibbs sampling algorithm for posterior inference. In order to do so, we integrate out topic proportions θ, topic distributions β and term selectors b analytically. The latent variables needed by the sampling algorithm 3 are stick lengths α, Bernoulli parameter π and topic assignment z. We fix the hyperparameter s equal to 1. To sample α and topic assignments z, we use the direct-assignment method, which is based on an analogy to the Chinese restaurant franchise (CRF) [1]. To apply direct assignment sampling, an auxiliary table count random variable m is introduced. In the CRF setting, we use the following notation. The number of customers in restaurant d (document) eating dish k (topic) is denoted ndk, and nd· denotes the number of customers in restaurant d. The number of tables in restaurant d serving dish k is denoted mdk, md· denotes the number of tables in restaurant d, m·k denotes the number of tables serving dish k, and m·· denotes the total number of tables occupied. (Marginal counts are represented with dots.) Let K be the current number of topics. The function n(v) k denotes the number of times that term v has been assigned to topic k, while n(·) k denotes the number of times that all the terms have been assigned to topic k. Index u is used to indicate the new topic in the sampling process. Note that direct assignment sampling of α and z is conditioned on π. The crux for sampling stick lengths α and topic assignments z (conditioned on π) is to compute the conditional density of wdi under the topic component k given all data items except wdi as, f −wdi k (wdi = v|πk) ≜p(wdi = v|{wd′i′, zd′i′ : zd′i′ = k, d′i′ ̸= di}, πk). (5) The derivation of equations for computing this conditional density is detailed in the supplement.2 We summarize our findings as follows. Let V ≜{1, . . . , V } be the set of vocabulary terms, Bk ≜{v : n(v) k,−di > 0, v ∈V} be the set of terms that have word assignments in topic k after excluding wdi and |Bk| be its cardinality. Let’s assume that Bk is not an empty set.3 We have the following, f −wdi k (wdi = v|πk) ∝  (n(v) k,−di + γ)E [gBk(X)|πk] if v ∈Bk γπkE [g ¯ Bk( ¯X)|πk] otherwise. , (6) where gBk(x) = Γ((|Bk| + x)γ) Γ(n(·) k,−di + 1 + (|Bk| + x)γ) , X | πk ∼Binomial(V −|Bk|, πk), ¯X | πk ∼Binomial(V −| ¯Bk|, πk), (7) and where ¯Bk = Bk ∪{v}. Further note Γ(·) is the Gamma function and n(v) k,−di describes the corresponding count excluding word wdi. In the supplement, we also show that E [gBk(X)|πk] > πkE [g ¯ Bk( ¯X)|πk]. The central difference between the algorithms for HDP-LDA and the sparseTM is conditional probability in Equation 6 which depends on the selector variables and selector proportions. We now describe how we sample stick lengths α and topic assignments z. This is similar to the sampling procedure for HDP-LDA [1]. Sampling stick lengths α. Although α is an infinite-length vector, the number of topics K is finite at every point in the sampling process. Sampling α can be replaced by sampling α ≜ [α1, . . . , αK, αu] [1]. That is, α | m ∼Dirichlet(m·1, . . . , m·K, λ). (8) Sampling topic assignments z. This is similar to the sampling approach for HDP-LDA [1] as well. Using the conditional density f defined Equation 5 and 6, we have p(zdi = k|z−di, m, α, πk) ∝  (ndk,−di + ταk)f −wdi k (wdi|πk) if k previously used, ταuf −wdi u (wdi|πu) k = u. (9) If a new topic knew is sampled, then sample κ ∼Beta(1, λ), and let αknew = καu and αunew = (1 −κ)αu. 2Note we integrate out βk and bk. Another sampling strategy is to sample b (by integrating out π) and the Gibbs sampler is much easier to derive. However, conditioned on b, sampling z will be constrained to a smaller set of topics (specified by the values of b), which slows down convergence of the sampler. 3In the supplement, we show that if Bk is an empty set, the result is trivial. 4 Sampling Bernoulli parameter π. To sample πk, we use bk as an auxiliary variable. Note that bk was integrated out earlier. Recall Bk is the set of terms that have word assignments in topic k. (This time, we don’t need to exclude certain words since we are sampling π.) Let Ak = {v : bkv = 1, v ∈ V} be the set of the indices of bk that are “on”, the joint conditional distribution of πk and bk is p(πk, bk|rest) ∝p(bk|πk)p(πk|r)p({wdi : zdi = k}|bk, {zdi : zdi = k}) = p(bk|πk)p(πk|r) Z dβk p({wdi : zdi = k}|βk, {zdi : zdi = k})p(βk|bk) = p(bk|πk)p(πk|r)1Bk⊂AkΓ(|Ak|γ) Q v∈Ak Γ(n(v) k + γ) Γ|Ak|(γ)Γ(n(·) k + |Ak|γ) = p(bk|πk)p(πk|r)1Bk⊂AkΓ(|Ak|γ) Q v∈Bk Γ(n(v) k + γ) Γ|Bk|(γ)Γ(n(·) k + |Ak|γ) ∝ Y v p(bkv|πk)p(πk|r)1Bk⊂AkΓ(|Ak|γ) Γ(n(·) k + |Ak|γ) , (10) where 1Bk⊂Ak is an indicator function and |Ak| = P v bkv. This follows because if Ak is not a super set of Bk, there must be a term, say v in Bk but not in Ak, causing βkv = 0, a.s., and then p({wdi : (d, i) ∈Zk}|βk, {zdi : (d, i) ∈Zk}) = 0 a.s.. Using this joint conditional distribution4 , we iteratively sample bk conditioned on πk and πk conditioned on bk to ultimately obtain a sample from πk. Others. Sampling the table counts m is exactly the same as for the HDP [1], so we omit the details here. In addition, we can sample the hyper-parameters λ, τ and γ. For the concentration parameters λ and τ in both HDP-LDA and sparseTMs, we use previously developed approaches for Gamma priors [1, 10]. For the Dirichlet hyper-parameter γ, we use Metropolis-Hastings. Finally, with any single sample we can estimate topic distributions β from the value topic assignments z and term selector b by ˆβk,v = n(v) k + bk,vγ n(·) k + P v bkvγ , (11) where we can smooth only those terms that are chosen to be in the topics. Note that we can obtain the samples of b when sampling the Bernoulli parameter π. 4 Experiments In this section, we studied the performance of the sparseTM on four datasets and demonstrated how sparseTM decouples the smoothness and sparsity in the HDP.5 We placed Gamma(1, 1) priors over the hyper-parameters λ and τ. The sparsity proportion prior was a uniform Beta, i.e., r = s = 1. For hyper-parameter γ, we use Metropolis-Hastings sampling method using symmetric Gaussian proposal with variance 1.0. A disadvantage of sparseTM is that its running speed is about 4-5 times slower than the HDP-LDA. 4.1 Datasets The four datasets we use in the experiments are: 1. The arXiv data set contains 2500 (randomly sampled) online research abstracts (http://arxiv.org). It has 2873 unique terms, around 128K observed words and an average of 36 unique terms per document. 4In our experiments, we used the algorithm described in the main text to sample π. We note that an improved algorithm might be achieved by modeling the joint conditional distribution of πk and P v bkv instead, i.e., p(πk, P v bkv|rest), since sampling πk only depends on P v bkv. 5Other experiments, which we don’t report here, also showed that the finite version of sparseTM outperforms LDA with the same number of topics. 5 2. The Nematode Biology data set contains 2500 (randomly sampled) research abstracts (http://elegans.swmed.edu/wli/cgcbib). It has 2944 unique terms, around 179K observed words and an average of 52 unique terms per document. 3. The NIPS data set contains the NIPS articles published between 1988-1999 (http://www.cs.utoronto.ca/∼sroweis/nips). It has 5005 unique terms and around 403K observed words. We randomly sample 20% of the words for each paper and this leads to an average of 150 unique terms per document. 4. The Conf. abstracts set data contains abstracts (including papers and posters) from six international conferences: CIKM, ICML, KDD, NIPS, SIGIR and WWW (http://www.cs.princeton.edu/∼chongw/data/6conf.tgz). It has 3733 unique terms, around 173K observed words and an average of 46 unique terms per document. The data are from 2005-2008. For all data, stop words and words occurring fewer than 10 times were removed. 4.2 Performance evaluation and model examinations We studied the predictive performance of the sparseTM compared to HDP-LDA. On the training documents our Gibbs sampler uses the first 2000 steps as burn-in, and we record the following 100 samples as samples from the posterior. Conditioned on these samples, we run the Gibbs sampler for test documents to estimate the predictive quantities of interest. We use 5-fold cross validation. We study two predictive quantities. First, we examine overall predictive power with the predictive perplexity of the test set given the training set. (This is a metric from the natural language literature.) The predictive perplexity is perplexitypw = exp ( − P d∈Dtest log p(wd|Dtrain) P d∈Dtest Nd ) . Lower perplexity is better. Second, we compute model complexity. Nonparametric Bayesian methods are often used to sidestep model selection and integrate over all instances (and all complexities) of a model at hand (e.g., the number of clusters). The model, though hidden and random, still lurks in the background. Here we study its posterior distribution with the desideratum that between two equally good predictive distributions, a simpler model—or a posterior peaked at a simpler model—is preferred. To capture model complexity we first define the complexity of topic. Recall that each Gibbs sample contains a topic assignment z for every observed word in the corpus (see Equation 9). The topic complexity is the number of unique terms that have at least one word assigned to the topic. This can be expressed as a sum of indicators, complexityk = P d 1 [(P n 1[zd,n = k]) > 0] , where recall that zd,n is the topic assignment for the nth word in document d. Note a topic with no words assigned to it has complexity zero. For a particular Gibbs sample, the model complexity is the sum of the topic complexities and the number of topics. Loosely, this is the number of free parameters in the “model” that the nonparametric Bayesian method has selected, which is complexity = #topics + P k complexityk. (12) We performed posterior inference with the sparseTM and HDP-LDA, computing predictive perplexity and average model complexity with 5-fold cross validation. Figure 2 illustrates the results. Perplexity versus Complexity. Figure 2 (first row) shows the model complexity versus predictive perplexity for each fold: Red circles represent sparseTM, blue squares represent HDP-LDA, and the dashed line connecting a red circle and blue square indicates the that the two are from the same fold. These results shows that the sparseTM achieves better perplexity than HDP-LDA, and at simpler models. (To see this, notice that all the connecting lines going from HDP-LDA to sparseTM point down and to the left.) 6 G G G G G G G G G G 18000 20000 22000 1150 1200 1250 1300 arXiv complexity perplexity stm hdp−lda G G G G G G G G G G G G G G G 16000 17000 18000 19000 700 750 800 850 Nematode Biology complexity stm hdp−lda G G G G G G G G G G G G G G G 34000 40000 46000 1350 1450 NIPS complexity stm hdp−lda G G G G G GG G G G G G G G G 19000 21000 23000 920 960 1000 1040 Conf. abstracts complexity stm hdp−lda G G G G G G HDP−LDA STM 0.01 0.03 0.05 γ HDP−LDA STM 0.02 0.04 0.06 0.08 GG HDP−LDA STM 0.00 0.04 0.08 0.12 G HDP−LDA STM 0.01 0.03 HDP−LDA STM 800 900 1100 #topics G HDP−LDA STM 500 600 700 HDP−LDA STM 800 1200 1600 G HDP−LDA STM 800 1000 1200 G HDP−LDA STM 18 20 22 24 26 28 #terms per topic G HDP−LDA STM 24 26 28 30 HDP−LDA STM 30 35 40 G HDP−LDA STM 18 20 22 Figure 2: Experimental results for sparseTM (shortened as STM in this figure) and HDP-LDA on four datasets. First row. The scatter plots of model complexity versus predictive perplexity for 5-fold cross validation: Red circles represent the results from sparseTM, blue squares represent the results from HDP-LDA and the dashed lines connect results from the same fold. Second row. Box plots of the hyperparameter γ values. Third row. Box plots of the number of topics. Fourth row. Box plots of the number of terms per topic. Hyperparameter γ, number of topics and number of terms per topic. Figure 2 (from the second to fourth rows) shows the Dirichlet parameter γ and posterior number of topics for HDP-LDA and sparseTM. HDP-LDA tends to have a very small γ in order to attain a reasonable number of topics, but this leads to less smooth distributions. In contrast, sparseTM allows a larger γ and selects more smoothing, even with a smaller number of topics. The numbers of terms per topic for two models don’t have a consistent trend, but they don’t differ too much either. Example topics. For the NIPS data set, we provide some example topics (with top 15 terms) discovered by HDP-LDA and sparseTM in Table 1. Accidentally, we found that HDP-LDA seems to produce more noisy topics, such as, those shown in Table 2. 7 sparseTM HDP-LDA sparseTM HDP-LDA support svm belief variational vector vector networks networks svm support inference jordan kernel machines lower parameters machines kernel bound inference margin svms variational bound training decision jordan belief vapnik http graphical distributions solution digit exact approximation examples machine field lower space diagonal probabilistic methods sv regression approximate quadratic note sparse conditional field kernels optimization variables distribution svms misclassification models intractable Table 1: Similar topics discovered. Example “noise topics” epsilon resulting stream mation direct inferred development transfer behaviour depicted motor global corner submitted carried inter applications applicable mixture replicated served refers specification searching modest operates tension vertical matter class Table 2: “Noise” topics in HDP-LDA. 5 Discussion These results illuminate the issue with a single parameter controlling both sparsity and smoothing. In the Gibbs sampler, if the HDP-LDA posterior requires more topics to explain the data, it will reduce the value of γ to accommodate for the increased (necessary) sparseness. This smaller γ, however, leads to less smooth topics that are less robust to “noise”, i.e., infrequent words that might populate a topic. The process is circular: To explain the noisy words, the Gibbs sampler might invoke new topics still, thereby further reducing the hyperparameter. As a result of this interplay, HDP-LDA settles on more topics and a smaller γ. Ultimately, the fit to held out data suffers. For the sparseTM, however, more topics can be used to explain the data by using the sparsity control gained from the “spike” component of the prior. The hyperparameter γ is controlled separately. Thus the smoothing effect is retained, and held out performance is better. Acknowledgements. We thank anonymous reviewers for insightful suggestions. David M. Blei is supported by ONR 175-6343, NSF CAREER 0745520, and grants from Google and Microsoft. References [1] Teh, Y. W., M. I. Jordan, M. J. Beal, et al. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476):1566–1581, 2006. [2] Blei, D., A. Ng, M. Jordan. Latent Dirichlet allocation. J. Mach. Learn. Res., 3:993–1022, 2003. [3] Griffths, T., M. Steyvers. Probabilistic topic models. In Latent Semantic Analysis: A Road to Meaning. 2006. [4] Saund, E. A multiple cause mixture model for unsupervised learning. Neural Comput., 7(1):51–71, 1995. [5] Kab´an, A., E. Bingham, T. Hirsim¨aki. Learning to read between the lines: The aspect Bernoulli model. In SDM. 2004. [6] Ishwaran, H., J. S. Rao. Spike and slab variable selection: Frequentist and Bayesian strategies. The Annals of Statistics, 33(2):730–773, 2005. [7] Friedman, N., Y. Singer. Efficient Bayesian parameter estimation in large discrete domains. In NIPS. 1999. [8] Pitman, J. Poisson–Dirichlet and GEM invariant distributions for split-and-merge transformations of an interval partition. Comb. Probab. Comput., 11(5):501–514, 2002. [9] Sethuraman, J. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [10] Escobar, M. D., M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90:577–588, 1995. 8
2009
70
3,822
Fast Image Deconvolution using Hyper-Laplacian Priors Dilip Krishnan, Dept. of Computer Science, Courant Institute, New York University dilip@cs.nyu.edu Rob Fergus, Dept. of Computer Science, Courant Institute, New York University fergus@cs.nyu.edu Abstract The heavy-tailed distribution of gradients in natural scenes have proven effective priors for a range of problems such as denoising, deblurring and super-resolution. These distributions are well modeled by a hyper-Laplacian p(x) ∝e−k|x|α , typically with 0.5 ≤α ≤0.8. However, the use of sparse distributions makes the problem non-convex and impractically slow to solve for multi-megapixel images. In this paper we describe a deconvolution approach that is several orders of magnitude faster than existing techniques that use hyper-Laplacian priors. We adopt an alternating minimization scheme where one of the two phases is a non-convex problem that is separable over pixels. This per-pixel sub-problem may be solved with a lookup table (LUT). Alternatively, for two specific values of α, 1/2 and 2/3 an analytic solution can be found, by finding the roots of a cubic and quartic polynomial, respectively. Our approach (using either LUTs or analytic formulae) is able to deconvolve a 1 megapixel image in less than ∼3 seconds, achieving comparable quality to existing methods such as iteratively reweighted least squares (IRLS) that take ∼20 minutes. Furthermore, our method is quite general and can easily be extended to related image processing problems, beyond the deconvolution application demonstrated. 1 Introduction Natural image statistics are a powerful tool in image processing, computer vision and computational photography. Denoising [14], deblurring [3], transparency separation [11] and super-resolution [20], are all tasks that are inherently ill-posed. Priors based on natural image statistics can regularize these problems to yield high-quality results. However, digital cameras now have sensors that record images with tens of megapixels (MP), e.g. the latest Canon DSLRs have over 20MP. Solving the above tasks for such images in a reasonable time frame (i.e. a few minutes or less), poses a severe challenge to existing algorithms. In this paper we focus on one particular problem: non-blind deconvolution, and propose an algorithm that is practical for very large images while still yielding high quality results. Numerous deconvolution approaches exist, varying greatly in their speed and sophistication. Simple filtering operations are very fast but typically yield poor results. Most of the best-performing approaches solve globally for the corrected image, encouraging the marginal statistics of a set of filter outputs to match those of uncorrupted images, which act as a prior to regularize the problem. For these methods, a trade-off exists between accurately modeling the image statistics and being able to solve the ensuing optimization problem efficiently. If the marginal distributions are assumed to be Gaussian, a closed-form solution exists in the frequency domain and FFTs can be used to recover the image very quickly. However, real-world images typically have marginals that are non-Gaussian, as shown in Fig. 1, and thus the output is often of mediocre quality. A common approach is to assume the marginals have a Laplacian distribution. This allows a number of fast ℓ1 and related TV-norm methods [17, 22] to be deployed, which give good results in a reasonable time. However, studies 1 −100 −80 −60 −40 −20 0 20 40 60 80 100 −15 −10 −5 0 Gradient log2 Probability Empirical Gaussian (α=2) Laplacian (α=1) Hyper−Laplacian (α=0.66) Figure 1: A hyper-Laplacian with exponent α = 2/3 is a better model of image gradients than a Laplacian or a Gaussian. Left: A typical real-world scene. Right: The empirical distribution of gradients in the scene (blue), along with a Gaussian fit (cyan), a Laplacian fit (red) and a hyperLaplacian with α = 2/3 (green). Note that the hyper-Laplacian fits the empirical distribution closely, particularly in the tails. of real-world images have shown the marginal distributions have significantly heavier tails than a Laplacian, being well modeled by a hyper-Laplacian [4, 10, 18]. Although such priors give the best quality results, they are typically far slower than methods that use either Gaussian or Laplacian priors. This is a direct consequence of the problem becoming non-convex for hyper-Laplacians with α < 1, meaning that many of the fast ℓ1 or ℓ2 tricks are no longer applicable. Instead, standard optimization methods such as conjugate gradient (CG) must be used. One variant that works well in practice is iteratively reweighted least squares (IRLS) [19] that solves a series of weighted leastsquares problems with CG, each one an ℓ2 approximation to the non-convex problem at the current point. In both cases, typically hundreds of CG iterations are needed, each involving an expensive convolution of the blur kernel with the current image estimate. In this paper we introduce an efficient scheme for non-blind deconvolution of images using a hyperLaplacian image prior for 0 < α ≤1. Our algorithm uses an alternating minimization scheme where the non-convex part of the problem is solved in one phase, followed by a quadratic phase which can be efficiently solved in the frequency domain using FFTs. We focus on the first phase where at each pixel we are required to solve a non-convex separable minimization. We present two approaches to solving this sub-problem. The first uses a lookup table (LUT); the second is an analytic approach specific to two values of α. For α = 1/2 the global minima can be determined by finding the roots of a cubic polynomial analytically. In the α = 2/3 case, the polynomial is a quartic whose roots can also be found efficiently in closed-form. Both IRLS and our approach solve a series of approximations to the original problem. However, in our method each approximation is solved by alternating between the two phases above a few times, thus avoiding the expensive CG descent used by IRLS. This allows our scheme to operate several orders of magnitude faster. Although we focus on the problem of non-blind deconvolution, it would be straightforward to adapt our algorithm to other related problems, such as denoising or super-resolution. 1.1 Related Work Hyper-Laplacian image priors have been used in a range of settings: super-resolution [20], transparency separation [11] and motion deblurring [9]. In work directly relevant to ours, Levin et al. [10] and Joshi et al. [7] have applied them to non-blind deconvolution problems using IRLS to solve for the deblurred image. Other types of sparse image prior include: Gaussian Scale Mixtures (GSM) [21], which have been used for image deblurring [3] and denoising [14] and student-T distributions for denoising [25, 16]. With the exception of [14], these methods use CG and thus are slow. The alternating minimization that we adopt is a common technique, known as half-quadratic splitting, originally proposed by Geman and colleagues [5, 6]. Recently, Wang et al. [22] showed how it could be used with a total-variation (TV) norm to deconvolve images. Our approach is closely related to this work: we also use a half-quadratic minimization, but the per-pixel sub-problem is quite different. With the TV norm it can be solved with a straightforward shrinkage operation. In our work, as a consequence of using a sparse prior, the problem is non-convex and solving it efficiently is one of the main contributions of this paper. Chartrand [1, 2] has introduced non-convex compressive sensing, where the usual ℓ1 norm on the signal to be recovered is replaced with a ℓp quasi-norm, where p < 1. Similar to our approach, a splitting scheme is used, resulting in a non-convex per-pixel sub-problem. To solve this, a Huber 2 approximation (see [1]) to the quasi-norm is used, allowing the derivation of a generalized shrinkage operator to solve the sub-problem efficiently. However, this approximates the original sub-problem, unlike our approach. 2 Algorithm We now introduce the non-blind deconvolution problem. x is the original uncorrupted linear grayscale image of N pixels; y is an image degraded by blur and/or noise, which we assume to be produced by convolving x with a blur kernel k and adding zero mean Gaussian noise. We assume that y and k are given and seek to reconstruct x. Given the ill-posed nature of the task, we regularize using a penalty function |.|α that acts on the output of a set of filters f1, . . . , fj applied to x. A weighting term λ controls the strength of the regularization. From a probabilistic perspective, we seek the MAP estimate of x: p(x|y, k) ∝p(y|x, k)p(x), the first term being a Gaussian likelihood and second being the hyper-Laplacian image prior. Maximizing p(x|y, k) is equivalent to minimizing the cost −log p(x|y, k): min x N X i=1  λ 2 (x ⊕k −y)2 i + J X j=1 |(x ⊕fj)i|α   (1) where i is the pixel index, and ⊕is the 2-dimensional convolution operator. For simplicity, we use two first-order derivative filters f1 = [1 -1] and f2 = [1 -1]T , although additional ones can easily be added (e.g. learned filters [13, 16], or higher order derivatives). For brevity, we denote F j i x ≡(x ⊕fj)i for j = 1, .., J. Using the half-quadratic penalty method [5, 6, 22], we now introduce auxiliary variables w1 i and w2 i (together denoted as w) at each pixel that allow us to move the F j i x terms outside the |.|α expression, giving a new cost function: min x,w X i λ 2 (x ⊕k −y)2 i + β 2 ∥F 1 i x −w1 i ∥2 2 + ∥F 2 i x −w2 i ∥2 2  + |w1 i |α + |w2 i |α  (2) where β is a weight that we will vary during the optimization, as described in Section 2.3. As β →∞, the solution of Eqn. 2 converges to that of Eqn. 1. Minimizing Eqn. 2 for a fixed β can be performed by alternating between two steps, one where we solve for x, given values of w and vice-versa. The novel part of our algorithm lies in the w sub-problem, but first we briefly describe the x sub-problem and its straightforward solution. 2.1 x sub-problem Given a fixed value of w from the previous iteration, Eqn. 2 is quadratic in x. The optimal x is thus:  F 1T F 1 + F 2T F 2 + λ β KT K  x = F 1T w1 + F 2T w2 + λ β KT y (3) where Kx ≡x ⊕k. Assuming circular boundary conditions, we can apply 2D FFT’s which diagonalize the convolution matrices F 1, F 2, K, enabling us to find the optimal x directly: x = F−1  F(F 1)∗◦F(w1) + F(F 2)∗◦F(w2) + (λ/β)F(K)∗◦F(y) F(F 1)∗◦F(F 1) + F(F 2)∗◦F(F 2) + (λ/β)F(K)∗◦F(K)  (4) where ∗is the complex conjugate and ◦denotes component-wise multiplication. The division is also performed component-wise. Solving Eqn. 4 requires only 3 FFT’s at each iteration since many of the terms can be precomputed. The form of this sub-problem is identical to that of [22]. 2.2 w sub-problem Given a fixed x, finding the optimal w consists of solving 2N independent 1D problems of the form: w∗= arg min w |w|α + β 2 (w −v)2 (5) where v ≡F j i x. We now describe two approaches to finding w∗. 2.2.1 Lookup table For a fixed value of α, w∗in Eqn. 5 only depends on two variables, β and v, hence can easily be tabulated off-line to form a lookup table. We numerically solve Eqn. 5 for 10, 000 different values of v over the range encountered in our problem (−0.6 ≤v ≤0.6). This is repeated for different β values, namely integer powers of √ 2 between 1 and 256. Although the LUT gives an approximate solution, it allows the w sub-problem to be solved very quickly for any α > 0. 3 2.2.2 Analytic solution For some specific values of α, it is possible to derive exact analytical solutions to the w sub-problem. For α = 2, the sub-problem is quadratic and thus easily solved. If α = 1, Eqn. 5 reduces to a 1-D shrinkage operation [22]. For some special cases of 1 < α < 2, there exist analytic solutions [26]. Here, we address the more challenging case of α < 1 and we now describe a way to solve Eqn. 5 for two special cases of α = 1/2 and α = 2/3. For non-zero w, setting the derivative of Eqn. 5 w.r.t w to zero gives: α|w|α−1sign(w) + β(w −v) = 0 (6) For α = 1/2, this becomes, with successive simplification: |w|−1/2sign(w) + 2β(w −v) = 0 (7) |w|−1 = 4β2(v −w)2 (8) w3 −2vw2 + v2w −sign(w)/4β2 = 0 (9) At first sight Eqn. 9 appears to be two different cubic equations with the ±1/4β2 term, however we need only consider one of these as v is fixed and w∗must lie between 0 and v. Hence we can replace sign(w) with sign(v) in Eqn. 9: w3 −2vw2 + v2w −sign(v)/4β2 = 0 (10) For the case α = 2/3, using a similar derivation, we arrive at: w4 −3vw3 + 3v2w2 −v3w + 8 27β3 = 0 (11) there being no sign(w) term as it conveniently cancels in this case. Hence w∗, the solution of Eqn. 5, is either 0 or a root of the cubic polynomial in Eqn. 10 for α = 1/2, or equivalently a root of the quartic polynomial in Eqn. 10 for α = 2/3. Although it is tempting to try the same manipulation for α = 3/4, this results in a 5th order polynomial, which can only be solved numerically. Finding the roots of the cubic and quartic polynomials: Analytic formulae exist for the roots of cubic and quartic polynomials [23, 24] and they form the basis of our approach, as detailed in Algorithms 2 and 3. In both the cubic and quartic cases, the computational bottleneck is the cube root operation. An alternative way of finding the roots of the polynomials Eqn. 10 and Eqn. 11 is to use a numerical root-finder such as Newton-Raphson. In our experiments, we found NewtonRaphson to be slower and less accurate than either the analytic method or the LUT approach (see [8] for futher details). Selecting the correct roots: Given the roots of the polynomial, we need to determine which one corresponds to the global minima of Eqn. 5. When α = 1/2, the resulting cubic equation can have: (a) 3 imaginary roots; (b) 2 imaginary roots and 1 real root, or (c) 3 real roots. In the case of (a), the |w|α term means Eqn. 5 has positive derivatives around 0 and the lack of real roots implies the derivative never becomes negative, thus w∗= 0. For (b), we need to compare the costs of the single real root and w = 0, an operation that can be efficiently performed using Eqn. 13 below. In (c) we have 3 real roots. Examining Eqn. 7 and Eqn. 8, we see that the squaring operation introduces a spurious root above v when v > 0, and below v when v < 0. This root can be ignored, since w∗must lie between 0 and v. The cost function in Eqn. 5 has a local maximum near 0 and a local minimum between this local maximum and v. Hence of the 2 remaining roots, the one further from 0 will have a lower cost. Finally, we need to compare the cost of this root with that of w = 0 using Eqn. 13. We can use similar arguments for the α = 2/3 case. Here we can potentially have: (a) 4 imaginary roots, (b) 2 imaginary and 2 real roots, or (c) 4 real roots. In (a), w∗= 0 is the only solution. For (b), we pick the larger of the 2 real roots and compare the costs with w = 0 using Eqn. 13, similar to the case of 3 real roots for the cubic. Case (c) never occurs: the final quartic polynomial Eqn. 11 was derived with a cubing operation from the analytic derivative. This introduces 2 spurious roots into the final solution, both of which are imaginary, thus only cases (a) and (b) are possible. In both the cubic and quartic cases, we need an efficient way to pick between w = 0 and a real root that is between 0 and v. We now describe a direct mechanism for doing this which does not involve the expensive computation of the cost function in Eqn. 51. Let r be the non-zero real root. 0 must be chosen if it has lower cost in Eqn. 5. This implies: 1This requires the calculation of a fractional power, which is slow, particularly if α = 2/3. 4 |r|α + β 2 (r −v)2 > βv2 2 sign(r)|r|α−1 + β 2 (r −2v) ≶ 0 , r ≶0 (12) Since we are only considering roots of the polynomial, we can use Eqn. 6 to eliminate sign(r)|r|α−1 from Eqn. 6 and Eqn. 12, yielding the condition: r ≶2v (α −1) (α −2) , v ≷0 (13) since sign(r) = sign(v). So w∗= r if r is between 2v/3 and v in the α = 1/2 case or between v/2 and v in the α = 2/3 case. Otherwise w∗= 0. Using this result, picking w∗can be efficiently coded, e.g. lines 12–16 of Algorithm 2. Overall, the analytic approach is slower than the LUT, but it gives an exact solution to the w sub-problem. 2.3 Summary of algorithm We now give the overall algorithm using a LUT for the w sub-problem. As outlined in Algorithm 1 below, we minimize Eqn. 2 by alternating the x and w sub-problems T times, before increasing the value of β and repeating. Starting with some small value β0 we scale it by a factor βInc until it exceeds some fixed value βMax. In practice, we find that a single inner iteration suffices (T = 1), although more can sometimes be needed when β is small. Algorithm 1 Fast image deconvolution using hyper-Laplacian priors Require: Blurred image y, kernel k, regularization weight λ, exponent α (¿0) Require: β regime parameters: β0, βInc, βMax Require: Number of inner iterations T. 1: β = β0, x = y 2: Precompute constant terms in Eqn. 4. 3: while β < βMax do 4: iter = 0 5: for i = 1 to T do 6: Given x, solve Eqn. 5 for all pixels using a LUT to give w 7: Given w, solve Eqn. 4 to give x 8: end for 9: β = βInc · β 10: end while 11: return Deconvolved image x As with any non-convex optimization problem, it is difficult to derive any guarantees regarding the convergence of Algorithm 1. However, we can be sure that the global optimum of each sub-problem will be found, given the fixed x and w from the previous iteration. Like other methods that use this form of alternating minimization [5, 6, 22], there is little theoretical guidance for setting the β schedule. We find that the simple scheme shown in Algorithm 1 works well to minimize Eqn. 2 and its proxy Eqn. 1. The experiments in Section 3 show our scheme achieves very similar SNR levels to IRLS, but at a greatly lower computational cost. 3 Experiments We evaluate the deconvolution performance of our algorithm on images, comparing them to numerous other methods: (i) ℓ2 (Gaussian) prior on image gradients; (ii) Lucy-Richardson [15]; (iii) the algorithm of Wang et al. [22] using a total variation (TV) norm prior and (iv) a variant of [22] using an ℓ1 (Laplacian) prior; (v) the IRLS approach of Levin et al. [10] using a hyper-Laplacian prior with α = 1/2, 2/3, 4/5. Note that only IRLS and our method use a prior with α < 1. For the IRLS scheme, we used the implementation of [10] with default parameters, the only change being the removal of higher order derivative filters to enable a direct comparison with other approaches. Note that IRLS and ℓ2 directly minimize Eqn. 1, while our method, and the TV and ℓ1 approaches of [22] minimize the cost in Eqn. 2, using T = 1, β0 = 1, βInc = 2 √ 2, βMax = 256. In our approach, we use α = 1/2 and α = 2/3, and compare the performance of the LUT and analytic methods as well. All runs were performed with multithreading enabled (over 4 CPU cores). 5 We evaluate the algorithms using a set of blurry images, created in the following way. 7 in-focus grayscale real-world images were downloaded from the web. They were then blurred by real-world camera shake kernels from [12]. 1% Gaussian noise was added, followed by quantization to 255 discrete values. In any practical deconvolution setting the blur kernel is never perfectly known. Therefore, the kernel passed to the algorithms was a minor perturbation of the true kernel, to mimic kernel estimation errors. In experiments with non-perturbed kernels (not shown), the results are similar to those in Tables 3 and 1 but with slightly higher SNR levels. See Fig. 2 for an example of a kernel from [12] and its perturbed version. Our evaluation metric was the SNR between the original image ˆx and the deconvolved output x, defined as 10 log10 ∥ˆx−µ(ˆx)∥2 ∥ˆx−x∥2 , µ(ˆx) being the mean of ˆx. In Table 1 we compare the algorithms on 7 different images, all blurred with the same 19×19 kernel. For each algorithm we exhaustively searched over different regularization weights λ to find the value that gave the best SNR performance, as reported in the table. In Table 3 we evaluate the algorithms with the same 512×512 image blurred by 8 different kernels (from [12]) of varying size. Again, the optimal value of λ for each kernel/algorithm combination was chosen from a range of values based on SNR performance. Table 2 shows the running time of several algorithms on images up to 3072×3072 pixels. Figure 2 shows a larger 27×27 blur being deconvolved from two example images, comparing the output of different methods. The tables and figures show our method with α = 2/3 and IRLS with α = 4/5 yielding higher quality results than other methods. However, our algorithm is around 70 to 350 times faster than IRLS depending on whether the analytic or LUT method is used. This speedup factor is independent of image size, as shown by Table 2. The ℓ1 method of [22] is the best of the other methods, being of comparable speed to ours but achieving lower SNR scores. The SNR results for our method are almost the same whether we use LUTs or analytic approach. Hence, in practice, the LUT method is preferred, since it is approximately 5 times faster than the analytic method and can be used for any value of α. Image IRLS IRLS IRLS Ours Ours # Blurry ℓ2 Lucy TV ℓ1 α=1/2 α=2/3 α=4/5 α=1/2 α=2/3 1 6.42 14.13 12.54 15.87 16.18 14.61 15.45 16.04 16.05 16.44 2 10.73 17.56 15.15 19.37 19.86 18.43 19.37 20.00 19.78 20.26 3 12.45 19.30 16.68 21.83 22.77 21.53 22.62 22.95 23.26 23.27 4 8.51 16.02 14.27 17.66 18.02 16.34 17.31 17.98 17.70 18.17 5 12.74 16.59 13.28 19.34 20.25 19.12 19.99 20.20 21.28 21.00 6 10.85 15.46 12.00 17.13 17.59 15.59 16.58 17.04 17.79 17.89 7 11.76 17.40 15.22 18.58 18.85 17.08 17.99 18.61 18.58 18.96 Av. SNR gain 6.14 3.67 8.05 8.58 7.03 7.98 8.48 8.71 8.93 Av. Time 79.85 1.55 0.66 0.75 354 354 354 L:1.01 L:1.00 (secs) A:5.27 A:4.08 Table 1: Comparison of SNRs and running time of 9 different methods for the deconvolution of 7 576×864 images, blurred with the same 19×19 kernel. L=Lookup table, A=Analytic. The best performing algorithm for each kernel is shown in bold. Our algorithm with α = 2/3 beats IRLS with α = 4/5, as well as being much faster. On average, both these methods outperform ℓ1, demonstrating the benefits of a sparse prior. Image ℓ1 IRLS Ours (LUT) Ours (Analytic) size α=4/5 α=2/3 α=2/3 256×256 0.24 78.14 0.42 0.7 512×512 0.47 256.87 0.55 2.28 1024×1024 2.34 1281.3 2.78 10.87 2048×2048 9.34 4935 10.72 44.64 3072×3072 22.40 24.07 100.42 Table 2: Run-times of different methods for a range of image sizes, using a 13×13 kernel. Our LUT algorithm is more than 100 times faster than the IRLS method of [10]. 4 Discussion We have described an image deconvolution scheme that is fast, conceptually simple and yields high quality results. Our algorithm takes a novel approach to the non-convex optimization prob6 Original L 2 SNR=14.89 t=0.1 L 1 SNR=18.10 t=0.8 Blurred SNR=7.31 Ours α=2/3 SNR=18.96 t=1.2 IRLS α=4/5 SNR=19.05 t=483.9 Original L 2 SNR=11.58 t=0.1 L 1 SNR=13.64 t=0.8 Blurred SNR=2.64 Ours α=2/3 SNR=14.15 t=1.2 IRLS α=4/5 SNR=14.28 t=482.1 Figure 2: Crops from two images (#1 & #5) being deconvolved by 4 different algorithms, including ours using a 27×27 kernel (#7). In the bottom left inset, we show the original kernel from [12] (lower) and the perturbed version provided to the algorithms (upper), to make the problem more realistic. This figure is best viewed on screen, rather than in print. 7 Kernel IRLS IRLS IRLS Ours Ours # / size Blurry ℓ2 Lucy TV ℓ1 α=1/2 α=2/3 α=4/5 α=1/2 α=2/3 #1: 13×13 10.69 17.22 14.49 19.21 19.41 17.20 18.22 18.87 19.36 19.66 #2: 15×15 11.28 16.14 13.81 17.94 18.29 16.17 17.26 18.02 18.14 18.64 #3: 17×17 8.93 14.94 12.16 16.50 16.86 15.34 16.36 16.99 16.73 17.25 #4: 19×19 10.13 15.27 12.38 16.83 17.25 15.97 16.98 17.57 17.29 17.67 #5: 21×21 9.26 16.55 13.60 18.72 18.83 17.23 18.36 18.88 19.11 19.34 #6: 23×23 7.87 15.40 13.32 17.01 17.42 15.66 16.73 17.40 17.26 17.77 #7: 27×27 6.76 13.81 11.55 15.42 15.69 14.59 15.68 16.38 15.92 16.29 #8: 41×41 6.00 12.80 11.19 13.53 13.62 12.68 13.60 14.25 13.73 13.68 Av. SNR gain 6.40 3.95 8.03 8.31 6.74 7.78 8.43 8.33 8.67 Av. Time 57.44 1.22 0.50 0.55 271 271 271 L:0.81 L:0.78 (sec) A:2.15 A:2.23 Table 3: Comparison of SNRs and running time of 9 different methods for the deconvolution of a 512×512 image blurred by 7 different kernels. L=Lookup table, A=Analytic. Our algorithm beats all other methods in terms of quality, with the exception of IRLS on the largest kernel size. However, our algorithm is far faster than IRLS, being comparable in speed to the ℓ1 approach. lem arising from the use of a hyper-Laplacian prior, by using a splitting approach that allows the non-convexity to become separable over pixels. Using a LUT to solve this sub-problem allows for orders of magnitude speedup in the solution over existing methods. Our Matlab implementation is available online at http://cs.nyu.edu/˜dilip/wordpress/?page_id=122. A potential drawback to our method, common to the TV and ℓ1 approaches of [22], is its use of frequency domain operations which assume circular boundary conditions, something not present in real images. These give rise to boundary artifacts which can be overcome to some extend with edge tapering operations. However, our algorithm is suitable for very large images where the boundaries are a small fraction of the overall image. Although we focus on deconvolution, our scheme can be adapted to a range of other problems which rely on natural image statistics. For example, by setting k = 1 the algorithm can be used to denoise, or if k is a defocus kernel it can be used for super-resolution. The speed offered by our algorithm makes it practical to perform these operations on the multi-megapixel images from modern cameras. Algorithm 2: Solve Eqn. 5 for α = 1/2 Require: Target value v, Weight β 1: ǫ = 10−6 2: {Compute intermediary terms m, t1, t2, t3} 3: m = −sign(v)/4β2 4: t1 = 2v/3 5: t2 = 3p −27m −2v3 + 3 √ 3 √ 27m2 + 4mv3 6: t3 = v2/t2 7: {Compute 3 roots, r1, r2, r3:} 8: r1 = t1 + 1/(3 · 21/3) · t2 + 21/3/3 · t3 9: r2 = t1 −(1 − √ 3i)/(6 · 21/3) · t2 −(1 + √ 3i)/(3 · 22/3) · t3 10: r3 = t1 −(1 + √ 3i)/(6 · 21/3) · t2 −(1 − √ 3i)/(3 · 22/3) · t3 11: {Pick global minimum from (0, r1, r2, r3)} 12: r = [r1, r2, r3] 13: c1 = (abs(imag(r)) < ǫ) {Root must be real} 14: c2 = real(r)sign(v) > (2/3 · abs(v)) {Root must obey bound of Eqn. 13} 15: c3 = real(r)sign(v) < abs(v) {Root < v} 16: w∗= max((c1&c2&c3)real(r)sign(v))sign(v) return w∗ Algorithm 3: Solve Eqn. 5 for α = 2/3 Require: Target value v, Weight β 1: ǫ = 10−6 2: {Compute intermediary terms m, t1, . . . , t7:} 3: m = 8/(27β3) 4: t1 = −9/8 · v2 5: t2 = v3/4 6: t3 = −1/8 · mv2 7: t4 = −t3/2 + p −m3/27 + m2v4/256 8: t5 = 3√t4 9: t6 = 2(−5/18 · t1 + t5 + m/(3 · t5)) 10: t7 = p t1/3 + t6 11: {Compute 4 roots, r1, r2, r3, r4:} 12: r1 = 3v/4 + (t7 + p −(t1 + t6 + t2/t7))/2 13: r2 = 3v/4 + (t7 − p −(t1 + t6 + t2/t7))/2 14: r3 = 3v/4 + (−t7 + p −(t1 + t6 −t2/t7))/2 15: r4 = 3v/4 + (−t7 − p −(t1 + t6 −t2/t7))/2 16: {Pick global minimum from (0, r1, r2, r3, r4)} 17: r = [r1, r2, r3, r4] 18: c1 = (abs(imag(r)) < ǫ) {Root must be real} 19: c2 = real(r)sign(v) > (1/2 · abs(v)) {Root must obey bound in Eqn. 13} 20: c3 = real(r)sign(v) < abs(v) {Root < v} 21: w∗= max((c1&c2&c3)real(r)sign(v))sign(v) return w∗ 8 References [1] R. Chartrand. Fast algorithms for nonconvex compressive sensing: Mri reconstruction from very few data. In IEEE International Symposium on Biomedical Imaging (ISBI), 2009. [2] R. Chartrand and V. Staneva. Restricted isometry properties and nonconvex compressive sensing. Inverse Problems, 24:1–14, 2008. [3] R. Fergus, B. Singh, A. Hertzmann, S. T. Roweis, and W. Freeman. Removing camera shake from a single photograph. ACM TOG (Proc. SIGGRAPH), 25:787–794, 2006. [4] D. Field. What is the goal of sensory coding? Neural Computation, 6:559–601, 1994. [5] D. Geman and G. Reynolds. Constrained restoration and recovery of discontinuities. PAMI, 14(3):367–383, 1992. [6] D. Geman and C. Yang. Nonlinear image recovery with half-quadratic regularization. PAMI, 4:932–946, 1995. [7] N. Joshi, L. Zitnick, R. Szeliski, and D. Kriegman. Image deblurring and denoising using color priors. In CVPR, 2009. [8] D. Krishnan and R. Fergus. Fast image deconvolution using hyper-laplacian priors, supplementary material. NYU Tech. Rep. 2009, 2009. [9] A. Levin. Blind motion deblurring using image statistics. In NIPS, 2006. [10] A. Levin, R. Fergus, F. Durand, and W. Freeman. Image and depth from a conventional camera with a coded aperture. ACM TOG (Proc. SIGGRAPH), 26(3):70, 2007. [11] A. Levin and Y. Weiss. User assisted separation of reflections from a single image using a sparsity prior. PAMI, 29(9):1647–1654, Sept 2007. [12] A. Levin, Y. Weiss, F. Durand, and W. T. Freeman. Understanding and evaluating blind deconvolution algorithms. In CVPR, 2009. [13] S. Osindero, M. Welling, and G. Hinton. Topographic product models applied to natural scene statistics. Neural Computation, 1995. [14] J. Portilla, V. Strela, M. J. Wainwright, and E. P. Simoncelli. Image denoising using a scale mixture of Gaussians in the wavelet domain. IEEE TIP, 12(11):1338–1351, November 2003. [15] W. Richardson. Bayesian-based iterative method of image restoration. 62:55–59, 1972. [16] S. Roth and M. J. Black. Fields of Experts: A Framework for Learning Image Priors. In CVPR, volume 2, pages 860–867, 2005. [17] L. Rudin, S. Osher, and E. Fatemi. Nonlinear total variation based noise removal algorithms. Physica D, 60:259–268, 1992. [18] E. Simoncelli and E. H. Adelson. Noise removal via bayesian wavelet coring. In ICIP, pages 379–382, 1996. [19] C. V. Stewart. Robust parameter estimation in computer vision. SIAM Reviews, 41(3):513–537, Sept. 1999. [20] M. F. Tappen, B. C. Russell, and W. T. Freeman. Exploiting the sparse derivative prior for super-resolution and image demosaicing. In SCTV, 2003. [21] M. Wainwright and S. Simoncelli. Scale mixtures of gaussians and teh statistics of natural images. In NIPS, pages 855–861, 1999. [22] Y. Wang, J. Yang, W. Yin, and Y. Zhang. A new alternating minimization algorithm for total variation image reconstruction. SIAM J. Imaging Sciences, 1(3):248–272, 2008. [23] E. W. Weisstein. Cubic formula. http://mathworld.wolfram.com/ CubicFormula.html. [24] E. W. Weisstein. Quartic equation. http://mathworld.wolfram.com/ QuarticEquation.html. [25] M. Welling, G. Hinton, and S. Osindero. Learning sparse topographic representations with products of student-t distributions. In NIPS, 2002. [26] S. Wright, R. Nowak, and M. Figueredo. Sparse reconstruction by separable approximation. IEEE Trans. Signal Processing, page To appear, 2009. 9
2009
71
3,823
Compositionality of optimal control laws Emanuel Todorov Applied Mathematics and Computer Science & Engineering University of Washington todorov@cs.washington.edu Abstract We present a theory of compositionality in stochastic optimal control, showing how task-optimal controllers can be constructed from certain primitives. The primitives are themselves feedback controllers pursuing their own agendas. They are mixed in proportion to how much progress they are making towards their agendas and how compatible their agendas are with the present task. The resulting composite control law is provably optimal when the problem belongs to a certain class. This class is rather general and yet has a number of unique properties – one of which is that the Bellman equation can be made linear even for non-linear or discrete dynamics. This gives rise to the compositionality developed here. In the special case of linear dynamics and Gaussian noise our framework yields analytical solutions (i.e. non-linear mixtures of LQG controllers) without requiring the final cost to be quadratic. More generally, a natural set of control primitives can be constructed by applying SVD to Green’s function of the Bellman equation. We illustrate the theory in the context of human arm movements. The ideas of optimality and compositionality are both very prominent in the field of motor control, yet they have been difficult to reconcile. Our work makes this possible. 1 Introduction Stochastic optimal control is of interest in many fields of science and engineering, however it remains hard to solve. Dynamic programming [1] and reinforcement learning [2] work well in discrete state spaces of reasonable size, but cannot handle continuous high-dimensional state spaces characteristic of complex dynamical systems. A variety of function approximation methods are available [3, 4], yet the shortage of convincing results on challenging problems suggests that existing approximation methods do not scale as well as one would like. Thus there is need for more efficient methods. The idea we pursue in this paper is compositionality. With few exceptions [5,6] this good-in-general idea is rarely used in optimal control, because it is unclear what/how can be composed in a way that guarantees optimality of the resulting control law. Our second motivation is understanding how the brain controls movement. Since the brain remains pretty much the only system capable of solving truly complex control problems, sensorimotor neuroscience is a natural (albeit under-exploited) source of inspiration. To be sure, a satisfactory understanding of the neural control of movement is nowhere in sight. Yet there exist theoretical ideas backed by experimental data which shed light on the underlying computational principles. One such idea is that biological movements are near-optimal [7, 8]. This is not surprising given that motor behavior is shaped by the processes of evolution, development, learning and adaptation, all of which resemble iterative optimization. Precisely what algorithms enable the brain to approach optimal performance is not known, however a clue is provided by another prominent idea: compositionality. For about a century, researchers have been talking about motor synergies or primitives which somehow simplify control [9–11]. The implied reduction in dimensionality is now well documented [12–14]. However the structure and origin of the hypothetical primitives, the rules for combining them, and the ways in which they actually simplify the control problem remain unclear. 1 2 Stochastic optimal control problems with linear Bellman equations We will be able to derive compositionality rules for first-exit and finite-horizon stochastic optimal control problems which belong to a certain class. This class includes both discrete-time [15–17] and continuous-time [17–19] formulations, and is rather general, yet affords substantial simplification. Most notably the optimal control law is found analytically given the optimal cost-to-go, which in turn is the solution to a linear equation obtained from the Bellman equation by exponentiation. Linearity implies compositionality as will be shown here. It also makes a number of other things possible: finding the most likely trajectories of optimally-controlled stochastic systems via deterministic methods; solving inverse optimal control problems via convex optimization; applying off-policy learning in the state space as opposed to the state-action space; establishing duality between stochastic optimal control and Bayesian estimation. An overview can be found in [17]. Here we only provide the background needed for the present paper. The discrete-time problem is defined by a state cost q (x) ≥0 describing how (un)desirable different states are, and passive dynamics x0 ∼p (·|x) characterizing the behavior of the system in the absence of controls. The controller can impose any dynamics x0 ∼u (·|x) it wishes, however it pays a price (control cost) which is the KL divergence between u and p. We further require that u (x0|x) = 0 whenever p (x0|x) = 0 so that KL divergence is well-defined. Thus the discrete-time problem is dynamics: x0 ∼u (·|x) cost rate: c (x, u (·|x)) = q (x) + KL (u (·|x) ||p (·|x)) Let I denote the set of interior states and B the set of boundary states, and let f (x) ≥0, x ∈B be a final cost. Let v (x) denote the optimal cost-to-go, and define the desirability function z (x) = exp (−v (x)) Let G denote the linear operator which computes expectation under the passive dynamics: G [z] (x) = Ex0∼p(·|x)z (x0) For x ∈I it can be shown that the optimal control law u∗(·|x) and the desirability z (x) satisfy optimal control law: u∗(x0|x) = p (x0|x) z (x0) G [z] (x) linear Bellman equation: exp (q (x)) z (x) = G [z] (x) (1) On the boundary x ∈B we have z (x) = exp (−f (x)). The linear Bellman equation can be written more explicitly in vector-matrix notation as zI = MzI + NzB (2) where M = diag (exp (−qI)) PII and N = diag (exp (−qI)) PIB . The matrix M is guaranteed to have spectral radius less than 1, thus the simple iterative solver zI ←MzI + NzB converges. The continuous-time problem is a control-affine Ito diffusion with control-quadratic cost: dynamics: dx = a (x) dt + B (x) (udt + σdω) cost rate: c (x, u) = q (x) + 1 2σ2 kuk2 The control u is now a (more traditional) vector and ω is a Brownian motion process. Note that the control cost scaling by σ−2, which is needed to make the math work, can be compensated by rescaling q. The optimal control law u∗(x) and desirability z (x) satisfy optimal control law: u∗(x) = σ2B (x)T zx (x) z (x) linear HJB equation: q (x) z (x) = L [z] (x) (3) where the 2nd-order linear differential operator L is defined as L [z] (x) = a (x)T zx (x) + σ2 2 tr ³ B (x) B (x)T zxx (x) ´ 2 The relationship between the two formulations above is not obvious, but nevertheless it can be shown that the continuous-time formulation is a special case of the discrete-time formulation. This is done by defining the passive dynamics p(h) (·|x) as the h-step transition probability density of the uncontrolled diffusion (or an Euler approximation to it), and the state cost as q(h) (x) = hq (x). Then, in the limit h →0, the integral equation exp ¡ q(h) ¢ z = G(h) [z] reduces to the differential equation qz = L [z]. Note that for small h the density p(h) (·|x) is close to Gaussian. From the formula for KL divergence between Gaussians, the KL control cost in the discrete-time formulation reduces to the quadratic control cost in the continuous-time formulation. The reason for working with both formulations and emphasizing the relationship between them is that most problems of practical interest are continuous in time and space, yet the discrete-time formulation is easier to work with. Furthermore it leads to better numerical stability because integral equations are better behaved than differential equations. Note also that the discrete-time formulation can be used in both discrete and continuous state spaces, although the latter require function approximation in order to solve the linear Bellman equation [20]. 3 Compositionality theory The compositionality developed in this section follows from the linearity of equations (1, 3). We focus on first-exit problems which are more general. An example involving a finite-horizon problem will be given later. Consider a collection of K optimal control problems in our class which all have the same dynamics – p (·|x) in discrete time or a (x) , B (x) , σ in continuous time – the same state cost rate q (x) and the same sets I and B of interior and boundary states. These problems differ only in their final costs fk (x). Let zk (x) denote the desirability function for problem k, and u∗ k (·|x) or u∗ k (x) the corresponding optimal control law. The latter will serve as primitives for constructing optimal control laws for new problems in our class. We will call the K problems we started with component and the new problem composite. Suppose the final cost for the composite problem is f (x), and there exist weights wk such that f (x) = −log ³PK k=1wk exp (−fk (x)) ´ (4) Thus the functions fk (x) define a K-dimensional manifold of composite problems. The above condition ensures that for all boundary/terminal states x ∈B we have z (x) = PK k=1wkzk (x) (5) Since z is the solution to a linear equation, if (5) holds on the boundary then it must hold everywhere. Thus the desirability function for the composite problem is a linear combination of the desirability functions for the component problems. The weights in this linear combination can be interpreted as compatibilities between the control objectives in the component problems and the control objective in the composite problem. The optimal control law for the composite problem is given by (1, 3). The above construction implies that both z and zk are everywhere positive. Since z is defined as an exponent, it must be positive. However this is not necessary for the components. Indeed if f (x) = −log ³PK k=1wkzk (x) ´ (6) holds for all x ∈B, then (5) and z (x) > 0 hold everywhere even if zk (x) ≤0 for some k and x. In this case the zk’s are no longer desirability functions for well-defined optimal control problems. Nevertheless we can think of them as generalized desirability functions with similar meaning: the larger zk (x) is the more compatible state x is with the agenda of component k. 3.1 Compositionality of discrete-time control laws When zk (x) > 0 the composite control law u∗can be expressed as a state-dependent convex combination of the component control laws u∗ k. Combining (5, 1) and using the linearity of G, u∗(x0|x) = X k wkG [zk] (x) P swsG [zs] (x) p (x0|x) zk (x0) G [zk] (x) 3 The second term above is u∗ k. The first term is a state-dependent mixture weight which we denote mk (x). The composition rule for optimal control laws is then u∗(·|x) = P kmk (x) u∗ k (·|x) (7) Using the fact that zk (x) satisfies the linear Bellman equation (1) and q (x) does not depend on k, the mixture weights can be simplified as mk (x) = wkG [zk] (x) P swsG [zs] (x) = wkzk (x) P swszs (x) (8) Note that P kmk (x) = 1 and mk (x) > 0. 3.2 Compositionality of continuous-time control laws Substituting (5) in (3) and assuming zk (x) > 0, the control law given by (3) can be written as u∗(x) = X k wkzk (x) P swszs (x) ∙ σ2 zk (x)B (x)T ∂ ∂xzk (x) ¸ The term in brackets is u∗ k (x). We denote the first term with mk (x) as before: mk (x) = wkzk (x) P swszs (x) Then the composite optimal control law is u∗(x) = P kmk (x) u∗ k (x) (9) Note the similarity between the discrete-time result (7) and the continuous-time result (9), as well as the fact that the mixing weights are computed in the same way. This is surprising given that in one case the control law directly specifies the probability distribution over next states, while in the other case the control law shifts the mean of the distribution given by the passive dynamics. 4 Analytical solutions to linear-Gaussian problems with non-quadratic costs Here we specialize the above results to the case when the components are continuous-time linear quadratic Gaussian (LQG) problems of the form dynamics: dx = Axdt + B (udt + σdω) cost rate: c (x, u) = 1 2xTQx + 1 2σ2 kuk2 The component final costs are quadratic: fk (x) = 1 2xTFkx The optimal cost-to-go function for LQG problems is known to be quadratic [21] in the form vk (x, t) = 1 2xTVk (t) x + αk (t) At the predefined final time T we have Vk (T) = Fk and αk (T) = 0. The optimal control law is u∗ k (x, t) = −σ2BTVk (t) x The quantities Vk (t) and αk (t) can be computed by integrating backward in time the ODEs −˙Vk = Q + ATVk + VkAT −VkΣVk (10) −˙αk = 1 2 tr (ΣVk) Now consider a composite problem with final cost f (x) = −log µP kwk exp µ −1 2xTFkx ¶¶ 4 Figure 1: Illustration of compositionality in the LQG framework. (A) An LQG problem with quadratic cost-to-go and linear feedback control law. T = 10 is the final time. (B, C) Non-LQG problems solved analytically by mixing the solutions to multiple LQG problems. This composite problem is no longer LQG because it has non-quadratic final cost (i.e. log of mixture of Gaussians), and yet we will be able to find a closed-form solution by combining multiple LQG controllers. Note that, since mixtures of Gaussians are universal function approximators, we can represent any desired final cost to within arbitrary accuracy given enough LQG components. Applying the results from the previous section, the desirability for the composite problem is z (x, t) = P kwk exp µ −1 2xTVk (t) x −αk (t) ¶ The optimal control law can now be obtained directly from (3), or via composition from (9). Note that the constants αk (t) do not affect the component control laws (and indeed are rarely computed in the LQG framework) however they affect the composite control law through the mixing weights. We illustrate the above construction on a scalar example with integrator dynamics dx = udt+0.2dω. The state cost rate is q (x) = 0. We set wk = 1 for all k. The final time is T = 10. The component final costs are of the form fk (x) = dk 2 (x −ck)2 In order to center these quadratics at ck rather than 0 we augment the state: x = [x; 1]. The matrices defining the problem are then A = ∙ 0 0 0 0 ¸ , B = ∙ 1 0 ¸ , Fk = dk ∙ 1 −ck −ck c2 k ¸ The ODEs (10) are integrated using ode45 in Matlab. Fig 1 shows the optimal cost-to-go functions v (x, t) = −log (z (x, t)) and the optimal control laws u∗(x, t) for the following problems: {c = 0; d = 5}, {c = −1, 0, 1; d = 5, 0.1, 15}, and {c = −1.5 : 0.5 : 1.5; d = 5}. The first problem (Fig 1A) is just an LQG. As expected the cost-to-go is quadratic and the control law is linear with time-varying gain. The second problem (Fig 1B) has a multimodal cost-to-go. The control law is no longer linear but instead has an elaborate shape. The third problem (Fig 1C) resembles robust control in the sense that there is a f1at region where all states are equally good. The corresponding control law uses feedback to push the state into this f1at region. Inside the region the controller does nothing, so as to save energy. As these examples illustrate, the methodology developed here significantly extends the LQG framework while preserving its tractability. 5 5 Constructing minimal sets of primitives via SVD of Green’s function We showed how composite problems can be solved once the solutions to the component problems are available. The choice of component boundary conditions defines the manifold (6) of problems that can be solved exactly. One can use any available set of solutions as components, but is there a set which is in some sense minimal? Here we offer an answer based on singular value decomposition (SVD). We focus on discrete state spaces; continuous spaces can be discretized following [22]. Recall that the vector of desirability values z (x) at interior states x ∈I, which we denoted zI, satisfies the linear equation (2). We can write the solution to that equation explicitly as zI = G zB where G = (diag (exp (qI)) −PII)−1 PIB. The matrix G maps values on the boundary to values on the interior, and thus resembles Green’s function for linear PDEs. A minimal set of primitives corresponds to the best low-rank approximation to G. If we define "best" in terms of least squares, a minimal set of R primitives is obtained by approximating G using the top R singular values: G ≈USV T S is an R-by-R diagonal matrix, U and V are |I|-by-R and |B|-by-R orthonormal matrices. If we now set zB = V·r, which is the r-th column of V , then zI = G zB ≈USV TV·r = SrrU·r Thus the right singular vectors (columns of V ) are the component boundary conditions, while the left singular vectors (columns of U) are the component solutions. The above construction does not use knowledge of the family of composite problems we aim to solve/approximate. A slight modification makes it possible to incorporate such knowledge. Let the family in question have parametric final costs f (x, θ). Choose a discrete set {θk}k=1···K of values of the parameter θ, and form the |B|-by-K matrix Φ with elements Φik = exp (−f (xi, θk)), xi ∈B. As in (4), this choice restricts the boundary conditions that can be represented to zB = Φw, where w is a K-dimensional vector. Now apply SVD to obtain a rank-R approximation to the matrix GΦ instead of G. We can set R ¿ K to achieve significant reduction in the number of components. Note that GΦ is smaller than G so the SVD here is faster to compute. We illustrate the above approach using a discretization of the following 2D problem: a (x) = ∙ −0.2 x2 0.2 |x1| ¸ , B = I, σ = 1, q (x) = 0.1 The vector field in Fig 2A illustrates the function a (x). To make the problem more interesting we introduce an L-shaped obstacle which can be hit without penalty but cannot be penetrated. The domain is a disk centered at (0, 0) with radius √ 21. The constant q implements a penalty for the time spent inside the disk. The discretization involves |I| = 24520 interior states and |B| = 4163 boundary states. The parametric family of final costs is f (x, θ) = 13 −13 exp (5 cos (atan 2 (x2, x1) −θ) −5) This is an inverted von Mises function specifying the desired location where the state should exit the disk. f (x, 0) is plotted in red in Fig 2A. The set {θk} includes 200 uniformly spaced values of θ. The SVD components are constructed using the second method above (although the first method gives very similar results). Fig 2B compares the solution obtained with a direct solver (i.e. using the exact G) for θ = 0, and the solutions obtained using R = 70 and R = 40 components. The desirability function z is well approximated in both cases. In fact the approximation to z looks perfect with much fewer components (not shown). However v = −log (z) is more difficult to approximate. The difficulty comes from the fact that the components are not always positive, and as a result the composite solution is not always positive. The regions where that happens are shown in white in Fig 2B. In those regions the approximation is undefined. Note that this occurs only near the boundary. Fig 2C shows the first 10 components. They resemble harmonic functions. It is notable that the higher-order components (corresponding to smaller singular values) are only modulated near the boundary – which explains why the approximation errors in Fig 2B are near the boundary. In summary, a small number of components are sufficient to construct composite control laws which are near-optimal in most of the state space. Accuracy at the boundary requires additional components. Alternatively one could use positive SVD and obtain not just positive but also more localized components (as we have done in preliminary work). 6 Figure 2: Illustration of primitives obtained via SVD. (A) Passive dynamics and cost. (B) Solutions obtained with a direct solver and with different numbers of primitives. (C) Top ten primitives zk (x). 0 1 2 3 0 10 20 time (sec) speed (cm / sec) A B C Figure 3: Preliminary model of arm movements. (A) Hand paths of different lengths. Red dots denote start points, black circles denote end points. (B) Speed profiles for the movements shown in (A). Note that the same controller generates movements of different duration. (C) Hand paths generated by a composite controller obtained by mixing the optimal controllers for two targets. This controller "decides" online which target to go to. 7 6 Application to arm movements We are currently working on an optimal control model of arm movements based on compositionality. The dynamics correspond to a 2-link arm moving in the horizontal plane, and have the form τ = M (θ) ¨θ + n ³ θ, ˙θ ´ θ contains the shoulder and elbow joint angles, τ is the applied torque, M is the configurationdependent inertia, and n is the vector of Coriolis, centripetal and viscous forces. Model parameters are taken from the biomechanics literature. The final cost f is a quadratic (in Cartesian space) centered at the target. The running state cost is q = const encoding a penalty for duration. The above model has a 4-dimensional state space (θ, ˙θ). In order to encode reaching movements, we introduce an additional state variable s which keeps track of how long the hand speed (in Cartesian space) has remained below a threshold. When s becomes sufficiently large the movement ends. This augmentation is needed in order to express reaching movements as a first-exit problem. Without it the movement would stop whenever the instantaneous speed becomes zero – which can happen at reversal points as well as the starting point. Note that most models of reaching movements have assumed predefined final time. However this is unrealistic because we know that movement duration scales with distance, and furthermore such scaling takes place online (i.e. movement duration increases if the target is perturbed during the movement). The above second-order system is expressed in general first-order form, and then the passive dynamics corresponding to τ = 0 are discretized in space and time. The time step is h = 0.02 sec. The space discretization uses a grid with 514x3 points. The factor of 3 is needed to discretize the variable s. Thus we have around 20 million discrete states, and the matrix P characterizing the passive dynamics is 20 million - by - 20 million. Fortunately it is very sparse because the noise (in torque space) cannot have a large effect within a single time step: there are about 50 non-zero entries in each row. Our simple iterative solver converges in about 30 iterations and takes less than 2 min of CPU time, using custom multi-threaded C++ code. Fig 3A shows hand paths from different starting points to the same target. The speed profiles for these movements are shown in Fig 3B. The scaling with amplitude looks quite realistic. In particular, it is known that human reaching movements of different amplitude have similar speed profiles around movement onset, and diverge later. Fig 3C shows results for a composite controller obtained by mixing the optimal control laws for two different targets. In this example the targets are sufficiently far away and the final costs are sufficiently steep, thus the mixing yields a switching controller instead of an interpolating controller. Depending on the starting point, this controller takes the hand to one or the other target, and can also switch online if the hand is perturbed. An interpolating controller can be created by placing the targets closer or making the component final costs less steep. While these results are preliminary we find them encouraging. In future work we will explore this model in more detail and also build a more realistic model using 3rd-order dynamics (incorporating muscle time constants). We do not expect to be able to discretize the latter system, but we are in the process of making a transition from discretization to function approximation [20]. 7 Summary and relation to prior work We developed a theory of compositionality applicable to a general class of stochastic optimal control problems. Although in this paper we used simple examples, the potential of such compositionality to tackle complex control problems seems clear. Our work is somewhat related to proto value functions (PVFs) which are eigenfunctions of the Laplacian [5], i.e. the matrix I −PII. While the motivation is similar, PVFs are based on intuitions (mostly from grid worlds divided into rooms) rather than mathematical results regarding optimality of the composite solution. In fact our work suggests that PVFs should perhaps be used to approximate the exponent of the value function instead of the value function itself. Another difference is that PVFs do not take into account the cost rate q and the boundary B. This sounds like a good thing but it may be too good, in the sense that such generality may be the reason why guarantees regarding PVF optimality are lacking. Nevertheless the ambitious agenda behind PVFs is certainly worth pursuing, and it will be interesting to compare the two approaches in more detail. 8 Finally, another group [6] has developed similar ideas independently and in parallel. Although their paper is restricted to combination of LQG controllers for finite-horizon problems, it contains very interesting examples from complex tasks such as walking, jumping and diving. A particularly important point made by [6] is that the primitives can be only approximately optimal (in this case obtained via local LQG approximations), and yet their combination still produces good results. References [1] D. Bertsekas, Dynamic Programming and Optimal Control (2nd Ed). Bellmont, MA: Athena Scientific, 2001. [2] R. Sutton and A. Barto, Reinforcement Learning: An Introduction. MIT Press, Cambridge MA, 1998. [3] D. Bertsekas and J. Tsitsiklis, Neuro-dynamic programming. Belmont, MA: Athena Scientific, 1997. [4] J. Si, A. Barto, W. Powell, and D. Wunsch, Handbook of Learning and Approximate Dynamic Programming. Wiley-IEEE Press, 2004. [5] S. Mahadevan and M. Maggioni, “Proto-value functions: A Laplacian farmework for learning representation and control in Markov decision processes,” Journal of Machine Learning Research, vol. 8, pp. 2169–2231, 2007. [6] M. daSilva, F. Durand, and J. Popovic, “Linear bellman combination for control of character animation,” To appear in SIGGRAPH, 2009. [7] E. Todorov, “Optimality principles in sensorimotor control,” Nature Neuroscience, vol. 7, no. 9, pp. 907–915, 2004. [8] C. Harris and D. Wolpert, “Signal-dependent noise determines motor planning,” Nature, vol. 394, pp. 780–784, 1998. [9] C. Sherrington, The integrative action of the nervous system. New Haven: Yale University Press, 1906. [10] N. Bernstein, On the construction of movements. Moscow: Medgiz, 1947. [11] M. Latash, “On the evolution of the notion of synergy,” in Motor Control, Today and Tomorrow, G. Gantchev, S. Mori, and J. Massion, Eds. Sofia: Academic Publishing House "Prof. M. Drinov", 1999, pp. 181–196. [12] M. Tresch, P. Saltiel, and E. Bizzi, “The construction of movement by the spinal cord,” Nature Neuroscience, vol. 2, no. 2, pp. 162–167, 1999. [13] A. D’Avella, P. Saltiel, and E. Bizzi, “Combinations of muscle synergies in the construction of a natural motor behavior,” Nat.Neurosci., vol. 6, no. 3, pp. 300–308, 2003. [14] M. Santello, M. Flanders, and J. Soechting, “Postural hand synergies for tool use,” J Neurosci, vol. 18, no. 23, pp. 10 105–15, 1998. [15] E. Todorov, “Linearly-solvable Markov decision problems,” Advances in Neural Information Processing Systems, 2006. [16] ——, “General duality between optimal control and estimation,” IEEE Conference on Decision and Control, 2008. [17] ——, “Efficient computation of optimal actions,” PNAS, in press, 2009. [18] S. Mitter and N. Newton, “A variational approach to nonlinear estimation,” SIAM J Control Opt, vol. 42, pp. 1813–1833, 2003. [19] H. Kappen, “Linear theory for control of nonlinear stochastic systems,” Physical Review Letters, vol. 95, 2005. [20] E. Todorov, “Eigen-function approximation methods for linearly-solvable optimal control problems,” IEEE International Symposium on Adaptive Dynamic Programming and Reinforcemenet Learning, 2009. [21] R. Stengel, Optimal Control and Estimation. New York: Dover, 1994. [22] H. Kushner and P. Dupuis, Numerical Methods for Stochastic Optimal Control Problems in Continuous Time. New York: Springer, 2001. 9
2009
72
3,824
AUC optimization and the two-sample problem St´ephan Cl´emenc¸on Telecom Paristech (TSI) - LTCI UMR Institut Telecom/CNRS 5141 stephan.clemencon@telecom-paristech.fr Marine Depecker Telecom Paristech (TSI) - LTCI UMR Institut Telecom/CNRS 5141 marine.depecker@telecom-paristech.fr Nicolas Vayatis ENS Cachan & UniverSud - CMLA UMR CNRS 8536 nicolas.vayatis@cmla.ens-cachan.fr Abstract The purpose of the paper is to explore the connection between multivariate homogeneity tests and AUC optimization. The latter problem has recently received much attention in the statistical learning literature. From the elementary observation that, in the two-sample problem setup, the null assumption corresponds to the situation where the area under the optimal ROC curve is equal to 1/2, we propose a two-stage testing method based on data splitting. A nearly optimal scoring function in the AUC sense is first learnt from one of the two half-samples. Data from the remaining half-sample are then projected onto the real line and eventually ranked according to the scoring function computed at the first stage. The last step amounts to performing a standard Mann-Whitney Wilcoxon test in the onedimensional framework. We show that the learning step of the procedure does not affect the consistency of the test as well as its properties in terms of power, provided the ranking produced is accurate enough in the AUC sense. The results of a numerical experiment are eventually displayed in order to show the efficiency of the method. 1 Introduction The statistical problem of testing homogeneity of two samples arises in a wide variety of applications, ranging from bioinformatics to psychometrics through database attribute matching for instance. Practitioners may rely upon a wide range of nonparametric tests for detecting differences in distribution (or location) between two one-dimensional samples, among which tests based on linear rank statistics, such as the celebrated Mann-Whitney Wilcoxon test. Being a (locally) optimal procedure, the latter is the most widely used in homogeneity testing. Such rank statistics were originally introduced because they are distribution-free under the null hypothesis, thus permitting to set critical values in a non asymptotic fashion for any given level. Beyond this simple fact, the crucial advantage of rank-based tests relies in their asymptotic efficiency in a variety of nonparametric situations. We refer for instance to [15] for an account of asymptotically (locally) uniformly most powerful tests and a comprehensive treatment of asymptotic optimality of R-statistics. In a different context, consider data sampled from a feature space X ⊂Rd of high dimension with binary label information in {−1, +1}. The problem of ranking such data, also known as the bipartite ranking problem, has recently gained an increasing attention in the machine-learning literature, see 1 [5, 10, 19]. Here, the goal is to learn, based on a pooled set of labeled examples, how to rank novel data with unknown labels, by means of a scoring function s : X →R, in order that positive ones appear on top of the list. Over the last few years, this global learning problem has been the subject of intensive research, involving issues related to the design of appropriate criteria reflecting ranking performance or valid extensions of the Empirical Risk Minimization approach (ERM) to this framework [2, 6, 11]. In most applications, the gold standard for measuring the capacity of a scoring function s to discriminate between the class populations however remains the area under the ROC curve criterion (AUC) and most ranking/scoring methods boil down to maximizing its empirical counterpart. The empirical AUC may be viewed as the Mann-Whitney statistic based on the images of the multivariate samples by s, see [13, 9, 12, 18]. The purpose of this paper is to investigate how ranking methods for multivariate data with binary labels may be exploited in order to extend the rank-based test approach for testing homogeneity between two samples to a multidimensional setting. Precisely, the testing principle promoted in this paper is described through an extension of the Mann-Whitney Wilcoxon test, based on a preliminary ranking of the data through empirical AUC maximization. The consistency of the test is proved to hold, as soon as the learning procedure is consistent in the AUC sense and its capacity to detect ”small” deviations from the homogeneity assumption is illustrated by a simulation example. The rest of the paper is organized as follows. In Section 2, the homogeneity testing problem is formulated and standard approaches are recalled, with focus on the one-dimensional case. Section 3 highlights the connection of the two-sample problem with optimal ROC curves and gives some insight to our appproach. In Section 4, we describe the testing procedure proposed and set preliminary grounds for its theoretical validity. Simulation results are presented in Section 5 and technical details are deferred to the Appendix. 2 The two-sample problem We start off by setting out the notations needed throughout the paper and formulate the two-sample problem precisely. We recall standard approaches to homogeneity testing. In particular, special attention is paid to the one-dimensional case, for which two-sample linear rank statistics allow for constructing locally optimal tests in a variety of situations. Probabilistic setup. The problem considered in this paper is to test the hypothesis that two independent i.i.d. random samples, valued in Rd with d ≥1, X+ 1 , . . . , X+ n and X− 1 , . . . , X− m are identical in distributions. We denote by G(dx) the distribution function of the X+ i ’s, while the one of the X− j ’s is denoted by H(dx). We also denote by P(G,H) the probability distribution on the underlying space. The testing problem is tackled here from a nonparametric perspective, meaning that the distributions G(dx) and H(dx) are assumed to be unknown. We suppose in addition that G(dx) and H(dx) are continuous distributions and the asymptotics are described as follows: we set N = m + n and suppose that n/N →p ∈(0, 1) as n, m tend to infinity. Formally, the problem is to test the null hypothesis H0 : G = H against the alternative H1 : G ̸= H, based on the two data sets. In this paper, we place ourselves in the difficult case where G and H have same support, X ⊂Rd say. Measuring dissimilarity. A possible approach is to consider a probability (pseudo)-metric D on the space of probability distributions on Rd. Based on the simple observation that D(G, H) = 0 under the null hypothesis, possible testing procedures consist of computing estimates bGn and bHm of the underlying distributions and rejecting H0 for ”large” values of the statistic D( bGn, bHm), see [3] for instance. Beyond computational difficulties and the necessity of identifying a proper standardization in order to make the statistic asymptotically pivotal (i.e. its limit distribution is parameter free), the major issue one faces when trying to implement such plug-in procedures is related to the curse of dimensionality. Indeed, plug-in procedures involve the consistent estimation of distributions on a feature space of possibly very large dimension d ∈N∗. Various metrics or pseudo-metrics can be considered for measuring dissimilarity between two probability distributions. We refer to [17] for an excellent account of metrics in spaces of probability measures and their applications. Typical examples include the chi-square distance, the Kullback-Leibler divergence, the Hellinger distance, the Kolmogorov-Smirnov distance and its generalizations of the 2 following type MMD(G, H) = sup f∈F Z x∈X f(x)G(dx) − Z f(x)H(dx) , (1) where F denotes a supposedly rich enough class of functions f : X ⊂Rd →R, so that MMD(G, H) = 0 if and only if G = H. The quantity (1) is called the Maximum Mean Discrepancy in [1], where a unit ball of a reproducing kernel Hilbert space H is chosen for F in order to allow for efficient computation of the supremum (1), see also [23]. The view promoted in the present paper for the two-sample problem is very different in nature and is inspired from traditional procedures in the particular one-dimensional case. The one-dimensional case. A classical approach to the two-sample problem in the one-dimensional setup lies in ordering the observed data using the natural order on the real line R and then basing the decision depending on the ranks of the positive instances among the pooled sample: ∀i ∈{1, . . . , n}, Ri = NFn,m(X+ i ), where Fn,m(t) = (n/N) bGn(t) + (m/N) bHm(t), and denoting by bGn(t) = n−1 P i≤n I{X+ i ≤t} and bHn(t) = m−1 P i≤n I{X− i ≤t} the empirical counterparts of the cumulative distribution functions G and H respectively. This approach is grounded in invariance considerations, practical simplicity and optimality of tests based on R-estimates for this problem, depending on the class of alternative hypotheses considered. Assuming the distributions G and H continuous, the idea underlying such tests lies in the simple fact that, under the null hypothesis, the ranks of positive instances are uniformly distributed over {1, . . . , N}. A popular choice is to consider the sum of ”positive ranks”, leading to the well-known rank-sum Wilcoxon statistic [22] c Wn,m = n X i=1 Ri, which is distribution-free under H0, see Section 6.9 in [15] for further details. We also recall that, the validity framework of the rank-sum test classically extends to the case where some observations are tied (i.e. when G and/or H may be degenerate at some points), by assigning the mean rank to ties [4]. We shall denote by Wn,m the distribution of the (average rank version of the) Wilcoxon statistic c Wn,m under the homogeneity hypothesis. Since tables for the distributions Wn,m are available, no asymptotic approximation result is thus needed for building a test of appropriate level. As it will be recalled below, the test based on the R-statistic c Wn,m has appealing optimality properties for certain classes of alternatives. Although R-estimates (i.e. functions of the Ri’s) form a very rich collection of statistics, but, for lack of space, we restrict our attention to the two-sample Wilcoxon statistic in this paper. Heuristics. We may now give a first insight into the way we shall tackle the problem in the multidimensional case. Suppose that we are able to ”project” the multivariate sampling data onto the real line through a certain scoring function s : Rd →R in order to preserve the possible dissimilarity (considered in a certain specific sense, which we shall discuss below) between the two populations, leading then to ”large” values of the score s(x) for the positive instances and ”small” values for the negative ones with high probability. Now that the dimension of the problem has been brought down to 1, observations can be ranked and one may perform for instance a basic two-sample Wilcoxon test based on the data sets s(X+ 1 ), . . . , s(X+ n ) and s(X− 1 ), . . . , s(X− m). Remark 1 (LEARNING A STUDENT t TEST.) We point out that it is precisely the task Linear Discriminant Analysis (LDA) tries to performs, in a restrictive Gaussian framework however (when G and H are normal distributions with same covariance structure namely). In order to test deviations from the homogeneity hypothesis on the basis of the original samples, one may consider applying a univariate Student t test based on the ”projected” data {bδ(X+ i ) : 1 ≤i ≤n} and {bδ(X− i ) : 1 ≤ i ≤m}, where bδ denotes the empirical discriminant function, this may be shown as an appealing alternative to multivariate extensions of the standard t test [14]. The goal of this paper is to show how to exploit recent advances in ROC/AUC optimization for extending this heuristics to more general situations than the parametric one mentioned above. 3 3 Connections with bipartite ranking ROC curves are among the most widely used graphical tools for visualizing the dissimilarity between two one-dimensional distributions in a large variety of applications such as anomaly detection in signal analysis, medical diagnosis, information retrieval, etc. As this concept is at the heart of the ranking issue in the binary setting, which forms the first stage of the testing procedure sketched above, we recall its definition precisely. Definition 1 (ROC curve) Let g and h be two cumulative distribution functions on R. The ROC curve related to the distributions g(dt) and h(dt) is the graph of the mapping: ROC ((g, h), ·) : α ∈[0, 1] 7→1 −g ◦h−1(1 −α), denoting by f −1(u) = inf{t ∈R : f(t) ≥u} the generalized inverse of any c`ad-l`ag function f : R →R. When the distributions g(dt) and h(t) are continuous, it can alternatively be defined as the parametric curve t ∈R 7→(1 −h(t), 1 −g(t)). One may show that ROC ((g, h), ·) is above the diagonal ∆: α ∈[0, 1] 7→α of the ROC space if and only if the distribution g is stochastically larger than h and it is concave as soon as the likelihood ratio dg/dh is increasing. When g(dt) and h(dt) are both continuous, the curves ROC((g, h), .) and ROC((h, g), .) are symmetric with respect to the diagonal of the ROC space with slope equal to one. Refer to [9] for a detailed list of properties of ROC curves. The notion of ROC curve provides a functional measure of dissimilarity between distributions on R: the closer to the corners of the unit square the curve ROC ((g, h), ·) is, the more dissimilar the distributions g and h are. For instance, it exactly coincides with the upper left-hand corner of the unit square, namely the curve α ∈[0, 1] 7→I{α ∈]0, 1]}, when there exists l ∈R such that the support of distribution g(dt) is a subset of [l, ∞[, while ]l, −∞, ] contains the support of h. In contrast, it merges with the diagonal ∆when g = h. Hence, distance of ROC ((g, h), ·) to the diagonal may be naturally used to quantify departure from the homogeneous situation. The L1-norm provides a convenient way of measuring such a distance, leading to the classical AUC criterion (AUC standing for area under the ROC curve): AUC(g, h) = Z 1 α=0 ROC ((g, h), α) dα. The popularity of this summary quantity arises from the fact that it can be interpreted in a probabilistic fashion, and may be viewed as a distance between the locations of the two distributions. In this respect, we recall the following result. Proposition 1 Let g and h be two distributions on R. We have: AUC(g, h) = P {Z > Z′} + 1 2P {Z = Z′} = 1 2 + E[h(Z)] −E[g(Z′)], where Z and Z′ denote independent random variables, drawn from g(dt) and h(dt) respectively. We recall that the homogeneous situation corresponds to the case where AUC(g, h) = 1/2 and the Mann-Withney statistic [16] Un,m = 1 nm n X i=1 m X j=1  I{X− j < X+ i } + 1 2I{X− j = X+ i }  is exactly the empirical counterpart of AUC(g, h). It yields exactly the same statistical decisions as the two-sample Wilcoxon statistic, insofar they are related as follows: Wn,m = nmbUn,m + n(n + 1)/2. For this reason, the related test of hypotheses is called Mann-Whitney Wilcoxon test (MWW). Multidimensional extension. In the multivariate setup, the notion of ROC curve can be extended the following way. Let H(dx) and G(dx) be two given distributions on Rd and S = {s : X →R | 4 s Borel measurable}. For any scoring function s ∈S, we denote by Hs(dt) and Gs(t) the images of H(dx) and G(x) by the mapping s(x). In addition, we set for all s ∈S: ROC(s, .) = ROC((Gs, Hs), .) and AUC(s) = AUC(Gs, Hs). Clearly, the families of univariate distributions {Gs}s∈S and {Hs}s∈S entirely characterize the multivariate probability measures G and H. One may thus consider evaluating the dissimilarity between H(dx) and G(dx) on Rd through the family of curves {ROC(s, .)}s∈S or through the collection of scalar values {AUC(s)}s∈S. Going back to the homogeneity testing problem, the null assumption may be reformulated as ”H0 : ∀s ∈S, AUC(s) = 1/2” versus ”H1 : ∃s ∈S such that AUC(s) > 1/2”. The next result, following from standard Neyman-Pearson type arguments, shows that the supremum sups∈S AUC(s) is attained by increasing transforms of the likelihood ratio φ(x) = dG/dH(x), x ∈X. Scoring functions with largest AUC are natural candidates for detecting the alternative H1. Theorem 1 (OPTIMAL ROC CURVE.) The set of S∗= {T ◦φ | T : R →R strictly increasing } defines the collection of optimal scoring functions in the sense that: ∀s ∈S, ∀α ∈[0, 1], ROC(s, α) ≤ROC∗(α) and AUC(s) ≤AUC∗, with the notations ROC∗(.) = ROC(s∗, .) and AUC∗= AUC(s∗) for s∗∈S∗. Refer to Proposition 4’s proof in [9] for a detailed argument. Notice that, as dG/dH(X) = dGφ(X)/dHφ(φ(X)), replacing X by s∗(X) with s∗∈S∗leaves the optimal ROC curve untouched. The following corollary is straightforward. Corollary 1 For any s ∈S∗, we have: sups∈S |AUC(s) −1/2| = AUC(s∗) −1/2. Consequently, the homogeneity testing problem may be seen as closely related to the problem of estimating the optimal AUC∗, since it may be re-formulated as follows: ”H0 : AUC∗= 1/2” versus ”H1 : AUC∗> 1/2”. Knowing how a single optimal scoring function s∗∈S∗ranks observations drawn from a mixture of G and H is sufficient for detecting departure from the homogeneity hypothesis in an optimal fashion, the MWW statistic computed from the (s∗(X+ i ), s∗(X− j ))’s being an asymptotically efficient estimate of AUC∗and thus yields an asymptotically (locally) uniformly most powerful test. Let F(dx) = pG(dx) + (1 −p)H(dx) and denote by Fs(dt) the image of the distribution F by s ∈S. Notice that, for any s∗∈S∗, the scoring function S∗= Fs∗◦s∗is still optimal and the score variable S∗(X) is uniformly distributed on [0, 1] under the mixture distribution F (in addition, it may be easily shown to be independent from s∗∈S∗). Observe in addition that AUC∗−1/2 may be viewed as the Earth Mover’s distance between the class distributions HS∗and GS∗for this ”normalization”: AUC∗−1/2 = Z 1 t=0 {HS∗(t) −GS∗(t)} dt. Empirical AUC maximization. A natural way of inferring the value of AUC∗and/or selecting a scoring function ˆs with AUC nearly as large as AUC∗is to maximize an empirical version of the AUC criterion over a set S0 of scoring function candidates. We assume that the class S0 is sufficiently rich in order to guarantee that the bias AUC∗−sups∈S0 AUC(s) is small, and its complexity is controlled (when measured for instance by the VC dimension of the collection of sets {{x ∈X : s(x) ≥t}, (s, t) ∈S0 × R} as in [7] or by the order of magnitude of conditional Rademacher averages as in [6]). We recall that, under such assumptions, universal consistency results have been established for empirical AUC maximizers, together with distribution-free generalization bounds, see [2, 6] for instance. We point out that this approach can be extended to other relevant ranking criteria. The contours of a theory guaranteeing the statistical performance of the ERM approach for empirical risk functionals defined by R-estimates have been sketched in [8]. 5 4 The two-stage testing procedure Assume that data have been split into two subsamples: the first data set Dn0,m0 = {X+ 1 , . . . , X+ n0} ∪{X− 1 , . . . , X− m0} will be used for deriving a scoring function on X and the second data set D′ n1,m1 = {X+ n0+1, . . . , X+ n0+n1} ∪{X− m0+1, . . . , X− m0+m1} will serve to compute a pseudo- two-sample Wilcoxon test statistic from the ranked data. We set N0 = n0 + m0 and N1 = n1 + m1 and suppose that ni/Ni →p as ni and mi tend to infinity for i ∈{0, 1}. Let α ∈(0, 1). The testing procedure at level α is then performed in two steps, as follows. SCORE-BASED RANK-SUM WILCOXON TEST 1. Ranking. From dataset Dn0,m0, perform empirical AUC maximization over S0 ⊂S, yielding the scoring function ˆs(x) = ˆsn0,m0(x). Compute the ranks of data with positive labels among the sample D′ n1,m1, once sorted by increasing order of magnitude of their score: b Ri = N1 ˆS(X+ n0+i) for 1 ≤i ≤n1, where bFˆs(t) = N −1 1 “Pn1 i=1 I{ˆs(X+ n0+i) ≤t} + Pm1 j=1 I{ˆs(X− m0+j) ≤t} ” and ˆS = bFˆs ◦ˆs. 2. Rank-sum Wilcoxon test. Reject the homogeneity hypothesis H0 when: c Wn1,m1 ≥Qn1,m1(α), where c Wn1,m1 = Pn1 i=1 b Ri and Qn1,m1(α) denotes the (1−α)-quantile of distribution Wn1,m1. The next result shows that the learning step does not affect the consistency property, provided it outputs a universally consistent scoring rule. Theorem 2 Let α ∈(0, 1/2) and suppose that the ranking/scoring method involved at step 1 yields a universally consistent scoring rule ˆs in the AUC sense. The score-based rank-sum Wilcoxon test Φ = I n c Wn1,m1 ≥Qn1,m1(α) o is universally consistent as ni and mi tend to ∞for i ∈{0, 1} at level α, in the following sense. 1. It is of level α for all ni and mi, i ∈{0, 1}: P(H,H) {Φ = +1} ≤α for any H(dx). 2. Its power converges to 1 as ni and mi, i ∈{0, 1}, tend to infinity for every alternative: limni, mi→∞P(G,H) {Φ = +1} = 1 for every pair of distinct distributions (G, H). Remark 2 (CONVERGENCE RATES.) Under adequate complexity assumptions on the set S0 over which empirical AUC maximization or one of its variants is performed, distribution-free rate bounds for the generalization ability of scoring rules may be established in terms of AUC, see Corollary 6 in [2] or Corollary 3 in [6]. As shown by a careful examination of Theorem 2, this permits to derive a convergence rate for the decay of the score-based type II error of MWW under any given alternative (G, H), when combined with the Berry-Esseen theorem for two-sample U-statistics. For instance, if a typical 1/√N0 rate bound holds for ˆs(x), one may show that choosing N1 ∼N0 then yields a rate of order OP(G,H)(1/√N0). Remark 3 (INFINITE-DIMENSIONAL FEATURE SPACE.) We point out that the method presented here is by no means restricted to the case where X is of finite dimension, but may be applied to functional input data, provided an AUC-consistent ranking procedure can be applied in this context. 5 Numerical examples The procedure proposed above is extremely simple once the delicate AUC maximization stage is performed. A stunning property is the fact that critical thresholds are set automatically, with no reference to the data. We firts consider a low-dimensional toy experiment and display some numerical results. Two independent i.i.d. samples of equal size m = n = N/2 have been generated from two conditional 4-dimensional gaussian distributions on the hypercube [−2, 2]4. Their parameters 6 are denoted by µ+ and µ−for the means and Γ is their common covariance matrix. Three cases have been considered. The first example corresponds to a homogeneous situation: µ+ = µ−= µ1 where µ1 = (−0.96, −0.83, 0.29, −1.34) and the upper diagonals of Γ1 are (6.52, 3.84, 4.72, 3.1), (−1.89, 3.56, 1.52), (−3.2, 0.2) and (−2.6). In the second example, we test homogeneity under an alternative, ”fairly far” from H0, where µ−= µ1, µ+ = (0.17, −0.24, 0.04, −1.02) and Γ as before. Eventually, the third example corresponds to a much more difficult problem, ”close” to H0, where µ−= (1.19, −1.20, −0.02, −0.16), µ+ = (1.08, −1.18, −0.1, −0.06) and the upper diagonals of Γ are (1.83, 6.02, 0.69, 4.99), (−0.65, −0.31, 1.03), (−0.54, −0.03) and (−1.24). The difficulty of each of these examples is illustrated by Fig. 2 in terms of (optimal) ROC curve. The table in Fig. 2 gives Monte-Carlo estimates of the power of three testing procedures when α = 0.05 (averaged over B = 150 replications): 1) the score-based MWW test, where ranking is performed using the scoring function output by a run of the TREERANK algorithm [9] on a training sample Dn0,m0, 2) the LDA-based Student test sketched in Remark 1 and 3) a bootstrap version of the MMD-test with a Gaussian RBF Kernel proposed in [1]. DataSet Sample size (m0,m1) LDA-Student Score-based MWW MMD Ex. 1 (500,500) 6% 1% 5% Ex. 2 (500,500) 99% 99% 99% Ex. 3 (2000,1000) 75% 45% 30% (3000,2000) 98% 73% 65% Figure 1: Powers and ROC curves describing the ”distance” to H0 for each situation: example 1 (red), example 2 (black) and example 3 (blue). In the second series of experimental results, gaussian distributions with same covariance matrix on Rd are generated, with larger values for the input space dimension d ∈{10, 30}. We considered several problems at given toughness. The increasing difficulty of the testing problems considered is controlled through the euclidian distance between the means ∆µ = ||µ+ −µ−|| and is described by Fig. 2, which depicts the related ROC curves, corresponding to situations where ∆µ ∈{0.2, 0.1, 0.08, 0.05}. On these examples, we compared the performance of four methods at level α = 0.05: the score-based MWW test, where ranking is again performed using the scoring function output by a run of the TREERANK algorithm on a training sample Dn0,m0, the KFDA test proposed in [23], a bootstrap version of the MMD-test with a Gaussian RBF Kernel (MMD) and another version, with moment matching to Pearson curves (MMDmom), using also with a Gaussian RBF kernel (see [1]). Monte-Carlo estimates of the corresponding powers are given in the Table displayed in Fig. 2. 6 Conclusion We have provided a sound strategy, involving a preliminary bipartite ranking stage, to extend classical approaches for testing homogeneity based on ranks to a multidimensional setup. Consistency of the extended version of the popular MWW test has been established, under the assumption of universal consistency of the ranking method in the AUC sense. This principle can be applied to other R-statistics, standing as natural criteria for the bipartite ranking problem [8]. Beyond the illustrative preliminary simulation example displayed in this paper, we intend to investigate the relative efficiency of such tests with respect to other tests standing as natural candidates in this setup. Appendix - Proof of Theorem 2 Observe that, conditioned upon the first sample Dn0,m0, the statistic c Wn1,m1 is distributed according to Wn1,m1 under the null hypothesis. For any distribution H, we thus have: ∀α ∈(0, 1/2), P(H,H) n c Wn1,m1 > Qn1,m1(α) | Dn0,m0 o ≤α. Taking the expectation, we obtain that the test is of level α for all n, m. 7 Dim. d MMDboot MMDmom Kfda Sc.based MWW case 1 :∆µ = 0.2 d = 10 86% 86% 64% 90% d = 30 54% 58% 36% 85% case 1 :∆µ = 0.1 d = 10 20% 20% 20% 58% d = 30 9% 7% 15% 47% case 3 :∆µ = 0.08 d = 10 19% 19% 16% 42% d = 30 5% 7% 9% 32% case 4 :∆µ = 0.05 d = 10 11% 13% 13% 18% d = 30 6% 6% 8% 16% Figure 2: Power estimates and ROC curves describing the ”distance” to H0 for each situation: case 1 (black), case 2 (blue), case 3 (green) and case 4 (red). For any s ∈S, denote by Un1,m1(s) the empirical AUC of s evaluated on the sample D′ n1,m1. Recall first that it follows from the two-sample U-statistic theorem (see [20]) that: √ N{Un1,m1(s) −AUC(s)} = √N1 n1 n1 X i=1  Hs(s(X+ i+n0)) −E[Hs(s(X+ 1 ))] − √N1 m1 m1 X j=1  Gs(s(X− j+m0)) −E[Gs(s(X− 1 ))] + oP(G,H)(1), as n, m tend to infinity. In particular, for any pair of distributions (G, H), the centered random variable √ N{Un1,m1(s) −AUC(s)} is asymptotically normal with limit variance σ2 s(G, H) = Var(Hs(s(X+ 1 )))/p+Var(Gs(s(X− 1 )))/(1−p) under P(G,H). Notice that σ2 s(H, H) = 1/(12p(1− p)) for any s ∈S such that the distribution Hs(dt) is continuous. Refer to Theorem 12.4 in [21] for further details. We now place ourselves under an alternative hypothesis described by a pair of distinct distribution (G, H), so that AUC∗> 1/2. Setting bUn1,m1 = Un1,m1(ˆs) and decomposing AUC∗−bUn1,m1 as the sum of the deficit of AUC of ˆs(x), AUC∗−AUC(ˆs) namely, and the deviation AUC(ˆs)−bUn1,m1 evaluated on the sample D′ n1,m1, type II error of Φ given by P(G,H) n c Wn1,m1 ≤Qn1,m1(α) o may be bounded by: P(G,H) np N1  bUn1,m1 −AUC(bs)  ≤ϵn1,m1(α) o + P(G,H) np N1 (AUC(bs) −AUC∗) ≤ϵn1,m1(α) o , where ϵn1,m1(α) = p N1 Qn1,m1(α) n1m1 −n1 + 1 2m1 −1 2  − p N1(AUC∗−1 2). Observe that, by virtue of the CLT recalled above, √N1(Qn1,m1(α)/(n1m1) −(n1 + 1)/(2m1)) converges to zα/ p 12p(1 −p). Now, the fact that type II error of Φ converges to zero as ni and mi tend to ∞for i ∈{0, 1} immediately follows from the assumption in regards to the AUC of ˆs(x) universal consistency and the CLT for two-sample U-statistics combined with the theorem of dominated convergence. Due to space limitations, details are omitted. 8 References [1] M.J. Rasch B. Scholkopf A. Smola A. Gretton, K.M. Borgwardt. A kernel method for the two-sample problem. In Advances in Neural Information Processing Systems 19. MIT Press, Cambridge, MA, 2007. [2] S. Agarwal, T. Graepel, R. Herbrich, S. Har-Peled, and D. Roth. Generalization bounds for the area under the ROC curve. J. Mach. Learn. Res., 6:393–425, 2005. [3] G. Biau and L. Gyorfi. On the asymptotic properties of a nonparametric l1-test statistic of homogeneity. IEEE Transactions on Information Theory, 51(11):3965–3973, 2005. [4] Y.K. Cheung and J.H. Klotz. The Mann Whitney Wilcoxon distribution using linked list. Statistica Sinica, 7:805–813, 1997. [5] S. Cl´emenc¸on, G. Lugosi, and N. Vayatis. Ranking and scoring using empirical risk minimization. In P. Auer and R. Meir, editors, Proceedings of COLT 2005, volume 3559 of Lecture Notes in Computer Science, pages 1–15. Springer, 2005. [6] S. Cl´emenc¸on, G. Lugosi, and N. Vayatis. Ranking and empirical risk minimization of U-statistics. The Annals of Statistics, 36(2):844–874, 2008. [7] S. Cl´emenc¸on and N. Vayatis. Ranking the best instances. Journal of Machine Learning Research, 8:2671–2699, 2007. [8] S. Cl´emenc¸on and N. Vayatis. Empirical performance maximization based on linear rank statistics. In Advances in Neural Information Processing Systems, volume 3559 of Lecture Notes in Computer Science, pages 1–15. Springer, 2009. [9] S. Cl´emenc¸on and N. Vayatis. Tree-based ranking methods. IEEE Transactions on Information Theory, 55(9):4316–4336, 2009. [10] W.W. Cohen, R.E. Schapire, and Y. Singer. Learning to order things. In NIPS ’97: Proceedings of the 1997 conference on Advances in neural information processing systems 10, pages 451–457, Cambridge, MA, USA, 1998. MIT Press. [11] C. Cortes and M. Mohri. AUC optimization vs. error rate minimization. In S. Thrun, L. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004. [12] C. Ferri, P.A. Flach, and J. Hern´andez-Orallo. Learning decision trees using the area under the roc curve. In ICML ’02: Proceedings of the Nineteenth International Conference on Machine Learning, pages 139– 146, 2002. [13] Y. Freund, R. D. Iyer, R. E. Schapire, and Y. Singer. An efficient boosting algorithm for combining preferences. Journal of Machine Learning Research, 4:933–969, 2003. [14] S. Kotz and S. Nadarajah. Multivariate t Distributions and Their Applications. Cambridge University Press, 2004. [15] E.L. Lehmann and J. P. Romano. Testing Statistical Hypotheses. Springer, 2005. [16] H.B. Mann and D.R. Whitney. On a test of whether one of two random variables is stochastically larger than the other. Ann. Math. Stat., 18:50–60, 1947. [17] A. Rachev. Probability Metrics and the Stability of Stochastic Models. Wiley, 1991. [18] A. Rakotomamonjy. Optimizing Area Under Roc Curve with SVMs. In Proceedings of the First Workshop on ROC Analysis in AI, 2004. [19] C. Rudin, C. Cortes, M. Mohri, and R. E. Schapire. Margin-based ranking and boosting meet in the middle. In P. Auer and R. Meir, editors, Proceedings of COLT 2005, volume 3559 of Lecture Notes in Computer Science, pages 63–78. Springer, 2005. [20] R.J. Serfling. Approximation theorems of mathematical statistics. Wiley, 1980. [21] A.K. van der Vaart. Asymptotic Analysis. Cambridge University Press, 1998. [22] F. Wilcoxon. Individual comparisons by ranking methods. Biometrics, 1:80–83, 1945. [23] E. Moulines Z. Harchaoui, F. Bach. Testing for homogeneity with kernel Fischer discriminant analysis. In Advances in Neural Information Processing Systems 20. MIT Press, Cambridge, MA, 2008. 9
2009
73
3,825
Measuring Invariances in Deep Networks Ian J. Goodfellow, Quoc V. Le, Andrew M. Saxe, Honglak Lee, Andrew Y. Ng Computer Science Department Stanford University Stanford, CA 94305 {ia3n,quocle,asaxe,hllee,ang}@cs.stanford.edu Abstract For many pattern recognition tasks, the ideal input feature would be invariant to multiple confounding properties (such as illumination and viewing angle, in computer vision applications). Recently, deep architectures trained in an unsupervised manner have been proposed as an automatic method for extracting useful features. However, it is difficult to evaluate the learned features by any means other than using them in a classifier. In this paper, we propose a number of empirical tests that directly measure the degree to which these learned features are invariant to different input transformations. We find that stacked autoencoders learn modestly increasingly invariant features with depth when trained on natural images. We find that convolutional deep belief networks learn substantially more invariant features in each layer. These results further justify the use of “deep” vs. “shallower” representations, but suggest that mechanisms beyond merely stacking one autoencoder on top of another may be important for achieving invariance. Our evaluation metrics can also be used to evaluate future work in deep learning, and thus help the development of future algorithms. 1 Introduction Invariance to abstract input variables is a highly desirable property of features for many detection and classification tasks, such as object recognition. The concept of invariance implies a selectivity for complex, high level features of the input and yet a robustness to irrelevant input transformations. This tension between selectivity and robustness makes learning invariant features nontrivial. In the case of object recognition, an invariant feature should respond only to one stimulus despite changes in translation, rotation, complex illumination, scale, perspective, and other properties. In this paper, we propose to use a suite of “invariance tests” that directly measure the invariance properties of features; this gives us a measure of the quality of features learned in an unsupervised manner by a deep learning algorithm. Our work also seeks to address the question: why are deep learning algorithms useful? Bengio and LeCun gave a theoretical answer to this question, in which they showed that a deep architecture is necessary to represent many functions compactly [1]. A second answer can also be found in such work as [2, 3, 4, 5], which shows that such architectures lead to useful representations for classification. In this paper, we give another, empirical, answer to this question: namely, we show that with increasing depth, the representations learned can also enjoy an increased degree of invariance. Our observations lend credence to the common view of invariances to minor shifts, rotations and deformations being learned in the lower layers, and being combined in the higher layers to form progressively more invariant features. In computer vision, one can view object recognition performance as a measure of the invariance of the underlying features. While such an end-to-end system performance measure has many benefits, it can also be expensive to compute and does not give much insight into how to directly improve representations in each layer of deep architectures. Moreover, it cannot identify specific invariances 1 that a feature may possess. The test suite presented in this paper provides an alternative that can identify the robustness of deep architectures to specific types of variations. For example, using videos of natural scenes, our invariance tests measure the degree to which the learned representations are invariant to 2-D (in-plane) rotations, 3-D (out-of-plane) rotations, and translations. Additionally, such video tests have the potential to examine changes in other variables such as illumination. We demonstrate that using videos gives similar results to the more traditional method of measuring responses to sinusoidal gratings; however, the natural video approach enables us to test invariance to a wide range of transformations while the grating test only allows changes in stimulus position, orientation, and frequency. Our proposed invariance measure is broadly applicable to evaluating many deep learning algorithms for many tasks, but the present paper will focus on two different algorithms applied to computer vision. First, we examine the invariances of stacked autoencoder networks [2]. These networks were shown by Larochelle et al. [3] to learn useful features for a range of vision tasks; this suggests that their learned features are significantly invariant to the transformations present in those tasks. Unlike the artificial data used in [3], however, our work uses natural images and natural video sequences, and examines more complex variations such as out-of-plane changes in viewing angle. We find that when trained under these conditions, stacked autoencoders learn increasingly invariant features with depth, but the effect of depth is small compared to other factors such as regularization. Next, we show that convolutional deep belief networks (CDBNs) [5], which are hand-designed to be invariant to certain local image translations, do enjoy dramatically increasing invariance with depth. This suggests that there is a benefit to using deep architectures, but that mechanisms besides simple stacking of autoencoders are important for gaining increasing invariance. 2 Related work Deep architectures have shown significant promise as a technique for automatically learning features for recognition systems. Deep architectures consist of multiple layers of simple computational elements. By combining the output of lower layers in higher layers, deep networks can represent progressively more complex features of the input. Hinton et al. introduced the deep belief network, in which each layer consists of a restricted Boltzmann machine [4]. Bengio et al. built a deep network using an autoencoder neural network in each layer [2, 3, 6]. Ranzato et al. and Lee et al. explored the use of sparsity regularization in autoencoding energy-based models [7, 8] and sparse convolutional DBNs with probabilistic max-pooling [5] respectively. These networks, when trained subsequently in a discriminative fashion, have achieved excellent performance on handwritten digit recognition tasks. Further, Lee et al. and Raina et al. show that deep networks are able to learn good features for classification tasks even when trained on data that does not include examples of the classes to be recognized [5, 9]. Some work in deep architectures draws inspiration from the biology of sensory systems. The human visual system follows a similar hierarchical structure, with higher levels representing more complex features [10]. Lee et al., for example, compared the response properties of the second layer of a sparse deep belief network to V2, the second stage of the visual hierarchy [11]. One important property of the visual system is a progressive increase in the invariance of neural responses in higher layers. For example, in V1, complex cells are invariant to small translations of their inputs. Higher in the hierarchy in the medial temporal lobe, Quiroga et al. have identified neurons that respond with high selectivity to, for instance, images of the actress Halle Berry [12]. These neurons are remarkably invariant to transformations of the image, responding equally well to images from different perspectives, at different scales, and even responding to the text “Halle Berry.” While we do not know exactly the class of all stimuli such neurons respond to (if tested on a larger set of images, they may well turn out to respond also to other stimuli than Halle Berry related ones), they nonetheless show impressive selectivity and robustness to input transformations. Computational models such as the neocognitron [13], HMAX model [14], and Convolutional Network [15] achieve invariance by alternating layers of feature detectors with local pooling and subsampling of the feature maps. This approach has been used to endow deep networks with some degree of translation invariance [8, 5]. However, it is not clear how to explicitly imbue models with more complicated invariances using this fixed architecture. Additionally, while deep architectures provide a task-independent method of learning features, convolutional and max-pooling techniques are somewhat specialized to visual and audio processing. 2 3 Network architecture and optimization We train all of our networks on natural images collected separately (and in geographically different areas) from the videos used in the invariance tests. Specifically, the training set comprises a set of still images taken in outdoor environments free from artificial objects, and was not designed to relate in any way to the invariance tests. 3.1 Stacked autoencoder The majority of our tests focus on the stacked autoencoder of Bengio et al. [2], which is a deep network consisting of an autoencoding neural network in each layer. In the single-layer case, in response to an input pattern x ∈Rn, the activation of each neuron, hi, i = 1, · · · , m is computed as h(x) = tanh (W1x + b1) , where h(x) ∈Rm is the vector of neuron activations, W1 ∈Rm×n is a weight matrix, b1 ∈Rm is a bias vector, and tanh is the hyperbolic tangent applied componentwise. The network output is then computed as ˆx = tanh (W2h(x) + b2) , where ˆx ∈Rn is a vector of output values, W2 ∈Rn×m is a weight matrix, and b2 ∈Rn is a bias vector. Given a set of p input patterns x(i), i = 1, · · · , p, the weight matrices W1 and W2 are adapted using backpropagation [16, 17, 18] to minimize the reconstruction error Pp i=1 x(i) −ˆx(i) 2. Following [2], we successively train up layers of the network in a greedy layerwise fashion. The first layer receives a 14 × 14 patch of an image as input. After it achieves acceptable levels of reconstruction error, a second layer is added, then a third, and so on. In some of our experiments, we use the method of [11], and constrain the expected activation of the hidden units to be sparse. We never constrain W1 = W T 2 , although we found this to approximately hold in practice. 3.2 Convolutional Deep Belief Network We also test a CDBN [5] that was trained using two hidden layers. Each layer includes a collection of “convolution” units as well as a collection of “max-pooling” units. Each convolution unit has a receptive field size of 10x10 pixels, and each max-pooling unit implements a probabilistic maxlike operation over four (i.e., 2x2) neighboring convolution units, giving each max-pooling unit an overall receptive field size of 11x11 pixels in the first layer and 31x31 pixels in the second layer. The model is regularized in a way that the average hidden unit activation is sparse. We also use a small amount of L2 weight decay. Because the convolution units share weights and because their outputs are combined in the maxpooling units, the CDBN is explicitly designed to be invariant to small amounts of image translation. 4 Invariance measure An ideal feature for pattern recognition should be both robust and selective. We interpret the hidden units as feature detectors that should respond strongly when the feature they represent is present in the input, and otherwise respond weakly when it is absent. An invariant neuron, then, is one that maintains a high response to its feature despite certain transformations of its input. For example, a face selective neuron might respond strongly whenever a face is present in the image; if it is invariant, it might continue to respond strongly even as the image rotates. Building on this intuition, we consider hidden unit responses above a certain threshold to be firing, that is, to indicate the presence of some feature in the input. We adjust this threshold to ensure that the neuron is selective, and not simply always active. In particular we choose a separate threshold for each hidden unit such that all units fire at the same rate when presented with random stimuli. After identifying an input that causes the neuron to fire, we can test the robustness of the unit by calculating its firing rate in response to a set of transformed versions of that input. More formally, a hidden unit i is said to fire when sihi(x) > ti, where ti is a threshold chosen by our test for that hidden unit and si ∈{−1, 1} gives the sign of that hidden unit’s values. The sign term si is necessary because, in general, hidden units are as likely to use low values as to use high values to indicate the presence of the feature that they detect. We therefore choose si to maximize the invariance score. For hidden units that are regularized to be sparse, we assume that si = 1, since their mean activity has been regularized to be low. We define the indicator function 3 fi(x) = 1{sihi(x) > ti}, i.e., it is equal to one if the neuron fires in response to input x, and zero otherwise. A transformation function τ(x, γ) transforms a stimulus x into a new, related stimulus, where the degree of transformation is parametrized by γ ∈R. (One could also imagine a more complex transformation parametrized by γ ∈Rn.) In order for a function τ to be useful with our invariance measure, |γ| should relate to the semantic dissimilarity between x and τ(x, γ). For example, γ might be the number of degrees by which x is rotated. A local trajectory T(x) is a set of stimuli that are semantically similar to some reference stimulus x, that is T(x) = {τ(x, γ) | γ ∈Γ} where Γ is a set of transformation amounts of limited size, for example, all rotations of less than 15 degrees. The global firing rate is the firing rate of a hidden unit when applied to stimuli drawn randomly from a distribution P(x): G(i) = E[fi(x)], where P(x) is a distribution over the possible inputs x defined for each implementation of the test. Using these definitions, we can measure the robustness of a hidden unit as follows. We define the set Z as a set of inputs that activate hi near maximally. The local firing rate is the firing rate of a hidden unit when it is applied to local trajectories surrounding inputs z ∈Z that maximally activate the hidden unit, L(i) = 1 |Z| X z∈Z 1 |T(z)| X x∈T (z) fi(x), i.e., L(i) is the proportion of transformed inputs that the neuron fires in response to, and hence is a measure of the robustness of the neuron’s response to the transformation τ. Our invariance score for a hidden unit hi is given by S(i) = L(i) G(i). The numerator is a measure of the hidden unit’s robustness to transformation τ near the unit’s optimal inputs, and the denominator ensures that the neuron is selective and not simply always active. In our tests, we tried to select the threshold ti for each hidden unit so that it fires one percent of the time in response to random inputs, that is, G(i) = 0.01. For hidden units that frequently repeat the same activation value (up to machine precision), it is sometimes not possible to choose ti such that G(i) = 0.01 exactly. In such cases, we choose the smallest value of t(i) such that G(i) > 0.01. Each of the tests presented in the paper is implemented by providing a different definition of P(x), τ(x, γ), and Γ. S(i) gives the invariance score for a single hidden unit. The invariance score Invp(N) of a network N is given by the mean of S(i) over the top-scoring proportion p of hidden units in the deepest layer of N. We discard the (1 −p) worst hidden units because different subpopulations of units may be invariant to different transformations. Reporting the mean of all unit scores would strongly penalize networks that discover several hidden units that are invariant to transformation τ but do not devote more than proportion p of their hidden units to such a task. Finally, note that while we use this metric to measure invariances in the visual features learned by deep networks, it could be applied to virtually any kind of feature in virtually any application domain. 5 Grating test Our first invariance test is based on the response of neurons to synthetic images. Following such authors as Berkes et al.[19], we systematically vary the parameters used to generate images of gratings. We use as input an image I of a grating, with image pixel intensities given by I(x, y) = b + a sin (ω(x cos(θ) + y sin(θ) −φ)) , 4 where ω is the spatial frequency, θ is the orientation of the grating, and φ is the phase. To implement our invariance measure, we define P(x) as a distribution over grating images. We measure invariance to translation by defining τ(x, γ) to change φ by γ. We measure invariance to rotation by defining τ(x, γ) to change ω by γ.1 6 Natural video test While the grating-based invariance test allows us to systematically vary the parameters used to generate the images, it shares the difficulty faced by a number of other methods for quantifying invariance that are based on synthetic (or nearly synthetic) data [19, 20, 21]: it is difficult to generate data that systematically varies a large variety of image parameters. Our second suite of invariance tests uses natural video data. Using this method, we will measure the degree to which various learned features are invariant to a wide range of more complex image parameters. This will allow us to perform quantitative comparisons of representations at each layer of a deep network. We also verify that the results using this technique align closely with those obtained with the grating-based invariance tests. 6.1 Data collection Our dataset consists of natural videos containing common image transformations such as translations, 2-D (in-plane) rotations, and 3-D (out-of-plane) rotations. In contrast to labeled datasets like the NORB dataset [21] where the viewpoint changes in large increments between successive images, our videos are taken at sixty frames per second, and thus are suitable for measuring more modest invariances, as would be expected in lower layers of a deep architecture. After collection, the images are reduced in size to 320 by 180 pixels and whitened by applying a band pass filter. Finally, we adjust the constrast of the whitened images with a scaling constant that varies smoothly over time and attempts to make each image use as much of the dynamic range of the image format as possible. Each video sequence contains at least one hundred frames. Some video sequences contain motion that is only represented well near the center of the image; for example, 3-D (out-of-plane) rotation about an object in the center of the field of view. In these cases we cropped the videos tightly in order to focus on the relevant transformation. 6.2 Invariance calculation To implement our invariance measure using natural images, we define P(x) as a uniform distribution over image patches contained in the test videos, and τ(x, γ) to be the image patch at the same image location as x but occurring γ video frames later in time. We define Γ = {−5, . . . , 5}. To measure invariance to different types of transformation, we simply use videos that involve each type of transformation. This obviates the need to define a complex τ capable of synthetically performing operations such as 3-D rotation. 7 Results 7.1 Stacked autoencoders 7.1.1 Relationship between grating test and natural video test Sinusoidal gratings are already used as a common reference stimulus. To validate our approach of using natural videos, we show that videos involving translation give similar test results to the phase variation grating test. Fig. 1 plots the invariance score for each of 378 one layer autoencoders regularized with a range of sparsity and weight decay parameters (shown in Fig. 3). We were not able to find as close of a correspondence between the grating orientation test and natural videos involving 2-D (in-plane) rotation. Our 2-D rotations were captured by hand-rotating a video camera in natural environments, which introduces small amounts of other types of transformations. To verify that the problem is not that rotation when viewed far from the image center resembles translation, we compare the invariance test scores for translation and for rotation in Fig. 2. The lack of any clear 1Details: We define P(x) as a uniform distribution over patches produced by varying ω ∈{2, 4, 6, 8}, θ ∈{0, · · · , π} in steps of π/20, and φ ∈{0, · · · , π} in steps of π/20. After identifying a grating that strongly activates the neuron, further local gratings T(x) are generated by varying one parameter while holding all other optimal parameters fixed. For the translation test, local trajectories T(x) are generated by modifying φ from the optimal value φopt to φ = φopt ± {0, · · · , π} in steps of π/20, where φopt is the optimal grating phase shift. For the rotation test, local trajectories T(x) are generated by modifying θ from the optimal value θopt to θ = θopt ± {0, · · · , π} in steps of π/40, where θopt is the optimal grating orientation. 5 0 10 20 30 40 50 60 70 80 90 100 0 5 10 15 20 25 Grating phase test Natural translation test Grating and natural video test comparison Figure 1: Videos involving translation give similar test results to synthetic videos of gratings with varying phase. 0 5 10 15 20 25 0 2 4 6 8 10 12 14 16 18 20 Natural translation test Natural 2−D rotation test Natural 2−D rotation and translation test Figure 2: We verify that our translation and 2-D rotation videos do indeed capture different transformations. −4 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0 −4 −3 −2 −1 0 1 2 0 10 20 30 40 log10 Target Mean Activation Layer 1 Natural Video Test log10 Weight Decay Invariance Score Figure 3: Our invariance measure selects networks that learn edge detectors resembling Gabor functions as the maximally invariant single-layer networks. Unregularized networks that learn highfrequency weights also receive high scores, but are not able to match the scores of good edge detectors. Degenerate networks in which every hidden unit learns essentially the same function tend to receive very low scores. trend makes it obvious that while our 2-D rotation videos do not correspond exactly to rotation, they are certainly not well-approximated by translation. 7.1.2 Pronounced effect of sparsity and weight decay We trained several single-layer autoencoders using sparsity regularization with various target mean activations and amounts of weight decay. For these experiments, we averaged the invariance scores of all the hidden units to form the network score, i.e., we used p = 1. Due to the presence of the sparsity regularization, we assume si = 1 for all hidden units. We found that sparsity and weight decay have a large effect on the invariance of a single-layer network. In particular, there is a semicircular ridge trading sparsity and weight decay where invariance scores are high. We interpret this to be the region where the problem is constrained enough that the autoencoder must throw away some information, but is still able to extract meaningful patterns from its input. These results are visualized in Fig. 3. We find that a network with no regularization obtains a score of 25.88, and the best-scoring network receives a score of 32.41. 7.1.3 Modest improvements with depth To investigate the effect of depth on invariance, we chose to extensively cross-validate several depths of autoencoders using only weight decay. The majority of successful image classification results in 6 Figure 4: Left to right: weight visualizations from layer 1, layer 2, and layer 3 of the autoencoders; layer 1 and layer 2 of the CDBN. Autoencoder weight images are taken from the best autoencoder at each depth. All weight images are contrast normalized independently but plotted on the same spatial scale. Weight images in deeper layers are formed by making linear combinations of weight images in shallower layers. This approximates the function computed by each unit as a linear function. the literature do not use sparsity, and cross-validating only a single parameter frees us to sample the search space more densely. We trained a total of 73 networks with weight decay at each layer set to a value from {10, 1, 10−1, 10−2, 10−3, 10−5, 0}. For these experiments, we averaged the invariance scores of the top 20% of the hidden units to form the network score, i.e., we used p = .2, and chose si for each hidden unit to maximize the invariance score, since there was no sparsity regularization to impose a sign on the hidden unit values. After performing this grid search, we trained 100 additional copies of the network with the best mean invariance score at each depth, holding the weight decay parameters constant and varying only the random weights used to initialize training. We found that the improvement with depth was highly significant statistically (see Fig. 5). However, the magnitude of the increase in invariance is limited compared to the increase that can be gained with the correct sparsity and weight decay. 7.2 Convolutional Deep Belief Networks 1 2 3 16.5 17 17.5 18 18.5 19 19.5 20 20.5 21 Layer Invariance Score Mean Invariance 1 2 3 31 31.5 32 32.5 33 33.5 34 34.5 35 35.5 Layer Invariance Score Translation 1 2 3 15 15.5 16 16.5 17 17.5 18 18.5 19 19.5 Layer Invariance Score 2−D Rotation 1 2 3 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 Layer Invariance Score 3−D Rotation Figure 5: To verify that the improvement in invariance score of the best network at each layer is an effect of the network architecture rather than the random initialization of the weights, we retrained the best network of each depth 100 times. We find that the increase in the mean is statistically significant with p < 10−60. Looking at the scores for individual invariances, we see that the deeper networks trade a small amount of translation invariance for a larger amount of 2-D (in-plane) rotation and 3-D (out-of-plane) rotation invariance. All plots are on the same scale but with different baselines so that the worst invariance score appears at the same height in each plot. We also ran our invariance tests on a two layer CDBN. This provides a measure of the effectiveness of hard-wired techniques for achieving invariance, including convolution and maxpooling. The results are summarized in Table 1. These results cannot be compared directly to the results for autoencoders, because of the different receptive field sizes. The receptive field sizes in the CDBN are smaller than those in the autoencoder for the lower layers, but larger than those in the autoencoder for the higher layers due to the pooling effect. Note that the greatest relative improvement comes in the natural image tests, which presumably require greater sophistication than the grating tests. The single test with the greatest relative improvement is the 3-D (out-of-plane) rotation test. This is the most complex transformation included in our tests, and it is where depth provides the greatest percentagewise increase. 8 Discussion and conclusion In this paper, we presented a set of tests for measuring invariances in deep networks. We defined a general formula for a test metric, and demonstrated how to implement it using synthetic grating images as well as natural videos which reveal more types of invariances than just 2-D (in-plane) rotation, translation and frequency. At the level of a single hidden unit, our firing rate invariance measure requires learned features to balance high local firing rates with low global firing rates. This concept resembles the trade-off between precision and recall in a detection problem. As learning algorithms become more 7 Test Layer 1 Layer 2 % change Grating phase 68.7 95.3 38.2 Grating orientation 52.3 77.8 48.7 Natural translation 15.2 23.0 51.0 Natural 3-D rotation 10.7 19.3 79.5 Table 1: Results of the CDBN invariance tests. advanced, another appropriate measure of invariance may be a hidden unit’s invariance to object identity. As an initial step in this direction, we attempted to score hidden units by their mutual information with categories in the Caltech 101 dataset [22]. We found that none of our networks gave good results. We suspect that current learning algorithms are not yet sophisticated enough to learn, from only natural images, individual features that are highly selective for specific Caltech 101 categories, but this ability will become measurable in the future. At the network level, our measure requires networks to have at least some subpopulation of hidden units that are invariant to each type of transformation. This is accomplished by using only the top-scoring proportion p of hidden units when calculating the network score. Such a qualification is necessary to give high scores to networks that decompose the input into separate variables. For example, one very useful way of representing a stimulus would be to use some subset of hidden units to represent its orientation, another subset to represent its position, and another subset to represent its identity. Even though this would be an extremely powerful feature representation, a value of p set too high would result in penalizing some of these subsets for not being invariant. We also illustrated extensive findings made by applying the invariance test on computer vision tasks. However, the definition of our metric is sufficiently general that it could easily be used to test, for example, invariance of auditory features to rate of speech, or invariance of textual features to author identity. A surprising finding in our experiments with visual data is that stacked autoencoders yield only modest improvements in invariance as depth increases. This suggests that while depth is valuable, mere stacking of shallow architectures may not be sufficient to exploit the full potential of deep architectures to learn invariant features. Another interesting finding is that by incorporating sparsity, networks can become more invariant. This suggests that, in the future, a variety of mechanisms should be explored in order to learn better features. For example, one promising approach that we are currently investigating is the idea of learning slow features [19] from temporal data. We also document that explicit approaches to achieving invariance such as max-pooling and weightsharing in CDBNs are currently successful strategies for achieving invariance. This is not suprising given the fact that invariance is hard-wired into the network, but it validates the fact that our metric faithfully measures invariances. It is not obvious how to extend these explicit strategies to become invariant to more intricate transformations like large-angle out-of-plane rotations and complex illumination changes, and we expect that our metrics will be useful in guiding efforts to develop learning algorithms that automatically discover much more invariant features without relying on hard-wired strategies. Acknowledgments This work was supported in part by the National Science Foundation under grant EFRI-0835878, and in part by the Office of Naval Research under MURI N000140710747. Andrew Saxe is supported by a Scott A. and Geraldine D. Macomber Stanford Graduate Fellowship. We would also like to thank the anonymous reviewers for their helpful comments. References [1] Y. Bengio and Y. LeCun. Scaling learning algorithms towards ai. In L. Bottou, O. Chapelle, D. DeCoste, and J. Weston, editors, Large-Scale Kernel Machines. MIT Press, 2007. 8 [2] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. In NIPS, 2007. [3] H. Larochelle, D. Erhan, A. Courville, J. Bergstra, and Y. Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. ICML, pages 473–480, 2007. [4] G.E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [5] H. Lee, R. Grosse, R. Ranganath, and A.Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In ICML, 2009. [6] H. Larochelle, Y. Bengio, J. Louradour, and P. Lamblin. Exploring strategies for training deep neural networks. The Journal of Machine Learning Research, pages 1–40, 2009. [7] M. Ranzato, Y-L. Boureau, and Y. LeCun. Sparse feature learning for deep belief networks. In NIPS, 2007. [8] M. Ranzato, F.-J. Huang, Y-L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In CVPR. IEEE Press, 2007. [9] Rajat Raina, Alexis Battle, Honglak Lee, Benjamin Packer, and Andrew Y. Ng. Self-taught learning: Transfer learning from unlabeled data. In ICML ’07: Proceedings of the 24th international conference on Machine learning, 2007. [10] D.J. Felleman and D.C. Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral Cortex, 1(1):1–47, 1991. [11] H. Lee, C. Ekanadham, and A.Y. Ng. Sparse deep belief network model for visual area v2. In NIPS, 2008. [12] R. Quian Quiroga, L. Reddy, G. Kreiman, C. Koch, and I. Fried. Invariant visual representation by single neurons in the human brain. Nature, 435:1102–1107, 2005. [13] K. Fukushima and S. Miyake. Neocognitron: A new algorithm for pattern recognition tolerant of deformations and shifts in position. Pattern Recognition, 1982. [14] M. Riesenhuber and T. Poggio. Hierarchical models of object recognition in cortex. Nature neuroscience, 2(11):1019–1025, 1999. [15] Y. LeCun, B. Boser, J.S. Denker, D. Henderson, R.E. Howard, W. Hubbard, and L.D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1:541– 551, 1989. [16] P. Werbos. Beyond regression: New tools for prediction and analysis in the behavioral sciences. PhD thesis, Harvard University, 1974. [17] Y. LeCun. Une proc´edure d’apprentissage pour r´eseau a seuil asymmetrique (a learning scheme for asymmetric threshold networks). In Proceedings of Cognitiva 85, pages 599–604, Paris, France, 1985. [18] D.E. Rumelhart, G.E. Hinton, and R.J. Williams. Learning representations by backpropagating errors. Nature, 323:533–536, 1986. [19] P. Berkes and L. Wiskott. Slow feature analysis yields a rich repertoire of complex cell properties. Journal of Vision, 5(6):579–602, 2005. [20] L. Wiskott and T. Sejnowski. Slow feature analysis: Unsupervised learning of invariances. Neural Computation, 14(4):715–770, 2002. [21] Y. LeCun, F.J. Huang, and L. Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In CVPR, 2004. [22] Li Fei-Fei, Rod Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. page 178, 2004. 9
2009
74
3,826
Nonparametric Latent Feature Models for Link Prediction Kurt T. Miller EECS University of California Berkeley, CA 94720 tadayuki@cs.berkeley.edu Thomas L. Griffiths Psychology and Cognitive Science University of California Berkeley, CA 94720 tom griffiths@berkeley.edu Michael I. Jordan EECS and Statistics University of California Berkeley, CA 94720 jordan@cs.berkeley.edu Abstract As the availability and importance of relational data—such as the friendships summarized on a social networking website—increases, it becomes increasingly important to have good models for such data. The kinds of latent structure that have been considered for use in predicting links in such networks have been relatively limited. In particular, the machine learning community has focused on latent class models, adapting Bayesian nonparametric methods to jointly infer how many latent classes there are while learning which entities belong to each class. We pursue a similar approach with a richer kind of latent variable—latent features—using a Bayesian nonparametric approach to simultaneously infer the number of features at the same time we learn which entities have each feature. Our model combines these inferred features with known covariates in order to perform link prediction. We demonstrate that the greater expressiveness of this approach allows us to improve performance on three datasets. 1 Introduction Statistical analysis of social networks and other relational data has been an active area of research for over seventy years and is becoming an increasingly important problem as the scope and availability of social network datasets increase [1]. In these problems, we observe the interactions between a set of entities and we wish to extract informative representations that are useful for making predictions about the entities and their relationships. One basic challenge is link prediction, where we observe the relationships (or “links”) between some pairs of entities in a network (or “graph”) and we try to predict unobserved links. For example, in a social network, we might only know some subset of people are friends and some are not, and seek to predict which other people are likely to get along. Our goal is to improve the expressiveness and performance of generative models based on extracting latent structure representing the properties of individual entities from the observed data, so we will focus on these kinds of models. This rules out approaches like the popular p∗model that uses global quantities of the graph, such as how many edges or triangles are present [2, 3]. Of the approaches that do link prediction based on attributes of the individual entities, these can largely be classified into class-based and feature-based approaches. There are many models that can be placed under these approaches, so we will focus on the models that are most comparable to our approach. 1 Most generative models using a class-based representation are based on the stochastic blockmodel, introduced in [4] and further developed in [5]. In the most basic form of the model, we assume there are a finite number of classes that entities can belong to and that these classes entirely determine the structure of the graph, with the probability of a link existing between two entities depending only on the classes of those entities. In general, these classes are unobserved, and inference reduces to assigning entities to classes and inferring the class interactions. One of the important issues that arise in working with this model is determining how many latent classes there are for a given problem. The Infinite Relational Model (IRM) [6] used methods from nonparametric Bayesian statistics to tackle this problem, allowing the number of classes to be determined at inference time. The Infinite Hidden Relational Model [7] further elaborated on this model and the Mixed Membership Stochastic Blockmodel (MMSB) [8] extended it to allow entities to have mixed memberships. All these class-based models share a basic limitation in the kinds of relational structure they naturally capture. For example, in a social network, we might find a class which contains “male high school athletes” and another which contains “male high school musicians.” We might believe these two classes will behave similarly, but with a class-based model, our options are to either merge the classes or duplicate our knowledge about common aspects of them. In a similar vein, with a limited amount of data, it might be reasonable to combine these into a single class “male high school students,” but with more data we would want to split this group into athletes and musicians. For every new attribute like this that we add, the number of classes would potentially double, quickly leading to an overabundance of classes. In addition, if someone is both an athlete and a musician, we would either have to add another class for that or use a mixed membership model, which would say that the more a student is an athlete, the less he is a musician. An alternative approach that addresses this problem is to use features to describe the entities. There could be a separate feature for “high school student,” “male,” “athlete,” and “musician” and the presence or absence of each of these features is what defines each person and determines their relationships. One class of latent-feature models for social networks has been developed by [9, 10, 11], who proposed real-valued vectors as latent representations of the entities in the network where depending on the model, either the distance, inner product, or weighted combination of the vectors corresponding to two entities affects the likelihood of there being a link between them. However, extending our high school student example, we might hope that instead of having arbitrary realvalued features (which are still useful for visualization), we would infer binary features where each feature could correspond to an attribute like “male” or “athlete.” Continuing our earlier example, if we had a limited amount of data, we might not pick up on a feature like “athlete.” However, as we observe more interactions, this could emerge as a clear feature. Instead of doubling the numbers of classes in our model, we simply add an additional feature. Determining the number of features will therefore be of extreme importance. In this paper, we present the nonparametric latent feature relational model, a Bayesian nonparametric model in which each entity has binary-valued latent features that influences its relations. In addition, the relations depend on a set of known covariates. This model allows us to simultaneously infer how many latent features there are while at the same time inferring what features each entity has and how those features influence the observations. This model is strictly more expressive than the stochastic blockmodel. In Section 2, we describe a simplified version of our model and then the full model. In Section 3, we discuss how to perform inference. In Section 4, we illustrate the properties of our model using synthetic data and then show that the greater expressiveness of the latent feature representation results in improved link prediction on three real datasets. Finally, we conclude in Section 5. 2 The nonparametric latent feature relational model Assume we observe the directed relational links between a set of N entities. Let Y be the N × N binary matrix that contains these links. That is, let yij ≡Y (i, j) = 1 if we observe a link from entity i to entity j in that relation and yij = 0 if we observe that there is not a link. Unobserved links are left unfilled. Our goal will be to learn a model from the observed links such that we can predict the values of the unfilled entries. 2 2.1 Basic model In our basic model, each entity is described by a set of binary features. We are not given these features a priori and will attempt to infer them. We assume that the probability of having a link from one entity to another is entirely determined by the combined effect of all pairwise feature interactions. If there are K features, then let Z be the N × K binary matrix where each row corresponds to an entity and each column corresponds to a feature such that zik ≡Z(i, k) = 1 if the ith entity has feature k and zik = 0 otherwise. and let Zi denote the feature vector corresponding to entity i. Let W be a K × K real-valued weight matrix where wkk′ ≡W(k, k′) is the weight that affects the probability of there being a link from entity i to entity j if both entity i has feature k and entity j has feature k′. We assume that links are independent conditioned on Z and W, and that only the features of entities i and j influence the probability of a link between those entities. This defines the likelihood Pr(Y |Z, W) = Y i,j Pr(yij|Zi, Zj, W) (1) where the product ranges over all pairs of entities. Given the feature matrix Z and weight matrix W, the probability that there is a link from entity i to entity j is Pr(yij = 1|Z, W) = σ “ ZiWZ⊤ j ” = σ 0 @X k,k′ zikzjk′wkk′ 1 A (2) where σ(·) is a function that transforms values on (−∞, ∞) to (0, 1) such as the sigmoid function σ(x) = 1 1+exp(−x) or the probit function σ(x) = Φ(x). An important aspect of this model is that all-zero columns of Z do not affect the likelihood. We will take advantage of this in Section 2.2. This model is very flexible. With a single feature per entity, it is equivalent to a stochastic blockmodel. However, since entities can have more than a single feature, the model is more expressive. In the high school student example, each feature can correspond to an attribute like “male,” “musician,” and “athlete.” If we were looking at the relation “friend of” (not necessarily symmetric!), then the weight at the (athlete, musician) entry of W would correspond to the weight that an athlete would be a friend of a musician. A positive weight would correspond to an increased probability, a negative weight a decreased probability, and a zero weight would indicate that there is no correlation between those two features and the observed relation. The more positively correlated features people have, the more likely they are to be friends. Another advantage of this representation is that if our data contained observations of students in two distant locations, we could have a geographic feature for the different locations. While other features such as “athlete” or “musician” might indicate that one person could be a friend of another, the geographic features could have extremely negative weights so that people who live far from each other are less likely to be friends. However, the parameters for the non-geographic features would still be tied for all people, allowing us to make stronger inferences about how they influence the relations. Class-based models would need an abundance of classes to capture these effects and would not have the same kind of parameter sharing. Given the full set of observations Y , we wish to infer the posterior distribution of the feature matrix Z and the weights W. We do this using Bayes’ theorem, p(Z, W|Y ) ∝p(Y |Z, W)p(Z)p(W), where we have placed an independent prior on Z and W. Without any prior knowledge about the features or their weights, a natural prior for W involves placing an independent N(0, σ2 w) prior on each wij. However, placing a prior on Z is more challenging. If we knew how many features there were, we could place an arbitrary parametric prior on Z. However, we wish to have a flexible prior that allows us to simultaneously infer the number of features at the same time we infer all the entries in Z. The Indian Buffet Process is such a prior. 2.2 The Indian Buffet Process and the basic generative model As mentioned in the previous section, any features which are all-zero do not affect the likelihood. That means that even if we added an infinite number of all-zero features, the likelihood would remain the same. The Indian Buffet Process (IBP) [12] is a prior on infinite binary matrices such that with probability one, a feature matrix drawn from it for a finite number of entities will only have a finite number of non-zero features. Moreover, any feature matrix, no matter how many non-zero features 3 it contains, has positive probability under the IBP prior. It is therefore a useful nonparametric prior to place on our latent feature matrix Z. The generative process to sample matrices from the IBP can be described through a culinary metaphor that gave the IBP its name. In this metaphor, each row of Z corresponds to a diner at an Indian buffet and each column corresponds to a dish at the infinitely long buffet. If a customer takes a particular dish, then the entry that corresponds to the customer’s row and the dish’s column is a one and the entry is zero otherwise. The culinary metaphor describes how people choose the dishes. In the IBP, the first customer chooses a Poisson(α) number of dishes to sample, where α is a parameter of the IBP. The ith customer tries each previously sampled dish with probability proportional to the number of people that have already tried the dish and then samples a Poisson(α/i) number of new dishes. This process is exchangeable, which means that the order in which the customers enter the restaurant does not affect the configuration of the dishes that people try (up to permutations of the dishes as described in [12]). This insight leads to a straightforward Gibbs sampler to do posterior inference that we describe in Section 3. Using an IBP prior on Z, our basic generative latent feature relational model is: Z ∼IBP(α) wkk′ ∼N(0, σ2 w) for all k, k′ for which features k and k′ are non-zero yij ∼σ ZiWZ⊤ j  for each observation. 2.3 Full nonparametric latent feature relational model We have described the basic nonparametric latent feature relational model. We now combine it with ideas from the social network community to get our full model. First, we note that there are many instances of logit models used in statistical network analysis that make use of covariates in link prediction [2]. Here we will focus on a subset of ideas discussed in [10]. Let Xij be a vector that influences the relation yij, let Xp,i be a vector of known attributes of entity i when it is the parent of a link, and let Xc,i be a vector of known attributes of entity i when it is a child of a link. For example, in Section 4.2, when Y represents relationships amongst countries, Xij is a scalar representing the geographic similarity between countries (Xij = exp(−d(i, j))) since this could influence the relationships and Xp,i = Xc,i is a set of known features associated with each country (Xp,i and Xc,i would be distinct if we had covariates specific to each country’s roles). We then let c be a normally distributed scalar and β, βp, βc, a, and b be normally distributed vectors in our full model in which Pr(yij = 1|Z, W, X, β, a, b, c) = σ “ ZiWZ⊤ j + β⊤Xij + (β⊤ p Xp,i + ai) + (β⊤ c Xc,j + bj) + c ” . (3) If we do not have information about one or all of X, Xp, and Xc, we drop the corresponding term(s). In this model, c is a global offset that affects the default likelihood of a relation and ai and bj are entity and role specific offsets. So far, we have only considered the case of observing a single relation. It is not uncommon to observe multiple relations for the same set of entities. For example, in addition to the “friend of” relation, we might also observe the “admires” and “collaborates with” relations. We still believe that each entity has a single set of features that determines all its relations, but these features will not affect each relation in the same way. If we are given m relations, label them Y 1, Y 2, . . . , Y m. We will use the same features for each relation, but we will use an independent weight matrix W i for each relation Y i. In addition, covariates might be relation specific or common across all relations. Regardless, they will interact in different ways in each relation. Our full model is now Pr(Y 1, . . . , Y m|Z, {W i, Xi, βi, ai, bi, ci}m i=1) = m Y i=1 Pr(Y i|Z, W i, Xi, βi, ai, bi, ci). 2.4 Variations of the nonparametric latent feature relational model The model that we have defined is for directed graphs in which the matrix Y i is not assumed to be symmetric. For undirected graphs, we would like to define a symmetric model. This is easy to do by restricting W i to be symmetric. If we further believe that the features we learn should not interact, we can assume that W i is diagonal. 4 2.5 Related nonparametric latent feature models There are two models related to our nonparametric latent feature relational model that both use the IBP as a prior on binary latent feature matrices. The most closely related model is the Binary Matrix Factorization (BMF) model of [13]. The BMF is a general model with several concrete variants, the most relevant of which was used to predict unobserved entries of binary matrices for image reconstruction and collaborative filtering. If Y is the observed part of a binary matrix, then in this variant, we assume that Y |U, V, W ∼σ(UWV ⊤) where σ(·) is the logistic function, U and V are independent binary matrices drawn from the IBP, and the entries in W are independent draws from a normal distribution. If Y is an N ×N matrix where we assume the rows and columns have the same features (i.e., U = V ), then this special case of their model is equivalent to our basic (covariate-free) model. While [13] were interested in a more general formalization that is applicable to other tasks, we have specialized and extended this model for the task of link prediction. The other related model is the ADCLUS model [14]. This model assumes we are given a symmetric matrix of nonnegative similarities Y and that Y = ZWZ⊤+ ϵ where Z is drawn from the IBP, W is a diagonal matrix with entries independently drawn from a Gamma distribution, and ϵ is independent Gaussian noise. This model does not allow for arbitrary feature interactions nor does it allow for negative feature correlations. 3 Inference Exact inference in our nonparametric latent feature relational model is intractable [12]. However, the IBP prior lends itself nicely to approximate inference via Markov Chain Monte Carlo [15]. We first describe inference in the single relation, basic model, later extending it to the full model. In our basic model, we must do posterior inference on Z and W. Since with probability one, any sample of Z will have a finite number of non-zero entries, we can store just the non-zero columns of each sample of the infinite binary matrix Z. Since we do not have a conjugate prior on W, we must also sample the corresponding entries of W. Our sampler is as follows: Given W, resample Z We do this by resampling each row Zi in succession. When sampling entries in the ith row, we use the fact that the IBP is exchangeable to assume that the ith customer in the IBP was the last one to enter the buffet. Therefore, when resampling zik for non-zero columns k, if mk is the number of non-zero entries in column k excluding row i, then Pr(zik = 1|Z−ik, W, Y ) ∝ mk Pr(Y |zik = 1, Z−ik, W). We must also sample zik for each of the infinitely many all-zero columns to add features to the representation. Here, we use the fact that in the IBP, the prior distribution on the number of new features for the last customer is Poisson(α/N). As described in [12], we must then weight this by the likelihood term for having that many new features, computing this for 0, 1, . . . .kmax new features for some maximum number of new features kmax and sampling the number of new features from this normalized distribution. The main difficulty arises because we have not sampled the values of W for the all-zero columns and we do not have a conjugate prior on W, so we cannot compute the likelihood term exactly. We can adopt one of the non-conjugate sampling approaches from the Dirichlet process [16] to this task or use the suggestion in [13] to include a Metropolis-Hastings step to propose and either accept or reject some number of new columns and the corresponding weights. We chose to use a stochastic Monte Carlo approximation of the likelihood. Once the number of new features is sampled, we must sample the new values in W as described below. Given Z, resample W We sequentially resample each of the weights in W that correspond to non-zero features and drop all weights that correspond to all-zero features. Since we do not have a conjugate prior on W, we cannot directly sample W from its posterior. If σ(·) is the probit, we adapt the auxiliary sampling trick from [17] to have a Gibbs sampler for the entries of W. If σ(·) is the logistic function, no such trick exists and we resort to using a Metropolis-Hastings step for each weight in which we propose a new weight from a normal distribution centered around the old one. Hyperparameters We can also place conjugate priors on the hyperparameters α and σw and perform posterior inference on them. We use the approach from [18] for sampling of α. 5 (a) (b) (c) (d) (e) Figure 1: Features and corresponding observations for synthetic data. In (a), we show features that could be explained by a latent-class model that then produces the observation matrix in (b). White indicates one values, black indicates zero values, and gray indicates held out values. In (c), we show the feature matrix of our other synthetic dataset along with the corresponding observations in (d). (e) shows the feature matrix of a randomly chosen sample from our Gibbs sampler. Multiple relations In the case of multiple relations, we can sample Wi given Z independently for each i as above. However, when we resample Z, we must compute Pr(zik = 1|Z−ik, {W, Y }m i=1) ∝ mk m Y i=1 Pr(Y i|zik = 1, Z−ik, W i). Full model In the full model, we must also update {βi, βi p, βi c, ai, bi, ci}m i=1. By conditioning on these, the update equations for Z and W i take the same form, but with Equation (3) used for the likelihood. When we condition on Z and W i, the posterior updates for (βi, βi p, βi c, ai, bi, ci) are independent and can be derived from the updates in [10]. Implementation details Despite the ease of writing down the sampler, samplers for the IBP often mix slowly due to the extremely large state space full of local optima. Even if we limited Z to have K columns, there are 2NK potential feature matrices. In an effort to explore the space better, we can augment the Gibbs sampler for Z by introducing split-merge style moves as described in [13] as well as perform annealing or tempering to smooth out the likelihood. However, we found that the most significant improvement came from using a good initialization. A key insight that was mentioned in Section 2.1 is that the stochastic blockmodel is a special case of our model in which each entity only has a single feature. Stochastic blockmodels have been shown to perform well for statistical network analysis, so they seem like a reasonable way to initialize the feature matrix. In the results section, we compare the performance of a random initialization to one in which Z is initialized with a matrix learned by the Infinite Relational Model (IRM). To get our initialization point, we ran the Gibbs sampler for the IRM for only 15 iterations and used the resulting class assignments to seed Z. 4 Results We first qualitatively analyze the strengths and weaknesses of our model on synthetic data, establishing what we can and cannot expect from it. We then compare our model against two class-based generative models, the Infinite Relational Model (IRM) [6] and the Mixed Membership Stochastic Blockmodel (MMSB) [8], on two datasets from the original IRM paper and a NIPS coauthorship dataset, establishing that our model does better than the best of those models on those datasets. 4.1 Synthetic data We first focus on the qualitative performance of our model. We applied the basic model to two very simple synthetic datasets generated from known features. These datasets were simple enough that the basic model could attain 100% accuracy on held-out data, but were different enough to address the qualitative characteristics of the latent features inferred. In one dataset, the features were the class-based features seen in Figure 1(a) and in the other, we used the features in Figure 1(c). The observations derived from these features can be seen in Figure 1(b) and Figure 1(d), respectively. 6 On both datasets, we initialized Z and W randomly. With the very simple, class-based model, 50% of the sampled feature matrices were identical to the generating feature matrix with another 25% differing by a single bit. However, on the other dataset, only 25% of the samples were at most a single bit different than the true matrix. It is not the case that the other 75% of the samples were bad samples, though. A randomly chosen sample of Z is shown in Figure 1(e). Though this matrix is different from the true generating features, with the appropriate weight matrix it predicts just as well as the true feature matrix. These tests show that while our latent feature approach is able to learn features that explain the data well, due to subtle interactions between sets of features and weights, the features themselves will not in general correspond to interpretable features. However, we can expect the inferred features to do a good job explaining the data. This also indicates that there are many local optima in the feature space, further motivating the need for good initialization. 4.2 Multi-relational datasets In the original IRM paper, the IRM was applied to several datasets [6]. These include a dataset containing 54 relations of 14 countries (such as “exports to” and “protests”) along with 90 given features of the countries [19] and a dataset containing 26 kinship relationships of 104 people in the Alyawarra tribe in Central Australia [20]. See [6, 19, 20] for more details on the datasets. Our goal in applying the latent feature relational model to these datasets was to demonstrate the effectiveness of our algorithm when compared to two established class-based algorithms, the IRM and the MMSB, and to demonstrate the effectiveness of our full algorithm. For the Alyawarra dataset, we had no known covariates. For the countries dataset, Xp = Xc was the set of known features of the countries and X was the country distance similarity matrix described in Section 2.3. As mentioned in the synthetic data section, the inferred features do not necessarily have any interpretable meaning, so we restrict ourselves to a quantitative comparison. For each dataset, we held out 20% of the data during training and we report the AUC, the area under the ROC (Receiver Operating Characteristic) curve, for the held-out data [21]. We report results for inferring a global set of features for all relations as described in Section 2.3 which we refer to as “global” as well as results when a different set of features is independently learned for each relation and then the AUCs of all relations are averaged together, which we refer to as “single.” In addition, we tried initializing our sampler for the latent feature relational model with either a random feature matrix (“LFRM rand”) or class-based features from the IRM (“LFRM w/ IRM”). We ran our sampler for 1000 iterations for each configuration using a logistic squashing function (though results using the probit are similar), throwing out the first 200 samples as burn-in. Each method was given five random restarts. Table 1: AUC on the countries and kinship datasets. Bold identifies the best performance. Countries single Countries global Alyawarra single Alyawarra global LFRM w/ IRM 0.8521 ± 0.0035 0.8772 ± 0.0075 0.9346 ± 0.0013 0.9183 ± 0.0108 LFRM rand 0.8529 ± 0.0037 0.7067 ± 0.0534 0.9443 ± 0.0018 0.7127 ± 0.030 IRM 0.8423 ± 0.0034 0.8500 ± 0.0033 0.9310 ± 0.0023 0.8943 ± 0.0300 MMSB 0.8212 ± 0.0032 0.8643 ± 0.0077 0.9005 ± 0.0022 0.9143 ± 0.0097 Results of these tests are in Table 1. As can be seen, the LFRM with class-based initialization outperforms both the IRM and MMSB. On the individual relations (“single”), the LFRM with random initialization also does well, beating the IRM initialization on both datasets. However, the random initialization does poorly at inferring the global features due to the coupling of features and the weights for each of the relations. This highlights the importance of proper initialization. To demonstrate that the covariates are helping, but that even without them, our model does well, we ran the global LFRM with class-based initialization without covariates on the countries dataset and the AUC dropped to 0.8713 ± 0.0105, which is still the best performance. On the countries data, the latent feature model inferred on average 5-7 features when seeded with the IRM and 8-9 with a random initialization. On the kinship data, it inferred 9-11 features when seeded with the IRM and 13-19 when seeded randomly. 7 50 100 150 200 20 40 60 80 100 120 140 160 180 200 220 (a) True relations 50 100 150 200 20 40 60 80 100 120 140 160 180 200 220 (b) Feature predictions 50 100 150 200 20 40 60 80 100 120 140 160 180 200 220 (c) IRM predictions 50 100 150 200 20 40 60 80 100 120 140 160 180 200 220 (d) MMSB predictions Figure 2: Predictions for all algorithms on the NIPS coauthorship dataset. In (a), a white entry means two people wrote a paper together. In (b-d), the lighter an entry, the more likely that algorithm predicted the corresponding people would interact. 4.3 Predicting NIPS coauthorship As our final example, highlighting the expressiveness of the latent feature relational model, we used the coauthorship data from the NIPS dataset compiled in [22]. This dataset contains a list of all papers and authors from NIPS 1-17. We took the 234 authors who had published with the most other people and looked at their coauthorship information. The symmetric coauthor graph can be seen in Figure 2(a). We again learned models for the latent feature relational model, the IRM and the MMSB training on 80% of the data and using the remaining 20% as a test set. For the latent feature model, since the coauthorship relationship is symmetric, we learned a full, symmetric weight matrix W as described in Section 2.4. We did not use any covariates. A visualization of the predictions for each of these algorithms can be seen in Figure 2(b-d). Figure 2 really drives home the difference in expressiveness. Stochastic blockmodels are required to group authors into classes, and assumes that all members of classes interact similarly. For visualization, we have ordered the authors by the groups the IRM found. These groups can clearly be seen in Figure 2(c). The MMSB, by allowing partial membership is not as restrictive. However, on this dataset, the IRM outperformed it. The latent feature relational model is the most expressive of the models and is able to much more faithfully reproduce the coauthorship network. The latent feature relational model also quantitatively outperformed the IRM and MMSB. We again ran our sampler for 1000 samples initializing with either a random feature matrix or a class-based feature matrix from the IRM and reported the AUC on the held-out data. Using five restarts for each method, the LFRM w/ IRM performed best with an AUC of 0.9509, the LFRM rand was next with 0.9466 and much lower were the IRM at 0.8906 and the MMSB at 0.8705 (all at most ±0.013). On average, the latent feature relational model inferred 20-22 features when initialized with the IRM and 38-44 features when initialized randomly. 5 Conclusion We have introduced the nonparametric latent feature relational model, an expressive nonparametric model for inferring latent binary features in relational entities. This model combines approaches from the statistical network analysis community, which have emphasized feature-based methods for analyzing network data, with ideas from Bayesian nonparametrics in order to simultaneously infer the number of latent binary features at the same time we infer the features of each entity and how those features interact. Existing class-based approaches infer latent structure that is a special case of what can be inferred by this model. As a consequence, our model is strictly more expressive than these approaches, and can use the solutions produced by these approaches for initialization. We showed empirically that the nonparametric latent feature model performs well at link prediction on several different datasets, including datasets that were originally used to argue for class-based approaches. The success of this model can be traced to its richer representations, which make it able to capture subtle patterns of interaction much better than class-based models. Acknowledgments KTM was supported by the U.S. Department of Energy contract DE-AC5207NA27344 through Lawrence Livermore National Laboratory. TLG was supported by grant number FA955007-1-0351 from the Air Force Office of Scientific Research. 8 References [1] Stanley Wasserman and Katherine Faust. Social Network Analysis: Methods and Applications. Cambridge University Press, 1994. [2] Stanley Wasserman and Philippa Pattison. Logit models and logistic regressions for social networks: I. an introduction to Markov random graphs and p∗. Psychometrika, 61(3):401–425, 1996. [3] Garry Robins, Tom Snijders, Peng Wang, Mark Handcock, and Philippa Pattison. Recent developments in exponential random graph (p*) models for social networks. Social Networks, 29(2):192–215, May 2007. [4] Yuchung J. Wang and George Y. Wong. Stochastic blockmodels for directed graphs. Journal of the American Statistical Association, 82(397):8–19, 1987. [5] Krzysztof Nowicki and Tom A. B. Snijders. Estimation and prediction for stochastic blockstructures. Journal of the American Statistical Association, 96(455):1077–1087, 2001. [6] Charles Kemp, Joshua B. Tenenbaum, Thomas L. Griffiths, Takeshi Yamada, and Naonori Ueda. Learning systems of concepts with an infinite relational model. In Proceedings of the American Association for Artificial Intelligence (AAAI), 2006. [7] Zhao Xu, Volker Tresp, Kai Yu, and Hans-Peter Kriegel. Infinite hidden relational models. In Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence (UAI), 2006. [8] Edoardo M. Airoldi, David M. Blei, Eric P. Xing, and Stephen E. Fienberg. Mixed membership stochastic block models. In D. Koller, Y. Bengio, D. Schuurmans, and L. Bottou, editors, Advances in Neural Information Processing Systems (NIPS) 21. Red Hook, NY: Curran Associates, 2009. [9] Peter D. Hoff, Adrian E. Raftery, and Mark S. Handcock. Latent space approaches to social network analysis. Journal of the American Statistical Association, 97(460):1090–1098, 2002. [10] Peter D. Hoff. Bilinear mixed-effects models for dyadic data. Journal of the American Statistical Association, 100(469):286–295, 2005. [11] Peter D. Hoff. Multiplicative latent factor models for description and prediction of social networks. Computational and Mathematical Organization Theory, 2008. [12] Thomas L. Griffiths and Zoubin Ghahramani. Infinite latent feature models and the Indian Buffet Process. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems (NIPS) 18. Cambridge, MA: MIT Press, 2006. [13] Edward Meeds, Zoubin Ghahramani, Radford Neal, and Sam Roweis. Modeling dyadic data with binary latent factors. In B. Sch¨olkopf, J. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems (NIPS) 19. Cambridge, MA: MIT Press, 2007. [14] Daniel L. Navarro and Thomas L. Griffiths. Latent features in similarity judgment: A nonparametric Bayesian approach. Neural Computation, 20(11):2597–2628, 2008. [15] Christian P. Robert and George Casella. Monte Carlo Statistical Methods. Springer, 2004. [16] Radford M. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9(2):249–265, 2000. [17] James H. Albert and Siddhartha Chib. Bayesian analysis of binary and polychotomous response data. Journal of the American Statistical Association, 88(422):669–679, 1993. [18] Dilan G¨or¨ur, Frank J¨akel, and Carl Edward Rasmussen. A choice model with infinitely many latent features. In Proceedings of the 23rd International Conference on Machine learning (ICML), 2006. [19] Rudolph J. Rummel. Dimensionality of nations project: Attributes of nations and behavior of nation dyads, 1950–1965. ICPSR data file, 1999. [20] Woodrow W. Denham. The Detection of Patterns in Alyawarra Nonverbal Behavior. PhD thesis, University of Washington, 1973. [21] Jin Huang and Charles X. Ling. Using AUC and accuracy in evaluating learning algorithms. IEEE Transactions on Knowledge and Data Engineering, 17(3):299–310, 2005. [22] Amir Globerson, Gal Chechik, Fernando Pereira, and Naftali Tishby. Euclidean embedding of cooccurrence data. The Journal of Machine Learning Research, 8:2265–2295, 2007. 9
2009
75
3,827
Asymptotically Optimal Regularization in Smooth Parametric Models Percy Liang University of California, Berkeley pliang@cs.berkeley.edu Francis Bach INRIA - ´Ecole Normale Sup´erieure, France francis.bach@ens.fr Guillaume Bouchard Xerox Research Centre Europe, France Guillaume.Bouchard@xrce.xerox.com Michael I. Jordan University of California, Berkeley jordan@cs.berkeley.edu Abstract Many types of regularization schemes have been employed in statistical learning, each motivated by some assumption about the problem domain. In this paper, we present a unified asymptotic analysis of smooth regularizers, which allows us to see how the validity of these assumptions impacts the success of a particular regularizer. In addition, our analysis motivates an algorithm for optimizing regularization parameters, which in turn can be analyzed within our framework. We apply our analysis to several examples, including hybrid generative-discriminative learning and multi-task learning. 1 Introduction Many problems in machine learning and statistics involve the estimation of parameters from finite data. Although empirical risk minimization has favorable limiting properties, it is well known that this procedure can overfit on finite data. Hence, various forms of regularization have been employed to control this overfitting. Regularizers are usually chosen based on assumptions about the problem domain at hand. For example, in classification, we might use L2 regularization if we expect the data to be separable with a large margin. We might regularize with a generative model if we think it is roughly well-specified [7, 20, 15, 17]. In multi-task learning, we might penalize deviation between parameters across tasks if we believe the tasks to be similar [3, 12, 2, 13]. In each case, we would like (1) a procedure for choosing the parameters of the regularizer (for example, its strength) and (2) an analysis that shows the amount by which regularization reduces expected risk, expressed as a function of the compatibility between the regularizer and the problem domain. In this paper, we address these two points by developing an asymptotic analysis of smooth regularizers for parametric problems. The key idea is to derive a second-order Taylor approximation of the expected risk, yielding a simple and interpretable quadratic form which can be directly minimized with respect to the regularization parameters. We first develop the general theory (Section 2) and then apply it to some examples of common regularizers used in practice (Section 3). 2 General theory We use uppercase letters (e.g., L, R, Z) to denote random variables and script letters (e.g., L, R, I) to denote constant limits of random variables. For a λ-parametrized differentiable function θ 7→ f(λ; θ), let ˙f, ¨f, and ... f denote the first, second and third derivatives of f with respect to θ, and let ∇f(λ; θ) denote the derivative with respect to λ. Let Xn = Op(n−α) denote a sequence of 1 random variables for which nαXn is bounded in probability. Let Xn P−→X denote convergence in probability. For a vector v, let v⊗= vv⊤. Expectation and variance operators are denoted as E[·] and V[·], respectively. 2.1 Setup We are given a loss function ℓ(·; θ) parametrized by θ ∈Rd (e.g., ℓ((x, y); θ) = 1 2(y −x⊤θ)2 for linear regression). Our goal is to minimize the expected risk, θ∞ def = argmin θ∈Rd L(θ), L(θ) def = EZ∼p∗[ℓ(Z; θ)], (1) which averages the loss over some true data generating distribution p∗(Z). We do not have access to p∗, but instead receive a sample of n i.i.d. data points Z1, . . . , Zn drawn from p∗. The standard unregularized estimator minimizes the empirical risk: ˆθ0 n def = argmin θ∈Rd Ln(θ), Ln(θ) def = 1 n n X i=1 ℓ(Zi, θ). (2) Although ˆθ0 n is consistent (that is, it converges in probability to θ∞) under relatively weak conditions, it is well known that regularization can improve performance substantially for finite n. Let Rn(λ, θ) be a (possibly data-dependent) regularization function, where λ ∈Rb are the regularization parameters. For linear regression, we might use squared regularization (Rn(λ, θ) = λ 2n∥θ∥2), where λ ∈R determines the strength. Define the regularized estimator as follows: ˆθλ n def = argmin θ∈Rd Ln(θ) + Rn(λ, θ). (3) The goal of this paper is to choose good values of λ and analyze the subsequent impact on performance. Specifically, we wish to minimize the relative risk: Ln(λ) def = EZ1,...,Zn∼p∗[L(ˆθλ n) −L(ˆθ0 n)], (4) which is the difference in risk (averaged over the training data) between the regularized and unregularized estimators; Ln(λ) < 0 is desirable. Clearly, argminλ Ln(λ) is the optimal regularization parameter. However, it is difficult to get a handle on Ln(λ). Therefore, the main focus of this work is on deriving an asymptotic expansion for Ln(λ). In this paper, we make the following assumptions:1 Assumption 1 (Compact support). The true distribution p∗(Z) has compact support. Assumption 2 (Smooth loss). The loss function ℓ(z, θ) is thrice-differentiable with respect to θ. Furthermore, assume the expected Hessian of the loss function is positive definite ( ¨L(θ∞) ≻0).2 Assumption 3 (Smooth regularizer). The regularizer Rn(λ, θ) is thrice-differentiable with respect to θ and differentiable with respect to λ. Assume Rn(0, θ) ≡0 and Rn(λ, θ) P−→0 as n →∞. 2.2 Rate of regularization strength Let us establish some basic properties that the regularizer Rn(λ, θ) should satisfy. First, a desirable property is consistency (ˆθλ n P−→θ∞), i.e., convergence to the parameters that achieve the minimum possible risk in our hypothesis class. To achieve this, it suffices (and in general also necessitates) that (1) the loss class satisfies standard uniform convergence properties [22] and (2) the regularizer has a vanishing impact in the limit of infinite data (Rn(λ, θ) P−→0). These two properties can be verified given our assumptions. The next question is at what rate Rn(λ, θ) should converge to 0? As we show in [16], Rn(λ, θ) = Op(n−1) is the rate that minimizes the relative risk Ln. With this rate, it is natural to consider the regularizer as a prior p(θ | λ) ∝exp{−Rn(λ, θ)} (and −ℓ(z, θ) as the log-likelihood), in which case ˆθλ n is the maximum a posteriori (MAP) estimate. 1While we do not explicitly assume convexity of ℓand Rn, the local nature of our analysis means that we are essentially working under strong convexity. 2This assumption can be weakened. If ¨L ̸≻0, the parameters can only be estimated up to the row space of ¨L. But since we are interested in the parameters θ only in terms of L(θ), this particular non-identifiability of the parameters is irrelevant. 2 2.3 Asymptotic expansion Our main result is the following theorem, which provides a simple interpretable asymptotic expression for the relative risk, characterizing the impact of regularization (see [16] for proof): Theorem 1. Assume Rn(λ, θ∞) = Op(n−1). The relative risk admits the following asymptotic expansion: Ln(λ) = L(λ) · n−2 + Op(n−5 2 ) (5) in terms of the asymptotic relative risk: L(λ) def = 1 2tr{ ˙R(λ)⊗¨L−1} −tr{Iℓℓ¨L−1 ¨R(λ) ¨L−1} −2B⊤˙R(λ) + tr{Iℓr(λ) ¨L−1}, (6) where ¨L def = E[¨ℓ(Z; θ∞)], R(λ) def = limn→∞nRn(λ, θ∞) (derivatives thereof are defined analogously), Iℓℓ def = E[ ˙ℓ(Z; θ∞)⊗], Iℓr(λ) def = limn→∞nE[ ˙Ln ˙Rn(λ)⊤], B def = limn→∞nE[ˆθ0 n −θ∞]. The most important equation of this paper is (6), which captures the lowest-order terms of the relative risk defined in (4). Interpretation The significance of Theorem 1 is in identifying the three problem-dependent contributions to the asymptotic relative risk: Squared bias of the regularizer tr{ ˙R(λ)⊗¨L−1}: ˙R(λ) is the gradient of the regularizer at the limiting parameters θ∞; the squared regularizer bias is the squared norm of ˙R(λ) with respect to the Mahalanobis metric given by ¨L. Note that the squared regularizer bias is always positive: it always increases the risk by an amount which depends on how “wrong” the regularizer is. Variance reduction provided by the regularizer tr{Iℓℓ¨L−1 ¨R(λ) ¨L−1}: The key quantity is ¨R(λ), the Hessian of the regularizer, whose impact on the relative risk is channeled through ¨L−1 and Iℓℓ. For convex regularizers, ¨R(λ) ⪰0, so we always improve the stability of the estimate by regularizing. Furthermore, if the loss is the negative log-likelihood and our model is well-specified (that is, p∗(z) = exp{−ℓ(z; θ∞)}), then Iℓℓ= ¨L by the first Bartlett identity [4], and the variance reduction term simplifies to tr{ ¨R(λ) ¨L−1}. Alignment between regularizer bias and unregularized estimator bias 2B⊤˙R(λ) −tr{Iℓr(λ) ¨L−1}: The alignment has two parts, the first of which is nonzero only for non-linear models and the second of which is nonzero only when the regularizer depends on the training data. The unregularized estimator errs in direction B; we can reduce the risk if the regularizer bias ˙R(λ) helps correct for the estimator bias (B⊤˙R(λ) > 0). The second part carries the same intuition: the risk is reduced when the random regularizer compensates for the loss (tr{Iℓr(λ) ¨L−1} < 0). 2.4 Oracle regularizer The principal advantage of having a simple expression for L(λ) is that we can minimize it with respect to λ. Let λ∗def = argminλ L(λ) and call ˆθλ∗ n the oracle estimator. We have a closed form for λ∗in the important special case that the regularization parameter λ is the strength of the regularizer: Corollary 1 (Oracle regularization strength). If Rn(λ, θ) = λ nr(θ) for some r(θ), then λ∗= argmin λ L(λ) = tr{Iℓℓ¨L−1¨r ¨L−1} + 2B⊤˙r ˙r⊤¨L−1 ˙r def = C1 C2 , L(λ∗) = −C2 1 2C2 . (7) Proof. (6) is a quadratic in λ; solve by differentiation. Compute L(λ∗) by substitution. In general, λ∗will depend on θ∞and hence is not computable from data; Section 2.5 will remedy this. Nevertheless, the oracle regularizer provides an upper bound on performance and some insight into the relevant quantities that make a regularizer useful. Note L(λ∗) ≤0, since optimizing λ∗must be no worse than not regularizing since L(0) = 0. But what might be surprising at first is that the oracle regularization parameter λ∗can be negative 3 Estimator UNREGULARIZED ORACLE PLUGIN ORACLEPLUGIN Notation ˆθ0 n ˆθλ∗ n ˆθ ˆλn n = ˆθ•1 n ˆθ•λ•∗ n Relative risk 0 L(λ∗) L•(1) L•(λ•∗) Table 1: Notation for the various estimators and their relative risks. (corresponding to “anti-regularization”). But if ∂L(λ) ∂λ = −C1 < 0, then (positive) regularization helps (λ∗> 0 and L(λ) < 0 for 0 < λ < 2λ∗). 2.5 Plugin regularizer While the oracle regularizer Rn(λ∗, θ) given by (7) is asymptotically optimal, λ∗depends on the unknown θ∞, so ˆθλ∗ n is actually not implementable. In this section, we develop the plugin regularizer as a way to avoid this dependence. The key idea is to substitute λ∗with an estimate ˆλn def = λ∗+ εn where εn = Op(n−1 2 ). We then use the plugin estimator ˆθˆλn n def = argminθ Ln(θ) + Rn(ˆλn, θ). How well does this plugin estimator work, that is, what is its relative risk E[L(ˆθˆλn n ) −L(ˆθ0 n)]? We cannot simply write Ln(ˆλn) and apply Theorem 1 because L(·) can only be applied to nonrandom arguments. However, we can still leverage existing machinery by defining a new plugin regularizer R• n(λ•, θ) def = λ•Rn(ˆλn, θ) with regularization parameter λ• ∈R. Henceforth, the superscript • will denote quantities concerning the plugin regularizer. The corresponding estimator ˆθ•λ• n def = argminθ Ln(θ) + R• n(λ•, θ) has relative risk L• n(λ•) = E[L(ˆθ•λ• n ) −L(ˆθ•0 n )]. The key identity is ˆθˆλn n = ˆθ•1 n , which means the asymptotic risk of the plugin estimator ˆθˆλn n is simply L•(1). We could try to squeeze more out of the plugin regularizer by further optimizing λ• according to λ•∗def = argminλ• L•(λ•) and use the oracle plugin estimator ˆθ•λ•∗ n rather than just using λ• = 1. In general, this is not useful since λ•∗might depend on θ∞, and the whole point of plugin is to remove this dependence. However, in a fortuitous turn of events, for some linear models (Sections 3.1 and 3.4), λ•∗is in fact independent of θ∞, and so ˆθ•λ•∗ n is actually implementable. Table 1 summarizes all the estimators we have discussed. The following theorem relates the risks of all estimators we have considered (see [16] for the proof): Theorem 2 (Relative risk of plugin). The relative risk of the plugin estimator is L•(1) = L(λ∗)+E, where E def = limn→∞nE[tr{ ˙Ln(∇˙Rn(λ∗)εn)⊤¨L−1}]. If Rn(λ) is linear in λ, then the relative risk of the oracle plugin estimator is L•(λ•∗) = L•(1) + E2 4L(λ∗) with λ•∗= 1 + E 2L(λ∗). Note that the sign of E depends on the nature of the error εn, so PLUGIN could be either better or worse than ORACLE. On the other hand, ORACLEPLUGIN is always better than PLUGIN. We can get a simpler expression for E if we know more about εn (see [16] for the proof): Theorem 3. Suppose λ∗= f(θ∞) for some differentiable f : Rd →Rb. If ˆλn = f(ˆθ0 n), then the results of Theorem 2 hold with E = −tr{Iℓℓ¨L−1∇˙R(λ∗) ˙f ¨L−1}. 3 Examples In this section, we apply our results from Section 2 to specific problems. Having made all the asymptotic derivations in the general setting, we now only need to make a few straightforward calculations to obtain the asymptotic relative risks and regularization parameters for a given problem. We first explore two classical examples from statistics (Sections 3.1 and 3.2) to get some intuition for the theory. Then we consider two important examples in machine learning (Sections 3.3 and 3.4). 3.1 Estimation of normal means Assume that data are generated from a multivariate normal distribution with d independent components (p∗= N(θ∞, I)). We use the negative log-likelihood as the loss function: ℓ(x; θ) = 1 2(x−θ)2, so the model is well-specified. 4 In his seminal 1961 paper [14], Stein showed that, surprisingly, the standard empirical risk minimizer ˆθ0 n = ¯X def = 1 n Pn i=1 Xi is beaten by the James-Stein estimator ˆθJS n def = ¯X  1 − d−2 n∥¯ X∥2  in the sense that E[L(ˆθJS n )] < E[L(ˆθ0 n)] for all n and θ∞if d > 2. We will show that the James-Stein estimator is essentially equivalent to ORACLEPLUGIN with quadratic regularization (r(θ) = 1 2∥θ∥2). First compute ˙Ln = θ∞−¯X, ¨L = I, B = 0, ˙r = θ∞, and ¨r = I. By (7), the oracle regularization weight is λ∗= d ∥θ∞∥2 , which yields a relative risk of L(λ∗) = − d2 2∥θ∞∥2 . Now let us derive PLUGIN (Section 2.5). We have f(θ) = d ∥θ∥2 and ˙f(θ) = −2dθ ∥θ∥4 . By Theorems 2 and 3, E = 2d ∥θ∞∥2 and L•(1) = −d(d−4) 2∥θ∞∥2 . Note that since E > 0, PLUGIN is always (asymptotically) worse than ORACLE but better than UNREGULARIZED if d > 4. To get ORACLEPLUGIN, compute λ•∗= 1 −2 d (note that this doesn’t depend on θ∞), which results in R• n(θ) = 1 2 1−2 d ∥¯ X∥2 ∥θ∥2. By Theorem 2, its relative risk is L•(λ•∗) = −(d−2)2 2∥θ∞∥2 , which offers a small improvement over PLUGIN (and is superior to UNREGULARIZED when d > 2). Note that the ORACLEPLUGIN and PLUGIN are adaptive: We regularize more or less depending on whether our preliminary estimate of ¯X is small or large, respectively. By simple algebra, ORACLEPLUGIN has a closed form ˆθ•λ•∗ n = ¯X  1 − d−2 n∥¯ X∥2+d−2  , which differs from JAMESSTEIN by a very small amount: ˆθ•λ•∗ n −ˆθJS n = Op(n−5 2 ). ORACLEPLUGIN has the added benefit that it always shrinks towards zero by an amount between 0 and 1, whereas JAMESSTEIN can overshoot. Empirically, we found that ORACLEPLUGIN generally had a lower expected risk than JAMESSTEIN when ∥θ∞∥is large, but JAMESSTEIN was better when ∥θ∞∥≤1. 3.2 Binomial estimation Consider the estimation of θ, the log-odds of a coin coming up heads. We use the negative loglikelihood loss ℓ(x; θ) = −xθ + log(1 + eθ), where x ∈{0, 1} is the outcome of the coin. This example serves to provide intuition for the bias B appearing in (6), which is typically ignored in first-order asymptotics or is zero (for linear models). Consider a regularizer r(θ) = 1 2(θ + 2 log(1 + e−θ)), which corresponds to a Beta( λ 2 , λ 2 ) prior. Choosing λ has been studied extensively in statistics. Some common choices are the Haldane prior (λ = 0), the reference (Jeffreys) prior (λ = 1), the uniform prior (λ = 2), and Laplace smoothing (λ = 4). We will choose λ to minimize expected risk adaptively based on data. Define µ def = 1 1+e−θ∞, v def = µ(1 −µ), and b def = µ −1 2. Then compute ¨L = v, ... L = −2vb, ˙r = b, ¨r = v, B = −v−1b. ORACLE corresponds to λ∗= 2 + v b2 . Note that λ∗> 0, so again (positive) regularization always helps. We can compute the difference between ORACLE and PLUGIN: E = 2 −2v b2 . If |b| > √ 2 4 , E > 0, which means that PLUGIN is worse; otherwise PLUGIN is actually better. Even when PLUGIN is worse than ORACLE, PLUGIN is still better than UNREGULARIZED, which can be verified by checking that L•(1) = −5 2vb−2 −2v−1b2 < 0 for all θ∞. 3.3 Hybrid generative-discriminative learning In prediction tasks, we wish to learn a mapping from some input x ∈X to an output y ∈Y. A common approach is to use probabilistic models defined by exponential families, which is defined by a vector of sufficient statistics (features) φ(x, y) ∈Rd and an accompanying vector of parameters θ ∈Rd. These features can be used to define a generative model (8) or a discriminative model (9): pθ(x, y) = exp{φ(x, y)⊤θ −A(θ)}, A(θ) = log Z X Z Y exp{φ(x, y)⊤θ}dydx, (8) pθ(y | x) = exp{φ(x, y)⊤θ −A(θ; x)}, A(θ; x) = log Z Y exp{φ(x, y)⊤θ}dy. (9) 5 Misspecification tr{Iℓℓv−1 x vv−1 x } 2B⊤(µ −µxy) tr{(µ −µxy)⊗v−1 x } λ∗ L(λ∗) 0% 5 0 0 ∞ -0.65 5% 5.38 -0.073 0.00098 310 -48 50% 13.8 -1.0 0.034 230 -808 Table 2: The oracle regularizer for the hybrid generative-discriminative estimator. As misspecification increases, we regularize less, but the relative risk is reduced more (due to more variance reduction). Given these definitions, we can either use a generative estimator ˆθgen n def = argminθ Gn(θ), where Gn(θ) = −1 n Pn i=1 log pθ(x, y) or a discriminative estimator ˆθdis n def = argminθ Dn(θ), where Dn(θ) = −1 n Pn i=1 log pθ(y | x). There has been a flurry of work on combining generative and discriminative learning [7, 20, 15, 18, 17]. [17] showed that if the generative model is well-specified (p∗(x, y) = pθ∞(x, y)), then the generative estimator is better in the sense that L(ˆθgen n ) ≤L(ˆθdis n ) −c n + Op(n−3 2 ) for some c ≥0; if the model is misspecified, the discriminative estimator is asymptotically better. To create a hybrid estimator, let us treat the discriminative and generative objectives as the empirical risk and the regularizer, respectively, so ℓ((x, y); θ) = −log pθ(y | x), so Ln = Dn and Rn(λ, θ) = λ nGn(θ). As n →∞, the discriminative objective dominates as desired. Our approach generalizes the analysis of [6], which applies only to unbiased estimators for conditionally well-specified models. By moment-generating properties of the exponential family, we arrive at the following quantities (write φ for φ(X, Y )): ¨L = vx def = Ep∗(X)[Vpθ∞(Y |X)[φ|X]], ˙R(λ) = λ(µ −µxy) def = λ(Epθ∞(X,Y )[φ] −Ep∗(X,Y )[φ]), and ¨R(λ) = λv def = λVpθ∞(X,Y )[φ]. The oracle regularization parameter is then λ∗= tr{Iℓℓv−1 x vv−1 x } + 2B⊤(µ −µxy) −tr{Iℓrv−1 x } tr{(µ −µxy)⊗v−1 x } . (10) The sign and magnitude of λ∗provides insight into how generative regularization improves prediction as a function of the model and problem: Specifically, a large positive λ∗suggests regularization is helpful. To simplify, assume that the discriminative model is well-specified, that is, p∗(y | x) = pθ∞(y | x) (note that the generative model could still be misspecified). In this case, Iℓℓ= ¨L, Iℓr = vx, and so the numerator reduces to tr{(v −vx)v−1 x } + 2B⊤(µ −µxy). Since v ⪰vx (the key fact used in [17]), the variance reduction (plus the random alignment term from Iℓr) is always non-negative with magnitude equal to the fraction of missing information provided by the generative model. There is still the non-random alignment term 2B⊤(µ −µxy), whose sign depends on the problem. Finally, the denominator (always positive) affects the optimal magnitude of the regularization. If the generative model is almost well-specified, µ will be close to µxy, and the regularizer should be trusted more (large λ∗). Since our analysis is local, misspecification (how much pθ∞(x, y) deviates from p∗(x, y)) is measured by a Mahalanobis distance between µ and µxy, rather than something more stringent and global like KL-divergence. An empirical example To provide some concrete intuition, we investigated the oracle regularizer for a synthetic binary classification problem of predicting y ∈{0, 1} from x ∈{0, 1}k. Using features φ(x, y) = (I[y = 0]x⊤, I[y = 1]x⊤)⊤defines the corresponding generative (Naive Bayes) and discriminative (logistic regression) estimators. We set k = 5, θ∞= ( 1 10, · · · , 1 10, 3 10, · · · , 3 10)⊤, and p∗(x, y) = (1 −ε)pθ∞(x, y) + εpθ∞(y)pθ∞(x1 | y)I[x1 = · · · = xk]. The amount of misspecification is controlled by 0 ≤ε ≤1, the fraction of examples whose features are perfectly correlated. Table 2 shows how the oracle regularizer changes with ε. As ε increases, λ∗decreases (we regularize less) as expected. But perhaps surprisingly, the relative risk is reduced with more misspecification; this is due to the fact that the variance reduction term increases and has a quadratic effect on L(λ∗). Figure 1(a) shows the relative risk Ln(λ) for various values of λ. The vertical line corresponds to λ∗, which was computed numerically by sampling. Note that the minimum of the curves 6 (argminλ Ln(λ)), the desired quantity, is quite close to λ∗and approaches λ∗as n increases, which empirically justifies our asymptotic approximations. Unlabeled data One of the main advantages of having a generative model is that we can leverage unlabeled examples by marginalizing out their hidden outputs. Specifically, suppose we have m i.i.d. unlabeled examples Xn+1, . . . , Xn+m ∼p∗(x), with m →∞as n →∞. Define the unlabeled regularizer as Rn(λ, θ) = −λ nm Pm i=1 log pθ(Xn+i). We can compute ˙R = µ −µxy using the stationary conditions of the loss function at θ∞. Also, ¨R = v −vx, and Iℓr = 0 (the regularizer doesn’t depend on the labeled data). If the model is conditionally well-specified, we can verify that the oracle regularization parameter λ∗is the same as if we had regularized with Gn. This equivalence suggests that the dominant concern asymptotically is developing an adequate generative model with small bias and not exactly how it is used in learning. 3.4 Multi-task regression The intuition behind multi-task learning is to share statistical strength between tasks [3, 12, 2, 13]. Suppose we have K regression tasks. For each task k = 1, . . . , K, we generate each data point i = 1, . . . , n independently as follows: Xk i ∼p∗(Xk i ) and Y k i ∼N(Xk⊤ i θk ∞, 1). We can treat this as a single task problem by concatenating the vectors for all the tasks: Xi = (X1⊤ i , . . . , XK⊤ i )⊤∈ RKd, Y = (Y 1, . . . , Y K)⊤∈RK, and θ = (θ1⊤, . . . , θK⊤)⊤∈RKd. It will also be useful to represent θ ∈RKd by the matrix Θ = (θ1, . . . , θK) ∈Rd×K. The loss function is ℓ((x, y), θ) = 1 2 PK k=1(yk −xk⊤θk)2. Assume the model is conditionally well-specified. We would like to be flexible in case some tasks are more related than others, so let us define a positive definite matrix Λ ∈RK×K of inter-task affinities and use the quadratic regularizer: r(Λ, θ) = 1 2θ⊤(Λ ⊗Id)θ. For simplicity, assume EXk⊗ i = Id, which implies that Iℓℓ= ¨L = IKd. Most of the computations that follow parallel those of Section 3.1, only extended to matrices. Substituting the relevant quantities into (6) yields the relative risk: L(Λ) = 1 2tr{Λ2Θ⊤ ∞Θ∞} −dtr{Λ}. Optimizing with respect to Λ produces the oracle regularization parameter Λ∗= d(Θ⊤ ∞Θ∞)−1 and its associated relative risk L(Λ∗) = −1 2d2tr{(Θ⊤ ∞Θ∞)−1}. To analyze PLUGIN, first compute ˙f = −d(Θ⊤ ∞Θ∞)−1(2Θ⊤ ∞(·))(Θ⊤ ∞Θ∞)−1; we find that PLUGIN increases the asymptotic risk by E = 2dtr{(Θ⊤ ∞Θ∞)−1}. However, the relative risk of PLUGIN is still favorable when d > 4, as L•(1) = −1 2d(d −4)tr{(Θ⊤ ∞Θ∞)−1} < 0 for d > 4. We can do slightly better using ORACLEPLUGIN (λ•∗= 1 −2 d), which results in a relative risk of L•(λ•∗) = −1 2(d −2)2tr{(Θ⊤ ∞Θ∞)−1}. For comparison, if we had solved the K regression tasks completely independently with K independent regularization parameters, our relative risk would have been −1 2(d −2)2(PK k=1 ∥θk ∞∥−2) (following similar but simpler computations). We now compare joint versus independent regularization. Let A = Θ⊤ ∞Θ∞with eigendecomposition A = UDU ⊤. The difference in relative risks between joint and independent regularization is ∆= −1 2(d −2)2(P k D−1 kk −P k A−1 kk ) (∆< 0 means joint regularization is better). The gap between joint and independent regularization is large when the tasks are non-trivial but similar (θk ∞s are close, but ∥θk ∞∥is large). In that case, D−1 kk is quite large for k > 1, but all the A−1 kk s are small. MHC-I binding prediction We evaluated our multitask regularization method on the IEDB MHC-I peptide binding dataset created by [19] and used by [13]. The goal here is to predict the binding affinity (represented by log IC50) of a MHC-I molecule given its amino-acid sequence (represented by a vector of binary features, reduced to a 20-dimensional real vector using SVD). We created five regression tasks corresponding to the five most common MHC-I molecules. We compared four estimators: UNREGULARIZED, DIAGCV (Λ = cI), UNIFORMCV (using the same task-affinity for all pairs of tasks with Λ = c(1⊗+ 10−5I)), and PLUGINCV (Λ = cd(ˆΘ⊤ n ˆΘn)−1), where c was chosen by cross-validation.3 Figure 1 shows the results averaged over 3We performed three-fold cross-validation to select c from 21 candidates in [10−5, 105]. 7 10 0 10 2 10 4 −0.025 −0.02 −0.015 −0.01 −0.005 0 relative risk regularization n= 75 n=100 n=150 minimum oracle reg. 200 300 500 8001000 1500 13 14 15 16 17 number of training points (n) test risk "unregularized" "diag CV" "uniform CV" "plugin CV" (a) (b) Figure 1: (a) Relative risk (Ln(λ)) of the hybrid generative/discriminative estimator for various λ; the λ attaining the minimum of Ln(λ) is close to the oracle λ∗(the vertical line). (b) On the MHCI binding prediction task, test risk for the four multi-task estimators; PLUGINCV (estimating all pairwise task affinities using PLUGIN and cross-validating the strength) works best. 30 independent train/test splits. Multi-task regularization actually performs worse than independent learning (DIAGCV) if we assume all tasks are equally related (UNIFORMCV). By learning the full matrix of task affinities (PLUGINCV), we obtain the best results. Note that setting the O(K2) entries of Λ via cross-validation is not computationally feasible, though other approaches are possible [13]. 4 Related work and discussion The subject of choosing regularization parameters has received much attention. Much of the learning theory literature focuses on risk bounds, which approximate the expected risk (L(ˆθλ n)) with upper bounds. Our analysis provides a different type of approximation—one that is exact in the first few terms of the expansion. Though we cannot make a precise statement about the risk for any given n, exact control over the first few terms offers other advantages, e.g., the ability to compare estimators. To elaborate further, risk bounds are generally based on the complexity of the hypothesis class, whereas our analysis is based on the variance of the estimator. Vanilla uniform convergence bounds yield worst-case analyses, whereas our asymptotic analysis is tailored to a particular problem (p∗ and θ∞) and algorithm (estimator). Localization techniques [5], regret analyses [9], and stabilitybased bounds [8] all allow for some degree of problem- and algorithm-dependence. As bounds, however, they necessarily have some looseness, whereas our analysis provides exact constants, at least the ones associated with the lowest-order terms. Asymptotics has a rich tradition in statistics. In fact, our methodology of performing a Taylor expansion of the risk is reminiscent of AIC [1]. However, our aim is different: AIC is intended for model selection, whereas we are interested in optimizing regularization parameters. The Stein unbiased risk estimate (SURE) is another method of estimating the expected risk for linear models [21], with generalizations to non-linear models [11]. In practice, cross-validation procedures [10] are quite effective. However, they are only feasible when the number of hyperparameters is very small, whereas our approach can optimize many hyperparameters. Section 3.4 showed that combining the two approaches can be effective. To conclude, we have developed a general asymptotic framework for analyzing regularization, along with an efficient procedure for choosing regularization parameters. Although we are so far restricted to parametric problems with smooth losses and regularizers, we think that these tools provide a complementary perspective on analyzing learning algorithms to that of risk bounds, deepening our understanding of regularization. 8 References [1] H. Akaike. A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19:716–723, 1974. [2] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. In Advances in Neural Information Processing Systems (NIPS), pages 41–48, 2007. [3] B. Bakker and T. Heskes. Task clustering and gating for Bayesian multitask learning. Journal of Machine Learning Research, 4:83–99, 2003. [4] M. S. Bartlett. Approximate confidence intervals. II. More than one unknown parameter. Biometrika, 40:306–317, 1953. [5] P. L. Bartlett, O. Bousquet, and S. Mendelson. Local Rademacher complexities. Annals of Statistics, 33(4):1497–1537, 2005. [6] G. Bouchard. Bias-variance tradeoff in hybrid generative-discriminative models. In Sixth International Conference on Machine Learning and Applications (ICMLA), pages 124–129, 2007. [7] G. Bouchard and B. Triggs. The trade-off between generative and discriminative classifiers. In International Conference on Computational Statistics, pages 721–728, 2004. [8] O. Bousquet and A. Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2:499–526, 2002. [9] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [10] P. Craven and G. Wahba. Smoothing noisy data with spline functions. estimating the correct degree of smoothing by the method of generalized cross-validation. Numerische Mathematik, 31(4):377–403, 1978. [11] Y. C. Eldar. Generalized SURE for exponential families: Applications to regularization. IEEE Transactions on Signal Processing, 57(2):471–481, 2009. [12] T. Evgeniou, C. Micchelli, and M. Pontil. Learning multiple tasks with kernel methods. Journal of Machine Learning Research, 6:615–637, 2005. [13] L. Jacob, F. Bach, and J. Vert. Clustered multi-task learning: A convex formulation. In Advances in Neural Information Processing Systems (NIPS), pages 745–752, 2009. [14] W. James and C. Stein. Estimation with quadratic loss. In Fourth Berkeley Symposium in Mathematics, Statistics, and Probability, pages 361–380, 1961. [15] J. A. Lasserre, C. M. Bishop, and T. P. Minka. Principled hybrids of generative and discriminative models. In Computer Vision and Pattern Recognition (CVPR), pages 87–94, 2006. [16] P. Liang, F. Bach, G. Bouchard, and M. I. Jordan. Asymptotically optimal regularization in smooth parametric models. Technical report, ArXiv, 2010. [17] P. Liang and M. I. Jordan. An asymptotic analysis of generative, discriminative, and pseudolikelihood estimators. In International Conference on Machine Learning (ICML), 2008. [18] A. McCallum, C. Pal, G. Druck, and X. Wang. Multi-conditional learning: Generative/discriminative training for clustering and classification. In Association for the Advancement of Artificial Intelligence (AAAI), 2006. [19] B. Peters, H. Bui, S. Frankild, M. Nielson, C. Lundegaard, E. Kostem, D. Basch, K. Lamberth, M. Harndahl, W. Fleri, S. S. Wilson, J. Sidney, O. Lund, S. Buus, and A. Sette. A community resource benchmarking predictions of peptide binding to MHC-I molecules. PLoS Compututational Biology, 2, 2006. [20] R. Raina, Y. Shen, A. Ng, and A. McCallum. Classification with hybrid generative/discriminative models. In Advances in Neural Information Processing Systems (NIPS), 2004. [21] C. M. Stein. Estimation of the mean of a multivariate normal distribution. Annals of Statistics, 9(6):1135–1151, 1981. [22] A. W. van der Vaart. Asymptotic Statistics. Cambridge University Press, 1998. 9
2009
76
3,828
Variational Gaussian-process factor analysis for modeling spatio-temporal data Jaakko Luttinen Adaptive Informatics Research Center Helsinki University of Technology, Finland Jaakko.Luttinen@tkk.fi Alexander Ilin Adaptive Informatics Research Center Helsinki University of Technology, Finland Alexander.Ilin@tkk.fi Abstract We present a probabilistic factor analysis model which can be used for studying spatio-temporal datasets. The spatial and temporal structure is modeled by using Gaussian process priors both for the loading matrix and the factors. The posterior distributions are approximated using the variational Bayesian framework. High computational cost of Gaussian process modeling is reduced by using sparse approximations. The model is used to compute the reconstructions of the global sea surface temperatures from a historical dataset. The results suggest that the proposed model can outperform the state-of-the-art reconstruction systems. 1 Introduction Factor analysis and principal component analysis (PCA) are widely used linear techniques for finding dominant patterns in multivariate datasets. These methods find the most prominent correlations in the data and therefore they facilitate studies of the observed system. The found principal patterns can also give an insight into the observed data variability. In many applications, the quality of this kind of modeling can be significantly improved if extra knowledge about the data structure is used. For example, taking into account the temporal information typically leads to more accurate modeling of time series. In this work, we present a factor analysis model which makes use of both temporal and spatial information for a set of collected data. The method is based on the standard factor analysis model Y = WX + noise = D X d=1 w:dxT d: + noise , (1) where Y is a matrix of spatio-temporal data in which each row contains measurements in one spatial location and each column corresponds to one time instance. Here and in the following, we denote by ai: and a:i the i-th row and column of a matrix A, respectively (both are column vectors). Thus, each xd: represents the time series of one of the D factors whereas w:d is a vector of loadings which are spatially distributed. The matrix Y can contain missing values and the samples can be unevenly distributed in space and time.1 We assume that both the factors xd: and the corresponding loadings w:d have prominent structures. We describe them by using Gaussian processes (GPs) which is a flexible and theoretically solid tool for smoothing and interpolating non-uniform data [8]. Using separate GP models for xd: and w:d facilitates analysis of large spatio-temporal datasets. The application of the GP methodology to modeling data Y directly could be unfeasible in real-world problems because the computational 1In practical applications, it may be desirable to diminish the effect of uneven sampling over space or time by, for example, using proper weights for different data points. 1 complexity of inference scales cubically w.r.t. the number of data points. The advantage of the proposed approach is that we perform GP modeling only either in the spatial or temporal domain at a time. Thus, the dimensionality can be remarkably reduced and modeling large datasets becomes feasible. Also, good interpretability of the model makes it easy to explore the results in the spatial and temporal domain and to set priors reflecting our modeling assumptions. The proposed model is symmetrical w.r.t. space and time. Our model bears similarities with the latent variable models presented in [13, 16]. There, GPs were used to describe the factors and the mixing matrix was point-estimated. Therefore the observations Y were modeled with a GP. In contrast to that, our model is not a GP model for the observations because the marginal distribution of Y is not Gaussian. This makes the posterior distribution of the unknown parameters intractable. Therefore we use an approximation based on the variational Bayesian methodology. We also show how to use sparse variational approximations to reduce the computational load. Models which use GP priors for both W and X in (1) have recently been proposed in [10, 11]. The function factorization model in [10] is learned using a Markov chain Monte Carlo sampling procedure, which may be computationally infeasible for large-scale datasets. The nonnegative matrix factorization model in [11] uses point-estimates for the unknown parameters, thus ignoring posterior uncertainties. In our method, we take into account posterior uncertainties, which helps reduce overfitting and facilitates learning a more accurate model. In the experimental part, we use the model to compute reconstruction of missing values in a realworld spatio-temporal dataset. We use a historical sea surface temperature dataset which contains monthly anomalies in the 1856-1991 period to reconstruct the global sea surface temperatures. The same dataset was used in designing the state-of-the-art reconstruction methodology [5]. We show the advantages of the proposed method as a Bayesian technique which can incorporate all assumptions in one model and which uses all available data. Since reconstruction of missing values can be an important application for the method, we give all the formulas assuming missing values in the data matrix Y. 2 Factor analysis model with Gaussian process priors We use the factor analysis model (1) in which Y has dimensionality M × N and the number of factors D is much smaller than the number of spatial locations M and the number of time instances N. The m-th row of Y corresponds to a spatial location lm (e.g., a location on a two-dimensional map) and the n-th column corresponds to a time instance tn. We assume that each time signal xd: contains values of a latent function χ(t) computed at time instances tn. We use independent Gaussian process priors to describe each signal xd:: p(X) = N (X: |0, Kx ) = D Y d=1 N (xd: |0, Kd ) , [Kd]ij = ψd(ti, tj; θd) , (2) where X: denotes a long vector formed by concatenating the columns of X, Kd is the part of the large covariance matrix Kx which corresponds to the d-th row of X and N (a |b, C) denotes the Gaussian probability density function for variable a with mean b and covariance C. The ij-th element of Kd is computed using the covariance function ψd with the kernel hyperparameters θd. The priors for W are defined similarly assuming that each spatial pattern w:d contains measurements of a function ω(l) at different spatial locations lm: p(W) = D Y d=1 N (w:d |0, Kw d ) , [Kw d ]ij = ϕd(li, lj; φd) , (3) where ϕd is a covariance function with hyperparameters φd. Any valid (positive semidefinite) kernels can be used to define the covariance functions ψd and ϕd. A good list of possible covariance functions is given in [8]. The prior model reduces to the one used in probabilistic PCA [14] when Kd = I and a uniform prior is used for W. The noise term in (1) is modeled with a Gaussian distribution, resulting in a likelihood function p(Y|W, X, σ) = Y mn∈O N ymn wT m:x:n, σ2 mn  , (4) 2 where the product is evaluated over the observed elements in Y whose indices are included in the set O. We will refer to the model (1)–(4) as GPFA. In practice, the noise level can be assumed spatially (σmn = σm) or temporally (σmn = σn) varying. One can also use spatially and temporally varying noise level σ2 mn if this variability can be estimated somehow. There are two main difficulties which should be addressed when learning the model: 1) The posterior p(W, X|Y) is intractable and 2) the computational load for dealing with GPs can be too large for real-world datasets. We use the variational Bayesian framework to cope with the first difficulty and we also adopt the variational approach when computing sparse approximations for the GP posterior. 3 Learning algorithm In the variational Bayesian framework, the true posterior is approximated using some restricted class of possible distributions. An approximate distribution which factorizes as p(W, X|Y) ≈q(W, X) = q(W)q(X) . is typically used for factor analysis models. The approximation q(W, X) can be found by minimizing the Kullback-Leibler divergence from the true posterior. This optimization is equivalent to the maximization of the lower bound of the marginal log-likelihood: log p(Y) ≥ Z q(W)q(X) log p(Y|W, X)p(W)p(X) q(W)q(X) dWdX . (5) Free-form maximization of (5) w.r.t. q(X) yields that q(X) ∝p(X) exp⟨log p(Y|W,X)⟩q(W) , where ⟨·⟩refers to the expectation over the approximate posterior distribution q. Omitting the derivations here, this boils down to the following update rule: q(X) = N  X: K−1 x + U −1 Z:, K−1 x + U −1  , (6) where Z: is a DN × 1 vector formed by concatenation of vectors z:n = X m∈On σ−2 mn⟨wm:⟩ymn . (7) The summation in (7) is over a set On of indices m for which ymn is observed. Matrix U in (6) is a DN × DN block-diagonal matrix with the following D × D matrices on the diagonal: Un = X m∈On σ−2 mn wm:wT m: , n = 1, . . . , N . (8) Note that the form of the approximate posterior (6) is similar to the regular GP regression: One can interpret U−1 n z:n as noisy observations with the corresponding noise covariance matrices U−1 n . Then, q(X) in (6) is simply the posterior distribution of the latent functions values χd(tn). The optimal q(W) can be computed using formulas symmetrical to (6)–(8) in which X and W are appropriately exchanged. The variational EM algorithm for learning the model consists of alternate updates of q(W) and q(X) until convergence. The noise level can be estimated by using a point estimate or adding a factor factor q(σmn) to the approximate posterior distribution. For example, the update rules for the case of isotropic noise σ2 mn = σ2 are given in [2]. 3.1 Component-wise factorization In practice, one may need to factorize further the posterior approximation in order to reduce the computational burden. This can be done in two ways: by neglecting the posterior correlations between different factors xd: (and between spatial patterns w:d, respectively) or by neglecting the posterior correlations between different time instances x:n (and between spatial locations wm:, respectively). We suggest to use the first way which is computationally more expensive but allows to 3 Method Approximation Update rule Complexity GP on Y O(N 3M 3) GPFA q(X:) (6) O(D3N 3 + D3M 3) GPFA q(xd:) (9) O(DN 3 + DM 3) GPFA q(xd:), inducing inputs (12) O(PD d=1 N 2 dN + PD d=1 M 2 dM) Table 1: The computational complexity of different algorithms capture stronger posterior correlations. This yields a posterior approximation q(X) = QD d=1 q(xd:) which can be updated as follows: q(xd:) = N  xd: K−1 d + Vd −1 cd, K−1 d + Vd −1  , d = 1, . . . , D , (9) where cd is an N × 1 vector whose n-th component is [cd]n = X m∈On σ−2 mn⟨wmd⟩  ymn − X j̸=d ⟨wmj⟩⟨xjn⟩  (10) and Vd is an N×N diagonal matrix whose n-th diagonal element is [Vd]nn = P m∈On σ−2 mn w2 md . The main difference to (6) is that each component is fitted to the residuals of the reconstruction based on the rest of the components. The computational complexity is now reduced compared to (9), as shown in Table 1. The component-wise factorization may provide a meaningful representation of data because the model is biased in favor of solutions with dynamically and spatially decoupled components. When the factors are modeled using rather general covariance functions, the proposed method is somewhat related to the blind source separation techniques using time structure (e.g., [1]). The advantage here is that the method can handle more sophisticated temporal correlations and it is easily applicable to incomplete data. In addition, one can use the method in semi-blind settings when prior knowledge is used to extract components with specific types of temporal or spatial features [9]. This problem can be addressed using the proposed technique with properly chosen covariance functions. 3.2 Variational learning of sparse GP approximations One of the main issues with Gaussian processes is the high computational cost with respect to the number of observations. Although the variational learning of the GPFA model works only in either spatial or temporal domain at a time, the size of the data may still be too large in practice. A common way to reduce the computational cost is to use sparse approximations [7]. In this work, we follow the variational formulation of sparse approximations presented in [15]. The main idea is to introduce a set of auxiliary variables {w, x} which contain the values of the latent functions ωd(l), χd(t) in some locations {l = λd m|m = 1, . . . , Md}, {t = τ d n|n = 1, . . . , Nd} called inducing inputs. Assuming that the auxiliary variables {w, x} summarize the data well, it holds that p(W, X|w, x, Y) ≈p(W, X|w, x) , which suggests a convenient form of the approximate posterior: q(W, X, w, x) = p(W|w)p(X|x)q(w)q(x) , (11) where p(W|w), p(X|x) can be easily computed from the GP priors. Optimal q(w), q(x) can be computed by maximizing the variational lower bound of the marginal log-likelihood similar to (5). Free-form maximization w.r.t. q(x) yields the following update rule: q(x) = N x ΣK−1 x KxxZ:, Σ  , Σ = K−1 x + K−1 x KxxUKxxK−1 x −1 , (12) where x is the vector of concatenated auxiliary variables for all factors, Kx is the GP prior covariance matrix of x and Kxx is the covariance between x and X:. This equation can be seen as a replacement of (6). A similar formula is applicable to the update of q(w). The advantage here is that the number of inducing inputs is smaller than then the number of data samples, that is, Md < M and Nd < N, and therefore the required computational load can be reduced (see more details in [15]). Eq. (12) can be quite easily adapted to the component-wise factorization of the posterior in order to reduce the computational load of (9). See the summary for the computational complexity in Table 1. 4 3.3 Update of GP hyperparameters The hyperparameters of the GP priors can be updated quite similarly to the standard GP regression by maximizing the lower bound of the marginal log-likelihood. Omitting the derivations here, this lower bound for the temporal covariance functions {ψd(t)}D d=1 equals (up to a constant) to log N U−1Z: 0, U−1 + KxxK−1 x Kxx  −1 2 tr h N X n=1 UnD i , (13) where U and Z: have the same meaning as in (6) and D is a D × D (diagonal) matrix of variances of x:n given the auxiliary variables x. The required gradients are shown in the appendix. The equations without the use of auxiliary variables are similar except that KxxK−1 x Kxx = Kx and the second term disappears. A symmetrical equation can be derived for the hyperparameters of the spatial functions ϕd(t). The extension of (13) to the case of component-wise factorial approximation is straightforward. The inducing inputs can also be treated as variational parameters and they can be changed to optimize the lower bound (13). 4 Experiments 4.1 Artificial example We generated a dataset with M = 30 sensors (two-dimensional spatial locations) and N = 200 time instances using the generative model (1) with a moderate amount of observation noise, assuming σmn = σ. D = 4 temporal signals xd: were generated by taking samples from GP priors with different covariance functions: 1) a squared exponential function to model a slowly changing component: k(r; θ1) = exp  −r2 2θ2 1  , (14) 2) a periodic function with decay to model a quasi-periodic component: k(r; θ1, θ2, θ3) = exp  −2 sin2(πr/θ1) θ2 2 −r2 2θ2 3  , (15) where r = |tj −ti|, and 3) a compactly supported piecewise polynomial function to model two fast changing components with different timescales: k(r; θ1) = 1 3(1 −r)b+2 (b2 + 4b + 3)r2 + (3b + 6)r + 3  , (16) where r = min(1, |tj −ti|/θ1) and b = 3 for one-dimensional inputs with the hyperparameter θ1 defining a threshold such that k(r) = 0 for |tj −ti| ≥θ1. The loadings were generated from GPs over the two-dimensional space using the squared exponential covariance function (14) with an additional scale parameter θ2: k(r; θ1, θ2) = θ2 2 exp −r2/(2θ2 1)  . (17) We randomly selected 452 data points from Y as being observed, thus most of the generated data points were marked as missing (see Fig. 1a for examples). We also removed observations from all the sensors for a relatively long time interval. Note a resulting gap in the data marked with vertical lines in Fig. 1a. The hyperparameters of the Gaussian processes were initialized randomly close to the values used for data generation, assuming that a good guess about the hidden signals can be obtained by exploratory analysis of data. Fig. 1b shows the components recovered by GPFA using the update rule (6). Note that the algorithm separated the four signals with the different variability timescales. The posterior predictive distributions of the missing values presented in Fig. 1a show that the method was able to capture temporal correlations on different timescales. Note also that although some of the sensors contain very few observations, the missing values are reconstructed pretty well. This is a positive effect of the spatially smooth priors. 5 y19(t) y1(t) y20(t) y5(t) time, t x1(t) x2(t) x3(t) x4(t) time, t (a) (b) Figure 1: Results for the artificial experiment. (a) Posterior predictive distribution for four randomly selected locations with the observations shown as crosses, the gap with no training observations marked with vertical lines and some test values shown as circles. (b) The posteriors of the four latent signals xd:. In both figures, the solid lines show the posterior mean and gray color shows two standard deviations. 4.2 Reconstruction of global SST using the MOHSST5 dataset We demonstrate how the presented model can be used to reconstruct global sea surface temperatures (SST) from historical measurements. We use the U.K. Meteorological Office historical SST data set (MOHSST5) [6] that contain monthly SST anomalies in the 1856-1991 period for 5◦×5◦longitudelatitude bins. The dataset contains in total approximately 1600 time instances and 1700 spatial locations. The dataset is sparse, especially during the 19th century and the World Wars, having 55% of the values missing, and thus, consisting of more than 106 observations in total. We used the proposed algorithm to estimate D = 80 components, the same number was used in [5]. We withdrew 20% of the data from the training set and used this part for testing the reconstruction accuracy. We used five time signals xd: with the squared exponential function (14) to describe climate trends. Another five temporal components were modeled with the quasi-periodic covariance function (15) to capture periodic signals (e.g. related to the annual cycle). We also used five components with the squared exponential function to model prominent interannual phenomena such as El Ni˜no. Finally we used the piecewise polynomial functions to describe the rest 65 time signals xd:. These dimensionalities were chosen ad hoc. The covariance function for each spatial pattern w:d was the scaled squared exponential (17). The distance r between the locations li and lj was measured on the surface of the Earth using the spherical law of cosines. The use of the extra parameter θ2 in (17) allowed automatic pruning of unnecessary factors, which happens when θ2 = 0. We used the component-wise factorial approximation of the posterior described in Section 3.1. We also introduced 500 inducing inputs for each spatial function ωd(l) in order to use sparse variational approximations. Similar sparse approximations were used for the 15 temporal functions χ(t) which modeled slow climate variability: the slowest, quasi-periodic and interannual components had 80, 300 and 300 inducing inputs, respectively. The inducing inputs were initialized by taking a random subset from the original inputs and then kept fixed throughout learning because their optimization would have increased the computational burden substantially. For the rest of the temporal phenomena, we used the piecewise polynomial functions (16) that produce priors with a sparse covariance matrix and therefore allow efficient computations. The dataset was preprocessed by weighting the data points by the square root of the corresponding latitudes in order to diminish the effect of denser sampling in the polar regions, then the same noise level was assumed for all measurements (σmn = σ). Preprocessing by weighting data points ymn with weights sm is essentially equivalent to assuming spatially varying noise level σmn = σ/sm. The GP hyperparameters were initialized taking into account the assumed smoothness of the spatial patterns and the variability timescale of the temporal factors. The factors X were initialized 6 −0.5 0 0.5 −0.5 0 0.5 −1 −0.5 0 0.5 1 −0.5 0 0.5 1875 1900 1925 1950 1975 −0.5 0 0.5 −0.5 0 0.5 −1 −0.5 0 0.5 1 −0.5 0 0.5 1875 1900 1925 1950 1975 Figure 2: Experimental results for the MOHSST5 dataset. The spatial and temporal patterns of the four most dominating principal components for GPFA (above) and VBPCA (below). The solid lines and gray color in the time series show the mean and two standard deviations of the posterior distribution. The uncertainties of the spatial patterns are not shown, and we saturated the visualizations of the VBPCA spatial components to reduce the effect of the uncertain pole regions. randomly by sampling from the prior and the weights W were initialized to zero. The variational EM-algorithm of GPFA was run for 200 iterations. We also applied the variational Bayesian PCA (VBPCA) [2] to the same dataset for comparison. VBPCA was initialized randomly as the initialization did not have much effect on the VBPCA results. Finally, we rotated the GPFA components such that the orthogonal basis in the factor analysis subspace was ordered according to the amount of explained data variance (where the variance was computed by averaging over time). Thus, “GPFA principal components” are mixtures of the original factors found by the algorithm. This was done for comparison with the most prominent patterns found with VBPCA. Fig. 2 shows the spatial and temporal patterns of the four most dominant principal components for both models. The GPFA principal components and the corresponding spatial patterns are generally smoother, especially in the data-sparse regions, for example, in the period before 1875. The first and the second principal components of GPFA as well as the first and the third components of VBPCA are related to El Ni˜no. We should make a note here that the rotation within the principal subspace may be affected by noise and therefore the components may not be directly comparable. Another observation was that the model efficiently used only some of the 15 slow components: about three very slow and two interannual components had relatively large weights in the loading matrix W. Therefore the selected number of slow components did not affect the results significantly. None 7 of the periodic components had large weights, which suggests that the fourth VBPCA component might contain artifacts. Finally, we compared the two models by computing a weighted root mean square reconstruction error on the test set, similarly to [4]. The prediction errors were 0.5714 for GPFA and 0.6180 for VBPCA. The improvement obtained by GPFA can be considered quite significant taking into account the substantial amount of noise in the data. 5 Conclusions and discussion In this work, we proposed a factor analysis model which can be used for modeling spatio-temporal datasets. The model is based on using GP priors for both spatial patterns and time signals corresponding to the hidden factors. The method can be seen as a combination of temporal smoothing, empirical orthogonal functions (EOF) analysis and kriging. The latter two methods are popular in geostatistics (see, e.g., [3]). We presented a learning algorithm that can be applicable to relatively large datasets. The proposed model was applied to the problem of reconstruction of historical global sea surface temperatures. The current state-of-the-art reconstruction methods [5] are based on the reduced space (i.e. EOF) analysis with smoothness assumptions for the spatial and temporal patterns. That approach is close to probabilistic PCA [14] with fitting a simple auto-regressive model to the posterior means of the hidden factors. Our GPFA model is based on probabilistic formulation of essentially the same modeling assumptions. The gained advantage is that GPFA takes into account the uncertainty about the unknown parameters, it can use all available data and it can combine all modeling assumptions in one estimation procedure. The reconstruction results obtained with GPFA are very promising and they suggest that the proposed model might be able to improve the existing SST reconstructions. The improvement is possible because the method is able to model temporal and spatial phenomena on different scales by using properly selected GPs. A The gradients for the updates of GP hyperparameters The gradient of the first term of (13) w.r.t. a hyperparameter (or inducing input) θ of any covariance function is given by 1 2 tr hK−1 x −A−1 ∂Kx ∂θ i −tr h UKxxA−1 ∂Kxx ∂θ i + −1 2bT ∂Kx ∂θ b + bT ∂Kxx ∂θ (Z: −UKxxb) where A = Kx + KxxUKxx , b = A−1KxxZ: . This part is similar to the gradient reported in [12]. Without the sparse approximation, it holds that Kx = Kx = Kxx = Kxx and the equation simplifies to the regular gradient in GP regression for projected observations U−1Z: with the noise covariance U−1. The second part of (13) results in the extra terms tr ∂Kx ∂θ U  + tr ∂Kx ∂θ K−1 x KxxUKxxK−1 x  −2 tr ∂Kxx ∂θ K−1 x KxxU  . (18) The terms in (18) cancel out when the sparse approximation is not used. Both parts of the gradient can be efficiently evaluated using the Cholesky decomposition. The positivity constraints of the hyperparameters can be taken into account by optimizing with respect to the logarithms of the hyperparameters. Acknowledgments This work was supported in part by the Academy of Finland under the Centers for Excellence in Research program and Alexander Ilin’s postdoctoral research project. We would like to thank Alexey Kaplan for fruitful discussions and providing his expertise on the problem of sea surface temperature reconstruction. References [1] A. Belouchrani, K. A. Meraim, J.-F. Cardoso, and E. Moulines. A blind source separation technique based on second order statistics. IEEE Transactions on Signal Processing, 45(2):434–444, 1997. 8 [2] C. M. Bishop. Variational principal components. In Proceedings of the 9th International Conference on Artificial Neural Networks (ICANN’99), pages 509–514, 1999. [3] N. Cressie. Statistics for Spatial Data. Wiley-Interscience, New York, 1993. [4] A. Ilin and A. Kaplan. Bayesian PCA for reconstruction of historical sea surface temperatures. In Proceedings of the International Joint Conference on Neural Networks (IJCNN 2009), pages 1322–1327, Atlanta, USA, June 2009. [5] A. Kaplan, M. Cane, Y. Kushnir, A. Clement, M. Blumenthal, and B. Rajagopalan. Analysis of global sea surface temperatures 1856–1991. Journal of Geophysical Research, 103:18567–18589, 1998. [6] D. E. Parker, P. D. Jones, C. K. Folland, and A. Bevan. Interdecadal changes of surface temperature since the late nineteenth century. Journal of Geophysical Research, 99:14373–14399, 1994. [7] J. Qui˜nonero-Candela and C. E. Rasmussen. A unifying view of sparse approximate Gaussian process regression. Journal of Machine Learning Research, 6:1939–1959, Dec. 2005. [8] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [9] J. S¨arel¨a and H. Valpola. Denoising source separation. Journal of Machine Learning Research, 6:233– 272, 2005. [10] M. N. Schmidt. Function factorization using warped Gaussian processes. In L. Bottou and M. Littman, editors, Proceedings of the 26th International Conference on Machine Learning (ICML’09), pages 921– 928, Montreal, June 2009. Omnipress. [11] M. N. Schmidt and H. Laurberg. Nonnegative matrix factorization with Gaussian process priors. Computational Intelligence and Neuroscience, 2008:1–10, 2008. [12] M. Seeger, C. K. I. Williams, and N. D. Lawrence. Fast forward selection to speed up sparse Gaussian process regression. In Proceedings of the 9th International Workshop on Artificial Intelligence and Statistics (AISTATS’03), pages 205–213, 2003. [13] Y. W. Teh, M. Seeger, and M. I. Jordan. Semiparametric latent factor models. In Proceedings of the 10th International Workshop on Artificial Intelligence and Statistics (AISTATS’05), pages 333–340, 2005. [14] M. E. Tipping and C. M. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society Series B, 61(3):611–622, 1999. [15] M. K. Titsias. Variational learning of inducing variables in sparse Gaussian processes. In Proceedings of the 12th International Workshop on Artificial Intelligence and Statistics (AISTATS’09), pages 567–574, 2009. [16] B. M. Yu, J. P. Cunningham, G. Santhanam, S. I. Ryu, K. V. Shenoy, and M. Sahani. Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity. In Advances in Neural Information Processing Systems 21, pages 1881–1888. 2009. 9
2009
77
3,829
Lattice Regression Eric K. Garcia Department of Electrical Engineering University of Washington Seattle, WA 98195 garciaer@ee.washington.edu Maya R. Gupta Department of Electrical Engineering University of Washington Seattle, WA 98195 gupta@ee.washington.edu Abstract We present a new empirical risk minimization framework for approximating functions from training samples for low-dimensional regression applications where a lattice (look-up table) is stored and interpolated at run-time for an efficient implementation. Rather than evaluating a fitted function at the lattice nodes without regard to the fact that samples will be interpolated, the proposed lattice regression approach estimates the lattice to minimize the interpolation error on the given training samples. Experiments show that lattice regression can reduce mean test error by as much as 25% compared to Gaussian process regression (GPR) for digital color management of printers, an application for which linearly interpolating a look-up table is standard. Simulations confirm that lattice regression performs consistently better than the naive approach to learning the lattice. Surprisingly, in some cases the proposed method — although motivated by computational efficiency — performs better than directly applying GPR with no lattice at all. 1 Introduction In high-throughput regression problems, the cost of evaluating test samples is just as important as the accuracy of the regression and most non-parametric regression techniques do not produce models that admit efficient implementation, particularly in hardware. For example, kernel-based methods such as Gaussian process regression [1] and support vector regression require kernel computations between each test sample and a subset of training examples, and local smoothing techniques such as weighted nearest neighbors [2] require a search for the nearest neighbors. For functions with a known and bounded domain, a standard efficient approach to regression is to store a regular lattice of function values spanning the domain, then interpolate each test sample from the lattice vertices that surround it. Evaluating the lattice is independent of the size of any original training set, but exponential in the dimension of the input space making it best-suited to low-dimensional applications. In digital color management — where real-time performance often requires millions of evaluations every second — the interpolated look-up table (LUT) approach is the most popular implementation of the transformations needed to convert colors between devices, and has been standardized by the International Color Consortium (ICC) with a specification called an ICC profile [3]. For applications where one begins with training data and must learn the lattice, the standard approach is to first estimate a function that fits the training data, then evaluate the estimated function at the lattice points. However, this is suboptimal because the effect of interpolation from the lattice nodes is not considered when estimating the function. This begs the question: can we instead learn lattice outputs that accurately reproduce the training data upon interpolation? Iterative post-processing solutions that update a given lattice to reduce the post-interpolation error have been proposed by researchers in geospatial analysis [4] and digital color management [5]. In 1 this paper, we propose a solution that we term lattice regression, that jointly estimates all of the lattice outputs by minimizing the regularized interpolation error on the training data. Experiments with randomly-generated functions, geospatial data, and two color management tasks show that lattice regression consistently reduces error over the standard approach of evaluating a fitted function at the lattice points, in some cases by as much as 25%. More surprisingly, the proposed method can perform better than evaluating test points by Gaussian process regression using no lattice at all. 2 Lattice Regression The motivation behind the proposed lattice regression is to jointly choose outputs for lattice nodes that interpolate the training data accurately. The key to this estimation is that the linear interpolation operation can be directly inverted to solve for the node outputs that minimize the squared error of the training data. However, unless there is ample training data, the solution will not necessarily be unique. Also, to decrease estimation variance it may be beneficial to avoid fitting the training data exactly. For these reasons, we add two forms of regularization to the minimization of the interpolation error. In total, the proposed form of lattice regression trades off three terms: empirical risk, Laplacian regularization, and a global bias. We detail these terms in the following subsections. 2.1 Empirical Risk We assume that our data is drawn from the bounded input space D ⊂Rd and the output space Rp; collect the training inputs xi ∈D in the d × n matrix X =  x1, . . . , xn  and the training outputs yi ∈Rp in the p × n matrix Y =  y1, . . . , yn  . Consider a lattice consisting of m nodes where m = Qd j=1 mj and mj is the number of nodes along dimension j. Each node consists of an inputoutput pair (ai ∈Rd, bi ∈Rp) and the inputs {ai} form a grid that contains D within its convex hull. Let A be the d × m matrix A =  a1, . . . , am  and B be the p × m matrix B =  b1, . . . , bm  . For any x ∈D, there are q = 2d nodes in the lattice that form a cell (hyper-rectangle) containing x from which an output will be interpolated; denote the indices of these nodes by c1(x), . . . , cq(x). For our purposes, we restrict the interpolation to be a linear combination {w1(x), . . . , wq(x)} of the surrounding node outputs {bc1(x), . . . , bcq(x)}, i.e. ˆf(x) = P i wi(x)bci(x). There are many interpolation methods that correspond to distinct weightings (for instance, in three dimensions: trilinear, pyramidal, or tetrahedral interpolation [6]). Additionally, one might consider a higher-order interpolation technique such as tricubic interpolation, which expands the linear weighting to the nodes directly adjacent to this cell. In our experiments we investigate only the case of d-linear interpolation (e.g. bilinear/trilinear interpolation) because it is arguably the most popular variant of linear interpolation, can be implemented efficiently, and has the theoretical support of being the maximum entropy solution to the underdetermined linear interpolation equations [7]. Given the weights {w1(x), . . . , wq(x)} corresponding to an interpolation of x, let W(x) be the m × 1 sparse vector with cj(x)th entry wj(x) for j = 1, . . . , 2d and zeros elsewhere. Further, for training inputs {x1, . . . , xn}, let W be the m × n matrix W =  W(x1), . . . , W(xn)  . The lattice outputs B∗that minimize the total squared-ℓ2 distortion between the lattice-interpolated training outputs BW and the given training outputs Y are B∗= arg min B tr BW −Y BW −Y T  . (1) 2.2 Laplacian Regularization Alone, the empirical risk term is likely to pose an underdetermined problem and overfit to the training data. As a form of regularization, we propose to penalize the average squared difference of the output on adjacent lattice nodes using Laplacian regularization. A somewhat natural regularization of a function defined on a lattice, its inclusion guarantees1 an unique solution to (1). The graph Laplacian [8] of the lattice is fully defined by the m×m lattice adjacency matrix E where Eij = 1 for nodes directly adjacent to one another and 0 otherwise. Given E, a normalized version 1For large enough values of the mixing parameter α. 2 of the Laplacian can be defined as L = 2(diag(1T E) −E)/(1T E1), where 1 is the m × 1 all-ones vector. The average squared error between adjacent lattice outputs can be compactly represented as tr BLBT  = p X k=1  1 P ij Eij X {i,j | Eij=1} (Bki −Bkj)2  . Thus, inclusion of this term penalizes first-order differences of the function at the scale of the lattice. 2.3 Global Bias Alone, the Laplacian regularization of Section 2.2 rewards smooth transitions between adjacent lattice outputs but only enforces regularity at the resolution of the nodes, and there is no incentive in either the empirical risk or Laplacian regularization term to extrapolate the estimated function beyond the boundary of the cells that contain training samples. When the training data samples do not span all of the grid cells, the lattice node outputs reconstruct a clipped function. In order to endow the algorithm with an improved ability to extrapolate and regularize towards trends in the data, we also include a global bias term in the lattice regression optimization. The global bias term penalizes the divergence of lattice node outputs from some global function ˜f : Rd →Rp that approximates the training data and this can be learned using any regression technique. Given ˜f, we bias the lattice regression nodes towards ˜f’s predictions for the lattice nodes by minimizing the average squared deviation: 1 mtr B −˜f(A) B −˜f(A))T  . We hypothesized that the lattice regression performance would be better if the ˜f was itself a good regression of the training data. Surprisingly, experiments comparing an accurate ˜f, an inaccurate ˜f, and no bias at all showed little difference in most cases (see Section 3 for details). 2.4 Lattice Regression Objective Function Combined, the empirical risk minimization, Laplacian regularization, and global bias form the proposed lattice regression objective. In order to adapt an appropriate mixture of these terms, the regularization parameters α and γ trade-off the first-order smoothness and the divergence from the bias function, relative to the empirical risk. The combined objective solves for the lattice node outputs B∗that minimize arg min B tr  1 n BW −Y BW −Y T + αBLBT + γ m B −˜f(A) B −˜f(A))T  , which has the closed form solution B∗=  1 nY W T + γ m ˜f(A)  1 nWW T + αL + γ mI −1 , (2) where I is the m × m identity matrix. Note that this is a joint optimization over all lattice nodes simultaneously. Since the m × m matrix that is inverted in (2) is sparse (it contains no more than 3d nonzero entries per row2), (2) can be solved using sparse Cholesky factorization [9]. On a 64bit 2.6GHz processor using the Matlab command mldivide, we found that we could compute solutions for lattices that contained on the order of 104 nodes (a standard size for digital color management profiling [6]) in < 20s using < 1GB of memory but could not compute solutions for lattices that contained on the order of 105 nodes. 2For a given row, the only possible non-zero entries of WW T correspond to nodes that are adjacent in one or more dimensions and these non-zero entries overlap with those of L. 3 3 Experiments The effectiveness of the proposed method was analyzed with simulations on randomly-generated functions and tested on a real-data geospatial regression problem as well as two real-data color management tasks. For all experiments, we compared the proposed method to Gaussian process regression (GPR) applied directly to the final test points (no lattice), and to estimating test points by interpolating a lattice where the lattice nodes are learned by the same GPR. For the color management task, we also compared a state-of-the art regression method used previously for this application: local ridge regression using the enclosing k-NN neighborhood [10]. In all experiments we evaluated the performance of lattice regression using three different global biases: 1) an “accurate” bias ˜f was learned by GPR on the training samples; an “inaccurate” bias ˜f was learned by a global d-linear interpolation3; and 3) the no bias case, where the γ term in (2) is fixed at zero. To implement GPR, we used the MATLAB code provided by Rasmussen and Williams at http: //www.GaussianProcess.org/gpml. The covariance function was set as the sum of a squared-exponential with an independent Gaussian noise contribution and all data were demeaned by the mean of the training outputs before applying GPR. The hyperparameters for GPR were set by maximizing the marginal likelihood of the training data (for details, see Rasmussen and Williams [1]). To mitigate the problem of choosing a poor local maxima, gradient descent was performed from 20 random starting log-hyperparameter values drawn uniformly from [−10, 10]3 and the maximal solution was chosen. The parameters for all other algorithms were set by minimizing the 10-fold cross-validation error using the Nelder-Mead simplex method, bounded to values in the range [1e−3, 1e3]. The starting point for this search was set at the default parameter setting for each algorithm: λ = 1 for local ridge regression4 and α = 1, γ = 1 for lattice regression. Experiments on the simulated dataset comparing this approach to the standard cross-validation over a grid of values [1e−3, 1e−2, . . . , 1e3] × [1e−3, 1e−2, . . . , 1e3] showed no difference in performance, and the former was nearly 50% faster. 3.1 Simulated Data We analyzed the proposed method with simulations on randomly-generated piecewise-polynomial functions f : Rd →R formed from splines. These functions are smooth but have features that occur at different length-scales; two-dimensional examples are shown in Fig. 1. To construct each function, we first drew ten iid random points {si} from the uniform distribution on [0, 1]d, and ten iid random points {ti} from the uniform distribution on [0, 1]. Then for each of the d dimensions we first fit a one-dimensional spline ˜gk : R →R to the pairs { si)k, ti)}, where (si)k denotes the kth component of si. We then combined the d one-dimensional splines to form the d-dimensional function ˜g(x) = Pd k=1 ˜gk (x)k  , which was then scaled and shifted to have range spanning [0, 100]: f(x) = 100  ˜g(x) −minz∈[0,1]d ˜g(z) maxz∈[0,1]d ˜g(z)  . Figure 1: Example random piecewise-polynomial functions created by the sum of one-dimensional splines fit to ten uniformly drawn points in each dimension. 3We considered the very coarse m = 2d lattice formed by the corner vertices of the original lattice and solved (1) for this one-cell lattice, using the result to interpolate the full set of lattice nodes, forming ˜f(A). 4Note that no locality parameter is needed for this local ridge regression as the neighborhood size is automatically determined by enclosing k-NN [10]. 4 For input dimensions d ∈{2, 3}, a set of 100 functions {f1, . . . , f100} were randomly generated as described above and a set of n ∈{50, 1000} randomly chosen training inputs {x1, . . . , xn} were fit by each regression method. A set of m = 10, 000 randomly chosen test inputs {z1, . . . , zm} were used to evaluate the accuracy of each regression method in fitting these functions. For the rth randomly-generated function fr, denote the estimate of the jth test sample by a regression method as (ˆyj)r. For each of the 100 functions and each regression method we computed the root meansquared errors (RMSE) where the mean is over the m = 10, 000 test samples: er =  1 m m X j=1 fr(zj) −(ˆyj)r 2 1/2 . The mean and statistical significance (as judged by a one-sided Wilcoxon with p = 0.05) of {er} for r = 1, . . . , 100 is shown in Fig. 2 for lattice resolutions of 5, 9 and 17 nodes per dimension. Legend RGPR direct ■GPR lattice ■LR GPR bias ■LR d-linear bias ■LR no bias Ranking by Statistical Significance R ■ R ■■ ■ ■ ■ ■■■ R■■■ Ranking by Statistical Significance R R R ■■ ■■ ■■■ ■ ■ ■ ■ ■ 5 9 17 0 10 20 Lattice Nodes Per Dimension Error 5 9 17 0 10 20 Lattice Nodes Per Dimension Error (a) d = 2, n = 50 (b) d = 2, n = 1000 Ranking by Statistical Significance ■ R■■ ■■ R■■ ■■ R■■ ■ Ranking by Statistical Significance R R■ R ■ ■ ■■■ ■■ ■ ■ ■ ■ 5 9 17 0 10 20 Lattice Nodes Per Dimension Error 5 9 17 0 10 20 Lattice Nodes Per Dimension Error (c) d = 3, n = 50 (d) d = 3, n = 1000 Figure 2: Shown is the average RMSE of the estimates given by each regression method on the simulated dataset. As summarized in the legend, shown is GPR applied directly to the test samples (dotted line) and the bars are (from left to right) GPR applied to the nodes of a lattice which is then used to interpolate the test samples, lattice regression with a GPR bias, lattice regression with a dlinear regression bias, and lattice regression with no bias. The statistical significance corresponding to each group is shown as a hierarchy above each plot: method A is shown as stacked above method B if A performed statistically significantly better than B. In interpreting the results of Fig. 2, it is important to note that the statistical significance test compares the ordering of relative errors between each pair of methods across the random functions. 5 That is, it indicates whether one method consistently outperforms another in RMSE when fitting the randomly drawn functions. Consistently across the random functions, and in all 12 experiments, lattice regression with a GPR bias performs better than applying GPR to the nodes of the lattice. At coarser lattice resolutions, the choice of bias function does not appear to be as important: in 7 of the 12 experiments (all at the low end of grid resolution) lattice regression using no bias does as well or better than that using a GPR bias. Interestingly, in 3 of the 12 experiments, lattice regression with a GPR bias achieves statistically significantly lower errors (albeit by a marginal average amount) than applying GPR directly to the random functions. This surprising behavior is also demonstrated on the real-world datasets in the following sections and is likely due to large extrapolations made by GPR and in contrast, interpolation from the lattice regularizes the estimate which reduces the overall error in these cases. 3.2 Geospatial Interpolation Interpolation from a lattice is a common representation for storing geospatial data (measurements tied to geographic coordinates) such as elevation, rainfall, forest cover, wind speed, etc. As a cursory investigation of the proposed technique in this domain, we tested it on the Spatial Interpolation Comparison 97 (SIC97) dataset [11] from the Journal of Geographic Information and Decision Analysis. This dataset is composed of 467 rainfall measurements made at distinct locations across Switzerland. Of these, 100 randomly chosen sites were designated as training to predict the rainfall at the remaining 367 sites. The RMSE of the predictions made by GPR and variants of the proposed method are presented in Fig 3. Additionally, the statistical significance (as judged by a one-sided Wilcoxon with p = 0.05) of the differences in squared error on the 367 test samples was computed for each pair of techniques. In contrast to the previous section in which significance was computed on the RMSE across 100 randomly drawn functions, significance in this section indicates that one technique produced consistently lower squared error across the individual test samples. Legend RGPR direct ■GPR lattice ■LR GPR bias ■LR d-linear bias ■LR no bias Ranking by Statistical Significance R R■■ ■ ■■ ■ ■■■ ■ ■■ ■■ ■ R R■■■ R■■ 5 9 17 33 65 0 50 100 Lattice Nodes Per Dimension RMSE Figure 3: Shown is the RMSE of the estimates given by each method for the SIC97 test samples. The hierarchy of statistical significance is presented as in Fig. 2. Compared with GPR applied to a lattice, lattice regression with a GPR bias again produces a lower RMSE on all five lattice resolutions. However, for four of the five lattice resolutions, there is no performance improvement as judged by the statistical significance of the individual test errors. In comparing the effectiveness of the bias term, we see that on four of five lattice resolutions, using no bias and using the d-linear bias produce consistently lower errors than both the GPR bias and GPR applied to a lattice. Additionally, for finer lattice resolutions (≥17 nodes per dimension) lattice regression either outperforms or is not significantly worse than GPR applied directly to the test points. Inspection of the 6 maximal errors confirms the behavior posited in the previous section: that interpolation from the lattice imposes a helpful regularization. The range of values produced by applying GPR directly lies within [1, 552] while those produced by lattice regression (regardless of bias) lie in the range [3, 521]; the actual values at the test samples lie in the range [0, 517]. 3.3 Color Management Experiments with Printers Digital color management allows for a consistent representation of color information among diverse digital imaging devices such as cameras, displays, and printers; it is a necessary part of many professional imaging workflows and popular among semi-professionals as well. An important component of any color management system is the characterization of the mapping between the native color space of a device (RGB for many digital displays and consumer printers), and a device-independent space such as CIE L∗a∗b∗— abbreviated herein as Lab — in which distance approximates perceptual notions of color dissimilarity [12]. For nonlinear devices such as printers, the color mapping is commonly estimated empirically by printing a page of color patches for a set of input RGB values and measuring the printed colors with a spectrophotometer. From these training pairs of (Lab, RGB) colors, one estimates the inverse mapping f : Lab →RGB that specifies what RGB inputs to send to the printer in order to reproduce a desired Lab color. See Fig. 4 for an illustration of a color-managed system. Estimating f is challenging for a number of reasons: 1) f is often highly nonlinear; 2) although it can be expected to be smooth over regions of the colorspace, it is affected by changes in the underlying printing mechanisms [13] that can introduce discontinuities; and 3) device instabilities and measurement error introduce noise into the training data. Furthermore, millions of pixels must be processed in approximately real-time for every image without adding undue costs for hardware, which explains the popularity of using a lattice representation for color management in both hardware and software imaging systems. Learned Device Characterization R G B 1D LUT 1D LUT 1D LUT R' G' B' Printer ˆL ˆb ˆa b a L Figure 4: A color-managed printer system. For evaluation, errors are measured between the desired (L, a, b) and the resulting (ˆL, ˆa,ˆb) for a given device characterization. The proposed lattice regression was tested on an HP Photosmart D7260 ink jet printer and a Samsung CLP-300 laser printer. As a baseline, we compared to a state-of-the-art color regression technique used previously in this application [10]: local ridge regression (LRR) using the enclosing k-NN neighborhood. Training samples were created by printing the Gretag MacBeth TC9.18 RGB image, which has 918 color patches that span the RGB colorspace. We then measured the printed color patches with an X-Rite iSis spectrophotometer using D50 illuminant at a 2◦observer angle and UV filter. As shown in Fig. 4 and as is standard practice for this application, the data for each printer is first gray-balanced using 1D calibration look-up-tables (1D LUTs) for each color channel (see [10, 13] for details). We use the same 1D LUTs for all the methods compared in the experiment and these were learned for each printer using direct GPR on the training data. We tested each method’s accuracy on reproducing 918 new randomly-chosen in-gamut5 test Lab colors. The test errors for the regression methods the two printers are reported in Tables 1 and 2. As is common in color management, we report ∆E76 error, which is the Euclidean distance between the desired test Lab color and the Lab color that results from printing the estimated RGB output of the regression (see Fig. 4). For both printers, the lattice regression methods performed best in terms of mean, median and 95 %-ile error. Additionally, according to a one-sided Wilcoxon test of statistical significance with 5We drew 918 samples iid uniformly over the RGB cube, printed these, and measured the resulting Lab values; these Lab values were used as test samples. This is a standard approach to assuring that the test samples are Lab colors that are in the achievable color gamut of the printer [10]. 7 Table 1: Samsung CLP-300 laser printer Euclidean Lab Error Mean Median 95 %-ile Max Local Ridge Regression (to fit lattice nodes) 4.59 4.10 9.80 14.59 GPR (direct) 4.54 4.22 9.33 17.36 GPR (to fit lattice nodes) 4.54 4.17 9.62 15.95 Lattice Regression (GPR bias) 4.31 3.95 9.08 15.11 Lattice Regression (Trilinear bias) 4.14 3.75 8.39 15.59 Lattice Regression (no bias) 4.08 3.72 8.00 17.45 Table 2: HP Photosmart D7260 inkjet printer Euclidean Lab Error Mean Median 95 %-ile Max Local Ridge Regression (to fit lattice nodes) 3.34 2.84 7.70 14.77 GPR (direct) 2.79 2.45 6.36 11.08 GPR (to fit lattice nodes) 2.76 2.36 6.36 11.79 Lattice Regression (GPR bias) 2.53 2.17 5.96 10.25 Lattice Regression (Trilinear bias) 2.34 1.84 5.89 12.48 Lattice Regression (no bias) 2.07 1.75 4.89 10.51 The bold face indicates that the individual errors are statistically significantly lower than the others as judged by a one-sided Wilcoxon significance test (p=0.05). Multiple bold lines indicate that there was no statistically significant difference in the bolded errors. p = 0.05, all of the lattice regressions (regardless of the choice of bias) were statistically significantly better than the other methods for both printers; on the Samsung, there was no significant difference between the choice of bias, and on the HP using the using no bias produced consistently lower errors. These results are surprising for three reasons. First, the two printers have rather different nonlinearities because the underlying physical mechanisms differ substantially (one is a laser printer and the other is an inkjet printer), so it is a nod towards the generality of the lattice regression that it performs best in both cases. Second, the lattice is used for computationally efficiency, and we were surprised to see it perform better than directly estimating the test samples using the function estimated with GPR directly (no lattice). Third, we hypothesized (incorrectly) that better performance would result from using the more accurate global bias term formed by GPR than using the very coarse fit provided by the global trilinear bias or no bias at all. 4 Conclusions In this paper we noted that low-dimensional functions can be efficiently implemented as interpolation from a regular lattice and we argued that an optimal approach to learning this structure from data should take into account the effect of this interpolation. We showed that, in fact, one can directly estimate the lattice nodes to minimize the empirical interpolated training error and added two regularization terms to attain smoothness and extrapolation. It should be noted that, in the experiments, extrapolation beyond the training data was not directly tested: test samples for the simulated and real-data experiments were drawn mainly from within the interior of the training data. Real-data experiments showed that mean error on a practical digital color management problem could be reduced by 25% using the proposed lattice regression, and that the improvement was statistically significant. Simulations also showed that lattice regression was statistically significantly better than the standard approach of first fitting a function then evaluating it at the lattice points. Surprisingly, although the lattice architecture is motivated by computational efficiency, both our simulated and real-data experiments showed that the proposed lattice regression can work better than state-of-the-art regression of test samples without a lattice. 8 References [1] C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning), The MIT Press, 2005. [2] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning, SpringerVerlag, New York, 2001. [3] D. Wallner, Building ICC Profiles - the Mechanics and Engineering, chapter 4: ICC Profile Processing Models, pp. 150–167, International Color Consortium, 2000. [4] W. R. Tobler, “Lattice tuning,” Geographical Analysis, vol. 11, no. 1, pp. 36–44, 1979. [5] R. Bala, “Iterative technique for refining color correction look-up tables,” United States Patent 5,649,072, 1997. [6] R. Bala and R. V. Klassen, Digital Color Handbook, chapter 11: Efficient Color Transformation Implementation, CRC Press, 2003. [7] M. R. Gupta, R. M. Gray, and R. A. Olshen, “Nonparametric supervised learning by linear interpolation with maximum entropy,” IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), vol. 28, no. 5, pp. 766–781, 2006. [8] F. Chung, Spectral Graph Theory, Number 92 in Regional Conference Series in Mathematics. American Mathematical Society, 1997. [9] T. A. Davis, Direct Methods for Sparse Linear Systems, SIAM, Philadelphia, September 2006. [10] M. R. Gupta, E. K. Garcia, and E. M. Chin, “Adaptive local linear regression with application to printer color management,” IEEE Trans. on Image Processing, vol. 17, no. 6, pp. 936–945, 2008. [11] G. Dubois, “Spatial interpolation comparison 1997: Foreword and introduction,” Special Issue of the Journal of Geographic Information and Descision Analysis, vol. 2, pp. 1–10, 1998. [12] G. Sharma, Digital Color Handbook, chapter 1: Color Fundamentals for Digital Imaging, pp. 1–114, CRC Press, 2003. [13] R. Bala, Digital Color Handbook, chapter 5: Device Characterization, pp. 269–384, CRC Press, 2003. 9
2009
78
3,830
Sharing Features among Dynamical Systems with Beta Processes Emily B. Fox Electrical Engineering & Computer Science, Massachusetts Institute of Technology ebfox@mit.edu Erik B. Sudderth Computer Science, Brown University sudderth@cs.brown.edu Michael I. Jordan Electrical Engineering & Computer Science and Statistics, University of California, Berkeley jordan@cs.berkeley.edu Alan S. Willsky Electrical Engineering & Computer Science, Massachusetts Institute of Technology willsky@mit.edu Abstract We propose a Bayesian nonparametric approach to the problem of modeling related time series. Using a beta process prior, our approach is based on the discovery of a set of latent dynamical behaviors that are shared among multiple time series. The size of the set and the sharing pattern are both inferred from data. We develop an efficient Markov chain Monte Carlo inference method that is based on the Indian buffet process representation of the predictive distribution of the beta process. In particular, our approach uses the sum-product algorithm to efficiently compute Metropolis-Hastings acceptance probabilities, and explores new dynamical behaviors via birth/death proposals. We validate our sampling algorithm using several synthetic datasets, and also demonstrate promising results on unsupervised segmentation of visual motion capture data. 1 Introduction In many applications, one would like to discover and model dynamical behaviors which are shared among several related time series. For example, consider video or motion capture data depicting multiple people performing a number of related tasks. By jointly modeling such sequences, we may more robustly estimate representative dynamic models, and also uncover interesting relationships among activities. We specifically focus on time series where behaviors can be individually modeled via temporally independent or linear dynamical systems, and where transitions between behaviors are approximately Markovian. Examples of such Markov jump processes include the hidden Markov model (HMM), switching vector autoregressive (VAR) process, and switching linear dynamical system (SLDS). These models have proven useful in such diverse fields as speech recognition, econometrics, remote target tracking, and human motion capture. Our approach envisions a large library of behaviors, and each time series or object exhibits a subset of these behaviors. We then seek a framework for discovering the set of dynamic behaviors that each object exhibits. We particularly aim to allow flexibility in the number of total and sequence-specific behaviors, and encourage objects to share similar subsets of the large set of possible behaviors. One can represent the set of behaviors an object exhibits via an associated list of features. A standard featural representation for N objects, with a library of K features, employs an N × K binary matrix F = {fik}. Setting fik = 1 implies that object i exhibits feature k. Our desiderata motivate a Bayesian nonparametric approach based on the beta process [10, 22], allowing for infinitely many 1 potential features. Integrating over the latent beta process induces a predictive distribution on features known as the Indian buffet process (IBP) [9]. Given a feature set sampled from the IBP, our model reduces to a collection of Bayesian HMMs (or SLDS) with partially shared parameters. Other recent approaches to Bayesian nonparametric representations of time series include the HDPHMM [2, 4, 5, 21] and the infinite factorial HMM [24]. These models are quite different from our framework: the HDP-HMM does not select a subset of behaviors for a given time series, but assumes that all time series share the same set of behaviors and switch among them in exactly the same manner. The infinite factorial HMM models a single time-series with emissions dependent on a potentially infinite dimensional feature that evolves with independent Markov dynamics. Our work focuses on modeling multiple time series and on capturing dynamical modes that are shared among the series. Our results are obtained via an efficient and exact Markov chain Monte Carlo (MCMC) inference algorithm. In particular, we exploit the finite dynamical system induced by a fixed set of features to efficiently compute acceptance probabilities, and reversible jump birth and death proposals to explore new features. We validate our sampling algorithm using several synthetic datasets, and also demonstrate promising unsupervised segmentation of data from the CMU motion capture database [23]. 2 Binary Features and Beta Processes The beta process is a completely random measure [12]: draws are discrete with probability one, and realizations on disjoint sets are independent random variables. Consider a probability space Θ, and let B0 denote a finite base measure on Θ with total mass B0(Θ) = α. Assuming B0 is absolutely continuous, we define the following L´evy measure on the product space [0, 1] × Θ: ν(dω, dθ) = cω−1(1 −ω)c−1dωB0(dθ). (1) Here, c > 0 is a concentration parameter; we denote such a beta process by BP(c, B0). A draw B ∼BP(c, B0) is then described by B = ∞ X k=1 ωkδθk, (2) where (ω1, θ1), (ω2, θ2), . . . are the set of atoms in a realization of a nonhomogeneous Poisson process with rate measure ν. If there are atoms in B0, then these are treated separately; see [22]. The beta process is conjugate to a class of Bernoulli processes [22], denoted by BeP(B), which provide our sought-for featural representation. A realization Xi ∼BeP(B), with B an atomic measure, is a collection of unit mass atoms on Θ located at some subset of the atoms in B. In particular, fik ∼Bernoulli(ωk) is sampled independently for each atom θk in Eq. (2), and then Xi = P k fikδθk. In many applications, we interpret the atom locations θk as a shared set of global features. A Bernoulli process realization Xi then determines the subset of features allocated to object i: B | B0, c ∼BP(c, B0) Xi | B ∼BeP(B), i = 1, . . . , N. (3) Because beta process priors are conjugate to the Bernoulli process [22], the posterior distribution given N samples Xi ∼BeP(B) is a beta process with updated parameters: B | X1, . . . , XN, B0, c ∼BP c + N, c c + N B0 + K+ X k=1 mk c + N δθk ! . (4) Here, mk denotes the number of objects Xi which select the kth feature θk. For simplicity, we have reordered the feature indices to list the K+ features used by at least one object first. Computationally, Bernoulli process realizations Xi are often summarized by an infinite vector of binary indicator variables fi = [fi1, fi2, . . .], where fik = 1 if and only if object i exhibits feature k. As shown by Thibaux and Jordan [22], marginalizing over the beta process measure B, and taking c = 1, provides a predictive distribution on indicators known as the Indian buffet process (IBP) Griffiths and Ghahramani [9]. The IBP is a culinary metaphor inspired by the Chinese restaurant process, which is itself the predictive distribution on partitions induced by the Dirichlet process [21]. The Indian buffet consists of an infinitely long buffet line of dishes, or features. The first arriving customer, or object, chooses Poisson(α) dishes. Each subsequent customer i selects a previously tasted dish k with probability mk/i proportional to the number of previous customers mk to sample it, and also samples Poisson(α/i) new dishes. 2 3 Describing Multiple Time Series with Beta Processes Assume we have a set of N objects, each of whose dynamics is described by a switching vector autoregressive (VAR) process, with switches occurring according to a discrete-time Markov process. Such autoregressive HMMs (AR-HMMs) provide a simpler, but often equally effective, alternative to SLDS [17]. Let y(i) t represent the observation vector of the ith object at time t, and z(i) t the latent dynamical mode. Assuming an order r switching VAR process, denoted by VAR(r), we have z(i) t ∼π(i) z(i) t−1 (5) y(i) t = r X j=1 Aj,z(i) t y(i) t−j + e(i) t (z(i) t ) ≜Az(i) t ˜y(i) t + e(i) t (z(i) t ), (6) where e(i) t (k) ∼N(0, Σk), Ak = [A1,k . . . Ar,k], and ˜y(i) t = [y(i)T t−1 . . . y(i)T t−r ]T . The standard HMM with Gaussian emissions arises as a special case of this model when Ak = 0 for all k. We refer to these VAR processes, with parameters θk = {Ak, Σk}, as behaviors, and use a beta process prior to couple the dynamic behaviors exhibited by different objects or sequences. As in Sec. 2, let fi be a vector of binary indicator variables, where fik denotes whether object i exhibits behavior k for some t ∈{1, . . . , Ti}. Given fi, we define a feature-constrained transition distribution π(i) = {π(i) k }, which governs the ith object’s Markov transitions among its set of dynamic behaviors. In particular, motivated by the fact that a Dirichlet-distributed probability mass function can be interpreted as a normalized collection of gamma-distributed random variables, for each object i we define a doubly infinite collection of random variables: η(i) jk | γ, κ ∼Gamma(γ + κδ(j, k), 1), (7) where δ(j, k) indicates the Kronecker delta function. We denote this collection of transition variables by η(i), and use them to define object-specific, feature-constrained transition distributions: π(i) j = h η(i) j1 η(i) j2 . . . i ⊗fi P k|fik=1 η(i) jk . (8) Here, ⊗denotes the element-wise vector product. This construction defines π(i) j over the full set of positive integers, but assigns positive mass only at indices k where fik = 1. The preceding generative process can be equivalently represented via a sample ˜π(i) j from a finite Dirichlet distribution of dimension Ki = P k fik, containing the non-zero entries of π(i) j : ˜π(i) j | fi, γ, κ ∼Dir([γ, . . . , γ, γ + κ, γ, . . . γ]). (9) The κ hyperparameter places extra expected mass on the component of ˜π(i) j corresponding to a selftransition π(i) jj , analogously to the sticky hyperparameter of Fox et al. [4]. We refer to this model, which is summarized in Fig. 1, as the beta process autoregressive HMM (BP-AR-HMM). 4 MCMC Methods for Posterior Inference We have developed an MCMC method which alternates between resampling binary feature assignments given observations and dynamical parameters, and dynamical parameters given observations and features. The sampler interleaves Metropolis-Hastings (MH) and Gibbs sampling updates, which are sometimes simplified by appropriate auxiliary variables. We leverage the fact that fixed feature assignments instantiate a set of finite AR-HMMs, for which dynamic programming can be used to efficiently compute marginal likelihoods. Our novel approach to resampling the potentially infinite set of object-specific features employs incremental “birth” and “death” proposals, improving on previous exact samplers for IBP models with non-conjugate likelihoods. 4.1 Sampling binary feature assignments Let F −ik denote the set of all binary feature indicators excluding fik, and K−i + be the number of behaviors currently instantiated by objects other than i. For notational simplicity, we assume that 3 . . . . . . N ∞ ω θk k z1 (i) z2 (i) z3 (i) zT (i) i y1 (i) y2 (i) y3 (i) yT (i) i z1 fi (i) π γ κ ∞ B0 Figure 1: Graphical model of the BP-AR-HMM. The beta process distributed measure B | B0 ∼BP(1, B0) is represented by its masses ωk and locations θk, as in Eq. (2). The features are then conditionally independent draws fik | ωk ∼Bernoulli(ωk), and are used to define feature-constrained transition distributions π(i) j | fi, γ, κ ∼Dir([γ, . . . , γ, γ + κ, γ, . . . ] ⊗fi). The switching VAR dynamics are as in Eq. (6). these behaviors are indexed by {1, . . ., K−i + }. Given the ith object’s observation sequence y(i) 1:Ti, transition variables η(i) = η(i) 1:K−i + ,1:K−i + , and shared dynamic parameters θ1:K−i + , feature indicators fik for currently used features k ∈{1, . . ., K−i + } have the following posterior distribution: p(fik | F −ik, y(i) 1:Ti, η(i), θ1:K−i + , α) ∝p(fik | F −ik, α)p(y(i) 1:Ti | fi, η(i), θ1:K−i + ). (10) Here, the IBP prior implies that p(fik = 1 | F −ik, α) = m−i k /N, where m−i k denotes the number of objects other than object i that exhibit behavior k. In evaluating this expression, we have exploited the exchangeability of the IBP [9], which follows directly from the beta process construction [22]. For binary random variables, MH proposals can mix faster [6] and have greater statistical efficiency [14] than standard Gibbs samplers. To update fik given F −ik, we thus use the posterior of Eq. (10) to evaluate a MH proposal which flips fik to the complement ¯f of its current value f: fik ∼ρ( ¯f | f)δ(fik, ¯f) + (1 −ρ( ¯f | f))δ(fik, f) ρ( ¯f | f) = min (p(fik = ¯f | F −ik, y(i) 1:Ti, η(i), θ1:K−i + , α) p(fik = f | F −ik, y(i) 1:Ti, η(i), θ1:K−i + , α) , 1 ) . (11) To compute likelihoods, we combine fi and η(i) to construct feature-constrained transition distributions π(i) j as in Eq. (8), and apply the sum-product message passing algorithm [19]. An alternative approach is needed to resample the Poisson(α/N) “unique” features associated only with object i. Let K+ = K−i + +ni, where ni is the number of features unique to object i, and define f−i = fi,1:K−i + and f+i = fi,K−i + +1:K+. The posterior distribution over ni is then given by p(ni | fi, y(i) 1:Ti, η(i), θ1:K−i + , α) ∝( α N )nie−α N ni! ZZ p(y(i) 1:Ti | f−i, f+i = 1, η(i), η+, θ1:K−i + , θ+) dB0(θ+)dH(η+), (12) where H is the gamma prior on transition variables, θ+ = θK−i + +1:K+ are the parameters of unique features, and η+ are transition parameters η(i) jk to or from unique features j, k ∈{K−i + + 1 : K+}. Exact evaluation of this integral is intractable due to dependencies induced by the AR-HMMs. One early approach to approximate Gibbs sampling in non-conjugate IBP models relies on a finite truncation [7]. Meeds et al. [15] instead consider independent Metropolis proposals which replace the existing unique features by n′ i ∼Poisson(α/N) new features, with corresponding parameters θ′ + drawn from the prior. For high-dimensional models like that considered in this paper, however, moves proposing large numbers of unique features have low acceptance rates. Thus, mixing rates are greatly affected by the beta process hyperparameter α. We instead develop a “birth and death” reversible jump MCMC (RJMCMC) sampler [8], which proposes to either add a single new feature, 4 or eliminate one of the existing features in f+i. Some previous work has applied RJMCMC to finite binary feature models [3, 27], but not to the IBP. Our proposal distribution factors as follows: q(f ′ +i, θ′ +, η′ + | f+i, θ+, η+) = qf(f ′ +i | f+i)qθ(θ′ + | f ′ +i, f+i, θ+)qη(η′ + | f ′ +i, f+i, η+). (13) Let ni = P kf+ik. The feature proposal qf(· | ·) encodes the probabilities of birth and death moves: a new feature is created with probability 0.5, and each of the ni existing features is deleted with probability 0.5/ni. For parameters, we define our proposal using the generative model: qθ(θ′ + | f ′ +i, f+i, θ+) =  b0(θ′ +,ni+1) Qni k=1 δθ+k(θ′ +k), birth of feature ni + 1; Q k̸=ℓδθ+k(θ′ +k), death of feature ℓ, (14) where b0 is the density associated with α−1B0. The distribution qη(· | ·) is defined similarly, but using the gamma prior on transition variables of Eq. (7). The MH acceptance probability is then ρ(f ′ +i, θ′ +, η′ + | f+i, θ+, η+) = min{r(f ′ +i, θ′ +, η′ + | f+i, θ+, η+), 1}. (15) Canceling parameter proposals with corresponding prior terms, the acceptance ratio r(· | ·) equals p(y(i) 1:Ti | [f−i f ′ +i], θ1:K−i + , θ′ +, η(i), η′ +) Poisson(n′ i | α/N) qf(f+i | f ′ +i) p(y(i) 1:Ti | [f−i f+i], θ1:K−i + , θ+, η(i), η+) Poisson(ni | α/N) qf(f ′ +i | f+i) , (16) with n′ i = P kf ′ +ik. Because our birth and death proposals do not modify the values of existing parameters, the Jacobian term normally arising in RJMCMC algorithms simply equals one. 4.2 Sampling dynamic parameters and transition variables Posterior updates to transition variables η(i) and shared dynamic parameters θk are greatly simplified if we instantiate the mode sequences z(i) 1:Ti for each object i. We treat these mode sequences as auxiliary variables: they are sampled given the current MCMC state, conditioned on when resampling model parameters, and then discarded for subsequent updates of feature assignments fi. Given feature-constrained transition distributions π(i) and dynamic parameters {θk}, along with the observation sequence y(i) 1:Ti, we jointly sample the mode sequence z(i) 1:Ti by computing backward messages mt+1,t(z(i) t ) ∝p(y(i) t+1:Ti | z(i) t , ˜y(i) t , π(i), {θk}), and then recursively sampling each z(i) t : z(i) t | z(i) t−1, y(i) 1:Ti, π(i), {θk} ∼π(i) z(i) t−1(z(i) t )N y(i) t ; Az(i) t ˜y(i) t , Σz(i) t  mt+1,t(z(i) t ). (17) Because Dirichlet priors are conjugate to multinomial observations z(i) 1:T , the posterior of π(i) j is π(i) j | fi, z(i) 1:T , γ, κ ∼Dir([γ + n(i) j1 , . . . , γ + n(i) jj−1, γ + κ + n(i) jj , γ + n(i) jj+1, . . . ] ⊗fi). (18) Here, n(i) jk are the number of transitions from mode j to k in z(i) 1:T . Since the mode sequence z(i) 1:T is generated from feature-constrained transition distributions, n(i) jk is zero for any k such that fik = 0. Thus, to arrive at the posterior of Eq. (18), we only update η(i) jk for instantiated features: η(i) jk | z(i) 1:T , γ, κ ∼Gamma(γ + κδ(j, k) + n(i) jk , 1), k ∈{ℓ| fiℓ= 1}. (19) We now turn to posterior updates for dynamic parameters. We place a conjugate matrix-normal inverse-Wishart (MNIW) prior [26] on {Ak, Σk}, comprised of an inverse-Wishart prior IW(S0, n0) on Σk and a matrix-normal prior MN (Ak; M, Σk, K) on Ak given Σk. We consider the following sufficient statistics based on the sets Y k = {y(i) t | z(i) t = k} and ˜Y k = {˜y(i) t | z(i) t = k} of observations and lagged observations, respectively, associated with behavior k: S(k) ˜y˜y = X (t,i)|z(i) t =k ˜y(i) t ˜y(i)T t + K S(k) y˜y = X (t,i)|z(i) t =k y(i) t ˜y(i)T t + MK S(k) yy = X (t,i)|z(i) t =k y(i) t y(i)T t + MKM T S(k) y|˜y = S(k) yy −S(k) y˜y S−(k) ˜y˜y S(k)T ˜y˜y . Following Fox et al. [5], the posterior can then be shown to equal Ak | Σk, Y k ∼MN  Ak; S(k) y˜y S−(k) ˜y˜y , Σk, S(k) ˜y˜y  , Σk | Y k ∼IW  S(k) y|˜y + S0, |Y k| + n0  . 5 0 200 400 600 800 1000 −5 0 5 10 15 20 25 Time Observations 2 4 6 8 10 12 14 16 18 20 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 2 4 6 8 10 12 14 16 18 20 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 (a) (b) Figure 2: (a) Observation sequences for each of 5 switching AR(1) time series colored by true mode sequence, and offset for clarity. (b) True feature matrix (top) of the five objects and estimated feature matrix (bottom) averaged over 10,000 MCMC samples taken from 100 trials every 10th sample. White indicates active features. The estimated feature matrices are produced from mode sequences mapped to the ground truth labels according to the minimum Hamming distance metric, and selecting modes with more than 2% of the object’s observations. 4.3 Sampling the beta process and Dirichlet transition hyperparameters We additionally place priors on the Dirichlet hyperparameters γ and κ, as well as the beta process parameter α. Let F = {f i}. As derived in [9], p(F | α) can be expressed as p(F | α) ∝αK+ exp  −α N X n=1 1 n  , (20) where, as before, K+ is the number of unique features activated in F . As in [7], we place a conjugate Gamma(aα, bα) prior on α, which leads to the following posterior distribution: p(α | F , aα, bα) ∝p(F | α)p(α | aα, bα) ∝Gamma  aα + K+, bα + N X n=1 1 n  . (21) Transition hyperparameters are assigned similar priors γ ∼Gamma(aγ, bγ), κ ∼Gamma(aκ, bκ). Because the generative process of Eq. (7) is non-conjugate, we rely on MH steps which iteratively resample γ given κ, and κ given γ. Each sub-step uses a gamma proposal distribution q(· | ·) with fixed variance σ2 γ or σ2 κ, and mean equal to the current hyperparameter value. To update γ given κ, the acceptance probability is min{r(γ′ | γ), 1}, where r(γ′ | γ) is defined to equal p(γ′ | κ, π, F )q(γ | γ′) p(γ | κ, π, F )q(γ′ | γ) = p(π | γ′, κ, F )p(γ′)q(γ | γ′) p(π | γ, κ, F )p(γ)q(γ′ | γ) = f(γ′)Γ(ϑ)e−γ′bγγϑ′−ϑ−aγσ2ϑ γ f(γ)Γ(ϑ′)e−γbγγ′ϑ−ϑ′−aγσ2ϑ′ γ . Here, ϑ = γ2/σ2 γ, ϑ′ = γ′2/σ2 γ, and f(γ) = Q i Γ(γKi+κ)Ki Γ(γ)K2 i −Ki Γ(γ+κ)Ki QKi (j,k)=1 π(i)γ+κδ(k,j)−1 kj . The MH sub-step for resampling κ given γ is similar, but with an appropriately redefined f(κ). 5 Synthetic Experiments To test the ability of BP-AR-HMM to discover shared dynamics, we generated five time series that switched between AR(1) models y(i) t = az(i) t y(i) t−1 + e(i) t (z(i) t ) (22) with ak ∈{−0.8, −0.6, −0.4, −0.2, 0, 0.2, 0.4, 0.6, 0.8} and process noise covariance Σk drawn from an IW(0.5, 3) prior. The object-specific features, shown in Fig. 2(b), were sampled from a truncated IBP [9] using α = 10 and then used to generate the observation sequences of Fig. 2(a). The resulting feature matrix estimated over 10,000 MCMC samples is shown in Fig. 2. Comparing to the true feature matrix, we see that our model is indeed able to discover most of the underlying latent structure of the time series despite the challenging setting defined by the close AR coefficients. One might propose, as an alternative to the BP-AR-HMM, using an architecture based on the hierarchical Dirichlet process of [21]; specifically we could use the HDP-AR-HMMs of [5] tied together with a shared set of transition and dynamic parameters. To demonstrate the difference between these models, we generated data for three switching AR(1) processes. The first two objects, with four times the data points of the third, switched between dynamical modes defined 6 200 400 600 800 0 0.1 0.2 0.3 0.4 0.5 0.6 Iteration Normalized Hamming Distance 200 400 600 800 0 0.1 0.2 0.3 0.4 0.5 0.6 Iteration Normalized Hamming Distance Time 0 1000 2000 Time 0 1000 2000 Time 0 250 500 Time 0 1000 2000 Time 0 1000 2000 Time 0 250 500 (a) (b) (c) (d) Figure 3: (a)-(b) The 10th, 50th, and 90th Hamming distance quantiles for object 3 over 1000 trials for the HDP-AR-HMMs and BP-AR-HMM, respectively. (c)-(d) Examples of typical segmentations into behavior modes for the three objects at Gibbs iteration 1000 for the two models (top = estimate, bottom = truth). −8 −6 −4 −2 0 2 −4−2 0 2 4 6 5 10 15 20 25 30 x z y −15 −10 −5 0 5 10 −5 0 5 5 10 15 20 25 30 x z y −6 −4 −2 0 2 4 −2 0 2 4 6 8 5 10 15 20 25 30 x z y −5 0 5 −5 0 5 5 10 15 20 25 30 x z y −10 −5 0 5 10 −5 0 5 5 10 15 20 25 z x y −10 −5 0 5 −5 0 5 10 15 5 10 15 20 25 z x y −10 −5 0 5 0 2 4 6 0 5 10 15 20 25 x z y −10 −5 0 5 0 2 4 6 0 5 10 15 20 25 x z y −10 −5 0 5 5 10 15 5 10 15 20 25 x z y −10 −5 0 5 −5 0 5 5 10 15 20 25 x z y −10 −5 0 5 −5 0 5 10 5 10 15 20 25 z x y −10 −5 0 5 −5 0 5 10 5 10 15 20 25 30 z x y −10 −5 0 5 −10 −5 0 5 10 15 20 25 z x y −10 −5 0 5 −10 −5 0 5 5 10 15 20 25 30 z x y −15 −10 −5 0 5 −5 0 5 10 5 10 15 20 25 z x y −10 −5 0 5 −5 0 5 10 5 10 15 20 25 z x y −10 −5 0 5 10 −10 −5 0 5 5 10 15 20 25 30 35 z x y −15 −10 −5 0 5 10 −10 −5 0 5 10 15 0 5 10 15 20 25 x z y −15 −10 −5 0 5 10 −2 0 2 4 5 10 15 20 25 30 x z y −15 −10 −5 0 5 10 −4−2 0 2 0 5 10 15 20 25 30 x z y −10 −5 0 5 10 −4−2 0 2 5 10 15 20 25 30 x z y −10 −5 0 5 10 0 5 10 5 10 15 20 25 30 x z y −10 −5 0 5 10 −5 0 5 5 10 15 20 25 30 x z y −10 −5 0 5 10 −2 0 2 4 5 10 15 20 25 30 x z y −10 0 10 −5 0 5 10 5 10 15 20 25 30 x z y −15 −10 −5 0 5 10 0 5 10 5 10 15 20 25 30 x z y −15 −10 −5 0 5 10 0 5 10 5 10 15 20 25 30 x z y −15 −10 −5 0 5 10 0 5 10 5 10 15 20 25 30 x z y −20 −10 0 10 −10 −5 0 5 10 0 5 10 15 20 25 x z y −15 −10 −5 0 5 10 −15 −10 −5 0 5 10 0 5 10 15 20 25 x z y −10 −5 0 5 10 −5 0 5 10 0 5 10 15 20 25 x z y −5 0 5 10 −15 −10 −5 0 5 5 10 15 20 25 x z y −10 −5 0 5 −5 0 5 5 10 15 20 25 30 z x y −5 0 5 10 −10 −5 0 5 5 10 15 20 25 x z y −15 −10 −5 0 5 10 15 −5 0 5 10 15 20 5 10 15 20 25 30 z x y Figure 4: Each skeleton plot displays the trajectory of a learned contiguous segment of more than 2 seconds. To reduce the number of plots, we preprocessed the data to bridge segments separated by fewer than 300 msec. The boxes group segments categorized under the same feature label, with the color indicating the true feature label. Skeleton rendering done by modifications to Neil Lawrence’s Matlab MoCap toolbox [13]. by ak ∈{−0.8, −0.4, 0.8} and the third object used ak ∈{−0.3, 0.8}. The results shown in Fig. 3 indicate that the multiple HDP-AR-HMM model typically describes the third object using ak ∈{−0.4, 0.8} since this assignment better matches the parameters defined by the other (lengthy) time series. These results reiterate that the feature model emphasizes choosing behaviors rather than assuming all objects are performing minor variations of the same dynamics. For the experiments above, we placed a Gamma(1, 1) prior on α and γ, and a Gamma(100, 1) prior on κ. The gamma proposals used σ2 γ = 1 and σ2 κ = 100 while the MNIW prior was given M = 0, K = 0.1 ∗Id, n0 = d + 2, and S0 set to 0.75 times the empirical variance of the joint set of first difference observations. At initialization, each time series was segmented into five contiguous blocks, with feature labels unique to that sequence. 6 Motion Capture Experiments The linear dynamical system is a common model for describing simple human motion [11], and the more complicated SLDS has been successfully applied to the problem of human motion synthesis, classification, and visual tracking [17, 18]. Other approaches develop non-linear dynamical models using Gaussian processes [25] or based on a collection of binary latent features [20]. However, there has been little effort in jointly segmenting and identifying common dynamic behaviors amongst a set of multiple motion capture (MoCap) recordings of people performing various tasks. The BP-ARHMM provides an ideal way of handling this problem. One benefit of the proposed model, versus the standard SLDS, is that it does not rely on manually specifying the set of possible behaviors. 7 2 4 6 8 10 12 14 16 18 20 1 2 3 4 5 6 2 4 6 8 10 12 14 16 18 20 1 2 3 4 5 6 2 4 6 8 10 12 14 16 18 20 1 2 3 4 5 6 2 4 6 8 10 12 14 16 18 20 1 2 3 4 5 6 2 4 6 8 10 12 14 16 18 20 1 2 3 4 5 6 Truth 5 10 15 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Number of Clusters/States Normalized Hamming Distance GMM GMM 1st diff HMM HMM 1st diff BP−AR−HMM HDP−AR−HMM (a) (b) Figure 5: (a) MoCap feature matrices associated with BP-AR-HMM (top-left) and HDP-AR-HMM (top-right) estimated sequences over iterations 15,000 to 20,000, and MAP assignment of the GMM (bottom-left) and HMM (bottom-right) using first-difference observations and 12 clusters/states. (b) Hamming distance versus number of GMM clusters / HMM states on raw observations (blue/green) and first-difference observations (red/cyan), with the BP- and HDP- AR-HMM segmentations (black) and true feature count (magenta) shown for comparison. Results are for the most-likely of 10 EM initializations using Murphy’s HMM Matlab toolbox [16]. As an illustrative example, we examined a set of six CMU MoCap exercise routines [23], three from Subject 13 and three from Subject 14. Each of these routines used some combination of the following motion categories: running in place, jumping jacks, arm circles, side twists, knee raises, squats, punching, up and down, two variants of toe touches, arch over, and a reach out stretch. From the set of 62 position and joint angles, we selected 12 measurements deemed most informative for the gross motor behaviors we wish to capture: one body torso position, two waist angles, one neck angle, one set of right and left (R/L) shoulder angles, the R/L elbow angles, one set of R/L hip angles, and one set of R/L ankle angles. The MoCap data are recorded at 120 fps, and we blockaverage the data using non-overlapping windows of 12 frames. Using these measurements, the prior distributions were set exactly as in the synthetic data experiments except the scale matrix, S0, of the MNIW prior which was set to 5 times the empirical covariance of the first difference observations. This allows more variability in the observed behaviors. We ran 25 chains of the sampler for 20,000 iterations and then examined the chain whose segmentation minimized the expected Hamming distance to the set of segmentations from all chains over iterations 15,000 to 20,000. Future work includes developing split-merge proposals to further improve mixing rates in high dimensions. The resulting MCMC sample is displayed in Fig. 4 and in the supplemental video available online. Although some behaviors are merged or split, the overall performance shows a clear ability to find common motions. The split behaviors shown in green and yellow can be attributed to the two subjects performing the same motion in a distinct manner (e.g., knee raises in combination with upper body motion or not, running with hands in or out of sync with knees, etc.). We compare our performance both to the HDP-AR-HMM and to the Gaussian mixture model (GMM) method of Barbiˇc et al. [1] using EM initialized with k-means. Barbiˇc et al. [1] also present an approach based on probabilistic PCA, but this method focuses primarily on change-point detection rather than behavior clustering. As further comparisons, we look at a GMM on first difference observations, and an HMM on both data sets. The results of Fig. 5(b) demonstrate that the BP-AR-HMM provides more accurate frame labels than any of these alternative approaches over a wide range of mixture model settings. In Fig. 5(a), we additionally see that the BP-AR-HMM provides a superior ability to discover the shared feature structure. 7 Discussion Utilizing the beta process, we developed a coherent Bayesian nonparametric framework for discovering dynamical features common to multiple time series. This formulation allows for objectspecific variability in how the dynamical behaviors are used. We additionally developed a novel exact sampling algorithm for non-conjugate beta process models. The utility of our BP-AR-HMM was demonstrated both on synthetic data, and on a set of MoCap sequences where we showed performance exceeding that of alternative methods. Although we focused on switching VAR processes, our approach could be equally well applied to a wide range of other switching dynamical systems. Acknowledgments This work was supported in part by MURIs funded through AFOSR Grant FA9550-06-1-0324 and ARO Grant W911NF-06-1-0076. 8 References [1] J. Barbiˇc, A. Safonova, J.-Y. Pan, C. Faloutsos, J.K. Hodgins, and N.S. Pollard. Segmenting motion capture data into distinct behaviors. In Proc. Graphics Interface, pages 185–194, 2004. [2] M.J. Beal, Z. Ghahramani, and C.E. Rasmussen. The infinite hidden Markov model. In Advances in Neural Information Processing Systems, volume 14, pages 577–584, 2002. [3] A.C. Courville, N. Daw, G.J. Gordon, and D.S. Touretzky. Model uncertainty in classical conditioning. In Advances in Neural Information Processing Systems, volume 16, pages 977–984, 2004. [4] E.B. Fox, E.B. Sudderth, M.I. Jordan, and A.S. Willsky. An HDP-HMM for systems with state persistence. In Proc. International Conference on Machine Learning, July 2008. [5] E.B. Fox, E.B. Sudderth, M.I. Jordan, and A.S. Willsky. Nonparametric Bayesian learning of switching dynamical systems. In Advances in Neural Information Processing Systems, volume 21, pages 457–464, 2009. [6] A. Frigessi, P. Di Stefano, C.R. Hwang, and S.J. Sheu. Convergence rates of the Gibbs sampler, the Metropolis algorithm and other single-site updating dynamics. Journal of the Royal Statistical Society, Series B, pages 205–219, 1993. [7] D. G¨or¨ur, F. J¨akel, and C.E. Rasmussen. A choice model with infinitely many latent features. In Proc. International Conference on Machine learning, June 2006. [8] P.J. Green. Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732, 1995. [9] T.L. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. Gatsby Computational Neuroscience Unit, Technical Report #2005-001, 2005. [10] N.L. Hjort. Nonparametric Bayes estimators based on beta processes in models for life history data. The Annals of Statistics, pages 1259–1294, 1990. [11] E. Hsu, K. Pulli, and J. Popovi´c. Style translation for human motion. In SIGGRAPH, pages 1082–1089, 2005. [12] J. F. C. Kingman. Completely random measures. Pacific Journal of Mathematics, 21(1):59–78, 1967. [13] N. Lawrence. MATLAB motion capture toolbox. http://www.cs.man.ac.uk/ neill/mocap/. [14] J.S. Liu. Peskun’s theorem and a modified discrete-state Gibbs sampler. Biometrika, 83(3):681–682, 1996. [15] E. Meeds, Z. Ghahramani, R.M. Neal, and S.T. Roweis. Modeling dyadic data with binary latent factors. In Advances in Neural Information Processing Systems, volume 19, pages 977–984, 2007. [16] K.P. Murphy. Hidden Markov model (HMM) toolbox for MATLAB. http://www.cs.ubc.ca/ murphyk/Software/HMM/hmm.html. [17] V. Pavlovi´c, J.M. Rehg, T.J. Cham, and K.P. Murphy. A dynamic Bayesian network approach to figure tracking using learned dynamic models. In Proc. International Conference on Computer Vision, September 1999. [18] V. Pavlovi´c, J.M. Rehg, and J. MacCormick. Learning switching linear models of human motion. In Advances in Neural Information Processing Systems, volume 13, pages 981–987, 2001. [19] L.R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [20] G.W. Taylor, G.E. Hinton, and S.T. Roweis. Modeling human motion using binary latent variables. In Advances in Neural Information Processing Systems, volume 19, pages 1345–1352, 2007. [21] 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. [22] R. Thibaux and M.I. Jordan. Hierarchical beta processes and the Indian buffet process. In Proc. International Conference on Artificial Intelligence and Statistics, volume 11, 2007. [23] Carnegie Mellon University. Graphics lab motion capture database. http://mocap.cs.cmu.edu/. [24] J. Van Gael, Y.W. Teh, and Z. Ghahramani. The infinite factorial hidden Markov model. In Advances in Neural Information Processing Systems, volume 21, pages 1697–1704, 2009. [25] J.M. Wang, D.J. Fleet, and A. Hertzmann. Gaussian process dynamical models for human motion. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(2):283–298, 2008. [26] M. West and J. Harrison. Bayesian Forecasting and Dynamic Models. Springer, 1997. [27] F. Wood, T. L. Griffiths, and Z. Ghahramani. A non-parametric Bayesian method for inferring hidden causes. In Proc. Conference on Uncertainty in Artificial Intelligence, volume 22, 2006. 9
2009
79
3,831
Code-specific policy gradient rules for spiking neurons Henning Sprekeler∗ Guillaume Hennequin Wulfram Gerstner Laboratory for Computational Neuroscience ´Ecole Polytechnique F´ed´erale de Lausanne 1015 Lausanne Abstract Although it is widely believed that reinforcement learning is a suitable tool for describing behavioral learning, the mechanisms by which it can be implemented in networks of spiking neurons are not fully understood. Here, we show that different learning rules emerge from a policy gradient approach depending on which features of the spike trains are assumed to influence the reward signals, i.e., depending on which neural code is in effect. We use the framework of Williams (1992) to derive learning rules for arbitrary neural codes. For illustration, we present policy-gradient rules for three different example codes - a spike count code, a spike timing code and the most general “full spike train” code - and test them on simple model problems. In addition to classical synaptic learning, we derive learning rules for intrinsic parameters that control the excitability of the neuron. The spike count learning rule has structural similarities with established Bienenstock-Cooper-Munro rules. If the distribution of the relevant spike train features belongs to the natural exponential family, the learning rules have a characteristic shape that raises interesting prediction problems. 1 Introduction Neural implementations of reinforcement learning have to solve two basic credit assignment problems: (a) the temporal credit assignment problem, i.e., the question which of the actions that were taken in the past were crucial to receiving a reward later and (b) the spatial credit assignment problem, i.e., the question, which neurons in a population were important for getting the reward and which ones were not. Here, we argue that an additional credit assignment problem arises in implementations of reinforcement learning with spiking neurons. Presume that we know that the spike pattern of one specific neuron within one specific time interval was crucial for getting the reward (that is, we have already solved the first two credit assignment problems). Then, there is still one question that remains: Which feature of the spike pattern was important for the reward? Would any spike train with the same number of spikes yield the same reward or do we need precisely timed spikes to get it? This credit assignment problem is in essence the question which neural code the output neuron is (or should be) using. It becomes particularly important, if we want to change neuronal parameters like synaptic weights in order to maximize the likelihood of getting the reward again in the future. If only the spike count is relevant, it might not be very effective to spend a lot of time and energy on the difficult task of learning precisely timed spikes. The most modest and probably most versatile way of solving this problem is not to make any assumption on the neural code but to assume that all features of the spike train were important. In ∗E-Mail: henning.sprekeler@epfl.ch 1 this case, neuronal parameters are changed such that the likelihood of repeating exactly the same spike train for the same synaptic input is maximized. This approach leads to a learning rule that was derived in a number of recent publications [3, 5, 13]. Here, we show that a whole class of learning rules emerges when prior knowledge about the neural code at hand is available. Using a policy-gradient framework, we derive learning rules for neural parameters like synaptic weights or threshold parameters that maximize the expected reward. Our aims are to (a) develop a systematic framework that allows to derive learning rules for arbitrary neural parameters for different neural codes, (b) provide an intuitive understanding how the resulting learning rules work, (c) derive and test learning rules for specific example codes and (d) to provide a theoretical basis why code-specific learning rules should be superior to general-purpose rules. Finally, we argue that the learning rules contain two types of prediction problems, one related to reward prediction, the other to response prediction. 2 General framework 2.1 Coding features and the policy-gradient approach The basic setup is the following: let there be a set of different input spike trains Xµ to a single postsynaptic neuron, which in response generates stochastic output spike trains Y µ. In the language of partially observable Markov decision processes, the input spike trains are observations that provide information about the state of the animal and the output spike trains are controls that influence the action choice. Depending on both of these spike trains, the system receives a reward. The goal is to adjust a set of parameters θi of the postsynaptic neuron such that it maximizes the expectation value of the reward. Our central assumption is that the reward R does not depend on the full output spike train, but only on a set of coding features Fj(Y ) of the output spike train: R = R(F, X). Which coding features F the reward depends on is in fact a choice of a neural code, because all other features of the spike train are not behaviorally relevant. Note that there is a conceptual difference to the notion of a neural code in sensory processing, where the coding features convey information about input signals, not about the output signal or rewards. The expectation value of the reward is given by ⟨R⟩= P F,X R(F, X)P(F|X, θ)P(X), where P(X) denotes the probability of the presynaptic spike trains and P(F|X, θ) the conditional probability of generating the coding feature F given the input spike train X and the neuronal parameters θ. Note that the only component that explicitly depends on the neural parameters θi is the conditional probability P(F|X, θ). The reward is conditionally independent of the neural parameters θi given the coding feature F. Therefore, if we want to optimize the expected reward by employing a gradient ascent method, we get a learning rule of the form ∂tθi = η X F,X R(F, X)P(X)∂θiP(F|X, θ) (1) = η X F,X P(X)P(F|X, θ)R(F, X)∂θi ln P(F|X, θ) . (2) If we choose a small learning rate η, the average over presynaptic patterns X and coding features F can be replaced by a time average. A corresponding online learning rule therefore results from dropping the average over X and F: ∂tθi = ηR(F, X)∂θi ln P(F|X, θ) . (3) This general form of learning rule is well known in policy-gradient approaches to reinforcement learning [1, 12]. 2.2 Learning rules for exponentially distributed coding features The joint distribution of the coding features Fj can always be factorized into a set of conditional distributions P(F|X) = Q i P(Fi|X; F1, ..., Fi−1). We now make the assumption that the conditional distributions belong to the natural exponential family (NEF): P(Fi|X; F1, ..., Fi−1, θ) = 2 h(Fi) exp(CiFi −A(Ci)), where the Ci are parameters that depend on the input spike train X, the coding features F1, ..., Fi−1 and the neural parameters θi. h(Fi) is a function of Fi and Ai(Ci) is function that is characteristic for the distribution and depends only on the parameters Ci. Note that the NEF is a relatively rich class of distributions, which includes many canonical distributions like the Poisson, Bernoulli and the Gaussian distribution (the latter with fixed variance). Under these assumptions, the learning rule (3) takes a characteristic shape: ∂tθi = ηR(F, X) X j Fj −µj σ2 j ∂θiµj , (4) where µi and σ2 i are the mean and the variance of the conditional distribution P(Fi|X, F1, ..., Fi−1, θ) and therefore also depend on the input X, the coding features F1, ..., Fi−1 and the parameters θ. Note that correlations between the coding features are implicitly accounted for by the dependence of µi and σi on the other features. The summation over different coding features arises from the factorization of the distribution, while the specific shape of the summands relies on the assumption of normal exponential distributions [for a proof, cf. 12]. There is a simple intuition why the learning rule (4) performs gradient ascent on the mean reward. The term Fj −µj fluctuates around zero on a trial-to-trial basis. If these fluctuations are positively correlated with the trial fluctuations of the reward R, i.e., ⟨R(Fj −µj)⟩> 0, higher values of Fj lead to higher reward, so that the mean of the coding feature should be increased. This increase is implemented by the term ∂θiµj, which changes the neural parameter θi such that µj increases. 3 Examples for Coding Features In this section, we illustrate the framework by deriving policy-gradient rules for different neural codes and show that they can solve simple computational tasks. The neuron type we are using is a simple Poisson-type neuron model where the postsynaptic firing rate is given by a nonlinear function ρ(u) of the membrane potential u. The membrane potential u, in turn, is given by the sum of the EPSPs that are evoked by the presynaptic spikes, weighted with the respective synaptic weights: u(t) = X i,f wiϵ(t −tf i ) , =: X i wiPSPi(t) , (5) where tf i denote the time of the f-th spike in the i-th presynaptic neuron. ϵ(t −tf i ) denotes the shape of the postsynaptic potential evoked by a single presynaptic spike at time tf i . For future use, we have introduced PSPi as the postsynaptic potential that would be evoked by the i-th presynaptic spike train alone, if the synaptic weight were unity. The parameters that one could optimize in this neuron model are (a) the synaptic weights and (b) parameters in the dependence of the firing rate ρ on the membrane potential. The first case is the standard case of synaptic plasticity, the second corresponds to a reward-driven version of intrinsic plasticity [cf. 10]. 3.1 Spike Count Codes: Synaptic plasticity Let us first assume that the coding feature is the number N of spikes within a given time window [0, T] and that the reward is delivered at the end of this period. The probability distribution for the spike count is a Poisson distribution P(N) = µN exp(−µ)/N! with a mean µ that is given by the integral of the firing rate ρ over the interval [0, T]: µ = Z T 0 ρ(t′) dt′ . (6) The dependence of the distribution P(N) on the presynaptic spike trains X and the synaptic weights wi is hidden in the mean spike count µ, which naturally depends on those factors through the postsynaptic firing rate ρ. 3 Because the Poisson distribution belongs to the NEF, we can derive a synaptic learning rule by using equation (4) and calculating the particular form of the term ∂wiµ: ∂twi = ηRN −µ µ Z T 0 [∂uρ](t′)PSPi(t′) dt′ . (7) This learning rule has structural similarities with the Bienenstock-Cooper-Munro (BCM) rule [2]: The integral term has the structure of an eligibility trace that is driven by a simple Hebbian learning rule. In addition, learning is modulated by a factor that compares the current spike count (“rate”) with the expected spike count (“sliding threshold” in BCM theory). Interestingly, the functional role of this factor is very different from the one in the original BCM rule: It is not meant to introduce selectivity [2], but rather to exploit trial fluctuations around the mean spike count to explore the structure of the reward landscape. We test the learning rule on a 2-armed bandit task (Figure 1A). An agent has the choice between two actions. Depending on which of two states the agent is in, action a1 or action a2 is rewarded (R = 1), while the other action is punished (R = −1). The state information is encoded in the rate pattern of 100 presynaptic neurons. For each state, a different input pattern is generated by drawing the firing rate of each input neuron independently from an exponential distribution with a mean of 10Hz. In each trial, the input spike trains are generated anew from Poisson processes with these neuron- and state-specific rates. The agent chooses its action stochastically with probabilities that are proportional to the spike counts of two output neurons: p(ak|s) = Nk/(N1 + N2). Because the spike counts depend on the state via the presynaptic firing rates, the agent can choose different actions for different states. Figure 1B and C show that the learning rule learns the task by suppressing activity in the neuron that encodes the punished action. In all simulations throughout the paper, the postsynaptic neurons have an exponential rate function g(u) = exp (γ(u −u0)), where the threshold is u0 = 1. The sharpness parameter γ is set to either γ = 1 (for the 2-armed bandit task) or γ = 3 (for the spike latency task). Moreover, the postsynaptic neurons have a membrane potential reset after each spike (i.e., relative refractoriness), so that the assumption of a Poisson distribution for the spike counts is not necessarily fulfilled. It is worth noting that this did not have an impeding effect on learning performance. 3.2 Spike Count Codes: Intrinsic plasticity Let us now assume that the rate of the neuron is given by a function ρ(u) = g (γ(u −u0)) which depends on the threshold parameters u0 and γ. Typical choices for the function g would be an exponential (as used in the simulations), a sigmoid or a threshold linear function g(x) = ln(1 + exp(x)). By intrinsic plasticity we mean that the parameters u0 and γ are learned instead of or in addition to the synaptic weights. The learning rules for these parameters are essentially the same as for the synaptic weights, only that the derivative of the mean spike count is taken with respect to u0 and γ, respectively: ∂tu0 = η N −µ µ ∂u0µ = −η N −µ µ Z T 0 γg′(γ(u(t) −u0)) dt (8) ∂tγ = η N −µ µ ∂γµ = η N −µ µ Z T 0 g′(γ(u(t) −u0))(u(t) −u0) dt . (9) Here, g′ = ∂xg(x) denotes the derivative of the rate function g with respect to its argument. 3.3 First Spike-Latency Code: Synaptic plasticity As a second coding scheme, let us assume that the reward depends only on the latency ˆt of the first spike after stimulus onset. More precisely, we assume that each trial starts with the onset of the presynaptic spike trains X and that a reward is delivered at the time of the first spike. The reward depends on the latency of that spike, so that certain latencies are favored. 4 Figure 1: Simulations for code-specific learning rules. A 2-armed bandit task: The agent has to choose among two actions a1 and a2. Depending on the state (s1 or s2), a different action is rewarded (thick arrows). The input states are modelled by different firing rate patterns of the input neurons. The probability of choosing the actions is proportional to the spike counts of two output neurons: p(ak| s) = Nk/ (N1 + N2). B Learning curves of the 2-armed bandit. Blue: Spike count learning rule (7), Red: Full spike train rule (16). C Evolution of the spike count in response to the two input states during learning. Both rewards (panel B) and spike counts (panel C) are low-pass filtered with a time constant of 4000 trials. D Learning of first spike latencies with the latency rule (11). Two different output neurons are to learn to fire their first spike at given target latencies L1/ 2. We present one of two fixed input spike train patterns (“stimuli”) to the neurons in randomly interleaved trials. The input spike train for each input neuron is drawn separately for each stimulus by sampling once from a Poisson process with a rate of 10Hz. Reward is given by the negative squared difference between the target latency (stimulus 1: L1 = 10ms, L2 = 30ms, stimulus 2: L1 = 30ms, L2 = 10ms) and the actual latency of the trial, summed over the two neurons. The colored curves show that the first spike latencies of neurons 1 (green, red) and neuron 2 (purple, blue) converge to the target latencies. The black curve (scale on the right axis) shows the evolution of the reward during learning. The probability distribution of the spike latency is given by the product of the firing probability at time ˆt and the probability that the neuron did not fire earlier: P(ˆt) =  (ˆt) exp    ˆt 0  (t ) dt  . (10) Using eq. (3) for this particular distribution, we get the synaptic learning rule:  twi =  R  [ u ](ˆt)PSPi(ˆt)  (ˆt)   ˆt 0 [ u ](t )PSPi(t ) dt  . (11) In Figure 1D, we show that this learning rule can learn to adjust the weights of two neurons such that their first spike latencies approximate a set of target latencies. 3.4 The Full Spike Train Code: Synaptic plasticity Finally, let us consider the most general coding feature, namely, the full spike train. Let us start with a time-discretized version of the spike train with a discretization that is sufficiently narrow to allow at most one spike per time bin. In each time bin [t,t+ t], the number of spikes Yt follows a Bernoulli distribution with spiking probability pt, which depends on the input and on the recent history of the neuron. Because the Bernoulli distribution belongs to the NEF, the associated policy-gradient rule can be derived using equation (4):  twi =  R  t Yt  pt pt(1  pt) wipt . (12) 5 The firing probability pt depends on the instantaneous firing rate ρt: pt = 1−exp(−ρt∆t), yielding: ∂twi = ηR X t Yt −pt pt(1 −pt) [∂ρpt] | {z } =∆t(1−pt) [∂wiρt] (13) = ηR X t (Yt −pt)∂uρt pt PSPi(t)∆t (14) This is the rule that should be used in discretized simulations. In the limit ∆t →0, pt can be approximated by pt →ρ∆t, which leads to the continuous time version of the rule: ∂twi = ηR lim t→0 X t  Yt ∆t −ρt  ∂uρt ρt PSPi(t)∆t (15) = ηR Z (Y (t) −ρ(t))[∂uρ](t) ρ(t) PSPi(t) dt . (16) Here, Y (t) = P ti δ(t−ti) is now a sum of δ-functions. Note that the learning rule (16) was already proposed by Xie and Seung [13] and Florian [3] and, slightly modified for supervised learning, by Pfister et al. [5]. Following the same line, policy gradient rules can also be derived for the intrinsic parameters of the neuron, i.e., its threshold parameters (see also [3]). 4 Why use code-specific rules when more general rules are available? Obviously, the learning rule (16) is the most general in the sense that it considers the whole spike train as a coding feature. All possible other features are therefore captured in this learning rule. The natural question is then: what is the advantage of using rules that are specialized for one specific code? Say, we have a learning rule for two coding features F1 and F2, of which only F1 is correlated with reward. The learning rule for a particular neuronal parameter θ then has the following structure: ∂tθ = ηR(F1) (F1 −µ1) σ2 1 ∂µ1 ∂θ + F2 −µ2 σ2 2 ∂µ2 ∂θ  (17) ≈ η R(µ1) + ∂R ∂F1 µ1 (F1 −µ1) ! F1 −µ1 σ2 1 ∂µ1 ∂θ + F2 −µ2 σ2 2 ∂µ2 ∂θ  (18) = η ∂R ∂F1 µ1 (F1 −µ1)2 σ2 1 ∂µ1 ∂θ + η ∂R ∂F1 µ1 (F1 −µ1)(F2 −µ2) σ2 2 ∂µ2 ∂θ (19) +ηR(µ1)F1 −µ1 σ2 1 ∂µ1 ∂θ + ηR(µ1)F2 −µ2 σ2 2 ∂µ2 ∂θ (20) Of the four terms in lines (19-20), only the first term has non-vanishing mean when taking the trial average. The other terms are simply noise and therefore more hindrance than help when trying to maximize the reward. When using the full learning rule for both features, the learning rate needs to be decreased until an agreeable signal-to-noise ratio between the drift introduced by the first term and the diffusion caused by the other terms is reached. Therefore, it is desirable for faster learning to reduce the effects of these noise terms. This can be done in two ways: • The terms in eq. (20) can be reduced by reducing R(µ1). This can be achieved by subtracting a suitable reward baseline from the current reward. Ideally, this should be done in a stimulus-specific way (because µ1 depends on the stimulus), which leads to the notion of a reward prediction error instead of a pure reward signal. This approach is in line with both standard reinforcement learning theory [4] and the proposal that neuromodulatory signals like dopamine represent reward prediction error instead of reward alone. 6 • The term in eq. (20) can be removed by skipping those terms in the original learning that are related to coding feature F2. This corresponds to using the learning rule for those features that are in fact correlated with reward while suppressing those that are not correlated with reward. The central argument for using code-specific learning rules is therefore the signalto-noise ratio. In extreme cases, where a very general rule is used for a very specific task, a very large number of coding dimensions may merely give rise to noise in the learning dynamics, while only one is relevant and causes systematic changes. These considerations suggest that the spike count rule (7) should outperform the full spike train rule (16) in tasks where the reward is based purely on spike count. Unfortunately, we could not yet substantiate this claim in simulations. As seen in Figure 1B, the performance of the two rules is very similar in the 2-armed bandit task. This might be due to a noise bottleneck effect: there are several sources of noise in the learning process, the strongest of which limits the performance. Unless the “code-specific noise” is dominant, code-specific learning rules will have about the same performance as general purpose rules. 5 Inherent Prediction Problems As shown in section 4, the policy-gradient rule with a reduced amount of noise in the gradient estimate is one that takes only the relevant coding features into account and subtracts the trial mean of the reward: ∂tθ = η(R −R(µ1, µ2, ...)) X j Fj −µj σ2 j ∂θµj (21) This learning rule has a conceptually interesting structure: Learning takes place only when two conditions are fulfilled: the animal did something unexpected (Fj −µi) and receives an unexpected reward (R −R(µ1, µ2, ...)). Moreover, it raises two interesting prediction problems: (a) the prediction of the trial average µj of the coding feature conditioned on the stimulus and (b) the reward that is expected if the coding feature takes its mean value. 5.1 Prediction of the coding feature In the cases where we could derive the learning rule analytically, the trial average of the coding feature could be calculated from intrinsic properties of the neuron like its membrane potential. Unfortunately, it is not clear a priori that the information necessary for calculating this mean is always available. This should be particularly problematic when trying to extend the framework to coding features of populations, where the population would need to know, e.g., membrane properties of its members. An interesting alternative is that the trial mean is calculated by a prediction system, e.g., by topdown signals that use prior information or an internal world model to predict the expected value of the coding feature. Learning would in this case be modulated by the mismatch of a top-down prediction of the coding feature - represented by µj(X) - and the real value of Fj, which is calculated by a “bottom-up” approach. This interpretation bears interesting parallels to certain approaches in sensory coding, where the interpretation of sensory information is based on a comparison of the sensory input with an internally generated prediction from a generative model [cf. 6]. There is also some experimental evidence for neural stimulus prediction even in comparably low-level systems as the retina [e.g. 8]. Another prediction system for the expected response could be a population coding scheme, in which a population of neurons is receiving the same input and should produce the same output. Any neuron of the population could receive the average population activity as a prediction of its own mean response. It would be interesting to study the relation of such an approach with the one recently proposed for reinforcement learning in populations of spiking neurons [11]. 5.2 Reward prediction The other quantity that should be predicted in the learning rule is the reward one would get when the coding feature would take the value of its mean. If the distribution of the coding feature is 7 sufficiently narrow so that in the range F takes for a given stimulus, the reward can be approximated by a linear function, the reward R(µ) at the mean is simply the expectation value of the reward given the stimulus: R(µ) ≈⟨R(F)⟩F |X (22) The relevant quantity for learning is therefore a reward prediction error R(F) −⟨R(F)⟩F |X. In classical reinforcement learning, this term is often calculated in an actor-critic architecture, where some external module - the critic - learns the expected future reward either for states alone or for state-action pairs. These values are then used to calculate the expected reward for the current state or state-action pair. The difference between the reward that was really received and the predicted reward is then used as a reward prediction error that drives learning. There is evidence that dopamine signals in the brain encode prediction error rather than reward alone [7]. 6 Discussion We have presented a general framework for deriving policy-gradient rules for spiking neurons and shown that different learning rules emerge depending on which features of the spike trains are assumed to influence the reward signals. Theoretical arguments suggest that code-specific learning rules should be superior to more general rules, because the noise in the estimate of the gradient should be smaller. More simulations will be necessary to check if this is indeed the case and in which applications code-specific learning rules are advantageous. For exponentially distributed coding features, the learning rule has a characteristic structure, which allows a simple intuitive interpretation. Moreover, this structure raises two prediction problems, which may provide links to other concepts: (a) the notion of using a reward prediction error to reduce the variance in the estimate of the gradient creates a link to actor-critic architectures [9] and (b) the notion of coding feature prediction is reminiscent of combined top-down–bottom-up approaches, where sensory learning is driven by the mismatch of internal predictions and the sensory signal [6]. The fact that there is a whole class of code-specific policy-gradient learning rules opens the interesting possibility that neuronal learning rules could be controlled by metalearning processes that shape the learning rule according to what neural code is in effect. From the biological perspective, it would be interesting to compare spike-based synaptic plasticity in different brain regions that are thought to use different neural codes and see if there are systematic differences. References [1] Baxter, J. and Bartlett, P. (2001). Infinite-horizon policy-gradient estimation. Journal of Artificial Intelligence Research, 15(4):319–350. [2] Bienenstock, E., Cooper, L., and Munroe, P. (1982). Theory of the development of neuron selectivity: orientation specificity and binocular interaction in visual cortex. Journal of Neuroscience, 2:32–48. reprinted in Anderson and Rosenfeld, 1990. [3] Florian, R. V. (2007). Reinforcement learning through modulation of spike-timing-dependent synaptic plasticity. Neural Computation, 19:1468–1502. [4] Greensmith, E., Bartlett, P., and Baxter, J. (2004). Variance reduction techniques for gradient estimates in reinforcement learning. The Journal of Machine Learning Research, 5:1471–1530. [5] Pfister, J.-P., Toyoizumi, T., Barber, D., and Gerstner, W. (2006). Optimal spike-timing dependent plasticity for precise action potential firing in supervised learning. Neural Computation, 18:1309–1339. [6] Rao, R. P. and Ballard, D. H. (1999). Predictive coding in the visual cortex: A functional interpretation of some extra-classical receptive-field effects. Nature Neuroscience, 2(1):79–87. [7] Schultz, W., Dayan, P., and Montague, R. (1997). A neural substrate for prediction and reward. Science, 275:1593–1599. [8] Schwartz, G., Harris, R., Shrom, D., and II, M. (2007). Detection and prediction of periodic patterns by the retina. Nature Neuroscience, 10:552–554. [9] Sutton, R. and Barto, A. (1998). Reinforcement learning. MIT Press, Cambridge. [10] Triesch, J. (2007). Synergies between intrinsic and synaptic plasticity mechanisms. Neural computation, 19:885 –909. 8 [11] Urbanczik, R. and Senn, W. (2009). Reinforcement learning in populations of spiking neurons. Nat Neurosci, 12(3):250–252. [12] Williams, R. (1992). Simple statistical gradient-following methods for connectionist reinforcement learning. Machine Learning, 8:229–256. [13] Xie, X. and Seung, H. (2004). Learning in neural networks by reinforcement of irregular spiking. Physical Review E, 69(4):41909. 9
2009
8
3,832
The Wisdom of Crowds in the Recollection of Order Information Mark Steyvers, Michael Lee, Brent Miller, Pernille Hemmer Department of Cognitive Sciences University of California Irvine mark.steyvers@uci.edu Abstract When individuals independently recollect events or retrieve facts from memory, how can we aggregate these retrieved memories to reconstruct the actual set of events or facts? In this research, we report the performance of individuals in a series of general knowledge tasks, where the goal is to reconstruct from memory the order of historic events, or the order of items along some physical dimension. We introduce two Bayesian models for aggregating order information based on a Thurstonian approach and Mallows model. Both models assume that each individual's reconstruction is based on either a random permutation of the unobserved ground truth, or by a pure guessing strategy. We apply MCMC to make inferences about the underlying truth and the strategies employed by individuals. The models demonstrate a "wisdom of crowds " effect, where the aggregated orderings are closer to the true ordering than the orderings of the best individual. 1 Introduction Many demonstrations have shown that aggregating the judgments of a number of individuals results in an estimate that is close to the true answer, a phenomenon that has come to be known as the “wisdom of crowds” [1]. This was demonstrated by Galton, who showed that the estimated weight of an ox, when averaged across individuals, closely approximated the true weight [2]. Similarly, on the game show Who Wants to be a Millionaire, contestants are given the opportunity to ask all members of the audience to answer multiple choice questions. Over several seasons of the show, the modal response of the audience corresponded to the correct answer 91% of the time. More sophisticated aggregation approaches have been developed for multiple choice tasks, such as Cultural Consensus Theory, that additionally take differences across individuals and items into account [3]. The wisdom of crowds idea is currently used in several real-world applications, such as prediction markets [4], spam filtering, and the prediction of consumer preferences through collaborative filtering. Recently, it was shown that a form of the wisdom of crowds phenomenon also occurs within a single person [5]. Averaging multiple guesses from one person provides better estimates than the individual guesses. We are interested in applying this wisdom of crowds phenomenon to human memory involving situations where individuals have to retrieve information more complex than single numerical estimates or answers to multiple choice questions. We will focus here on memory for order information. For example, we test individuals on their ability to reconstruct from memory the order of historic events (e.g., the order of US presidents), or the magnitude along some physical dimension (e.g., the order of largest US cities). We then develop computational models that infer distributions over orderings to explain the observed orderings across individuals. The goal is to demonstrate a wisdom of crowds effects where the inferred orderings are closer to the actual ordering than the orderings produced by the majority of individuals. Aggregating rank order data is not a new problem. In social choice theory, a number of systems have been developed for aggregating rank order preferences for groups (Marden, 1995). Preferential voting systems, where voters explicitly rank order their candidate preferences, are designed to pick one or several candidates out of a field of many. These systems, such as the Borda count, perform well in aggregating the individuals' rank order data, but with an inherent bias towards determining the top members of the list. However, as voting is a means for expressing individual preferences, there is no ground truth. The goal for these systems is to determine an aggregate of preferences that is in some sense “fair” to all members of the group. The rank aggregation problem has also been studied in machine learning and information retrieval [6,7]. For example, if one is presented with a ranked list of webpages from several search engines, how can these be combined to create a single ranking that is more accurate and less sensitive to spam? Relatively little research has been done on the rank order aggregation problem with the goal of approximating a known ground truth. In follow-ups to Galton's work, some experiments were performed testing the ability of individuals to rank-order magnitudes in psychophysical experiments [8]. Also, an informal aggregation model for rank order data was developed for the Cultural Consensus Theory, using factor analysis of the covariance structure of rank order judgments [3]. This was used to (partially) recover the order of causes of death in the US on the basis of the individual orderings. We present empirical and theoretical research on the wisdom of crowds phenomenon for rank order aggregation. No communication between people is allowed for these tasks, and therefore the aggregation method operates on the data produced by independent decisionmakers. Importantly, for all of the problems there is a known ground truth. We compare several heuristic computational approaches―based on voting theory and existing models of social choice―that analyze the individual judgments and provide a single answer as output, which can be compared to the ground truth. We refer to these synthesized answers as “group” answers because they capture the collective wisdom of the group, even though no communication between group members occurred. We also apply probabilistic models based on a Thurstonian approach and Mallows model. The Thurstonian model represents the group knowledge about items as distributions on an interval dimension [9]. Mallows model is a distance-based model that represents the group answer as a modal ordering of items, and assumes each individual to have orderings that are more or less close to the modal ordering [10]. Although Thurstonian and Mallows type of models have often been used to analyze preference rankings [11], they have not been applied, as far as we are aware, to ordering problems where there is a ground truth. We also present extensions of these models that allow for the possibility of different response strategies―some individuals might be purely guessing because they have no knowledge of the problem and others might have partial knowledge of the ground truth. We develop efficient MCMC algorithms to infer the latent group orderings and assignments of individuals to response strategies. The advantage of MCMC estimation procedure is that it gives a probability distribution over group orderings, and we can therefore assess the likelihood of any particular group ordering. 2 Expe rime nt 2.1 Method Participants were 78 undergraduate students at the University of California, Irvine. The experiment was composed of 17 questions involving general knowledge regarding: population statistics (4 questions), geography (3 questions), dates, such as release dates for movies and books (7 questions), U.S. Presidents, material hardness, the 10 Commandments, and the first 10 Amendments of the U.S. Constitution. An interactive interface was presented on a computer screen. Participants were instructed to order the presented items (e.g., “Order these books by their first release date, earliest to most recent”), and responded by dragging the individual items on the screen to the desired location in the ordering. The initial ordering of the 10 items within a question was randomized across all questions and all participants. 2.2 Results To evaluate the performance of participants as well as models, we measured the distance between the reconstructed and the correct ordering. A commonly used distance metric for orderings is Kendall’s τ. This distance metric counts the number of adjacent pairwise disagreements between orderings. Values of τ range from: 0 ≤ τ ≤ 𝑁(𝑁−1)/2, where N is the number of items in the order (10 for all of our questions). A value of zero means the ordering is exactly right, and a value of one means that the ordering is correct except for two neighboring items being transposed, and so on up to the maximum possible value of 45. Table 1 shows all unique orderings, by column, that were produced for two problems: arranging U.S. States by east-west location, and sorting U.S. Presidents by the time they served in office. The correct ordering is shown on the right. The columns are sorted by Kendall's τ distance. The first and second number below each ordering correspond to Kendall's τ distance and the number of participants who produced the ordering respectively. These two examples show that only a small number of participants reproduced the correct ordering (in fact, for 11 out of 17 problems, no participant gave the correct answer). It also shows that very few orderings are produced by multiple participants. For 8 out of 17 problems, each participant produced a unique ordering. To summarize the results across participants, the column labeled PC in Table 2 shows the proportion of individuals who got the ordering exactly right for each of the ordering task questions. On average, about one percent of participants recreated the correct rank ordering perfectly. The column τ, shows the mean τ values over the population of participants for each of the 17 sorting task questions. As this is a prior knowledge task, it is interesting to note the best performance overall was achieved on the Presidents, States from west to east, Oscar movies, and Movie release dates tasks. These four questions relate to educational and cultural knowledge that seems most likely to be shared by our undergraduate subjects. Finally, an important summary statistic is the performance of the best individual. Instead of picking the best individual separately for each problem, we find the individual who scores best across all problems. Table 2, bottom row, shows that this individual has on average a τ distance of 7.8. To demonstrate the wisdom of crowds effect, we have to show that the synthesized group ordering outperforms the ordering, on average, of this best individual. 3 Mode ling We evaluated a number of aggregation models on their ability to reconstruct the ground truth based on the group ordering inferred from individual orderings. First, we evaluate two heuristic methods from social choice theory based on the mode and Borda counts. One drawback of such heuristic aggregation models is that they create no explicit representation of each individual's working knowledge. Therefore, even though such methods can aggregate Table 1: Unique orderings for each individual for the states and presidents ordering problems A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A B B A A A B A A B A A A A A D A B A B E A D C B E C I J J H A = Oregon B B B B B B B B B B B B B B B B B B B B B B C E B B B B B B B B B B B B B B C F A C B B G A B B A B B F B F F B A C A F H E I J H B E G G J B = Utah C C C C C C C C D D C C C C C C C D D C D D B B C D D D E C C D D F F C C F B B C D C C C C C D F D E C F E B D E G E C C I G H G I A B I I C = Nebraska D D D E D D E E C C D D D D E F F C F E C C D C G F F F F D E C H C D D H C F D E A H I B F H C C H I B J C C I I F I G E H A C B G H H D G D = Iowa E E F D E F D F E F E E E F F D D F C F F H E D F C E E D F D H C D C H F E D C H F F F D J I H H I D I D D E F F B H A D A D I J H G I H E E = Alabama F F E F F E F D F E F G H E D E E E E G E E F F D H C C C H G F E E E I E D I E D H D E F D D F D C F D C B A E H J C D F B F A A J D F E F F = Ohio G G G G H G G G H G I H F I G G H H G D H F H G E E G H G I J E F I H F D I E H I E I D E E F I I F C E E I G C C D D B J F H D F F F E C D G = Virginia H I H H I I I H G H H I G G I I G G H I I G I I H G I G H G F I I H I E G H H I F G E G I G E J E E H H H G I J D H J H I C E F D D C A B C H = Delaware I H I I G H H I I I G F J H H H I I I H G I J H I I H I I E I G G G G G I G G G G J G H H H G E G G G G G H H H G I F I B G B E C E B C F B I = Connecticut J J J J J J J J J J J J I J J J J J J J J J G J J J J J J J H J J J J J J J J J J I J J J I J G J J J J I J J G J E G J G J J G I A J D A A J = Maine 0 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 9 9 9 10 10 10 11 11 11 12 13 14 14 14 16 18 20 22 24 26 26 33 37 42 2 1 5 1 1 1 1 1 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A C A H A = George Washington B B B B C B B B C B B B C B B B B B B B B B B B B B C C D B B B B C C C C B B C E E F B B B C C C B C C C E B C H B B B C B C C E E C E G J C B = John Adams C C C C B C C C B C C C B C C C C D D C C C C C C E B B C C C C D B B B E C D B C D C C C C B D E C B B F B I B B C D G F C E F D C F G J G D C = Thomas Jefferson D D D E D D E E D D E E E D D E E C E D E E E E E C D D B D E E C E E E B E C E B B D E E J F B B E F F E C G E E G J C E H B H I B B D A I I D = James Monroe E E E D E E D D E E D D D E E D D E C I D D D D F D E E E E D G E D G I G G J G F C B D D D D E D I E G D F C J C J E F B J I E G J J C E D J E = Andrew Jackson F F G F F F F G F F F G F F H F G F F E F F H I D I G H F J J D J F D D D H E H D G G H J F G I J H J H B H E G D D G I J I F D B I H J B C E F = Theodore Roosevelt G G F G G H H F G G G F G J G H F I I G J J G G J G I F I I G I F I I G I F G D I F H J H G J J G F H E I I D H J I C H G D J G C D I F I H G G = Woodrow Wilson H H H H H G G H H J I I H G F I J G G F H I J H G F J J H F F J I J F F F I F J H J E I I E I G F G D J H G F D F H I J I E H J H G E I D B F H = Franklin D. Roosevelt I J I I I J I I J I J H J I J J H J H J I G F F I H F I G G I F G H J H H J I F G H I G F I E F I D G D G J H I I E H D D G G B F H G H F F A I = Harry S. Truman J I J J J I J J I H H J I H I G I H J H G H I J H J H G J H H H H G H J J D H I J I J F G H H H H J I I J D J F G F F E H F D I J F D B H E B J = Dwight D. Eisenhower 0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 4 4 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 11 12 12 13 13 13 13 14 14 14 14 15 17 18 19 26 28 5 1 2 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 the individual pieces of knowledge across individuals, they cannot explain why individuals rank the items in a particular way. To address this potential weakness, we develop two simple probabilistic models based on the Thurstonian approach [9] and Mallows model [10]. 3.1 Heuristic Models We tested two heuristic aggregation models. In the simplest heuristic, based on the mode, the group answer is based on the most frequently occurring sequence of all observed sequences. In cases where several different sequences correspond to the mode, a randomly chosen modal sequence was picked. The second method uses the Borda count method, a widely used technique from voting theory. In the Borda count method, weighted counts are assigned such that the first choice “candidate” receives a count of N (where N is the number of candidates), the second choice candidate receives a count of N-1, and so on. These counts are summed across candidates and the candidate with the highest count is considered the “most preferred”. Here, we use the Borda count to create an ordering over all items by ordering the Borda counts. Table 2 reports the performance of all of the aggregation models. For each, we checked whether the inferred group order is correct (C) and measured Kendall's τ. We also report in the rank column the percentage of participants who perform worse or the same as the group answer, as measured by τ. With the rank statistic, we can verify the wisdom of crowds effect. In an ideal model, the aggregate answer should be as good as or better than all of the individuals in the group. Table 1 shows the results separately for each problem, and averaged across all the problems. These results show that the mode heuristic leads to the worst performance overall in rank. On average, the mode is as good or better of an estimate than 68% of participants. This means that 32% of participants came up with better solutions individually. This is not surprising, since, with an ordering of 10 items, it is possible that only a few participants will agree on the ordering of items. The difficulty in inferring the mode makes it an unreliable method for constructing a group answer. This problem will be exacerbated for orderings involving more than 10 items, as the number of possible orderings grows combinatorially. The Borda count method performs relatively well in terms of Kendall's τ and overall rank performance. On average, these methods perform with ranks of 85%, indicating that the group answers from these methods score amongst the best individuals . On average, the Borda count has an average distance of 7.47, which outperforms the best individual over all problems. Table 2: Performance of the four models and human participants Problem PC τ C τ Rank C τ Rank C τ Rank C τ Rank books .000 12.3 0 5 91 0 5 91 0 7 82 0 12 40 city population europe .000 16.9 0 11 81 0 12 77 0 11 81 0 17 42 city population us .000 15.9 0 7 96 0 7 96 0 12 67 0 16 45 city population world .000 19.3 0 16 73 0 16 73 0 15 77 0 19 44 country landmass .000 10.9 0 5 95 0 5 95 0 5 95 0 7 76 country population .000 14.6 0 12 74 0 11 82 0 11 82 0 15 53 hardness .000 15.3 0 14 64 0 14 64 0 11 91 0 15 46 holidays .051 8.9 0 4 78 0 5 77 0 4 78 1 0 100 movies releasedate .013 7.3 0 2 95 0 2 95 0 2 95 0 2 95 oscar bestmovies .013 11.2 0 4 90 0 4 90 0 3 97 0 3 97 oscar movies .000 11.9 0 1 100 0 1 100 0 2 96 0 2 96 presidents .064 7.5 0 2 87 0 1 94 0 3 79 1 0 100 rivers .000 16.1 0 13 77 0 14 67 0 11 91 0 16 42 states westeast .026 8.2 0 2 88 0 2 88 0 3 78 0 1 97 superbowl .000 18.6 0 16 65 0 15 71 0 10 96 0 19 40 ten amendments .013 14.0 0 2 97 0 3 96 0 5 90 0 4 95 ten commandments .000 16.8 0 8 90 0 7 91 0 12 74 0 17 51 AVERAGE .011 13.3 .00 7.29 84.8 .00 7.29 85.1 .00 7.47 85.3 .12 9.67 68.2 BEST INDIVIDUAL 0 7.8 Mallows Model Borda Counts Mode Thurstonian Model Humans 3.2 A Thurstoni an Model In the Thurstonian approach, the overall item knowledge for the group is represented explicitly as a set of coordinates on an interval dimension. The interval representation is justifiable, at least for some of the problems in our study that involve one-dimensional concepts, such as the relative timing of events, or the lengths of items. We will introduce an extension of the Thurstonian approach where the orderings of some of the individuals are drawn from a Thurstonian model and others are drawn are based on a guessing process with no relation to the underlying interval representation. To introduce the basic Thurstonian approach, let N be the number of items in the ordering task and M the number of individuals ordering the items. Each item is represented as a value 𝜇𝑖 along this dimension, where 𝑖 ϵ 1,… ,𝑁 . Each individual is assumed to have access to this group-level information. However, individuals might not have precise knowledge about the exact location of each item. We model each individual's location of the item by a single sample from a Normal distribution, centered on the item’s group location. Specifically, in our model, when determining the order of items, a person 𝑗 ϵ 1,…,𝑀 samples a value from each item 𝑖, 𝑥𝑖𝑗 ~ N 𝜇𝑖,𝜎𝑖 . The standard deviation 𝜎𝑖 captures the uncertainty that individuals have about item 𝑖 and the samples 𝑥𝑖𝑗 represent the mental representation for the individual. The ordering for each individual is then based on the ordering of their samples. Let 𝒚𝑗 be the observed ordering of the items for individual j so that 𝒚𝑗= (𝑖1,𝑖2,…,𝑖𝑁) if and only if 𝑥𝑖1𝑗< 𝑥𝑖2𝑗< ⋯< 𝑥𝑖𝑁𝑗. Figure 1 (left panel) shows an example of this basic Thurstonian model with group-level information for three items, A, B, and C and two individuals. In the illustration, there is a larger degree of overlap between the representations for B and C making it likely that items B and C are transposed (as illustrated for the second individual). We extend this basic Thurstonian model by incorporating a guessing component. We found this to be a necessary extension because some individuals in the ordering tasks actually were Figure 1. Illustration of the extended Thurstonian Model with a guessing component A B C A B C y1 : A < B < C A C B x1 x2 y2 : A < C < B C B A C A B x3 x4 Thurstonian model (z = 1) Guessing model (z = 0) y3 : C < B < A y4 : C < A < B Figure 2. Graphical model of the extended Thurstonian Model (a) and Mallows model (b) j=1,…,M jx jy jz 0  0  j=1,…,M j y jz μ σ ω  (a) (b) not familiar with any of the items in the ordering tasks (such as the Ten Commandments or ten amendents). In the extended Thurstonian model, the ordering of such cases are assumed to originate from a single distribution, 𝑥𝑖𝑗 ~ N 𝜇0, 𝜎0 , where no distinction is made between the different items―all samples come from the same distribution with parameters 𝜇0, 𝜎0. Therefore, the orderings produced by the individuals under this model are completely random. For example, Figure 1, right panel shows two orderings produced from this guessing model. We associate a latent state 𝑧𝑗 with each individual that determines whether the ordering from each individual is produced by the guessing model or the Thurstonian model: 𝑥𝑖𝑗 | 𝜇𝑖, 𝜎𝑖, 𝜇0, 𝜎0 ~ N 𝜇𝑖, 𝜎𝑖 𝑧𝑗= 1 N 𝜇0, 𝜎0 𝑧𝑗= 0. (1) To complete the model, we placed a standard prior on all normal distributions, 𝑝 𝜇,𝜎 ∝ 1 𝜎2 . Figure 2a shows the graphical model for the Thurstonian model. Although the model looks straightforward as a hierarchical model, inference in this model has proven to be difficult because the observed variable 𝒚𝑗 is a deterministic ranking function (indicated by the double bordered circle) of the underlying latent variable 𝒙𝑗. The basic Thurstonian model was introduced by Thurstone in 1927, but only recently have MCMC methods been developed for estimation [12]. We developed a simplified MCMC procedure as described in the supplementary materials that allows for efficient estimation of the underlying true ordering, as well as the assignment of individuals to response strategies. The results of the extended Thurstonian model are shown in Table 2. The model performs approximately as well as the Borda count method. The model does not recover the exact answer for any of the 17 problems, based on the knowledge provided by the 78 participants. It is possible that a larger sample size is needed in order to achieve perfect reconstructions of the ground truth. However, the model, on average, has an distance of 7.29 from the actual truth, which is better than the best individual over all problems. One advantage of the probabilistic approach is that it gives insight into the difficulty of the task and the response strategies of individuals. For some problems, such as the Ten Commandments, 32% of individuals were assigned to the guessing strategy (𝑧𝑗= 0). For other problems, such as the US Presidents, only 16% of individuals were assigned to the guessing strategy, indicating that knowledge about this domain was more widely distributed in our group of individuals. Therefore, the extension of the Thurstonian model can eliminate individuals who are purely guessing the answers. An advantage of the representation underlying the Thurstonian model is that it allows a visualization of group knowledge not only in terms of the order of items, but also in terms of the uncertainty associated with each item on the interval scale. Figure 3 shows the inferred distributions for four problems where the model performed relatively well. The crosses correspond to the mean of 𝜇𝑖 across all samples, and the error bars represent the standard Figure 3. Sample Thurstonian inferred distributions. The vertical order is the ground truth ordering, while the numbers in parentheses show the inferred group ordering First Last George Washington (1) John Adams (2) Thomas Jefferson (3) James Monroe (5) Andrew Jackson (4) Theodore Roosevelt (6) Woodrow Wilson (7) Franklin D. Roosevelt (9) Harry S. Truman (8) Dwight D. Eisenhower (10) Presidents Largest Smallest Russia (1) Canada (4) China (2) United States (3) Brazil (7) Australia (5) India (6) Argentina (8) Kazakhstan (10) Sudan (9) Country Landmass Freedom of speech & religion (1) Right to bear arms (2) No quartering of soldiers (4) No unreasonable searches (3) Due process (5) Trial by Jury (6) Civil Trial by Jury (7) No cruel punishment (8) Right to non-specified rights (10) Power for the States & People (9) Ten Amendments deviations 𝜎𝑖 based on a geometric average across all samples. These visualizations are intuitive, and show how some items are confused with others in the group population. For instance, nearly all participants were able to identify Maine as the easternmost state in our list, but many confused the central states. Likewise, there was a large agreement on the proper placement of "the right to bear arms" in the amendments question ― this amendment is often popularly referred to as “The Second Amendment”. 3.3 Mallows Model One drawback of the Thurstonian model is that it gives an analog representation for each item, which might be inappropriate for some problems. For example, it seems psychologically implausible that the ten amendments or Ten Commandments are mentally represented as coordinates on an interval scale. Therefore, we also applied probabilistic models where the group answer is based on a pure rank ordering. One such a model is Mallows model [7, 9, 10], a distance-based model that assumes that observed orderings that are close to the group ordering are more likely than those far away. One instantiation of Mallows model is based on Kendall's distance to measure the number of pairwise permutations between the group order and the individual order. Specifically, the probability of any observed order 𝒚, given the group order 𝝎 is: 𝑝 𝒚|𝝎,𝜃 = 1 Ψ 𝜃 𝑒−𝜃𝑑 𝒚,𝝎 (2) where 𝑑 is the Kendall's distance. The scaling parameter 𝜃 determines how close the observed orders are to the group ordering. As described by [7], the normalization function Ψ 𝜃 does not depend on 𝜔 and can be calculated efficiently by: Ψ 𝜃 = 1−𝑒−𝑖𝜃 1−𝑒−𝜃 𝑁 𝑖=1 . (3) The model as stated in the Eqs. (2) and (3) describe that standard Mallows model that has often been used to model preference ranking data. We now introduce a simple variant of this model that allows for contaminants. The idea is that some of the individuals orderings do not originate at all from some common group knowledge, and instead are based on a guessing process. The extended model introduces a latent state 𝑧𝑗 where 𝑧𝑗= 1 if the individual j produced the ordering based on Mallows model and 𝑧𝑗= 0 if the individual is guessing. We model guessing by choosing an ordering uniformly from all possible orderings of N items. Therefore, in the extended model, we have 𝑝 𝒚𝒋|𝝎,𝜃,𝑧𝑗 = 1 Ψ 𝜃 𝑒−𝜃𝑑 𝒚,𝝎 𝑧𝑗= 1 1/𝑁! 𝑧𝑗= 0. (4) To complete the model, we place a Bernoulli(1/2) prior over 𝑧𝑗. The MCMC inference algorithm to estimate the distribution over 𝝎, 𝒛 and 𝜃 given the observed data is based on earlier work [6]. We extended the algorithm to estimate 𝒛 and also allow for the efficient estimation of 𝜃. The details of the inference procedure are described in the supplementary materials. The result of the inference algorithm is a probability distribution over group answers 𝝎, of which we take the mode as the single answer for a particular problem. Note that the inferred group ordering does not have to correspond with an ordering of any particular individual. The model just finds the ordering that is close to all of the observed orderings, except those that can be better explained by a guessing process. Figure 4 illustrates the model solution based on a single MCMC sample for the Ten Commandments and ten amendment sorting tasks. The figure shows the distribution of distances from the inferred group ordering. Each circle corresponds to an individual. Individuals assigned to Mallows model and the guessing model are illustrated by filled and unfilled circles respectively. The solid and dashed red lines show the expected distributions based on the model parameters. Note that although Mallows model describes an exponential falloff in probability based on the distance from the group ordering, the expected distributions also take into account the number of orderings that exist at each distance (see [11], page 79, for a recursive algorithm to compute this). Figure 4 shows the distribution over individuals that are captured by the two routes in the model. The individuals with a Kendall's τ above below 15 tend to be assigned to Mallows route and all other individuals are assigned to the the guessing route. Interestingly, the distribution over distances appears to be bimodal, especially for the Ten Commandments. The middle peak of the distribution occurs at 22, which is close to the expected value of 22.5 based on guessing. This result seems intuitively plausible -- not everybody has studied the Ten Commandments, let alone the order in which they occur. Table 2 shows the results for the extended Mallows model across all 17 problems. The overall performance, in terms of Kendall's τ and rank is comparable to the Thurstonian model and the Borda count method. Therefore, there does not appear to be any overall advantage of this particular approach. For the Ten Commandments and ten amendment sorting tasks, Mallows model performs the same or better than the Thurstonian model. This suggests that for particular ordering tasks, where there is arguably no underl ying analog representation, a pure rank-ordering representation such as Mallows model might have an advantage. 4 Conclusions We have presented two heuristic aggregation approaches, as well as two probabilistic approaches, for the problem of aggregating rank orders to uncover a ground truth. For each problem, we found that there were individuals who performed better than the aggregation models (although we cannot identify these individuals until after the fact). However, across all problems, no person consistently outperformed the model. Therefore, for all aggregation methods, except for the mode, we demonstrated a wisdom of crowds effect, where the average performance of the model was better than the best individual over all problems. We also presented two probabilistic approaches based on the classic Thurstonian and Mallows approach. While neither of these models outperformed the simple Borda count heuristic models, they do have some advantages over them. The Thurstonian model not only extracts a group ordering, but also a representation of the uncertainty associated with the ordering. This can be visualized to gain insight into mental representations and processes. In addition, the Thurstonian and Mallows models were both extended with a guessing component to allow for the possibility that some individuals simply do not know any of the answers for a particular problem. Finally, although not explored here, the Bayesian approach potentially offers advantages over heuristic approaches because the probabilistic model can be easily expanded with additional sources of knowledge, such as confidence judgments from participants and background knowledge about the items. Figure 4. Distribution of distances from group answer for two example problems. 0 5 10 15 20 25 30 35 40 45 0 1 2 3 4 5 6  Number of Individuals Ten Commandments 0 5 10 15 20 25 30 35 40 45 0 2 4 6 8  Number of Individuals Ten Amendments 0 jz  1 jz  0 jz  1 jz  ( , ) j d y ω References [1] Surowiecki, J. (2004). The Wisdom of Crowds. New York, NY: W. W. Norton & Company, Inc. [2] Galton, F. (1907). Vox Populi. Nature, 75, 450-451. [3] Romney, K. A., Batchelder, W. H., Weller, S. C. (1987). Recent Applications of Cultural Consensus Theory. American Behavioral Scientist, 31, 163-177. [4] Dani, V., Madani, O., Pennock, D.M., Sanghai, S.K., & Galebach, B. (2006). An Empirical Comparison of Algorithms for Aggregating Expert Predictions. In Proceedings of the Conference on Uncertainty in Artificial Intelligence (UAI). [5] Vul, E & Pashler, H (2008). Measuring the Crowd Within: Probabilistic representations Within individuals. Psychological Science, 19(7) 645-647. [6] Lebanon, G. & Lafferty, J. (2002). Cranking: Combining Rankings using Conditional Models on Permutations. Proc. of the 19th International Conference on Machine Learning. [7] Lebanon, G., & Mao, Y. (2008). Non-Parametric Modeling of Partially Ranked Data. Journal of Machine Learning Research, 9, 2401-2429. [8] Gordon, K. (1924). Group Judgments in the Field of Lifted Weights. Journal of Experimental Psychology, 7, 398-400. [9] Thurstone, L. L. (1927). A law of comparative judgement. Psychological Review, 34, 273–286. [10] Mallows, C.L. (1957). Non-null ranking models, Biometrika, 44:114–130. [11] Marden, J. I. (1995). Analyzing and Modeling Rank Data. New York, NY: Chapman & Hall USA. [12] Yao, G., & Böckenholt, U. (1999). Bayesian estimation of Thurstonian ranking models based on the Gibbs sampler. British Journal of Mathematical and Statistical Psychology, 52, 79–92.
2009
80
3,833
Efficient Recovery of Jointly Sparse Vectors Liang Sun, Jun Liu, Jianhui Chen, Jieping Ye School of Computing, Informatics, and Decision Systems Engineering Arizona State University Tempe, AZ 85287 {sun.liang,j.liu,jianhui.chen,jieping.ye}asu.edu Abstract We consider the reconstruction of sparse signals in the multiple measurement vector (MMV) model, in which the signal, represented as a matrix, consists of a set of jointly sparse vectors. MMV is an extension of the single measurement vector (SMV) model employed in standard compressive sensing (CS). Recent theoretical studies focus on the convex relaxation of the MMV problem based on the (2, 1)-norm minimization, which is an extension of the well-known 1-norm minimization employed in SMV. However, the resulting convex optimization problem in MMV is significantly much more difficult to solve than the one in SMV. Existing algorithms reformulate it as a second-order cone programming (SOCP) or semidefinite programming (SDP) problem, which is computationally expensive to solve for problems of moderate size. In this paper, we propose a new (dual) reformulation of the convex optimization problem in MMV and develop an efficient algorithm based on the prox-method. Interestingly, our theoretical analysis reveals the close connection between the proposed reformulation and multiple kernel learning. Our simulation studies demonstrate the scalability of the proposed algorithm. 1 Introduction Compressive sensing (CS), also known as compressive sampling, has recently received increasing attention in many areas of science and engineering [3]. In CS, an unknown sparse signal is reconstructed from a single measurement vector. Recent theoretical studies show that one can recover certain sparse signals from far fewer samples or measurements than traditional methods [4, 8]. In this paper, we consider the problem of reconstructing sparse signals in the multiple measurement vector (MMV) model, in which the signal, represented as a matrix, consists of a set of jointly sparse vectors. MMV is an extension of the single measurement vector (SMV) model employed in standard compressive sensing. The MMV model was motivated by the need to solve the neuromagnetic inverse problem that arises in Magnetoencephalography (MEG), which is a modality for imaging the brain [7]. It arises from a variety of applications, such as DNA microarrays [11], equalization of sparse communication channels [6], echo cancellation [9], magenetoencephalography [12], computing sparse solutions to linear inverse problems [7], and source localization in sensor networks [17]. Unlike SMV, the signal in the MMV model is represented as a set of jointly sparse vectors sharing their common nonzeros occurring in a set of locations [5, 7]. It has been shown that the additional block-sparse structure can lead to improved performance in signal recovery [5, 10, 16, 21]. Several recovery algorithms have been proposed for the MMV model in the past [5, 7, 18, 24, 25]. Since the sparse representation problem is a combinatorial optimization problem and is in general NP-hard [5], the algorithms in [18, 25] employ the greedy strategy to recover the signal using an iterative scheme. One alternative is to relax it into a convex optimization problem, from which the 1 global optimal solution can be obtained. The most widely studied approach is the one based on the (2, 1)-norm minimization [5, 7, 10]. A similar relaxation technique (via the 1-norm minimization) is employed in the SMV model. Recent studies have shown that most of theoretical results on the convex relaxation of the SMV model can be extended to the MMV model [5], although further theoretical investigation is needed [26]. Unlike the SMV model where the 1-norm minimization can be solved efficiently, the resulting convex optimization problem in MMV is much more difficult to solve. Existing algorithms formulate it as a second-order cone programming (SOCP) or semdefinite programming (SDP) [16] problem, which can be solved using standard software packages such as SeDuMi [23]. However, for problems of moderate size, solving either SOCP or SDP is computationally expensive, which limits their use in practice. In this paper, we derive a dual reformulation of the (2, 1)-norm minimization problem in MMV. More especially, we show that the (2, 1)-norm minimization problem can be reformulated as a min-max problem, which can be solved efficiently via the prox-method with a nearly dimensionindependent convergence rate [19]. Compared with existing algorithms, our algorithm can scale to larger problems while achieving high accuracy. Interestingly, our theoretical analysis reveals the close relationship between the resulting min-max problem and multiple kernel learning [14]. We have performed simulation studies and our results demonstrate the scalability of the proposed algorithm in comparison with existing algorithms. Notations: All matrices are boldface uppercase. Vectors are boldface lowercase. Sets and spaces are denoted with calligraphic letters. The p-norm of the vector v = (v1, · · · , vd)T ∈IRd is defined as ∥v∥p := ³Pd i=1 |vi|p´ 1 p . The inner product on IRm×d is defined as ⟨X, Y⟩= tr(XT Y). For matrix A ∈IRm×d, we denote by ai and ai the ith row and the ith column of A, respectively. The (r, p)-norm of A is defined as: ∥A∥r,p := Ã m X i=1 ∥ai∥p r ! 1 p . (1) 2 The Multiple Measurement Vector Model In the SMV model, one aims to recover the sparse signal w from a measurement vector b = Aw for a given matrix A [3]. The SMV model can be extended to the multiple measurement vector (MMV) model, in which the signal is represented as a set of jointly sparse vectors sharing a common set of nonzeros [5, 7]. The MMV model aims to recover the sparse representations for SMVs simultaneously. It has been shown that the MMV model provably improves the standard CS recovery by exploiting the block-sparse structure [10, 21]. Specifically, in the MMV model we consider the reconstruction of the signal represented by a matrix W ∈IRd×n, which is given by a dictionary (or measurement matrix) A ∈IRm×d and multiple measurement vector B ∈IRm×n such that B = AW. (2) Each column of A is associated with an atom, and a set of atom is called a dictionary. A sparse representation means that the matrix W has a small number of rows containing nonzero entries. Usually, we have m ≪d and d > n. Similar to SMV, we can use ∥W∥p,0 to measure the number of rows in W that contain nonzero entries. Thus, the problem of finding the sparsest representation of the signal W in MMV is equivalent to solving the following problem, a.k.a. the sparse representation problem: (P0) : min W ∥W∥p,0, s.t. AW = B. (3) Some typical choices of p include p = ∞and p = 2 [25]. However, solving (P0) requires enumerating all subsets of the set {1, 2, · · · , d}, which is essentially a combinatorial optimization problem and is in general NP-hard [5]. Similar to the use of the 1-norm minimization in the SMV model, one natural alternative is to use ∥W∥p,1 instead of ∥W∥p,0, resulting in the following convex optimization problem (P1): (P1) : min W ∥W∥p,1, s.t. AW = B. (4) 2 The relationship between (P0) and (P1) for the MMV model has been studied in [5]. For p = 2, the optimal W is given by solving the following convex optimization problem: min W 1 2∥W∥2 2,1 s.t. AW = B. (5) Existing algorithms formulate Eq. (5) as a second-order cone programming (SOCP) problem or a semidefinite programming (SDP) problem [16]. Recall that the optimizaiton problem in Eq. (5) is equivalent to the following problem by removing the square in the objective: min W 1 2∥W∥2,1 s.t. AW = B. By introducing auxiliary variable ti(i = 1, · · · , d), this problem can be reformulated in the standard second-order cone programming (SOCP) formulation: min W,t1,··· ,td 1 2 d X i=1 ti (6) s.t. ∥Wi∥2 ≤ti, ti ≥0, i = 1, · · · , d, AW = B. Based on this SOCP formulation, it can also be transformed into the standard semidefinite programming (SDP) formulation: min W,t1,··· ,td 1 2 d X i=1 ti (7) s.t. · tiI WiT Wi ti ¸ ≥0, ti ≥0, i = 1, · · · , d, AW = B. The interior point method [20] and the bundle method [13] can be applied to solve SOCP and SDP. However, they do not scale to problems of moderate size, which limits their use in practice. 3 The Proposed Dual Formulation In this section we present a dual reformulation of the optimization problem in Eq. (5). First, some preliminary results are summarized in Lemmas 1 and 2: Lemma 1. Let A and X be m-by-d matrices. Then the following holds: ⟨A, X⟩≤1 2 ¡ ∥X∥2 2,1 + ∥A∥2 2,∞ ¢ . (8) When the equality holds, we have ∥X∥2,1 = ∥A∥2,∞. Proof. It follows from the definition of the (r, p)-norm in Eq. (1) that ∥X∥2,1 = Pm i=1 ∥xi∥2, and ∥A∥2,∞ = max1≤i≤m ∥ai∥2. Without loss of generality, we assume that ∥ak∥2 = max1≤i≤m ∥ai∥2 for 1 ≤k ≤m . Thus, ∥A∥2,∞= ∥ak∥2, and we have ⟨A, X⟩ = m X i=1 aixiT ≤ m X i=1 ∥ai∥2∥xi∥2 ≤ m X i=1 ∥ak∥2∥xi∥2 = ∥ak∥2 m X i=1 ∥xi∥2 ≤ 1 2  ∥ak∥2 2 + Ã m X i=1 ∥xi∥2 !2 = 1 2 ¡ ∥A∥2 2,∞+ ∥X∥2 2,1 ¢ . Clearly, the last inequality becomes equality when ∥X∥2,1 = ∥A∥2,∞. Lemma 2. Let A and X be defined as in Lemma 1. Then the following holds: max X ½ ⟨A, X⟩−1 2∥X∥2 2,1 ¾ = 1 2∥A∥2 2,∞. 3 Proof. Denote the set Q = {k : 1 ≤k ≤m, ∥ak∥2 = max1≤i≤m ∥ai∥2}. Let {αk}m k=1 be such that αk = 0 for k /∈Q, αk ≥0 for k ∈Q, and Pm k=1 αk = 1. Clearly, all inequalities in the proof of Lemma 1 become equalities if and only if we construct the matrix X as follows: xk = ½ αkak, if k ∈Q 0, otherwise. (9) Thus, the maximum of ⟨A, X⟩−1 2∥X∥2 2,1 is 1 2∥A∥2 2,∞, which is achieved when X is constructed as in Eq. (9). Based on the results established in Lemmas 1 and 2, we can derive the dual formulation of the optimization problem in Eq. (5) as follows. First we construct the Lagrangian L: L(W, U) = 1 2∥W∥2 2,1 −⟨U, AW −B⟩= 1 2∥W∥2 2,1 −⟨U, AW⟩+ ⟨U, B⟩. The dual problem can be formulated as follows: max U min W 1 2∥W∥2 2,1 −⟨U, AW⟩+ ⟨U, B⟩. (10) It follows from Lemma 2 that min W ½1 2∥W∥2 2,1 −⟨U, AW⟩ ¾ = min W ½1 2∥W∥2 2,1 −⟨AT U, W⟩ ¾ = −1 2∥AT U∥2 2,∞. Note that from Lemma 2, the equality holds if and only if the optimal W∗can be represented as W∗= diag(α)AT U, (11) where α = [α1, · · · , αd]T ∈IRd, αi ≥0 if ∥(AT U)i∥2 = ∥AT U∥2,∞, αi = 0 if ∥(AT U)i∥2 < ∥AT U∥2,∞, and Pd i=1 αi = 1. Thus, the dual problem can be simplified into the following form: max U −1 2∥AT U∥2 2,∞+ ⟨U, B⟩. (12) Following the definition of the (2, ∞)-norm, we can reformulate the dual problem in Eq. (12) as a min-max problem, as summarized in the following theorem: Theorem 1. The optimization problem in Eq. (5) can be formulated equivalently as: min P d i=1 θi=1,θi≥0 max u1,··· ,un n X j=1 ( uT j bj −1 2 d X i=1 θiuT j Giuj ) , (13) where the matrix Gi is defined as Gi = aiaT i (1 ≤i ≤d), and ai is the ith column of A. Proof. Note that ∥AT U∥2 2,∞can be reformulated as follows: ∥AT U∥2 2,∞ = max 1≤i≤d © ∥aT i U∥2 2 ª = max 1≤i≤d{tr(UT aiaT i U)} = max 1≤i≤d{tr(UT GiU)} = max θi≥0,P d i=1 θi=1 d X i=1 θitr(UT GiU). (14) Substituting Eq. (14) into Eq. (12), we obtain the following problem: max U −1 2∥AT U∥2 2,∞+ ⟨U, B⟩⇔max U min P d i=1 θi=1,θi≥0⟨U, B⟩−1 2 d X i=1 θitr(UT GiU). (15) Since the Slater’s condition [2] is satisfied, the minimization and maximization in Eq. (15) can be exchanged, resulting in the min-max problem in Eq. (13). Corollary 1. Let (θ∗, U∗) be the optimal solution to Eq. (13) where θ∗= (θ∗ 1, · · · , θ∗ d)T . If θ∗ i > 0, then ∥(AT U∗)i∥2 = ∥AT U∗∥2,∞. 4 Based on the solution to the dual problem in Eq. (13), we can construct the optimal solution to the primal problem in Eq. (5) as follows. Let W∗be the optimal solution of Eq. (5). It follows from Lemma 2 that we can construct W∗based on AT U∗as in Eq. (11). Recall that W∗must satisfy the equality constraint AW∗= B. The main result is summarized in the following theorem: Theorem 2. Given W∗= diag(α)AT U∗, where α = [α1, · · · , αd] ∈IRd, αi ≥0, αi > 0 only if ∥ ¡ AT U∗¢i ∥2 = ∥AT U∗∥2,∞, and Pd i=1 αi = 1. Then, AW∗= B if and only if (α, U∗) is the optimal solution to the problem in Eq. (13). Proof. First we assume that (α, U∗) is the optimal solution to the problem in Eq. (13). It follows that the partial derivative of the objective function with respect to U∗in Eq. (13) is 0, that is, B −Adiag(α)AT U∗= 0 ⇔AW∗= B. Next we prove the reverse direction by assuming AW∗= B. Since W∗= diag(α)AT U∗, we have 0 = B −AW∗= B −Adiag(α1, · · · , αd)AT U∗. (16) Define the function φ(θ1, · · · , θd, U) as φ(θ1, · · · , θd, U) = ⟨U, B⟩−1 2 d X i=1 θitr(UT GiU) = n X j=1 ( uT j bj −1 2 d X i=1 θiuT j Giuj ) . We consider the function φ(α1, · · · , αd, U) with fixed θi = αi(1 ≤i ≤d). Note that this function is concave with respect to U, thus its maximum is achieved when its partial derivative with respect to U is zero. It follows from Eq. (16) that ∂φ ∂U is zero when U = U∗. Thus, we have ∀U, φ(α1, · · · , αd, U) ≤φ(α1, · · · , αd, U∗). With a fixed U = U∗, φ(θ1, · · · , θd, U∗) is a linear combination of θi(1 ≤i ≤d) as: φ(θ1, · · · , θd, U∗) = ⟨U∗, B⟩−1 2 d X i=1 θi∥(AT U∗)i∥2 2. By the assumption, we have ∥(AT U∗)i∥= ∥AT U∗∥2,∞, if αi > 0. Thus, we have φ(α1, · · · , αd, U∗) ≤φ(θ1, · · · , θd, U∗), ∀θ1, · · · , θd satisfying d X i=1 θi = 1, θi ≥0. Therefore, for any U, θ1, · · · , θd such that Pd i=1 θi = 1, θi ≥0, we have φ(α1, · · · , αd, U) ≤φ(α1, · · · , αd, U∗) ≤φ(θ1, · · · , θd, U∗), (17) which implies that (α1, · · · , αd, U∗) is a saddle point of the min-max problem in Eq. (13). Thus, (α, U∗) is the optimal solution to the problem in Eq. (13). Theorem 2 shows that we can reconstruct the solution to the primal problem based on the solution to the dual problem in Eq. (13). It paves the way for the efficient implementation based on the min-max formulation in Eq.(13). In this paper, the prox-method [19], which is discussed in detail in the next section, is employed to solve the dual problem in Eq. (13). An interesting observation is that the resulting min-max problem in Eq. (13) is closely related to the optimization problem in multiple kernel learning (MKL) [14]. The min-max problem in Eq. (13) can be reformulated as min P d i=1 θi=1,θi≥0 max u1,··· ,un n X j=1 ½ uT j bj −1 2uT j Guj ¾ , (18) where the positive semidefinite (kernel) matrix G is constrained as a linear combination of a set of base kernels n Gi = aiaiT od i=1 as G = Pd i=1 θiGi. The formulation in Eq. (18) connects the MMV problem to MKL. Many efficient algorithms [14, 22, 27] have been developed in the past for MKL, which can be applied to solve (13). In [27], an extended level set method was proposed to solve MKL, which was shown to outperform the one based on the semi-infinite linear programming formulation [22]. However, the extended level set method involves a linear programming in each iteration and its theoretical convergence rate of O(1/ √ N) (N denotes the number of iterations) is slower than the proposed algorithm presented in the next section. 5 4 The Main Algorithm We propose to employ the prox-method [19] to solve the min-max formulation in Eq. (13), which has a differentiable and convex-concave objective function. The algorithm is called “MMVprox”. The prox-method is a first-order method [1, 19] which is specialized for solving the saddle point problem and has a nearly dimension-independent convergence rate of O(1/N) (N denotes the number of iterations). We show that each iteration of MMVprox has a low computational cost, thus it scales to large-size problems. The key idea is to convert the min-max problem to the associated variational inequality (v.i.) problem, which is then iteratively solved by a series of v.i. problems. Let z = (θ, U). The problem in Eq. (13) is equivalent to the following associated v.i. problem [19]: Find z∗= (θ∗, U∗) ∈S : ⟨F(z∗), z −z∗⟩≥0, ∀z ∈S, S = X × Y, (19) where F(z) = µ ∂ ∂θ φ(θ, U), −∂ ∂Uφ(θ, U) ¶ (20) is an operator constituted by the gradient of φ(·, ·), X = {θ ∈IRd : ∥θ∥1 = 1, θi ≥0}, and Y = IRm×n. In solving the v.i. problem in Eq. (19), one key building block is the following projection problem: Pz(¯z) = arg min ˜z∈S ·1 2∥˜z∥2 2 + ⟨˜z, ¯z −z⟩ ¸ , (21) where ¯z = (¯θ, ¯U) and ˜z = (˜θ, ˜U). Denote (θ∗, U∗) = Pz(¯z). It is easy to verify that θ∗= arg min ˜θ∈X 1 2∥˜θ −(θ −¯θ)∥2 2, (22) and U∗= U −¯U. (23) Following [19], we present the pseudocode of the proposed MMVprox algorithm in Algorithm 1. In each iteration, we compute the projection (21) so that wt,s is sufficiently close to wt,s−1 (controlled by the parameter δ). It has been shown in [19] that, when γ ≤ 1 √ 2L [L denotes the Lipschitz continuous constant of the operator F(·)], the inner iteration converges within two iterations, i.e., wt,2 = wt,1 always holds. Moreover, Algorithm 1 has a global dimension-independent convergence rate of O(1/N). Algorithm 1 The MMVprox Algorithm Input: A, B, γ, z0 = (θ0, U0), and δ Output: θ, U and W. Step t (t ≥1): Set wt,0 = zt−1 and find the smallest s = 1, 2, . . . such that wt,s = Pzt−1(γF(wt,s−1)), ∥wt,s −wt,s−1∥2 ≤δ. Set zt = wt,s Final Step: Set θ = P t i=1 θi t , U = P t i=1 Ui t , W = diag(θ)AT U. Time Complexity It costs O(dmn) to evaluate the operator F(·) at a given point. θ∗in Eq. (22) involves the Euclidean projection onto the simplex [1], which can be solved in linear time, i.e., in O(d); and U∗in Eq. (23) can be analytically computed in O(mn) time. Recall that at each iteration t, the inner iteration is at most 2. Thus, the time complexity for any given outer iteration is O(dmn). Our analysis shows that MMVprox scales to large-size problems. In comparison, the second-order methods such as SOCP have a much higher complexity per iteration. According to [15], the SOCP in Eq. (6) costs O(d3(n + 1)3) per iteration. In MMV, d is typically larger than m. In this case, the proposed MMVprox algorithm has a much smaller cost per iteration than SOCP. This explains why MMVprox scales better than SOCP, as shown in our experiments in the next section. 6 Table 1: The averaged recovery results over 10 experiments (d = 100, m = 50, and n = 80). Data set p ∥W −Wp∥2 F /(dn) p ∥AWp −B∥2 F /(mn) 1 3.2723e-6 1.4467e-5 2 3.4576e-6 1.8234e-5 3 2.6971e-6 1.4464e-5 4 2.4099e-6 1.4460e-5 5 2.9611e-6 1.4463e-5 6 2.5701e-6 1.4459e-5 7 2.0884e-6 1.4469e-5 8 2.3454e-6 1.4475e-5 9 2.6807e-6 1.4461e-5 10 2.7172e-6 1.4481e-5 Mean 2.7200e-6 1.4843e-5 Std 4.1728e-7 1.1914e-6 5 Experiments In this section, we conduct simulations to evaluate the proposed MMVprox algorithm in terms of the recovery quality and scalability. Experiment Setup We generated a set of synthetic data sets (by varying the values of m, n, and d) for our experiments: the entries in A ∈IRm×d were independently generated from the standard normal distribution N(0, 1); W ∈IRd×n (the ground truth of the recovery problems) was generated in two steps: (1) randomly select k rows with nonzero entries; (2) randomly generate the entries of those k rows from N(0, 1). We denote by Wp the solution obtained from the proposed MMVprox algorithm. Ideally, Wp should be close to W. Our experiments were performed on a PC with Intel Core 2 Duo T9500 2.6G CPU and 4G RAM. We employed the optimization package SeDuMi [23] for solving the SOCP formulation. All codes were implemented in Matlab. In all experiments, we terminate MMVprox when the change of the consecutive approximate solutions is less than 1e-6. Recovery Quality In this experiment, we evaluate the recovery quality of the proposed MMVprox algorithm. We applied MMVprox on the data sets of size d = 100, m = 50, n = 80, and reported the averaged experimental results over 10 random repetitions. We measured the recovery quality in terms of the mean squared error: p ∥W −Wp∥2 F /(dn). We also reported p ∥AWp −B∥2 F /(mn), which measures the violation of the constraint in Eq. (5). The experimental results are presented in Table 1. We can observe from the table that MMVprox recovers the sparse signal successfully in all cases. Next, we study how the recovery error changes as the sparsity of W varies. Specifically, we applied MMVprox on the data sets of size d = 100, m = 400, and n = 10 with k (the number of nonzero rows of W) varying from 0.05d to 0.7d, and used p ∥W −Wp∥2 F /(dn) as the recovery quality measure. The averaged experimental results over 20 random repetitions are presented in Figure 1. We can observe from the figure that MMVprox works well in all cases, and a larger k (less sparse W) tends to result in a larger recovery error. 0.05 0.2 0.35 0.5 0.7 0 0.5 1 1.5 2x 10 −6 k/d p ∥W −Wp∥2 F /(dn) Figure 1: The increase of the recovery error as the sparsity level decreases 7 Scalability In this experiment, we study the scalability of the proposed MMVprox algorithm. We generated a collection of data sets by varying m from 10 to 200 with a step size of 10, and setting n = 2m and d = 4m accordingly. We applied SOCP and MMVprox on the data sets and recorded their computation time. The experimental results are presented in Figure 2 (a), where the x-axis corresponds to the value of m, and the y-axis corresponds to log(t), where t denotes the computation time (in seconds). We can observe from the figure that the computation time of both algorithms increases as m increases and SOCP is faster than MMVprox on small problems (m ≤40); when m > 40, MMVprox outperforms SOCP; when the value of m is large (m > 80), the SOCP formulation cannot be solved by SeDuMi, while MMVprox can still be applied. This experimental result demonstrates the good scalability of the proposed MMVprox algorithm in comparison with the SOCP formulation. 50 100 150 200 −2 0 2 4 6 8 10 m log(t) SOCP MMVprox 50 100 150 200 −10 −8 −6 −4 −2 0 2 4 m log(t) SOCP MMVprox (a) (b) Figure 2: Scalability comparison of MMVprox and SOCP: (a) the computation time for both algorithms as the problem size varies; and (b) the average computation time of each iteration for both algorithms as the problem size varies. The x-axis denotes the value of m, and the y-axis denotes the computation time in seconds (in log scale). To further examine the scalability of both algorithms, we compare the execution time of each iteration for both SOCP and the proposed algorithm. We use the same setting as in the last experiment, i.e., n = 2m, d = 4m, and m ranges from 10 to 200 with a step size of 10. The time comparison of SOCP and MMVprox is presented in Figure 2 (b). We observe that MMVprox has a significantly lower cost than SOCP in each iteration (note that SOCP is not applicable for m > 80). This is consistent with our complexity analysis in Section 4. We can observe from Figure 2 that when m is small, the computation time of SOCP and MMVprox is comparable, although MMVprox is much faster in each iteration. This is because MMVprox is a first-order method, which has a slower convergence rate than the second-order method SOCP. Thus, there is a tradeoff between scalability and convergence rate. Our experiments show the advantage of MMVprox for large-size problems. 6 Conclusions In this paper, we consider the (2, 1)-norm minimization for the reconstruction of sparse signals in the multiple measurement vector (MMV) model, in which the signal consists of a set of jointly sparse vectors. Existing algorithms formulate it as second-order cone programming or semdefinite programming, which is computationally expensive to solve for problems of moderate size. In this paper, we propose an equivalent dual formulation for the (2, 1)-norm minimization in the MMV model, and develop the MMVprox algorithm for solving the dual formulation based on the proxmethod. In addition, our theoretical analysis reveals the close connection between the proposed dual formulation and multiple kernel learning. Our simulation studies demonstrate the effectiveness of the proposed algorithm in terms of recovery quality and scalability. In the future, we plan to compare existing solvers for multiple kernel learning [14, 22, 27] with the proposed MMVprox algorithm. In addition, we plan to examine the efficiency of the prox-method for solving various MKL formulations. Acknowledgements This work was supported by NSF IIS-0612069, IIS-0812551, CCF-0811790, NIH R01-HG002516, NGA HM1582-08-1-0016, and NSFC 60905035. 8 References [1] A. Ben-Tal and A. Nemirovski. Non-Euclidean restricted memory level method for large-scale convex optimization. Mathematical Programming, 102(3):407–56, 2005. [2] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, Cambridge, UK, 2004. [3] E. Cand`es. Compressive sampling. In International Congress of Mathematics, number 3, pages 1433– 1452, Madrid, Spain, 2006. [4] E. Cand`es, J. Romberg, and T. Tao. Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information. IEEE Transactions on Information Theory, 52(2):489–509, 2006. [5] J. Chen and X. Huo. Theoretical results on sparse representations of multiple-measurement vectors. IEEE Transactions on Signal Processing, 54(12):4634–4643, 2006. [6] S.F. Cotter and B.D. Rao. Sparse channel estimation via matching pursuit with application to equalization. IEEE Transactions on Communications, 50(3):374–377, 2002. [7] S.F. Cotter, B.D. Rao, Kjersti 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] D.L. Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52(4):1289–1306, 2006. [9] D.L. Duttweiler. Proportionate normalized least-mean-squares adaptation in echo cancelers. IEEE Transactions on Speech and Audio Processing, 8(5):508–518, 2000. [10] Y.C. Eldar and M. Mishali. Robust recovery of signals from a structured union of subspaces. To Appear in IEEE Transactions on Information Theory, 2009. [11] S. Erickson and C. Sabatti. Empirical bayes estimation of a sparse vector of gene expression changes. Statistical Applications in Genetics and Molecular Biology, 4(1):22, 2008. [12] I.F. Gorodnitsky, J.S. George, and B.D. Rao. Neuromagnetic source imaging with focuss: a recursive weighted minimum norm algorithm. Electroencephalography and Clinical Neurophysiology, 95(4):231– 251, 1995. [13] H. Jean-Baptiste and C. Lemarechal. Convex Analysis and Minimization Algorithms I: Fundamentals (Grundlehren Der Mathematischen Wissenschaften). Springer, Berlin, 1993. [14] G.R.G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M.I. Jordan. Learning the kernel matrix with semidefinite programming. Jouranl of Machine Learning Research, 5:27–72, 2004. [15] M. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret. Applications of second-order cone programming. Linear Algebra and its Applications, 284(1-3):193–228, 1998. [16] F. Parvaresh M. Stojnic and B. Hassibi. On the reconstruction of block-sparse signals with an optimal number of measurements. CoRR, 2008. [17] D. Malioutov, M. Cetin, and A. Willsky. Source localization by enforcing sparsity through a laplacian. In IEEE Workshop on Statistical Signal Processing, pages 553–556, 2003. [18] M. Mishali and Y.C. Eldar. Reduce and boost: Recovering arbitrary sets of jointly sparse vectors. IEEE Transactions on Signal Processing, 56(10):4692–4702, 2008. [19] A. Nemirovski. Prox-method with rate of convergence o(1/t) for variational inequalities with Lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM Journal on Optimization, 15(1):229–251, 2005. [20] Y.E. Nesterov and A.S. Nemirovskii. Interior-point Polynomial Algorithms in Convex Programming. SIAM Publications, Philadelphia, PA, 1994. [21] M. Duarte R.G. Baraniuk, V. Cevher and C. Hegde. Model-based compressive sensing. Submitted to IEEE Transactions on Information Theory, 2008. [22] S. Sonnenburg, G. R¨atsch, C. Sch¨afer, and B. Sch¨olkopf. Large scale multiple kernel learning. Journal of Machine Learning Research, 7:1531–1565, 2006. [23] J.F. Sturm. Using sedumi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11(12):625–653, 1999. [24] J.A. Tropp. Algorithms for simultaneous sparse approximation. Part II: Convex relaxation. Signal Processing, 86(3):589–602, 2006. [25] J.A. Tropp, A.C. Gilbert, and M.J. Strauss. Algorithms for simultaneous sparse approximation. Part I: Greedy pursuit. Signal Processing, 86(3):572–588, 2006. [26] E. van den Berg and M. P. Friedlander. Joint-sparse recovery from multiple measurements. Technical Report, Department of Computer Science, University of British Columbia, 2009. [27] Z. Xu, R. Jin, I. King, and M.R. Lyu. An extended level method for efficient multiple kernel learning. In Advances in Neural Information Processing Systems, pages 1825–1832, 2008. 9
2009
81
3,834
Efficient Match Kernels between Sets of Features for Visual Recognition Liefeng Bo Toyota Technological Institute at Chicago blf0218@tti-c.org Cristian Sminchisescu University of Bonn sminchisescu.ins.uni-bonn.de Abstract In visual recognition, the images are frequently modeled as unordered collections of local features (bags). We show that bag-of-words representations commonly used in conjunction with linear classifiers can be viewed as special match kernels, which count 1 if two local features fall into the same regions partitioned by visual words and 0 otherwise. Despite its simplicity, this quantization is too coarse, motivating research into the design of match kernels that more accurately measure the similarity between local features. However, it is impractical to use such kernels for large datasets due to their significant computational cost. To address this problem, we propose efficient match kernels (EMK) that map local features to a low dimensional feature space and average the resulting vectors to form a setlevel feature. The local feature maps are learned so their inner products preserve, to the best possible, the values of the specified kernel function. Classifiers based on EMK are linear both in the number of images and in the number of local features. We demonstrate that EMK are extremely efficient and achieve the current state of the art in three difficult computer vision datasets: Scene-15, Caltech-101 and Caltech-256. 1 Introduction Models based on local features have achieved state-of-the art results in many visual object recognition tasks. For example, an image can be described by a set of local features extracted from patches around salient interest points or regular grids, or a shape can be described by a set of local features defined at edge points. This raises the question on how should one measure the similarity between two images represented as sets of local features. The problem is non-trivial because the cardinality of the set varies with each image and the elements are unordered. Bag of words (BOW) [27] is probably one of the most popular image representations, due to both its conceptual simplicity and its computational efficiency. BOW represents each local feature with the closest visual word and counts the occurrence frequencies in the image. The resulting histogram is used as an image descriptor for object recognition, often in conjunction with linear classifiers. The length of the histogram is given by the number of visual words, being the same for all images. Various methods for creating vocabularies exist [10], the most common being k-means clustering of all (or a subsample of) the local features to obtain visual words. An even better approach to recognition is to define kernels over sets of local features. One way is to exploit closure rules. The sum match kernel of Haussler [7] is obtained by adding local kernels over all combinations of local features from two different sets. In [17], the authors modify the sum kernel by introducing an integer exponent on local kernels. Neighborhood kernels [20] integrate the spatial location of local features into a sum match kernel. Pyramid match kernels [5, 14, 13] map local features to multi-resolution histograms and compute a weighted histogram intersection. Algebraic set kernels [26] exploit tensor products to aggregate local kernels, whereas principal angle kernels 1 [29] measure similarities based on angles between linear subspaces spanned by local features in the two sets. Other approaches estimate a probability distribution on sets of local features, then derive their similarity using distribution-based comparison measures [12, 18, 2]. All of the above methods need to explicitly evaluate the full kernel matrix, hence they require space and time complexity that is quadratic in the number of images. This is impractical for large datasets (see §4). In this paper we present efficient match kernels (EMK) that combine the strengths of both bag of words and set kernels. We map local features to a low dimensional feature space and construct set-level features by averaging the resulting feature vectors. This feature extraction procedure is not significantly different than BOW. Hence EMK can be used in conjunction with linear classifiers and do not require the explicit computation of a full kernel matrix—this leads to both space and time complexity that is linear in the number of images. Experiments on three image categorization tasks show that EMK are effective computational tools. 2 Bag of Words and Match Kernels In supervised image classification, we are given a training set of images and their corresponding labels. The goal is to learn a classifier to label unseen images. We adopt a bag of features method, which represents an image as a set of local features. Let X = {x1, . . . , xp} be a set of local features in an image and V = {v1, . . . , vD} the dictionary, a set of visual words. In BOW, each local feature is quantized into a D dimensional binary indicator vector µ(x) = [µ1(x), . . . , µD(x)]⊤. µi(x) is 1 if x ∈R(vi) and 0 otherwise, where R(vi) = {x : ∥x −vi∥≤∥x −v∥, ∀v ∈V}. The feature vectors for one image form a normalized histogram µ(X) = 1 |X| P x∈X µ(x), where | · | is the cardinality of a set. BOW features can be used in conjunction with either a linear or a kernel classifier, albeit the latter often leads to expensive training and testing (see §4). When a linear classifier is used, the resulting kernel function is: KB(X, Y) = µ(X)⊤µ(Y) = 1 |X||Y| X x∈X X y∈Y µ(x)⊤µ(y) = 1 |X||Y| X x∈X X y∈Y δ(x, y) (1) with δ(x, y) = ½ 1, x, y ⊂R(vi), ∃i ∈{1, . . . , D} 0, otherwise (2) δ(x, y) is obviously a positive definite kernel, measuring the similarity between two local features x and y: δ(x, y) = 1 if x and y belong the same region R(vi), and 0 otherwise. However, this type of quantization can be too coarse when measuring the similarity of two local features (see also fig. 1 in [21]), risking a significant decrease in classification performance. Better would be to replace δ(x, y) with a continuous kernel function that more accurately measures the similarity between x and y: KS(X, Y) = 1 |X||Y| X x∈X X y∈Y k(x, y) (3) In fact, this is related to the normalized sum match kernel [7, 17]. Based on closure properties, Ks(X, Y) is a positive definite kernel, as long as the components k(x, y) are positive definite. For convenience, we refer to k(x, y) as the local kernel. A negative impact of kernelization is the high computational cost required to compute the summation match function, which takes O(|X||Y|) for a single kernel value rather than O(1), the cost of evaluating a single kernel function defined on vectors. When used in conjunction with kernel machines, it takes O(n2) and O(n2m2d) to store and compute the entire kernel matrix, respectively, where n is the number of images in the training set, and m is the average cardinality of all sets. For image classification, m can be in the thousands of units, so the computational cost rapidly becomes quartic as n approaches (or increases beyond) m. In addition to expensive training, the match kernel function has also a fairly high testing cost: for a test input, evaluating the discriminant f(X) = Pn i=1 αiKs(Xi, X) takes O(nm2d). This is, again, unacceptably slow for large n. For sparse kernel machines, such as SVMs, the cost can decrease to some extent, as some of the αi are zero. However, this does not change the order of complexity, as the level of sparsity usually grows linearly in n. Definition 1. The kernel function k(x, y) = φ(x)⊤φ(y) is called finite dimensional if the feature map φ(·) is finite dimensional. 2 Sum [7] Bhattacharyya [12] PMK [6] EMK-CKSVD EMK-Fourier Train O(n2m2d) O(n2m3d) O(n2m log(T)d) O(nmDd + nD2) O(nmDd) Test O(nm2d) O(nm3d) O(nm log(T)d) O(mDd + D2) O(mDd) Table 1: Computational complexity for five types of ‘set kernels’. ’Test’ means the computational cost per image.’Sum’ is the sum match kernel used in [7]. ’Bhattacharyya’ is the Bhattacharyya kernel in [12]. PMK is the pyramid match kernel of [6], with T in PMK giving the value of the maximal feature range. d is the dimensionality of local features. D in EMK is the dimensionality of feature maps and does not change with the training set size. Our experiments suggest that a value of D in the order of thousands of units is sufficient for good accuracy. Thus, O(nmDd) will dominate the computational cost for training, and O(mDd) the one for testing, since m is usually in the thousands, and d in the hundreds of units. EMK uses linear classifiers and does not require the evaluation of the kernel matrix. The other four methods are used in conjunction with kernel classifiers, hence they all need to evaluate the entire kernel matrix. In the case of nearest neighbor classifiers, there is no training cost, but testing costs remain unchanged. δ(x, y) is a special type of finite dimensional kernel. With the finite dimensional kernel, the match kernel can be simplified as: KS(X, Y) = φ(X)⊤φ(Y) (4) where φ(X) = 1 |X| P x∈X φ(x) is the feature map on the set of vectors. Since φ(X) is finite and can be computed explicitly, we can extract feature vectors on the set X, then apply a linear classifier on the resulting represenation. We call (4) an efficient match kernel (EMK). The feature extraction in EMK is not significantly different from the bag of words method. The training and testing costs are O(nmDd) and O(mDd) respectively, where D is the dimensionality of the feature map φ(x). If the feature map φ(x) is low dimensional, the computational cost of EMK can be much lower than the one required to evaluate the match kernel by computing the kernel functions k(x, y). For example, the cost is 1 n lower when D has the same order as m (this is the case in our experiments). Notice that we only need the feature vectors φ(X) in EMK, hence it is not necessary to compute the entire kernel matrix. Since recent developments have shown that linear SVMs can be trained in linear complexity [25], there is no substantial cost added in the training phase. The complexity of EMK and of several other well-known set kernels is reviewed in table 1. If necessary, location information can be incorporated into EMK, using a spatial pyramid [14, 13]: KP (X, Y) = PL−1 l=0 P2l t=1 2−lKS(X(l,t), Y(l,t)) = φS(X)⊤φS(Y), where L is the number of pyramid levels, 2l is the number of spatial cells in the l-th pyramid level, X(l,s) are local features falling within the spatial cell (l, s), and φP (X) = [φ(X(1,1))⊤, . . . , φ(X(l,s))⊤]⊤. While there can be many choices for the local feature maps φ(x)—and the positive definiteness of k(x, y) = φ(x)⊤φ(x) can be always guaranteed—, most do not necessarily lead to a meaningful similarity measure. In the paper, we give two principled methods to create meaningful local feature maps φ(x), by arranging for their inner products to approximate a given kernel function. 3 Efficient Match Kernels In this section we present two kernel approximations, based on low-dimensional projections (§3.1), and based on random Fourier set features (§3.2). 3.1 Learning Low Dimensional Set Features Our approach is to project the high dimensional feature vectors ψ(x) induced by the kernel k(x, y) = ψ(x)⊤ψ(y) to a low dimensional space spanned by D basis vectors, then construct a local kernel from inner products, based on low-dimensional representations. Given {ψ(zi)}D i=1, a set of basis vectors zi, we can approximate the feature vector ψ(x): vx = argmin vx ∥ψ(x) −Hvx∥2 (5) 3 −10 −5 0 5 10 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 Approximation Exact 0 100 200 300 400 500 −190 −185 −180 −175 −170 −165 −10 −5 0 5 10 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 Approximation Exact Figure 1: Low-dimensional approximations for a Gaussian kernel. Left: approximated Gaussian kernel with 20 learned feature maps. Center: the training objective (12) as a function of stochastic gradient descent iterations. Right: approximated Gaussian kernel based on 200 random Fourier features. The feature maps are learned from 200 samples, uniformly drawn from [-10,10]. where H = [ψ(z1), . . . , ψ(zD)] and vx are low-dimensional (projection) coefficients. This is a convex quadratic program with analytic solution: vx = (H⊤H)−1(H⊤ψ(x)) (6) The local kernel derived from the projected vectors is: kl(x, y) = [Hvx]⊤[Hvy] = kZ(x)⊤K−1 ZZkZ(y) (7) where kZ is a D × 1 vector with {kZ}i = k(x, zi) and KZZ is a D × D matrix with {KZZ}ij = k(zi, zj). For G⊤G = K−1 ZZ (notice that K−1 ZZ is positive definite), the local feature maps are: φ(x) = GkZ(x) (8) The resulting full feature map is: φ(X) = 1 |X|G £P x∈X kZ(x) ¤ , with computational complexity O(mDd + D2) for a set of local features. A related method is the kernel codebook [28], where a set-level feature is also extracted based on a local kernel, but with different feature map φ(·). An essential difference is that inner products of our set-level features φ(X) formally approximate the sum-match kernel, whereas the ones induced by the kernel codebook do not. Therefore EMK only requires a linear classifier wherea a kernel codebook would require a non-linear classifier for comparable performance. As explained, this can be prohibitively expensive to both train and test, in large datasets. Our experiments, shown in table 3, further suggest that EMK outperforms the kernel codebook, even in the non-linear case. How can we learn the basis vectors? One way is kernel principal component analysis (KPCA) [24] on a randomly selected pool of F local features, with the basis set to the topmost D eigenvectors. This faces two difficulties, however: (i) KPCA scales cubically in the number of selected local features, F; (ii) O(Fmd) work is required to extract the set-level feature vector for one image, because the eigenvectors are linear combinations of the selected local feature vectors, PF i=1 αiψ(xi). For large F, as typically required for good accuracy, this approach is too expensive. Although the first difficulty can be palliated by iterative KPCA [11], the second computational challenge remains. Another option would be to approximate each eigenvector with a single feature vector ψ(z) by solving the pre-image problem (z, β) = argminz,β ∥PF i=1 αiψ(xi) −βψ(z)∥2, after KPCA. However, the two step approach is sub-optimal. Intuitively, it should be better to find the single vector approximations within an unified objective function. This motivates our constrained singular value decomposition in kernel feature space (CKSVD): argmin V,Z R(V, Z) = 1 F F X i=1 ∥ψ(xi) −Hvi∥2 (9) where F is the number of the randomly selected local features, Z = [z1, . . . , zD] and V = [v1, . . . , vF ]. If the pre-image constraints H = [ψ(z1), . . . , ψ(zD)] are dropped, it is easy to show that KPCA can be recovered. The partial derivatives of R with respect to vi are: ∂R(V, Z) ∂vi = 2H⊤Hvi −2H⊤ψ(xi) (10) 4 Expanding equalities like ∂R(V,Z) ∂vi = 0 produces a linear system with respect to vi for a fixed Z. In this case, we can obtain the optimal, analytical solution: vi = (H⊤H)−1(H⊤ψ(xi)). Substituting the solution in eq. (9), we can eliminate the variable V. To learn the basis vectors, instead of directly optimizing R(V, Z), we can solve the equivalent optimization problem: argmin Z R∗(Z) = −1 F F X i=1 kZ(xi)⊤K−1 ZZkZ(xi) (11) Optimizing R∗(Z) is tractable because its parameter space is much smaller than R(V, Z). The problem (11) can be solved using any gradient descent algorithm. For efficiency, we use the stochastic (on-line) gradient descent (SGD) method. SGD applies to problems where the full gradient decomposes as a sum of individual gradients of the training samples. The standard (batch) gradient descent method updates the parameter vector using the full gradient whereas SGD approximates it using the gradient at a single training sample. For large datasets, SGD is usually much faster than batch gradient descent. At the t-th iteration, in SCG, we randomly pick a sample xt from the training set and update the parameter vector based on: Z(t + 1) = Z(t) −η t ∂ £ −kZ(xt)⊤K−1 ZZkZ(xt) ¤ ∂Z (12) where η is the learning rate. In our implementation, we use D samples (rather than just one) to compute the gradient. This produces more accurate results and matches the cost of inverting KZZ, which is O(D3) per iteration. 3.2 Random Fourier Set Features Another tractable approach to large-scale learning is to approximate the kernel using random feature maps [22, 23]. For a given function µ(x; θ) and the probability distribution p(θ), one can define the local kernel as: kf(x, y) = R p(θ)µ(x; θ)µ(y, θ)dθ. We consider feature maps of the form µ(x; θ) = cos(ω⊤x + b) with θ = (ω, b), which project local features to a randomly chosen line, then pass the resulting scalar through a sinusoid. For example, to approximate the Gaussian kernel kf(x, y) = exp(−γ∥x −y∥2), the random feature maps are: φ(x) = q 2 D[cos(ω⊤ 1 x + b1),. . . , cos(ω⊤ Dx + bD)]⊤, where bi are drawn from the uniform distribution [−π, π] and ω are drawn from a Gaussian with 0 mean and covariance 2γI. Our proposed setlevel feature map is (c.f. §2): φ(X) = 1 |X| P x∈X φ(x). Although any shift invariant kernel can be represented using random Fourier features, currently these are limited to Gaussian kernels or to kernels with analytical inverse Fourier transforms. In particular, ω needs to be sampled from the inverse Fourier transform of the corresponding shift invariant kernel. The constraint of a shiftinvariant kernel excludes a number of practically interesting similarities. For example, the χ2 kernel [8] and the histogram intersection kernel [5] are designed to compare histograms, hence they can be used as local kernels, if the features are histograms. However, no random Fourier features can approximate them. Such problems do not occur for the learned low dimensional features—a methodology applicable to any Mercer kernel. Moreover, in experiments, we show that kernels based on low-dimensional approximations (§3.1) can produce superior results when the dimensionality of the feature maps is small. As seen in fig. 2, for applicable kernels, the random Fourier set features also produce very competitive results in the higher-dimensional regime. 4 Experiments We illustrate our methodology in three publicly available computer vision datasets: Scene-15, Caltech-101 and Caltech-256. For comparisons, we consider four algorithms: BOW-Linear, BOWGaussian, EMK-CKSVD and EMK-Fourier. BOW-Linear and BOW-Gaussian use a linear classifier and a Gaussian kernel classifier on BOW features, respectively. EMK-CKSVD and EMK-Fourier use linear classifiers. For the former, we learn low dimensional feature maps (§3.1), whereas for the latter we obtain them using random sampling (§3.2). All images are transformed into grayscale form. The local features are SIFT descriptors [16] extracted from 16×16 image patches. Instead of detecting the interest points, we compute SIFT descriptors over dense regular grids with spacing of 8 pixels. For EMK, our local kernel is a Gaussian 5 exp(−γ∥x −y∥2). We use the same fixed γ = 1 for our SIFT descriptor in all datasets: Scene-15, Caltech-101 and Caltech-256, although a more careful selection is likely to further improve performance. We run k-means clustering to identify the visual words and stochastic gradient descent to learn the local feature maps, using a 100,000 random set of SIFT descriptors. Our classifier is a support vector machine (SVM), which is extended to multi-class decisions by combining one-versus-all votes. We work with LIBLINEAR [3] for BOW-Linear, EMK-Fourier and EMK-CKSVD, and LIBSVM for BOW-Gaussian (the former need a linear classifier whereas the latter uses a nonlinear classifier). The regularization and the kernel parameters (if available) in SVM are tuned by ten-fold cross validation on the training set. The dimensionality of the feature maps and the vocabulary size are both set to 1000 for fair comparisons, unless otherwise specified. We have also experimented with larger vocabulary sizes in BOW, but no substantial improvement was found (fig. 2). We measure performance based on classification accuracy, averaged over five random training/testing splits. All experiments are run on a cluster built of compute nodes with 1.0 GHz processors and 8GB memory. Scene-15: Scene-15 consists of 4485 images labeled into 15 categories. Each category contains 200 to 400 images whose average size is 300×250 pixels. In our first experiment, we train models on a randomly selected set of 1500 images (100 images per category) and test on the remaining images. We vary the dimensionality of the feature maps (EMK) and the vocabulary size (BOW) from 250 to 2000 with step length 250. For this dataset, we only consider the flat BOW and EMK (only pyramid level 0) in all experiments. The classification accuracy of BOW-Linear, BOW-Gaussian, EMK-Fourier and EMK-CKSVD is plotted in fig. 2 (left). Our second experiment is similar with the first one, but the dimensionality of the feature maps and the vocabulary size vary from 50 to 200 with step length 25. In our third experiment, we fix the dimensionality of the feature maps to 1000, and vary the training set size from 300 to 2400 with step length 300. We show the classification accuracy of the four models as a function of the training set size in fig. 2 (right). We notice that EMK is consistently 5-8% better than BOW in all cases. BOW-Gaussian is about 2 % better than BOW-Linear on average, whereas EMK-CKSVD give are very similar performance to EMK-Fourier in most cases. We observe that EMK-CKSVD significantly outperforms EMKFourier for low-dimensional feature maps, indicating that learned features preserve the values of the Gaussian kernel better than the random Fourier maps in this regime, see also fig. 1 (center). For comparisons, we attempted to run the sum match kernel, on the full Scene-15 dataset. However, we weren’t able to finish in one week. Therefore, we considered a smaller dataset, by training and testing with only 40 images from each category. The sum match kernel obtains 71.8% accuracy and slightly better than EMK-Fourier 71.0% and EMK-CKSVD 71.4% on the same dataset. The sum match kernel takes about 10 hours for training and 10 hours for testing, respectively whereas EMK-Fourier and EMK-CKSVD need less than 1 hour, most spent computing SIFT descriptors. In addition, we use 10,000 randomly selected SIFT descriptors to learn KPCA-based local feature maps, which takes about 12 hours for the training and testing sets on the full Scene-15 dataset, respectively. We obtain slightly lower accuracy than EMK-Fourier and EMK-CKSVD. One reason can be the small sample size, but it is currently prohibitive, computationally, to use larger ones. Caltech-101: Caltech-101 [15] contains 9144 images from 101 object categories and a background category. Each category has 31 to 800 images with significant color, pose and lighting variations. Caltech-101 is one of the most frequently used benchmarks for image classification, and results obtained by different algorithms are available from the published papers, allowing direct comparisons. Following the common experimental setting, we train models on 15/30 image per category and test on the remaining images. We consider three pyramid levels: L = 0, L = 1, amd L = 2 (for the latter two, spatial information is used). We have also tried increasing the number of levels in the pyramid, but did not obtain a significant improvement. We report the accuracy of BOW-Linear, BOW-Gaussian, EMK-Fourier and EMK-CKSVD in table 2. EMK-Fourier and EMK-CKSVD perform substantially better than BOW-Linear and BOWGaussian for all pyramid levels. The performance gap increases as more pyramid levels are added. EMK-CKSVD is very close to EMK-Fourier and BOW-Gaussian does not improve over BOWLinear much. In table 3, we compare EMK to other algorithms. As we have seen, EMK is comparable to the best-scoring classifiers to date. The best result on Caltech101 was obtained by combining multiple descriptor types [1]. Our main goal in this paper is to analyze the strengths of EMK relative 6 500 1000 1500 2000 0.6 0.65 0.7 0.75 0.8 Dimentionality Accuracy Scene−15 BOW−Linear BOW−Gaussian EMK−Fourier EMK−CKSVD 50 100 150 200 0.6 0.65 0.7 0.75 Dimentionality Accuracy Scene−15 BOW−Linear BOW−Gaussian EMK−Fourier EMK−CKSVD 50 100 150 0.5 0.55 0.6 0.65 0.7 0.75 0.8 Training Set Size Accuracy Scene−15 BOW−Linear BOW−Gaussian EMK−Fourier EMK−CKSVD Figure 2: Classification accuracy on Scene-15. Left: Accuracy in the high-dimensional regime, and (center) in the low-dimensional regime. Right: Accuracy as a function of the training set size. The training set size is 1500 in the left plot; the dimensionality of feature maps and the vocabulary size are both set to 1000 in the right plot (for fair comparisons). Pyramid levels(15 training) Pyramid levels (30 training) Algorithms L=0 L=1 L=2 L=0 L=1 L=2 BOW-Linear 37.3± 0.9 41.6± 0.7 45.0±0.5 46.2±0.8 53.0± 0.9 56.2±0.7 BOW-Gaussian 38.7± 0.8 43.7± 0.7 46.5±0.6 47.5±0.7 54.7± 0.8 58.1±0.6 EMK-Fourier 46.3± 0.7 53.0± 0.6 60.2±0.8 54.0± 0.7 64.1± 0.8 70.1±0.8 EMK-CKSVD 46.6±0.9 53.4±0.8 60.5±0.9 54.5±0.8 63.7±0.9 70.3±0.8 Table 2: Classification accuracy comparisons for three pyramid levels. The results are averaged over five random training/testing splits. The dimensionality of the feature maps and the vocabulary size are both set to 1000. We have also experimented with large vocabularies, but did not observe noticeable improvement—the performance tends to saturate beyond 1000 dimensions. to BOW. Only SIFT descriptors are used in BOW and EMK for all compared algorithms, listed in table 3. To improve performance, EMK can be conveniently extended to multiple feature types. Caltech-256: Caltech-256 consists of 30,607 images from 256 object categories and background, where each category contains at least 80 images. Caltech-256 is challenging due to the large number of classes and the diverse lighting conditions, poses, backgrounds, images size, etc. We follow the standard setup and increase the training set from 15 to 60 images per category with step length 15. In table 4, we show the classification accuracy obtained from BOW-Linear, BOW-Gaussian, EMKFourier and EMK-CKSVD. As in the other datasets, we notice that EMK-Fourier and EMK-CKSVD consistently outperform the BOW-Linear and the BOW-Gaussian. To compare the four algorithms computationally, we select images from each category proportionally to the total number of images of that category, as the training set. We consider six different training set sizes: ⌊0.3 × 30607⌋, . . . , ⌊0.8 × 30607⌋. The results are shown in fig. 3. To accelerate BOW-Gaussian, we precompute the entire kernel matrix. As expected, BOW-Gaussian is much slower than the other three algorithms as the training set size increases, for both training and testing. Algorithms 15 training 30 training Algorithms 15 training 30 training PMK [5, 6] 50.0±0.9 58.2 kCNN [30] 59.2 67.4 HMAX [19] 51.0 56.0 LDF [4] 60.3 N/A ML+PMK [9] 52.2 62.1 ML+CORR [9] 61.0 69.6 KC [28] N/A 64.0 NBNN [1] 65.0±1.1 73.0 SPM [14] 56.4 64.4±0.5 EMK-Fourier 60.2±0.8 70.1±0.8 SVM-KNN [31] 59.1±0.5 66.2±0.8 EMK-CKSVD 60.5±0.9 70.3±0.8 Table 3: Accuracy comparisons on Caltech-101. EMK is compared with ten recently published methods. N/A indicates that results are not available. Notice that EMK is used in conjunction with a linear classifier (linear SVM here) whereas all other methods (except HMAX [19]) require nonlinear classifiers. 7 Algorithms BOW-Linear BOW-Gaussian EMK-Fourier EMK-CKSVD 15 training 17.4±0.7 19.1±0.8 22.6±0.7 23.2±0.6 30 training 22.7±0.4 24.4±0.6 30.1±0.5 30.5±0.4 45 training 26.9±0.3 28.3±0.5 34.1±0.5 34.4±0.4 60 training 29.3±0.6 30.9±0.4 37.4±0.6 37.6±0.5 Table 4: Accuracy on Caltech-256. The results are averaged over five random training/testing splits. The dimensionality of the feature maps and the vocabulary size are both set to 1000 (for fair comparisons). We use 2 pyramid levels. 1 1.5 2 2.5 x 10 4 0 5 10 15 x 10 4 Trainning set size Training time (seconds) Caltech−256 BOW−Linear BOW−Gaussian EMK−Fourier EMK−CKSVD 1 1.5 2 2.5 x 10 4 20 40 60 80 100 120 Trainning set size Testing time (seconds) Caltech−256 BOW−Linear BOW−Gaussian EMK−Fourier EMK−CKSVD Figure 3: Computational costs on Caltech-256. Left: training time as a function of the training set size. Right: testing time as a function of the training set size. Testing time is in seconds per 100 samples. Flat BOW and EMK are used (no pyramid, L = 0). Notice that PMK has a similar training and testing cost with BOW-Gaussian. Nonlinear SVMs takes O(n2 ∼n3) even when a highly optimized software package like LIBSVM is used. For large n, the SVM training dominates the training cost. The testing time of BOWGaussian is linear in the training set size, but constant for the other three algorithms. Although we only experiment with a Gaussian kernel, a similar complexity would be typical for other nonlinear kernels, as used in [6, 9, 14, 31, 4]. 5 Conclusion We have presented efficient match kernels for visual recognition, based on a novel insight that popular bag-of-words representations used in conjunction with linear models can be viewed as a special type of match kernel which counts 1 if two local features fall into the same regions partitioned by visual words and 0 otherwise. We illustrate the quantization limitations of such models and propose more sophisticated kernel approximations that preserve the computational efficiency of bag-of-words while being just as (or more) accurate than the existing, computationally demanding, non-linear kernels. The models we propose are built around Efficient Match Kernels (EMK), which map local features to a low dimensional feature space, average the resulting feature vectors to form a set-level feature, then apply a linear classifier. In experiments, we show that EMK are efficient and achieve state of the art classification results in three difficult computer vision datasets: Scene-15, Caltech-101 and Caltech-256. Acknowledgements: This research was supported, in part, by awards from NSF (IIS-0535140) and the European Commission (MCEXT-025481). Liefeng Bo thanks Jian Peng for helpful discussions. References [1] O. Boiman, E. Shechtman, and M. Irani. In defense of nearest-neighbor based image classification. In CVPR, 2008. [2] M. Cuturi and J. Vert. Semigroup kernels on finite sets. In NIPS, 2004. [3] R. Fan, K. Chang, C. Hsieh, X. Wang, and C. Lin. Liblinear: A library for large linear classification. JMLR, 9:1871–1874, 2008. 8 [4] A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In NIPS, 2006. [5] K. Grauman and T. Darrell. The pyramid match kernel: discriminative classification with sets of image features. In ICCV, 2005. [6] K. Grauman and T. Darrell. The pyramid match kernel: Efficient learning with sets of features. JMLR, 8:725–760, 2007. [7] D. Haussler. Convolution kernels on discrete structures. Technical report, 1999. [8] Zhang J., Marszalek M., Lazebnik S., and Schmid C. Local features and kernels for classification of texture and object categories: A comprehensive study. IJCV, 73(2):213–238, 2007. [9] P. Jain, B. Kulis, and K. Grauman. Fast image search for learned metrics. In CVPR, 2008. [10] F. Jurie and B. Triggs. Creating efficient codebooks for visual recognition. In ICCV, 2005. [11] K. Kim, M. Franz, and B. Sch¨olkopf. Iterative kernel principal component analysis for image modeling. PAMI, 27(9):1351–1366, 2005. [12] R. Kondor and T. Jebara. A kernel between sets of vectors. In ICML, 2003. [13] A. Kumar and C. Sminchisescu. Support kernel machines for object recognition. In ICCV, 2007. [14] S. Lazebnik, C. Schmid, and J. Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In CVPR, 2006. [15] F. Li, R. Fergus, and P. Perona. One-shot learning of object categories. PAMI, 28(4):594–611, 2006. [16] D. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60:91–110, 2004. [17] S. Lyu. Mercer kernels for object recognition with local features. In CVPR, 2005. [18] P. Moreno, P. Ho, and N. Vasconcelos. A kullback-leibler divergence based kernel for svm classification in multimedia applications. In NIPS, 2003. [19] J. Mutch and D. Lowe. Multiclass object recognition with sparse, localized features. In CVPR, 2006. [20] M. Parsana, S. Bhattacharya, C. Bhattacharyya, and K. Ramakrishnan. Kernels on attributed pointsets with applications. In NIPS, 2007. [21] J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Lost in quantization: Improving particular object retrieval in large scale image databases. In CVPR, 2008. [22] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [23] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In NIPS, 2008. [24] B. Sch¨olkopf, A. Smola, and K. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10:1299–1319, 1998. [25] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for svm. In ICML, pages 807–814. ACM, 2007. [26] A. Shashua and T. Hazan. Algebraic set kernels with application to inference over local image representations. In NIPS, 2004. [27] J. Sivic and A. Zisserman. Video google: A text retrieval approach to object matching in videos. In ICCV, 2003. [28] J. van Gemert, J. Geusebroek, C. Veenman, and A. Smeulders. Kernel codebooks for scene categorization. In ECCV, 2008. [29] L. Wolf and A. Shashua. Learning over sets using kernel principal angles. JMLR, 4:913–931, 2003. [30] K. Yu, W. Xu, and Y. Gong. Deep learning with kernel regularization for visual recognition. In NIPS, 2008. [31] H. Zhang, A. Berg, M. Maire, and J. Malik. Svm-knn: Discriminative nearest neighbor classification for visual category recognition. In CVPR, 2006. 9
2009
82
3,835
Clustering Sequence Sets for Motif Discovery Jong Kyoung Kim and Seungjin Choi Department of Computer Science Pohang University of Science and Technology San 31 Hyoja-dong, Nam-gu Pohang 790-784, Korea {blkimjk,seungjin}@postech.ac.kr Abstract Most of existing methods for DNA motif discovery consider only a single set of sequences to find an over-represented motif. In contrast, we consider multiple sets of sequences where we group sets associated with the same motif into a cluster, assuming that each set involves a single motif. Clustering sets of sequences yields clusters of coherent motifs, improving signal-to-noise ratio or enabling us to identify multiple motifs. We present a probabilistic model for DNA motif discovery where we identify multiple motifs through searching for patterns which are shared across multiple sets of sequences. Our model infers cluster-indicating latent variables and learns motifs simultaneously, where these two tasks interact with each other. We show that our model can handle various motif discovery problems, depending on how to construct multiple sets of sequences. Experiments on three different problems for discovering DNA motifs emphasize the useful behavior and confirm the substantial gains over existing methods where only a single set of sequences is considered. 1 Introduction Discovering how DNA-binding proteins called transcription factors (TFs) regulate gene expression programs in living cells is fundamental to understanding transcriptional regulatory networks controlling development, cancer, and many human diseases. TFs that bind to specific cis-regulatory elements in DNA sequences are essential for mediating this transcriptional control. The first step toward deciphering this complex network is to identify functional binding sites of TFs referred to as motifs. We address the problem of discovering sequence motifs that are enriched in a given target set of sequences, compared to a background model (or a set of background sequences). There have been extensive research works on statistical modeling of this problem (see [1] for review), and recent works have focused on improving the motif-finding performance by integrating additional information into comparative [2] and discriminative motif discovery [3]. Despite the relative long history and the critical roles of motif discovery in bioinformatics, many issues are still unsolved and controversial. First, the target set of sequences is assumed to have only one motif, but this assumption is often incorrect. For example, a recent study examining the binding specificities of 104 mouse TFs observed that nearly half of the TFs recognize multiple sequence motifs [4]. Second, it is unclear how to select the target set on which over-represented motifs are returned. The target set of sequences is often constructed from genome-wide binding location data (ChIP-chip or ChIP-seq) or gene expression microarray data. However, there is no clear way to partition the data into target and background sets in general. Third, a unified algorithm which is applicable to diverse motif discovery problems is solely needed to provide a principled framework for developing more complex models. 1 1 S m S M S M M ,1 m s M M , m i s , m m L s đđđ$&$*&$*$****7**$*đđđ , , , ( 1) , ( 1) ( $, *, , 7) W m ij m ij m i j m i j W s s s s + + − = = = = L , m i s , [0,1] LI$*$****7LVDELQGLQJVLWH T m ij z = Figure 1: Notation illustration. These considerations motivate us to develop a generative probabilistic framework for learning multiple motifs on multiple sets of sequences. One can view our framework as an extension of the classic sequence models such as the two-component mixture (TCM) [5] and the zero or one occurrence per sequence (ZOOPS) [6] models in which sequences are partitioned into two clusters, depending on whether or not they contain a motif. In this paper, we make use of a finite mixture model to partition the multiple sequence sets into clusters having distinct sequence motifs, which improves the motiffinding performance over the classic models by enhancing signal-to-noise ratio of input sequences. We also show how our algorithm can be applied into three different problems by simply changing the way of constructing multiple sets from input sequences without any algorithmic modifications. 2 Problem formulation We are given M sets of DNA sequences S = {S1, . . . , SM} to be grouped according to the type of motif involved with, in which each set is associated with only a single motif but multiple binding sites are present in each sequence. A set of DNA sequences Sm = {sm,1, . . . , sm,Lm} is a collection of strings sm,i of length |sm,i| over the alphabet Σ = {A, C, G, T }. To allow for a variable number of binding sites per sequence, we represent each sequence sm,i as a set of overlapping subsequences sW m,ij = (sm,ij, sm,i(j+1), . . . , sm,i(j+W−1)) of length W starting at position j ∈Im,i, where sm,ij denotes the letter at position j and Im,i = {1, . . . , |sm,i|−W +1}, as shown in Fig. 1. We introduce a latent variable matrix zm,i ∈R2×|Im,i| in which the jth column vector zm,ij is a 2-dimensional binary random vector [zm,ij1, zm,ij2]⊤such that zm,ij = [0, 1]⊤if a binding site starts at position j ∈Im,i, otherwise, zm,ij = [1, 0]⊤. We also introduce K-dimensional binary random vectors tm ∈RK ( tm,k ∈{0, 1} and P k tm,k = 1) for m = 1, . . . , M, which involve partitioning the sequence sets S into K disjoint clusters, where sets in the same cluster are associated with the same common motif. For a motif model, we use a position-frequency matrix whose entries correspond to probability distributions (over the alphabet Σ) of each position within a binding site. We denote by Θk ∈RW×4 the kth motif model of length W over Σ, where Θ⊤ k,w represents row w, each entry is non-negative, Θk,wl ≥0 for ∀w, l, and P4 l=1 Θk,wl = 1 for ∀w. The background model θ0, which describes frequencies over the alphabet within non-binding sites, is defined by a P th order Markov chain (represented by a (P + 1)-dimensional conditional probability table). Our goal is to construct a probabilistic model for DNA motif discovery where we identify multiple motifs through searching for patterns which are shared across multiple sets of sequences. Our model infers cluster-indicating latent variables (to find a good partition of S) and learns motifs (inferring binding site-indicating latent variables zm,i) simultaneously, where these two tasks interact with each other. 2 , m ij z mt v k Θ K α β , | | m i I m L M π 0 θ , W m ij s Figure 2: Graphical representation of our mixture model for M sequence sets. 3 Mixture model for motif discovery We assume that the distribution of S is modeled as a mixture of K components, where it is not known in advance which mixture component underlies a particular set of sequences. We also assume that the conditional distribution of the subsequence sW m,ij given tm is modeled as a mixture of two components, each of which corresponds to the motif and the background models, respectively. Then, the joint distribution of observed sequence sets S and (unobserved) latent variables Z and T conditioned on parameters Φ is written as: p(S, Z, T |Φ) = M Y m p(tm|Φ) Lm Y i=1 Y j∈Im,i p(sW m,ij|zm,ij, tm, Φ)p(zm,ij|Φ), (1) where Z = {zm,ij} and T = {tm}. The graphical model associated with (1) is shown in Fig. 2. The generative process for subsequences sW m,ij is described as follows. We first draw mixture weights v = [v1, . . . , vK]⊤(involving set clusters) from the Dirichlet distribution: p(v|α) ∝ K Y k=1 v αk K −1 k , (2) where α = [α1, . . . , αK]⊤are the hyperparameters. Given mixture weights, we choose the clusterindicator tm for Sm, according to the multinomial distribution p(tm|v) = QK k=1 vtm,k k . The chosen kth motif model Θk is drawn from the product of Dirichlet distributions: p(Θk|β) = W Y w=1 p(Θk,w|β) ∝ W Y w=1 4 Y l=1 Θβl−1 k,wl , (3) where β = [β1, . . . , β4]⊤are the hyperparameters. The latent variables zm,ij indicating the starting positions of binding sites are governed by the prior distribution specified by: p(zm,ij|π) = 2 Y r=1 πzm,ijr r , (4) where the mixture weights π = [π1, π2]⊤satisfy π1, π2 ≥0 and π1 + π2 = 1. Finally, the subsequences sW m,ij are drawn from the following conditional distribution: p(sW m,ij|tm, zm,ij, {Θk}K k=1, θ0) = p(sW m,ij|θ0)zm,ij1 K Y k=1 (p(sW m,ij|Θk)zm,ij2)tm,k, (5) where p(sW m,ij|θ0) = W Y w=1 4 Y l=1 θ δ(l,sm,i(j+w−1)) 0l , p(sW m,ij|Θk) = W Y w=1 4 Y l=1 Θ δ(l,sm,i(j+w−1)) k,wl , 3 where δ(l, sm,i(j+w−1)) is an indicator function which equals 1 if sm,i(j+w−1) = l, and otherwise 0. Here, the background model is specified by the 0th-order Markov chain for notational simplicity. Several assumptions simplify this generative model. First, the width W of the motif model and the number K of set clusters are assumed to be known and fixed. Second, the mixture weights π together with the background model θ0 are treated as parameters to be estimated. We assume the hyperparameters α and β are set to fixed and known constants. The full set of parameters and hyperparameters will be denoted by Φ = {α, β, π, θ0}. Extension to double stranded DNA sequences is obvious and omitted here due to the lack of space. Our model builds upon the existing TCM model proposed by [5] where the EM algorithm is applied to learn a motif on a single target set. This model actually generates subsequences instead of sequences themselves. An alternative model which explicitly generates sequences has been proposed based on Gibbs sampling [7, 8]. Note that our model is reduced to the TCM model if K, the number of set clusters, is set to one. Our model shares some similarities with the recent Bayesian hierarchical model in [9] which also uses a mixture model to cluster discovered motifs. The main difference is that they focus on clustering motifs already discovered, and in our formulation, we try to cluster sequence sets and discover motifs simultaneously. 4 Inference by Gibbs sampling We find the configurations of Z and T by maximizing the posterior distribution over latent variables: Z∗, T ∗= arg max Z,T p(Z, T |S, Φ). (6) To this end, we use Gibbs sampling to find the posterior modes by drawing samples repeatedly from the posterior distribution over Z and T . We will derive a Gibbs sampler for our generative model in which the set mixture weights v and motif models {Θk}K k=1 are integrated out to improve the convergence rate and the cost per iteration [8]. The critical quantities needed to implement the Gibbs sampler are the full conditional distributions for Z and T . We first derive the relevant full conditional distribution over tm conditioned on the set cluster assignments of all other sets, T\m, the latent positions Z, and the observed sets S. By applying Bayes’ rule, Fig. 2 implies that this distribution factorizes as follows: p(tm,k = 1|T\m, S, Z, Φ) ∝ p(tm,k = 1|T\m, α)p(Sm, Zm|T , S\m, Z\m, Φ), (7) where Z\m denotes the entries of Z other than Zm = {zm,i}Lm i=1, and S\m is similarly defined. The first term represents the predictive distribution of tm given the other set cluster assignments T\m, and is given by marginalizing the set mixture weights v: p(tm,k = 1|T\m, α) = Z v p(tm,k = 1|v)p(v|T\m, α)dv = N −m k + αk K M −1 + αk (8) where N −m k = P n̸=m δ(tn,k, 1). Note that N −m k counts the number of sets currently assigned to the kth set cluster excluding the mth set. The model’s Markov structure implies that the second term of (7) depends on the current assignments T\m as follows: p(Sm, Zm|tm,k = 1, T\m, S\m, Z\m, Φ) = Z Θk p(Sm, Zm|tm,k = 1, Θk, Φ)p(Θk|{Sn, Zn|tn,k = 1, n ̸= m}, Φ)dΘk =   Lm Y i=1 Y j∈Im,i p(zm,ij|π) Y j∈Im,i;zm,ij2=0 p(sW m,ij|zm,ij2 = 0, θ0)   " W Y w=1 Γ(P l(N −m wl + βl)) Γ(P l(Nwl + βl)) Q l Γ(Nwl + βl) Q l Γ(N −m wl + βl) # , (9) 4 where Nwl = N −m wl + N m wl and N −m wl = X tn,k=1,n̸=m Ln X i=1 X j∈In,i,zn,ij2=1 δ(sn,i(j+w−1), l) N m wl = Lm X i=1 X j∈Im,i,zm,ij2=1 δ(sm,i(j+w−1), l). Note that N −m wl counts the number of letter l at position w within currently assigned binding sites excluding the ones of the mth set. Similarly, N m wl denotes the number of letter l at position w within bindings sites of the mth set. We next derive the full conditional distribution of zm,ij given the remainder of the variables. Integrating over the motif model Θk, we then have the following factorization: p(zm,ij|Z\m,ij, S, tm,k = 1, T\m, Φ) ∝ Z Θk Y tn,k=1 p(Zn, Sn|Θk)p(Θk|β)dΘk ∝  Y tn,k=1 Ln Y i=1 In,i Y j=1 p(zn,ij|π) Ln Y i=1 Y j∈In,i,zn,ij2=0 p(sW n,ij|θ0)   " W Y w=1 Q l Γ(Nwl + βl) Γ(P l(Nwl + βl)) # ,(10) where Z\m,ij denotes the entries of Z other than zm,ij. For the purpose of sampling, the ratio of the posterior distribution of zm,ij is given by: p(zm,ij2 = 1|Z\m,ij, S, T , Φ) p(zm,ij2 = 0|Z\m,ij, S, T , Φ) = π2 π1p(sW m,ij|θ0) W Y w=1 P4 l=1(N −m,ij wl + β)δ(sm,i(j+w−1), l) P4 l=1(N −m,ij wl + β) , where N −m,ij wl = P tn,k=1 PLn i=1 P j′∈In,i,j′̸=j,zn,ij′2=1 δ(sn,i(j′+w−1), l). Note that N −m,ij wl denotes the number of letter l at position w within currently assigned binding sites other than zm,ij. Combining (7) with (10) is sufficient to define the Gibbs sampler for our finite mixture model. To provide a convergence measure, we derive the following objective function based on the log of the posterior distribution: log p(Z, T |S, Φ) ∝log p(Z, T , S|Φ) ∝ M X m=1 Lm X i=1 Im,i X j=1 log p(zm,ij|π) + M X m=1 Lm X i=1 X j∈Imi;zm,ij2=0 log p(sW m,ij|θ0) + K X k=1 W X w=1 (X l log Γ(N k wl + βl) −log Γ( X l (N k wl + βl)) ) + K X k=1 log Γ(Nk + αk K ), (11) where Nk = P m δ(tm,k, 1) and N k wl = P tm,k=1 PLm i=1 P j∈Im,i,zm,ij2=1 δ(sm,i(j+w−1), l). 5 Results We evaluated our motif-finding algorithm on the three different tasks: (1) filtering out undesirable noisy sequences, (2) incorporating evolutionary conservation information, and (3) clustering DNA sequences based on the learned motifs (Fig. 3). In the all experiments, we fixed the hyper-parameters so that αk = 1 and βl = 0.5. 5.1 Data sets and evaluation criteria We first examined the yeast ChIP-chip data published by [10] to investigate the effect of filtering out noisy sequences from input sequences on identifying true binding sites. We compiled 156 sequencesets by choosing TFs having consensus motifs in the literature [11]. For each sequence-set, we defined its sequences to be probe sequences that are bound with P-value ≤0.001. 5 (a) Filtering out noisy sequences (b) Evolutionary conservation (c) Motif-based clustering Figure 3: Three different ways of constructing multiple sequence sets. Black rectangles: sequence sets, Blue bars: sequences, Red dashed rectangles: set clusters, Red and green rectangles: motifs. To apply our algorithm into the comparative motif discovery problem, we compiled orthologous sequences for each probe sequence of the yeast ChIP-chip data based on the multiple alignments of seven species of Saccharomyces (S. cerevisiae, S. paradoxus, S. mikatae, S. kudriavzevii, S. bayanus, S. castelli, and S. kluyveri) [12]. In the experiments using the ChIP-chip data, the motif width was set to 8 and a fifth-order Markov chain estimated from the whole yeast intergenic sequences was used to describe the background model. We fixed the mixture weights π so that π2 = 0.001. We next constructed the ChIP-seq data for human neuron-restrictive silence factor (NRSF) to determine whether our algorithm can be applied to partition DNA sequences into biologically meaningful clusters [13]. The data consist of 200 sequence segments of length 100 from all peak sites with the top 10% binding intensity (≥500 ChIP-seq reads), where most sequences have canonical NRSFbinding sites. We also added 13 sequence segments extracted from peak sites (≥300 reads) known to have noncanonical NRSF-binding sites, resulting in 213 sequences. In the experiment using the ChIP-seq data, the motif width was set to 30 and a zero-order Markov chain estimated from the 213 sequence segments was used to describe the background model. We fixed the mixture weights π so that π2 = 0.005. In the experiments using the yeast ChIP-chip data, we used the inter-motif distance to measure the quality of discovered motifs [10]. Specifically, an algorithm will be called successful on a sequence set only if at least one of the position-frequency matrices constructed from the identified binding sites is at a distance less than 0.25 from the literature consensus [14]. 5.2 Filtering out noisy sequences Selecting target sequences from the ChIP-chip measurements is largely left to users and this choice is often unclear. Our strategy of constructing sequence-sets based on the binding P-value cutoff would be exposed to danger of including many irrelevant sequences. In practice, the inclusion of noisy sequences in the target set is a serious obstacle in the success of motif discovery. One possible solution is to cluster input sequences into two smaller sets of target and noisy sequences based on sequence similarity, and predict motifs from the clustered target sequences with the improved signal-to-noise ratio. This two-step approach has been applied to only protein sequences because DNA sequences do not share much similarity for effective clustering [15]. One alternative approach is to seek a better sequence representation based on motifs. To this end, we constructed multiple sets by treating each sequence of a particular yeast ChIP-chip sequence-set as one set (Fig. 3(a)). We examined the ability of our algorithm to find a correct motif with two different numbers of clusters: K = 1 (without filtering) and K = 2 (clustering into two subsets of true and noisy sequences). We ran each experiment five times with different initializations and reported means with ±1 standard error. Figure 4 shows that the filtering approach (K = 2) outperforms the baseline method (K = 1) in general, with the increasing value of the P-value cutoff. Note that the ZOOPS or TCM models can also handle noisy sequences by modeling them with only a background model [5, 6]. But we allow noisy sequences to have a decoy motif (randomly occurring sequence 6 Figure 4: Effect of filtering out noisy sequences on the number of successfully identified motifs on the yeast ChIP-chip data. K = 1: without filtering, K = 2: clustering into two subsets. patterns or repeating elements) which is modeled with a motif model. Because our model can be reduced to these classic models by setting K = 1, we concluded that noisy sequences were better represented by our clustering approach than the previous ones using the background model (Fig. 4). Two additional lines of evidence indicated that our filtering approach enhances the signal-to-noise ratio of the target set. First, we compared the results of our filtering approach with that of other baseline methods (AlignAce [16], MEME [6], MDScan [17], and PRIORITY-U [11]) on the same yeast ChIP-chip data. For AlignAce, MEME and MDScan, we used the results reported by [14]; for PRIORITY-U, we used two different results reported by [14, 11] according to different sampling strategy. We expected that our model would perform better than these four methods because they try to remove noisy sequences based on the classic models. By comparing the results of Fig. 4 and Table 1, we see that our algorithm still performs better. Second, we also compared our model with DRIM specifically designed to dynamically select the target set from the list of sorted sequences according to the binding P-values of ChIP-chip measurements. For DRIM, we used the result reported by [18]. Because DRIM does not produce any motifs when they are not statistically enriched at the top of the ranked list, we counted the number of successfully identified motifs on the sequence-sets where DRIM generated significant motifs. Our method (number of successes is 16) was slightly better than DRIM (number of successes is 15). 5.3 Detecting evolutionary conserved motifs Comparative approach using evolutionary conservation information has been widely used to improve the performance of motif-finding algorithms because functional TF binding sites are likely to be conserved in orthologous sequences. To incorporate conservation information into our clustering framework, orthologous sequences of each sequence of a particular yeast ChIP-chip sequence-set were considered as one set and the number of clusters was set to 2 (Fig. 3(b)). The constructed sets contain at most 7 sequences because we only used seven species of Saccharomyces. We used the single result with the highest objective function value of (11) among five runs and compared it with the results of five conservation-based motif finding algorithms on the same data set: MEME c [10], PhyloCon [19], PhyMe [20], PhyloGibbs [21], PRIORITY-C [11]. For the five methods, we used the results reported by [11]. We did not compare with discriminative methods which are known to perform better at this data set because our model does not use negative sequences. Table 1 presents the motif-finding performance in terms of the number of correctly identified motifs for each algorithm. We see that our algorithm greatly outperforms the four alignment-based methods which rely on multiple or pair-wise alignments of orthologous sequences to search for motifs that are conserved across the aligned blocks of orthologous sequences. In our opinion, it is because diverged regions other than the short conserved binding sites may prevent a correct alignment. Moreover, our algorithm performs somewhat better than PRIORITY-C, which is a recent alignment-free method. We believe that it is because the signal-to-noise ratio of the input target set is enhanced by clustering. 5.4 Clustering DNA sequences based on motifs To examine the ability of our algorithm to partition DNA sequences into biologically meaningful clusters, we applied our algorithm to the NRSF ChIP-seq data which are assumed to have two 7 Table 1: Comparison of the number of successfully identified motifs on the yeast ChIP-chip data for different methods. NC: Non-conservation, EC: Evolutionary conservation, A: Alignment-based, AF: Alignment-free, C: Clustering. Method Description # of successes AlignAce NC 16 MEME NC 35 MDScan NC 54 PRIORITY-U NC 46-58 MEME c EC + A 49 PhyloCon EC + A 19 PhyME EC + A 21 PhyloGibbs EC + A 54 PRIORITY-C EC + AF 69 This work EC + AF + C 75 (a) Canonical NRSF motif (b) Noncanonical NRSF motif Figure 5: Sequence logo of discovered NRSF motifs. different NRSF motifs (Fig. 3(c)). In this experiment, we have already known the number of clusters (K = 2). We ran our algorithm five times with different initializations and reported the one with the highest objective function value. Position-frequency matrices of two clusters are shown in Fig. 5. The two motifs correspond directly to the previously known motifs (canonical and non-canonical NRSF motifs). However, other motif-finding algorithms such as MEME could not return the noncanonical motif enriched in a very small set of sequences. These observations suggest that our motif-driven clustering approach is effective at inferring latent clusters of DNA sequences and can be used to find unexpected novel motifs. 6 Conclusions In this paper, we have presented a generative probabilistic framework for DNA motif discovery using multiple sets of sequences where we cluster DNA sequences and learn motifs interactively. We have presented a finite mixture model with two different types of latent variables, in which one is associated with cluster-indicators and the other corresponds to motifs (transcription factor binding sites). These two types of latent variables are inferred alternatively using multiple sets of sequences. Our empirical results show that the proposed method can be applied to various motif discovery problems, depending on how to construct the multiple sets. In the future, we will explore several other extensions. For example, it would be interesting to examine the possibility of learning the number of clusters from data based on Dirichlet process mixture models, or to extend our probabilistic framework for discriminative motif discovery. Acknowledgments: We thank Raluca Gordˆan for providing the literature consensus motifs and the script to compute the inter-motif distance. This work was supported by National Core Research Center for Systems Bio-Dynamics funded by Korea NRF (Project No. 2009-0091509) and WCU Program (Project No. R31-2008000-10100-0). JKK was supported by a Microsoft Research Asia fellowship. 8 References [1] G. D. Stormo. DNA binding sites: representation and discovery. Bioinformatics, 16:16–23, 2000. [2] W. W. Wasserman and A. Sandelin. Applied bioinformatics for the identification of regulatory elements. Nature Review Genetics, 5:276–287, 2004. [3] E. Segal, Y. Barash, I. Simon, N. Friedman, and D. Koller. From promoter sequence to expression: a probabilistic framework. In Proceedings of the International Conference on Research in Computational Molecular Biology, pages 263–272, 2002. [4] G. Badis, M. F. Berger, A. A. Philippakis, S. Talukder, A. R. Gehrke, S. A. Jaeger, E. T. Chan, G. Metzler, A. Vedenko, X. Chen, H. Kuznetsov, C. F. Wang, D. Coburn, D. E. Newburger, Q. Morris, T. R. Hughes, and M. L. Bulyk. Diversity and complexity in DNA recognition by transcription factors. Science, 324:1720–1723, 2009. [5] T. L. Bailey and C. Elkan. Fitting a mixture model by expectation maximization to discover motifs in biopolymers. In Proceedings of the International Conference Intelligent Systems for Molecular Biology, 1994. [6] T. L. Bailey and C. Elkan. The value of prior knowledge in discovering motifs with MEME. In Proceedings of the International Conference Intelligent Systems for Molecular Biology, 1995. [7] C. E. Lawrence, S. F. Altschul, M. S. Boguski, J. S. Liu, A. F. Neuwald, and J. C. Wootton. Detecting subtle sequence signals: a Gibbs sampling strategy for multiple alignment. Science, 262:208–214, 1993. [8] J. S. Liu, A. F. Neuwald, and C. E. Lawrence. Bayesian models for multiple local sequence alignment and Gibbs sampling strategies. Journal of the American Statistical Association, 90:1156–1170, 1995. [9] S. T. Jensen and J. S. Liu. Bayesian clustering of transcription factor binding motifs. Journal of the American Statistical Association, 103:188–200, 2008. [10] C. T. Harbison, D. B. Gordon, T. I. Lee, N. J. Rinaldi, K. D. Macisaac, T. W. Danford, N. M. Hannett, J. B. Tagne, D. B. Reynolds, J. Yoo, E. G. Jennings, J. Zeitlinger, D. K. Pokholok, M. Kellis, P. A. Rolfe, K. T. Takusagawa, E. S. Lander, D. K. Gifford, E. Fraenkel, and R. A. Young. Transcriptional regulatory code of a eukaryotic genome. Nature, 431:99–104, 2004. [11] R. Gordan, L. Narlikar, and A. J. Hartemink. A fast, alignment-free, conservation-based method for transcription factor binding site discovery. In Proceedings of the International Conference on Research in Computational Molecular Biology, pages 98–111, 2008. [12] A. Siepel, G. Bejerano, J. S. Pedersen, A. S. Hinrichs, M. Hou, K. Rosenbloom, H. Clawson, J. Spieth, L. W. Hillier, S. Richards, G. M. Weinstock, R. K. Wilson, R. A. Gibbs, W. J. Kent, W. Miller, and D. Haussler. Evolutionarily conserved elements in vertebrate, insect, worm, and yeast genomes. Genome Research, 15:1034–1050, 2005. [13] D. S. Johnson, A. Mortazavi, R. M. Myers, and B. Wold. Genome-wide mapping of in vivo protein-DNA interactions. Science, 316:1497–1502, 2007. [14] L. Narlikar, R. Gordan, and A. J. Hartemink. Nucleosome occupancy information improves de novo motif discovery. In Proceedings of the International Conference on Research in Computational Molecular Biology, pages 107–121, 2007. [15] S. Kim, Z. Wang, and M. Dalkilic. igibbs: improving gibbs motif sampler for proteins by sequence clustering and iterative pattern sampling. Proteins, 66:671–681, 2007. [16] F. P. Roth, J. D. Hughes, P. W. Estep, and G. M. Church. Finding DNA regulatory motifs within unaligned noncoding sequences clustered by whole-genome mRNA quantitation. Nature Biotechnology, 16:939– 945, 1998. [17] X. S. Liu, D. L. Brutlag, and J. S. Liu. An algorithm for finding protein-DNA binding sites with applications to chromatin-immunoprecipitation microarray experiments. Nature Biotechnology, 20:835–839, 2002. [18] E. Eden, D. Lipson, S. Yogev, and Z. Yakhini. Discovering motifs in ranked lists of DNA sequences. PLoS Computational Biology, 3:e39, 2007. [19] T. Wang and G. D. Stormo. Combining phylogenetic data with co-regulated genes to identify regulatory motifs. Bioinformatics, 19:2369–2380, 2003. [20] S. Sinha, M. Blanchette, and M. Tompa. PhyME: a probabilistic algorithm for finding motifs in sets of orthologous sequences. BMC Bioinformatics, 5:170, 2004. [21] R. Siddharthan, E. D. Siggia, and E. van Nimwegen. PhyloGibbs: a gibbs sampling motif finder that incorporates phylogeny. PLoS Computational Biology, 1:e67, 2005. 9
2009
83
3,836
Bayesian Nonparametric Models on Decomposable Graphs Franc¸ois Caron INRIA Bordeaux Sud–Ouest Institut de Math´ematiques de Bordeaux University of Bordeaux, France francois.caron@inria.fr Arnaud Doucet Departments of Computer Science & Statistics University of British Columbia, Vancouver, Canada and The Institute of Statistical Mathematics Tokyo, Japan arnaud@cs.ubc.ca Abstract Over recent years Dirichlet processes and the associated Chinese restaurant process (CRP) have found many applications in clustering while the Indian buffet process (IBP) is increasingly used to describe latent feature models. These models are attractive because they ensure exchangeability (over samples). We propose here extensions of these models where the dependency between samples is given by a known decomposable graph. These models have appealing properties and can be easily learned using Monte Carlo techniques. 1 Motivation The CRP and IBP have found numerous applications in machine learning over recent years [5, 10]. We consider here the case where the data we are interested in are ‘locally’ dependent; these dependencies being represented by a known graph G where each data point/object is associated to a vertex. These local dependencies can correspond to any conceptual or real (e.g. space, time) metric. For example, in the context of clustering, we might want to propose a prior distribution on partitions enforcing that data which are ‘close’ in the graph are more likely to be in the same cluster. Similarly, in the context of latent feature models, we might be interested in a prior distribution on features enforcing that data which are ‘close’ in the graph are more likely to possess similar features. The ‘standard’ CRP and IBP correspond to the case where the graph G is complete; that is it is fully connected. In this paper, we generalize the CRP and IBP to decomposable graphs. The resulting generalized versions of the CRP and IBP enjoy attractive properties. Each clique of the graph follows marginally a CRP or an IBP process and explicit expressions for the joint prior distribution on the graph is available. It makes it easy to learn those models using straightforward generalizations of Markov chain Monte Carlo (MCMC) or Sequential Monte Carlo (SMC) algorithms proposed to perform inference for the CRP and IBP [5, 10, 14]. The rest of the paper is organized as follows. In Section 2, we review the popular Dirichlet multinomial allocation model and the Dirichlet Process (DP) partition distribution. We propose an extension of these two models to decomposable graphical models. In Section 3 we discuss nonparametric latent feature models, reviewing briefly the construction in [5] and extending it to decomposable graphs. We demonstrate these models in Section 4 on two applications: an alternative to the hierarchical DP model [12] and a time-varying matrix factorization problem. 2 Prior distributions for partitions on decomposable graphs Assume we have n observations. When performing clustering, we associate to each of this observation an allocation variable zi ∈[K] = {1, . . . , K}. Let Πn be the partition of [n] = {1, . . . , n} defined by the equivalence relation i ↔j ⇔zi = zj. The resulting partition Πn = {A1, . . . , An(Πn)} 1 is an unordered collection of disjoint non-empty subsets Aj of [n], j = 1, . . . , n(Πn), where ∪jAj = [n] and n(Πn) is the number of subsets for partition Πn. We also denote by Pn be the set of all partitions of [n] and let nj, j = 1, . . . , n(Πn), be the size of the subset Aj. Each allocation variable zi is associated to a vertex/site of an undirected graph G, which is assumed to be known. In the standard case where the graph G is complete, we first review briefly here two popular prior distributions on z1:n, equivalently on Πn. We then extend these models to undirected decomposable graphs; see [2, 8] for an introduction to decomposable graphs. Finally we briefly discuss the directed case. Note that the models proposed here are completely different from the hyper multinomial-Dirichlet in [2] and its recent DP extension [6]. 2.1 Dirichlet multinomial allocation model and DP partition distribution Assume for the time being that K is finite. When the graph is complete, a popular choice for the allocation variables is to consider a Dirichlet multinomial allocation model [11] π ∼D( θ K , . . . , θ K ), zi|π ∼π (1) where D is the standard Dirichlet distribution and θ > 0. Integrating out π, we obtain the following Dirichlet multinomial prior distribution Pr(z1:n) = Γ(θ) QK j=1 Γ(nj + θ K ) Γ(θ + n)Γ( θ K )K (2) and then, using the straightforward equality Pr(Πn) = K! (K−n(Πn))! Pr(z1:n) valid for for all Πn ∈ PK where PK = {Πn ∈Pn|n(Πn) ≤K}, we obtain Pr(Πn) = K! (K −n(Πn))! Γ(θ) Qn(Πn) j=1 Γ(nj + θ K ) Γ(θ + n)Γ( θ K )n(Πn) . (3) DP may be seen as a generalization of the Dirichlet multinomial model when the number of components K →∞; see for example [10]. In this case the distribution over the partition Πn of [n] is given by [11] Pr(Πn) = θn(Πn) Qn(Πn) j=1 Γ(nj) Qn i=1(θ + i −1) . (4) Let Π−k = {A1,−k, . . . , An(Π−k),−k} be the partition induced by removing item k to Πn and nj,−k be the size of cluster j for j = 1, . . . , n(Π−k). It follows from (4) that an item k is assigned to an existing cluster j, j = 1, . . . , n(Π−k), with probability proportional to nj,−k/ (n −1 + θ) and forms a new cluster with probability θ/ (n −1 + θ). This property is the basis of the CRP. We now extend the Dirichlet multinomial allocation and the DP partition distribution models to decomposable graphs. 2.2 Markov combination of Dirichlet multinomial and DP partition distributions Let G be a decomposable undirected graph, C = {C1, . . . , Cp} a perfect ordering of the cliques and S = {S2, . . . , Cp} the associated separators. It can be easily checked that if the marginal distribution of zC for each clique C ∈C is defined by (2) then these distributions are consistent as they yield the same distribution (2) over the separators. Therefore, the unique Markov distribution over G with Dirichlet multinomial distribution over the cliques is defined by [8] Pr(z1:n) = Q C∈C Pr(zC) Q S∈S Pr(zS) (5) where for each complete set B ⊆G, we have Pr(zB) given by (2). It follows that we have for any Πn ∈PK Pr(Πn) = K! (K −n(Πn))! Q C∈C Γ(θ) Q K j=1 Γ(nj,C+ θ K ) Γ(θ+nC)Γ( θ K )K Q S∈S Γ(θ) Q K j=1 Γ(nj,S+ θ K ) Γ(θ+nS)Γ( θ K )K (6) 2 where for each complete set B ⊆G, nj,B is the number of items associated to cluster j, j = 1, . . . , K in B and nB is the total number of items in B. Within each complete set B, the allocation variables define a partition distributed according to the Dirichlet-multinomial distribution. We now extend this approach to DP partition distributions; that is we derive a joint distribution over Πn such that the distribution of ΠB over each complete set B of the graph is given by (4) with θ > 0. Such a distribution satisfies the consistency condition over the separators as the restriction of any partition distributed according to (4) still follows (4) [7]. Proposition. Let PG n be the set of partitions Πn ∈Pn such that for each decomposition A, B, and any (i, j) ∈A × B, i ↔j ⇒∃k ∈A ∩B such that k ↔i ↔j. As K →∞, the prior distribution over partitions (6) is given for each Πn ∈PG n by Pr(Πn) = θn(Πn) Q C∈C Q n(ΠC ) j=1 Γ(nj,C) Q nC i=1(θ+i−1) Q S∈S Q n(ΠS ) j=1 Γ(nj,S) Q nS i=1(θ+i−1) (7) where n(ΠB) is the number of clusters in the complete set B. Proof. From (6), we have Pr(Πn) = K(K −1) . . . (K −n(Πn) + 1) K P C∈C n(ΠC)−P S∈S n(ΠS) Q C∈C θn(ΠC ) Q n(ΠC ) j=1 Γ(nj,C+ θ K ) Q nC i=1(θ+i−1) Q S∈S θn(ΠS ) Q n(ΠS ) j=1 Γ(nj,S+ θ K ) Q nS i=1(θ+i−1) Thus when K →∞, we obtain (7) if n(Πn) = P C∈C n(ΠC) −P S∈S n(ΠS) and 0 otherwise. We have n(Πn) ≤P C∈C n(ΠC) −P S∈S n(ΠS) for any Πn ∈Pn and the subset of Pn verifying n(Πn) = P C∈C n(ΠC) −P S∈S n(ΠS) corresponds to the set PG n .■ Example. Let the notation i ∼j (resp. i ≁j) indicates an edge (resp. no edge) between two sites. Let n = 3 and G be the decomposable graph defined by the relations 1 ∼2, 2 ∼3 and 1 ≁3. The set PG 3 is then equal to {{{1, 2, 3}}; {{1, 2}, {3}}; {{1}, {2, 3}}; {{1}, {2}, {3}}}. Note that the partition {{1, 3}, {2}} does not belong to PG 3 . Indeed, as there is no edge between 1 and 3, they cannot be in the same cluster if 2 is in another cluster. The cliques are C1 = {1, 2} and C2 = {2, 3} and the separator is S2 = {2}. The distribution is given by Pr(Π3) = Pr(ΠC1) Pr(ΠC2) Pr(ΠS2) hence we can check that we obtain Pr({1, 2, 3}) = (θ + 1)−2, Pr({1, 2}, {3}) = Pr({1, 2}, {3}) = θ(θ + 1)−2 and Pr({1}, {2}, {3}) = θ2(θ + 1)−2.■ Let now define the full conditional distributions. Based on (7) the conditional assignment of an item k is proportional to the conditional over the cliques divided by the conditional over the separators. Let denote G−k the undirected graph obtained by removing vertex k from G. Suppose that Πn ∈PG n . If Π−k /∈PG−k n−1, then do not change the value of item k. Otherwise, item k is assigned to cluster j where j = 1, . . . , n(Π−k) with probability proportional to Q {C∈C|n−k,j,C>0} n−k,j,C Q {S∈S|n−k,j,S>0} n−k,j,S (8) and to a new cluster with probability proportional to θ, where n−k,j,C is the number of items in the set C \ {k} belonging to cluster j. The updating process is illustrated by the Chinese wedding party process1 in Fig. 1. The results of this section can be extended to the Pitman-Yor process, and more generally to species sampling models. Example (continuing). Given Π−2 = {A1 = {1}, A2 = {3}}, we have Pr(item 2 assigned to A1 = {1}| Π−2) = Pr(item 2 assigned to A2 = {3}| Π−2) = (θ + 2)−1 and Pr(item 2 assigned to new cluster A3| Π−2) = θ (θ + 2)−1. Given Π−2 = {A1 = {1, 3}}, item 2 is assigned to A1 with probability 1.■ 1Note that this representation describes the full conditionals while the CRP represents the sequential updating. 3 (a) (b) (c) (d) (e) Figure 1: Chinese wedding party. Consider a group of n guests attending a wedding party. Each of the n guests may belong to one or several cliques, i.e. maximal groups of people such that everybody knows everybody. The belonging of each guest to the different cliques is represented by color patches on the figures, and the graphical representation of the relationship between the guests is represented by the graphical model (e). (a) Suppose that the guests are already seated such that two guests cannot be together at the same table is they are not part of the same clique, or if there does not exist a group of other guests such that they are related (“Any friend of yours is a friend of mine”). (b) The guest number k leaves his table and either (c) joins a table where there are guests from the same clique as him, with probability proportional to the product of the number of guests from each clique over the product of the number of guests belonging to several cliques on that table or (d) he joins a new table with probability proportional to θ. 2.3 Monte Carlo inference 2.3.1 MCMC algorithm Using the full conditionals, a single site Gibbs sampler can easily be designed to approximate the posterior distribution Pr(Πn|z1:n). Given a partition Πn, an item k is taken out of the partition. If Π−k /∈PG−k n−1, item k keeps the same value. Otherwise, the item will be assigned to a cluster j, j = 1, . . . , n(Π−k), with probability proportional to p(z{k}∪Aj,−k) p(zAj,−k) × Q {C∈C|n−k,j,C>0} n−k,j,C Q {S∈S|n−k,j,S>0} n−k,j,S (9) and the item will be assigned to a new cluster with probability proportional to p(z{k})×θ. Similarly to [3], we can also define a procedure to sample from p(θ|n(Πn) = k)). We assume that θ ∼G(a, b) and use p auxiliary variables x1, . . . , xp. The procedure is as follows. • For j = 1, . . . , p, sample xj|k, θ ∼Beta(θ + nSj, nCj −nSj) • Sample θ|k, x1:p ∼G(a + k, b −P j log xj) 2.3.2 Sequential Monte Carlo We have so far only treated the case of an undirected decomposable graph G. We can formulate a sequential updating rule for the corresponding perfect directed version D of G. Indeed, let (a1, . . . a|V |) be a perfect ordering and pa(ak) be the set of parents of ak which is by definition complete. Let Πk−1 = {A1,k−1, . . . , An(Πk−1),k−1} denote the partition of the first k−1 vertices a1:k−1 and let nj,pa(ak) be the number of elements with value j in the set pa(ak), j = 1, . . . , n(Πk−1). Then the vertex ak joins the set j with probability nj,pa(ak)/ ³ θ + P q nq,pa(ak) ´ and creates a new cluster with probability θ/ ³ θ + P q nq,pa(ak) ´ . One can then design a particle filter/SMC method in a similar fashion as [4]. Consider a set of N particles Π(i) k−1 with weights w(i) k−1 ∝Pr(Π(i) k−1, z1:k−1) (PN i=1 w(i) k−1 = 1) that approximate the posterior distribution Pr(Πk−1|z1:k−1). For each particle i, there are n(Π(i) k−1) + 1 possible 4 allocations for component ak. We denote eΠ(i,j) k the partition obtained by associating component ak to cluster j. The weight associated to eΠ(i,j) k is given by ew(i,j) k−1 = w(i) k−1 p(z{ak}∪Aj,k−1) p(zAj,k−1) ×    nj,pa(ak) θ+P q nq,pa(ak) if j = 1, . . . , n(Π(i) k−1) θ θ+P q nq,pa(ak) if j = n(Π(i) k−1) + 1 (10) Then we can perform a deterministic resampling step by keeping the N particles eΠ(i,j) k with highest weights ew(i,j) k−1. Let Π(i) k be the resampled particles and w(i) k the associated normalized weights. 3 Prior distributions for infinite binary matrices on decomposable graphs Assume we have n objects; each of these objects being associated to the vertex of a graph G. To each object is associated a K-dimensional binary vector zn = (zn,1, . . . , zn,K) ∈{0, 1}K where zn,i = 1 if object n possesses feature i and zn,i = 0 otherwise. These vectors zt form a binary n × K matrix denoted Z1:n. We denote by ξ1:n the associated equivalence class of left-ordered matrices and let EK be the set of left-ordered matrices with at most K features. In the standard case where the graph G is complete, we review briefly here two popular prior distributions on Z1:n, equivalently on ξ1:n: the Beta-Bernoulli model and the IBP [5]. We then extend these models to undirected decomposable graphs. This can be used for example to define a time-varying IBP as illustrated in Section 4. 3.1 Beta-Bernoulli and IBP distributions The Beta-Bernoulli distribution over the allocation Z1:n is Pr(Z1:n) = K Y j=1 α K Γ(nj + α K )Γ(n −nj + 1) Γ(n + 1 + α K ) (11) where nj is the number of objects having feature j. It follows that Pr(ξ1:n) = K! Q2n−1 h=0 Kh! K Y j=1 α K Γ(nj + α K )Γ(n −nj + 1) Γ(n + 1 + α K ) (12) where Kh is the number of features possessing the history h (see [5] for details). The nonparametric model is obtained by taking the limit when K →∞ Pr(ξ1:n) = αK+ Q2n−1 h=1 Kh! exp(−αHn) K+ Y j=1 (n −nj)!(nj −1)! n! (13) where K+ is the total number of features and Hn = Pn k=1 1 k. The IBP follows from (13). 3.2 Markov combination of Beta-Bernoulli and IBP distributions Let G be a decomposable undirected graph, C = {C1, . . . , Cp} a perfect ordering of the cliques and S = {S2, . . . , Cp} the associated separators. As in the Dirichlet-multinomial case, it is easily seen that if for each clique C ∈C, the marginal distribution is defined by (11), then these distributions are consistent as they yield the same distribution (11) over the separators. Therefore, the unique Markov distribution over G with Beta-Bernoulli distribution over the cliques is defined by [8] Pr(Z1:n) = Q C∈C Pr(ZC) Q S∈S Pr(ZS) (14) where Pr(ZB) given by (11) for each complete set B ⊆G. The prior over ξ1:n is thus given, for ξ1:n ∈EK, by Pr(ξ1:n) = K! Q2n−1 h=0 Kh! Q C∈C QK j=1 α K Γ(nj,C+ α K )Γ(nC−nj,C+1) Γ(nC+1+ α K ) Q S∈S QK j=1 α K Γ(nj,S+ α K )Γ(nS−nj,S+1) Γ(nS+1+ α K ) (15) 5 where for each complete set B ⊆G, nj,B is the number of items having feature j, j = 1, . . . , K in the set B and nB is the whole set of objects in set B. Taking the limit when K →∞, we obtain after a few calculations Pr(ξ1:n) = αK+ [n] exp [−α (P C HnC −P S HnS)] Q2n−1 h=1 Kh! × Q C∈C QK+ C j=1 (nC−nj,C)!(nj,C−1)! nC! Q S∈S QK+ S j=1 (nS−nj,S)!(nj,S−1)! nS! if K+ [n] = P C K+ C −P S K+ S and 0 otherwise, where K+ B is the number of different features possessed by objects in B. Let EG n be the subset of En such that for each decomposition A, B and any (u, v) ∈A × B: {u and v possess feature j} ⇒∃k ∈A ∩B such that {k possesses feature j}. Let ξ−k be the left-ordered matrix obtained by removing object k from ξn and K+ −k be the total number of different features in ξ−k. For each feature j = 1, . . . , K+ −k, if ξ−k ∈EG−k n−1 then we have Pr(ξk,j = i) =    b Q C∈C nj,C Q S∈C nj,S if i = 1 b Q C∈C(nC−nj,C) Q S∈C(nS−nj,S) if i = 0 (16) where b is the appropriate normalizing constant then the customer k tries Poisson ³ α Q {S∈S|k∈S} nS Q {C∈C|k∈C} nC ´ new dishes. We can easily generalize this construction to a directed version D of G using arguments similar to those presented in Section 2; see Section 4 for an application to time-varying matrix factorization. 4 Applications 4.1 Sharing clusters among relative groups: An alternative to HDP Consider that we are given d groups with nj data yi,j in each group, i = 1, . . . , nj, j = 1, . . . , d. We consider latent cluster variables zi,j that define the partition of the data. We will use alternatively the notation θi,j = Uzi,j in the following. Hierarchical Dirichlet Process [12] (HDP) is a very popular model for sharing clusters among related groups. It is based on a hierarchy of DPs G0 ∼DP(γ, H), Gj|G0 ∼DP(α, G0) j = 1, . . . d θi,j|Gj ∼Gj, yi,j|θi,j ∼f (θi,j) i = 1, . . . , nj. Under conjugacy assumptions, G0, Gj and U can be integrated out and we can approximate the marginal posterior of (zi,j) given y = (yi,j) with Gibbs sampling using the Chinese restaurant franchise to sample from the full conditional p(zi,j|z−{i,j}, y). Using the graph formulation defined in Section 2, we propose an alternative to HDP. Let θ0,1, . . . , θ0,N be N auxiliary variables belonging to what we call group 0. We define each clique Cj (j = 1, . . . , d) to be composed of elements from group j and elements from group 0. This defines a decomposable graphical model whose separator is given by the elements of group 0. We can rewrite the model in a way quite similar to HDP G0 ∼DP(α, H), θ0,i|G0 ∼G0 i = 1, ..., N Gj|θ0,1, . . . , θ0,N ∼DP(α + N, α α+N H + α α+N PN i=1 δθ0,i) j = 1, . . . d, θi,j|Gj ∼Gj, yi,j|θi,j ∼f(θi,j) i = 1, . . . , nj For any subset A and j ̸= k ∈{1, . . . , p} we have corr(Gj(A), Gk(A)) = N α+N . Again, under conjugacy conditions, we can integrate out G0, Gj and U and approximate the marginal posterior distribution over the partition using the Chinese wedding party process defined in Section 2. Note that for latent variables zi,j, j = 1, . . . , d, associated to data, this is the usual CRP update. As in HDP, multiple layers can be added to the model. Figures 2 (a) and (b) resp. give the graphical DP alternative to HDP and 2-layer HDP. 6 root docs z0 z3 z2 z1 (a) Graphical DP alternative to HDP root docs corpora z2,3 z0 z2 z1 z1,1 z1,2 z2,1 z2,2 (b) Graphical DP alternative to 2-layer HDP Figure 2: Hierarchical Graphs of dependency with (a) one layer and (b) two layers of hierarchy. If N = 0, then Gj ∼DP(α, H) for all j and this is equivalent to setting γ →∞in HDP. If N →∞ then Gj = G0 for all j, G0 ∼DP(α, H). This is equivalent to setting α →∞in the HDP. One interesting feature of the model is that, contrary to HDP, the marginal distribution of Gj at any layer of the tree is DP(α, H). As a consequence, the total number of clusters scales logarithmically (as in the usual DP) with the size of each group, whereas it scales doubly logarithmically in HDP. Contrary to HDP, there are at most N clusters shared between different groups. Our model is in that sense reminiscent of [9] where only a limited number of clusters can be shared. Note however that contrary to [9] we have a simple CRP-like process. The proposed methodology can be straightforwardly extended to the infinite HMM [12]. The main issue of the proposed model is the setting of the number N of auxiliary parameters. Another issue is that to achieve high correlation, we need a large number of auxiliary variables. Nonetheless, the computational time used to sample from auxiliary variables is negligible compared to the time used for latent variables associated to data. Moreover, it can be easily parallelized. The model proposed offers a far richer framework and ensures that at each level of the tree, the marginal distribution of the partition is given by a DP partition model. 4.2 Time-varying matrix factorization Let X1:n be an observed matrix of dimension n×D. We want to find a representation of this matrix in terms of two latent matrices Z1:n of dimension n × K and Y of dimension K × D. Here Z1:n is a binary matrix whereas Y is a matrix of latent features. By assuming that Y ∼N ¡ 0, σ2 Y IK×D ¢ and X1:n = Z1:nY + σXεn where εn ∼N ¡ 0, σ2 XIn×D ¢ , we obtain p(X1:n|Z1:n) ∝ ¯¯¯Z+T 1:nZ+ 1:n + σ2 X/σ2 Y IK+ n ¯¯¯ −D/2 σ(n−K+ n )D X σK+ n D Y exp ½ −1 2σ2 X tr ¡ XT 1:nΣ−1 n X1:n ¢¾ (17) where Σ−1 n = I −Z+ 1:n ³ Z+T 1:nZ+ 1:n + σ2 X/σ2 Y IK+ n ´−1 Z+T 1:n, K+ n the number of non-zero columns of Z1:n and Z+ 1:n is the first K+ n columns of Z1:n. To avoid having to set K, [5, 14] assume that Z1:n follows an IBP. The resulting posterior distribution p(Z1:n|X1:n) can be estimated through MCMC [5] or SMC [14]. We consider here a different model where the object Xt is assumed to arrive at time index t and we want a prior distribution on Z1:n ensuring that objects close in time are more likely to possess similar features. To achieve this, we consider the simple directed graphical model D of Fig. 3 where the site numbering corresponds to a time index in that case and a perfect numbering of D is (1, 2, . . .). The set of parents pa(t) is composed of the r preceding sites {{t −r}, . . . , {t −1}}. The time-varying IBP to sample from p(Z1:n) associated to this directed graph follows from (16) and proceeds as follows. At time t = 1 • Sample Knew 1 ∼Poisson(α), set z1,i = 1 for i = 1, ..., Knew 1 and set K+ 1 = Knew. At times t = 2, . . . , r • For k = 1, . . . K+ t , sample zt,k ∼Ber( n1:t−1,k t ) and Knew t ∼Poisson( α t ). 7 t−1 t−r+1 t t+1 t−r . ..           ? 6 6   ? Figure 3: Directed graph. At times t = r + 1, . . . , n • For k = 1, . . . K+ t , sample zt,k ∼Ber( nt−r:t−1,k r+1 ) and Knew t ∼Poisson( α r+1). Here K+ t is the total number of features appearing from time max(1, t −r) to t −1 and nt−r:t−1,k the restriction of n1:t−1 to the r last customers. Using (17) and the prior distribution of Z1:n which can be sampled using the time-varying IBP described above, we can easily design an SMC method to sample from p(Z1:n|X1:n). We do not detail it here. Note that contrary to [14], our algorithm does not require inverting a matrix whose dimension grows linearly with the size of the data but only a matrix of dimension r×r. In order to illustrate the model and SMC algorithm, we create 200 6×6 images using a ground truth Y consisting of 4 different 6 × 6 latent images. The 200 × 4 binary matrix was generated from Pr(zt,k = 1) = πt,k, where πt = ( .6 .5 0 0 ) if t = 1, . . . , 30, πt = ( .4 .8 .4 0 ) if t = 31, . . . , 50 and πt = ( 0 .3 .6 .6 ) if t = 51, . . . , 200. The order of the model is set to r = 50. The feature occurences Z1:n and true features Y and their estimates are represented in Figure 4. Two spurious features are detected by the model (features 2 and 5 on Fig. 3(c)) but quickly discarded (Fig. 4(d)). The algorithm is able to correctly estimate the varying prior occurences of the features over time. Feature1 Feature2 Feature3 Feature4 (a) Feature Time 1 2 3 4 20 40 60 80 100 120 140 160 180 200 (b) Feature1 Feature2 Feature3 Feature4 Feature5 Feature6 (c) Feature Time 1 2 3 4 5 6 20 40 60 80 100 120 140 160 180 200 (d) Figure 4: (a) True features, (b) True features occurences, (c) MAP estimate ZMAP and (d) associated E[Y|ZMAP ] t=20 t=50 t=100 t=200 (a) t=20 t=50 t=100 t=200 (b) Figure 5: (a) E[Xt|πt, Y] and (b) E[Xt|X1:t−1] at t = 20, 50, 100, 200. 5 Related work and Discussion The fixed-lag version of the time-varying DP of Caron et al. [1] is a special case of the proposed model when G is given by Fig. 3. The bivariate DP of Walker and Muliere [13] is also a special case when G has only two cliques. In this paper, we have assumed that the structure of the graph was known beforehand and we have shown that many flexible models arise from this framework. It would be interesting in the future to investigate the case where the graphical structure is unknown and must be estimated from the data. Acknowledgment The authors thank the reviewers for their comments that helped to improve the writing of the paper. 8 References [1] F. Caron, M. Davy, and A. Doucet. Generalized Polya urn for time-varying Dirichlet process mixtures. In Uncertainty in Artificial Intelligence, 2007. [2] A.P. Dawid and S.L. Lauritzen. Hyper Markov laws in the statistical analysis of decomposable graphical models. The Annals of Statistics, 21:1272–1317, 1993. [3] M.D. Escobar and M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90:577–588, 1995. [4] P. Fearnhead. Particle filters for mixture models with an unknown number of components. Statistics and Computing, 14:11–21, 2004. [5] T.L. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. In Advances in Neural Information Processing Systems, 2006. [6] D. Heinz. Building hyper dirichlet processes for graphical models. Electonic Journal of Statistics, 3:290–315, 2009. [7] J.F.C. Kingman. Random partitions in population genetics. Proceedings of the Royal Society of London, 361:1–20, 1978. [8] S.L. Lauritzen. Graphical Models. Oxford University Press, 1996. [9] P. M¨uller, F. Quintana, and G. Rosner. A method for combining inference across related nonparametric Bayesian models. Journal of the Royal Statistical Society B, 66:735–749, 2004. [10] R.M. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9:249–265, 2000. [11] J. Pitman. Exchangeable and partially exchangeable random partitions. Probability theory and related fields, 102:145–158, 1995. [12] Y.W. Teh, M.I. Jordan, M.J. Beal, and D.M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101:1566–1581, 2006. [13] S. Walker and P. Muliere. A bivariate Dirichlet process. Statistics and Probability Letters, 64:1–7, 2003. [14] F. Wood and T.L. Griffiths. Particle filtering for nonparametric Bayesian matrix factorization. In Advances in Neural Information Processing Systems, 2007. 9
2009
84
3,837
Correlation Coefficients Are Insufficient for Analyzing Spike Count Dependencies Arno Onken Technische Universit¨at Berlin / BCCN Berlin Franklinstr. 28/29, 10587 Berlin, Germany aonken@cs.tu-berlin.de Steffen Gr¨unew¨alder University College London Gower Street, London WC1E 6BT, UK steffen@cs.ucl.ac.uk Klaus Obermayer Technische Universit¨at Berlin / BCCN Berlin oby@cs.tu-berlin.de Abstract The linear correlation coefficient is typically used to characterize and analyze dependencies of neural spike counts. Here, we show that the correlation coefficient is in general insufficient to characterize these dependencies. We construct two neuron spike count models with Poisson-like marginals and vary their dependence structure using copulas. To this end, we construct a copula that allows to keep the spike counts uncorrelated while varying their dependence strength. Moreover, we employ a network of leaky integrate-and-fire neurons to investigate whether weakly correlated spike counts with strong dependencies are likely to occur in real networks. We find that the entropy of uncorrelated but dependent spike count distributions can deviate from the corresponding distribution with independent components by more than 25 % and that weakly correlated but strongly dependent spike counts are very likely to occur in biological networks. Finally, we introduce a test for deciding whether the dependence structure of distributions with Poissonlike marginals is well characterized by the linear correlation coefficient and verify it for different copula-based models. 1 Introduction The linear correlation coefficient is of central importance in many studies that deal with spike count data of neural populations. For example, a low correlation coefficient is often used as an evidence for independence in recorded data and to justify simplifying model assumptions (e.g. [1, 2]). In line with this many computational studies constructed distributions for observed data based solely on reported correlation coefficients [3, 4, 5, 6]. The correlation coefficient is in this sense treated as an equivalent to the full dependence. The correlation coefficient is also extensively used in combination with information measures such as the Fisher information (for continuous variables only) and the Shannon information to assess the importance of couplings between neurons for neural coding [7]. The discussion in the literature encircles two main topics. On the one hand, it is debated whether pairwise correlations versus higher order correlations across different neurons are sufficient for obtaining good estimates of the information (see e.g. [8, 9, 10]). On the other hand, it is questioned whether correlations matter at all (see e.g. [11, 12, 13]). In [13], for example, based on the correlation coefficient it was argued that the impact of correlations is negligible for small populations of neurons. The correlation coefficient is one measure of dependence among others. It has become common to report only the correlation coefficient of recorded spike trains without reporting any other properties of the actual dependence structure (see e.g. [3, 14, 15]). The problem with this common practice is that it is unclear beforehand whether the linear correlation coefficient suffices to describe the dependence or at least the relevant part of the dependence. Of course, it is well known that uncorrelated does not imply statistically independent. Yet, it might seem likely that this is not important for realistic spike count distributions which have a Poisson-like shape. Problems could be restricted to pathological cases that are very unlikely to occur in realistic biological networks. At least one might expect to find a tendency of weak dependencies for uncorrelated distributions with Poissonlike marginals. It might also seem likely that these dependencies are unimportant in terms of typical information measures even if they are present and go unnoticed or are ignored. In this paper we show that these assumptions are false. Indeed, the dependence structure can have a profound impact on the information of spike count distributions with Poisson-like single neuron statistics. This impact can be substantial not only for large networks of neurons but even for two neuron distributions. As a matter of fact, the correlation coefficient places only a weak constraint on the dependence structure. Moreover, we show that uncorrelated or weakly correlated spike counts with strong dependencies are very likely to be common in biological networks. Thus, it is not sufficient to report only the correlation coefficient or to derive strong implications like independence from a low correlation coefficient alone. At least a statistical test should be applied that states for a given significance level whether the dependence is well characterized by the linear correlation coefficient. We will introduce such a test in this paper. The test is adjusted to the setting that a neuroscientist typically faces, namely the case of Poisson-like spike count distributions of single neurons and small numbers of samples. In the next section, we describe state-of-the-art methods for modeling dependent spike counts, to compute their entropy, and to generate network models based on integrate-and-fire neurons. Section 3 shows examples of what can go wrong for entropy estimation when relying on the correlation coefficient only. Emergences of such cases in simple network models are explored. Section 4 introduces the linear correlation test which is tailored to the needs of neuroscience applications and the section examines its performance on different dependence structures. The paper concludes with a discussion of the advantages and limitations of the presented methods and cases. 2 General methods We will now describe formal aspects of spike count models and their Shannon information. 2.1 Copula-based models with discrete marginals A copula is a cumulative distribution function (CDF) which is defined on the unit hypercube and has uniform marginals [16]. Formally, a bivariate copula C is defined as follows: Definition 1. A copula is a function C : [0, 1]2 −→[0, 1] such that: 1. ∀u, v ∈[0, 1]: C(u, 0) = 0 = C(0, v) and C(u, 1) = u and C(1, v) = v. 2. ∀u1, v1, u2, v2 ∈[0, 1] with u1 ≤u2 and v1 ≤v2: C(u2, v2) −C(u2, v1) −C(u1, v2) + C(u1, v1) ≥0. Copulas can be used to couple arbitrary marginal CDF’s FX1, FX2 to form a joint CDF F ⃗ X, such that F ⃗ X(r1, r2) = C(FX1(r1), FX2(r2)) holds [16]. There are many families of copulas representing different dependence structures. One example is the bivariate Frank family [17]. Its CDF is given by Cθ(u, v) = ( −1 θ ln  1 + (e−θu−1)(e−θv−1) e−θ−1  if θ ̸= 0, uv if θ = 0. (1) The Frank family is commutative and radial symmetric: its probability density cθ abides by ∀(u, v) ∈[0, 1]2 : cθ(u, v) = cθ(1−u, 1−v) [17]. The scalar parameter θ controls the strength of dependence. As θ →±∞the copula approaches deterministic positive/negative dependence: knowledge of one variable implies knowledge of the other (so-called Fr´echet-Hoeffding bounds [16]). The linear correlation coefficient is capable of measuring this dependence. Another example is the bivariate Gaussian copula family defined as Cθ(u, v) = φθ(φ−1(u), φ−1(v)), where φθ is the CDF of the bivariate zero-mean unit-variance multivariate normal distribution with correlation θ and φ−1 is the inverse of the CDF of the univariate zero-mean unit-variance Gaussian distribution. This family can be used to construct multivariate distributions with Gauss-like dependencies and arbitrary marginals. For a given realization ⃗r, which can represent the counts of two neurons, we can set ui = FXi(ri) and FX(⃗r) = Cθ(⃗u), where FXi can be arbitrary univariate CDF’s. Thereby, we can generate a multivariate distribution with specific marginals FXi and a dependence structure determined by C. Copulas allow us to have different discrete marginal distributions [18, 19]. Typically, the Poisson distribution is a good approximation to spike count variations of single neurons [20]. For this distribution the CDF’s of the marginals take the form FXi(r; λi) = ⌊r⌋ X k=0 λk i k! e−λi, where λi is the mean spike count of neuron i for a given bin size. We will also use the negative binomial distribution as a generalization of the Poisson distribution: FXi(r; λi, υi) = ⌊r⌋ X k=0 λk i k! 1 (1 + λi υi )υi Γ(υi + k) Γ(υi)(υi + λi)k , where Γ is the gamma function. The additional parameter υi controls the degree of overdispersion: the smaller the value of υi, the greater the Fano factor: the variance is given by λi + λ2 i υi . As υi approaches infinity, the negative binomial distribution converges to the Poisson distribution. Likelihoods of discrete vectors can be computed by applying the inclusion-exclusion principle of Poincar´e and Sylvester. The probability of a realization (x1, x2) is given by P ⃗ X(x1, x2) = F ⃗ X(x1, x2) −F ⃗ X(x1 −1, x2) −F ⃗ X(x1, x2 −1) + F ⃗ X(x1 −1, x2 −1). Thus, we can compute the probability mass of a realization ⃗x using only the CDF of ⃗X. 2.2 Computation of information entropy The Shannon entropy [21] of dependent spike counts ⃗X is a measure of the information that a decoder is missing when it does not know the value ⃗x of ⃗X. It is given by H( ⃗X) = E[I( ⃗X)] = X ⃗x∈Nd P ⃗ X(⃗x)I(⃗x), where I(⃗x) = −log2(P ⃗ X(⃗x)) is the self-information of the realization ⃗x. 2.3 Leaky integrate-and-fire model The leaky integrate-and-fire neuron is a simple neuron model that models only subthreshold membrane potentials. The equation for the membrane potential is given by τm dV dt = EL −V + RmIs, where EL denotes the resting membrane potential, Rm is the total membrane resistance, Is is the synaptic input current, and τm is the time constant. The model is completed by a rule which states that whenever V reaches a threshold Vth, an action potential is fired and V is reset to Vreset [22]. In all of our simulations we used τm = 20 ms, Rm = 20 MΩ, Vth = −50 mV, and Vreset = Vinit = −65 mV, which are typical values found in [22]. Current-based synaptic input for an isolated presynaptic release that occurs at time t = 0 can be modeled by the so-called α-function [22]: Is = Imax t τs exp(1−t τs ). The function reaches its peak Is at time t = τs and then decays with time constant τs. We can model an excitatory synapse by a positive Imax and an inhibitory synapse by a negative Imax. We used Imax = 1 nA for excitatory synapses, Imax = −1 nA for inhibitory synapses, and τs = 5 ms. 0 0.5 1 0 0.5 1 0 0.5 1 u v Cθ 1,θ 2,ω (a) 0 0.5 1 0 0.5 1 0 0.5 1 u v Cθ 1,θ 2,ω (b) 0 0.5 1 0 0.5 1 0 0.5 1 u v Cθ 1,θ 2,ω (c) u v 0 0.5 1 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 (d) u v 0 0.5 1 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 (e) u v 0 0.5 1 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 (f) Figure 1: Cumulative distribution functions (a-c) and probability density functions (d-f) of selected Frank shuffle copulas. (a, d): Independence: θ1 = θ2 = 0. (b, e): Strong negative dependence in outer square: θ1 = −30, θ2 = 5, ω = 0.2. (c, f): Strong positive dependence in inner square: θ1 = −5, θ2 = 30, ω = 0.2. 3 Counter examples In this section we describe entropy variations that can occur when relying on the correlation coefficient only. We will evaluate this effect for models of spike counts which have Poisson-like marginals and show that such effects can occur in very simple biological networks. 3.1 Frank shuffle copula We will now introduce the Frank shuffle copula family. This copula family allows arbitrarily strong dependencies with a correlation coefficient of zero for attached Poisson-like marginals. It uses two Frank copulas (see Section 2.1) in different regions of its domain such that the linear correlation coefficient would vanish. Proposition 1. The following function defines a copula ∀θ1, θ2 ∈R, ω ∈[0, 0.5] : Cθ1,θ2,ω(u, v) =    Cθ1(u, v) −ςθ1(ω, ω, u, v) + zθ1,θ2,ω(min{u, v})ςθ2(ω, ω, u, v) if (u, v) ∈ (ω, 1 −ω)2, Cθ1(u, v) otherwise, where ςθ(u1, v1, u2, v2) = Cθ(u2, v2) −Cθ(u2, v1) −Cθ(u1, v2) + Cθ(u1, v1) and zθ1,θ2,ω(m) = ςθ1(ω, ω, m, 1 −ω)/ςθ2(ω, ω, m, 1 −ω). The proof of the copula properties is given in Appendix A. This family is capable of modeling a continuum between independence and deterministic dependence while keeping the correlation coefficient at zero. There are two regions: the outer region [0, 1]2 \ (ω, 1 −ω)2 contains a Frank copula with θ1 and the inner square (ω, 1−ω)2 contains a Frank copula with θ2 modified by a factor z. If we would restrict our analysis to copula-based distributions with continuous marginals it would be sufficient to select θ1 = −θ2 and to adjust ω such that the correlation coefficient would vanish. In such cases, the factor z would be unnecessary. For discrete marginals, however, this is not sufficient as the CDF is no longer a continuous function of ω. Different copulas of this family are shown in Fig. 1. We will now investigate the impact of this dependence structure on the entropy of copula-based distributions with Poisson-like marginals while keeping the correlation coefficient at zero. Introducing more structure into a distribution typically reduces its entropy. Therefore, we expect that the entropy can vary considerably for different dependence strengths, even though the correlation is always zero. −50 −40 −30 −20 −10 0 0 2 4 6 θ1 Entropy (Bits) Poisson Negative Binomial (a) −50 −40 −30 −20 −10 0 0 10 20 30 θ1 Entropy Difference (%) Poisson Negative Binomial (b) Figure 2: Entropy of distributions based on the Frank shuffle copula Cθ1,θ2,ω for ω = 0.05 and different dependence strengths θ1. The second parameter θ2 was selected such that the absolute correlation coefficient was below 10−10. For Poisson marginals, we selected rates λ1 = λ2 = 5. For 100 ms bins this would correspond to firing rates of 50 Hz. For negative binomial marginals we selected rates λ1 = 2.22, λ2 = 4.57 and variances σ2 1 = 4.24, σ2 2 = 10.99 (values taken from experimental data recorded in macaque prefrontal cortex and 100 ms bins [18]). (a): Entropy of the Cθ1,θ2,ω based models. (b): Difference between the entropy of the Cθ1,θ2,ω-based models and the model with independent elements in percent of the independent model. Fig. 2(a) shows the entropy of the Frank shuffle-based models with Poisson and negative binomial marginals for uncorrelated but dependent elements. θ1 was varied while θ2 was estimated using the line-search algorithm for constrained nonlinear minimization [23] with the absolute correlation coefficient as the objective function. Independence is attained for θ1 = 0. With increasing dependence the entropy decreases until it reaches a minimum at θ1 = −20. Afterward, it increases again. This is due to the shape of the marginal distributions. The region of strong dependence shifts to a region with small mass. Therefore, the actual dependence decreases. However, in this region the dependency is almost deterministic and thus does not represent a relevant case. Fig. 2(b) shows the difference to the entropy of corresponding models with independent elements. The entropy deviated by up to 25 % for the Poisson marginals and up to 15 % for the negative binomial marginals. So the entropy varies indeed considerably in spite of fixed marginals and uncorrelated elements. We constructed a copula family which allowed us to vary the dependence strength systematically while keeping the variables uncorrelated. It could be argued that this is a pathological example. In the next section, however, we show that such effects can occur even in simple biologically realistic network models. 3.2 LIF network We will now explore the feasibility of uncorrelated spike counts with strong dependencies in a biologically realistic network model. For this purpose, we set up a network of leaky integrate-and-fire neurons (see Section 2.3). The neurons have two common input populations which introduce opposite dependencies (see Fig. 3(a)). Therefore, the correlation should vanish for the right proportion of input strengths. Note that the bottom input population does not contradict to Dale’s principle, since excitatory neurons can project to both excitatory and inhibitory neurons. We can find a copula family which can model this relation and has two separate parameters for the strengths of the input populations: Ccm θ1,θ2(u, v) =1 2 max  u−θ1 + v−θ1 −1, 0 −1/θ1 + 1 2  u − max  u−θ2 + (1 −v)−θ2 −1, 0 −1/θ2 , (2) where θ1, θ2 ∈(0, ∞). It is a mixture of the well known Clayton copula and an one element survival transformation of the Clayton copula [16]. As a mixture of copulas this function is again a copula. A copula of this family is shown in Fig. 3(b). Fig. 3(c) shows the correlation coefficients of the network generated spike counts and of Ccm θ1,θ2 fits. The rate of population D that introduces negative dependence is kept constant, while the rate of population B that introduces positive dependence is varied. The resulting spike count statistics (a) u v 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 (b) 250 300 350 −0.2 −0.1 0 0.1 0.2 0.3 0.4 Input Rate of Top Center Population (Hz) Correlation Coefficient (c) Figure 3: Strong dependence with zero correlation in a biological network model. (a): Neural network models used to generate synthetic spike count data. Two leaky integrate-and-fire neurons (LIF1 and LIF2, see Section 2.3) receive spike inputs (circles for excitation, bars for inhibition) from four separate populations of neurons (rectangular boxes and circles, A-D), but only two populations (B, D) send input to both neurons. All input spike trains were Poisson-distributed. (b): Probability density of the Clayton mixture model Ccm θ1,θ2 with θ1 = 1.5 and θ2 = 2.0. (c): Correlation coefficients of network generated spike counts compared to correlations of a maximum likelihood fit of the Ccm θ1,θ2 copula family to these counts. Solid line: correlation coefficients of counts generated by the network shown in (a). Each neuron had a total inhibitory input rate of 300 Hz and a total excitatory input rate of 900 Hz. Population D had a rate of 150 Hz. We increased the absolute correlation between the spike counts by shifting the rates: we decreased the rates of A and C and increased the rate of B. The total simulation time amounted to 200 s. Spike counts were calculated for 100 ms bins. Dashed line: Correlation coefficients of the first mixture component of Ccm θ1,θ2. Dashed-dotted line: Correlation coefficients of the second mixture component of Ccm θ1,θ2. were close to typically recorded data. At approximately 275 Hz the dependencies cancel each other out in the correlation coefficient. Nevertheless, the mixture components of the copula reveal that there are still dependencies: the correlation coefficient of the first mixture component that models negative dependence is relatively constant, while the correlation coefficient of the second mixture component increases with the rate of the corresponding input population. Therefore, correlation coefficients of spike counts that do not at all reflect the true strength of dependence are very likely to occur in biological networks. Structures similar to the investigated network can be formed in any feed-forward network that contains positive and negative weights. Typically, the network structure is unknown. Hence, it is hard to construct an appropriate copula that is parametrized such that individual dependence strengths are revealed. The goal of the next section is to assess a test that reveals whether the linear correlation coefficient provides an appropriate measure for the dependence. 4 Linear correlation test We will now describe a test for bivariate distributions with Poisson-like marginals that determines whether the dependence structure is well characterized by the linear correlation coefficient. This test combines a variant of the χ2 goodness-of-fit test for discrete multivariate data with a semiparametric model of linear dependence. We fit the semiparametric model to the data and we apply the goodnessof-fit test to see if the model is adequate for the data. The semiparametric model that we use consists of the empirical marginals of the sample coupled by a parametric copula family. A dependence structure is well characterized by the linear correlation coefficient if it is Gauss-like. So one way to test for linear dependence would be to use the Gaussian copula family. However, the likelihood of copula-based models relies on the CDF which has no closed form solution for the Gaussian family. Fortunately, a whole class of copula families that are Gauss-like exists. The Frank family is in this class [24] and its CDF can be computed very efficiently. We therefore selected this family for our test (see Eq. 1). The Frank copula has a scalar parameter θ. The parameter relates directly to the dependence. With growing θ the dependence increases strictly −60 −40 −20 0 0 0.5 1 θ1 % Acceptance of H0 Samples: 128 Samples: 256 Samples: 512 (a) 0 10 20 0 0.5 1 θ1 % Acceptance of H0 (b) −10 0 10 0 0.5 1 θ % Acceptance of H0 (c) −0.5 0 0.5 0 0.5 1 θ % Acceptance of H0 (d) Figure 4: Percent acceptance of the linear correlation hypothesis for different copula-based models with different dependence strengths and Poisson marginals with rates λ1 = λ2 = 5. We used 100 repetitions each. The number of samples was varied between 128 and 512. On the x-axis we varied the strength of the dependence by means of the copula parameters. (a): Frank shuffle family with correlation kept at zero. (b): Clayton mixture family Ccm θ1,θ2 with θ1 = 2θ2. (c): Frank family. (d): Gaussian family. monotonically. For θ = 0 the Frank copula corresponds to independence. Therefore, the usual χ2 independence test is a special case of our linear correlation test. The parameter θ of the Frank family can be estimated based on a maximum likelihood fit. However, this is time-consuming. As an alternative we propose to estimate the copula parameter θ by means of Kendall’s τ. Kendall’s τ is a measure of dependence defined as τ(⃗x, ⃗y) = c−d c+d, where c is the number of elements in the set {(i, j)|(xi < xj and yi < yj) or (xi > xj and yi > yj)} and d is the number of element in the set {(i, j)|(xi < xj and yi > yj) or (xi > xj and yi < yj)} [16]. For the Frank copula with continuous marginals the relation between τ and θ is given by τθ = 1−4 θ[1−D1(θ)], where Dk(x) is the Debye function Dk(x) = k xk R x 0 tk exp(t)−1dt [25]. For discrete marginals this is an approximate relation. Unfortunately, τ −1 θ cannot be expressed in closed form, but can be easily obtained numerically using Newton’s method. The goodness-of-fit test that we apply for this model is based on the χ2 test [26]. It is widely applied for testing goodness-of-fit or independence of categorical variables. For the test, observed frequencies are compared to expected frequencies using the following statistic: X2 = k X i=1 (ni −m0i)2 m0i , (3) where ni are the observed frequencies, moi are the expected frequencies, and k is the number of bins. For a 2-dimensional table the sum is over both indices of the table. If the frequencies are large enough then X2 is approximately χ2-distributed with df = (N −1)(M −1)−s degrees of freedom, where N is the number of rows, M is the number of columns, and s is the number of parameters in the H0 model (1 for the Frank family). Thus, for a given significance level α the test accepts the hypothesis H0 that the observed frequencies are a sample from the distribution formed by the expected frequencies, if X2 is less than the (1 −α) point of the χ2-distribution with df degrees of freedom. The χ2 statistic is an asymptotic statistic. In order to be of any value, the frequencies in each bin must be large enough. As a rule of thumb, each frequency should be at least 5 [26]. This cannot be accomplished for Poisson-like marginals since there is an infinite number of bins. For such cases Loukas and Kemp [27] propose the ordered expected-frequencies procedure. The expected frequencies m0 are sorted monotonically decreasing into a 1-dimensional array. The corresponding observed frequencies form another 1-dimensional array. Then the frequencies in both arrays are grouped from left to right such that the grouped m0 frequencies reach a specified minimum expected frequency (MEF), e.g. MEF= 1 as in [27]. The χ2 statistic is then estimated using Eq. 3 with the grouped expected and grouped observed frequencies. To verify the test we applied it to samples from copula-based distributions with Poisson marginals and four different copula families: the Frank shuffle family (Proposition 1), the Clayton mixture family (Eq. 2), the Frank family (Eq. 1), and the Gaussian family (Section 2.1). For the Frank family and the Gaussian family the linear correlation coefficient is well suited to characterize their dependence. We therefore expected that the test should accept H0, regardless of the dependence strength. In contrast, for the Frank shuffle family and the Clayton mixture family the linear correlation does not reflect the dependence strength. Hence, the test should reject H0 most of the time when there is dependence. The acceptance rates for these copulas are shown in Fig. 4. For each of the families there was no dependence when the first copula parameter was equal to zero. The Frank and the Gaussian families have only Gauss-like dependence, meaning the correlation coefficient is well-suited to describe the data. In all of these cases the achieved Type I error was small, i.e. the acceptance rate of H0 was close to the desired value (0.95). The plots in (a) and (b) indicate the Type II errors: H0 was accepted although the dependence structure of the counts was not Gauss-like. The Type II error decreased for increasing sample sizes. This is reasonable since X2 is only asymptotically χ2-distributed. Therefore, the test is unreliable when dependencies and sample sizes are both very small. 5 Conclusion We investigated a worst-case scenario for reliance on the linear correlation coefficient for analyzing dependent spike counts using the Shannon information. The spike counts were uncorrelated but had a strong dependence. Thus, relying solely on the correlation coefficient would lead to an oversight of such dependencies. Although uncorrelated with fixed marginals the information varied by more than 25 %. Therefore, the dependence was not negligible in terms of the entropy. Furthermore, we could show that similar scenarios are very likely to occur in real biological networks. Our test provides a convenient tool to verify whether the correlation coefficient is the right measure for an assessment of the dependence. If the test rejects the Gauss-like dependence hypothesis, more elaborate measures of the dependence should be applied. An adequate copula family provides one way to find such a measure. In general, however, it is hard to find the right parametric family. Directions for future research include a systematic approach for handling the alternative case when one has to deal with the full dependence structure and a closer look at experimentally observed dependencies. Acknowledgments. This work was supported by BMBF grant 01GQ0410. A Proof of proposition 1 Proof. We show that Cθ1,θ2,ω is a copula. Since Cθ1,θ2,ω is commutative we assume w.l.o.g. u ≤v. For u = 0 or v = 0 and for u = 1 or v = 1 we have Cθ1,θ2,ω(u, v) = Cθ1(u, v). Hence, property 1 follows directly from Cθ1. It remains to show that Cθ1,θ2,ω is 2-increasing (property 2). We will show this in two steps: 1) We show that Cθ1,θ2,ω is continuous: For ω2 = 1 −ω and u ∈(ω, ω2): lim tրω2 Cθ1,θ2,ω(u, t) = Cθ1(u, ω2) −ςθ1(ω, ω, u, ω2) + ςθ1(ω, ω, u, ω2) ςθ2(ω, ω, u, ω2)ςθ2(ω, ω, u, ω2) = Cθ1(u, ω2). For v ∈(ω, 1 −ω): lim tցω Cθ1,θ2,ω(t, v) = Cθ1(ω, v) −ςθ1(ω, ω, ω, v) + lim tցω ςθ1(ω, ω, t, 1 −ω) ςθ2(ω, ω, t, 1 −ω)ςθ2(ω, ω, t, v). We can use l’Hˆopital’s rule since limtցω ςθ(ω, ω, t, 1 −ω) = 0. It is easy to verify that ∂Cθ ∂u (v) = e−θu(e−θv −1) e−θ −1 + (e−θu −1)(e−θv −1). Thus, the quotient is constant and limtցω Cθ1,θ2,ω(t, v) = Cθ1(ω, v) −0 + 0. 2) Cθ1,θ2,ω has non-negative density almost everywhere on [0, 1]2. This is obvious for u1, v1 /∈ [ω, 1 −ω]2, because Cθ1 is a copula. Straightforward but tedious algebra shows that ∀u1, v1 ∈ (ω, 1 −ω)2 : ∂2Cθ1,θ2,ω ∂u∂v (u1, v1) ≥0. Thus, Cθ1,θ2,ω is continuous and has density almost everywhere on [0, 1]2 and is therefore 2increasing. References [1] M. Jazayeri and J. A. Movshon. Optimal representation of sensory information by neural populations. Nature Neuroscience, 9(5):690–696, 2006. [2] L. Schwabe and K. Obermayer. Adaptivity of tuning functions in a generic recurrent network model of a cortical hypercolumn. Journal of Neuroscience, 25(13):3323–3332, 2005. [3] D. A. Gutnisky and V. Dragoi. Adaptive coding of visual information in neural populations. Nature, 452(7184):220–224, 2008. [4] M. Shamir and H. Sompolinsky. Implications of neuronal diversity on population coding. Neural Computation, 18(8):1951–1986, 2006. [5] P. Series, P. E. Latham, and A. Pouget. Tuning curve sharpening for orientation selectivity: coding efficiency and the impact of correlations. Nature Neuroscience, 7(10):1129–1135, 2004. [6] L. F. Abbott and P. Dayan. The effect of correlated variability on the accuracy of a population code. Neural Computation, 11(1):91–101, 1999. [7] B. B. Averbeck, P. E. Latham, and A. Pouget. Neural correlations, population coding and computation. Nature Review Neuroscience, 7(5):358–366, 2006. [8] Y. Roudi, S. Nirenberg, and P. E. Latham. Pairwise maximum entropy models for studying large biological systems: When they can work and when they can’t. PLoS Computational Biology, 5(5):e1000380+, 2009. [9] E. Schneidman, M. J. Berry II, R. Segev, and W. Bialek. Weak pairwise correlations imply strongly correlated network states in a neural population. Nature, 440:1007–1012, 2006. [10] J. Shlens, G. D. Field, J. L. Gauthier, M. I. Grivich, D. Petrusca, E. Sher, A. M. Litke, and E. J. Chichilnisky. The structure of multi-neuron firing patterns in primate retina. Journal of Neuroscience, 26:2006, 2006. [11] B. B. Averbeck and D. Lee. Neural noise and movement-related codes in the macaque supplementary motor area. Journal of Neuroscience, 23(20):7630–7641, 2003. [12] S. Panzeri, G. Pola, F. Petroni, M. P. Young, and R. S. Petersen. A critical assessment of different measures of the information carried by correlated neuronal firing. Biosystems, 67(1-3):177–185, 2002. [13] H. Sompolinsky, H. Yoon, K. Kang, and M. Shamir. Population coding in neuronal systems with correlated noise. Physical Review E, 64(5):051904, 2001. [14] A. Kohn and M. A. Smith. Stimulus dependence of neuronal correlation in primary visual cortex of the macaque. Journal of Neuroscience, 25(14):3661–3673, 2005. [15] W. Bair, E. Zohary, and W. T. Newsome. Correlated firing in macaque visual area MT: time scales and relationship to behavior. Journal of Neuroscience, 21(5):1676–1697, 2001. [16] R. B. Nelsen. An Introduction to Copulas. Springer, New York, second edition, 2006. [17] M. J. Frank. On the simultaneous associativity of f(x,y) and x+y-f(x,y). Aequations Math, 19:194–226, 1979. [18] A. Onken, S. Gr¨unew¨alder, M. Munk, and K. Obermayer. Modeling short-term noise dependence of spike counts in macaque prefrontal cortex. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 1233–1240, 2009. [19] P. Berkes, F. Wood, and J. Pillow. Characterizing neural dependencies with copula models. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 129–136, 2009. [20] D. J. Tolhurst, J. A. Movshon, and A. F. Dean. The statistical reliability of signals in single neurons in cat and monkey visual cortex. Vision Research, 23:775–785, 1982. [21] C. E. Shannon. A mathematical theory of communication. Bell System Technical Journal, 27:379–423, 1948. [22] P. Dayan and L. F. Abbott. Theoretical Neuroscience. Cambridge (Massachusetts): MIT Press, 2001. [23] R. A. Waltz, J. L. Morales, J. Nocedal, and D. Orban. An interior algorithm for nonlinear optimization that combines line search and trust region steps. Mathematical Programming, 107(3):391–408, 2006. [24] C. Genest, B. R´emillard, and D. Beaudoin. Goodness-of-fit tests for copulas: A review and a power study. Insurance: Mathematics and Economics, 44(2):199–213, 2009. [25] C. Genest. Frank’s family of bivariate distributions. Biometrika, 74:549–555, 1987. [26] W. G. Cochran. The χ2 test of goodness of fit. Annals of Mathematical Statistics, 23(3):315–345, 1952. [27] S. Loukas and C. D. Kemp. On the chi-square goodness-of-fit statistic for bivariate discrete distributions. The Statistician, 35:525–529, 1986.
2009
85
3,838
Streaming k-means approximation Nir Ailon Google Research nailon@google.com Ragesh Jaiswal∗ Columbia University rjaiswal@gmail.com Claire Monteleoni† Columbia University cmontel@ccls.columbia.edu Abstract We provide a clustering algorithm that approximately optimizes the k-means objective, in the one-pass streaming setting. We make no assumptions about the data, and our algorithm is very light-weight in terms of memory, and computation. This setting is applicable to unsupervised learning on massive data sets, or resource-constrained devices. The two main ingredients of our theoretical work are: a derivation of an extremely simple pseudo-approximation batch algorithm for k-means (based on the recent k-means++), in which the algorithm is allowed to output more than k centers, and a streaming clustering algorithm in which batch clustering algorithms are performed on small inputs (fitting in memory) and combined in a hierarchical manner. Empirical evaluations on real and simulated data reveal the practical utility of our method. 1 Introduction As commercial, social, and scientific data sources continue to grow at an unprecedented rate, it is increasingly important that algorithms to process and analyze this data operate in online, or one-pass streaming settings. The goal is to design light-weight algorithms that make only one pass over the data. Clustering techniques are widely used in machine learning applications, as a way to summarize large quantities of high-dimensional data, by partitioning them into “clusters” that are useful for the specific application. The problem with many heuristics designed to implement some notion of clustering is that their outputs can be hard to evaluate. Approximation guarantees, with respect to some reasonable objective, are therefore useful. The k-means objective is a simple, intuitive, and widely-cited clustering objective for data in Euclidean space. However, although many clustering algorithms have been designed with the k-means objective in mind, very few have approximation guarantees with respect to this objective. In this work, we give a one-pass streaming algorithm for the k-means problem. We are not aware of previous approximation guarantees with respect to the k-means objective that have been shown for simple clustering algorithms that operate in either online or streaming settings. We extend work of Arthur and Vassilvitskii [AV07] to provide a bi-criterion approximation algorithm for k-means, in the batch setting. They define a seeding procedure which chooses a subset of k points from a batch of points, and they show that this subset gives an expected O(log (k))-approximation to the kmeans objective. This seeding procedure is followed by Lloyd’s algorithm1 which works very well in practice with the seeding. The combined algorithm is called k-means++, and is an O(log (k))approximation algorithm, in expectation.2 We modify k-means++ to obtain a new algorithm, kmeans#, which chooses a subset of O(k log (k)) points, and we show that the chosen subset of ∗Department of Computer Science. Research supported by DARPA award HR0011-08-1-0069. †Center for Computational Learning Systems 1Lloyd’s algorithm is popularly known as the k-means algorithm 2Since the approximation guarantee is proven based on the seeding procedure alone, for the purposes of this exposition we denote the seeding procedure as k-means++. 1 points gives a constant approximation to the k-means objective. Apart from giving us a bi-criterion approximation algorithm, our modified seeding procedure is very simple to analyze. [GMMM+03] defines a divide-and-conquer strategy to combine multiple bi-criterion approximation algorithms for the k-medoid problem to yield a one-pass streaming approximation algorithm for k-median. We extend their analysis to the k-means problem and then use k-means++ and k-means# in the divide-and-conquer strategy, yielding an extremely efficient single pass streaming algorithm with an O(cα log (k))-approximation guarantee, where α ≈log n/ log M, n is the number of input points in the stream and M is the amount of work memory available to the algorithm. Empirical evaluations, on simulated and real data, demonstrate the practical utility of our techniques. 1.1 Related work There is much literature on both clustering algorithms [Gon85, Ind99, VW02, GMMM+03, KMNP+04, ORSS06, AV07, CR08, BBG09, AL09], and streaming algorithms [Ind99, GMMM+03, M05, McG07].3 There has also been work on combining these settings: designing clustering algorithms that operate in the streaming setting [Ind99, GMMM+03, CCP03]. Our work is inspired by that of Arthur and Vassilvitskii [AV07], and Guha et al. [GMMM+03], which we mentioned above and will discuss in further detail. k-means++, the seeding procedure in [AV07], had previously been analyzed by [ORSS06], under special assumptions on the input data. In order to be useful in machine learning applications, we are concerned with designing algorithms that are extremely light-weight and practical. k-means++ is efficient, very simple, and performs well in practice. There do exist constant approximations to the k-means objective, in the nonstreaming setting, such as a local search technique due to [KMNP+04].4 A number of works [LV92, CG99, Ind99, CMTS02, AGKM+04] give constant approximation algorithms for the related k-median problem in which the objective is to minimize the sum of distances of the points to their nearest centers (rather than the square of the distances as in k-means), and the centers must be a subset of the input points. It is popularly believed that most of these algorithms can be extended to work for the k-means problem without too much degredation of the approximation, however there is no formal evidence for this yet. Moreover, the running times of most of these algorithms depend worse than linearly on the parameters (n, k, and d) which makes these algorithms less useful in practice. As future work, we propose analyzing variants of these algorithms in our streaming clustering algorithm, with the goal of yielding a streaming clustering algorithm with a constant approximation to the k-means objective. Finally, it is important to make a distinction from some lines of clustering research which involve assumptions on the data to be clustered. Common assumptions include i.i.d. data, e.g. [BL08], and data that admits a clustering with well separated means e.g. in [VW02, ORSS06, CR08]. Recent work [BBG09] assumes a “target” clustering for the specific application and data set, that is close to any constant approximation of the clustering objective. In contrast, we prove approximation guarantees with respect to the optimal k-means clustering, with no assumptions on the input data.5 As in [AV07], our probabilistic guarantees are only with respect to randomness in the algorithm. 1.1.1 Preliminaries The k-means clustering problem is defined as follows: Given n points X ⊂Rd and a weight function w : X →R , the goal is to find a subset C ⊆Rd, |C| = k such that the following quantity is minimized:6 φC = ! x∈X w(x)·D(x, C)2, where D(x, C) denotes the ℓ2 distance of x to the nearest point in C. When the subset C is clear from the context, we denote this distance by D(x). Also, for two points x, y, D(x, y) denotes the ℓ2 distance between x and y. The subset C is alternatively called a clustering of X and φC is called the potential function corresponding to the clustering. We will use the term “center” to refer to any c ∈C. 3For a comprehensive survey of streaming results and literature, refer to [M05]. 4In recent, independent work, Aggarwal, Deshpande, and Kannan [ADK09] extend the seeding procedure of k-means++ to obtain a constant factor approximation algorithm which outputs O(k) centers. They use similar techniques to ours, but reduce the number of centers by using a stronger concentration property. 5It may be interesting future work to analyze our algorithm in special cases, such as well-separated clusters. 6For the unweighted case, we can assume that w(x) = 1 for all x. 2 Definition 1.1 (Competitive ratio, b-approximation). Given an algorithm B for the k-means problems, let φC be the potential of the clustering C returned by B (on some input set which is implicit) and let φCOP T denote the potential of the optimal clustering COP T . Then the competitive ratio is defined to be the worst case ratio φC φCOP T . The algorithm B is said to be b-approximation algorithm if φC φCOP T ≤b. The previous definition might be too strong for an approximation algorithm for some purposes. For example, the clustering algorithm performs poorly when it is constrained to output k centers but it might become competitive when it is allowed to output more centers. Definition 1.2 ((a, b)-approximation). We call an algorithm B, (a, b)-approximation for the kmeans problem if it outputs a clustering C with ak centers with potential φC such that φC φCOP T ≤b in the worst case. Where a > 1, b > 1. Note that for simplicity, we measure the memory in terms of the words which essentially means that we assume a point in Rd can be stored in O(1) space. 2 k-means#: The advantages of careful and liberal seeding The k-means++ algorithm is an expected Θ(log k)-approximation algorithm. In this section, we extend the ideas in [AV07] to get an (O(log k), O(1))-approximation algorithm. Here is the kmeans++ algorithm: 1. Choose an initial center c1 uniformly at random from X. 2. Repeat (k −1) times: 3. Choose the next center ci, selecting ci = x′ ∈X with probability D(x′)2 P x∈X D(x)2 . (here D(.) denotes the distances w.r.t. to the subset of points chosen in the previous rounds) Algorithm 1: k-means++ In the original definition of k-means++ in [AV07], the above algorithm is followed by Lloyd’s algorithm. The above algorithm is used as a seeding step for Lloyd’s algorithm which is known to give the best results in practice. On the other hand, the theoretical guarantee of the k-means++ comes from analyzing this seeding step and not Lloyd’s algorithm. So, for our analysis we focus on this seeding step. The running time of the algorithm is O(nkd). In the above algorithm X denotes the set of given points and for any point x, D(x) denotes the distance of this point from the nearest center among the centers chosen in the previous rounds. To get an (O(log k), O(1))-approximation algorithm, we make a simple change to the above algorithm. We first set up the tools for analysis. These are the basic lemmas from [AV07]. We will need the following definition first: Definition 2.1 (Potential w.r.t. a set). Given a clustering C, its potential with respect to some set A is denoted by φC(A) and is defined as φC(A) = ! x∈A D(x)2, where D(x) is the distance of the point x from the nearest point in C. Lemma 2.2 ([AV07], Lemma 3.1). Let A be an arbitrary cluster in COP T , and let C be the clustering with just one center, chosen uniformly at random from A. Then Exp[φC(A)] = 2 · φCOP T (A). Corollary 2.3. Let A be an arbitrary cluster in COP T , and let C be the clustering with just one center, which is chosen uniformly at random from A. Then, Pr[φC(A) < 8φCOP T (A)] ≥3/4 Proof. The proof follows from Markov’s inequality. Lemma 2.4 ([AV07], Lemma 3.2). Let A be an arbitrary cluster in COP T , and let C be an arbitrary clustering. If we add a random center to C from A, chosen with D2 weighting to get C′, then Exp[φC′(A)] ≤8 · φCOP T (A). Corollary 2.5. Let A be an arbitrary cluster in COP T , and let C be an arbitrary clustering. If we add a random center to C from A, chosen with D2 weighting to get C′, then Pr[φC′(A) < 32 · φCOP T (A)] ≥3/4. 3 We will use k-means++ and the above two lemmas to obtain a (O(log k), O(1))-approximation algorithm for the k-means problem. Consider the following algorithm: 1. Choose 3 · log k centers independently and uniformly at random from X. 2. Repeat (k −1) times. 3. Choose 3 · log k centers independently and with probability D(x′)2 P x∈X D(x)2 . (here D(.) denotes the distances w.r.t. to the subset of points chosen in the previous rounds) Algorithm 2: k-means# Note that the algorithm is almost the same as the k-means++ algorithm except that in each round of choosing centers, we pick O(log k) centers rather than a single center. The running time of the above algorithm is clearly O(ndk log k). Let A = {A1, ..., Ak} denote the set of clusters in the optimal clustering COP T . Let Ci denote the clustering after ith round of choosing centers. Let Ai c denote the subset of clusters ∈A such that ∀A ∈Ai c, φCi(A) ≤32 · φCOP T (A). We call this subset of clusters, the “covered” clusters. Let Ai u = A\Ai c be the subset of “uncovered” clusters. The following simple lemma shows that with constant probability step (1) of k-means# picks a center such that at least one of the clusters gets covered, or in other words, |A1 c| ≥1. Let us call this event E. Lemma 2.6. Pr[E] ≥(1 −1/k). Proof. The proof easily follows from Corollary 2.3. Let X i c = ∪A∈AicA and let X i u = X \ X i c. Now after the ith round, either φCi(X i c) ≤φCi(X i u) or otherwise. In the former case, using Corollary 2.5, we show that the probability of covering an uncovered cluster in the (i + 1)th round is large. In the latter case, we will show that the current set of centers is already competitive with constant approximation ratio. Let us start with the latter case. Lemma 2.7. If event E occurs ( |A1 c| ≥1) and for any i > 1, φCi(X i c) > φCi(X i u), then φCi ≤ 64φCOP T . Proof. We get the main result using the following sequence of inequalities: φCi = φCi(X i c) + φCi(X i u) ≤φCi(X i c) + φCi(X i c) ≤2 · 32 · φCOP T (X i c) ≤64 φCOP T (using the definition of X i c). Lemma 2.8. If for any i ≥1, φCi(X i c) ≤φCi(X i u), then Pr[|Ai+1 c | ≥|Ai c| + 1] ≥(1 −1/k). Proof. Note that in the (i+1)th round, the probability that a center is chosen from a cluster /∈Ai c is at least φCi(X i u) φCi(X i u)+φCi(X i c) ≥1/2. Conditioned on this event, with probability at least 3/4 any of the centers x chosen in round (i + 1) satisfies φCi∪x(A) ≤32 · φCOP T (A) for some uncovered cluster A ∈Ai u. This means that with probability at least 3/8 any of the chosen centers x in round (i + 1) satisfies φCi∪x(A) ≤32 · φCOP T (A) for some uncovered cluster A ∈Ai u. This further implies that with probability at least (1 −1/k) at least one of the chosen centers x in round (i + 1) satisfies φCi∪x(A) ≤32 · φCOP T (A) for some uncovered cluster A ∈Ai u. We use the above two lemmas to prove our main theorem. Theorem 2.9. k-means# is a (O(log k), O(1))-approximation algorithm. Proof. From Lemma 2.6 we know that event E (i.e., |Ai c| ≥1) occurs. Given this, suppose for any i > 1, after the ith round φCi(Xc) > φCi(Xu). Then from Lemma 2.7 we have φC ≤φCi ≤ 64φCOP T . If no such i exist, then from Lemma 2.8 we get that the probability that there exists a cluster A ∈A such that A is not covered even after k rounds(i.e., end of the algorithm) is at most: 1 −(1 −1/k)k ≤3/4. So with probability at least 1/4, the algorithm covers all the clusters in A. In this case from Lemma 2.8, we have φC = φCk ≤32 · φCOP T . We have shown that k-means# is a randomized algorithm for clustering which with probability at least 1/4 gives a clustering with competitive ratio 64. 4 3 A single pass streaming algorithm for k-means In this section, we will provide a single pass streaming algorithm. The basic ingredients for the algorithm is a divide and conquer strategy defined by [GMMM+03] which uses bi-criterion approximation algorithms in the batch setting. We will use k-means++ which is a (1, O(log k))-approximation algorithm and k-means# which is a (O(log k), O(1))-approximation algorithm, to construct a single pass streaming O(log k)-approximation algorithm for k-means problem. In the next subsection, we develop some of the tools needed for the above. 3.1 A streaming (a,b)-approximation for k-means We will show that a simple streaming divide-and-conquer scheme, analyzed by [GMMM+03] with respect to the k-medoid objective, can be used to approximate the k-means objective. First we present the scheme due to [GMMM+03], where in this case we use k-means-approximating algorithms as input. Inputs: (a) Point set S ⊂Rd. Let n = |S|. (b) Number of desired clusters, k ∈N. (c) A, an (a, b)-approximation algorithm to the k-means objective. (d) A′, an (a′, b′)-approximation algorithm to the k-means objective. 1. Divide S into groups S1, S2, . . . , Sℓ 2. For each i ∈{1, 2, . . . , ℓ} 3. Run A on Si to get ≤ak centers Ti = {ti1, ti2, . . .} 4. Denote the induced clusters of Si as Si1 ∪Si2 ∪· · · 5. Sw ←T1 ∪T2 ∪· · · ∪Tℓ, with weights w(tij) ←|Sij| 6. Run A′ on Sw to get ≤a′k centers T 7. Return T Algorithm 3: [GMMM+03] Streaming divide-and-conquer clustering First note that when every batch Si has size √ nk, this algorithm takes one pass, and O(a √ nk) memory. Now we will give an approximation guarantee. Theorem 3.1. The algorithm above outputs a clustering that is an (a′, 2b + 4b′(b + 1))approximation to the k-means objective. The a′ approximation of the desired number of centers follows directly from the approximation property of A′, with respect to the number of centers, since A′ is the last algorithm to be run. It remains to show the approximation of the k-means objective. The proof, which appears in the Appendix, involves extending the analysis of [GMMM+03], to the case of the k-means objective. Using the exposition in Dasgupta’s lecture notes [Das08], of the proof due to [GMMM+03], our extension is straightforward, and differs in the following ways from the k-medoid analysis. 1. The k-means objective involves squared distance (as opposed to k-medoid in which the distance is not squared), so the triangle inequality cannot be invoked directly. We replace it with an application of the triangle inequality, followed by (a+b)2 ≤2a2+2b2, everywhere it occurs, introducing several factors of 2. 2. Cluster centers are chosen from Rd, for the k-means problem, so in various parts of the proof we save an approximation a factor of 2 from the k-medoid problem, in which cluster centers must be chosen from the input data. 3.2 Using k-means++ and k-means# in the divide-and-conquer strategy In the previous subsection, we saw how a (a, b)-approximation algorithm A and an (a′, b′)approximation algorithm A′ can be used to get a single pass (a′, 2b + 4b′(b + 1))-approximation streaming algorithm. We now have two randomized algorithms, k-means# which with probability at least 1/4 is a (3 log k, 64)-approximation algorithm and k-means++ which is a (1, O(log k))approximation algorithm (the approximation factor being in expectation). We can now use these two algorithms in the divide-and-conquer strategy to obtain a single pass streaming algorithm. We use the following as algorithms as A and A′ in the divide-and-conquer strategy (3): 5 A: “Run k-means# on the data 3 log n times independently, and pick the clustering with the smallest cost.” A’: “Run k-means++” Weighted versus non-weighted. Note that k-means and k-means# are approximation algorithms for the non-weighted case (i.e. w(x) = 1 for all points x). On the other hand, in the divide-andconquer strategy we need the algorithm A′, to work for the weighted case where the weights are integers. Note that both k-means and k-means# can be easily generalized for the weighted case when the weights are integers. Both algorithms compute probabilities based on the cost with respect to the current clustering. This cost can be computed by taking into account the weights. For the analysis, we can assume points with multiplicities equal to the integer weight of the point. The memory required remains logarithmic in the input size, including the storing the weights. Analysis. With probability at least " 1 −(3/4)3 log n# ≥ " 1 −1 n # , algorithm A is a (3 log k, 64)approximation algorithm. Moreover, the space requirement remains logarithmic in the input size. In step (3) of Algorithm 3 we run A on batches of data. Since each batch is of size √ nk the number of batches is $ n/k, the probability that A is a (3 log k, 64)-approximation algorithm for all of these batches is at least " 1 −1 n #√ n/k ≥1/2. Conditioned on this event, the divide-and-conquer strategy gives a O(log k)-approximation algorithm. The memory required is O(log(k) · √ nk) times the logarithm of the input size. Moreover, the algorithm has running time O(dnk log n log k). 3.3 Improved memory-approximation tradeoffs We saw in the last section how to obtain a single-pass (a′, cbb′)-approximation for k-means using first an (a, b)-approximation on input blocks and then an (a′, b′)-approximation on the union of the output center sets, where c is some global constant. The optimal memory required for this scheme was O(a √ nk). This immediately implies a tradeoff between the memory requirements (growing like a), the number of centers outputted (which is a′k) and the approximation to the potential (which is cbb′) with respect to the optimal solution using k centers. A more subtle tradeoff is possible by a recursive application of the technique in multiple levels. Indeed, the (a, b)-approximation could be broken up in turn into two levels, and so on. This idea was used in [GMMM+03]. Here we make a more precise account of the tradeoff between the different parameters. Assume we have subroutines for performing (ai, bi)-approximation for k-means in batch mode, for i = 1, . . . r (we will choose a1, . . . , ar, b1, . . . , br later). We will hold r buffers B1, . . . , Br as work areas, where the size of buffer Bi is Mi. In the topmost level, we will divide the input into equal blocks of size M1, and run our (a1, b1)-approximation algorithm on each block. Buffer B1 will be repeatedly reused for this task, and after each application of the approximation algorithm, the outputted set of (at most) ka1 centers will be added to B2. When B2 is filled, we will run the (a2, b2)-approximation algorithm on the data and add the ka2 outputted centers to B3. This will continue until buffer Br fills, and the (ar, br)-approximation algorithm outputs the final ark centers. Let ti denote the number of times the i’th level algorithm is executed. Clearly we have tikai = Mi+1ti+1 for i = 1, . . . , r −1. For the last stage we have tr = 1, which means that tr−1 = Mr/kar−1, tr−2 = Mr−1Mr/k2ar−2ar−1 and generally ti = Mi+1 · · · Mr/kr−iai · · · ar−1.7 But we must also have t1 = n/M1, implying n = M1···Mr kr−1a1···ar−1 . In order to minimize the total memory ! Mi under the last constraint, using standard arguments in multivariate analysis we must have M1 = · · · = Mr, or in other words Mi = " nkr−1a1 · · · ar−1 #1/r ≤n1/rk(a1 · · · ar−1)1/r for all i. The resulting one-pass algorithm will have an approximation guarantee of (ar, cr−1b1 · · · br) (using a straightforward extension of the result in the previous section) and memory requirement of at most rn1/rk(a1 · · · ar−1)1/r. Assume now that we are in the realistic setting in which the available memory is of fixed size M ≥k. We will choose r (below), and for each i = 1..r −1 we choose to either run k-means++ or the repeated k-means# (algorithm A in the previous subsection), i.e., (ai, bi) = (1, O(log k)) or (3 log k, O(1)) for each i. For i = r, we choose k-means++, i.e., (ar, br) = (1, O(log k)) (we are interested in outputting exactly k centers as the final solution). Let q denote the number of 7We assume all quotients are integers for simplicity of the proof, but note that fractional blocks would arise in practice. 6 5 10 15 20 25 0 1 2 3 4 5 6 7 8 k Cost in units of 109 Batch Lloyds Online Lloyds Divide and Conquer with km# and km++ Divide and Conquer with km++ 5 10 15 20 25 0 5 10 15 20 25 k Cost in units of 106 Batch Lloyds Divide and Conquer with km# and km++ Divide and Conquer with km++ 5 10 15 20 25 0 5 10 15 20 25 30 35 40 45 50 k Cost in units of 107 Batch Lloyds Divide and Conquer with km# and km++ Divide and Conquer with km++ Figure 1: Cost vs. k: (a) Mixtures of gaussians simulation, (b) Cloud data, (c) Spam data,. indexes i ∈[r −1] such that (ai, bi) = (3 log k, O(1)). By the above discussion, the memory is used optimally if M = rn1/rk(3 log k)q/r, in which case the final approximation guarantee will be ˜cr−1(log k)r−q, for some global ˜c > 0. We concentrate on the case M growing polynomially in n, say M = nα for some α < 1. In this case, the memory optimality constraint implies r = 1/α for n large enough (regardless of the choice of q). This implies that the final approximation guarantee is best if q = r −1, in other words, we choose the repeated k-means# for levels 1..r −1, and k-means++ for level r. Summarizing, we get: Theorem 3.2. If there is access to memory of size M = nα for some fixed α > 0, then for sufficiently large n the best application of the multi-level scheme described above is obtained by running r = ⌊α⌋= ⌊log n/ log M⌋levels, and choosing the repeated k-means# for all but the last level, in which k-means++ is chosen. The resulting algorithm is a randomized one-pass streaming approximation to k-means, with an approximation ratio of O(˜cr−1(log k)), for some global ˜c > 0. The running time of the algorithm is O(dnk2 log n log k). We should compare the above multi-level streaming algorithm with the state-of-art (in terms of memory vs. approximation tradeoff) streaming algorithm for the k-median problem. Charikar, Callaghan, and Panigrahy [CCP03] give a one-pass streaming algorithm for the k-median problem which gives a constant factor approximation and uses O(k·poly log(n)) memory. The main problem with this algorithm from a practical point of view is that the average processing time per item is large. It is proportional to the amount of memory used, which is poly-logarithmic in n. This might be undesirable in practical scenarios where we need to process a data item quickly when it arrives. In contrast, the average per item processing time using the divide-and-conquer-strategy is constant and furthermore the algorithm can be pipelined (i.e. data items can be temporarily stored in a memory buffer and quickly processed before the the next memory buffer is filled). So, even if [CCP03] can be extended to the k-means setting, streaming algorithms based on the divide-and-conquer-strategy would be more interesting from a practical point of view. 4 Experiments Datasets. In our discussion, n denotes the number of points in the data, d denotes the dimension, and k denotes the number of clusters. Our first evaluation, detailed in Tables 1a)-c) and Figure 1, compares our algorithms on the following data: (1) norm25 is synthetic data generated in the following manner: we choose 25 random vertices from a 15 dimensional hypercube of side length 500. We then add 400 gaussian random points (with variance 1) around each of these points.8 So, for this data n = 10, 000 and d = 15. The optimum cost for k = 25 is 1.5026 × 105. (2) The UCI Cloud dataset consists of cloud cover data [AN07]. Here n = 1024 and d = 10. (3) The UCI Spambase dataset is data for an e-mail spam detection task [AN07]. Here n = 4601 and d = 58. To compare against a baseline method known to be used in practice, we used Lloyd’s algorithm, commonly referred to as the k-means algorithm. Standard Lloyd’s algorithm operates in the batch setting, which is an easier problem than the one-pass streaming setting, so we ran experiments with this algorithm to form a baseline. We also compare to an online version of Lloyd’s algorithm, however the performance is worse than the batch version, and our methods, for all problems, so we 8Testing clustering algorithms on this simulation distribution was inspired by [AV07]. 7 k BL OL DC-1 DC-2 BL OL DC-1 DC-2 5 5.1154 · 109 6.5967 · 109 7.9398 · 109 7.8474 · 109 1.25 1.32 14.37 9.93 10 3.3080 · 109 6.0146 · 109 4.5954 · 109 4.6829 · 109 2.05 2.45 45.39 21.09 15 2.0123 · 109 4.3743 · 109 2.5468 · 109 2.5898 · 109 3.88 3.49 95.22 30.34 20 1.4225 · 109 3.7794 · 109 1.0718 · 109 1.1403 · 109 8.62 4.69 190.73 41.49 25 0.8602 · 109 2.8859 · 109 2.7842 · 105 2.7298 · 105 13.13 6.04 283.19 53.07 k BL OL DC-1 DC-2 BL OL DC-1 DC-2 5 1.7707 · 107 1.2401 · 108 2.2924 · 107 2.2617 · 107 1.12 0.13 1.73 0.92 10 0.7683 · 107 8.5684 · 107 8.3363 · 106 8.7788 · 106 1.20 0.25 5.64 1.87 15 0.5012 · 107 8.4633 · 107 4.9667 · 106 4.8806 · 106 2.18 0.35 10.98 2.67 20 0.4388 · 107 6.5110 · 107 3.7479 · 106 3.7536 · 106 2.59 0.47 25.72 4.19 25 0.3839 · 107 6.3758 · 107 2.8895 · 106 2.9014 · 106 2.43 0.52 36.17 4.82 k BL OL DC-1 DC-2 BL OL DC-1 DC-2 5 4.9139 · 108 1.7001 · 109 3.4021 · 108 3.3963 · 108 9.68 0.70 11.65 5.14 10 1.6952 · 108 1.6930 · 109 1.0206 · 108 1.0463 · 108 34.78 1.31 40.14 9.75 15 1.5670 · 108 1.4762 · 109 5.5095 · 107 5.3557 · 107 67.54 1.88 77.75 14.41 20 1.5196 · 108 1.4766 · 109 3.3400 · 107 3.2994 · 107 100.44 2.57 194.01 22.76 25 1.5168 · 108 1.4754 · 109 2.3151 · 107 2.3391 · 107 109.41 3.04 274.42 27.10 Table 1: Columns 2-5 have the clustering cost and columns 6-9 have time in sec. a) norm25 dataset, b) Cloud dataset, c) Spambase dataset. Memory/ #levels Cost Time 1024/0 8.74 · 106 5.5 480/1 8.59 · 106 3.6 360/2 8.61 · 106 3.8 Memory/ #levels Cost Time 2048/0 5.78 · 104 30 1250/1 5.36 · 104 25 1125/2 5.15 · 104 26 Memory/ #levels Cost Time 4601/0 1.06 · 108 34 880/1 0.99 · 108 20 600/2 1.03 · 108 19.5 Table 2: Multi-level hierarchy evaluation: a) Cloud dataset, k = 10, b) A subset of norm25 dataset, n = 2048, k = 25, c) Spambase dataset, k = 10. The memory size decreases as the number of levels of the hierarchy increases. (0 levels means running batch k-means++ on the data.) do not include it in our plots for the real data sets.9 Tables 1a)-c) shows average k-means cost (over 10 random restarts for the randomized algorithms: all but Online Lloyd’s) for these algorithms: (1) BL: Batch Lloyd’s, initialized with random centers in the input data, and run to convergence.10 (2) OL: Online Lloyd’s. (3) DC-1: The simple 1-stage divide and conquer algorithm of Section 3.2. (4) DC-2: The simple 1-stage divide and conquer algorithm 3 of Section 3.1. The sub-algorithms used are A = “run k-means++ 3 · log n times and pick best clustering,” and A’ is k-means++. In our context, k-means++ and k-means# are only the seeding step, not followed by Lloyd’s algorithm. In all problems, our streaming methods achieve much lower cost than Online Lloyd’s, for all settings of k, and lower cost than Batch Lloyd’s for most settings of k (including the correct k = 25, in norm25). The gains with respect to batch are noteworthy, since the batch problem is less constrained than the one-pass streaming problem. The performance of DC-1 and DC-2 is comparable. Table 2 shows an evaluation of the one-pass multi-level hierarchical algorithm of Section 3.3, on the different datasets, simulating different memory restrictions. Although our worst-case theoretical results imply an exponential clustering cost as a function of the number of levels, our results show a far more optimistic outcome in which adding levels (and limiting memory) actually improves the outcome. We conjecture that our data contains enough information for clustering even on chunks that fit in small buffers, and therefore the results may reflect the benefit of the hierarchical implementation. Acknowledgements. We thank Sanjoy Dasgupta for suggesting the study of approximation algorithms for k-means in the streaming setting, for excellent lecture notes, and for helpful discussions. 9Despite the poor performance we observed, this algorithm is apparently used in practice, see [Das08]. 10We measured convergence by change in cost less than 1. 8 References [ADK09] Ankit Aggarwal, Amit Deshpande and Ravi Kannan: Adaptive Sampling for k-means Clustering. APPROX, 2009. [AL09] Nir Ailon and Edo Liberty: Correlation Clustering Revisited: The ”True” Cost of Error Minimization Problems. To appear in ICALP 2009. [AMS96] Noga Alon, Yossi Matias, and Mario Szegedy.: The space complexity of approximating the frequency moments. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, pages 20–29, 1996. [AV06] David Arthur and Sergei Vassilvitskii: Worst-case and smoothed analyses of the icp algorithm, with an application to the k-means method. FOCS, 2006 [AV07] David Arthur and Sergei Vassilvitskii: k-means++: the advantages of careful seeding. SODA, 2007. [AGKM+04] V. Arya, N. Garg, R. Khandekar, A. Meyerson, K. Munagala, and V. Pandit: Local search heuristics for k-median and facility location problems. Siam Journal of Computing, 33(3):544–562, 2004. [AN07] A. Asuncion and D.J. Newman: UCI Machine Learning Repository. http://www.ics.uci.edu/∼mlearn/MLRepository.html, University of California, Irvine, School of Information and Computer Sciences, 2007. [BBG09] Maria-Florina Balcan, Avrim Blum, and Anupam Gupta: Approximate Clustering without the Approximation. SODA, 2009. [BL08] S. Ben-David and U. von Luxburg: Relating clustering stability to properties of cluster boundaries. COLT, 2008 [CCP03] Moses Charikar and Liadan O’Callaghan and Rina Panigrahy: Better streaming algorithms for clustering problems. STOC, 2003. [CG99] Moses Charikar and Sudipto Guha: Improved combinatorial algorithms for the facility location and k-medians problem. FOCS, 1999. [CMTS02] M. Charikar, S. Guha , E Tardos, and D. Shmoys: A Constant Factor Approximation Algorithm for the k-Median Problem. Journal of Computer and System Sciences, 2002. [CR08] Kamalika Chaudhuri and Satish Rao: Learning Mixtures of Product Distributions using Correlations and Independence. COLT, 2008. [Das08] Sanjoy Dasgupta.: Course notes, CSE 291: Topics in unsupervised learning. http://wwwcse.ucsd.edu/ dasgupta/291/index.html, University of California, San Diego, Spring 2008. [Gon85] T. F. Gonzalez: Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38, pages 293–306, 1985. [GMMM+03] Sudipto Guha, Adam Meyerson, Nina Mishra, Rajeev Motwani, and Liadan O’Callaghan: Clustering Data Streams: Theory and Practice. IEEE Transactions on Knowledge and Data Engineering, 15(3): 515–528, 2003. [Ind99] Piotr Indyk: Sublinear Time Algorithms for Metric Space Problems. STOC, 1999. [JV01] K. Jain and Vijay Vazirani: Approximation Algorithms for Metric Facility Location and k-Median Problems Using the Primal-Dual Schema and Lagrangian Relaxation. Journal of the ACM. 2001. [KMNP+04] T. Kanungo, D. M. Mount, N. Netanyahu, C. Piatko, R. Silverman, and A. Y. Wu: A Local Search Approximation Algorithm for k-Means Clustering, Computational Geometry: Theory and Applications, 28, 89-112, 2004. [LV92] J. Lin and J. S. Vitter: Approximation Algorithms for Geometric Median Problems. Information Processing Letters, 1992. [McG07] Andrew McGregor: Processing Data Streams. Ph.D. Thesis, Computer and Information Science, University of Pennsylvania, 2007. [M05] S. Muthukrishnan: Data Streams: Algorithms and Applications, NOW Publishers, Inc., Hanover MA [ORSS06] Rafail Ostrovsky, Yuval Rabani, Leonard J. Schulman, Chaitanya Swamy: The effectiveness of Lloyd-type methods for the k-means problem. FOCS, 2006. [VW02] V. Vempala and G. Wang: A spectral algorithm of learning mixtures of distributions. pages 113–123, FOCS, 2002. 9
2009
86
3,839
Help or Hinder: Bayesian Models of Social Goal Inference Tomer D. Ullman, Chris L. Baker, Owen Macindoe, Owain Evans, Noah D. Goodman and Joshua B. Tenenbaum {tomeru, clbaker, owenm, owain, ndg, jbt}@mit.edu Department of Brain and Cognitive Sciences Massachusetts Institute of Technology Abstract Everyday social interactions are heavily influenced by our snap judgments about others’ goals. Even young infants can infer the goals of intentional agents from observing how they interact with objects and other agents in their environment: e.g., that one agent is ‘helping’ or ‘hindering’ another’s attempt to get up a hill or open a box. We propose a model for how people can infer these social goals from actions, based on inverse planning in multiagent Markov decision problems (MDPs). The model infers the goal most likely to be driving an agent’s behavior by assuming the agent acts approximately rationally given environmental constraints and its model of other agents present. We also present behavioral evidence in support of this model over a simpler, perceptual cue-based alternative. 1 Introduction Humans make rapid, consistent intuitive inferences about the goals of agents from the most impoverished of visual stimuli. On viewing a short video of geometric shapes moving in a 2D world, adults spontaneously attribute to them an array of goals and intentions [7]. Some of these goals are simple, e.g. reaching an object at a particular location. Yet people also attribute complex social goals, such as helping, hindering or protecting another agent. Recent studies suggest that infants as young as six months make the same sort of complex social goal attributions on observing simple displays of moving shapes, or (at older ages) in displays of puppets interacting [6]. How do humans make these rapid social goal inferences from such impoverished displays? On one approach, social goals are inferred directly from perceptual cues in a bottom-up fashion. For example, infants in [6] may judge that a triangle pushing a circle up a hill is helping the circle get to the top of the hill simply because the circle is moving the triangle in the direction the triangle was last observed moving on its own. This approach, which has been developed by Blythe et al. [3], seems suited to explain the rapidity of goal attribution, without the need for mediation from higher cognition. On an alternative approach, these inferences come from a more cognitive and top-down system for goal attribution. The inferences are based not just on perceptual evidence, but also on an intuitive theory of mind on which behavior results from rational plans in pursuit of goals. On this approach, the triangle is judged to be helping the circle because in some sense he knows what the circle’s goal is, desires for the circle to achieve the goal, constructs a rational plan of action that he expects will increase the probability of the circle realizing the goal. The virtue of this theoryof-mind approach is its generality, accounting for a much wider range of social goal inferences that cannot be reduced to simple perceptual cues. Our question here is whether the rapid goal inferences we make in everyday social situations, and that both infants and adults have been shown to make from simple perceptual displays, require the sophistication of a theory-based approach or can be sufficiently explained in terms of perceptual cues. 1 This paper develops the theory-based approach to intuitive social goal inference. There are two main challenges for this approach. The first is to formalize social goals (e.g. helping or hindering) and to incorporate this formalization into a general computational framework for goal inference that is based on theory of mind. This framework should enable the inference that agent A is helping or hindering agent B from a joint goal inference based on observing A and B interacting. Inference should be possible even with minimal prior knowledge about the agents and without knowledge of B’s goal. The second challenge is to show that this computational model provides a qualitative and quantitative fit to rapid human goal inferences from dynamic visual displays. Can inference based on abstract criteria for goal attribution that draws on unobservable mental states (e.g. beliefs, goals, planning abilities) explain fast human judgments from impoverished and unfamiliar stimuli? In addressing the challenge of formalization, we present a formal account of social goal attribution based on the abstract criterion of A helping (or hindering) B by acting to maximize (minimize) Bs probability of realizing his goals. On this account, agent A rationally maximizes utility by maximizing (minimizing) the expected utility of B, where this expectation comes from As model of Bs goals and plans of action. We incorporate this formalization of helping and hindering into an existing computational framework for theory-based goal inference, on which goals are inferred from actions by inverting a generative rational planning (MDP) model [1]. The augmented model allows for the inference that A is helping or hindering B from stimuli in which B’s goal is not directly observable. We test this Inverse Planning model of social goal attribution on a set of simple 2D displays, comparing its performance to that of an alternative model which makes inferences directly from visual cues, based on previous work such as that of Blythe et al. [3]. 2 Computational Framework Our framework assumes that people represent the causal role of agents’ goals in terms of an intuitive principle of rationality [4]: the assumption that agents will tend to take efficient actions to achieve their goals, given their beliefs about the world. For agents with simple goals toward objects or states of the world, the principle of rationality can be formalized as probabilistic planning in Markov decision problems (MDPs), and previous work has successfully applied inverse planning in MDPs to explain human inferences about the object-directed goals of maze-world agents [2]. Inferences of simple relational goals between agents (such as chasing and fleeing) from maze-world interactions were considered by Baker, Goodman and Tenenbaum [1], using multiagent MDP-based inverse planning. In this paper, we present a framework for modeling inferences of more complex social goals, such as helping and hindering, where an agent’s goals depend on the goals of other agents. We will define two types of agents: simple agents, which have object-directed goals and do not represent other agents’ goals, and complex agents, which have either social or object-directed goals, and represent other agents’ goals and reason about their likely behavior. For each type of agent and goal, we describe the multiagent MDPs they define. We then describe joint inferences of objectdirected and social goals based on the Bayesian inversion of MDP models of behavior. 2.1 Planning in multiagent MDPs An MDP M = (S, A, T , R, γ) is a tuple that defines a model of an agent’s planning process. S is an encoding of the world into a finite set of mutually exclusive states, which specifies the set of possible configurations of all agents and objects. A is the set of actions and T is the transition function, which encodes the physical laws of the world, i.e. T (St+1, St, At) = P(St+1|St, At) is the marginal distribution over the next state, given the current state and the agent’s action (marginalizing over all other agents’ actions). R : S × A →R is the reward function, which provides agents with realvalued rewards for each state-action pair, and γ is the discount factor. The following subsections will describe how R depends on the agent’s goal G (object-directed or social), and how T depends on the agent’s type (simple or complex). We then describe how agents plan over multiagent MDPs. 2.1.1 Reward functions Object-directed rewards The reward function induced by an object-directed goal G is straightforward. We assume that R is an additive function of state rewards and action costs, such that R(S, A) = r(S)−c(S, A). We consider a two-parameter family of reward functions, parameterized 2 Gi St St+1 G j Ai t A j t Ai t+1 A j t +1 1 2 3 4 5 6 7 7 6 5 4 3 2 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1 2 3 4 5 6 7 7 6 5 4 3 2 1 1 2 3 4 5 6 7 7 6 5 4 3 2 1 ρg = 1.0 δg = 0.5 ρg = 1.0 δg = 2.5 ρg = 1.0 δg = 10.5 (a) (b) Figure 1: (a) Illustration of the state reward functions from the family defined by the parameters ρg and δg. The agent’s goal is at (6,6), where the state reward is equal to ρg. The state reward functions range from a unit reward in the goal location (row 1) to a field of reward that extends to every location in the grid (row 3). (b) Bayes net generated by multiagent planning. In this figure, we assume that there are two agents, i and j, with i simple and j complex. The parameters {ρi g, δi g, ρi o, ρj g, δj g} and β are omitted from the graphical model for readability. by ρg and δg, which captures the intuition that different kinds of object goals induce different rewards in space. For instance, on a hot summer day in the park, a drinking fountain is only rewarding when one is standing directly next to it. In contrast, a flower’s beauty is greatest from up close, but can also be experienced from a range of distances and perspectives. Specifically, ρg and δg determine the scale and shape of the state reward function, with ri(S) = max(ρg(1 −distance(S, i, G)/δg), 0), where distance(S, i, G) is the geodesic distance between agent i and the goal. With δg ≤1, the reward function has a unit value of r(S) = ρg when the agent and object goal occupy the same location, i.e. when distance(S, i, G) = 0, and r(S) = 0 otherwise (see Fig. 1(a), row 1). When δg > 1, there is a “field” of positive reward around the goal, with a slope of −ρg/δg (see Fig. 1(a), rows 2 and 3). The state reward is maximal at distance(S, i, G) = 0, where r(S) = ρg, and decreases linearly with the agent’s geodesic distance from the goal, reaching a minimum of r(S) = 0 when distance(S, i, G) ≥δg. Social rewards for helping and hindering For complex agent j, the state reward function induced by a social goal Gj depends on the cost of j’s action Aj, as well as the reward function Ri of the agent that j wants to help or hinder. Specifically, j’s reward function is the difference of the expectation of i’s reward function and j’s action cost function, such that Rj(S, Aj) = ρoEAi[Ri(S, Ai)] −c(S, Aj). ρo is the social agent’s scaling of the expected reward of state S for agent i, which determines how much j “cares” about i relative to its own costs. For helping agents, ρo > 0, and for hindering agents, ρo < 0. Computing the expectation EAi[Ri(S, Ai)] relies on the social agent’s model of i’s planning process, which we will describe below. 2.1.2 State-transition functions In our interactive setting, T i depends not just on i’s action, but on all other agents’ actions as well. Agent i is assumed to compute T i(St+1, St, Ai t) by marginalizing over Aj t for all j ̸= i: T i(St+1, St, Ai t) = P(St+1|St, Ai t) = X Aj̸=i t P(St+1|St, A1:n t ) Y j P(Aj t ∈Aj̸=i t |St, G1:n) where n is the number of agents. This computation requires that an agent have a model of all other agents, whether simple or complex. Simple agents We assume that the simple agents model other agents as randomly selecting actions in proportion to the softmax of their expected cost, i.e. for agent j, P(Aj|S) ∝exp(β · c(S, Aj)). Complex agents We assume that the social agent j uses its model of other agents’ planning process to compute P(Ai|S, Gi), for i ̸= j, allowing for accurate prediction of other agents’ actions. We assume agents have access to the true environment dynamics. This is a simplification of a more realistic framework in which agents have only partial or false knowledge about the environment. 3 2.1.3 Multiagent planning Given the variables of MDP M, we can compute the optimal state-action value function Q∗: S ×A →R, which determines the expected infinite-horizon reward of taking an action in each state. We assume that agents have softmax-optimal policies, such that P(A|S, G) ∝exp(βQ∗(S, A)), allowing occasional deviations from the optimal action depending on the parameter β, which determines agents’ level of determinism (higher β implies higher determinism, or less randomness). In a multiagent setting, joint value functions can be optimized recursively, with one agent representing the value function of the other, and the other representing the representation of the first, and so on to an arbitrarily high order [10]. Here, we restrict ourselves to the first level of this reasoning hierarchy. That is, an agent A can at most represent an agent B’s reasoning about A’s goals and actions, but not a deeper recursion in which B reasons about A reasoning about B. 2.2 Inverse planning in multiagent MDPs Once we have computed P(Ai|S, Gi) for agents 1 through n using multiagent planning, we use Bayesian inverse planning to infer agents’ goals, given observations of their behavior. Fig. 1(b) shows the structure of the Bayes net generated by multiagent planning, and over which goal inferences are performed. Let θ = {ρi g, δi g, ρi o}1:n be a vector of the parameters of the agents’ reward functions. We compute the joint posterior marginal of agent i’s goal Gi and θ, given the observed state-sequence S1:T and the action-sequences A1:n 1:T −1 of agents 1:n using Bayes’ rule: P(Gi, θ|S1:T , A1:n 1:T −1, β) ∝ X Gj̸=i P(A1:n 1:T −1|S1:T , G1:n, θ, β)P(G1:n)P(θ) (1) To generate goal inferences for our experimental stimuli to compare with people’s judgments, we integrate Eq. 1 over a range of θ values for each stimulus trial: P(Gi|S1:T , A1:n 1:T −1, β) = X θ P(Gi, θ|S1:T , A1:n 1:T −1, β) (2) This allows our models to infer the combination of goals and reward functions that best explains the agents’ behavior for each stimulus. 3 Experiment We designed an experiment to test the Inverse Planning model of social goal attributions in a simple 2D maze-world domain, inspired by the stimuli of many previous studies involving children and adults [7, 5, 8, 6, 9, 12]. We created a set of videos which depicted agents interacting in a maze. Each video contained one “simple agent” and one “complex agent”, as described in the Computational Framework section. Subjects were asked to attribute goals to the agents after viewing brief snippets of these videos. Many of the snippets showed agent behavior consistent with more than one hypothesis about the agents’ goals. Data from subjects was compared to the predictions of the Inverse Planning model and a model based on simple visual cues that we describe in the Modeling subsection below. 3.1 Participants Participants were 20 adults, 8 female and 12 male. Mean age was 31 years. 3.2 Stimuli We constructed 24 scenarios in which two agents moved around a 2D maze (shown in Fig. 2). The maze always contained two potential object goals (a flower and a tree), and on 12 of the 24 scenarios it also contained a movable obstacle (a boulder). The scenarios were designed to satisfy two criteria. First, scenarios were to have agents acting in ways that were consistent with more than one hypothesis concerning their goals, with these ambiguities between goals sometimes being resolved as the scenario developed (see Fig. 2(a)). This criterion was included to test our model’s predictions based on ambiguous action sequences. Second, scenarios were to involve a variety of 4 perceptually distinct plans of action that might be interpreted as issuing from helping or hindering goals. For example, one agent pushing another toward an object goal, removing an obstacle from the other agent’s path, and moving aside for the other agent (all of which featured in our scenarios) could all be interpreted as helping. This criterion was included to test our formalization of social goals as based on an abstract relation between reward functions. In our model, social agents act to maximize or minimize the reward of the other agent, and the precise manner in which they do so will vary depending on the structure of the environment and their initial positions. Scenario 6 Frame 1 Frame 4 Frame 7 Frame 8 Frame 16 Scenario 19 Frame 1 Frame 4 Frame 6 Frame 8 Frame 16 (a) (b) Figure 2: Example interactions between Small and Large agents. Agents start as in Frame 1 and progress through the sequence along the corresponding colored paths. Each frame after Frame 1 corresponds to a probe point at which the video was cut off and subjects were asked to judge the agents’ goals. (a) The Large agent moves over each of the goal objects (Frames 1-7) and so the video is initially ambiguous between his having an object goal and a social goal. Disambiguation occurs from Frame 8, when the Large agent moves down and blocks the Small agent from continuing his path up to the object goal. (b) The Large agent moves the boulder, unblocking the Small agent’s shortest path to the flower (Frames 1-6). Once the Small agent moves into the same room (6), the Large agent pushes him onto the flower and allows him to rest there (8-16). Each scenario featured two different agents, which we call “Small” and “Large”. Large agents were visually bigger and are able to shift both movable obstacles and Small agents by moving directly into them. Large agents never fail in their actions, e.g. when they try to move left, they indeed move left. Small agents were visually smaller, and could not shift agents or boulders. In our scenarios, the actions of Small agents failed with a probability of about 0.4. Large agents correspond to the “complex agents” introduced in Section 2, in that they could have either object-directed goals or social goals (helping or hindering the Small agent). Small agents correspond to “simple agents” and could have only object goals. We produced videos of 16 frames in length, displaying each scenario. We showed three snippets from each video, which stopped some number of frames before the end. For example, the three snippets of scenario 6 were cut off at frames 4, 7, and 8 respectively (see Fig. 2(a)). Subjects were asked to make goal attributions at the end of both the snippets and the full 16-frame videos. Asking subjects for goal attributions at multiple points in a sequence allowed us to track the change in their judgments as evidence for particular goals accumulated. These cut-off or probe points were selected to try to capture key events in the scenarios and so occurred before and after crucial actions that disambiguated between different goals. Since each scenario was used to create 4 stimuli of varying length, there was a total of 96 stimuli. 3.3 Procedure Subjects were initially shown a set of familiarization videos of agents interacting in the maze, illustrating the structural properties of the maze-world e.g. the actions available to agents and the possibility of moving obstacles) and the differences between Small and Large agents. The experimental stimuli were then presented in four blocks, each containing 24 videos. Scenarios were randomized within blocks across subjects. The left-right orientation of agents and goals was counterbalanced across subjects. Subjects were told that each snippet would contain two new agents (one Small and one Large) and this was highlighted in the stimuli by randomly varying the color of the agents for each snippet. Subjects were told that agents had complete knowledge of the physical structure of the maze, including the position of all goals, agents and obstacles. After each snippet, subjects made 5 a forced-choice for the goal of each agent. For the Large agent, they could select either of the two social goals and either of the two object goals. For the Small agent, they could choose only from the object goals. Subjects also rated their confidence on a 3-point scale. 3.4 Modeling Model predictions were generated using Eq. 2, assuming uniform priors on goals, and were compared directly to subjects’ judgments. In our experiments, the world was given by a 2D maze-world, and the state space included the set of positions that agents and objects can jointly occupy without overlapping. The set of actions included Up, Down, Left, Right and Stay and we assume that c(S, A ∈{Up, Down, Left, Right}) = 1, and c(S, Stay) = 0.1 to reflect the greater cost of moving than staying put. We set β to 2 and γ to 0.99, following [2]. For the other parameters (namely ρg, δg and ρo) we integrated over a range of values that provided a good statistical fit to our stimuli. For instance, some stimuli were suggestive of “field” goals rather than point goals, and marginalizing over δg allowed our model to capture this. Values for ρg ranged from 0.5 to 2.5, going from a weak to a strong reward. For δg we integrated over three possible values: 0.5, 2.5 and 10.5. These corresponded to “point” object goals (agent receives reward for being on the goal only), “room” object goals (agent receives the most reward for being on the goal and some reward for being in the same room as the goal) and “full space” object goals (agent receives reward at any point in proportion to distance from goal). Values for ρo ranged from 1 to 9, from caring weakly about the other agent to caring about it to a high degree. We compared the Inverse Planning model to a model that made inferences about goals based on simple visual cues, inspired by previous heuristic- or perceptually-based accounts of human action understanding of similar 2D animated displays [3, 11]. Our aim was to test whether accurate goal inferences could be made simply by recognizing perceptual cues that correlate with goals, rather than by inverting a rational model. We constructed our “Cue-based” model by selecting ten visual cues (listed below), including nearly all the applicable cues from the existing cue-based model described in [3], leaving out those that do not apply to our stimuli, such as heading, angle and acceleration. We then formulated an inference model based on these cues by using multinomial logistic regression to subjects’ average judgments. The set of cues was as following: (1) the distance moved on the last timestep, (2) the change in movement distance between successive timesteps, (3+4) the geodesic distance to goals 1 and 2, (5+6) the change in distance to goals 1 and 2 (7) the distance to Small, (8) the change in distance to Small, (9+10) the distance of Small to goals 1 and 2. 3.5 Results Because our main interest is in judgments about the social goals of representationally complex agents, we analzyed only subjects’ judgments about the Large agents. Each subject judged a total of 96 stimuli, corresponding to 4 time points along each of 24 scenarios. For each of these 96 stimuli, we computed an empirical probability distribution representing how likely a subject was to believe that the Large agent had each of the four goals ‘flower’, ‘tree’, ‘help’, or ‘hinder’, by averaging judgments for that stimulus across subjects, weighted by subjects’ confidence ratings. All analyses then compared these average human judgments to the predictions of the Inverse Planning and Cue-based models. Across all goal types, the overall linear correlations between human judgments and predictions from the two models appear similar: r = 0.83 for the Inverse Planning model, and r = 0.77 for the Cue-based model. Fig. 3 shows these correlations broken down by goal type, and reveals significant differences between the models on social versus object goals. The Inverse Planning model correlates well with judgments for all goal types: r = 0.79, 0.77, 0.86, 0.81 for flower, tree, helping, and hindering respectively. The Cue-based model correlates well with judgments for object goals (r = 0.85, 0.90 for flower, tree) – indeed slightly better the Inverse Planning model – but much less well for social goals (r = 0.67, 0.66 for helping, hindering). The most notable differences come on the left-hand sides of the bottom panels in Fig. 3. There are many stimuli for which people are very confident that the Large agent is either helping or hindering, and the Inverse Planning model is similarly confident (bar heights near 1). The Cue-based model, in contrast, is unsure: it assigns roughly equal probabilities of helping or hindering to these cases (bar heights near 0.5). In other words, the Cue-based model is effective at inferring simple object goals of maze-world agents, but 6 is generally unable to distinguish between the more complex goals of helping and hindering. When constrained to simply differentiating between social and object goals both models succeed equally (r = 0.84), where in the Cue-based model this is probably because moving away from the object goals serves as a good cue to separate these categories. However, the Inverse Planning model is more successful in differentiating the right goal within social goals (r = 0.73 for the Inverse Planning model vs. r = 0.44 for the Cue-based model). Several other general trends in the results are worth noting. The Inverse Planning model fits very closely with the judgments subjects make after the full 16-frame videos. On 23 of the 24 scenarios, humans and the Inverse Planning model have the highest posterior / rating in the same goal (r = 0.97, contrasted with r = 0.77 for the Cue-based model). Note that in the one scenario for which humans and the Inverse Planning model disagreed after observing the full sequence, both humans and the model were close to being ambivalent whether the Large agent was hindering or interested in the flower. There is also evidence that the reasonably good overall correlation for the Cue-based model is partially due to overfitting; this should not be surprising given how many free parameters the model has. We divided scenarios into two groups depending on whether a boulder was moved around in the scenario, as movable boulders increase the range of variability in helping and hindering action sequences. When trained on the ‘no boulder’ cases, the Cue-based model correlates poorly with subjects’ average judgments on the ‘boulder’ cases: r = 0.42. The same failure of transfer occurs when the Cue-based model is trained on the ‘boulder’ cases and tested on the ‘no boulder’ cases: r = 0.36. This is consistent with our general concern that a Cue-based model incorporating many free parameters may do well when tailored to a particular environment, but is not likely to generalize well to new environments. In contrast, the Inverse Planning model captures abstract relations between the agents and their possible goal and so lends itself to a variety of environments. (r = 0.79) (r = 0.77) 0.025 0.1 0.25 0.5 0.75 0.9 0.975 (r = 0.86) (r = 0.81) Human judgments Inverse planning model 0.025 0.1 0.25 0.5 0.75 0.9 0.975 0.025 0.1 0.25 0.5 0.75 0.9 0.975 0.025 0.1 0.25 0.5 0.75 0.9 0.975 Flower Tree Help Hinder 0 0.2 0.4 0.6 0.8 1 (r = 0.85) (r = 0.90) 0 0.2 0.4 0.6 0.8 1 Cue−based model (r = 0.67) (r = 0.66) Human judgments 0.025 0.1 0.25 0.5 0.75 0.9 0.975 0.025 0.1 0.25 0.5 0.75 0.9 0.975 0.025 0.1 0.25 0.5 0.75 0.9 0.975 0.025 0.1 0.25 0.5 0.75 0.9 0.975 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 (b) (a) Figure 3: Correlations between human goal judgments and predictions of the Inverse Planning model (a) and the Cue-based model (b), broken down by goal type. Bars correspond to bins of stimuli (out of 96 total) on which the average human judgment for the probability of that goal was within a particular range; the midpoint of each bin’s range is shown on the x-axis labels. The height of each bar shows the model’s average probability judgment for all stimuli in that bin. Linear correlations between the model’s goal probabilities and average human judgments for all 96 stimuli are given in the y-axis labels. The inability of the heuristic model to distinguish between helping and hindering is illustrated by the plots in Fig. 4. In contrast, both the Inverse Planning model and the human subjects are often very confident that an agent is helping and not hindering (or vice versa). Fig. 4 also illustrates a more general finding, that the Inverse Planning model captures most of the major qualitative shifts (e.g. shifts resulting from disambiguating sequences) in subjects’ goal attribution. Figure 4 displays mean human judgments on four scenarios. Probe points (i.e. points within the sequences at which subjects made judgments) are indicated on the plots and human data is compared with predictions from the Inverse Planning model and the Cue-based model. On scenario 6 (depicted in Fig. 2(a) but with goals switched), both the Inverse Planning model and humans subjects recognize the movement of the Large agent one step off the flower (or the tree in Fig. 2(b)) as strong evidence that Large has a hindering goal. The Cue-based model responds in the same way but with much less confidence in hindering. Even after 8 subsequent frames of action it is unable to decide in favor of hindering over helping. 7 While the Inverse Planning model and subjects almost always agree by the end of a sequence, they sometimes disagree at early probe points. In scenario 5, both agents start off in the bottom-left room, but with the Small agent right at the entrance to the top-left room. As the Small agent tries to move towards the flower (the top-left goal), the Large agent moves up from below and pushes Small one step towards the flower before moving off to the right to the tree. People interpret the Large agent’s action as strong evidence for helping, in contrast with the Inverse Planning model. For the model, because Small is so close to his goal, Large could just as well stay put and save his own action costs. Therefore his movement upwards is not evidence of helping. flower tree help hinder Frame 2 4 6 8 10121416 0 0.5 1 People 2 4 6 8 10121416 0 0.5 1 Inverse Planning (probe points) 2 4 6 8 10121416 0 0.5 1 2 4 6 8 10121416 0 0.5 1 Visual Cue Scenario 19 Frame 2 4 6 8 10121416 0 0.5 1 People 2 4 6 8 10121416 0 0.5 1 Inverse Planning (probe points) 2 4 6 8 10121416 0 0.5 1 2 4 6 8 10121416 0 0.5 1 Visual Cue Scenario 6 Frame 2 4 6 8 10121416 0 0.5 1 People 2 4 6 8 10121416 0 0.5 1 Inverse Planning (probe points) 2 4 6 8 10121416 0 0.5 1 2 4 6 8 10121416 0 0.5 1 Visual Cue Scenario 24 Frame 2 4 6 8 10121416 0 0.5 1 People 2 4 6 8 10121416 0 0.5 1 Inverse Planning (probe points) Inverse Planning (all points) Inverse Planning (all points) Inverse Planning (all points) Inverse Planning (all points) 2 4 6 8 10121416 0 0.5 1 2 4 6 8 10121416 0 0.5 1 Visual Cue Scenario 12 Average rating P(Goal|Trial) P(Goal|Trial) P(Goal|Trial) (a) (b) (c) (d) Figure 4: Example data and model predictions. Probe points are marked as black circles. (a) Average subject ratings with standard error bars. (b) Predictions of Inverse Planning model interpolated from cut points. (c) Predictions of Inverse Planning model for all points in the sequence. (d) Predictions of Cue-based model. 4 Conclusion Our goal in this paper was to address two challenges. The first was to provide a formalization of social goal attribution incorporated into a general theory-based model for goal attribution. This model had to enable the inference that A is helping or hindering B from interactions between A and B but without prior knowledge of either agent’s goal, and to account for the range of behaviors that humans judge as evidence of helping or hindering. The second challenge was for the model to perform well on a demanding inference task in which social goals must be inferred from very few observations without directly observable evidence of agents’ goals. The experimental results presented here go some way to meeting these challenges. The Inverse Planning model classified a diverse range of agent interactions as helping or hindering in line with human judgments. This model also distinguished itself against a model based solely on simple perceptual cues. It produced a closer fit to humans for both social and nonsocial goal attributions, and was far superior to the visual cue model in discriminating between helping and hindering. These results suggest various lines of further research. One task is to augment this formal model of helping and hindering to capture more of the complexity behind human judgments. On the Inverse Planning model, A will act to advance B’s progress only if there is some chance of B actually receiving a nontrivial amount of reward in a future state. However, people often help others towards a goal even if they think it very unlikely that the goal will be achieved. This aspect of helping could be explored by supposing that the utility of a helping agent depends not just on another agent’s reward function but also his value function. Acknowledgments: This work was supported by the James S. McDonnell Foundation Causal Learning Collaborative Initiative, ARO MURI grant W911NF-08-1-0242, AFOSR MURI grant FA9550-07-1-0075 and the NSF Graduate Fellowship (CLB). 8 References [1] C. L. Baker, N. D. Goodman, and J. B. Tenenbaum. Theory-based social goal inference. In Proceedings of the Thirtieth Annual Conference of the Cognitive Science Society, 2008. [2] C. L. Baker, J. B. Tenenbaum, and R. R. Saxe. Bayesian models of human action understanding. In Advances in Neural Information Processing Systems, volume 18, pages 99–106, 2006. [3] P. W. Blythe, P. M. Todd, and G. F. Miller. How motion reveals intention: categorizing social interactions. In G. Gigerenzer, P. M. Todd, and the ABC Research Group, editors, Simple heuristics that make us smart, pages 257–286. Oxford University Press, New York, 1999. [4] D. C. Dennett. The Intentional Stance. MIT Press, Cambridge, MA, 1987. [5] G. Gergely, Z. N´adasdy, G. Csibra, and S. Bir´o. Taking the intentional stance at 12 months of age. Cognition, 56:165–193, 1995. [6] J. K. Hamlin, Karen Wynn, and Paul Bloom. Social evaluation by preverbal infants. Nature, 450:557–560, 2007. [7] F. Heider and M. A. Simmel. An experimental study of apparent behavior. American Journal of Psychology, 57:243–249, 1944. [8] V. Kuhlmeier, Karen Wynn, and Paul Bloom. Attribution of dispositional states by 12-month-olds. Psychological Science, 14(5):402–408, 2003. [9] J. Schultz, K. Friston, D. M. Wolpert, and C. D. Frith. Activation in posterior superior temporal sulcus parallels parameter inducing the percept of animacy. Neuron, 45:625–635, 2005. [10] Wako Yoshida, Ray J. Dolan, and Karl J. Friston. Game theory of mind. PLoS Computational Biology, 4(12):1–14, 2008. [11] Jeffrey M. Zacks. Using movement and intentions to understand simple events. Cognitive Science, 28:979–1008, 2004. [12] P. D. Tremoulet and J. Feldman The influence of spatial context and the role of intentionality in the interpretation of animacy from motion. Perception and Psychophysics, 29:943–951, 2006. 9
2009
87
3,840
Sequential effects reflect parallel learning of multiple environmental regularities Matthew H. Wilder⋆, Matt Jones†, & Michael C. Mozer⋆ ⋆Dept. of Computer Science †Dept. of Psychology University of Colorado Boulder, CO 80309 <wildermh@colorado.edu, mcj@colorado.edu, mozer@colorado.edu> Abstract Across a wide range of cognitive tasks, recent experience influences behavior. For example, when individuals repeatedly perform a simple two-alternative forcedchoice task (2AFC), response latencies vary dramatically based on the immediately preceding trial sequence. These sequential effects have been interpreted as adaptation to the statistical structure of an uncertain, changing environment (e.g., Jones and Sieck, 2003; Mozer, Kinoshita, and Shettel, 2007; Yu and Cohen, 2008). The Dynamic Belief Model (DBM) (Yu and Cohen, 2008) explains sequential effects in 2AFC tasks as a rational consequence of a dynamic internal representation that tracks second-order statistics of the trial sequence (repetition rates) and predicts whether the upcoming trial will be a repetition or an alternation of the previous trial. Experimental results suggest that first-order statistics (base rates) also influence sequential effects. We propose a model that learns both first- and second-order sequence properties, each according to the basic principles of the DBM but under a unified inferential framework. This model, the Dynamic Belief Mixture Model (DBM2), obtains precise, parsimonious fits to data. Furthermore, the model predicts dissociations in behavioral (Maloney, Martello, Sahm, and Spillmann, 2005) and electrophysiological studies (Jentzsch and Sommer, 2002), supporting the psychological and neurobiological reality of its two components. 1 Introduction Picture an intense match point at the Wimbledon tennis championship, Nadal on the defense from Federer’s powerful shots. Nadal returns three straight hits to his forehand side. In the split second before the ball is back in his court, he forms an expectation about where Federer will hit the ball next—will the streak of forehands continue or will there be a switch to his backhand. As the point continues, Nadal gains the upper ground and begins making Federer alternate from forehand to backhand to forehand. Now Federer finds himself trying to predict whether or not this alternating pattern will be continued with the next shot. These two are caught up in a high-stakes game of sequential effects—their actions and expectations for the current shot have a strong dependence on the past few shots. Sequential effects play a ubiquitous role in our lives—our actions are constantly affected by our recent experiences. In controlled environments, sequential effects have been observed across a wide range of tasks and experimental paradigms, and aspects of cognition ranging from perception to memory to language to decision making. Sequential effects often occur without awareness and cannot be overriden by instructions, suggesting a robust cognitive inclination to adapt behavior in an ongoing manner. Surprisingly, people exhibit sequential effects even when they are aware that there is no dependence 1 (a) 300 320 340 360 380 400 Response Time RRRR ARRR RARR AARR RRAR ARAR RAAR AAAR RRRA ARRA RARA AARA RRAA ARAA RAAA AAAA Cho DBM (b) 300 320 340 360 380 400 Response Time RRRR ARRR RARR AARR RRAR ARAR RAAR AAAR RRRA ARRA RARA AARA RRAA ARAA RAAA AAAA Cho DBM2 Figure 1: (a) DBM fit to the behavioral data from Cho et al. (2002). Predictions within each of the four groups are monotonically increasing or decreasing. Thus the model is unable to account for the two circled relationships. This fit accounts for 95.8% of the variance in the data. (p0 = Beta(2.6155, 2.4547), α = 0.4899) (b) The fit to the same data obtained from DBM2 in which probability estimates are derived from both first-order and second-order trial statistics. 99.2% of the data variance is explained by this fit. (α = 0.3427, w = 0.4763) structure to the environment. Progress toward understanding the intricate complexities of sequential effects will no doubt provide important insights into the ways in which individuals adapt to their environment and make predictions about future outcomes. One classic domain where reliable sequential effects have been observed is in two-alternative forcedchoice (2AFC) tasks (e.g, Jentzsch and Sommer, 2002; Hale, 1967; Soetens et al., 1985; Cho et al., 2002). In this type of task, participants are shown one of two different stimuli, which we denote as X and Y, and are instructed to respond as quickly as possible by mapping the stimulus to a corresponding response, say pressing the left button for X and the right button for Y. Response time (RT) is recorded, and the task is repeated several hundred or thousand times. To measure sequential effects, the RT is conditioned on the recent trial history. (In 2AFC tasks, stimuli and responses are confounded; as a result, it is common to refer to the ’trial’ instead of the ’stimulus’ or ’response’. In this paper, ’trial’ will be synonymous with the stimulus-response pair.) Consider a sequence such as XY Y XX, where the rightmost symbol is the current trial (X), and the symbols to the left are successively earlier trials. Such a four-back trial history can be represented in a manner that focuses not on the trial identities, but on whether trials are repeated or alternated. With R and A denoting repetitions and alternations, respectively, the trial sequence XY Y XX can be encoded as ARAR. Note that this R/A encoding collapses across isomorphic sequences XY Y XX and Y XXY Y . The small blue circles in Figure 1a show the RTs from Cho et al. (2002) conditioned on the recent trial history. Along the abscissa in Figure 1a are all four-back sequence histories ordered according to the R/A encoding. The left half of the graph represents cases where the current trial is a repetition of the previous, and the right half represents cases where the current trial is an alternation. The general pattern we see in the data is a triangular shape that can be understood by comparing the two extreme points on each half, RRRR vs. AAAR and RRRA vs. AAAA. It seems logical that the response to the current trial in RRRR will be significantly faster than in AAAR (RTRRRR < RTAAAR) because in the RRRR case, the current trial matches the expectation built up over the past few trials whereas in the AAAR case, the current trial violates the expectation of an alternation. The same argument applies to RRRA vs. AAAA, leading to the intuition that RTRRRA > RTAAAA. The trial histories are ordered along the abscissa so that the left half is monotonically increasing and the right half is monotonically decreasing following the same line of intuition, i.e., many recent repetitions to many recent alternations. 2 Toward A Rational Model Of Sequential Effects Many models have been proposed to capture sequential effects, including Estes (1950), Anderson (1960), Laming (1969), and Cho et al. (2002). Other models have interpreted sequential effects as adaptation to the statistical structure of a dynamic environment (e.g., Jones and Sieck, 2003; Mozer, Kinoshita, and Shettel, 2007). In this same vein, Yu and Cohen (2008) recently suggested a rational 2 (a) C t-1 C t γ t-1 γ t R t-1 R t (b) C t-1 C t γ t-1 γ t S t-1 S t (c) C t-1 C t S t-1 S t φ t-1 φ t γ t-1 γ t Figure 2: Three graphical models that capture sequential dependencies. (a) Dynamic Belief Model (DBM) of Yu and Cohen (2008). (b) A reformulation of DBM in which the output variable, St, is the actual stimulus identity instead of the repetition/alternation representation used in DBM. (c) Our proposed Dynamic Belief Mixture Model (DBM2). Models are explained in more detail in the text. explanation for sequential effects such as those observed in Cho et al. (2002). According to their Dynamic Belief Model (DBM), individuals estimate the statistics of a nonstationary environment. The key contribution of this work is that it provides a rational justification for sequential effects that have been previously viewed as resulting from low-level brain mechanisms such as residual neural activation. DBM describes performance in 2AFC tasks as Bayesian inference over whether the next trial in the sequence will be a repetition or an alternation of the previous trial, conditioned on the trial history. If Rt is the Bernoulli random variable that denotes whether trial t is a repetition (Rt = 1) or alternation (Rt = 0) of the previous trial, DBM determines P(Rt|⃗Rt−1), where ⃗Rt−1 denotes the trial sequence preceding trial t, i.e., ⃗Rt−1 = (R1, R2, ..., Rt−1). DBM assumes a generative model, shown in Figure 2a, in which Rt = 1 with probability γt and Rt = 0 with probability 1−γt. The random variable γt describes a characteristic of the environment. According to the generative model, the environment is nonstationary and γt can either retain the same value as on trial t −1 or it can change. Specifically, Ct denotes whether the environment has changed between t −1 and t (Ct = 1) or not (Ct = 0). Ct is a Bernoulli random variable with success probability α. If the environment does not change, γt = γt−1. If the environment changes, γt is drawn from a prior distribution, which we refer to as the reset prior denoted by p0(γ) ∼Beta(a, b). Before each trial t of a 2AFC task, DBM computes the probability of the upcoming stimulus conditioned on the trial history. The model assumes that the perceptual and motor system is tuned based on this expectation, so that RT will be a linearly decreasing function of the probability assigned to the event that actually occurs, i.e. of P(Rt = R|⃗Rt−1) on repetition trials and of P(Rt = A|⃗Rt−1) = 1 - P(Rt = R|⃗Rt−1) on alternation trials. The red plusses in Figure 1 show DBM’s fit to the data from Cho et al. (2002). DBM has five free parameters that were optimized to fit the data. The parameters are: the change probability, α; the imaginary counts of the reset prior, a and b; and two additional parameters to map model probabilities to RTs via an affine transform. 2.1 Intuiting DBM predictions Another contribution of Yu and Cohen (2008) is the mathematical demonstration that DBM is approximately equivalent to an exponential filter over trial histories. That is, the probability that the current stimulus is a repetition is a weighted sum of past observations, with repetitions being scored as 1 and alternations as 0, and with weights decaying exponentially as a function of lag. The exponential filter gives insight into how DBM probabilities will vary as a function of trial history. Consider two 4-back trial histories: an alternation followed by two repetitions (ARR−) and two alternations followed by a repetition (AAR−), where the −indicates that the current trial type is unknown. An exponential filter predicts that ARR−will always create a stronger expectation for an R on the current trial than AAR−will, because the former includes an additional past repetition. Thus, if the current trial is in fact a repetition, the model predicts a faster RT for ARR−compared to AAR−(i.e., RTARRR < RTAARR). Conversely, if the current trial is an alternation, the model 3 predicts RTARRA > RTAARA. Similarly, if two sequences with the same number of Rs and As are compared, for example RAR−and ARR−, the model predicts RTRARR > RTARRR and RTRARA < RTARRA because more recent trials have a stronger influence. Comparing the exponential filter predictions for adjacent sequences in Figure 1 yields the expectation that the RTs will be monotonically increasing in the left two groups of four and monotonically decreasing in the two right groups. The data are divided into groups of 4 because the relationships between histories like AARR and RRAR depend on the specific parameters of the exponential filter, which determine whether one recent A will outweigh two earlier As. It is clear in Figure 1 that the DBM predictions follow this pattern. 2.2 what’s missing in DBM DBM offers an impressive fit to the overall pattern of the behavioral data. Circled in Figure 1, however, we see two significant pairs of sequence histories for which the monotonicity prediction does not hold. These are reliable aspects of the data and are not measurement error. Consider the circle on the left, in which RTARAR > RTRAAR for the human data. Because DBM functions approximately as an exponential filter, and the repetition in the trial history is more recent for ARAR than for RAAR, DBM predicts RTARAR < RTRAAR. An exponential filter, and thus DBM, is unable to account for this deviation in the data. To understand this mismatch, we consider an alternative representation of the trial history: the firstorder sequence, i.e., the sequence of actual stimulus values. The two R/A sequences ARAR and RAAR correspond to stimulus sequences XY Y XX and XXY XX. If we consider an exponential filter on the actual stimulus sequence, we obtain the opposite prediction from that of DBM: RTXY Y XX > RTXXY XX because there are more recent occurrences of X in the latter sequence. The other circled data in Figure 1a correspond to an analogous situation. Again, DBM also makes a prediction inconsistent with the data, that RTARAA > RTRAAA, whereas an exponential filter on stimulus values predicts the opposite outcome—RTXY Y XY < RTXXY XY . Of course this analysis leads to predictions for other pairs of points where DBM is consistent with the data and a stimulus based exponential filter is inconsistent. Nevertheless, the variations in the data suggest that more importance should be given to the actual stimulus values. In general, we can divide the sequential effects observed in the data into two classes: first- and second-order effects. First-order sequential effects result from the priming of specific stimulus or response values. We refer to this as a first-order effect because it depends only on the stimulus values rather than a higher-order representation such as the repetition/alternation nature of a trial. These effects correspond to the estimation of the baserate of each stimulus or response value. They are observed in a wide range of experimental paradigms and are referred to as stimulus priming or response priming. The effects captured by DBM, i.e. the triangular pattern in RT data, can be thought of as a second-order effect because it reflects learning of the correlation structure between the current trial and the previous trial. In second-order effects, the actual stimulus value is irrelevant and all that matters is whether the stimulus was a repetition of the previous trial. As DBM proposes, these effects essentially arise from an attempt to estimate the repetition rate of the sequence. DBM naturally produces second-order sequential effects because it abstracts over the stimulus level of description: observations in the model are R and A instead of the actual stimuli X and Y . Because of this abstraction, DBM is inherently unable to exhibit first-order effects. To gain an understanding of how first-order effects could be integrated into this type of Bayesian framework, we reformulate the DBM architecture. Figure 2b shows an equivalent depiction of DBM in which the generative process on trial t produces the actual stimulus value, denoted St. St is conditioned on both the repetition probability, γt, and the previous stimulus value, St−1. Under this formulation, St = St−1 with probability γt, and St equals the opposite of St−1 (i.e., XY or Y X) with probability 1 −γt. An additional benefit of this reformulated architecture is that it can represent first-order effects if we switch the meaning of γ. In particular, we can treat γ as the probability of the stimulus taking on a specific value (X or Y ) instead of the probability of a repetition. St is then simply a draw from a Bernoulli process with rate γ. Note that for modeling a first-order effect with this architecture, the conditional dependence of St on St−1 becomes unnecessary. The nonstationarity of the environment, as represented by the change variable C, behaves in the same way regardless of whether we use the model to represent first- or second-order structure. 4 3 Dynamic Belief Mixture Model The complex contributions of first- and second-order effects to the full pattern of observed sequential effects suggest the need for a model with more explanatory power than DBM. It seems clear that individuals are performing a more sophisticated inference about the statistics of the environment than proposed by DBM. We have shown that the DBM architecture can be reformulated to generate first-order effects by having it infer the baserate instead of the repetition rate of the sequence, but the empirical data suggest both mechanisms are present simultaneously. Thus the challenge is to merge these two effects into one model that performs joint inference over both environmental statistics. Here we propose a Bayesian model that captures both first- and second-order effects, building on the basic principles of DBM. According to this new model, which we call the Dynamic Belief Mixture Model (DBM2), the learner assumes that the stimulus on a given trial is probabilistically affected by two factors: the random variable φ, which represents the sequence baserate, and the random variable γ, which represents the repetition rate. The combination of these two factors is governed by a mixture weight w that represents the relative weight of the φ component. As in DBM, the environment is assumed to be nonstationary, meaning that on each trial, with probability α, φ and γ are jointly resampled from the reset prior, p0(φ, γ), which is uniform over [0, 1]2. Figure 2c shows the graphical architecture for this model. This architecture is an extension of our reformulation of the DBM architecture in Figure 2b. Importantly, the observed variable, S, is the actual stimulus value instead of the repetition/alternation representation used in DBM. This architecture allows for explicit representation of the baserate, through the direct influence of φt on the physical stimulus value St, as well as representation of the repetition rate through the joint influence of γt and the previous stimulus St−1 on St. Formally, we express the probability of St given φ, γ, and St−1 as shown in Equation 1. P(St = X|φt, γt, St−1 = X) = wφt + (1 −w)γt P(St = X|φt, γt, St−1 = Y ) = wφt + (1 −w)(1 −γt) (1) DBM2 operates by maintaining the iterative prior over φ and γ, p(φt, γt|⃗St−1). After each observation, the joint posterior, p(φt, γt|⃗St), is computed using Bayes’ Rule from the iterative prior and the likelihood of the most recent observation, as shown in Equation 2. p(φt, γt|⃗St) ∝P(St|φt, γt, St−1)p(φt, γt|⃗St−1). (2) The iterative prior for the next trial is then a mixture of the posterior from the current trial, weighted by 1 −α, and the reset prior, weighted by α (the probability of change in φ and γ). p(φt+1, γt+1|⃗St) = (1 −α)p(φt, γt|⃗St) + αp0(φt+1, γt+1). (3) The model generates predictions, P(St|⃗St−1), by integrating Equation 1 over the iterative prior on φt and γt. In our simulations, we maintain a discrete approximation to the continuous joint iterative prior with the interval [0,1] divided into 100 equally spaced sections. Expectations are computed by summing over the discrete probability mass function. Figure 1b shows that DBM2 provides an excellent fit to the Cho et al. data, explaining the combination of both first- and second-order effects. To account for the overall advantage of repetition trials over alternation trials in the data, a repetition bias had to be built into the reset prior in DBM. In DBM2, the first-order component naturally introduces an advantage for repetition trials. This occurs because the estimate of φt is shifted toward the value of the previous stimulus, St−1, thus leading to a greater expectation that the same value will appear on the current trial. This fact eliminates the need for a nonuniform reset prior in DBM2. We use a uniform reset prior in all DBM2 simulations, thus allowing the model to operate with only four free parameters: α, w, and the two parameters for the affine transform from model probabilities to RTs. The nonuniform reset prior in DBM allows it to be biased either for repetition or alternation. This flexibility is important in a model, because different experiments show different biases, and the biases are difficult to predict. For example, the Jentzsch and Sommer experiment showed little 5 (a) 260 280 300 320 340 360 Response Time RRRR ARRR RARR AARR RRAR ARAR RAAR AAAR RRRA ARRA RARA AARA RRAA ARAA RAAA AAAA Jentzsch 1 DBM 2 (b) N bias neutral P bias PSI NNNN PNNN PPNN NPNN PPPN NPPN NNPN PNPN PPPP NPPP NNPP PNPP NNNP PNNP PPNP NPNP Maloney 1 DBM2 Figure 3: DBM2 fits for the behavioral data from (a) Jentzsch and Sommer (2002) Experiment 1 which accounts for 96.5% of the data variance (α = 0.2828, w = 0.3950) and (b) Maloney et al. (2005) Experiment 1 which accounts for 97.7% of the data variance. (α = 0.0283, w = 0.3591) bias, but a replication we performed—with the same stimuli and same responses—obtained a strong alternation bias. It is our hunch that the bias should not be cast as part of the computational theory (specifically, the prior); rather, the bias reflects attentional and perceptual mechanisms at play, which can introduce varying degrees of an alternation bias. Specifically, four classic effects have been reported in the literature that make it difficult for individuals to process the same stimulus two times in a row at a short lag: attentional blink Raymond et al. (1992), inhibition of return Posner and Cohen (1984), repetition blindness Kanwisher (1987), and the Ranschburg effect Jahnke (1969). For example, with repetition blindness, processing of an item is impaired if it occurs within 500 ms of another instance of the same item in a rapid serial stream; this condition is often satisfied with 2AFC. In support of our view that fast-acting secondary mechanisms are at play in 2AFC, Jentzsch and Sommer (Experiment 2) found that using a very short lag between each response and the next stimulus modulated sequential effects in a difficult-to-interpret manner. Explaining this finding via a rational theory would be challenging. To allow for various patterns of bias across experiments, we introduced an additional parameter to our model, an offset specifically for repetition trials, which can serve as a means of removing the influence of the effects listed above. This parameter plays much the same role as DBM’s priors. Although it is not as elegant, we believe it is more correct, because the bias should be considered as part of the neural implementation, not the computational theory. 4 Other Tests of DBM2 With its ability to represent both first- and second-order effects, DBM2 offers a robust model for a range of sequential effects. In Figure 3a, we see that DBM2 provides a close fit to the data from Experiment 1 of Jentzsch and Sommer (2002). The general design of this 2AFC task is similar to the design in Cho et al. (2002) though some details vary. Notably we see a slight advantage on alternation trials, as opposed to the repetition bias seen in Cho et al. Surprisingly, DBM2 is able to account for the sequential effects in other binary decision tasks that do not fit into the 2AFC paradigm. In Experiment 1 of Maloney et al. (2005), subjects observed a rotation of two points on a circle and reported whether the direction of rotation was positive (clockwise) or negative (counterclockwise). The stimuli were constructed so that the direction of motion was ambiguous, but a particular variable related to the angle of motion could be manipulated to make subjects more likely to perceive one direction or the other. Psychophysical techniques were used to estimate the Point of Subjective Indifference (PSI), the angle at which the observer was equally likely to make either response. PSI measures the subject’s bias toward perceiving a positive as opposed to a negative rotation. Maloney et. al. found that this bias in perceiving rotation was influenced by the recent trial history. Figure 3b shows the data for this experiment rearranged to be consistent with the R/A orderings used elsewhere (the sequences on the abscissa show the physical stimulus values, ending with Trial t −1). The bias, conditioned on the 4-back trial history, follows a similar pattern to that seen with RTs in Cho et al. (2002) and Jentzsch and Sommer (2002). 6 Table 1: A comparison between the % of data variance explained by DBM and DBM2. Cho Jentzsch 1 Maloney 1 DBM 95.8 95.5 96.1 DBM2 99.2 96.5 97.7 In modeling Experiment 1, we assumed that PSI reflects the subject’s probabilistic expectation about the upcoming stimulus. Before each trial, we computed the model’s probability that the next stimulus would be P, and then converted this probability to the PSI bias measure using an affine transform similar to our RT transform. Figure 3b shows the close fit DBM2 obtains for the experimental data. To assess the value of DBM2, we also fit DBM to these two experiments. Table 1 shows the comparison between DBM and DBM2 for both datasets as well as Cho et al. The percentage of variance explained by the models is used as a measure for comparison. Across all three experiments, DBM2 captures a greater proportion of the variance in the data. 5 EEG evidence for first-order and second-order predictions DBM2 proposes that subjects in binary choice tasks track both the baserate and the repetition rate in the sequence. Therefore an important source of support for the model would be evidence for the psychological separability of these two mechanisms. One such line of evidence comes from Jentzsch and Sommer (2002), who used electroencephalogram (EEG) recordings to provide additional insight into the mechanisms involved in the 2AFC task. The EEG was used to record subjects’ lateralized readiness potential (LRP) during performance of the task. LRP essentially provides a way to identify the moment of response selection—a negative spike in the LRP signal in motor cortex reflects initiation of a response command in the corresponding hand. Jentzsch and Sommer present two different ways of analyzing the LRP data: stimulus-locked LRP (S-LRP) and response-locked LRP (LRP-R). The S-LRP interval measures the time from stimulus onset to response activation on each trial. The LRP-R interval measures the time elapsed between response activation and the actual response. Together, these two measures provide a way to divide the total RT into a stimulus-processing stage and a response-execution stage. Interestingly, the S-LRP and LRP-R data exhibit different patterns of sequential effects when conditioned on the 4-back trial histories, as shown in Figure 4. DBM2 offers a natural explanation for the different patterns observed in the two stages of processing, because they align well with the division between first- and second-order sequential effects. In the S-LRP data, the pattern is predominantly second-order, i.e. RT on repetition trials increases as more alternations appear in the recent history, and RT on alternation trials shows the opposite dependence. In contrast, the LRP-R results exhibit an effect that is mostly first-order (which could be easily seen if the histories were reordered under an X/Y representation). Thus we can model the LRP data by extracting the separate contributions of φ and γ in Equation 1. We use the γ component (i.e., the second term on the RHS of Eq. 1) to predict the S-LRP results and the φ component (i.e., the first term on the RHS of Eq. 1) to predict the LRP-R results. This decomposition is consistent with the model of overall RT, because the sum of these components provides the model’s RT prediction, just as the sum of the S-LRP and LRP-R measures equals the subject’s actual RT (up to an additive constant explained below). Figure 4 shows the model fits to the LRP data. The parameters of the model were constrained to be the same as those used for fitting the behavioral results shown in Figure 3a. To convert the probabilities in DBM2 to durations, we used the same scaling factor used to fit the behavioral data but allowed for new offsets for the R and A groups for both S-LRP and LRP-R. The offset terms need to be free because the difference in procedures for estimating S-LRP and LRP-R (i.e., aligning trials on the stimulus vs. the response) allows the sum of S-LRP and LRP-R to differ from total RT by an additive constant related to the random variability in RT across trials. Other than these offset terms, the fits to the LRP measures constitute parameter-free predictions of EEG data from behavioral data. 7 (a) 180 200 220 240 260 280 300 Response Time RRRR ARRR RARR AARR RRAR ARAR RAAR AAAR RRRA ARRA RARA AARA RRAA ARAA RAAA AAAA S−LRP DBM2 (b) 20 40 60 80 100 120 Response Time RRRR ARRR RARR AARR RRAR ARAR RAAR AAAR RRRA ARRA RARA AARA RRAA ARAA RAAA AAAA LRP−R DBM2 (c) N bias neutral P bias PSI NNN PNN PPN NPN PPP NPP NNP PNP Maloney 2 DBM2 Figure 4: (a) and (b) show DBM2 fits to the S-LRP results of Jentzsch and Sommer (2002) Experiment 1. Model parameters are the same as those used for the behavioral fit shown in Figure 3a, except for offset parameters. DBM2 explains 73.4% of the variance in the S-LRP data and 87.0% of the variance in the LRP-R data. (c) Behavioral results and DBM2 fits for Experiment 2 of Maloney et al. (2005). The model fit explains 91.9% of the variance in the data (α = 0.0283, w = 0). 6 More evidence for the two components of DBM2 In the second experiment reported in Maloney et al. (2005), participants only responded on every fourth trial. The goal of this manipulation was to test whether the sequential effect occurred in the absence of prior responses. Each ambiguous test stimulus followed three stimuli for which the direction of rotation was unambiguous and to which the subject made no response. The responses to the test stimuli were grouped according to the 3-back stimulus history, and a PSI value was computed for each of the eight histories to measure subjects’ bias toward perceiving positive vs. negative rotation. The results are shown in Figure 4c. As in Figure 3b, the histories on the abscissa show the physical stimulus values, ending with Trial t −1, and the arrangement of these histories is consistent with the R/A orderings used elsewhere in this paper. DBM2’s explanation of Jentzsch and Sommer’s EEG results indicates that first-order sequential effects arise in response processing and second-order effects arise in stimulus processing. Therefore, the model predicts that, in the absence of prior responses, sequential effects will follow a pure second-order pattern. The results of Maloney et al.’s Experiment 2 confirm this prediction. Just as in the S-LRP data of Jentzsch and Sommer (2002), the first-order effects have mostly disappeared, and the data are well explained by a pure second-order effect (i.e., a stronger bias for alternation when there are more alternations in the history, and vice versa). We simulated this experiment with DBM2 using the same value of the change parameter (α) from the fit of Maloney et al.’s Experiment 1. Additionally, we set the mixture parameter, w, to 0, which removes the first-order component of the model. For this experiment we used different affine transformation values than in Experiment 1 because the modifications in the experimental design led to a generally weaker sequential effect, which we speculate to have been due to lesser engagement by subjects when fewer responses were needed. Figure 4c shows the fit obtained by DBM2, which explains 91.9% data variance. 7 Discussion Our approach highights the power of modeling simultaneously at the levels of rational analysis and psychological mechanism. The details of the behavioral data (i.e. the systematic discrepancies from DBM) pointed to an improved rational analysis and an elaborated generative model (DBM2) that is grounded in both first- and second-order sequential statistics. In turn, the conceptual organization of the new rational model suggested a psychological architecture (i.e., separate representation of baserates and repetition rates) that was borne out in further data. The details of these latter findings now turn back to further inform the rational model. Specifically, the fits to Jentzsch and Sommer’s EEG data and to Maloney et al.’s intermittent-response experiment suggest that the statistics individuals track are differentially tied to the stimuli and responses in the task. That is, rather than learning statistics of the abstract trial sequence, individuals learn the baserates (i.e., marginal probabilities) of responses and the repetition rates (i.e., transition probabilities) of stimulus sequences. This division suggests further hypotheses about both the empirical nature and the psychological representation of stimulus sequences and of response sequences, which future experiments and statistical analyses will hopefully shed light on. 8 References M. Jones and W. Sieck. Learning myopia: An adaptive recency effect in category learning. Journal of Experimental Psychology: Learning, Memory, & Cognition, 29:626–640, 2003. M. Mozer, S. Kinoshita, and M. Shettel. Sequential dependencies offer insight into cognitive control. In W. Gray, editor, Integrated Models of Cognitive Systems, pages 180–193. Oxford University Press, 2007. A. Yu and J. Cohen. Sequential effects: Superstition or rational behavior? NIPS, pages 1873–1880, 2008. L. Maloney, M. Dal Martello, C. Sahm, and L. Spillmann. Past trials influence perception of ambiguous motion quartets through pattern completion. Proceedings of the National Academy of Sciences, 102:3164–3169, 2005. I. Jentzsch and W. Sommer. Functional localization and mechanisms of sequential effects in serial reaction time tasks. Perception and Psychophysics, 64(7):1169–1188, 2002. D. Hale. Sequential effects in a two-choice reaction task. Quarterly Journal of Experimental Psychology, 19:133–141, 1967. E. Soetens, L. Boer, and J. Hueting. Expectancy or automatic facilitation? separating sequential effects in two-choice reaction time. Journal of experimental psychology. Human perception and performance, 11:598–616, 1985. R. Cho, L. Nystrom, E. Brown, A. Jones, T. Braver, P. Holmes, and J. Cohen. Mechanisms underlying dependencies of performance on stimulus history in a two-alternative forced-choice task. Cognitive, Affective, & Behavioral Neuroscience, 4:283–299, 2002. W. Estes. Toward a statistical theory of learning. Psychological Review, 57:94–107, 1950. N. Anderson. Effect of first-order conditional probability in a two-choice learning situation. Journal of Experimental Psychology, 59(2):73–83, 1960. D. Laming. Subjective probability in choice-reaction experiments. Journal of Mathematical Psychology, 6:81–120, 1969. J. Raymond, K. Shapiro, and K. Arnell. Temporary suppression of visual processing in an rsvp task: an attentional blink? Journal of experimental psychology. Human perception and performance, 18:849–860, 1992. M. Posner and Y. Cohen. Components of visual orienting. In H. Bouma and D. G. Bouwhuis, editors, Attention and Performance X: Control of language processes, pages 531–556. Erlbaum, Hillsdale, NJ, 1984. N. Kanwisher. Repetition blindness: Type recognition without token individuation. Cognition, 27: 117–143, 1987. J. Jahnke. The ranschburg effect. Psychological Review, 76:592–605, 1969. 9
2009
88
3,841
Noisy Generalized Binary Search Robert Nowak University of Wisconsin-Madison 1415 Engineering Drive, Madison WI 53706 nowak@ece.wisc.edu Abstract This paper addresses the problem of noisy Generalized Binary Search (GBS). GBS is a well-known greedy algorithm for determining a binary-valued hypothesis through a sequence of strategically selected queries. At each step, a query is selected that most evenly splits the hypotheses under consideration into two disjoint subsets, a natural generalization of the idea underlying classic binary search. GBS is used in many applications, including fault testing, machine diagnostics, disease diagnosis, job scheduling, image processing, computer vision, and active learning. In most of these cases, the responses to queries can be noisy. Past work has provided a partial characterization of GBS, but existing noise-tolerant versions of GBS are suboptimal in terms of query complexity. This paper presents an optimal algorithm for noisy GBS and demonstrates its application to learning multidimensional threshold functions. 1 Introduction This paper studies learning problems of the following form. Consider a finite, but potentially very large, collection of binary-valued functions H defined on a domain X. In this paper, H will be called the hypothesis space and X will be called the query space. Each h ∈H is a mapping from X to {−1, 1}. Assume that the functions in H are unique and that one function, h∗∈H, produces the correct binary labeling. The goal is to determine h∗through as few queries from X as possible. For each query x ∈X, the value h∗(x), corrupted with independently distributed binary noise, is observed. If the queries were noiseless, then they are usually called membership queries to distinguish them from other types of queries [Ang01]; here we will simply refer to them as queries. Problems of this nature arise in many applications , including channel coding [Hor63], experimental design [R´en61], disease diagnosis [Lov85], fault-tolerant computing [FRPU94], job scheduling [KPB99], image processing [KK00], computer vision [SS93, GJ96], computational geometry [AMM+98], and active learning [Das04, BBZ07, Now08]. Past work has provided a partial characterization of this problem. If the responses to queries are noiseless, then selecting the optimal sequence of queries from X is equivalent to determining an optimal binary decision tree, where a sequence of queries defines a path from the root of the tree (corresponding to H) to a leaf (corresponding to a single element of H). In general the determination of the optimal tree is NP-complete [HR76]. However, there exists a greedy procedure that yields query sequences that are within an O(log |H|) factor of the optimal search tree depth [GG74, KPB99, Lov85, AMM+98, Das04], where |H| denotes the cardinality of H. The greedy procedure is referred to as Generalized Binary Search (GBS) [Das04, Now08] or the splitting algorithm [KPB99, Lov85, GG74]), and it reduces to classic binary search in special cases [Now08]. The GBS algorithm is outlined in Figure 1(a). At each step GBS selects a query that results in the most even split of the hypotheses under consideration into two subsets responding +1 and −1, respectively, to the query. The correct response to the query eliminates one of these two subsets from further consideration. Since the hypotheses are assumed to be distinct, it is clear that GBS terminates in at most |H| queries (since it is always possible to find query that eliminates at least 1 Generalized Binary Search (GBS) initialize: i = 0, H0 = H. while |Hi| > 1 1) Select xi = arg minx∈X | P h∈Hi h(x)|. 2) Obtain response yi = h∗(xi). 3) Set Hi+1 = {h ∈Hi : h(xi) = yi}, i = i + 1. Noisy Generalized Binary Search (NGBS) initialize: p0 uniform over H. for i = 0, 1, 2, . . . 1) xi = arg minx∈X | P h∈H pi(h)h(x)|. 2) Obtain noisy response yi. 3) Bayes update pi →pi+1; Eqn. (1). hypothesis selected at each step: bhi := arg maxh∈H pi(h) (a) (b) Figure 1: Generalized binary search (GBS) algorithm and a noise-tolerant variant (NGBS). one hypothesis at each step). In fact, there are simple examples demonstrating that this is the best one can hope to do in general [KPB99, Lov85, GG74, Das04, Now08]. However, it is also true that in many cases the performance of GBS can be much better [AMM+98, Now08]. In general, the number of queries required can be bounded in terms of a combinatorial parameter of H called the extended teaching dimension [Ang01, Heg95] (also see [HPRW96] for related work). Alternatively, there exists a geometric relation between the pair (X, H), called the neighborly condition, that is sufficient to bound the number of queries needed [Now08]. The focus of this paper is noisy GBS. In many (if not most) applications it is unrealistic to assume that the responses to queries are without error. Noise-tolerant versions of classic binary search have been well-studied. The classic binary search problem is equivalent to learning a one-dimensional binary-valued threshold function by selecting point evaluations of the function according to a bisection procedure. A noisy version of classic binary search was studied first in the context of channel coding with feedback [Hor63]. Horstein’s probabilistic bisection procedure [Hor63] was shown to be optimal (optimal decay of the error probability) [BZ74] (also see[KK07]). One straightforward approach to noisy GBS was explored in [Now08]. The idea is to follow the GBS algorithm, but to repeat the query at each step multiple times in order to decide whether the response is more probably +1 or −1. The strategy of repeating queries has been suggested as a general approach for devising noise-tolerant learning algorithms [K¨a¨a06]. This simple approach has been studied in the context of noisy versions of classic binary search and shown to be suboptimal [KK07]. Since classic binary search is a special case of the general problem, it follows immediately that the approach proposed in [Now08] is suboptimal. This paper addresses the open problem of determining an optimal strategy for noisy GBS. An optimal noise-tolerant version of GBS is developed here. The number of queries an algorithm requires to confidently identify h∗is called the query complexity of the algorithm. The query complexity of the new algorithm is optimal, and we are not aware of any other algorithm with this capability. It is also shown that optimal convergence rate and query complexity is achieved for a broad class of geometrical hypotheses arising in image recovery and binary classification. Edges in images and decision boundaries in classification problems are naturally viewed as curves in the plane or surfaces embedded in higher-dimensional spaces and can be associated with multidimensional threshold functions valued +1 and −1 on either side of the curve/surface. Thus, one important setting for GBS is when X is a subset of d dimensional Euclidean space and the set H consists of multidimensional threshold functions. We show that our algorithm achieves the optimal query complexity for actively learning multidimensional threshold functions in noisy conditions. The paper is organized as follows. Section 2 describes the Bayesian algorithm for noisy GBS and presents the main results. Section 3 examines the proposed method for learning multidimensional threshold functions. Section 4 discusses an agnostic algorithm that performs well even if h∗is not in the hypothesis space H. Proofs are given in Section 5. 2 A Bayesian Algorithm for Noisy GBS In noisy GBS, one must cope with erroneous responses. Specifically, assume that the binary response y ∈{−1, 1} to each query x ∈X is an independent realization of the random variable Y satisfying P(Y = h∗(x)) > P(Y = −h∗(x)), where h∗∈H is fixed but unknown. In other words, the response is only probably correct. If a query x is repeated more than once, then each response is 2 an independent realization of Y . Define the noise-level for the query x as αx := P(Y = −h∗(x)). Throughout the paper we will let α := supx∈X αx and assume that α < 1/2. A Bayesian approach to noisy GBS is investigated in this paper. Let p0 be a known probability measure over H. That is, p0 : H →[0, 1] and P h∈H p0(h) = 1. The measure p0 can be viewed as an initial weighting over the hypothesis class, expressing the fact that all hypothesis are equally reasonable prior to making queries. After each query and response (xi, yi), i = 0, 1, . . . , the distribution is updated according to pi+1(h) ∝ pi(h) β(1−zi(h))/2(1 −β)(1+zi(h))/2, (1) where zi(h) = h(xi)yi, h ∈H, β is any constant satisfying 0 < β < 1/2, and pi+1(h) is normalized to satisfy P h∈H pi+1(h) = 1 . The update can be viewed as an application of Bayes rule and its effect is simple; the probability masses of hypotheses that agree with the label yi are boosted relative to those that disagree. The parameter β controls the size of the boost. The hypothesis with the largest weight is selected at each step: bhi := arg maxh∈H pi(h). If the maximizer is not unique, one of the maximizers is selected at random. The goal of noisy GBS is to drive the error P(bhi ̸= h∗) to zero as quickly as possible by strategically selecting the queries. A similar procedure has been shown to be optimal for noisy (classic) binary search problem [BZ74, KK07]. The crucial distinction here is that GBS calls for a fundamentally different approach to query selection. The query selection at each step must be informative with respect to the distribution pi. For example, if the weighted prediction P h∈H pi(h)h(x) is close to zero for a certain x, then a label at that point is informative due to the large disagreement among the hypotheses. This suggests the following noisetolerant variant of GBS outlined in Figure 1. This paper shows that a slight variation of the query selection in the NGBS algorithm in Figure 1 yields an algorithm with optimal query complexity. It is shown that as long as β is larger than the noise-level of each query, then the NGBS produces a sequence of hypotheses, bh0,bh1, . . . , such that P(bhn ̸= h∗) is bounded above by a monotonically decreasing sequence (see Theorem 1). The main interest of this paper is an algorithm that drives the error to zero exponentially fast, and this requires the query selection criterion to be modified slightly. To see why this is necessary, suppose that at some step of the NGBS algorithm a single hypothesis (e.g., h∗) has the majority of the probability mass. Then the weighted prediction will be almost equal to the prediction of that hypothesis (i.e., close to +1 or −1 for all queries), and therefore the responses to all queries are relatively certain and non-informative. Thus, the convergence of the algorithm could become quite slow in such conditions. A similar effect is true in the case of noisy (classic) binary search [BZ74, KK07]. To address this issue, the query selection criterion is modified via randomization so that the response to the selected query is always highly uncertain. In order to state the modified selection procedure and the main results, observe that the query space X can be partitioned into equivalence subsets such that every h ∈H is constant for all queries in each such subset. Let A denote the smallest such partition. Note that X = S A∈A A. For every A ∈A and h ∈H, the value of h(x) is constant (either +1 or −1) for all x ∈A; denote this value by h(A). As first noted in [Now08], A can play an important role in GBS. In particular, observe that the query selection step in NGBS is equivalent to an optimization over A rather that X itself. The randomization of the query selection step is based on the notion of neighboring sets in A. Definition 1 Two sets A, A′ ∈A are said to be neighbors if only a single hypothesis (and its complement, if it also belongs to H) outputs a different value on A and A′. The modified NGBS algorithm is outlined in Figure 2. Note that the query selection step is identical to that of the original NGBS algorithm, unless there exist two neighboring sets with strongly bipolar weighted responses. In the latter case, a query is randomly selected from one of these two sets with equal probability, which guarantees a highly uncertain response. Theorem 1 Let P denotes the underlying probability measure (governing noises and algorithm randomization). If β > α, then both the NGBS and modified NGBS algorithms, in Figure 1(b) and Figure 2, respectively, generate a sequence of hypotheses such that P(bhn ̸= h∗) ≤an < 1, where {an}n≥0 is a monotonically decreasing sequence. The condition β > α ensures that the update (1) is not overly aggressive. We now turn to the matter of sufficient conditions guaranteeing that P(bhn ̸= h∗) →0 exponentially fast with n. The 3 Modified NGBS initialize: p0 uniform over H. for i = 0, 1, 2, . . . 1) Let b = minA∈A | P h∈H pi(h)h(A)|. If there exists neighboring sets A and A′ with P h∈H pi(h)h(A) > b and P h∈H pi(h)h(A′) < −b , then select xi from A or A′ with probability 1/2 each. Otherwise select xi from the set Amin = arg minA∈A | P h∈H pi(h)h(A)|. In the case that the sets above are non-unique, choose at random any one satisfying the requirements. 2) Obtain noisy response yi. 3) Bayes update pi →pi+1; Eqn. (1). hypothesis selected at each step: bhi := arg maxh∈H pi(h) Figure 2: Modified NGBS algorithm. exponential convergence rate of classic binary search hinges on the fact that the hypotheses can be ordered with respect to X. In general situations, the hypothesis space cannot be ordered in such a fashion, but the neighborhood graph of A provides a similar local structure. Definition 2 The pair (X, H) is said to be neighborly if the neighborhood graph of A is connected (i.e., for every pair of sets in A there exists a sequence of neighboring sets that begins at one of the pair and ends with the other). In essence, the neighborly condition simply means that each hypothesis is locally distinguishable from all others. By ‘local’ we mean in the vicinity of points x where the output of the hypothesis changes from +1 to −1. The neighborly condition was first introduced in [Now08] in the analysis of GBS. It is shown in Section 3 that the neighborly condition holds for the important case of hypothesis spaces consisting of multidimensional threshold functions. If (X, H) is neighborly, then the modified NGBS algorithm guarantees that P(bhi ̸= h∗) →0 exponentially fast. Theorem 2 Let P denotes the underlying probability measure (governing noises and algorithm randomization). If β > α and (X, H) is neighborly, then the modified NGBS algorithm in Figure 2 generates a sequence of hypotheses satisfying P(bhn ̸= h∗) ≤|H| (1 −λ)n ≤|H| e−λn , n = 0, 1, . . . with exponential constant λ = min n 1−c∗ 2 , 1 4 o  1 −β(1−α) 1−β −α(1−β) β  , where c∗ := min P max h∈H Z X h(x) dP(x) . (2) The exponential convergence rate1 is governed by the key parameter 0 ≤c∗< 1. The minimizer in (2) exists because the minimization can be computed over the space of finite-dimensional probability mass functions over the elements of A. As long as no hypothesis is constant over the whole of X, the value of c∗is typically a small constant much less than 1 that is independent of the size of H (see [Now08, Now09] and the next section for concrete examples). In such situations, the convergence rate of modified NGBS is optimal, up to constant factors. No other algorithm can solve the noisy GBS problem with a lower query complexity. The query complexity of the modified NGBS algorithm can be derived as follows. Let δ > 0 be a prespecified confidence parameter. The number of queries required to ensure that P(bhn ̸= h∗) ≤δ is n ≥λ−1 log |H| δ = O(log |H| δ ), which is the optimal query complexity. Intuitively, O(log |H|) bits are required to encode each hypothesis. More formally, the classic noisy binary search problem satisfies the assumptions of Theorem 2 [Now08], 1Note that the factor “ 1 −β(1−α) 1−β −α(1−β) β ” in the exponential rate parameter λ is a positive constant strictly less than 1. For a noise level α this factor is maximized by a value β ∈(α, 1/2) which tends to (1/2 + α)/2 as α tends to 1/2. 4 and hence it is a special case of the general problem. It is known that the optimal query complexity for noisy classic binary search is O(log |H| δ ) [BZ74, KK07]. We contrast this with the simple noise-tolerant GBS algorithm based on repeating each query in the standard GBS algorithm of Figure 1(a) multiple times to control the noise (see [K¨a¨a06, Now08] for related derivations). It follows from Chernoff’s bound that the query complexity of determining the correct label for a single query with confidence at least 1 −δ is O( log(1/δ) |1/2−α|2 ). Suppose that GBS requires n0 queries in the noiseless situation. Then using the union bound, we require O( log(n0/δ) |1/2−α|2 ) queries at each step to guarantee that the labels determined for all n0 queries are correct with probability 1 −δ. If (X, H) is neighborly, then GBS requires n0 = O(log |H|) queries in noiseless conditions [Now08]. Therefore, under the conditions of Theorem 2, the query complexity of the simple noise-tolerant GBS algorithm is O(log |H| log log |H| δ ), a logarithmic factor worse than the optimal query complexity. 3 Noisy GBS for Learning Multidimensional Thresholds We now apply the theory and modified NGBS algorithm to the problem of learning multidimensional threshold functions from point evaluations, a problem that arises commonly in computer vision [SS93, GJ96, AMM+98], image processing [KK00], and active learning [Das04, BBZ07, CN08, Now08]. In this case, the hypotheses are determined by (possibly nonlinear) decision surfaces in d-dimensional Euclidean space (i.e., X is a subset of Rd), and the queries are points in Rd. It suffices to consider linear decision surfaces of the form ha,b(x) := sign(⟨a, x⟩+ b), where a ∈Rd, ∥a∥2 = 1, b ∈R, |b| ≤c for some constant c < ∞, and ⟨a, x⟩denotes the inner product in Rd. Note that hypotheses of this form can be used to represent nonlinear decision surfaces by applying a nonlinear mapping to the query space. Theorem 3 Let H be a finite collection of hypotheses of form sign(⟨a, x⟩+ b), for some constant c < ∞. Then the hypotheses selected by the modified NGBS algorithm with β > α satisfy P(bhn ̸= h∗) ≤|H| e−λn , with λ = 1 4  1 −β(1−α) 1−β −α(1−β) β  . Moreover, bhn can be computed in time polynomial in |H|. Based on the discussion at the end of the previous section, we conclude that the query complexity of the modified NGBS algorithm is O(log |H|); this is the optimal up to constant factors. The only other algorithm with this capability that we are aware of was analyzed in [BBZ07], and it is based on a quite different approach tailored specifically to linear threshold problem. 4 Agnostic Algorithms We also mention the possibility of agnostic algorithms guaranteed to find the best hypothesis in H even if the optimal hypothesis h∗is not in H and/or the assumptions of Theorem 2 or 3 do not hold. The best hypothesis in H is the one that minimizes the error with respect to a given probability measure on X, denoted by PX. The following theorem, proved in [Now09], demonstrates an agnostic algorithm that performs almost as well as empirical risk minimization (ERM) in general, and has the optimal O(log |H|/δ) query complexity when the conditions of Theorem 2 hold. Theorem 4 Let PX denote a probability distribution on X and suppose we have a query budget of n. Let h1 denote the hypothesis selected by modified NGBS using n/3 of the queries and let h2 denote the hypothesis selected by ERM from n/3 queries drawn independently from PX. Draw the remaining n/3 queries independently from P∆, the restriction of PX to the set ∆⊂X on which h1 and h2 disagree, and let bR∆(h1) and bR∆(h2) denote the average number of errors made by h1 and h2 on these queries. Select bh = arg min{ bR∆(h1), bR∆(h2)}. Then, in general, E[R(bh)] ≤ min{E[R(h1)], E[R(h2)]} + p 3/n , where R(h), h ∈H, denotes the probability of error of h with respect to PX and E denotes the expectation with respect to all random quantities. Furthermore, if the assumptions of Theorem 2 hold with noise bound α, then P(bh ̸= h∗) ≤Ne−λn/3 + 2e−n|1−2α|2/6 . 5 5 Appendix: Proofs 5.1 Proof of Theorem 1 Let E denote expectation with respect to P, and define Cn := (1 −pn(h∗))/pn(h∗). Note that Cn ∈[0, ∞) reflects the amount of mass that pn places on the suboptimal hypotheses. First note that P(bhn ̸= h∗) ≤ P(pn(h∗) < 1/2) = P(Cn > 1) ≤E[Cn] , by Markov’s inequality. Next, observe that E[Cn] = E[(Cn/Cn−1) Cn−1] = E [E[(Cn/Cn−1) Cn−1|pn−1]] = E [Cn−1 E[(Cn/Cn−1)|pn−1]] ≤E[Cn−1] max pn−1 E[(Cn/Cn−1)|pn−1] ≤ C0  max i=0,...,n−1 max pi E[(Ci+1/Ci)|pi] n . Note that because p0 is assumed to be uniform, C0 = |H| −1. A similar conditioning technique is employed for interval estimation in [BZ74]. The rest of the proof entails showing that E[(Ci+1/Ci)|pi] < 1, which proofs the result, and requires a very different approach than [BZ74]. The precise form of p1, p2, . . . is derived as follows. Let δi = (1 + P h pi(h) zi(h))/2, the weighted proportion of hypotheses that agree with yi. The factor that normalizes the updated distribution in (1) is related to δi as follows. Note that P h pi(h) β(1−zi(h))/2(1 −β)(1+zi(h))/2 = P h:zi(h)=−1 pi(h)β + P h:zi(h)=1 pi(h)(1 −β) = (1 −δi)β + δi(1 −β). Thus, pi+1(h) = pi(h) β(1−zi(h))/2(1 −β)(1+zi(h))/2 (1 −δi)β + δi(1 −β) Denote the reciprocal of the update factor for pi+1(h∗) by γi := (1 −δi)β + δi(1 −β) β(1−Zi(h∗))/2(1 −β)(1+Zi(h∗))/2 , (3) where zi(h∗) = h∗(xi)yi, and observe that pi+1(h∗) = pi(h∗)/γi. Thus, Ci+1 Ci = (1 −pi(h∗)/γi)pi(h∗) pi(h∗)/γi(1 −pi(h∗)) = γi −pi(h∗) 1 −pi(h∗) . Now to bound maxpi E[Ci+1/Ci|pi] < 1 we will show that maxpi E[γi|pi] < 1. To accomplish this, we will assume that pi is arbitrary. For every A ∈A and every h ∈H let h(A) denote the value of h on the set A. Define δ+ A = (1 + P h pi(h)h(A))/2, the proportion of hypotheses that take the value +1 on A. Note that for every A we have 0 < δ+ A < 1, since at least one hypothesis has the value −1 on A and p(h) > 0 for all h ∈H. Let Ai denote that set that xi is selected from, and consider the four possible situations: h∗(xi) = +1, yi = +1 : γi = (1−δ+ Ai)β+δ+ Ai(1−β) 1−β h∗(xi) = +1, yi = −1 : γi = δ+ Aiβ+(1−δ+ Ai)(1−β) β h∗(xi) = −1, yi = +1 : γi = (1−δ+ Ai)β+δ+ Ai(1−β) β h∗(xi) = −1, yi = −1 : γi = δ+ Aiβ+(1−δ+ Ai)(1−β) 1−β To bound E[γi|pi] it is helpful to condition on Ai. Define qi := Px,y|Ai(h∗(x) ̸= Y ). If h∗(Ai) = +1, then E[γi|pi, Ai] = (1 −δ+ Ai)β + δ+ Ai(1 −β) 1 −β (1 −qi) + δ+ Aiβ + (1 −δ+ Ai)(1 −β) β qi = δ+ Ai + (1 −δ+ Ai) β(1 −qi) 1 −β + qi(1 −β) β  . 6 Define γ+ i (Ai) := δ+ Ai + (1 −δ+ Ai) h β(1−qi) 1−β + qi(1−β) β i . Similarly, if h∗(Ai) = −1, then E[γi|pi, Ai] = (1 −δ+ Ai) + δ+ Ai β(1 −qi) 1 −β + qi(1 −β) β  =: γ− i (Ai) By assumption qi ≤α < 1/2, and since α < β < 1/2 the factor β(1−qi) 1−β + qi(1−β) β ≤β(1−α) 1−β + α(1−β) β < 1. Define ε0 := 1 −β(1 −α) 1 −β −α(1 −β) β , to obtain the bounds γ+ i (Ai) ≤ δ+ Ai + (1 −δ+ Ai)(1 −ε0) , (4) γ− i (Ai) ≤ δ+ Ai(1 −ε0) + (1 −δ+ Ai) . (5) Since both γ+ i (Ai) and γ− i (Ai) are less than 1, it follows that E[γi|pi] < 1. □ 5.2 Proof of Theorem 2 The proof amounts to obtaining upper bounds for γ+ i (Ai) and γ− i (Ai), defined above in (4) and (5). For every A ∈A and any probability measure p on H the weighted prediction on A is defined to be W(p, A) := P h∈H p(h)h(A), where h(A) is the constant value of h for every x ∈A. The following lemma plays a crucial role in the analysis of the modified NGBS algorithm. Lemma 1 If (X, H) is neighborly, then for every probability measure p on H there either exists a set A ∈A such that |W(p, A)| ≤c∗or a pair of neighboring sets A, A′ ∈A such that W(p, A) > c∗ and W(p, A′) < −c∗. Proof of Lemma 1: Suppose that minA∈A |W(p, A)| > c∗. Then there must exist A, A′ ∈A such that W(p, A) > c∗and W(p, A′) < −c∗, otherwise c∗cannot be the minimax moment of H. To see this suppose, for instance, that W(p, A) > c∗for all A ∈A. Then for every distribution P on X we have R X P h∈H p(h)h(x)dP(x) > c∗. This contradicts the definition of c∗since R X P h∈H p(h)h(x)dP(x) ≤P h∈H p(h)| R X h(x) dP(x)| ≤maxh∈H | R X h(x) dP(x)|. The neighborly condition guarantees that there exists a sequence of neighboring sets beginning at A and ending at A′. Since |W(p, A)| > c∗on every set and the sign of W(p, ·) must change at some point in the sequence, it follows that there exist neighboring sets satisfying the claim. □ Now consider two distinct situations. Define bi := minA∈A |W(pi, A)|. First suppose that there do not exist neighboring sets A and A′ with W(pi, A) > bi and W(pi, A′) < −bi. Then by Lemma 1, this implies that bi ≤c∗, and according the query selection step of the modified NGBS algorithm, Ai = arg minA |W(pi, A)|. Note that because |W(pi, Ai)| ≤c∗, (1−c∗)/2 ≤δ+ Ai ≤(1+c∗)/2. Hence, both γ+ i (Ai) and γ− i (Ai) are bounded above by 1 −ε0(1 −c∗)/2. Now suppose that there exist neighboring sets A and A′ with W(pi, A) > bi and W(pi, A′) < −bi. Recall that in this case Ai is randomly chosen to be A or A′ with equal probability. Note that δ+ A > (1 + bi)/2 and δ+ A′ < (1 −bi)/2. If h∗(A) = h∗(A′) = +1, then applying (4) results in E[γi|pi, Ai ∈{A, A′}] < 1 2(1 + 1 −bi 2 + 1 + bi 2 (1 −ε0)) = 1 2(2 −ε0 1 + bi 2 ) ≤1 −ε0/4 , since bi > 0. Similarly, if h∗(A) = h∗(A′) = −1, then (5) yields E[γi|pi, Ai ∈{A, A′}] < 1 −ε0/4. If h∗(A) = −1 on A and h∗(A′) = +1, then applying (5) on A and (4) on A′ yields E[γi|pi, Ai ∈{A, A′}] ≤ 1 2 δ+ A(1 −ε0) + (1 −δ+ A) + δ+ A′ + (1 −δ+ A′)(1 −ε0)  = 1 2(1 −δ+ A + δ+ A′ + (1 −ε0)(1 + δ+ A −δ+ A′)) = 1 2(2 −ε0(1 + δ+ A −δ+ A′)) = 1 −ε0 2 (1 + δ+ A −δ+ A′) ≤1 −ε0/2 , 7 since 0 ≤δ+ A −δ+ A′ ≤1. The final possibility is that h∗(A) = +1 and h∗(A′) = −1. Apply (4) on A and (5) on A′ to obtain E[γi|pi, Ai ∈{A, A′}] ≤1 2 δ+ A + (1 −δ+ A)(1 −ε0) + δ+ A′(1 −ε0) + (1 −δ+ A′)  = 1 2(1 + δ+ A −δ+ A′ + (1 −ε0)(1 −δ+ A + δ+ A′)) Next, use the fact that because A and A′ are neighbors, δ+ A −δ+ A′ = pi(h∗) −pi(−h∗); if −h∗does not belong to H, then pi(−h∗) = 0. Hence, E[γi|pi, Ai ∈{A, A′}] ≤ 1 2(1 + δ+ A −δ+ A′ + (1 −ϵ0)(1 −δ+ A + δ+ A′)) = 1 2(1 + pi(h∗) −pi(−h∗) + (1 −ϵ0)(1 −pi(h∗) + pi(−h∗))) ≤ 1 2(1 + pi(h∗) + (1 −ϵ0)(1 −pi(h∗))) = 1 −ε0 2 (1 −pi(h∗)) , since the bound is maximized when pi(−h∗) = 0. Now bound E[γi|pi] by the maximum of the conditional bounds above to obtain E[γi|pi] ≤ max n 1 −ε0 2 (1 −pi(h∗)) , 1 −ε0 4 , 1 −(1 −c∗)ε0 2 o , and thus it is easy to see that E Ci+1 Ci |pi  = E [γi|pi] −pi(h∗) 1 −pi(h∗) ≤1 −min nε0 2 (1 −c∗), ε0 4 o . □ 5.3 Proof of Theorem 3 First we show that the pair (Rd, H) is neighborly (Definition 2). Each A ∈A is a polytope in Rd. These polytopes are generated by intersections of the halfspaces corresponding to the hypotheses. Any two polytopes that share a common face are neighbors (the hypothesis whose decision boundary defines the face, and its complement if it exists, are the only ones that predict different values on these two sets). Since the polytopes tessellate Rd, the neighborhood graph of A is connected. Next consider the final bound in the proof of Theorem 2, above. We next show that the value of c∗, defined in (2), is 0. Since the offsets b of the hypotheses are all less than c in magnitude, it follows that the distance from the origin to the nearest point of the decision surface of every hypothesis is at most c. Let Pr denote the uniform probability distribution on a ball of radius r centered at the origin in Rd. Then for every h of the form sign(⟨a, x⟩+ b) Z Rd h(x) dPr(x) ≤ c r , and limr→∞ R X h(x) dPr(x) = 0 and so c∗= 0. Lastly, note that the modified NGBS algorithm involves computing P h∈H pi(h)h(A) for all A ∈A at each step. The computational complexity of each step is therefore proportional to the cardinality of A, which is equal to the number of polytopes generated by intersections of half-spaces. It is known that |A| = Pd i=0 |H| i  = O(|H|d) [Buc43]. □ 8 References [AMM+98] E. M. Arkin, H. Meijer, J. S. B. Mitchell, D. Rappaport, and S.S. Skiena. Decision trees for geometric models. Intl. J. Computational Geometry and Applications, 8(3):343– 363, 1998. [Ang01] D. Angluin. Queries revisited. Springer Lecture Notes in Comp. Sci.: Algorithmic Learning Theory, pages 12–31, 2001. [BBZ07] M.-F. Balcan, A. Broder, and T. Zhang. Margin based active learning. In Conf. on Learning Theory (COLT), 2007. [Buc43] R. C. Buck. Partition of space. The American Math. Monthly, 50(9):541–544, 1943. [BZ74] M. V. Burnashev and K. Sh. Zigangirov. An interval estimation problem for controlled observations. Problems in Information Transmission, 10:223–231, 1974. [CN08] R. Castro and R. Nowak. Minimax bounds for active learning. IEEE Trans. Info. Theory, pages 2339–2353, 2008. [Das04] S. Dasgupta. Analysis of a greedy active learning strategy. In Neural Information Processing Systems, 2004. [FRPU94] U. Feige, E. Raghavan, D. Peleg, and E. Upfal. Computing with noisy information. SIAM J. Comput., 23(5):1001–1018, 1994. [GG74] M. R. Garey and R. L. Graham. Performance bounds on the splitting algorithm for binary testing. Acta Inf., 3:347–355, 1974. [GJ96] D. Geman and B. Jedynak. An active testing model for tracking roads in satellite images. IEEE Trans. PAMI, 18(1):1–14, 1996. [Heg95] T. Heged¨us. Generalized teaching dimensions and the query complexity of learning. In 8th Annual Conference on Computational Learning Theory, pages 108–117, 1995. [Hor63] M. Horstein. Sequential decoding using noiseless feedback. IEEE Trans. Info. Theory, 9(3):136–143, 1963. [HPRW96] L. Hellerstein, K. Pillaipakkamnatt, V. Raghavan, and D. Wilkins. How many queries are needed to learn? J. ACM, 43(5):840–862, 1996. [HR76] L. Hyafil and R. L. Rivest. Constructing optimal binary decision trees is NP-complete. Inf. Process. Lett., 5:15–17, 1976. [K¨a¨a06] M. K¨a¨ari¨ainen. Active learning in the non-realizable case. In Algorithmic Learning Theory, pages 63–77, 2006. [KK00] A. P. Korostelev and J.-C. Kim. Rates of convergence fo the sup-norm risk in image models under sequential designs. Statistics & Probability Letters, 46:391–399, 2000. [KK07] R. Karp and R. Kleinberg. Noisy binary search and its applications. In Proceedings of the 18th ACM-SIAM Symposium on Discrete Algorithms (SODA 2007), pages 881– 890, 2007. [KPB99] S. R. Kosaraju, T. M. Przytycka, and R. Borgstrom. On an optimal split tree problem. Lecture Notes in Computer Science: Algorithms and Data Structures, 1663:157–168, 1999. [Lov85] D. W. Loveland. Performance bounds for binary testing with arbitrary weights. Acta Informatica, 22:101–114, 1985. [Now08] R. Nowak. Generalized binary search. In Proceedings of the 46th Allerton Conference on Communications, Control, and Computing, pages 568–574, 2008. [Now09] R. Nowak. The geometry of generalized binary search. 2009. Preprint available at http://arxiv.org/abs/0910.4397. [R´en61] A. R´enyi. On a problem in information theory. MTA Mat. Kut. Int. Kozl., page 505516, 1961. reprinted in Selected Papers of Alfred R´enyi, vol. 2, P. Turan, ed., pp. 631-638. Akademiai Kiado, Budapest, 1976. [SS93] M.J. Swain and M.A. Stricker. Promising directions in active vision. Int. J. Computer Vision, 11(2):109–126, 1993. 9
2009
89
3,842
Positive Semidefinite Metric Learning with Boosting Chunhua Shen†‡, Junae Kim†‡, Lei Wang‡, Anton van den Hengel¶ † NICTA Canberra Research Lab, Canberra, ACT 2601, Australia∗ ‡ Australian National University, Canberra, ACT 0200, Australia ¶ The University of Adelaide, Adelaide, SA 5005, Australia Abstract The learning of appropriate distance metrics is a critical problem in image classification and retrieval. In this work, we propose a boosting-based technique, termed BOOSTMETRIC, for learning a Mahalanobis distance metric. One of the primary difficulties in learning such a metric is to ensure that the Mahalanobis matrix remains positive semidefinite. Semidefinite programming is sometimes used to enforce this constraint, but does not scale well. BOOSTMETRIC is instead based on a key observation that any positive semidefinite matrix can be decomposed into a linear positive combination of trace-one rank-one matrices. BOOSTMETRIC thus uses rank-one positive semidefinite matrices as weak learners within an efficient and scalable boosting-based learning process. The resulting method is easy to implement, does not require tuning, and can accommodate various types of constraints. Experiments on various datasets show that the proposed algorithm compares favorably to those state-of-the-art methods in terms of classification accuracy and running time. 1 Introduction It has been an extensively sought-after goal to learn an appropriate distance metric in image classification and retrieval problems using simple and efficient algorithms [1–5]. Such distance metrics are essential to the effectiveness of many critical algorithms such as k-nearest neighbor (kNN), kmeans clustering, and kernel regression, for example. We show in this work how a Mahalanobis metric is learned from proximity comparisons among triples of training data. Mahalanobis distance, a.k.a. Gaussian quadratic distance, is parameterized by a positive semidefinite (p.s.d.) matrix. Therefore, typically methods for learning a Mahalanobis distance result in constrained semidefinite programs. We discuss the problem setting as well as the difficulties for learning such a p.s.d. matrix. If we let ai, i = 1, 2 · · · , represent a set of points in RD, the training data consist of a set of constraints upon the relative distances between these points, SS = {(ai, aj, ak)|distij < distik}, where distij measures the distance between ai and aj. We are interested in the case that dist computes the Mahalanobis distance. The Mahalanobis distance between two vectors takes the form: ∥ai −aj∥X = p (ai −aj)⊤X(ai −aj), with X ≽0, a p.s.d. matrix. It is equivalent to learn a projection matrix L and X = LL⊤. Constraints such as those above often arise when it is known that ai and aj belong to the same class of data points while ai, ak belong to different classes. In some cases, these comparison constraints are much easier to obtain than either the class labels or distances between data elements. For example, in video content retrieval, faces extracted from successive frames at close locations can be safely assumed to belong to the same person, without requiring the individual to be identified. In web search, the results returned by a search engine are ranked according to the relevance, an ordering which allows a natural conversion into a set of constraints. ∗NICTA is funded through the Australian Government’s Backing Australia’s Ability initiative, in part through the Australian Research Council. The requirement of X being p.s.d. has led to the development of a number of methods for learning a Mahalanobis distance which rely upon constrained semidefinite programing. This approach has a number of limitations, however, which we now discuss with reference to the problem of learning a p.s.d. matrix from a set of constraints upon pairwise-distance comparisons. Relevant work on this topic includes [3–8] amongst others. Xing et al [4] firstly proposed to learn a Mahalanobis metric for clustering using convex optimization. The inputs are two sets: a similarity set and a dis-similarity set. The algorithm maximizes the distance between points in the dis-similarity set under the constraint that the distance between points in the similarity set is upper-bounded. Neighborhood component analysis (NCA) [6] and large margin nearest neighbor (LMNN) [7] learn a metric by maintaining consistency in data’s neighborhood and keeping a large margin at the boundaries of different classes. It has been shown in [7] that LMNN delivers the state-of-the-art performance among most distance metric learning algorithms. The work of LMNN [7] and PSDBoost [9] has directly inspired our work. Instead of using hinge loss in LMNN and PSDBoost, we use the exponential loss function in order to derive an AdaBoostlike optimization procedure. Hence, despite similar purposes, our algorithm differs essentially in the optimization. While the formulation of LMNN looks more similar to support vector machines (SVM’s) and PSDBoost to LPBoost, our algorithm, termed BOOSTMETRIC, largely draws upon AdaBoost [10]. In many cases, it is difficult to find a global optimum in the projection matrix L [6]. Reformulationlinearization is a typical technique in convex optimization to relax and convexify the problem [11]. In metric learning, much existing work instead learns X = LL⊤for seeking a global optimum, e.g., [4, 7, 12, 8]. The price is heavy computation and poor scalability: it is not trivial to preserve the semidefiniteness of X during the course of learning. Standard approaches like interior point Newton methods require the Hessian, which usually requires O(D4) resources (where D is the input dimension). It could be prohibitive for many real-world problems. Alternative projected (sub-)gradient is adopted in [7, 4, 8]. The disadvantages of this algorithm are: (1) not easy to implement; (2) many parameters involved; (3) slow convergence. PSDBoost [9] converts the particular semidefinite program in metric learning into a sequence of linear programs (LP’s). At each iteration of PSDBoost, an LP needs to be solved as in LPBoost, which scales around O(J3.5) with J the number of iterations (and therefore variables). As J increases, the scale of the LP becomes larger. Another problem is that PSDBoost needs to store all the weak learners (the rank-one matrices) during the optimization. When the input dimension D is large, the memory required is proportional to JD2, which can be prohibitively huge at a late iteration J. Our proposed algorithm solves both of these problems. Based on the observation from [9] that any positive semidefinite matrix can be decomposed into a linear positive combination of trace-one rank-one matrices, we propose BOOSTMETRIC for learning a p.s.d. matrix. The weak learner of BOOSTMETRIC is a rank-one p.s.d. matrix as in PSDBoost. The proposed BOOSTMETRIC algorithm has the following desirable properties: (1) BOOSTMETRIC is efficient and scalable. Unlike most existing methods, no semidefinite programming is required. At each iteration, only the largest eigenvalue and its corresponding eigenvector are needed. (2) BOOSTMETRIC can accommodate various types of constraints. We demonstrate learning a Mahalanobis metric by proximity comparison constraints. (3) Like AdaBoost, BOOSTMETRIC does not have any parameter to tune. The user only needs to know when to stop. In contrast, both LMNN and PSDBoost have parameters to cross validate. Also like AdaBoost it is easy to implement. No sophisticated optimization techniques such as LP solvers are involved. Unlike PSDBoost, we do not need to store all the weak learners. The efficacy and efficiency of the proposed BOOSTMETRIC is demonstrated on various datasets. Throughout this paper, a matrix is denoted by a bold upper-case letter (X); a column vector is denoted by a bold lower-case letter (x). The ith row of X is denoted by Xi: and the ith column X:i. Tr(·) is the trace of a symmetric matrix and ⟨X, Z⟩= Tr(XZ⊤) = P ij XijZij calculates the inner product of two matrices. An element-wise inequality between two vectors like u ≤v means ui ≤vi for all i. We use X ≽0 to indicate that matrix X is positive semidefinite. 2 Algorithms 2.1 Distance Metric Learning As discussed, the Mahalanobis metric is equivalent to linearly transform the data by a projection matrix L ∈RD×d (usually D ≥d) before calculating the standard Euclidean distance: dist2 ij = ∥L⊤ai −L⊤aj∥2 2 = (ai −aj)⊤LL⊤(ai −aj) = (ai −aj)⊤X(ai −aj). (1) Although one can learn L directly as many conventional approaches do, in this setting, non-convex constraints are involved, which make the problem difficult to solve. As we will show, in order to convexify these conditions, a new variable X = LL⊤is introduced instead. This technique has been used widely in convex optimization and machine learning such as [12]. If X = I, it reduces to the Euclidean distance. If X is diagonal, the problem corresponds to learning a metric in which the different features are given different weights, a.k.a. feature weighting. In the framework of large-margin learning, we want to maximize the distance between distij and distik. That is, we wish to make dist2 ij −dist2 ik = (ai−ak)⊤X(ai−ak)−(ai−aj)⊤X(ai−aj) as large as possible under some regularization. To simplify notation, we rewrite the distance between dist2 ij and dist2 ik as dist2 ij −dist2 ik = ⟨Ar, X⟩, Ar = (ai −ak)(ai −ak)⊤−(ai −aj)(ai −aj)⊤, (2) r = 1, · · · , |SS|. |SS| is the size of the set SS. 2.2 Learning with Exponential Loss We derive a general algorithm for p.s.d. matrix learning with exponential loss. Assume that we want to find a p.s.d. matrix X ≽0 such that a bunch of constraints ⟨Ar, X⟩> 0, r = 1, 2, · · · , are satisfied as well as possible. These constraints need not be all strictly satisfied. We can define the margin ρr = ⟨Ar, X⟩, ∀r. By employing exponential loss, we want to optimize min log P|SS| r=1 exp −ρr  + v Tr(X) s.t. ρr = ⟨Ar, X⟩, r = 1, · · · , |SS|, X ≽0. (P0) Note that: (1) We have worked on the logarithmic version of the sum of exponential loss. This transform does not change the original optimization problem of sum of exponential loss because the logarithmic function is strictly monotonically decreasing. (2) A regularization term Tr(X) has been applied. Without this regularization, one can always multiply an arbitrarily large factor to X to make the exponential loss approach zero in the case of all constraints being satisfied. This tracenorm regularization may also lead to low-rank solutions. (3) An auxiliary variable ρr, r = 1, . . . must be introduced for deriving a meaningful dual problem, as we show later. We can decompose X into: X = PJ j=1wjZj, with wj ≥0, rank(Zj) = 1 and Tr(Zj) = 1, ∀j. So ρr = ⟨Ar, X⟩= D Ar, PJ j=1wjZj E = PJ j=1wj⟨Ar, Zj⟩= PJ j=1wjHrj = Hr:w, ∀r. (3) Here Hrj is a shorthand for Hrj = ⟨Ar, Zj⟩. Clearly Tr(X) = PJ j=1wj Tr(Zj) = 1⊤w. 2.3 The Lagrange Dual Problem We now derive the Lagrange dual of the problem we are interested in. The original problem (P0) now becomes min log P|SS| r=1 exp −ρr  + v1⊤w, s.t. ρr = Hr:w, r = 1, · · · , |SS|, w ≥0. (P1) In order to derive its dual, we write its Lagrangian L(w, ρ, u, p) = log P|SS| r=1 exp −ρr  + v1⊤w + P|SS| r=1ur(ρr −Hr:w) −p⊤w, (4) with p ≥0. Here u and p are Lagrange multipliers. The dual problem is obtained by finding the saddle point of L; i.e., supu,p infw,ρ L. inf w,ρ L = inf ρ L1 z }| { log P|SS| r=1 exp −ρr  + u⊤ρ + inf w L2 z }| { (v1⊤−P|SS| r=1urHr: −p⊤)w = −P|SS| r=1ur log ur. The infimum of L1 is found by setting its first derivative to zero and we have: inf ρ L1 = −P rur log ur if u ≥0, 1⊤u = 1, −∞ otherwise. The infimum is Shannon entropy. L2 is linear in w, hence L2 must be 0. It leads to P|SS| r=1urHr: ≤v1⊤. (5) The Lagrange dual problem of (P1) is an entropy maximization problem, which writes max u −P|SS| r=1ur log ur, s.t. u ≥0, 1⊤u = 1, and (5). (D1) Weak and strong duality hold under mild conditions [11]. That means, one can usually solve one problem from the other. The KKT conditions link the optimal between these two problems. In our case, it is u⋆ r = exp −ρ⋆ r P|SS| k=1 exp −ρ⋆ k , ∀r. (6) While it is possible to devise a totally-corrective column generation based optimization procedure for solving our problem as the case of LPBoost [13], we are more interested in considering one-ata-time coordinate-wise descent algorithms, as the case of AdaBoost [10], which has the advantages: (1) computationally efficient and (2) parameter free. Let us start from some basic knowledge of column generation because our coordinate descent strategy is inspired by column generation. If we knew all the bases Zj(j = 1 . . . J) and hence the entire matrix H is known, then either the primal (P1) or the dual (D1) could be trivially solved (at least in theory) because both are convex optimization problems. We can solve them in polynomial time. Especially the primal problem is convex minimization with simple nonnegativeness constraints. Off-the-shelf software like LBFGSB [14] can be used for this purpose. Unfortunately, in practice, we do not access all the bases: the number of possible Z’s is infinite. In convex optimization, column generation is a technique that is designed for solving this difficulty. Instead of directly solving the primal problem (P1), we find the most violated constraint in the dual (D1) iteratively for the current solution and add this constraint to the optimization problem. For this purpose, we need to solve ˆZ = argmaxZ nP|SS| r=1ur Ar, Z , s.t. Z ∈Ω1 o . (7) Here Ω1 is the set of trace-one rank-one matrices. We discuss how to efficiently solve (7) later. Now we move on to derive a coordinate descent optimization procedure. 2.4 Coordinate Descent Optimization We show how an AdaBoost-like optimization procedure can be derived for our metric learning problem. As in AdaBoost, we need to solve for the primal variables wj given all the weak learners up to iteration j. Optimizing for wj Since we are interested in the one-at-a-time coordinate-wise optimization, we keep w1, w2, . . . , wj−1 fixed when solving for wj. The cost function of the primal problem is (in the following derivation, we drop those terms irrelevant to the variable wj) Cp(wj) = log P|SS| r=1 exp(−ρj−1 r ) · exp(−Hrjwj)  + vwj. Clearly, Cp is convex in wj and hence there is only one minimum that is also globally optimal. The first derivative of Cp w.r.t. wj vanishes at optimality, which results in P|SS| r=1(Hrj −v)uj−1 r exp(−wjHrj) = 0. (8) Algorithm 1 Bisection search for wj. Input: An interval [wl, wu] known to contain the optimal value of wj and convergence tolerance ε > 0. repeat 1 · wj = 0.5(wl + wu); 2 · if l.h.s. of (8) > 0 then 3 wl = wj; 4 else 5 wu = wj. 6 until wu −wl < ε ; 7 Output: wj. If Hrj is discrete, such as {+1, −1} in standard AdaBoost, we can obtain a close-form solution similar to AdaBoost. Unfortunately in our case, Hrj can be any real value. We instead use bisection to search for the optimal wj. The bisection method is one of the root-finding algorithms. It repeatedly divides an interval in half and then selects the subinterval in which a root exists. Bisection is a simple and robust, although it is not the fastest algorithm for root-finding. Newton-type algorithms are also applicable here. Algorithm 1 gives the bisection procedure. We have utilized the fact that the l.h.s. of (8) must be positive at wl. Otherwise no solution can be found. When wj = 0, clearly the l.h.s. of (8) is positive. Updating u The rule for updating the dual variable u can be easily obtained from (6). At iteration j, we have uj r ∝exp −ρj r ∝uj−1 r exp(−Hrjwj), and P|SS| r=1uj r = 1, derived from (6). So once wj is calculated, we can update u as uj r = uj−1 r exp(−Hrjwj) z , r = 1, . . . , |SS|, (9) where z is a normalization factor so that P|SS| r=1uj r = 1. This is exactly the same as AdaBoost. 2.5 Base Learning Algorithm In this section, we show that the optimization problem (7) can be exactly and efficiently solved using eigenvalue-decomposition (EVD). From Z ≽0 and rank(Z) = 1, we know that Z has the format: Z = ξξ⊤, ξ ∈RD; and Tr(Z) = 1 means ∥ξ∥2 = 1. We have P|SS| r=1ur Ar, Z = P|SS| r=1urAr, Z = ξ⊤P|SS| r=1urAr  ξ. By denoting ˆA = P|SS| r=1urAr, (10) the base learning optimization equals: maxξ ξ⊤ˆAξ, s.t. ∥ξ∥2 = 1. It is clear that the largest eigenvalue of ˆA, λmax( ˆA), and its corresponding eigenvector ξ1 gives the solution to the above problem. Note that ˆA is symmetric. Also see [9] for details. λmax( ˆA) is also used as one of the stopping criteria of the algorithm. Form the condition (5), λmax( ˆA) < v means that we are not able to find a new base matrix ˆZ that violates (5)—the algorithm converges. We summarize our main algorithmic results in Algorithm 2. 3 Experiments 3.1 Classification on Benchmark Datasets We evaluate BOOSTMETRIC on 15 datasets of different sizes. Some of the datasets have very high dimensional inputs. We use PCA to decrease the dimensionality before training on these datasets (datasets 2-6). PCA pre-processing helps to eliminate noises and speed up computation. We have Algorithm 2 Positive semidefinite matrix learning with boosting. Input: • Training set triplets (ai, aj, ak) ∈SS; Compute Ar, r = 1, 2, · · · , using (2). • J: maximum number of iterations; • (optional) regularization parameter v; We may simply set v to a very small value, e.g., 10−7. Initialize: u0 r = 1 |SS|, r = 1 · · · |SS|; 1 for j = 1, 2, · · · , J do 2 · Find a new base Zj by finding the largest eigenvalue (λmax( ˆA)) and its eigenvector of ˆA in (10); 3 · if λmax( ˆA) < v then 4 break (converged); 5 · Compute wj using Algorithm 1; 6 · Update u to obtain uj r, r = 1, · · · |SS| using (9); 7 Output: The final p.s.d. matrix X ∈RD×D, X = PJ j=1 wjZj. used USPS and MNIST handwritten digits, ORL face recognition datasets, Columbia University Image Library (COIL20)1, and UCI machine learning datasets2 (datasets 7-13), Twin Peaks and Helix. The last two are artificial datasets3. Experimental results are obtained by averaging over 10 runs (except USPS-1). We randomly split the datasets for each run. We have used the same mechanism to generate training triplets as described in [7]. Briefly, for each training point ai, k nearest neighbors that have same labels as yi (targets), as well as k nearest neighbors that have different labels from yi (imposers) are found. We then construct triplets from ai and its corresponding targets and imposers. For all the datasets, we have set k = 3 except that k = 1 for datasets USPS-1, ORLFace-1 and ORLFace-2 due to their large size. We have compared our method against a few methods: Xing et al [4], RCA [5], NCA [6] and LMNN [7]. LMNN is one of the state-of-the-art according to recent studies such as [15]. Also in Table 1, “Euclidean” is the baseline algorithm that uses the standard Euclidean distance. The codes for these compared algorithms are downloaded from the corresponding authors’ websites. We have released our codes for BOOSTMETRIC at [16]. Experiment setting for LMNN follows [7]. For BOOSTMETRIC, we have set v = 10−7, the maximum number of iterations J = 500. As we can see from Table 1, we can conclude: (1) BOOSTMETRIC consistently improves kNN classification using Euclidean distance on most datasets. So learning a Mahalanobis metric based upon the large margin concept does lead to improvements in kNN classification. (2) BOOSTMETRIC outperforms other algorithms in most cases (on 11 out of 15 datasets). LMNN is the second best algorithm on these 15 datasets statistically. LMNN’s results are consistent with those given in [7]. (3) Xing et al [4] and NCA can only handle a few small datasets. In general they do not perform very well. A good initialization is important for NCA because NCA’s cost function is non-convex and can only find a local optimum. Influence of v Previously, we claim that our algorithm is parameter-free like AdaBoost. However, we do have a parameter v in BOOSTMETRIC. Actually, AdaBoost simply set v = 0. The coordinatewise gradient descent optimization strategy of AdaBoost leads to an ℓ1-norm regularized maximum margin classifier [17]. It is shown that AdaBoost minimizes its loss criterion with an ℓ1 constraint on the coefficient vector. Given the similarity of the optimization of BOOSTMETRIC with AdaBoost, we conjecture that BOOSTMETRIC has the same property. Here we empirically prove that as long as v is sufficiently small, the final performance is not affected by the value of v. We have set v from 10−8 to 10−4 and run BOOSTMETRIC on 3 UCI datasets. Table 2 reports the final 3NN classification error with different v. The results are nearly identical. Computational time As we discussed, one major issue in learning a Mahalanobis distance is heavy computational cost because of the semidefiniteness constraint. 1http://www1.cs.columbia.edu/CAVE/software/softlib/coil-20.php 2http://archive.ics.uci.edu/ml/ 3http://boosting.googlecode.com/files/dataset1.tar.bz2 Table 1: Test classification error rates (%) of a 3-nearest neighbor classifier on benchmark datasets. Results of NCA and Xing et al [4] on large datasets are not available either because the algorithm does not converge or due to the out-of-memory problem. dataset Euclidean Xing et al [4] RCA NCA LMNN BOOSTMETRIC 1 USPS-1 5.18 32.71 7.51 2.96 2 USPS-2 3.56 (0.28) 5.57 (0.33) 2.18 (0.27) 1.99 (0.24) 3 ORLFace-1 3.33 (1.47) 5.75 (2.85) 3.92 (2.01) 6.67 (2.94) 2.00 (1.05) 4 ORLFace-2 5.33 (2.70) 4.42 (2.08) 3.75 (1.63) 2.83 (1.77) 3.00 (1.31) 5 MNIST 4.11 (0.43) 4.31 (0.42) 4.19 (0.49) 4.09 (0.31) 6 COIL20 0.19 (0.21) 0.32 (0.29) 2.41 (1.80) 0.02 (0.07) 7 Letters 5.74 (0.24) 5.06 (0.26) 4.34 (0.36) 3.54 (0.18) 8 Wine 26.23 (5.52) 10.38 (4.81) 2.26 (1.95) 27.36 (6.31) 5.47 (3.01) 2.64 (1.59) 9 Bal 18.13 (1.79) 11.12 (2.12) 19.47 (2.39) 4.81 (1.80) 11.87 (2.14) 8.93 (2.28) 10 Iris 2.22 (2.10) 2.22 (2.10) 3.11 (2.15) 2.89 (2.58) 2.89 (2.58) 2.89 (2.78) 11 Vehicle 30.47 (2.41) 28.66 (2.49) 21.42 (2.46) 22.61 (3.26) 22.57 (2.16) 19.17 (2.10) 12 Breast-Cancer 3.28 (1.06) 3.63 (0.93) 3.82 (1.15) 4.31 (1.10) 3.19 (1.43) 2.45 (0.95) 13 Diabetes 27.43 (2.93) 27.87 (2.71) 26.48 (1.61) 27.61 (1.55) 26.78 (2.42) 25.04 (2.25) 14 Twin Peaks 1.13 (0.09) 1.02 (0.09) 0.98 (0.11) 0.14 (0.08) 15 Helix 0.60 (0.12) 0.61 (0.11) 0.61 (0.13) 0.58 (0.12) Table 2: Test error (%) of a 3-nearest neighbor classifier with different values of the parameter v. Each experiment is run 10 times. We report the mean and variance. As expected, as long as v is sufficiently small, in a wide range it almost does not affect the final classification performance. v 10−8 10−7 10−6 10−5 10−4 Bal 8.98 (2.59) 8.88 (2.52) 8.88 (2.52) 8.88 (2.52) 8.93 (2.52) B-Cancer 2.11 (0.69) 2.11 (0.69) 2.11 (0.69) 2.11 (0.69) 2.11 (0.69) Diabetes 26.0 (1.33) 26.0 (1.33) 26.0 (1.33) 26.0 (1.34) 26.0 (1.46) Our algorithm is generally fast. It involves matrix operations and an EVD for finding its largest eigenvalue and its corresponding eigenvector. The time complexity of this EVD is O(D2) with D the input dimensions. We compare our algorithm’s running time with LMNN in Fig. 1 on the artificial dataset (concentric circles). We vary the input dimensions from 50 to 1000 and keep the number of triplets fixed to 250. Instead of using standard interior-point SDP solvers that do not scale well, LMNN heuristically combines sub-gradient descent in both the matrices L and X. At each iteration, X is projected back onto the p.s.d. cone using EVD. So a full EVD with time complexity O(D3) is needed. Note that LMNN is much faster than SDP solvers like CSDP [18]. As seen from Fig. 1, when the input dimensions are low, BOOSTMETRIC is comparable to LMNN. As expected, when the input dimensions become high, BOOSTMETRIC is significantly faster than LMNN. Note that our implementation is in Matlab. Improvements are expected if implemented in C/C++. 3.2 Visual Object Categorization and Detection The proposed BOOSTMETRIC and the LMNN are further compared on four classes of the Caltech101 object recognition database [19], including Motorbikes (798 images), Airplanes (800), Faces (435), and Background-Google (520). For each image, a number of interest regions are identified by the Harris-affine detector [20] and the visual content in each region is characterized by the SIFT descriptor [21]. The total number of local descriptors extracted from the images of the four classes 0 200 400 600 800 1000 0 100 200 300 400 500 600 700 800 input dimensions CPU time per run (seconds) BoostMetric LMNN Figure 1: Computation time of the proposed BOOSTMETRIC and the LMNN method versus the input data’s dimensions on an artificial dataset. BOOSTMETRIC is faster than LMNN with large input dimensions because at each iteration BOOSTMETRIC only needs to calculate the largest eigenvector and LMNN needs a full eigen-decomposition. dim.: 100D 200D 0 5 10 15 20 Test error of 3-nearest neighbor (%) Euclidean LMNN BoostMetric 1000 2000 3000 4000 5000 6000 7000 8000 9000 2.5 3 3.5 4 4.5 5 5.5 Number of triplets Test error of 3-nearest neighbor (%) Figure 2: Test error (3-nearest neighbor) of BOOSTMETRIC on the Motorbikes vs. Airplanes datasets. The second figure shows the test error against the number of training triplets with a 100-word codebook. Test error of LMNN is 4.7% ± 0.5% with 8631 triplets for training, which is worse than BOOSTMETRIC. For Euclidean distance, the error is much larger: 15% ± 1%. are about 134, 000, 84, 000, 57, 000, and 293, 000, respectively. This experiment includes both object categorization (Motorbikes vs. Airplanes) and object detection (Faces vs. Background-Google) problems. To accumulate statistics, the images of two involved object classes are randomly split as 10 pairs of training/test subsets. Restricted to the images in a training subset (those in a test subset are only used for test), their local descriptors are clustered to form visual words by using k-means clustering. Each image is then represented by a histogram containing the number of occurrences of each visual word. Motorbikes vs. Airplanes This experiment discriminates the images of a motorbike from those of an airplane. In each of the 10 pairs of training/test subsets, there are 959 training images and 639 test images. Two visual codebooks of size 100 and 200 are used, respectively. With the resulting histograms, the proposed BOOSTMETRIC and the LMNN are learned on a training subset and evaluated on the corresponding test subset. Their averaged classification error rates are compared in Fig. 2 (left). For both visual codebooks, the proposed BOOSTMETRIC achieves lower error rates than the LMNN and the Euclidean distance, demonstrating its superior performance. We also apply a linear SVM classifier with its regularization parameter carefully tuned by 5-fold cross-validation. Its error rates are 3.87% ± 0.69% and 3.00% ± 0.72% on the two visual codebooks, respectively. In contrast, a 3NN with BOOSTMETRIC has error rates 3.63% ± 0.68% and 2.96% ± 0.59%. Hence, the performance of the proposed BOOSTMETRIC is comparable to or even slightly better than the SVM classifier. Also, Fig. 2 (right) plots the test error of the BOOSTMETRIC against the number of triplets for training. The general trend is that more triplets lead to smaller errors. Faces vs. Background-Google This experiment uses the two object classes as a retrieval problem. The target of retrieval is the face images. The images in the class of Background-Google are randomly collected from the Internet and they are used to represent the non-target class. BOOSTMETRIC is first learned from a training subset and retrieval is conducted on the corresponding test subset. In each of the 10 training/test subsets, there are 573 training images and 382 test images. Again, two visual codebooks of size 100 and 200 are used. Each face image in a test subset is used as a query, and its distances from other test images are calculated by BOOSTMETRIC, LMNN and the Euclidean distance. For each metric, the precision of the retrieved top 5, 10, 15 and 20 images are computed. The retrieval precision for each query are averaged on this test subset and then averaged over the whole 10 test subsets. BOOSTMETRIC consistently attains the highest values, which again verifies its advantages over LMNN and the Euclidean distance. With a codebook size 200, very similar results are obtained. See [16] for the experiment results. 4 Conclusion We have presented a new algorithm, BOOSTMETRIC, to learn a positive semidefinite metric using boosting techniques. We have generalized AdaBoost in the sense that the weak learner of BOOSTMETRIC is a matrix, rather than a classifier. Our algorithm is simple and efficient. Experiments show its better performance over a few state-of-the-art existing metric learning methods. We are currently combining the idea of on-line learning into BOOSTMETRIC to make it handle even larger datasets. References [1] T. Hastie and R. Tibshirani. Discriminant adaptive nearest neighbor classification. IEEE Trans. Pattern Anal. Mach. Intell., 18(6):607–616, 1996. [2] J. Yu, J. Amores, N. Sebe, P. Radeva, and Q. Tian. Distance learning for similarity estimation. IEEE Trans. Pattern Anal. Mach. Intell., 30(3):451–462, 2008. [3] B. Jian and B. C. Vemuri. Metric learning using Iwasawa decomposition. In Proc. IEEE Int. Conf. Comp. Vis., pages 1–6, Rio de Janeiro, Brazil, 2007. IEEE. [4] E. Xing, A. Ng, M. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In Proc. Adv. Neural Inf. Process. Syst. MIT Press, 2002. [5] A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning a Mahalanobis metric from equivalence constraints. J. Mach. Learn. Res., 6:937–965, 2005. [6] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood component analysis. In Proc. Adv. Neural Inf. Process. Syst. MIT Press, 2004. [7] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In Proc. Adv. Neural Inf. Process. Syst., pages 1473–1480, 2005. [8] A. Globerson and S. Roweis. Metric learning by collapsing classes. In Proc. Adv. Neural Inf. Process. Syst., 2005. [9] C. Shen, A. Welsh, and L. Wang. PSDBoost: Matrix-generation linear programming for positive semidefinite matrices learning. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Proc. Adv. Neural Inf. Process. Syst., pages 1473–1480, Vancouver, Canada, 2008. [10] R. E. Schapire. Theoretical views of boosting and applications. In Proc. Int. Conf. Algorithmic Learn. Theory, pages 13–25, London, UK, 1999. Springer-Verlag. [11] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [12] K. Q. Weinberger and L. K. Saul. Unsupervised learning of image manifolds by semidefinite programming. Int. J. Comp. Vis., 70(1):77–90, 2006. [13] A. Demiriz, K.P. Bennett, and J. Shawe-Taylor. Linear programming boosting via column generation. Mach. Learn., 46(1-3):225–254, 2002. [14] C. Zhu, R. H. Byrd, and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization. ACM Trans. Math. Softw., 23(4):550– 560, 1997. [15] L. Yang, R. Jin, L. Mummert, R. Sukthankar, A. Goode, B. Zheng, S. Hoi, and M. Satyanarayanan. A boosting framework for visuality-preserving distance metric learning and its application to medical image retrieval. IEEE Trans. Pattern Anal. Mach. Intell. IEEE computer Society Digital Library, November 2008, http://doi.ieeecomputersociety. org/10.1109/TPAMI.2008.273. [16] http://code.google.com/p/boosting/. [17] S. Rosset, J. Zhu, and T. Hastie. Boosting as a regularized path to a maximum margin classifier. J. Mach. Learn. Res., 5:941–973, 2004. [18] B. Borchers. CSDP, a C library for semidefinite programming. Optim. Methods and Softw., 11(1):613–623, 1999. [19] L. Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. IEEE Trans. Pattern Anal. Mach. Intell., 28(4):594–611, April 2006. [20] K. Mikolajczyk and C. Schmid. Scale & affine invariant interest point detectors. Int. J. Comp. Vis., 60(1):63–86, 2004. [21] D. G. Lowe. Distinctive image features from scale-invariant keypoints. Int. J. Comp. Vis., 60(2):91–110, 2004.
2009
9
3,843
Solving Stochastic Games Liam Mac Dermed College of Computing Georgia Tech 801 Atlantic Drive Atlanta, GA 30332-0280 liam@cc.gatech.edu Charles Isbell College of Computing Georgia Tech 801 Atlantic Drive Atlanta, GA 30332-0280 isbell@cc.gatech.edu Abstract Solving multi-agent reinforcement learning problems has proven difficult because of the lack of tractable algorithms. We provide the first approximation algorithm which solves stochastic games with cheap-talk to within ϵ absolute error of the optimal game-theoretic solution, in time polynomial in 1/ϵ. Our algorithm extends Murray’s and Gordon’s (2007) modified Bellman equation which determines the set of all possible achievable utilities; this provides us a truly general framework for multi-agent learning. Further, we empirically validate our algorithm and find the computational cost to be orders of magnitude less than what the theory predicts. 1 Introduction In reinforcement learning, Bellman’s dynamic programming equation is typically viewed as a method for determining the value function — the maximum achievable utility at each state. Instead, we can view the Bellman equation as a method of determining all possible achievable utilities. In the single-agent case we care only about the maximum utility, but for multiple agents it is rare to be able to simultaneous maximize all agents’ utilities. In this paper we seek to find the set of all achievable joint utilities (a vector of utilities, one for each player). This set is known as the feasible-set. Given this goal we can reconstruct a proper multi-agent equivalent to the Bellman equation that operates on feasible-sets for each state instead of values. Murray and Gordon (2007) presented an algorithm for calculating the exact form of the feasibleset based Bellman equation and proved correctness and convergence; however, their algorithm is not guaranteed to converge in a finite number of iterations. Worse, a particular iteration may not be tractable. These are two separate problems. The first problem is caused by the intolerance of an equilibrium to error, and the second results from a potential need for an unbounded number of points to define the closed convex hull that is each states feasible-set. We solve the first problem by targeting ϵ-equilibria instead of exact equilibria, and we solve the second by approximating the hull with a bounded number of points. Importantly, we achieve both solutions while bounding the final error introduced by these approximations. Taken together this produces the first multi-agent reinforcement learning algorithm with theoretical guarantees similar to single-agent value iteration. 2 Agenda We model the world as a fully-observable n-player stochastic game with cheap talk (communication between agents that does not affect rewards). Stochastic games (also called Markov games) are the natural multi-agent extension of Markov decision processes with actions being joint actions and rewards being a vector of rewards, one to each player. We assume an implicit inclusion of past joint 1 actions as part of state (we actually only rely on log2 n + 1 bits of history containing if and who has defected). We also assume that each player is rational in the game-theoretic sense. Our goal is to produce a joint policy that is Pareto-optimal (no other viable joint policy gives a player more utility without lowering another player’s utility), fair (players agree on the joint policy), and in equilibrium (no player can gain by deviating from the joint policy).1 This solution concept is the game-theoretic solution. We present the first approximation algorithm that can efficiently and provably converge to within a given error of game-theoretic solution concepts for all such stochastic games. We factor out the various game theoretic elements of the problem by taking in three functions which compute in turn: the equilibrium Feq (such as correlated equilibrium), the threat Fth (such as grim trigger), and the bargaining solution Fbs (such as Nash bargaining solution). An error parameters ϵ1 controls the degree of approximation. The final algorithm takes in a stochastic game, and returns a targeted utility-vector and joint policy such that the policy achieves the targeted utility while guaranteeing that the policy is an ϵ1/(1 −γ)-equilibrium (where γ is the discount factor) and there are no exact equilibria that Pareto-dominate the targeted utility. 3 Previous approaches Many attempts have been made to extend the Bellman equation to domains with multiple agents. Most of these attempts have focused on retaining the idea of a value function as the memoized solution to subproblems in Bellman’s dynamic programming approach (Greenwald & Hall, 2003), (Littman, 2001), (Littman, 2005). This has lead to a few successes particularly in the zero-sum case where the same guarantees as standard reinforcement learning have been achieved (Littman, 2001). Unfortunately, more general convergence results have not been achieved. Recently a negative result has shown that any value function based approach cannot solve the general multi-agent scenario (Littman, 2005). Consider a simple game (Figure 1-A): Reward:{1,-2} Reward:{2,-1} Player 1 Player 2 pass pass exit exit (0, 0) Player 1 Utility Player 2 Utility (0, 0) Player 1 Utility Player 2 Utility (0, 0) (0, 0) (0, 0) (1, -2) (0, 0) (2, -1) (1.33, -1.33) (1.33, -1.33) Iteration: Initialization 1 2 Player 1’s Choice Player 2’s Choice Equilibrium Contraction (1, -0.5) (1, -2) (1.8, -0.9) A) B) Figure 1: A) The Breakup Game demonstrates the limitation of traditional value-function based approaches. Circles represent states, outgoing arrows represent deterministic actions. Unspecified rewards are zero. B) The final feasible-set for player 1’s state (γ = 0.9). This game has four states with two terminal states. In the two middle states play alternates between the two players until one of the players decides to exit the game. In this game the only equilibria are stochastic (E.G. the randomized policy of each player passing and exiting with probability 1 2). In each state only one of the agents takes an action, so an algorithm that depends only on a value function will myopically choose to deterministically take the best action, and never converge to the stochastic equilibrium. This result exposed the inadequacy of value functions to capture cyclic equilibrium (where the equilibrium policy may revisit a state). Several other complaints have been leveled against the motivation behind MAL research following the Bellman heritage. One such complaint is that value function based algorithms inherently target only stage-game equilibria and not full-game equilibria potentially ignoring much better solutions (Shoham & Grenager, 2006). Our approach solves this problem and allows a full-game equilibrium to be reached. Another complaint goes even further, challenging the desire to even target equilibria (Shoham et al., 2003). Game theorists have shown us that equilibrium solutions are correct when agents are rational (infinitely intelligent), so the argument against targeting equilibria boils down to either assuming other agents are not infinitely intelligent (which is reasonable) or that finding 1The precise meaning of fair, and the type of equilibrium is intentionally left unspecified for generality. 2 equilibria is not computationally tractable (which we tackle here). We believe that although MAL is primarily concerned with the case when agents are not fully rational, first assuming agents are rational and subsequently relaxing this assumption will prove to be an effective approach. Murray and Gordon (2007) presented the first multidimensional extension to the Bellman equation which overcame many of the problems mentioned above. In their later technical report (Murray & Gordon, June 2007) they provided an exact solution equivalent to our solution targeting subgame perfect correlated equilibrium with credible threats, while using the Nash bargaining solution for equilibrium selection. In the same technical report they present an approximation method for their exact algorithm that involved sampling the feasible-set. Their approach was a significant step forward; however, their approximation algorithm has no finite time convergence guarantees, and can result in unbounded error. 4 Exact feasible-set solution They key idea needed to extend reinforcement learning into multi-agent domains is to replace the value-function, V (s), in Bellman’s dynamic program with a feasible-set function – a mapping from state to feasible-set. As a group of n agents follow a joint-policy, each player i receives rewards. the discounted sum of these rewards is that player’s utility, ui. The n-dimensional vector ⃗u containing these utility is known as the joint-utility. Thus a joint-policy yields a joint-utility which is a point in n-dimensional space. If we examine all (including stochastic) joint-policies starting from state s, discard those not in equilibrium, and compute the remaining joint-utilities we will have a set of n-dimensional points - the feasible-set. This set is closed and convex, and can be thought of as an n-dimensional convex polytope. As this set contains all possible joint-utilities, it will contain the optimal joint-utility for any definition of optimal (the bargaining solution Fbs will select the utility vector it deems optimal). After an optimal joint-utility has been chosen, a joint-policy can be constructed to achieve that joint-utility using the computed feasible-sets (Murray & Gordon, June 2007). Recall that agents care only about the utility they achieve and not the specific policy used. Thus computing the feasible-set function solves stochastic games, just as computing the value function solves MDPs. Figure 1-B shows a final feasible-set in the breakup game. The set is a closed convex hull with extreme points (1, −0.5), (1, −2), and (1.8, −0.9). This feasible-set depicts the fact that when starting in player 1’s state any full game equilibria will result in a joint-utility that is some weighted average of these three points. For example the players can achieve (1, −0.5) by having player 1 always pass and player 2 exit with probability 0.55. If player 2 tries to cheat by passing when they are supposed to exit, player 1 will immediate exit in retaliation (recall that history is implicitly included in state). An exact dynamic programing solution falls out naturally after replacing the value-function in Bellman’s dynamic program with a feasible-set function, however the changes in variable dimension complicate the backup. An illustration of the modified backup is shown in Figure 2, where steps A-C solve for the action-feasible-set (Q(s,⃗a)), and steps D-E solve for V (s) given Q(s,⃗a). What is not depicted in Figure 2 is the process of eliminating non-equilibrium policies in steps D-E. We assume an equilibrium filter function Feq is provided to the algorithm, which is applied to eliminate non-equilibrium policies. Details of this process is given in section 5.4. The final dynamic program starts by initializing each feasible-set to be some large over-estimate (a hypercube of the maximum and minimum utilities possible for each player). Each iteration of the backup then contracts the feasible-sets, eliminating unachievable utility-vectors. Eventually the algorithm converges and only achievable joint-utilities remain. The invariant of feasible-sets always overestimating is crucial for guaranteeing correctness, and is a point of great concern below. A more detailed examination of the exact algorithm including a formal treatment of the backup, various game theoretic issues, and convergence proofs are given in Murray and Gordon’s technical report (June 2007). This paper does not focus on the exact solution, instead focusing on creating a tractable generalized version. 5 Making a tractable algorithm There are a few serious computational bottlenecks in the exact algorithm. The first problem is that the size of the game itself is exponential in the number of agents because joint actions are 3 (0, 0) (1, -2) (0, 0) (2, -1) (.45, -.9) (0, 0) (.9, -.45) (1.35, -1.35) R R P P S S Player 2 Action Player 1 Action Player 2 Utility Player 1 Utiliy (½, -1) (0, 0) (1, -½) (1½, -1½) ½ ½ Feasible sets of successor states A) Feasible set of expected values Expected values of all policies Feasible sets of all joint actions E) D) C) B) Feasible set of initial state Figure 2: An example of the backup step (one iteration of our modified Bellman equation). The state shown being calculated is an initial rock-paper-scissors game played to decide who goes first in the breakup game from Figure 1. A tie results in a random winner. The backup shown depicts the 2nd iteration of the dynamic program when feasible-sets are initialized to (0,0) and binding contracts are allowed (Feq = set union). In step A the feasibility set of the two successor states are shown graphically. For each combination of points from each successor state the expected value is found (in this case 1/2 of the bottom and 1/2 of the top). These points are shown in step B as circles. Next in step C, the minimum encircling polygon is found. This feasibility region is then scaled by the discount factor and translated by the immediate reward. This is the feasibility-set of a particular joint action from our original state. The process is repeated for each joint action in step D. Finally, in step E, the feasible outcomes of all joint actions are fed into Feq to yield the updated feasibility set of our state. exponential in the number of players. This problem is unavoidable unless we approximate the game which is outside the scope of this paper. The second problem is that although the exact algorithm always converges, it is not guaranteed to converge in finite time (during the equilibrium backup, an arbitrarily small update can lead to a drastically large change in the resulting contracted set). A third big problem is that maintaining an exact representation of a feasible-set becomes unwieldy (the number of faces of the polytope my blow up, such as if it is curved). Two important modifications to the exact algorithm allow us to make the algorithm tractable: Approximating the feasible-sets with a bounded number of vertices, and adding a stopping criterion. Our approach is to approximate the feasible-set at the end of each iteration after first calculating it exactly. The degree of approximation is captured by a user-specified parameters: ϵ1. The approximation scheme yields a solution that is an ϵ1/(1−γ)-equilibrium of the full game while guaranteeing there exists no exact equilibrium that Pareto-dominates the solution’s utility. This means that despite not being able to calculate the true utilities at each stage game, if other players did know the true utilities they would gain no more than ϵ1/(1 −γ) by defecting. Moreover our approximate solution is as good or better than any true equilibrium. By targeting an ϵ1/(1 −γ)-equilibrium we do not mean that the backup’s equilibrium filter function Feq is an ϵ-equilibrium (it could be, although making it such would do nothing to alleviate the convergence problem). Instead we apply the standard filter function but stop if no feasible-set has changed by more than ϵ1. 5.1 Consequences of a stopping criterion Recall we have added a criterion to stop when all feasible-sets contract by less than ϵ1 (in terms of Hausdorff distance). This is added to ensure that the algorithm makes ϵ1 absolute progress each iteration and thus will take no more than O(1/ϵ1) iterations to converge. After our stopping criterion is triggered the total error present in any state is no more than ϵ1/(1 −γ) (i.e. if agents followed a prescribed policy they would find their actual rewards to be no less than ϵ1/(1 −γ) promised). Therefore the feasible-sets must represent at least an ϵ1/(1 −γ)-equilibrium. In other words, after a backup each feasible-set is in equilibrium (according to the filter function) with respect to the previous iteration’s estimation. If that previous estimation is off by at most ϵ1/(1−γ) than the most any one player could gain by deviating is ϵ1/(1 −γ). Because we are only checking for a stopping condition, and not explicitly targeting the ϵ1/(1 −γ)-equilibrium in the backup we can’t guarantee that the algorithm will terminate with the best ϵ1/(1−γ)-equilibrium. Instead we can guarantee that when we do terminate we know that our feasible-sets contain all equilibrium satisfying our original equilibrium filter and no equilibrium with incentive greater than an ϵ1/(1 −γ) to deviate. 4 5.2 Bounding the number of vertices Bounding the number of points defining each feasible-set is crucial for achieving a tractable algorithm. At the end of each iteration we can replace each state feasible-set (V (s)) with an N point approximation. The computational geometry literature is rich with techniques for approximating convex hulls. However, we want to insure that our feasible estimation is always an over estimation and not an under estimation, otherwise the equilibrium contraction step may erroneously eliminate valid policies. Also, we need the technique to work in arbitrary dimensions and guarantee a bounded number of vertices for a given error bound. A number of recent algorithms meet these conditions and provide efficient running times and optimal worse-case performance (Lopez & Reisner, 2002), (Chan, 2003), (Clarkson, 1993). Despite the nice theoretical performance and error guarantees of these algorithms they admit a potential problem. The approximation step is controlled by a parameter ϵ2(0 < ϵ2 < ϵ1) determining the maximum tolerated error induced by the approximation. This error results in an expansion of the feasible-set by at most ϵ2. On the other hand by targeting ϵ1-equilibrium we can terminate if the backups fail to make ϵ1 progress. Unfortunately this ϵ1 progress is not uniform and may not affect much of the feasible-set. If this is the case, the approximation expansion could potentially expand past the original feasible-set (thus violating our need for progress to be made every iteration, see Figure 3-A). Essentially our approximation scheme must also insure that it is a subset of the previous step’s approximation. With this additional constraint in mind we develop the following approximation inspired by (Chen, 2005): ε1 ε2 I II III A) B) C) Figure 3: A) (I) Feasible hull from previous iteration. (II) Feasible hull after equilibrium contraction. The set contracts at least ϵ1. (III) Feasible hull after a poor approximation scheme. The set expands at most ϵ2, but might sabotage progress. B) The hull from A-I is approximated using halfspaces from a given regular approximation of a Euclidean ball. C) Subsequent approximations using the same set of halfspaces will not backtrack. We take a fixed set of hyperplanes which form a regular approximation of a Euclidean ball such that the hyperplane’s normals form an angle of at most θ with their neighbors (E.G. an optimal Delaunay triangulation). We then project these halfspaces onto the polytope we wish to approximate (i.e. retain each hyperplanes’ normals but reduce their offsets until they touch the given polytope). After removing redundant hyperplanes the resulting polytope is returned as the approximation (Figure 3B). To insure a maximum error of ϵ2 with n players: θ ≤2 arccos[(r/(ϵ2 + r))1/n] where r = Rmax/(1 −γ). The scheme trivially uses a bounded number of facets (only those from the predetermined set), and hence a bounded number of vertices. Finally, by using a fixed set of approximating hyperplanes successive approximations will strictly be subsets of each other - no hyperplane will move farther away when the set its projecting onto shrinks (Figure 3-C). After both the ϵ1-equilibrium contraction step and the ϵ2 approximation step we can guarantee at least ϵ1 −ϵ2 progress is made. Although the final error depends only on ϵ1 and not ϵ2, the rate of convergence and the speed of each iteration is heavily influenced by ϵ2. Our experiments (section 6) suggest that the theoretical requirement of ϵ2 < ϵ1 is far too conservative. 5 5.3 Computing expected feasible-sets Another difficulty occurs during the backup of Q(s,⃗a). Finding the expectation over feasible-sets involves a modified set sum (step B in fig 2), which naively requires an exponential looping over all possible combinations of taking one point from the feasible-set of each successor state. We can help the problem by applying the set sum on an initial two sets and fold subsequent sets into the result. This leads to polynomial performance, but to an uncomfortably high-degree. Instead we can describe the problem as the following multiobjective linear program (MOLP): Simultaneously maximize foreach player i from 1 to n: P s′ P ⃗v∈V (s′) vixs′⃗v Subject to: for every state s′ P ⃗v∈V (s′) xs′⃗v = P(s′|s,⃗a) where we maximize over variables xs′⃗v (one for each ⃗v ∈V (s′) for all s′) and ⃗v is a vertex in the feasible-set V (s′) and vi is the value of that vertex to player i. This returns only the Pareto frontier. An optimized version of the algorithm described in this paper would only need the frontier, not the full set as calculating the frontier depends only on the frontier (unless the threat function needs the entire set). For the full feasible-set 2n such MOLPs are needed, one for each orthant. Like our modified view of the Bellman equation as trying to find the entire set of achievable policy payoffs so too can we view linear programming as trying to find the entire set of achievable values of the objective function. When there is a single objective function this is simply a maximum and minimum value. When there is more than one objective function the solution then becomes a multidimensional convex set of achievable vectors. This problem is known as multiobjective linear programming and has been previously studied by a small community of operation researchers under the umbrella subject of multiobjective optimization (Branke et al., 2005). MOLP is formally defined as a technique to find the Pareto frontier of a set of linear objective functions subject to linear inequality constraints. The most prominent exact method for MOLP is the Evans-Steuer algorithm (Branke et al., 2005). 5.4 Computing correlated equilibria of sets Our generalized algorithm requires an equilibrium-filter function Feq. Formally this is a monotonic function Feq : P(Rn) × . . . × P(Rn)) →P(Rn) which outputs a closed convex subset of the smallest convex set containing the union of the input sets. Here P denotes the powerset. It is monotonic as x ⊆y ⇒Feq(x) ⊆Feq(y). The threat function Fth is also passed to Feq. Note than requiring Feq to return a closed convex set disqualifies Nash equilibria and its refinements. Due to the availability of cheap talk, reasonable choices for Feq include correlated equilibria (CE), ϵ-CE, or a coalition resistant variant of CE. Filtering non-equilibrium policies takes place when the various action feasible-sets (Q) are merged together as shown in step E of Figure 2. Constructing Feq is more complicated than computing the equilibria for a stage game so we describe below how to target CE. For a normal-form game the set of correlated equilibria can be determined by taking the intersection of a set of halfspaces (linear inequality constraints) (Greenwald & Hall, 2003). Each variable of these halfspaces represents the probability that a particular joint action is chosen (via a shared random variable) and each halfspace represents a rationality constraint that a player being told to take one action would not want to switch to another action. There are Pn 1 |Ai|(|Ai| −1) such rationality constraints (where |Ai| is the number of actions player i can take). Unlike in a normal-form game, the rewards for following the correlation device or defecting (switching actions) are not directly given in our dynamic program. Instead we have a feasible-set of possible outcomes for each joint action Q(s,⃗a) and a threat function Fth. Recall that when following a policy to achieve a desired payoff, not only must a joint action be given, but also subsequent payoffs for each successor state. Thus the halfspace variables must not only specify probabilities over joint actions but also the subsequent payoffs (a probability distribution over the extreme points of each successor feasible-set). Luckily, a mixture of probability distributions is still a probability distribution so our final halfspaces now have P ⃗a |Q(s,⃗a)| variables (we still have the same number of halfspaces with the same meaning as before). At the end of the day we do not want feasible probabilities over successor states, we want the utility-vectors afforded by them. To achieve this without having to explicitly construct the polytope 6 described above (which can be exponential in the number of halfspaces) we can describe the problem as the following MOLP (given Q(s,⃗a) and Fth): Simultaneously maximize foreach player i from 1 to n: P ⃗a⃗u uix⃗a⃗u Subject to: probability constraints P x⃗a⃗u = 1 and x⃗a⃗u ≥0 and foreach player i, actions a1,a2 ∈Ai, (a2 ̸= a1) P ⃗a⃗u|ai=a1 uix⃗a⃗u ≥P ⃗a⃗u|ai=a2 Fth(s,⃗a)x⃗a⃗u where variables x⃗a⃗u represent the probability of choosing joint action ⃗a and subsequent payoff ⃗u ∈Q(s,⃗a) in state s and ui is the utility to player i. 5.5 Proof of correctness Murray and Gordon (June 2007) proved correctness and convergence for the exact algorithm by proving four properties: 1) Monotonicity (feasible-sets only shrink), 2) Achievability (after convergence, feasible-sets contain only achievable joint-utilities), 3) Conservative initialization (initialization is an over-estimate), and 4) Conservative backups (backups don’t discard valid joint-utilities). We show that our approximation algorithm maintains these properties. 1) Our feasible-set approximation scheme was carefully constructed so that it would not permit backtracking, maintaining monotonicity (all other steps of the backup are exact). 2) We have broadened the definition of achievability to permit ϵ1/(1 −γ) error. After all feasible-sets shrink by less than ϵ1 we could modify the game by giving a bonus reward less than ϵ1 to each player in each state (equal to that state’s shrinkage). This modified game would then have converged exactly (and thus would have a perfectly achievable feasible-set as proved by Murray and Gordon). Any joint-policy of the modified game will yield at most ϵ1/(1 −γ) more than the same joint-policy of our original game thus all utilities of our original game are off by at most ϵ1/(1 −γ). 3) Conservative initialization is identical to the exact solution (start with a huge hyperrectangle with sides Ri max/(1 −γ)). 4) Backups remain conservative as our approximation scheme never underestimates (as shown in section 5.2) and our equilibrium filter function Feq is required to be monotonic and thus will never underestimate if operating on overestimates (this is why we require monotonicity of Feq). CE over sets as presented in section 5.4 is monotonic. Thus our algorithm maintains the four crucial properties and terminates with all exact equilibria (as per conservative backups) while containing no equilibrium with error greater than ϵ1/(1 −γ). 6 Empirical results We implemented a version of our algorithm targeting exact correlated equilibrium using grim trigger threats (defection is punished to the maximum degree possible by all other players, even at one’s own expense). The grim trigger threat reduces to a 2 person zero sum game where the defector receives their normal reward and all other players receive the opposite reward. Because the other players receive the same reward in this game they can be viewed as a single entity. Zero sum 2player stochastic games can be quickly solved using FFQ-Learning (Littman, 2001). Note that grim trigger threats can be computed separately before the main algorithm is run. When computing the threats for each joint action, we use the GNU Linear Programming Kit (GLPK) to solve the zero-sum stage games. Within the main algorithm itself we use ADBASE (Steuer, 2006) to solve our various MOLPs. Finally we use QHull (Barber et al., 1995) to compute the convex hull of our feasible-sets and to determine the normals of the set’s facets. We use these normals to compute the approximation. To improve performance our implementation does not compute the entire feasible hull, only those points on the Pareto frontier. A final policy will exclusively choose targets from the frontier (using Fbs) (as will the computed intermediate equilibria) so we lose nothing by ignoring the rest of the feasible-set (unless the threat function requires other sections of the feasible-set, for instance in the case of credible threats). In other words, when computing the Pareto frontier during the backup the algorithm relies on no points except those of the previous step’s Pareto frontier. Thus computing only the Pareto frontier at each iteration is not an approximation, but an exact simplification. We tested our algorithm on a number of problems with known closed form solutions, including the breakup game (Figure 4). We also tested the algorithm on a suite of random games varying across the number of states, number of players, number of actions, number of successor states (stochasticity of 7 the game), coarseness of approximation, and density of rewards. All rewards were chosen at random between 1 and -1, and γ was always set to 0.9. Iteration: 0 5 10 15 20 25 30 35 40 45 50 Terminal State Player 1 Equilibrium Figure 4: A visualization of feasible-sets for the terminal state and player 1’s state of the breakup game at various iterations of the dynamic program. By the 50th iteration the sets have converged. An important empirical question is what degree of approximation should be adopted. Our testing (see Figure 5) suggests that the theoretical requirement of ϵ2 < ϵ1 is overly conservative. While the bound on ϵ2 is theoretically proportional to Rmax/(1 −γ) (the worst case scale of the feasible-set) a more practical choice for ϵ2 would be in scale with the final feasible-sets (as should a choice for ϵ1). 0 5 10 15 20 25 30 35 40 1 10 19 28 37 46 55 64 73 82 91 100 Wall Clock Time (seconds) 120 36 12 6 0 5 10 15 20 25 30 35 40 1 10 19 28 37 46 55 64 73 82 91 100 Feasible Set Size 120 36 12 6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1 10 19 28 37 46 Average Set Change Each Iteration 120 36 12 6 A B C Iterations Iterations Iterations Figure 5: Statistics from a random game (100 states, 2 players, 2 actions each, with ϵ1 = 0.02 ) run with different levels of approximation. The numbers shown (120, 36, 12, and 6) represent the number of predetermined hyperplanes used to approximate each Pareto frontier. A) The better approximations only use a fraction of the hyperplanes available to them. B) Wall clock time is directly proportional to the size of the feasible-sets. C) Better approximations converge more each iteration (the coarser approximations have a longer tail), however due to the additional computational costs the 12 hyperplane approximation converged quickest (in total wall time). The 6, 12, and 36 hyperplane approximations are insufficient to guarantee convergence (ϵ2 = 0.7, 0.3, 0.1 respectively) yet only the 6-face approximation occasionally failed to converge. 6.1 Limitations Our approach is overkill when the feasible-sets are one dimensional (line segments) (as when the game is zero-sum, or agents share a reward function), because CE-Q learning will converge to the correct solution without additional overhead. When there are no cycles in the state-transition graph (or one does not wish to consider cyclic equilibria) traditional game-theory approaches suffice. In more general cases, our algorithm brings significant advantages. However despite scaling linearly with the number of states, the multiobjective linear program for computing the equilibrium hull scales very poorly. The MOLP remains tractable only up to about 15 joint actions (which results in a few hundred variables and a few dozen constraints, depending on feasible-set size). This in turn prevents the algorithm from running with more than four agents. 8 References Barber, C. B., Dobkin, D. P., & Huhdanpaa, H. (1995). The quickhull algorithm for convex hulls. ACM Transactions on Mathematical Software, 22, 469–483. Branke, J., Deb, K., Miettinen, K., & Steuer, R. E. (Eds.). (2005). Practical approaches to multiobjective optimization, 7.-12. november 2004, vol. 04461 of Dagstuhl Seminar Proceedings. Internationales Begegnungs- und Forschungszentrum (IBFI), Schloss Dagstuhl, Germany IBFI, Schloss Dagstuhl, Germany. Chan, T. M. (2003). Faster core-set constructions and data stream algorithms in fixed dimensions. Comput. Geom. Theory Appl (pp. 152–159). Chen, L. (2005). New analysis of the sphere covering problems and optimal polytope approximation of convex bodies. J. Approx. Theory, 133, 134–145. Clarkson, K. L. (1993). Algorithms for polytope covering and approximation, and for approximate closest-point queries. Greenwald, A., & Hall, K. (2003). Correlated-q learning. Proceedings of the Twentieth International Conference on Machine Learning (pp. 242–249). Littman, M. L. (2001). Friend-or-foe Q-learning in general-sum games. Proc. 18th International Conf. on Machine Learning (pp. 322–328). Morgan Kaufmann, San Francisco, CA. Littman, M. Z. . A. G. . M. L. (2005). Cyclic equilibria in markov games. Proceedings of Neural Information Processing Systems. Vancouver, BC, Canada. Lopez, M. A., & Reisner, S. (2002). Linear time approximation of 3d convex polytopes. Comput. Geom. Theory Appl., 23, 291–301. Murray, C., & Gordon, G. (June 2007). Finding correlated equilibria in general sum stochastic games (Technical Report). School of Computer Science, Carnegie Mellon University. Murray, C., & Gordon, G. J. (2007). Multi-robot negotiation: Approximating the set of subgame perfect equilibria in general-sum stochastic games. In B. Sch¨olkopf, J. Platt and T. Hoffman (Eds.), Advances in neural information processing systems 19, 1001–1008. Cambridge, MA: MIT Press. Shoham, Yoav, P., & Grenager (2006). If multi-agent learning is the answer, what is the question? Artificial Intelligence. Shoham, Y., Powers, R., & Grenager, T. (2003). Multi-agent reinforcement learning: a critical survey (Technical Report). Steuer, R. E. (2006). Adbase: A multiple objective linear programming solver for efficient extreme points and unbounded efficient edges. 9
2009
90
3,844
Modelling Relational Data using Bayesian Clustered Tensor Factorization Ilya Sutskever University of Toronto ilya@cs.utoronto.ca Ruslan Salakhutdinov MIT rsalakhu@mit.edu Joshua B. Tenenbaum MIT jbt@mit.edu Abstract We consider the problem of learning probabilistic models for complex relational structures between various types of objects. A model can help us “understand” a dataset of relational facts in at least two ways, by finding interpretable structure in the data, and by supporting predictions, or inferences about whether particular unobserved relations are likely to be true. Often there is a tradeoff between these two aims: cluster-based models yield more easily interpretable representations, while factorization-based approaches have given better predictive performance on large data sets. We introduce the Bayesian Clustered Tensor Factorization (BCTF) model, which embeds a factorized representation of relations in a nonparametric Bayesian clustering framework. Inference is fully Bayesian but scales well to large data sets. The model simultaneously discovers interpretable clusters and yields predictive performance that matches or beats previous probabilistic models for relational data. 1 Introduction Learning with relational data, or sets of propositions of the form (object, relation, object), has been important in a number of areas of AI and statistical data analysis. AI researchers have proposed that by storing enough everyday relational facts and generalizing appropriately to unobserved propositions, we might capture the essence of human common sense. For instance, given propositions such as (cup, used-for, drinking), (cup, can-contain, juice), (cup, can-contain, water), (cup, can-contain, coffee), (glass, can-contain, juice), (glass, can-contain, water), (glass, can-contain, wine), and so on, we might also infer the propositions (glass, used-for, drinking), (glass, can-contain, coffee), and (cup, can-contain, wine). Modelling relational data is also important for more immediate applications, including problems arising in social networks [2], bioinformatics [16], and collaborative filtering [18]. We approach these problems using probabilistic models that define a joint distribution over the truth values of all conceivable relations. Such a model defines a joint distribution over the binary variables T (a, r, b) ∈{0, 1}, where a and b are objects, r is a relation, and the variable T (a, r, b) determines whether the relation (a, r, b) is true. Given a set of true relations S = {(a, r, b)}, the model predicts that a new relation (a, r, b) is true with probability P(T (a, r, b) = 1|S). In addition to making predictions on new relations, we also want to understand the data—that is, to find a small set of interpretable laws that explains a large fraction of the observations. By introducing hidden variables over simple hypotheses, the posterior distribution over the hidden variables will concentrate on the laws the data is likely to obey, while the nature of the laws depends on the model. For example, the Infinite Relational Model (IRM) [8] represents simple laws consisting of partitions of objects and partitions of relations. To decide whether the relation (a, r, b) is valid, the IRM simply checks that the clusters to which a, r, and b belong are compatible. The main advantage of the IRM is its ability to extract meaningful partitions of objects and relations from the observational data, 1 which greatly facilitates exploratory data analysis. More elaborate proposals consider models over more powerful laws (e.g., first order formulas with noise models or multiple clusterings), which are currently less practical due to the computational difficulty of their inference problems [7, 6, 9]. Models based on matrix or tensor factorization [18, 19, 3] have the potential of making better predictions than interpretable models of similar complexity, as we demonstrate in our experimental results section. Factorization models learn a distributed representation for each object and each relation, and make predictions by taking appropriate inner products. Their strength lies in the relative ease of their continuous (rather than discrete) optimization, and in their excellent predictive performance. However, it is often hard to understand and analyze the learned latent structure. The tension between interpretability and predictive power is unfortunate: it is clearly better to have a model that has both strong predictive power and interpretability. We address this problem by introducing the Bayesian Clustered Tensor Factorization (BCTF) model, which combines good interpretability with excellent predictive power. Specifically, similarly to the IRM, the BCTF model learns a partition of the objects and a partition of the relations, so that the truth-value of a relation (a, r, b) depends primarily on the compatibility of the clusters to which a, r, and b belong. At the same time, every entity has a distributed representation: each object a is assigned the two vectors aL, aR (one for a being a left argument in a relation and one for it being a right argument), and a relation r is assigned the matrix R. Given the distributed representations, the truth of a relation (a, r, b) is determined by the value of a⊤ LRbR, while the object partition encourages the objects within a cluster to have similar distributed representations (and similarly for relations). The experiments show that the BCTF model achieves better predictive performance than a number of related probabilistic relational models, including the IRM, on several datasets. The model is scalable, and we apply it on the Movielens [15] and the Conceptnet [10] datasets. We also examine the structure found in BCTF’s clusters and learned vectors. Finally, our results provide an example where the performance of a Bayesian model substantially outperforms a corresponding MAP estimate for large sparse datasets with minimal manual hyperparameter selection. 2 The Bayesian Clustered Tensor Factorization (BCTF) We begin with a simple tensor factorization model. Suppose that we have a fixed finite set of objects O and a fixed finite set of relations R. For each object a ∈O the model maintains two vectors aL, aR ∈Rd (the left and the right arguments of the relation), and for each relation r ∈R it maintains a matrix R ∈Rd×d, where d is the dimensionality of the model. Given a setting of these parameters (collectively denoted by θ), the model independently chooses the truth-value of each relation (a, r, b) from the distribution P(T (a, r, b) = 1|θ) = 1/(1 + exp(−a⊤ LRbR)). In particular, given a set of known relations S, we can learn the parameters by maximizing a penalized log likelihood log P(S|θ) −Reg(θ). The necessity of having a pair of parameters aL, aR, instead of a single distributed representation a, will become clear later. Next, we define a prior over the vectors {aL}, {aR}, and {R}. Specifically, the model defines a prior distribution over partitions of objects and partitions of relations using the Chinese Restaurant Process. Once the partitions are chosen, each cluster C samples its own prior mean and prior diagonal covariance, which are then used to independently sample vectors {aL, aR : a ∈C} that belong to cluster C (and similarly for the relations, where we treat R as a d2-dimensional vector). As a result, objects within a cluster have similar distributed representations. When the clusters are sufficiently tight, the value of a⊤ LRbR is mainly determined by the clusters to which a, r, and b belong. At the same time, the distributed representations help generalization, because they can represent graded similarities between clusters and fine differences between objects in the same cluster. Thus, given a set of relations, we expect the model to find both meaningful clusters of objects and relations, as well as predictive distributed representations. More formally, assume that O = {a1, . . . , aN} and R = {r1, . . . , rM}. The model is defined as follows: P(obs, θ, c, α, αDP ) = P(obs|θ, σ2)P(θ|c, α)P(c|αDP )P(αDP , α, σ2) (1) where the observed data obs is a set of triples and their truth values {(a, r, b), t}; the variable c = {cobj, crel} contains the cluster assignments (partitions) of the objects and the relations; the variable θ = {aL, aR, R} consists of the distributed representations of the objects and the relations, and 2 Figure 1: A schematic diagram of the model, where the arcs represent the object clusters and the vectors within each cluster are similar. The model predicts T (a, r, b) with a⊤ LRbR. {σ2, α, αDP } are the model hyperparameters. Two of the above terms are given by P(obs|θ) = Y {(a,r,b),t}∈obs N(t|a⊤ LRbR, σ2) (2) P(c|αDP ) = CRP(cobj|αDP )CRP(crel|αDP ) (3) where N(t|µ, σ2) denotes the Gaussian distribution with mean µ and variance σ2, and CRP(c|α) denotes the probability of the partition induced by c under the Chinese Restaurant Process with concentration parameter α. The Gaussian likelihood in Eq. 2 is far from ideal for modelling binary data, but, similarly to [19, 18], we use it instead of the logistic function because it makes the model conjugate and Gibbs sampling easier. Defining P(θ|c, α) takes a little more work. Given the partitions, the sets of parameters {aL}, {aR}, and {R} become independent, so P(θ|c, α) = P({aL}|cobj, αobj)P({aR}|cobj, αobj)P({R}|crel, αrel) (4) The distribution over the relation-vectors is given by P({R}|crel, αrel) = |crel| Y k=1 Z µ,Σ Y i:crel,i=k N(Ri|µ, Σ) dP(µ, Σ|αrel) (5) where |crel| is the number of clusters in the partition crel. This is precisely a Dirichlet process mixture model [13]. We further place a Gaussian-Inverse-Gamma prior over (µ, Σ): P(µ, Σ|αrel) = P(µ|Σ)P(Σ|αrel) = N(µ|0, Σ) Y d′ IG(σ2 d′|αrel, 1) (6) ∝ exp − X d′ µ2 d′/2 + 1 σ2 d′ ! Y d′ σ2 d′ −0.5−αrel−1 (7) where Σ is a diagonal matrix whose entries are σ2 d′, the variable d′ ranges over the dimensions of Ri (so 1 ≤d′ ≤d2), and IG(x|α, β) denotes the inverse-Gamma distribution with shape parameter α and scale parameter β. This prior makes many useful expectations analytically computable. The terms P({aL}|cobj, αobj) and P({aR}|cobj, αobj) are defined analogously to Eq. 5. Finally, we place an improper P(x) ∝x−1 scale-uniform prior over each hyperparameter independently. Inference We now briefly describe the MCMC algorithm used for inference. Before starting the Markov chain, we find a MAP estimate of the model parameters using the method of conjugate gradient (but we do not optimize over the partitions). The MAP estimate is then used to initialize the Markov chain. Each step of the Markov chain consists of a number of internal steps. First, given the parameters θ, the chain updates c = (crel, cobj) using a collapsed Gibbs sampling sweep and a step of the split-and-merge algorithm (where the launch state was obtained with two sweeps of Gibbs sampling starting from a uniformly random cluster assignment) [5]. Next, it samples from the posterior mean 3 and covariance of each cluster, which is the distribution proportional to the term being integrated in Eq. 5. Next, the Markov chain samples the parameters {aL} given {aR}, {R}, and the cluster posterior means and covariances. This step is tractable since the conditional distribution over the object vectors {aL} is Gaussian and factorizes into the product of conditional distributions over the individual object vectors. This conditional independence is important, since it tends to make the Markov chain mix faster, and is a direct consequence of each object a having two vectors, aL and aR. If each object a was only associated with a single vector a (and not aL, aR), the conditional distribution over {a} would not factorize, which in turn would require the use of a slower sequential Gibbs sampler. In the current setting, we can further speed up the inference by sampling from conditional distributions in parallel. The speedup could be substantial, particularly when the number of objects is large. The disadvantage of using two vectors for each object is that the model cannot as easily capture the “position-independent” properties of the object, especially in the sparse regime. Sampling {aL} from the Gaussian takes time proportional to d3 · N, where N is the number of objects. While we do the same for {aR}, we run a standard hybrid Monte Carlo to update the matrices {R} using 10 leapfrog steps of size 10−5 [12]. Each matrix, which we treat as a vector, has d2 dimensions, so direct sampling from the Gaussian distribution scales as d6 ·M, which is slow even for small values of d (e.g. 20). Finally, we make a small symmetric multiplicative change to each hyperparameter and accept or reject its new value according to the Metropolis-Hastings rule. 3 Evaluation In this section, we show that the BCTF model has excellent predictive power and that it finds interpretable clusters by applying it to five datasets and comparing its performance to the IRM [8] and the Multiple Relational Clustering (MRC) model [9]. We also compare BCTF to its simpler counterpart: a Bayesian Tensor Factorization (BTF) model, where all the objects and the relations belong to a single cluster. The Bayesian Tensor Factorization model is a generalization of the Bayesian probabilistic matrix factorization [17], and is closely related to many other existing tensor-factorization methods [3, 14, 1]. In what follows, we will describe the datasets, report the predictive performance of our and of the competing algorithms, and examine the structure discovered by BCTF. 3.1 Description of the Datasets We use three of the four datasets used by [8] and [9], namely, the Animals, the UML, and the Kinship dataset, as well the Movielens [15] and the Conceptnet datasets [10]. 1. The animals dataset consists of 50 animals and 85 binary attributes. The dataset is a fully observed matrix—so there is only one relation. 2. The kinship dataset consists of kinship relationships among the members of the Alyawarra tribe [4]. The dataset contains 104 people and 26 relations. This dataset is dense and has 104·26·104 = 218216 observations, most of which are 0. 3. The UML dataset [11] consists of a 135 medical terms and 49 relations. The dataset is also fully observed and has 135·49·135 = 893025 (mostly 0) observations. 4. The Movielens [15] dataset consists of 1000209 observed integer ratings of 6041 movies on a scale from 1 to 5, which are rated by 3953 users. The dataset is 95.8% sparse. 5. The Conceptnet dataset [10] is a collection of common-sense assertions collected from the web. It consists of about 112135 “common-sense” assertions such as (hockey, is-a, sport). There are 19 relations and 17571 objects. To make our experiments faster, we used only the 7000 most frequent objects, which resulted in 82062 true facts. For the negative data, we sampled twice as many random object-relation-object triples and used them as the false facts. As a result, there were 246186 binary observations in this dataset. The dataset is 99.9% sparse. 3.2 Experimental Protocol To facilitate comparison with [9], we conducted our experiments the following way. First, we normalized each dataset so the mean of its observations was 0. Next, we created 10 random train/test 4 animals kinship UML movielens conceptnet algorithm RMSE AUC RMSE AUC RMSE AUC RMSE AUC RMSE AUC MAP20 0.467 0.78 0.122 0.82 0.033 0.96 0.899 – 0.536 0.57 MAP40 0.528 0.68 0.110 0.90 0.024 0.98 0.933 – 0.614 0.48 BTF20 0.337 0.85 0.122 0.82 0.033 0.96 0.835 – 0.275 0.93 BCTF20 0.331 0.86 0.122 0.82 0.033 0.96 0.836 – 0.278 0.93 BTF40 0.338 0.86 0.108 0.90 0.024 0.98 0.834 – 0.267 0.94 BCTF40 0.336 0.86 0.108 0.90 0.024 0.98 0.836 – 0.260 0.94 IRM [8] 0.382 0.75 0.140 0.66 0.054 0.70 – – – – MRC [9] – 0.81 – 0.85 – 0.98 – – – – Table 1: A quantitative evaluation of the algorithms using 20 and 40 dimensional vectors. We report the performance of the following algorithms: the MAP-based Tensor Factorization, the Bayesian Tensor Factorization (BTF) with MCMC (where all objects belong to a single cluster), the full Bayesian Clustered Tensor Factorization (BCTF), the IRM [8] and the MRC [9]. O1 O2 O3 F1 F2 F3 O1 O2 O3 F1 F2 O1 killer whale, blue whale, humpback whale, seal, walrus, dolphin O2 antelope, dalmatian, horse, giraffe, zebra, deer O3 mole, hamster, rabbit, mouse O4 hippopotamus, elephant, rhinoceros O5 spider monkey, gorilla, chimpanzee O6 moose, ox, sheep, buffalo, pig, cow O7 beaver, squirrel, otter O8 Persian cat, skunk, chihuahua, collie O9 grizzly bear, polar bear F1 flippers, strainteeth, swims, fish, arctic, coastal, ocean, water F2 hooves, vegetation, grazer, plains, fields F3 paws, claws, solitary F4 bulbous, slow, inactive F5 jungle, tree F6 big, strong, group F7 walks, quadrapedal, ground F8 small, weak, nocturnal, hibernate, nestspot F9 tail, newworld, oldworld, timid Figure 2: Results on the Animals dataset. Left: The discovered clusters. Middle: The biclustering of the features. Right: The covariance of the distributed representations of the animals (bottom) and their attributes (top). splits, where 10% of the data was used for testing. For the Conceptnet and the Movielens datasets, we used only two train/test splits and at most 30 clusters, which made our experiments faster. We report test root mean squared error (RMSE) and the area under the precision recall curve (AUC) [9]. For the IRM1 we make predictions as follows. The IRM partitions the data into blocks; we compute the smoothed mean of the observed entries of each block and use it to predict the test entries in the same block. 3.3 Results We first applied BCTF to the Animals, Kinship, and the UML datasets using 20 and 40-dimensional vectors. Table 1 shows that BCTF substantially outperforms IRM and MRC in terms of both RMSE and AUC. In fact, for the Kinship and the UML datasets, the simple tensor factorization model trained by MAP performs as well as BTF and BCTF. This happens because for these datasets the number of observations is much larger than the number of parameters, so there is little uncertainty about the true parameter values. However, the Animals dataset is considerably smaller, so BTF performs better, and BCTF performs even better than the BTF model. We then applied BCTF to the Movielens and the Conceptnet datasets. We found that the MAP estimates suffered from significant overfitting, and that the fully Bayesian models performed much better. This is important because both datasets are sparse, which makes overfitting difficult to combat. For the extremely sparse Conceptnet dataset, the BCTF model further improved upon simpler 1The code is available at http://www.psy.cmu.edu/˜ckemp/code/irm.html 5 a) b) c) d) e) f) g) Figure 3: Results on the Kinship dataset. Left: The covariance of the distributed representations {aL} learned for each person. Right: The biclustering of a subset of the relations. 2 Amino Acid, Peptide, or Protein, Biomedical or Dental Material, Carbohydrate, . . . 3 Amphibian, Animal, Archaeon, Bird, Fish, Human, . . . 4 Antibiotic, Biologically Active Substance, Enzyme, Hazardous or Poisonous Substance, Hormone, . . . 5 Biologic Function, Cell Function, Genetic Function, Mental Process, . . . 6 Classification, Drug Delivery Device, Intellectual Product, Manufactured Object, . . . 7 Body Part, Organ, Cell, Cell Component, . . . 8 Alga, Bacterium, Fungus, Plant, Rickettsia or Chlamydia, Virus 9 Age Group, Family Group, Group, Patient or Disabled Group, . . . 10 Cell / Molecular Dysfunction, Disease or Syndrome, Model of Disease, Mental Dysfunction, . . . 11 Daily or Recreational Activity, Educational Activity, Governmental Activity, . . . 12 Environmental Effect of Humans, Human-caused Phenomenon or Process, . . . 13 Acquired Abnormality, Anatomical Abnormality, Congenital Abnormality, Injury or Poisoning 14 Health Care Related Organization, Organization, Professional Society, . . . Affects interacts with causes Figure 4: Results on the medical UML dataset. Left: The covariance of the distributed representations {aL} learned for each object. Right: The inferred clusters, along with the biclustering of a subset of the relations. BTF model. We do not report results for the IRM, because the existing off-the-shelf implementation could not handle these large datasets. We now examine the latent structure discovered by the BCTF model by inspecting a sample produced by the Markov chain. Figure 2 shows some of the clusters learned by the model on the Animals dataset. It also shows the biclustering, as well as the covariance of the distributed representations of the animals and their attributes, sorted by their clusters. By inspecting the covariance, we can determine the clusters that are tight and the affinities between the clusters. Indeed, the cluster structure is reflected in the block-diagonal structure of the covariance matrix. For example, the covariance of the attributes (see Fig. 2, top-right panel) shows that cluster F1, containing {flippers, stainteeth,swims} is similar to cluster F4, containing {bulbous, slow, inactive}, but is very dissimilar to F2, containing {hooves, vegetation, grazer}. Figure 3 displays the learned representation for the Kinship dataset. The kinship dataset has 104 people with complex relationships between them: each person belongs to one of four sections, which strongly constrains the other relations. For example, a person in section 1 has a father in section 3 and a mother in section 4 (see [8, 4] for more details). After learning, each cluster was almost completely localized in gender, section, and age. For clarity of presentation, we sort the clusters first by their section, then by their gender, and finally by their age, as done in [8]. Figure 3 (panels (b-g)) displays some of the relations according to this clustering, and panel (a) shows the covariance between the vectors {aL} learned for each person. The four sections are clearly visible in the covariance structure of the distributed representations. Figure 4 shows the inferred clusters for the medical UML dataset. For example, the model discovers that {Amino Acid, Peptide, Protein} Affects {Biologic Function, Cell Function, Genetic Function}, 6 1 Independence Day; Lost World: Jurassic Park The; Stargate; Twister; Air Force One; . . . 2 Star Wars: Episode IV - A New Hope; Silence of the Lambs The; Raiders of the Lost Ark; . . . 3 Shakespeare in Love; Shawshank Redemption The; Good Will Hunting; As Good As It Gets; . . . 4 Fargo; Being John Malkovich; Annie Hall; Talented Mr. Ripley The; Taxi Driver; . . . 5 E.T. the Extra-Terrestrial; Ghostbusters; Babe; Bug’s Life A; Toy Story 2; . . . 6 Jurassic Park; Saving Private Ryan; Matrix The; Back to the Future; Forrest Gump; . . . 7 Dick Tracy; Space Jam; Teenage Mutant Ninja Turtles; Superman III; Last Action Hero; . . . 8 Monty Python and the Holy Grail; Twelve Monkeys; Beetlejuice; Ferris Bueller’s Day Off; . . . 9 Lawnmower Man The; Event Horizon; Howard the Duck; Beach The; Rocky III; Bird on a Wire; . . . 10 Terminator 2: Judgment Day; Terminator The; Alien; Total Recall; Aliens; Jaws; Predator; . . . 11 Groundhog Day; Who Framed Roger Rabbit?; Usual Suspects The; Airplane!; Election; . . . 12 Back to the Future Part III; Honey I Shrunk the Kids; Crocodile Dundee; Rocketeer The; . . . 13 Sixth Sense The; Braveheart; Princess Bride The; Batman; Willy Wonka and the Chocolate Factory; . . . 14 Men in Black; Galaxy Quest; Clueless; Chicken Run; Mask The; Pleasantville; Mars Attacks!; . . . 15 Austin Powers: The Spy Who Shagged Me; There’s Something About Mary; Austin Powers: . . . 16 Breakfast Club The; American Pie; Blues Brothers The; Animal House; Rocky; Blazing Saddles; . . . 17 American Beauty; Pulp Fiction; GoodFellas; Fight Club; South Park: Bigger Longer and Uncut; . . . 18 Star Wars: Episode V - The Empire Strikes Back; Star Wars: Episode VI - Return of the Jedi; . . . 19 Edward Scissorhands; Blair Witch Project The; Nightmare Before Christmas The; James and the Giant Peach; . . . 20 Mighty Peking Man Figure 5: Results on the Movielens dataset. Left: The covariance between the movie vectors. Right: The inferred clusters. 1 feel good; make money; make music; sweat; earn money; check your mind; pass time; 2 weasel; Apple trees; Ferrets; heifer; beaver; ficus; anemone; blowfish; koala; triangle; 3 boredom; anger; cry; buy ticket; laughter; fatigue; joy; panic; turn on tv; patience; 4 enjoy; danger; hurt; bad; competition; cold; recreate; bored; health; excited; 5 car; book; home; build; store; school; table; office; music; desk; cabinet; pleasure; 6 library; New York; shelf; cupboard; living room; pocket; a countryside; utah; basement; 7 city; bathroom; kitchen; restaurant; bed; park; refrigerate; closet; street; bedroom; 8 think; sleep; sit; play games; examine; listen music; read books; buy; wait; play sport; 9 Housework; attend class; go jogging; chat with friends; visit museums; ride bikes; 10 fox; small dogs; wiener dog; bald eagle; crab; boy; bee; monkey; shark; sloth; marmot; 11 fun; relax; entertain; learn; eat; exercise; sex; food; work; talk; play; party; travel; 12 state; a large city; act; big city; Europe; maryland; colour; corner; need; pennsylvania; 13 play music; go; look; drink water; cut; plan; rope; fair; chew; wear; body part; fail; 14 green; lawyer; recycle; globe; Rat; sharp points; silver; empty; Bob Dylan; dead fish; 15 potato; comfort; knowledge; move; inform; burn; men; vegetate; fear; accident; murder; 16 garbage; thought; orange; handle; penis; diamond; wing; queen; nose; sidewalk; pad; 17 sand; bacteria; robot; hall; basketball court; support; Milky Way; chef; sheet of paper; 18 dessert; pub; extinguish fire; fuel; symbol; cleanliness; lock the door; shelter; sphere; Figure 6: Results on the Conceptnet dataset. Left: The covariance of the learned {aL} vectors for each object. Right: The inferred clusters. which is also similar, according to the covariance, to {Cell Dysfunction, Disease, Mental Dysfunction}. Qualitatively, the clustering appears to be on par with that of the IRM on all the datasets, but the BCTF model is able to predict held-out relations much better. Figures 5 and 6 display the learned clusters for the Movielens and the Conceptnet datasets. For the Movielens dataset, we show the most frequently-rated movies in each cluster where the clusters are sorted by size. We also show the covariance between the movie vectors which are sorted by the clusters, where we display only the 100 most frequently-rated movies per cluster. The covariance matrix is aligned with the table on the right, making it easy to see how the clusters relate to each other. For example, according to the covariance structure, clusters 7 and 9, containing Hollywood action/adventure movies are similar to each other but are dissimilar to cluster 8, which consists of comedy/horror movies. For the Conceptnet dataset, Fig. 6 displays the 100 most frequent objects per category. From the covariance matrix, we can infer that clusters 8, 9, and 11, containing concepts associated with humans taking actions, are very similar to each other, and are very dissimilar to cluster 10, which contains animals. Observe that some clusters (e.g., clusters 2-6) are not crisp, which is reflected in the smaller covariances between vectors in each of these clusters. 4 Discussions and Conclusions We introduced a new method for modelling relational data which is able to both discover meaningful structure and generalize well. In particular, our results illustrate the predictive power of distributed representations when applied to modelling relational data, since even simple tensor factorization models can sometimes outperform the more complex models. Indeed, for the kinship and the UML datasets, the performance of the MAP-based tensor factorization was as good as the performance of the BCTF model, which is due to the density of these datasets: the number of observations was much larger than the number of parameters. On the other hand, for large sparse datasets, the BCTF 7 model significantly outperformed its MAP counterpart, and in particular, it noticeably outperformed BTF on the Conceptnet dataset. A surprising aspect of the Bayesian model is the ease with which it worked after automatic hyperparameter selection was implemented. Furthermore, the model performs well even when the initial MAP estimate is very poor, as was the case for the 40-dimensional models on the Conceptnet dataset. This is particularly important for large sparse datasets, since finding a good MAP estimate requires careful cross-validation to select the regularization hyperparameters. Careful hyperparameter selection can be very labour-expensive because it requires careful training of a large number of models. Acknowledgments The authors acknowledge the financial support from NSERC, Shell, NTT Communication Sciences Laboratory, AFOSR FA9550-07-1-0075, and AFOSR MURI. References [1] Edoardo Airoldi, David M. Blei, Stephen E. Fienberg, and Eric P. Xing. Mixed membership stochastic blockmodels. In NIPS, pages 33–40. MIT Press, 2008. [2] P.J. Carrington, J. Scott, and S. Wasserman. Models and methods in social network analysis. Cambridge University Press, 2005. [3] W. Chu and Z. Ghahramani. Probabilistic models for incomplete multi-dimensional arrays. In Proceedings of the International Conference on Artificial Intelligence and Statistics, volume 5, 2009. [4] W. Denham. The Detection of Patterns in Alyawarra Nonverbal Behavior. PhD thesis, Department of Anthropology, University of Washington, 1973. [5] S. Jain and R.M. Neal. A split-merge Markov chain Monte Carlo procedure for the Dirichlet process mixture model. Journal of Computational and Graphical Statistics, 13(1):158–182, 2004. [6] Y. Katz, N.D. Goodman, K. Kersting, C. Kemp, and J.B. Tenenbaum. Modeling Semantic Cognition as Logical Dimensionality Reduction. In Proceedings of Thirtieth Annual Meeting of the Cognitive Science Society, 2008. [7] C. Kemp, N.D. Goodman, and J.B. Tenenbaum. Theory acquisition and the language of thought. In Proceedings of Thirtieth Annual Meeting of the Cognitive Science Society, 2008. [8] C. Kemp, J.B. Tenenbaum, T.L. Griffiths, T. Yamada, and N. Ueda. Learning systems of concepts with an infinite relational model. In Proceedings of the National Conference on Artificial Intelligence, volume 21, page 381. Menlo Park, CA; Cambridge, MA; London; AAAI Press; MIT Press; 1999, 2006. [9] S. Kok and P. Domingos. Statistical predicate invention. In Proceedings of the 24th international conference on Machine learning, pages 433–440. ACM New York, NY, USA, 2007. [10] H. Liu and P. Singh. ConceptNeta practical commonsense reasoning tool-kit. BT Technology Journal, 22(4):211–226, 2004. [11] A.T. McCray. An upper-level ontology for the biomedical domain. Comparative and Functional Genomics, 4(1):80–84, 2003. [12] R.M. Neal. Probabilistic inference using Markov chain Monte Carlo methods, 1993. [13] R.M. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of computational and graphical statistics, pages 249–265, 2000. [14] Ian Porteous, Evgeniy Bart, and Max Welling. Multi-HDP: A non parametric bayesian model for tensor factorization. In Dieter Fox and Carla P. Gomes, editors, AAAI, pages 1487–1490. AAAI Press, 2008. [15] J. Riedl, J. Konstan, S. Lam, and J. Herlocker. Movielens collaborative filtering data set, 2006. [16] J.F. Rual, K. Venkatesan, T. Hao, T. Hirozane-Kishikawa, A. Dricot, N. Li, G.F. Berriz, F.D. Gibbons, M. Dreze, N. Ayivi-Guedehoussou, et al. Towards a proteome-scale map of the human protein–protein interaction network. Nature, 437(7062):1173–1178, 2005. [17] R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Proceedings of the 25th international conference on Machine learning, pages 880–887. ACM New York, NY, USA, 2008. [18] R. Salakhutdinov and A. Mnih. Probabilistic matrix factorization. Advances in neural information processing systems, 20, 2008. [19] R. Speer, C. Havasi, and H. Lieberman. AnalogySpace: Reducing the dimensionality of common sense knowledge. In Proceedings of AAAI, 2008. 8
2009
91
3,845
Kernel Methods for Deep Learning Youngmin Cho and Lawrence K. Saul Department of Computer Science and Engineering University of California, San Diego 9500 Gilman Drive, Mail Code 0404 La Jolla, CA 92093-0404 {yoc002,saul}@cs.ucsd.edu Abstract We introduce a new family of positive-definite kernel functions that mimic the computation in large, multilayer neural nets. These kernel functions can be used in shallow architectures, such as support vector machines (SVMs), or in deep kernel-based architectures that we call multilayer kernel machines (MKMs). We evaluate SVMs and MKMs with these kernel functions on problems designed to illustrate the advantages of deep architectures. On several problems, we obtain better results than previous, leading benchmarks from both SVMs with Gaussian kernels as well as deep belief nets. 1 Introduction Recent work in machine learning has highlighted the circumstances that appear to favor deep architectures, such as multilayer neural nets, over shallow architectures, such as support vector machines (SVMs) [1]. Deep architectures learn complex mappings by transforming their inputs through multiple layers of nonlinear processing [2]. Researchers have advanced several motivations for deep architectures: the wide range of functions that can be parameterized by composing weakly nonlinear transformations, the appeal of hierarchical distributed representations, and the potential for combining unsupervised and supervised methods. Experiments have also shown the benefits of deep learning in several interesting applications [3, 4, 5]. Many issues surround the ongoing debate over deep versus shallow architectures [1, 6]. Deep architectures are generally more difficult to train than shallow ones. They involve difficult nonlinear optimizations and many heuristics. The challenges of deep learning explain the early and continued appeal of SVMs, which learn nonlinear classifiers via the “kernel trick”. Unlike deep architectures, SVMs are trained by solving a simple problem in quadratic programming. However, SVMs cannot seemingly benefit from the advantages of deep learning. Like many, we are intrigued by the successes of deep architectures yet drawn to the elegance of kernel methods. In this paper, we explore the possibility of deep learning in kernel machines. Though we share a similar motivation as previous authors [7], our approach is very different. Our paper makes two main contributions. First, we develop a new family of kernel functions that mimic the computation in large neural nets. Second, using these kernel functions, we show how to train multilayer kernel machines (MKMs) that benefit from many advantages of deep learning. The organization of this paper is as follows. In section 2, we describe a new family of kernel functions and experiment with their use in SVMs. Our results on SVMs are interesting in their own right; they also foreshadow certain trends that we observe (and certain choices that we make) for the MKMs introduced in section 3. In this section, we describe a kernel-based architecture with multiple layers of nonlinear transformation. The different layers are trained using a simple combination of supervised and unsupervised methods. Finally, we conclude in section 4 by evaluating the strengths and weaknesses of our approach. 1 2 Arc-cosine kernels In this section, we develop a new family of kernel functions for computing the similarity of vector inputs x, y ∈ℜd. As shorthand, let Θ(z) = 1 2(1 + sign(z)) denote the Heaviside step function. We define the nth order arc-cosine kernel function via the integral representation: kn(x, y) = 2 Z dw e−∥w∥2 2 (2π)d/2 Θ(w · x) Θ(w · y) (w · x)n (w · y)n (1) The integral representation makes it straightforward to show that these kernel functions are positivesemidefinite. The kernel function in eq. (1) has interesting connections to neural computation [8] that we explore further in sections 2.2–2.3. However, we begin by elucidating its basic properties. 2.1 Basic properties We show how to evaluate the integral in eq. (1) analytically in the appendix. The final result is most easily expressed in terms of the angle θ between the inputs: θ = cos−1  x · y ∥x∥∥y∥  . (2) The integral in eq. (1) has a simple, trivial dependence on the magnitudes of the inputs x and y, but a complex, interesting dependence on the angle between them. In particular, we can write: kn(x, y) = 1 π ∥x∥n∥y∥nJn(θ) (3) where all the angular dependence is captured by the family of functions Jn(θ). Evaluating the integral in the appendix, we show that this angular dependence is given by: Jn(θ) = (−1)n(sin θ)2n+1  1 sin θ ∂ ∂θ n π −θ sin θ  . (4) For n=0, this expression reduces to the supplement of the angle between the inputs. However, for n>0, the angular dependence is more complicated. The first few expressions are: J0(θ) = π −θ (5) J1(θ) = sin θ + (π −θ) cos θ (6) J2(θ) = 3 sin θ cos θ + (π −θ)(1 + 2 cos2 θ) (7) We describe eq. (3) as an arc-cosine kernel because for n = 0, it takes the simple form k0(x, y) = 1−1 π cos−1 x·y ∥x∥∥y∥. In fact, the zeroth and first order kernels in this family are strongly motivated by previous work in neural computation. We explore these connections in the next section. Arc-cosine kernels have other intriguing properties. From the magnitude dependence in eq. (3), we observe the following: (i) the n = 0 arc-cosine kernel maps inputs x to the unit hypersphere in feature space, with k0(x, x) = 1; (ii) the n = 1 arc-cosine kernel preserves the norm of inputs, with k1(x, x) = ∥x∥2; (iii) higher order (n>1) arc-cosine kernels expand the dynamic range of the inputs, with kn(x, x) ∼∥x∥2n. Properties (i)–(iii) are shared respectively by radial basis function (RBF), linear, and polynomial kernels. Interestingly, though, the n = 1 arc-cosine kernel is highly nonlinear, also satisfying k1(x, −x) = 0 for all inputs x. As a practical matter, we note that arccosine kernels do not have any continuous tuning parameters (such as the kernel width in RBF kernels), which can be laborious to set by cross-validation. 2.2 Computation in single-layer threshold networks Consider the single-layer network shown in Fig. 1 (left) whose weights Wij connect the jth input unit to the ith output unit. The network maps inputs x to outputs f(x) by applying an elementwise nonlinearity to the matrix-vector product of the inputs and the weight matrix: f(x) = g(Wx). The nonlinearity is described by the network’s so-called activation function. Here we consider the family of one-sided polynomial activation functions gn(z) = Θ(z)zn illustrated in the right panel of Fig. 1. 2 f2 f3 fi x1 x2 xj . . . . . . f1 fm xd W . . . . . . −1 0 1 0 0.5 1 Step (n=0) −1 0 1 0 0.5 1 Ramp (n=1) −1 0 1 0 0.5 1 Quarter−pipe (n=2) Figure 1: Single layer network and activation functions For n=0, the activation function is a step function, and the network is an array of perceptrons. For n=1, the activation function is a ramp function (or rectification nonlinearity [9]), and the mapping f(x) is piecewise linear. More generally, the nonlinear (non-polynomial) behavior of these networks is induced by thresholding on weighted sums. We refer to networks with these activation functions as single-layer threshold networks of degree n. Computation in these networks is closely connected to computation with the arc-cosine kernel function in eq. (1). To see the connection, consider how inner products are transformed by the mapping in single-layer threshold networks. As notation, let the vector wi denote ith row of the weight matrix W. Then we can express the inner product between different outputs of the network as: f(x) · f(y) = m X i=1 Θ(wi · x)Θ(wi · y)(wi · x)n(wi · y)n, (8) where m is the number of output units. The connection with the arc-cosine kernel function emerges in the limit of very large networks [10, 8]. Imagine that the network has an infinite number of output units, and that the weights Wij are Gaussian distributed with zero mean and unit variance. In this limit, we see that eq. (8) reduces to eq. (1) up to a trivial multiplicative factor: limm→∞2 mf(x) · f(y) = kn(x, y). Thus the arc-cosine kernel function in eq. (1) can be viewed as the inner product between feature vectors derived from the mapping of an infinite single-layer threshold network [8]. Many researchers have noted the general connection between kernel machines and neural networks with one layer of hidden units [1]. The n = 0 arc-cosine kernel in eq. (1) can also be derived from an earlier result obtained in the context of Gaussian processes [8]. However, we are unaware of any previous theoretical or empirical work on the general family of these kernels for degrees n≥0. Arc-cosine kernels differ from polynomial and RBF kernels in one especially interesting respect. As highlighted by the integral representation in eq. (1), arc-cosine kernels induce feature spaces that mimic the sparse, nonnegative, distributed representations of single-layer threshold networks. Polynomial and RBF kernels do not encode their inputs in this way. In particular, the feature vector induced by polynomial kernels is neither sparse nor nonnegative, while the feature vector induced by RBF kernels resembles the localized output of a soft vector quantizer. Further implications of this difference are explored in the next section. 2.3 Computation in multilayer threshold networks A kernel function can be viewed as inducing a nonlinear mapping from inputs x to feature vectors Φ(x). The kernel computes the inner product in the induced feature space: k(x, y) = Φ(x)·Φ(y). In this section, we consider how to compose the nonlinear mappings induced by kernel functions. Specifically, we show how to derive new kernel functions k(ℓ)(x, y) = Φ(Φ(...Φ | {z } ℓtimes (x))) · Φ(Φ(...Φ | {z } ℓtimes (y))) (9) which compute the inner product after ℓsuccessive applications of the nonlinear mapping Φ(·). Our motivation is the following: intuitively, if the base kernel function k(x, y) = Φ(x) · Φ(y) mimics the computation in a single-layer network, then the iterated mapping in eq. (9) should mimic the computation in a multilayer network. 3 22 24 26 DBN−3 SVM−RBF Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter−pipe (n=2) g f p g g g test set. SVMs with arc cosine kernels have error rates from 22.36–25.64%. Results are s kernels of varying degree (n) and levels of recursion (ℓ). The best previous results are 24 SVMs with RBF kernels and 22.50% for deep belief nets [2]. See text for details. 17 18 19 20 21 Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) Figure 3: Left: examples from the convex data set. Right: classification error rates on th SVMs with arc cosine kernels have error rates from 17.15–20.51%. Results are shown fo of varying degree (n) and levels of recursion (ℓ). The best previous results are 19.13% f with RBF kernels and 18.63% for deep belief nets [2]. See text for details. 2000 training examples as a validation set to choose the margin penalty parameter; after this parameter by cross-validation, we then retrained each SVM using all the training exam reference, we also report the best results obtained previously from three layer deep belief ne 3) and SVMs with RBF kernels (SVM-RBF). These references are representative of th state-of-the-art for deep and shallow architectures on these data sets. The right panels of figures 2 and 3 show the test set error rates from arc cosine kernels o degree (n) and levels of recursion (ℓ). We experimented with kernels of degree n = 0 corresponding to single layer threshold networks with “step”, “ramp”, and “quarter-pipe” functions. We also experimented with the multilayer kernels described in section 2.3, c from one to six levels of recursion. Overall, the figures show that on these two data s different arc cosine kernels outperform the best results previously reported for SVMs w kernels and deep belief nets. We give more details on these experiments below. At a h though, we note that SVMs with arc cosine kernels are very straightforward to train; unli with RBF kernels, they do not require tuning a kernel width parameter, and unlike deep b they do not require solving a difficult nonlinear optimization or searching over possible arch In our experiments, we quickly discovered that the multilayer kernels only performed w n = 1 kernels were used at higher (ℓ> 1) levels in the recursion. Figs. 2 and 3 therefore s these sets of results; in particular, each group of bars shows the test error rates when a kernel (of degree n = 0, 1, 2) was used at the first layer of nonlinearity, while the n = 1 k used at successive layers. We do not have a formal explanation for this effect. However, r only the n = 1 arc cosine kernel preserves the norm of its inputs: the n = 0 kernel maps onto a unit hypersphere in feature space, while higher-order (n > 1) kernels may induc spaces with severely distorted dynamic ranges. Therefore, we hypothesize that only n=1 a kernels preserve sufficient information about the magnitude of their inputs to work effe composition with other kernels. Finally, the results on both data sets reveal an interesting trend: the multilayer arc cosin often perform better than their single layer counterparts. Though SVMs are shallow arch 5 Figure 2: Left: examples from the rectangles-image data set. Right: classification error rates on the test set. SVMs with arc-cosine kernels have error rates from 22.36–25.64%. Results are shown for kernels of varying degree (n) and levels of recursion (ℓ). The best previous results are 24.04% for SVMs with RBF kernels and 22.50% for deep belief nets [11]. See text for details. We first examine the results of this procedure for widely used kernels. Here we find that the iterated mapping in eq. (9) does not yield particularly interesting results. Consider the two-fold composition that maps x to Φ(Φ(x)). For linear kernels k(x, y) = x · y, the composition is trivial: we obtain the identity map Φ(Φ(x)) = Φ(x) = x. For homogeneous polynomial kernels k(x, y) = (x · y)d, the composition yields: Φ(Φ(x)) · Φ(Φ(y)) = (Φ(x) · Φ(y))d = ((x · y)d)d = (x · y)d2. (10) The above result is not especially interesting: the kernel implied by this composition is also polynomial, just of higher degree (d2 versus d) than the one from which it was constructed. Likewise, for RBF kernels k(x, y) = e−λ∥x−y∥2, the composition yields: Φ(Φ(x)) · Φ(Φ(y)) = e−λ∥Φ(x)−Φ(y)∥2 = e−2λ(1−k(x,y)). (11) Though non-trivial, eq. (11) does not represent a particularly interesting computation. Recall that RBF kernels mimic the computation of soft vector quantizers, with k(x, y) ≪1 when ∥x−y∥is large compared to the kernel width. It is hard to see how the iterated mapping Φ(Φ(x)) would generate a qualitatively different representation than the original mapping Φ(x). Next we consider the ℓ-fold composition in eq. (9) for arc-cosine kernel functions. We state the result in the form of a recursion. The base case is given by eq. (3) for kernels of depth ℓ= 1 and degree n. The inductive step is given by: k(l+1) n (x, y) = 1 π h k(l) n (x, x) k(l) n (y, y) in/2 Jn  θ(ℓ) n  , (12) where θ(ℓ) n is the angle between the images of x and y in the feature space induced by the ℓ-fold composition. In particular, we can write: θ(ℓ) n = cos−1  k(ℓ) n (x, y) h k(ℓ) n (x, x) k(ℓ) n (y, y) i−1/2 . (13) The recursion in eq. (12) is simple to compute in practice. The resulting kernels mimic the computations in large multilayer threshold networks. Above, for simplicity, we have assumed that the arc-cosine kernels have the same degree n at every level (or layer) ℓof the recursion. We can also use kernels of different degrees at different layers. In the next section, we experiment with SVMs whose kernel functions are constructed in this way. 2.4 Experiments on binary classification We evaluated SVMs with arc-cosine kernels on two challenging data sets of 28 × 28 grayscale pixel images. These data sets were specifically constructed to compare deep architectures and kernel machines [11]. In the first data set, known as rectangles-image, each image contains an occluding rectangle, and the task is to determine whether the width of the rectangle exceeds its height; examples are shown in Fig. 2 (left). In the second data set, known as convex, each image contains a white region, and the task is to determine whether the white region is convex; examples are shown 4 g f p g g g test set. SVMs with arc cosine kernels have error rates from 22.36–25.64%. Results are s kernels of varying degree (n) and levels of recursion (ℓ). The best previous results are 24 SVMs with RBF kernels and 22.50% for deep belief nets [2]. See text for details. 17 18 19 20 21 Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) Figure 3: Left: examples from the convex data set. Right: classification error rates on th SVMs with arc cosine kernels have error rates from 17.15–20.51%. Results are shown fo of varying degree (n) and levels of recursion (ℓ). The best previous results are 19.13% f with RBF kernels and 18.63% for deep belief nets [2]. See text for details. 2000 training examples as a validation set to choose the margin penalty parameter; after this parameter by cross-validation, we then retrained each SVM using all the training exam reference, we also report the best results obtained previously from three layer deep belief ne 3) and SVMs with RBF kernels (SVM-RBF). These references are representative of th state-of-the-art for deep and shallow architectures on these data sets. The right panels of figures 2 and 3 show the test set error rates from arc cosine kernels o degree (n) and levels of recursion (ℓ). We experimented with kernels of degree n = 0 corresponding to single layer threshold networks with “step”, “ramp”, and “quarter-pipe” a functions. We also experimented with the multilayer kernels described in section 2.3, c from one to six levels of recursion. Overall, the figures show that on these two data se different arc cosine kernels outperform the best results previously reported for SVMs w kernels and deep belief nets. We give more details on these experiments below. At a h though, we note that SVMs with arc cosine kernels are very straightforward to train; unli with RBF kernels, they do not require tuning a kernel width parameter, and unlike deep be they do not require solving a difficult nonlinear optimization or searching over possible arch In our experiments, we quickly discovered that the multilayer kernels only performed w n = 1 kernels were used at higher (ℓ> 1) levels in the recursion. Figs. 2 and 3 therefore s these sets of results; in particular, each group of bars shows the test error rates when a kernel (of degree n = 0, 1, 2) was used at the first layer of nonlinearity, while the n = 1 k used at successive layers. We do not have a formal explanation for this effect. However, r only the n = 1 arc cosine kernel preserves the norm of its inputs: the n = 0 kernel maps onto a unit hypersphere in feature space, while higher-order (n > 1) kernels may induc spaces with severely distorted dynamic ranges. Therefore, we hypothesize that only n=1 a kernels preserve sufficient information about the magnitude of their inputs to work effe composition with other kernels. Finally, the results on both data sets reveal an interesting trend: the multilayer arc cosin often perform better than their single layer counterparts. Though SVMs are shallow arch 5 17 18 19 20 21 DBN−3 SVM−RBF Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter−pipe (n=2) Figure 3: Left: examples from the convex data set. Right: classification error rates on the test set. SVMs with arc-cosine kernels have error rates from 17.15–20.51%. Results are shown for kernels of varying degree (n) and levels of recursion (ℓ). The best previous results are 19.13% for SVMs with RBF kernels and 18.63% for deep belief nets [11]. See text for details. in Fig. 3 (left). The rectangles-image data set has 12000 training examples, while the convex data set has 8000 training examples; both data sets have 50000 test examples. These data sets have been extensively benchmarked by previous authors [11]. Our experiments in binary classification focused on these data sets because in previously reported benchmarks, they exhibited the biggest performance gap between deep architectures (e.g., deep belief nets) and traditional SVMs. We followed the same experimental methodology as previous authors [11]. SVMs were trained using libSVM (version 2.88) [12], a publicly available software package. For each SVM, we used the last 2000 training examples as a validation set to choose the margin penalty parameter; after choosing this parameter by cross-validation, we then retrained each SVM using all the training examples. For reference, we also report the best results obtained previously from three-layer deep belief nets (DBN-3) and SVMs with RBF kernels (SVM-RBF). These references appear to be representative of the current state-of-the-art for deep and shallow architectures on these data sets. Figures 2 and 3 show the test set error rates from arc-cosine kernels of varying degree (n) and levels of recursion (ℓ). We experimented with kernels of degree n = 0, 1 and 2, corresponding to threshold networks with “step”, “ramp”, and “quarter-pipe” activation functions. We also experimented with the multilayer kernels described in section 2.3, composed from one to six levels of recursion. Overall, the figures show that many SVMs with arc-cosine kernels outperform traditional SVMs, and a certain number also outperform deep belief nets. In addition to their solid performance, we note that SVMs with arc-cosine kernels are very straightforward to train; unlike SVMs with RBF kernels, they do not require tuning a kernel width parameter, and unlike deep belief nets, they do not require solving a difficult nonlinear optimization or searching over possible architectures. Our experiments with multilayer kernels revealed that these SVMs only performed well when arccosine kernels of degree n = 1 were used at higher (ℓ> 1) levels in the recursion. Figs. 2 and 3 therefore show only these sets of results; in particular, each group of bars shows the test error rates when a particular kernel (of degree n = 0, 1, 2) was used at the first layer of nonlinearity, while the n = 1 kernel was used at successive layers. We hypothesize that only n = 1 arc-cosine kernels preserve sufficient information about the magnitude of their inputs to work effectively in composition with other kernels. Recall that only the n = 1 arc-cosine kernel preserves the norm of its inputs: the n = 0 kernel maps all inputs onto a unit hypersphere in feature space, while higherorder (n>1) kernels induce feature spaces with different dynamic ranges. Finally, the results on both data sets reveal an interesting trend: the multilayer arc-cosine kernels often perform better than their single-layer counterparts. Though SVMs are (inherently) shallow architectures, this trend suggests that for these problems in binary classification, arc-cosine kernels may be yielding some of the advantages typically associated with deep architectures. 3 Deep learning In this section, we explore how to use kernel methods in deep architectures [7]. We show how to train deep kernel-based architectures by a simple combination of supervised and unsupervised methods. Using the arc-cosine kernels in the previous section, these multilayer kernel machines (MKMs) perform very competitively on multiclass data sets designed to foil shallow architectures [11]. 5 3.1 Multilayer kernel machines We explored how to train MKMs in stages that involve kernel PCA [13] and feature selection [14] at intermediate hidden layers and large-margin nearest neighbor classification [15] at the final output layer. Specifically, for ℓ-layer MKMs, we considered the following training procedure: 1. Prune uninformative features from the input space. 2. Repeat ℓtimes: (a) Compute principal components in the feature space induced by a nonlinear kernel. (b) Prune uninformative components from the feature space. 3. Learn a Mahalanobis distance metric for nearest neighbor classification. The individual steps in this procedure are well-established methods; only their combination is new. While many other approaches are worth investigating, our positive results from the above procedure provide a first proof-of-concept. We discuss each of these steps in greater detail below. Kernel PCA. Deep learning in MKMs is achieved by iterative applications of kernel PCA [13]. This use of kernel PCA was suggested over a decade ago [16] and more recently inspired by the pretraining of deep belief nets by unsupervised methods. In MKMs, the outputs (or features) from kernel PCA at one layer are the inputs to kernel PCA at the next layer. However, we do not strictly transmit each layer’s top principal components to the next layer; some components are discarded if they are deemed uninformative. While any nonlinear kernel can be used for the layerwise PCA in MKMs, arc-cosine kernels are natural choices to mimic the computations in large neural nets. Feature selection. The layers in MKMs are trained by interleaving a supervised method for feature selection with the unsupervised method of kernel PCA. The feature selection is used to prune away uninformative features at each layer in the MKM (including the zeroth layer which stores the raw inputs). Intuitively, this feature selection helps to focus the unsupervised learning in MKMs on statistics of the inputs that actually contain information about the class labels. We prune features at each layer by a simple two-step procedure that first ranks them by estimates of their mutual information, then truncates them using cross-validation. More specifically, in the first step, we discretize each real-valued feature and construct class-conditional and marginal histograms of its discretized values; then, using these histograms, we estimate each feature’s mutual information with the class label and sort the features in order of these estimates [14]. In the second step, considering only the first w features in this ordering, we compute the error rates of a basic kNN classifier using Euclidean distances in feature space. We compute these error rates on a held-out set of validation examples for many values of k and w and record the optimal values for each layer. The optimal w determines the number of informative features passed onto the next layer; this is essentially the width of the layer. In practice, we varied k from 1 to 15 and w from 10 to 300; though exhaustive, this cross-validation can be done quickly and efficiently by careful bookkeeping. Note that this procedure determines the architecture of the network in a greedy, layer-by-layer fashion. Distance metric learning. Test examples in MKMs are classified by a variant of kNN classification on the outputs of the final layer. Specifically, we use large margin nearest neighbor (LMNN) classification [15] to learn a Mahalanobis distance metric for these outputs, though other methods are equally viable [17]. The use of LMNN is inspired by the supervised fine-tuning of weights in the training of deep architectures [18]. In MKMs, however, this supervised training only occurs at the final layer (which underscores the importance of feature selection in earlier layers). LMNN learns a distance metric by solving a problem in semidefinite programming; one advantage of LMNN is that the required optimization is convex. Test examples are classified by the energy-based decision rule for LMNN [15], which was itself inspired by earlier work on multilayer neural nets [19]. 3.2 Experiments on multiway classification We evaluated MKMs on the two multiclass data sets from previous benchmarks [11] that exhibited the largest performance gap between deep and shallow architectures. The data sets were created from the MNIST data set [20] of 28 × 28 grayscale handwritten digits. The mnist-back-rand data set was generated by filling the image background by random pixel values, while the mnist-back-image data set was generated by filling the image background with random image patches; examples are shown in Figs. 4 and 5. Each data set contains 12000 and 50000 training and test examples, respectively. 6 5 6 7 8 DBN−3 Test error rate (%) 0 1 2 3 4 5 Step (n=0) 1 2 3 4 5 Ramp (n=1) 1 2 Quarter−pipe (n=2) 1 2 RBF test set. SVMs with arc cosine kernels have error rates from 22.36–25.64%. Resul kernels of varying degree (n) and levels of recursion (ℓ). The best previous results SVMs with RBF kernels and 22.50% for deep belief nets [2]. See text for details. 17 18 19 20 21 Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 Quarter!pipe (n= Figure 3: Left: examples from the convex data set. Right: classification error rate SVMs with arc cosine kernels have error rates from 17.15–20.51%. Results are sh of varying degree (n) and levels of recursion (ℓ). The best previous results are 19 with RBF kernels and 18.63% for deep belief nets [2]. See text for details. 2000 training examples as a validation set to choose the margin penalty parameter this parameter by cross-validation, we then retrained each SVM using all the trainin reference, we also report the best results obtained previously from three layer deep be 3) and SVMs with RBF kernels (SVM-RBF). These references are representativ state-of-the-art for deep and shallow architectures on these data sets. The right panels of figures 2 and 3 show the test set error rates from arc cosine ke degree (n) and levels of recursion (ℓ). We experimented with kernels of degree n corresponding to single layer threshold networks with “step”, “ramp”, and “quarterfunctions. We also experimented with the multilayer kernels described in section from one to six levels of recursion. Overall, the figures show that on these two different arc cosine kernels outperform the best results previously reported for S kernels and deep belief nets. We give more details on these experiments below. though, we note that SVMs with arc cosine kernels are very straightforward to trai with RBF kernels, they do not require tuning a kernel width parameter, and unlike they do not require solving a difficult nonlinear optimization or searching over possib In our experiments, we quickly discovered that the multilayer kernels only perfor n = 1 kernels were used at higher (ℓ> 1) levels in the recursion. Figs. 2 and 3 ther these sets of results; in particular, each group of bars shows the test error rates w kernel (of degree n = 0, 1, 2) was used at the first layer of nonlinearity, while the n used at successive layers. We do not have a formal explanation for this effect. How only the n = 1 arc cosine kernel preserves the norm of its inputs: the n = 0 kernel onto a unit hypersphere in feature space, while higher-order (n > 1) kernels may spaces with severely distorted dynamic ranges. Therefore, we hypothesize that only kernels preserve sufficient information about the magnitude of their inputs to wo composition with other kernels. Finally, the results on both data sets reveal an interesting trend: the multilayer ar often perform better than their single layer counterparts. Though SVMs are shallo 5 17 18 19 20 21 DBN!3 SVM!RBF Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) Figure 4: Left: examples from the mnist-back-rand data set. Right: classification error rates on the test set for MKMs with different kernels and numbers of layers ℓ. MKMs with arc-cosine kernel have error rates from 6.36–7.52%. The best previous results are 14.58% for SVMs with RBF kernels and 6.73% for deep belief nets [11]. 22 24 26 Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) Figure 2: Left: examples from the rectangles-image data set. Right: classification error test set. SVMs with arc cosine kernels have error rates from 22.36–25.64%. Results a kernels of varying degree (n) and levels of recursion (ℓ). The best previous results are SVMs with RBF kernels and 22.50% for deep belief nets [2]. See text for details. 17 18 19 20 21 Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) Figure 3: Left: examples from the convex data set. Right: classification error rates on SVMs with arc cosine kernels have error rates from 17.15–20.51%. Results are shown of varying degree (n) and levels of recursion (ℓ). The best previous results are 19.13% with RBF kernels and 18.63% for deep belief nets [2]. See text for details. 2000 training examples as a validation set to choose the margin penalty parameter; af this parameter by cross-validation, we then retrained each SVM using all the training ex reference, we also report the best results obtained previously from three layer deep belief 3) and SVMs with RBF kernels (SVM-RBF). These references are representative of state-of-the-art for deep and shallow architectures on these data sets. The right panels of figures 2 and 3 show the test set error rates from arc cosine kernel degree (n) and levels of recursion (ℓ). We experimented with kernels of degree n = corresponding to single layer threshold networks with “step”, “ramp”, and “quarter-pip functions. We also experimented with the multilayer kernels described in section 2.3 from one to six levels of recursion. Overall, the figures show that on these two data different arc cosine kernels outperform the best results previously reported for SVM kernels and deep belief nets. We give more details on these experiments below. At though, we note that SVMs with arc cosine kernels are very straightforward to train; u with RBF kernels, they do not require tuning a kernel width parameter, and unlike deep they do not require solving a difficult nonlinear optimization or searching over possible a In our experiments, we quickly discovered that the multilayer kernels only performe n = 1 kernels were used at higher (ℓ> 1) levels in the recursion. Figs. 2 and 3 therefor these sets of results; in particular, each group of bars shows the test error rates when kernel (of degree n = 0, 1, 2) was used at the first layer of nonlinearity, while the n = used at successive layers. We do not have a formal explanation for this effect. Howeve only the n = 1 arc cosine kernel preserves the norm of its inputs: the n = 0 kernel ma onto a unit hypersphere in feature space, while higher-order (n > 1) kernels may in spaces with severely distorted dynamic ranges. Therefore, we hypothesize that only n= kernels preserve sufficient information about the magnitude of their inputs to work e composition with other kernels. Finally, the results on both data sets reveal an interesting trend: the multilayer arc co often perform better than their single layer counterparts. Though SVMs are shallow a 5 17 18 19 20 21 DBN!3 SVM!RBF Test error rate (%) 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 Quarter!pipe (n=2) 15 20 25 30 DBN−3 SVM−RBF Test error rate (%) 0 1 2 3 4 5 Step (n=0) 1 2 3 4 5 Ramp (n=1) 1 2 Quarter−pipe (n=2) 1 2 RBF Figure 5: Left: examples from the mnist-back-image data set. Right: classification error rates on the test set for MKMs with different kernels and numbers of layers ℓ. MKMs with arc-cosine kernel have error rates from 18.43–29.79%. The best previous results are 22.61% for SVMs with RBF kernels and 16.31% for deep belief nets [11]. We trained MKMs with arc-cosine kernels and RBF kernels in each layer. For each data set, we initially withheld the last 2000 training examples as a validation set. Performance on this validation set was used to determine each MKM’s architecture, as described in the previous section, and also to set the kernel width in RBF kernels, following the same methodology as earlier studies [11]. Once these parameters were set by cross-validation, we re-inserted the validation examples into the training set and used all 12000 training examples for feature selection and distance metric learning. For kernel PCA, we were limited by memory requirements to processing only 6000 out of 12000 training examples. We chose these 6000 examples randomly, but repeated each experiment five times to obtain a measure of average performance. The results we report for each MKM are the average performance over these five runs. The right panels of Figs. 4 and 5 show the test set error rates of MKMs with different kernels and numbers of layers ℓ. For reference, we also show the best previously reported results [11] using traditional SVMs (with RBF kernels) and deep belief nets (with three layers). MKMs perform significantly better than shallow architectures such as SVMs with RBF kernels or LMNN with feature selection (reported as the case ℓ= 0). Compared to deep belief nets, the leading MKMs obtain slightly lower error rates on one data set and slightly higher error rates on another. We can describe the architecture of an MKM by the number of selected features at each layer (including the input layer). The number of features essentially corresponds to the number of units in each layer of a neural net. For the mnist-back-rand data set, the best MKM used an n=1 arc-cosine kernel and 300-90-105-136-126-240 features at each layer. For the mnist-back-image data set, the best MKM used an n=0 arc-cosine kernel and 300-50-130-240-160-150 features at each layer. MKMs worked best with arc-cosine kernels of degree n = 0 and n = 1. The kernel of degree n = 2 performed less well in MKMs, perhaps because multiple iterations of kernel PCA distorted the dynamic range of the inputs (which in turn seemed to complicate the training for LMNN). MKMs with RBF kernels were difficult to train due to the sensitive dependence on kernel width parameters. It was extremely time-consuming to cross-validate the kernel width at each layer of the MKM. We only obtained meaningful results for one and two-layer MKMs with RBF kernels. 7 We briefly summarize many results that we lack space to report in full. We also experimented on multiclass data sets using SVMs with single and multi-layer arc-cosine kernels, as described in section 2. For multiclass problems, these SVMs compared poorly to deep architectures (both DBNs and MKMs), presumably because they had no unsupervised training that shared information across examples from all different classes. In further experiments on MKMs, we attempted to evaluate the individual contributions to performance from feature selection and LMNN classification. Feature selection helped significantly on the mnist-back-image data set, but only slightly on the mnist-backrandom data set. Finally, LMNN classification in the output layer yielded consistent improvements over basic kNN classification provided that we used the energy-based decision rule [15]. 4 Discussion In this paper, we have developed a new family of kernel functions that mimic the computation in large, multilayer neural nets. On challenging data sets, we have obtained results that outperform previous SVMs and compare favorably to deep belief nets. More significantly, our experiments validate the basic intuitions behind deep learning in the altogether different context of kernel-based architectures. A similar validation was provided by recent work on kernel methods for semi-supervised embedding [7]. We hope that our results inspire more work on kernel methods for deep learning. There are many possible directions for future work. For SVMs, we are currently experimenting with arc-cosine kernel functions of fractional and (even negative) degree n. For MKMs, we are hoping to explore better schemes for feature selection [21, 22] and kernel selection [23]. Also, it would be desirable to incorporate prior knowledge, such as the invariances modeled by convolutional neural nets [24, 4], though it is not obvious how to do so. These issues and others are left for future work. A Derivation of kernel function In this appendix, we show how to evaluate the multidimensional integral in eq. (1) for the arc-cosine kernel. Let θ denote the angle between the inputs x and y. Without loss of generality, we can take x to lie along the w1 axis and y to lie in the w1w2-plane. Integrating out the orthogonal coordinates of the weight vector w, we obtain the result in eq. (3) where Jn(θ) is the remaining integral: Jn(θ) = Z dw1 dw2 e−1 2 (w2 1+w2 2) Θ(w1) Θ(w1 cos θ + w2 sin θ) wn 1 (w1 cos θ + w2 sin θ)n. (14) Changing variables to u=w1 and v = w1 cos θ+w2 sin θ, we simplify the domain of integration to the first quadrant of the uv-plane: Jn(θ) = 1 sin θ Z ∞ 0 du Z ∞ 0 dv e−(u2+v2−2uv cos θ)/(2 sin2 θ) unvn. (15) The prefactor of (sin θ)−1 in eq. (15) is due to the Jacobian. To simplify the integral further, we adopt polar coordinates u = r cos( ψ 2 + π 4 ) and v = r sin( ψ 2 + π 4 ). Then, integrating out the radius coordinate r, we obtain: Jn(θ) = n! (sin θ)2n+1 Z π 2 0 dψ cosn ψ (1 −cos θ cos ψ)n+1 . (16) To evaluate eq. (16), we first consider the special case n=0. The following result can be derived by contour integration in the complex plane [25]: Z π/2 0 dψ 1 −cos θ cos ψ = π −θ sin θ . (17) Substituting eq. (17) into our expression for the angular part of the kernel function in eq. (16), we recover our earlier claim that J0(θ) = π −θ. Related integrals for the special case n = 0 can also be found in earlier work [8].For the case n>0, the integral in eq. (16) can be performed by the method of differentiating under the integral sign. In particular, we note that: Z π 2 0 dψ cosn ψ (1 −cos θ cos ψ)n+1 = 1 n! ∂n ∂(cos θ)n Z π/2 0 dψ 1 −cos θ cos ψ . (18) Substituting eq. (18) into eq. (16), then appealing to the previous result in eq. (17), we recover the expression for Jn(θ) in eq. (4). 8 References [1] Y. Bengio and Y. LeCun. Scaling learning algorithms towards AI. MIT Press, 2007. [2] G.E. Hinton, S. Osindero, and Y.W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [3] G.E. Hinton and R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, July 2006. [4] M.A. Ranzato, F.J. Huang, Y.L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Proceedings of the 2007 IEEE Conference on Computer Vision and Pattern Recognition (CVPR-07), pages 1–8, 2007. [5] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks with multitask learning. In Proceedings of the 25th International Conference on Machine Learning (ICML-08), pages 160–167, 2008. [6] Y. Bengio. Learning deep architectures for AI. Foundations and Trends in Machine Learning, to appear, 2009. [7] J. Weston, F. Ratle, and R. Collobert. Deep learning via semi-supervised embedding. In Proceedings of the 25th International Conference on Machine Learning (ICML-08), pages 1168–1175, 2008. [8] C.K.I. Williams. Computation with infinite neural networks. Neural Computation, 10(5):1203–1216, 1998. [9] R.H.R. Hahnloser, H.S. Seung, and J.J. Slotine. Permitted and forbidden sets in symmetric thresholdlinear networks. Neural Computation, 15(3):621–638, 2003. [10] R.M. Neal. Bayesian Learning for Neural Networks. Springer-Verlag New York, Inc., 1996. [11] H. Larochelle, D. Erhan, A. Courville, J. Bergstra, and Y. Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In Proceedings of the 24th International Conference on Machine Learning (ICML-07), pages 473–480, 2007. [12] 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. [13] B. Sch¨olkopf, A. Smola, and K. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computation, 10(5):1299–1319, 1998. [14] I. Guyon and A. Elisseeff. An introduction to variable and feature selection. Journal of Machine Learning Research, 3:1157–1182, 2003. [15] K.Q. Weinberger and L.K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. [16] B. Sch¨olkopf, A. J. Smola, and K.-R. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Technical Report 44, Max-Planck-Institut f¨ur biologische Kybernetik, 1996. [17] J. Goldberger, S. Roweis, G.E. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In L.K. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems 17, pages 513–520. MIT Press, 2005. [18] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 153–160. MIT Press, 2007. [19] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In Proceedings of the 2005 IEEE Conference on Computer Vision and Pattern Recognition (CVPR-05), pages 539–546, 2005. [20] Y. LeCun and C. Cortes. The MNIST database of handwritten digits. http://yann.lecun.com/ exdb/mnist/. [21] M. Tipping. Sparse kernel principal component analysis. In Advances in Neural Information Processing Systems 13. MIT Press, 2001. [22] A.J. Smola, O.L. Mangasarian, and B. Sch¨olkopf. Sparse kernel feature analysis. Technical Report 99-04, University of Wisconsin, Data Mining Institute, Madison, 1999. [23] G. Lanckriet, N. Cristianini, P. Bartlett, L.E. Ghaoui, and M.I. Jordan. Learning the kernel matrix with semidefinite programming. Journal of Machine Learning Research, 5:27–72, 2004. [24] Y. LeCun, B. Boser, J.S. Denker, D. Henderson, R.E. Howard, W. Hubbard, and L.D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541–551, 1989. [25] G.F. Carrier, M. Krook, and C.E. Pearson. Functions of a Complex Variable: Theory and Technique. Society for Industrial and Applied Mathematics, 2005. 9
2009
92
3,846
Optimal context separation of spiking haptic signals by second-order somatosensory neurons Romain Brasselet CNRS - UPMC Univ Paris 6, UMR 7102 F 75005, Paris, France romain.brasselet@upmc.fr Roland S. Johansson UMEA Univ, Dept Integr Medical Biology SE-901 87 Umea, Sweden roland.s.johansson@physiol.umu.se Angelo Arleo CNRS - UPMC Univ Paris 6, UMR 7102 F 75005, Paris, France angelo.arleo@upmc.fr Abstract We study an encoding/decoding mechanism accounting for the relative spike timing of the signals propagating from peripheral nerve fibers to second-order somatosensory neurons in the cuneate nucleus (CN). The CN is modeled as a population of spiking neurons receiving as inputs the spatiotemporal responses of real mechanoreceptors obtained via microneurography recordings in humans. The efficiency of the haptic discrimination process is quantified by a novel definition of entropy that takes into full account the metrical properties of the spike train space. This measure proves to be a suitable decoding scheme for generalizing the classical Shannon entropy to spike-based neural codes. It permits an assessment of neurotransmission in the presence of a large output space (i.e. hundreds of spike trains) with 1 ms temporal precision. It is shown that the CN population code performs a complete discrimination of 81 distinct stimuli already within 35 ms of the first afferent spike, whereas a partial discrimination (80% of the maximum information transmission) is possible as rapidly as 15 ms. This study suggests that the CN may not constitute a mere synaptic relay along the somatosensory pathway but, rather, it may convey optimal contextual accounts (in terms of fast and reliable information transfer) of peripheral tactile inputs to downstream structures of the central nervous system. 1 Introduction During haptic exploration tasks, forces are applied to the skin of the hand, and in particular to the fingertips, which constitute the most sensitive parts of the hand and are prominently involved in object manipulation/recognition tasks. Due to the visco-elastic properties of the skin, forces applied to the fingertips generate complex non-linear deformation dynamics, which makes it difficult to predict how these forces can be transduced into percepts by the somatosensory system. Mechanoreceptors innervate the epidermis and respond to the mechanical indentations and deformations of the skin. They send direct projections to the spinal cord and to the cuneate nucleus (CN), which constitutes an important synaptic relay of the ascending somatosensory pathway. The CN projects to several areas of the central nervous system (CNS), including the cerebellum and the thalamic ventrolateral posterior nucleus, which in turn projects to the primary somatosensory cortex. The main objective of this study is to investigate the role of the CN in mediating optimal feed-forward encoding/decoding of somatosensory information. 1 Peripheral nerve fibers thalamus cerebellum Fingertip mechanoreceptors 2nd order neurones Cuneate Nucleus (CNS) (Brainstem) First-spike waves stimulus A stimulus B number of afferents 0 50 100 0 16 Conduction velocity (m/s) Figure 1: Overview of the ascending pathway from primary tactile receptors of the fingertip to 2nd order somatosensory neurons in the cuneate nucleus of the brainstem. Recent microneurography studies in humans [9] suggest that the relative timing of impulses from ensembles of mechanoreceptor afferents can convey information about contact parameters faster than the fastest possible rate code, and fast enough to account for the use of tactile signals in natural manipulation. Even under the most favorable conditions, discrimination based on firing rates takes on average 15 to 20 ms longer than discrimination based on first spike latency [9, 10]. Estimates of how early the sequence in which afferents are recruited conveys information needed for the discrimination of contact parameters indicate that, among mechanoreceptors, the FA-I population provides the fastest reliable discrimination of both surface curvature and force direction. Reliable discrimination can take place after as few as some five FA-I afferents are recruited, which can occur a few milliseconds after the first impulse in the population response [10]. Encoding and decoding of sensory information based on the timing of neural discharges, rather than (or in addition to) their rate, has received increasing attention in the past decade [7, 22]. In particular, the high information content in the timing of the first spikes in ensembles of central neurons has been emphasized in several sensory modalities, including the auditory [3, 16], visual [4, 6], and somatosensory [17] systems. If relative spike timing is fundamental for rapid encoding and transfer of tactile events in manipulation, then how do neurons read out information carried by a temporal code? Various decoding schemes have been proposed to discriminate between different spatiotemporal sequences of incoming spike patterns [8, 13, 1, 7]. Here, we investigate an encoding/decoding mechanism accounting for the relative spike timing of signals propagating from primary tactile afferents to 2nd order neurons in the CN (Fig. 1). The population coding properties of a model CN network are studied by employing as peripheral signals the responses of real mechanoreceptors obtained via microneurography recordings in humans. We focus on the first spike of each mechanoreceptor, according to the hypothesis that the variability in the first-spike latency domain with respect to stimulus feature (e.g. the direction of the force) is larger than the variability within repetitions of the same stimulus [9]. Thus, each tactile stimulus consists of a single volley of spikes (black and gray waves in Fig. 1) forming a spatiotemporal response pattern defined by the first-spike latencies across the afferent population (Fig. S1). 2 Methods 2.1 Human microneurography data In order to investigate fast encoding/decoding mechanisms of haptic signals, we concentrate on the responses of FA-I mechanoreceptors only [9]. The stimulus state space is defined according to a set of four primary contact parameters: 2 • the curvature of the probe (C = {0, 100, 200} m−1, |C| = 3), • the magnitude of the applied force (F = {1, 2, 4}N, |F| = 3), • the direction of the force (O = {Ulnar, Radial, Distal, Proximal, Normal}, |D| = 5), • the angle of the force relative to the normal direction (A = {5, 10, 20}◦, |A| = 3). In total, we consider the responses of 42 FA-I mechanoreceptors to 81 distinct stimuli. The propagation velocity distribution across the set of primary projections onto 2nd order CN neurons is considered by fitting experimental observations [11, 21] (see Fig. 1, upper-left inset). Each primary afferent is assigned a conduction speed equal to the mean of the experimental distribution. An average peripheral nerve length of 1 m (from the fingertip to the CN) is then taken to compute the corresponding conduction delay. 2.2 Cuneate nucleus model and synaptic plasticity rule Single unit discharges at the CN level are modeled according to the spike-response model (SRM) [5] (see Supporting Material Sec. A.1). The parameters determining the response of the CN single neuron model are set according to in vivo electrophysiological recordings by H. J¨orntell (unpublished data). Fig. 2A shows a sample firing pattern that illustrates the spike timing reliability property [14] of the model CN neuron. We assume that the stochasticity governing the entire mechanoreceptors-CN pathway can be represented by the probability function that determines the electro-responsiveness properties of the SRM. The CN network is modeled as a population of SRM units. The connectivity layout of the mechanoreceptor-to-CN projections is based on neuroanatomical data [12], which suggests an average divergence/convergence ratio of 1700/300. This asymmetric coupling is in favor of a fast feed-forward encoding/decoding process occurring at the CN network level. Based on this divergence/convergence data, and given that there are around 2000 mechanoreceptors at each fingertip (and that the CN is somatotopically organized at least to the precision of the finger), there must exist around 12000 CN neurons coding for the tactile information coming from each fingertip. These data suggest a probability of connection between a mechanoreceptor and a CN cell of 0.15. In order to test the hypothesis of a purely feed-forward information transfer at the CN level, no collateral projections between CN neurons are considered in the current version of the model. We put forth the hypothesis that the efficacy of the mechanoreceptor-CN synapses is regulated according to spike-timing-dependent plasticity (STDP, [1, 15]). In particular, we employ a STDP rule specifically developed for the SRM [20]. This learning rule optimizes the information transmission property of a single SRM neuron, accounts for coincidence detection across multiple afferents and provides a biologically-plausible principle that generalizes the Bienenstock-Cooper-Munro (BCM) rule [2] for spiking neurons. In order to focus on the first spike latencies of the mechanoreceptor signals, we adapt the learning rule developed by Toyoizumi et al. 2005 [20] to very short transient stimuli, and we apply it to maximize the information transfer at the level of the CN neural population. See Supporting Material Sec. A.2 for details on the learning rule. The weights of mechanoreceptorCN synapses are initialized randomly between 0 and 1 according to a uniform distribution. The training phase consists of 200 presentations of the sequence of 81 stimuli. 2.3 Metrical information transfer measure An information-theoretical approach is employed to assess the efficiency of the haptic discrimination process. Classical literature solutions based on Shannon’s mutual information (MI) [19] consist of using either a binning procedure (which reduces the response space and relaxes the temporal constraint) or a clustering method (e.g. k-nearest neighbors based on spike-train metrics) coupled to a confusion matrix to estimate a lower bound on MI. Yet, none of these techniques allows the information transmission to be assessed by taking into full account the metrics of the spike response space. Furthermore, a decoding scheme accounting for precise temporal discrimination while maintaining the combinatorial properties of the output space within suitable boundaries – even in the presence of hundreds of CN spike trains – is needed. A novel definition of entropy is set forth to provide a suitable measure for the encoding/decoding of spiking signals, and to quantify the information transmission in the presence of large populations of 3 0 25 PSTH 20 40 60 80 100 120 140 160 180 200 0 25 Time (ms) Trials Input 40 60 80 100 120 140 160 180 0 10 20 30 40 50 60 70 80 DVP Time (ms) Dcritic inter-stimuli distance intra-stimuli distance 20 40 60 0 10 20 30 40 50 60 70 DVP interstimuli dist intrastimuli dist Dcritic A B Figure 2: (A) Example of discharge patterns of a model CN neuron evoked by a constant depolarizing current (bottom). Responses are shown as a raster plot of spike times during 25 trials (center), and as the corresponding PSTH (top). (B) Example of intra- and inter-stimulus distances DV P (red and blue curves, respectively) over time for a VP cost parameter CV P = 0.15. The optimal discrimination condition is met after about 110 ms, when the distribution of intra- and inter-stimulus distances (right plot) stop overlapping. Fig. S2 in the Supporting Material shows an example of two distance distributions that never become disjoint (i.e. perfect discrimination never occurs). spike trains with a 1 ms temporal precision. The following definition of entropy is taken: H∗(R) = − X r∈R 1 |R| log X r′∈R < r|r′ > |R| (1) where R is the set of responses elicited by all the stimuli, |R| is the cardinal of R, and < r|r′ > is a similarity measure between any two responses r and r′. The similarity measure < r|r′ > depends on Victor-Purpura (VP) spike train metrics [23] (see below). It is worth noting that, in contrast to the Shannon definition of entropy, in which the sum is over different response clusters, here the sum is over all the |R| responses, no matter if they are identical or different (i.e. cluster-less entropy definition). Also, the similarity measure < r|r′ > allows the computation of the probability of getting a given response (i.e. p(r|s)) to be avoided, which usually implies to group responses in clusters. These aspects make H∗(R) suitable to take into account the metric properties of the responses. Notice that if the similarity measure were defined as < r|r′ >= δ(r, r′) (with δ being the Dirac function), then H∗(R) would be exactly the same as the Shannon entropy. The conditional entropy is then taken as: H∗(R|S) = X s∈S p(s)H∗(R|s) = − X s∈S p(s) X r∈Rs 1 |Rs| log X r′∈Rs < r|r′ > |Rs| (2) where Rs is the set of responses elicited by the stimulus s. Finally, the metrical information measure is given by: I∗(R; S) = H∗(R) −H∗(R|S) (3) The similarity measure < r|r′ > is defined as a function of the VP distance DV P (r, r′) between two population responses r and r′. The distance DV P (r, r′) depends on the VP cost parameter CV P [23], which determines the time scale of the analysis by regulating the influence of spike timing vs. spike count when calculating the distance between r and r′. There is an infinite number of ways to obtain a scalar product from a distance. We take a very simple one, defined as: < r|r′ >= 1 ⇐⇒DV P (r, r′) < Dcritic (4) 4 where the critical distance Dcritic is a free parameter. According to Eq. 4, whenever DV P (r, r′) < Dcritic the responses r, r′ are considered to be identical, otherwise they are classified as different. If Dcritic = 0 one recovers the Shannon entropy from Eq. 1. In order to determine the optimal value for Dcritic, we consider two sets of VP distances: • the intra-stimulus distances DV P (r(s), r′(s)) between responses r, r′ elicited by the same stimulus s; • the inter-stimulus distances DV P (r(s), r′(s′′)) between responses r, r′ elicited by two different stimuli s, s′′. Then, we compute the minimum and maximum intra-stimulus distances as well as the minimum and maximum inter-stimulus distances. The optimal coding condition, corresponding to maximum I∗(R; S) and zero H∗(R|S), occurs when the maximum intra-stimulus distance becomes smaller than the minimum inter-stimulus distance. In the case of spike train neurotransmission, the relationship between intra- and inter-stimulus distance distributions tends to evolve over time, as the input spike wave across multiple afferents flows in. Fig. 2B shows an example of intra- and inter-stimulus distance distributions evolving over time. The two distributions separate from each other after about 110 ms. The critical parameter Dcritic can then be taken as the distance at which the maximum intra-stimulus distance becomes smaller than the minimum inter-stimulus distance (dashed line in Fig. 2B). The time at which the critical distance Dcritic can be determined (i.e. the time at which the two distributions stop overlapping) indicates when the perfect discrimination condition is reached (i.e. maximum I∗(R; S) and zero H∗(R|S)). To summarize, perfect discrimination calls upon the following rule: • if all intra-stimulus distances are smaller than the critical distance Dcritic, then all the responses elicited by any stimulus are considered identical. The conditional entropy H∗(R|S) is therefore nil. • if all inter-stimulus distances are greater than Dcritic, then two responses elicited by two different stimuli are always discriminated. The information I∗(R; S) is therefore maximum. As aforementioned, the critical distance Dcritic is interdependent on the VP cost parameter CV P [23]. We define the optimum VP cost C∗ V P as the one that leads to earliest perfect discrimination (in the example of Fig. 2B, a cost CV P = 0.15 leads to perfect discrimination after 110 ms). 3 Results 3.1 Decoding of spiking haptic signals upstream from the cuneate nucleus First, we validate the information theoretical analysis described above to decode a limited set of microneurography data upstream from the CN network [18]. Only the 5 force directions (ulnar, radial, distal, proximal, normal) are considered as variable primary features [9]. Each of the 5 stimuli is presented 100 times, and the VP distances DV P are computed across the population of 42 mechanoreceptor afferents. Fig. 3A shows that the critical distance Dcritic = 8 can be set 72 ms after the stimulus onset. As shown in Fig. 3B, that ensures that the perfect discrimination condition is met within 30 ms of the first mechanoreceptor discharge. Fig. 3C displays two samples of distance matrices indicating how the input spike waves across the 42 mechanoreceptor afferents are clustered by the decoding system over time. Before the occurrence of the perfect discrimination condition (left matrix) different stimuli can have relatively small distances (e.g. P and N force directions), which means that some interferences are affecting the decoding process. After 72 ms (right matrix), all the initially overlapping contexts become pulled apart, which removes all interferences across inputs and leads to a 100% accuracy in the discrimination process. 3.2 Optimal haptic context separation downstream from the cuneate nucleus Second, the entire set of microneurography recordings (81 stimuli) is employed to analyze the information transmission properties of a network of 50 CN neurons in the presence of synaptic plasticity 5 40 50 70 90 100 110 120 0 5 10 15 20 25 30 35 40 time (ms) D VP D =8 critic intra-stimulus distance inter-stimulus distance first input spike time 60 80 0 100 200 300 400 500 0 100 200 300 400 500 1 5 9 N R D U P N R D U P 0 100 200 300 400 500 0 100 200 300 400 500 5 10 15 20 N R D U P N R D U P 40 50 60 70 80 90 100 110 120 time (ms) Information (bits) I*(R;S) H*(R|S) 0.5 0 1 1.5 2 2.5 first input spike time ~30 ms B A B C I* = 100% H* = 0 Figure 3: Discrimination capacity upstream from the CN for a set of 5 stimuli (obtained by varying the orientation parameter only) presented 100 times each. (A) Intra- and inter-stimulus distances over time for a VP cost parameter CV P = 0.15. The perfect discrimination condition is met 72 ms after the stimulus onset and 30 ms after the arrival of the first spike. (B) Metrical information and conditional entropy obtained with Dcritic = 8. (C) Distance matrices before and after the occurrence of perfect discrimination. (i.e. LTP/LTD based on the learning rule detailed in Sec. A.2). To compute I∗(R; S), the VP distances DV P (r, r′) between any two CN population responses r, r′ are considered. Again, the distance Dcritic is used to identify the perfect discrimination condition, and the VP cost parameter C∗ V P = 0.1 yielding the fastest perfect discrimination is selected. Fig. 4A shows that the CN population achieves optimal context separation within 35 ms of the arrival of the first afferent spikes. Selecting the optimal value of the critical distance, as done for Fig. 4A, corresponds to the situation in which a readout system downstream from the CN would need a complete separation of haptic percepts (e.g. for highly precise feature recognition). Relaxing this optimality constraint (e.g. to the extent of very rapid, though less precise, reactions) can further speed up the discrimination process. For instance, Fig. 4B indicates that setting Dcritic to a suboptimal value would lead to a partial discrimination condition in which 80% of the maximum I∗(R; S) (with non-zero H∗(R|S)) can be achieved within 15 ms of the arrival of the first pre-synaptic spike. Figs. 4C-D illustrate the distributions of intra- and inter-stimulus distances 100 ms after stimulus onset before and after learning. It is shown that while the distributions are well-separated after learning, they are still largely overlapping before training (implying the impossibility of perfect discrimination). It is also interesting to note that after (resp. before) learning the CN fired on average n=217 (resp. 39) spikes, and that the maximum intra-stimulus distance was about Dmax V P =14 (resp. 45). The average uncertainty on the timing of a single spike can be expressed by ∆t = Dmax V P / CV P n. Since CV P = 0.1, ∆t = 0.6 ms after learning and ∼12 ms before. This shows that the plasticity rule helped to reduce the jitter on CN spikes, thus reducing the metrical conditional entropy compared to the pre-learning condition. Fig. 4E suggests that the plasticity rule leads to stable weight distributions that are invariant with respect to initial random conditions (uniform distribution between [0, 1]). After learning, the synaptic 6 0 1 0 6 synaptic weight log 10 (# synapses) 0 100 0 4 x 10 4 DVP Count 0 250 0 2.2x 10 5 A B C 40 50 60 70 90 100 0 1 2 3 4 5 6 7 40 50 70 80 90 100 0 1 2 3 4 5 6 7 time (ms) Information (bits) I*(R;S) H*(R|S) Information (bits) time (ms) I*(R;S) H*(R|S) first input spike time ~35 ms 80 first input spike time ~15 ms 60 I* = 80% I* = 100% H* = 0 D E DVP Count H* > 0 Figure 4: Information I∗(R; S) and conditional entropy H∗(R|S) over time. The CN population consists of 50 cells. The 81 tactile stimuli are presented 100 times each. (A) Optimal discrimination is reached 35 ms after the first afferent spike. (B) If the perfect discrimination constraint is relaxed by reducing the critical distance, then the system can perform partial discrimination –i.e 80% of maximum I∗(R; S) and non-zero H∗(R|S)– already within 15 ms of the first spike time. (C-D) Distributions of intra- and inter-stimulus distances (computed 100 ms after stimulus onset) before and after training, respectively. (E) Distribution of CN synaptic weights after learning. In this example, a network of 10000 cuneate neurons has been trained. efficacies of the mechanoreceptor-to-CN projections converge towards a bimodal distribution with one peak close to zero and the other peak close to the maximum weight. Finally, Sec. A.3 and Fig. S3 report some supplementary results obtained by using a classical STDP rule [1, 15] –rather than the learning rule described in Secs. 2.2 and A.2– to train the CN network. 3.3 How does the size of the cuneate nucleus network influence discrimination? An additional analysis was performed to study the relationship between the size of the CN population and the optimality of the encoding/decoding process. This analysis reveals that a lower bound on the number of CN neurons exists in order to perform optimal (i.e. both very rapid and reliable) discrimination of the 81 microneurography spike trains. As shown in Fig. 5, the perfect discrimination condition cannot be met with a population of less than 50 CN neurons. This result corroborates the hypothesis that a spatiotemporal population code is a necessary condition for performing effective context separation of complex spiking signals [3, 6]. By increasing the number of neurons, the discrimination becomes faster and saturates at 72 ms (which corresponds to the time at which the first spike from the slowest volley of pulses arrives at the CN). It is also shown that the number of spikes emitted on average by CN cells under the optimal discrimination condition decreases from 2.1 to 1.3 with the size of the CN population, supporting the idea that one spike per neuron is enough to convey a significant amount of information. 7 200 500 1000 2000 70 75 80 85 Time (ms) CN population size 72 50 2.1 1.3 Figure 5: Time necessary to perfectly discriminate the entire set of 81 stimuli as a function of the size of the CN population. Each stimulus is presented 100 times. The numbers of spikes emitted on average by each CN neuron when optimal discrimination occurs are also indicated in the diagram. 4 Discussion This study focuses on how a population of 2nd order somatosensory neurons in the cuneate nucleus (CN) can encode incoming spike trains –obtained via microneurography recordings in humans– by separating them in an abstract metrical space. The main contribution is the prediction concerning a significant role of the CN in conveying optimal contextual accounts of peripheral tactile inputs to downstream structures of the CNS. It is shown that an encoding/decoding mechanism based on relative spike timing can account for rapid and reliable transmission of tactile information at the level of the CN. In addition, it is emphasized that the variability of the CN conditioned responses to tactile stimuli constitutes a fundamental measure when examining neurotransmission at this stage of the ascending somatosensory pathway. More generally, the number of responses elicited by a stimulus is a critical issue when information has to be transferred through multiple synaptic relays. If a single stimulus can possibly elicit millions of different responses on a neural layer, how can this plethora of data be effectively decoded by downstream networks? Thus, neural information processing requires encoding mechanisms capable of producing as few responses as possible to a given stimulus while keeping these responses different between stimuli. A corollary contribution of this work consists in putting forth a novel definition of entropy, H∗(R), to assess neurotransmission in the presence of large spike train spaces and with high temporal precision. An information theoretical analysis –based on this novel definition of entropy– is used to measure the ability of CN network to perform haptic context discrimination. The optimality condition corresponds to maximum information I∗(R; S) and (simultaneously) minimum conditional entropy H∗(R|S) (which quantifies the variability of the CN conditioned responses). Finally, the proposed information theoretical measure accounts for the metrical properties of the response space explicitly and estimates the optimality of the encoding/decoding process based on its context separation capability (which minimizes destructive interference over learning and maximizes memory capacity). The method does not call upon an a priori decoding analysis to build predefined response clusters (e.g. as the confusion matrix method does to compute conditional probabilities and then Shannon MI). Rather, the evaluation of the clustering process is embedded in the entropy measure and, when the condition of optimal discrimination is reached, the existence of well-defined clusters is ensured. Acknowledgments. Granted by the EC Project SENSOPAC, IST-027819-IP. 8 References [1] G. Bi and M. Poo. Distributed synaptic modification in neural networks induced by patterned stimulation. Nature, 401:792–796, 1999. [2] E. Bienenstock, L. Cooper, and P. Munro. Theory for the development of neuron selectivity: orientation specificity and binocular interaction in visual cortex. J Neurosci, 2:32–48, 1982. [3] S. Furukawa, L. Xu, and J.C. Middlebrooks. Coding of sound-source location by ensembles of cortical neurons. J Neurosci, 20:1216–1228, 2000. [4] T.J. Gawne, T.W. Kjaer, and B.J. Richmond. Latency: another potential code for featurebinding in the striate cortex. J Neurophysiol, 76:1356–1360, 1996. [5] W. Gerstner and W. Kistler. Spiking Neuron Models. Cambridge University Press, 2002. [6] T. Gollisch and M. Meister. Rapid neural coding in the retina with relative spike latencies. Science, 319:1108–1111, 2008. [7] P. Heil. First-spike latency of auditory neurons revisited. Curr Opin Neurobiol, 14:461–467, 2004. [8] J.J. Hopfield. Pattern recognition computation using action potential timing for stimulus representation. Nature, 376:33–36, 1995. [9] R.S. Johansson and I. Birznieks. First spikes in ensembles of human tactile afferents code complex spatial fingertip events. Nat Neurosci, 7:170 – 177, 2004. [10] R.S. Johansson and J.R. Flanagan. Coding and use of tactile signals from the fingertips in object manipulation tasks. Nat Rev Neurosci, 10:345–359, 2009. [11] R.S. Johansson and A. Vallbo. Tactile sensory coding in the glabrous skin of the human hand. Trends Neurosci, 6:27–32, 1983. [12] E. Jones. Cortical and subcortical contributions to activity-dependent plasticity in primate somatosensory cortex. Annu Rev Neurosci, 23:1–37, 2000. [13] P. Koenig, A.K. Engel, and W. Singer. Integrator or coincidence detector? The role of the cortical neuron revisited. Trends Neurosci, 19:130–137, 1996. [14] Z.F. Mainen and T.J. Sejnowski. Reliability of spike timing in neocortical neurons. Science, 268:1503–1506, 1995. [15] H. Markram, J. Luebke, M. Frotscher, and B. Sakmann. Regulation of synaptic efficacy by coincidence of postsynaptic APs and EPSPs. Science, 275:213–215, 1997. [16] I. Nelken, G. Chechik, T.D. Mrsic-Flogel, A.J. King, and J.W. Schnupp. Encoding stimulus information by spike numbers and mean response time in primary auditory cortex. J Comput Neurosci, 19:199–221, 2005. [17] S. Panzeri, R.S. Petersen, S.R Schultz, M. Lebedev, and M.E. Diamond. The role of spike timing in the coding of stimulus location in rat somatosensory cortex. Neuron, 29:769–777, 2001. [18] H.P. Saal, S. Vijayakumar, and R.S. Johansson. Information about complex fingertip parameters in individual human tactile afferent neurons. J Neurosci, 29:8022–8031, 2009. [19] C.E. Shannon. A mathematical theory of communication. Bell Sys Tech J, 27:379–423, 1948. [20] T. Toyoizumi, J.-P. Pfister, K. Aihara, and W. Gerstner. Generalized Bienenstock-CooperMunro rule for spiking neurons that maximizes information transmission. Proc Natl Acad Sci U S A, 102(14):5239–5244, 2005. [21] A. Vallbo and R.S. Johansson. Properties of cutaneous mechanoreceptors in the human hand related to touch sensation. Hum Neurobiol, 3:3–14, 1984. [22] R. VanRullen, R. Guyonneau, and S.J. Thorpe. Spike time make sense. Trends Neurosci, 28:1–4, 2005. [23] J.D. Victor and K.P. Purpura. Nature and precision of temporal coding in visual cortex: a metric-space analysis. J Neurophysiol, Vol 76:1310–1326, 1996. 9
2009
93
3,847
Heterogeneous Multitask Learning with Joint Sparsity Constraints Xiaolin Yang Department of Statistics Carnegie Mellon University Pittsburgh, PA 15213 xyang@stat.cmu.edu Seyoung Kim Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 sssykim@cs.cmu.edu Eric P. Xing Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 epxing@cs.cmu.edu Abstract Multitask learning addresses the problem of learning related tasks that presumably share some commonalities on their input-output mapping functions. Previous approaches to multitask learning usually deal with homogeneous tasks, such as purely regression tasks, or entirely classification tasks. In this paper, we consider the problem of learning multiple related tasks of predicting both continuous and discrete outputs from a common set of input variables that lie in a highdimensional feature space. All of the tasks are related in the sense that they share the same set of relevant input variables, but the amount of influence of each input on different outputs may vary. We formulate this problem as a combination of linear regressions and logistic regressions, and model the joint sparsity as L1/L∞or L1/L2 norm of the model parameters. Among several possible applications, our approach addresses an important open problem in genetic association mapping, where the goal is to discover genetic markers that influence multiple correlated traits jointly. In our experiments, we demonstrate our method in this setting, using simulated and clinical asthma datasets, and we show that our method can effectively recover the relevant inputs with respect to all of the tasks. 1 Introduction In multitask learning, one is interested in learning a set of related models for predicting multiple (possibly) related outputs (i.e., tasks) given a set of input variables [4]. In many applications, the multiple tasks share a common input space, but have different functional mappings to different output variables corresponding to different tasks. When the tasks and their corresponding models are believed to be related, it is desirable to learn all of the models jointly rather than treating each task as independent of each other and fitting each model separately. Such a learning strategy that allows us to borrow information across tasks can potentially increase the predictive power of the learned models. Depending on the type of information shared among the tasks, a number of different algorithms have been proposed. For example, hierarchical Bayesian models have been applied when the parameter values themselves are thought to be similar across tasks [2, 14]. A probabilistic method for modeling the latent structure shared across multiple tasks has been proposed [16]. For problems of which the input lies in a high-dimensional space and the goal is to recover the shared sparsity structure across tasks, a regularized regression method has been proposed [10]. In this paper, we consider an interesting and not uncommon scenario of multitask learning, where the tasks are heterogeneous and bear a union support. That is, each task can be either a regression or classification problem, with the inputs lying in a very high-dimensional feature space, but only a small number of the input variables (i.e., predictors) are relevant to each of the output variables (i.e., 1 responses). Furthermore, we assume that all of the related tasks possibly share common relevant predictors, but with varying amount of influence on each task. Previous approaches for multitask learning usually consider a set of homogeneous tasks, such as regressions only, or classifications only. When each of these discrete or continuous prediction tasks is treated separately, given a high-dimensional design, the lasso method that penalizes the loss function with an L1 norm of the parameters has been a popular approach for variable selection [13, 11], since the L1 regularization has the property of shrinking parameters corresponding to irrelevant predictors exactly to zero. One of the successful extensions of the standard lasso is the group lasso that uses an L1/L2 penalty defined over predictor groups [15], instead of just the L1 penalty ubiquitously over all predictors. Recently, a more general L1/Lq-regularized regression scheme with q > 0 has been thoroughly investigated [17]. When the L1/Lq penalty is used in estimating the regression function for a single predictive task, it makes use of information about the grouping of input variables, and applies the L1 penalty over the Lq norm of the regression coefficients for each group of inputs. As a result, variable selection can be effectively achieved on each group rather than on each individual input variable. This type of regularization scheme can be also used against the output variables in a single classification task with multi-way (rather than binary) prediction, where the output is expanded from univariate to multivariate with dummy variables for each prediction category. In this situation the group lasso can promote selecting the same set of relevant predictors across all of the dummy variables (which is desirable since these dummy variables indeed correspond to only a single multi-way output). In our multitask learning problem, when the L1/L2 penalty of group lasso is used for multitask regression [9, 10, 1], the L2 norm is applied to the regression coefficients for each input across all tasks, and the L1 norm is applied to these L2 norms, playing the role of selecting common input variables relevant to one or more tasks via a sparse union support recovery. Since the parameter estimation problem formulated with such penalty terms has a convex objective function, many of the algorithms developed for a general convex optimization problem can be used for solving the learning problem. For example, an interior point method and a preconditioned conjugate gradient algorithm have been used to solve a large-scale L1-regularized linear regression and logistic regression [8]. In [6, 13], a coordinate-descent method was used in solving an L1-regularized linear regression and generalized linear models, where the soft thresholding operator gives a closed-form solution for each coordinate in each iteration. In this paper, we consider the more challenging, but realistic scenario of having heterogenous outputs, i.e., both continuous and discrete responses, in multitask learning. This means that the tasks in question consist of both regression and classification problems. Assuming a linear regression for continuous-valued output and a logistic regression for discrete-valued output with dummy variables for multiple categories, an L1/Lq penalty can be used to learn both types of tasks jointly for a sparse union support recovery. Since the L1/Lq penalty selects the same relevant inputs for all dummy outputs for each classification task, the desired consistency in chosen relevant inputs across the dummy variables corresponding to the same multi-way response is automatically maintained. We consider particular cases of L1/Lq regularizations with q = 2 and q = ∞. Our work is primarily motivated by the problem of genetic association mapping based on genomewide genotype data of single nucleotide polymorphisms (SNPs), and phenotype data such as disease status, clinical traits, and microarray data collected over a large number of individuals. The goal in this study is to identify the SNPs (or inputs) that explain the variation in the phenotypes (or outputs), while reducing false positives in the presence of a large number of irrelevant SNPs from the genomescale data. Since many clinical traits for a given disease are highly correlated, it is greatly beneficial to combine information across multiple such related phenotypes because the inputs often involve millions of SNPs and the association signals of causal (or relevant) SNPs tend to be very weak when computed individually. However, statistically significant patterns can emerge when the joint associations to multiple related traits are estimated properly. Over the recent years, researchers started recognizing the importance of the joint analysis of multiple correlated phenotypes [5, 18], but there has been a lack of statistical tools to systematically perform such analysis. In our previous work [7], we developed a regularized regression method, called a graph-guided fused lasso, for multitask regression problem that takes advantage of the graph structure over tasks to encourage a selection of common inputs across highly correlated traits in the graph. However, this method can only be applied to the restricted case of correlated continuous-valued outputs. In reality, the set of clinical traits related to a disease often contains both continuous- and discrete-valued traits. As we 2 demonstrate in our experiments, the L1/Lq regularization for the joint regression and classification can successfully handle this situation. The paper is organized as follows. In Section 2, we introduce the notation and the basic formulation for joint regression-classification problem, and describe the L1/L∞and L1/L2 regularized regressions for heterogeneous multitask learning in this setting. In Section 3, we formulate the parameter estimation as a convex optimization problem, and present an interior-point method for solving it. Section 4 presents experimental results on simulated and asthma datasets. In Section 5, we conclude with a brief discussion of future work. 2 Joint Multitask Learning of Linear Regressions and Multinomial Logistic Regressions Suppose that we have K tasks of learning a predictive model for the output variable, given a common set of P input variables. In our joint regression-classification setting, we assume that the K tasks consist of Kr tasks with continuous-valued outputs and Kc tasks with discrete-valued outputs of an arbitrary number of categories. For each of the Kr regression problems, we assume a linear relationship between the input vector X of size P and the kth output Yk as follows: Yk = β(r) k0 + Xβ(r) k + ϵ, k = 1, ..., Kr, where β(r) k = (β(r) k1 , . . . , β(r) kP )′ represents a vector of P regression coefficients for the kth regression task, with the superscript (r) indicating that this is a parameter for regression; β(r) k0 represents the intercept; and ϵ denotes the residual. Let yk = (yk1, . . . , ykN)′ represent the vector of observations for the kth output over N samples; and X represent an N × P matrix X = (x1, . . . , xN)′ of the input shared across all of the K tasks, where xi = (xi1, . . . , xiP )′ denotes the ith sample. Given these data, we can estimate the β(r) k ’s by minimizing the sum of squared error: Lr = Kr X k=1 (yk −1β(r) k0 −Xβ(r) k )′ · (yk −1β(r) k0 −Xβ(r) k ), (1) where 1 is an N-vector of 1’s. For the tasks with discrete-valued output, we set up a multinomial (i.e., softmax) logistic regression for each of the Kc tasks, assuming that the kth task has Mk categories: P(Yk = m|X = x) = exp (β(c) k0 + xβ(c) km) 1 + PMk−1 l=1 exp (β(c) k0 + xβ(c) kl ) , for m = 1, . . . , Mk −1, P(Yk = Mk|X = x) = 1 1 + PMk−1 l=1 exp (β(c) k0 + xβ(c) kl ) , (2) where β(c) km = (β(c) km1, . . . , β(c) kmP )′, m = 1, . . . , (Mk −1), is the parameter vector for the mth category of the kth classification task, and β(c) k0 is the intercept. Assuming that the measurements for the Kc output variables are collected for the same set of N samples as in the regression tasks, we expand each output data yki for the kth task of the ith sample into a set of Mk binary variables y′ ki = (yk1i, . . . , ykMki), where each ykmi, m = 1, . . . , Mk, takes value 1 if the ith sample for the kth classification task belongs to the mth category and value 0 otherwise, and thus P m ykmi = 1. Using the observations for the output variable in this representation and the shared input data X, one can estimate the parameters β(c) km’s by minimizing the negative log-likelihood given as below: Lc = − N X i=1 Kc X k=1 Ã Mk−1 X m=1 ykmi(β(c) k0 + P X j=1 xijβ(c) kmj) −log ³ 1 + Mk−1 X m=1 exp (β(c) k0 + P X j=1 xijβ(c) kmj) ´! . (3) 3 In this joint regression-classification problem, we form a global objective function by combining the two empirical loss functions in Equations (1) and (3): L = Lr + Lc. (4) This is equivalent to estimating the β(r) k ’s and β(c) km’s independently for each of the K tasks, assuming that there are no shared patterns in the way that each of the K output variables is dependent on the input variables. Our goal is to increase the performance of variable selection and prediction power by allowing the sharing of information among the heterogeneous tasks. 3 Heterogeneous Multitask Learning with Joint Sparse Feature Selection In real-world applications, often the covariates lie in a very high-dimensional space with only a small fraction of them being involved in determining the output, and the goal is to recover the sparse structure in the predictive model by selecting the true relevant covariates. For example, in a genetic association mapping, often millions of genetic markers over a population of individuals are examined to find associations with the given phenotype such as clinical traits, disease status, or molecular phenotypes. The challenge in this type of study is to locate the true causal SNPs that influence the phenotype. We consider the case where the related tasks share the same sparsity pattern such that they have a common set of relevant input variables for both the regression and classification tasks and the amount of influence of the relevant input variables on the output may vary across the tasks. We introduce an L1/Lq regularization to the problem of the heterogeneous multitask learning in Equation (4) as below: L = Lr + Lc + λPq, (5) where Pq is the group penalty to the sum of linear regression loss and logistic loss, and λ is a regularization parameter which determines the sparsity level and could be chosen by cross validation. We consider two extreme cases of the L1/Lq penalty for group variable selection in our problem which are L∞norm and L2 norm across different tasks in one dimension. P∞= µ P X j=1 max k,m ³ |β(r) kj |, |β(c) kmj| ´¶ or P2 = µ P X j=1 |β(r) j , β(c) j |L2 ´ , (6) where β(r) j , β(c) j are vector of parameters over all regression and classification tasks, respectively, for the jth dimension. Here, the L∞and L2 norms over the parameters across different tasks can regulate the joint sparsity among tasks. The L1/L∞and L1/L2 norms encourage group sparsity in a similar way in that the β(r) kj ’s and β(c) kmj’s are set to 0 simultaneously for all of the tasks for dimension j if the L∞or L2 norm for that dimension is set to be 0. Similarly, if the L1 operator selects a non-zero value for the L∞or L2 norm of the β(r) kj ’s and β(c) kmj’s for the jth input, the same input is considered as relevant possibly to all of the tasks, and the β(r) kj ’s and β(c) kmj’s can have any non-zero values smaller than the maximum or satisfying the L2-norm constraints. The L1/L∞penalty tends to encourage the parameter values to be the same across all tasks for a given input [17], whereas under L1/L2 penalty the values of the parameters across tasks tend to be more different for a given input than in the L1/L∞penalty. 4 Optimization Method Different methods such as gradient descent, steepest descent, Newton’s method and Quasi-Newton method can be used to solve the problem in Equation (5). Although second-order methods have a fast convergence near the global minimum of the convex objective functions, they involve computing a Hessian matrix and inverting it, which can be infeasible in a high-dimensional setting. The coordinate-descent method iteratively updates each element of the parameter vector one at a time, using a closed-form update equation given all of the other elements. However, since it is a first-order method, the speed of convergence becomes slow as the number of tasks and dimension increase. In [8], the truncated Newton’s method that uses a preconditionor and solves the linear system instead of inverting the Hessian matrix has been proposed as a fast optimization method for a very large-scale 4 problem. The linear regression loss and logistic regression loss have different forms. The interior method optimizes their original loss function without any transformation so that it is more intuitive to see how the two heterogeneous tasks affect each other. In this section, we discuss the case of the L1/L∞penalty since the same optimization method can be easily extended to handle the L1/L2 penalty. First, we re-write the problem of minimizing Equation (5) with the nondifferentiable L1/L∞penalty as minimize Lr + Lc + λ P X j=1 uj subject to max k,m ³ |β(r) kj |, |β(c) kmj| ´ < uj, for j = 1, . . . , P, k = 1, . . . , Kr + Kc. (7) Further re-writing the constraints in the above problem, we obtain 2·P · (Kr + PKc k=1(Mk −1)) inequality constraints as follows: −uj < β(r) kj < uj, for k = 1, . . . , Kr, j = 1, . . . , P, −uj < β(c) kmj < uj, for k = 1, . . . , Kc, j = 1, . . . , P, m = 1, . . . , Mk −1. Using the barrier method [3], we re-formulate the objective function in Equation (7) into an unconstrained problem given as LBarrier = Lr + Lc + λ P X j=1 uj + Kr X k=1 P X j=1 ³ I−(−β(c) kj −uj) + I−(β(c) kj −uj) ´ + Kc X k=1 Mk−1 X m=1 P X j=1 I−(−β(c) kmj −uj) + I−(β(c) kmj −uj), where I−(x) = ½ 0 x ≤0 ∞ x > 0 . Then, we apply the log barrier function I−(f(x)) = −(1/t) log(−f(x)), where t is an additional parameter that determines the accuracy of the approximation. Let Θ denote the set of parameters β(r) k ’s and β(c) km’s. Given a strictly feasible Θ, t = t(0) > 0, µ > 1, and tolerance ϵ > 0, we iterate the following steps until convergence. Step 1 Compute Θ∗(t) by minimizing LBarrier, starting at Θ. Step 2 Update: Θ := Θ∗(t) Step 3 Stopping criterion: quit if m/t < ϵ where m is the number of constraint functions. Step 4 Increase t: t := tµ In Step 1, we use the Newton’s method to minimize LBarrier at t. In each iteration, we increase t in Step 4, so that we have a more accurate approximation of I−(u) through I−(f(x)) = −(1/t) log(−f(x)). In Step 1, we find the direction towards the optimal solution using Newton’s method: H " ∆β ∆u # = −g, where ∆β and ∆u are the searching directions of the model parameters and bounding parameters. The g in the above equation is the gradient vector given as g = [g(r), g(c), g(u)]T , where g(r) has Kr components for regression tasks, g(c) has Kc × (Mk −1) components for classification tasks, and H is the Hessian matrix given as: H =   R 0 D(r) 0 L D(c) D(r) D(c) F  , 5 0 0.5 1 −5 0 5 10 λ/max|λ| Parameters 0 0.5 1 −5 0 5 10 λ/max|λ| Parameters 0 0.5 1 −10 −5 0 5 10 λ/max|λ| Parameters 0 0.5 1 −10 −5 0 5 10 λ/max|λ| Parameters (a) (b) (c) (d) Figure 1: The regularization path for L1/L∞-regularized methods. (a) Regression parameters estimated from the heterogeneous task learning method, (b) regression parameters estimated from regression tasks only, (c) logistic-regression parameters estimated from the heterogeneous task learning method, and (d) logistic-regression parameters estimated from classification tasks only. Blue curves: irrelevant inputs; Red curves: relevant inputs. where R and L are second derivatives of the parameters β for regression tasks in the form of R = ∇2Lr + ∇2Pg|∂β(r)∂β(r), L = ∇2Lc + ∇2Pg|∂β(c)∂β(c), D = ∇2Pg|∂β∂u and F = D(r) + D(c). In the overall interior-point method, the process of constructing and inverting Hessian matrix is the most time-consuming part. In order to make the algorithm scalable to a large problem, we use a preconditionor diag(H) of the Hessian matrix H, and apply the preconditioned conjugate-gradient algorithm to compute the searching direction. 5 Experiments We demonstrate our methods for heterogeneous multitask learning with L1/L∞and L1/L2 regularizations on simulated and asthma datasets, and compare their performances with those from solving two types of multitask-learning problems for regressions and classifications separately. 5.1 Simulation Study In the context of genetic association analysis, we simulate the input and output data with known model parameters as follows. We start from the 120 haplotypes of chromosome 7 from the population of European ancestry in HapMap data [12], and randomly mate the haplotypes to generate genotype data for 500 individuals. We randomly select 50 SNPs across the chromosome as inputs. In order to simulate the parameters β(r) k ’s and β(c) km’s, we assume six regression tasks and a single classification task with five categories, and choose five common SNPs from the total of 50 SNPs as relevant covariates across all of the tasks. We fill the non-zero entries in the regression coefficients β(r) k ’s with values uniformly distributed in the interval [a, b] with 5 ≤a, b ≤10, and the non-zero entries in the logistic-regression parameters β(c) km’s such that the five categories are separated in the output space. Given these inputs and the model parameters, we generate the output values, using the noise for regression tasks distributed as N(0, σ2 sim). In the classification task, we expand the single output into five dummy variables representing different categories that take values of 0 or 1 depending on which category each sample belongs to. We repeat this whole process of simulating inputs and outputs to obtain 50 datasets, and report the results averaged over these datasets. The regularization paths of the different multitask-learning methods with an L1/L∞regularization obtained from a single simulated dataset are shown in Figure 1. The results from learning all of the tasks jointly are shown in Figures 1(a) and 1(c) for regression and classification tasks, respectively, whereas the results from learning the two sets of regression and classification tasks separately are shown in Figures 1(b) and 1(d). The red curves indicate the parameters for true relevant inputs, and the blue curves for true irrelevant inputs. We find that when learning both types of tasks jointly, the parameters of the irrelevant inputs are more reliably set to zero along the regularization path than learning the two types of tasks separately. In order to evaluate the performance of the methods, we use two criteria of sensitivity/specificity plotted as receiver operating characteristic (ROC) curves and prediction errors on test data. To obtain ROC curves, we estimate the parameters, sort the input-output pairs according to the magnitude of the estimated β(r) kj ’s and β(c) kmj’s, and compare the sorted list with the list of input-output pairs with true non-zero β(r) kj ’s and β(c) kmj’s. 6 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) (a) (b) (c) (d) Figure 2: ROC curves for detecting true relevant input variables when the sample size N varies. (a) Regression tasks with N = 100, (b) classification tasks with N = 100, (c) regression tasks with N = 200, and (d) classification tasks with N = 200. Noise level N(0,1) was used. The joint regression-classification methods achieve nearly perfect accuracy, and their ROC curves are completely aligned with the axes.‘M’ indicates homogeneous multitask learning, and ‘HM’ heterogenous multitask learning (This notation is the same for the following other figures). Prediction error 0 100 200 300 400 500 600 700 800 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Classification error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Prediction error 0 100 200 300 400 500 600 700 800 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Classification error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) (a) (b) (c) (d) Figure 3: Prediction errors when the sample size N varies. (a) Regression tasks with N=100, (b) classification tasks with N = 100, (c) regression tasks with N = 200, and (d) classification tasks with N = 200. Noise level N(0,1) was used. We vary the sample size to N = 100 and 200, and show the ROC curves for detecting true relevant inputs using different methods in Figure 2. We use σsim = 1 to generate noise in the regression tasks. Results for the regression and classification tasks with N = 100 are shown in Figure 2(a) and (b) respectively, and similarly, the results with N = 200 in Figure 2(c) and (d). The results with L1/L∞penalty are shown with color blue and green to compare the homogeneous and heterogeneous methods. Red and yellow are results using the L1/L2 penalty. Although the performance of learning the two types of tasks separately improves with a larger sample size, the joint estimation performs significantly better for both sample sizes. A similar trend can be seen in the prediction errors for the same simulated datasets in Figure 3. In order to see how different signal-to-noise ratios affect the performance, we vary the noise level to σ2 sim = 5 and σ2 sim = 8, and plot the ROC curves averaged over 50 datasets with a sample size N = 300 in Figure 4. Our results show that for both of the signal-to-noise ratios, learning regression and classification tasks jointly improves the performance significantly. The same observation can be made from the prediction errors in Figure 5. We can see that the L1/L2 method tends to improve the variable selection, but the tradeoff is that the prediction error will be high when the noise level is low. While L1/L∞has a good balance between the variable selection accuracy and prediction error at a lower noise level, as the noise increases, the L1/L2 outperforms L1/L∞in both variable selection and prediction accuracy. 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1−Specificity Sencitivity M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) (a) (b) (c) (d) Figure 4: ROC curves for detecting true relevant input variables when the noise level varies. (a) Regression tasks with noise level N(0, 5), (b) classification tasks with noise level N(0, 5), (c) regression tasks with noise level N(0, 8), and (d) classification tasks with noise level N(0, 8). Sample size N=300 was used. 7 Prediction error 26 28 30 32 34 36 38 40 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Classification error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Prediction error 64 66 68 70 72 74 76 78 80 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) Classification error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 M (L1/L∞) HM (L1/L∞) M (L1/L2) HM (L1/L2) (a) (b) (c) (d) Figure 5: Prediction errors when the noise level varies. (a) Regression tasks with noise level N(0, 52), (b) classification tasks with noise level N(0, 52), (c) regression tasks with noise level N(0, 82), and (d) classification tasks with noise level N(0, 82). Sample size N=300 was used. 10 20 30 2 4 6 8 0 0.2 0.4 0.6 0.8 1 10 20 30 2 4 6 8 0 0.2 0.4 0.6 0.8 1 (a) (b) Figure 6: Parameters estimated from the asthma dataset for discovery of causal SNPs for the correlated phenotypes. (a) Heterogeneous task learning method, and (b) separate analysis of multitask regressions and multitask classifications. The rows represent tasks, and the columns represent SNPs. 5.2 Analysis of Asthma Dataset We apply our method to the asthma dataset with 34 SNPs in the IL4R gene of chromosome 11 and five asthma-related clinical traits collected over 613 patients. The set of traits includes four continuous-valued traits related to lung physiology such as baseline predrug FEV1, maximum FEV1, baseline predrug FVC, and maximum FVC as well as a single discrete-valued trait with five categories. The goal of this analysis is to discover whether any of the SNPs (inputs) are influencing each of the asthma-related traits (outputs). We fit the joint regression-classification method with L1/L∞and L1/L2 regularizations, and compare the results from fitting L1/L∞and L1/L2 regularized methods only for the regression tasks or only for the classification task. We show the estimated parameters for the joint learning with L1/L∞penalty in Figure 6(a) and the separate learning with L1/L∞penalty in Figure 6(b), where the first four rows correspond to the four regression tasks, the next four rows are parameters for the four dummy variables of the classification task, and the columns represent SNPs. We can see that the heterogeneous multitask-learning method encourages to find common causal SNPs for the multiclass classification task and the regression tasks. 6 Conclusions In this paper, we proposed a method for a recovery of union support in heterogeneous multitask learning, where the set of tasks consists of both regressions and classifications. In our experiments with simulated and asthma datasets, we demonstrated that using L1/L2 or L1/L∞regularizations in the joint regression-classification problem improves the performance for identifying the input variables that are commonly relevant to multiple tasks. The sparse union support recovery as was presented in this paper is concerned with finding inputs that influence at least one task. In the real-world problem of association mapping, there is a clustering structure such as co-regulated genes, and it would be interesting to discover SNPs that are causal to at least one of the outputs within the subgroup rather than all of the outputs. In addition, SNPs in a region of chromosome are often correlated with each other because of the non-random recombination process during inheritance, and this correlation structure, called linkage disequilibrium, has been actively investigated. A promising future direction would be to model this complex correlation pattern in both the input and output spaces within our framework. Acknowledgments EPX is supported by grant NSF DBI-0640543, NSF DBI-0546594, NSF IIS-0713379, NIH grant 1R01GM087694, and an Alfred P. Sloan Research Fellowship. 8 References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] B. Bakker and T. Heskes. Task clustering and gating for bayesian multitask learning. Journal of Machine Learning Research, 4:83–99, 2003. [3] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [4] R. Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [5] V. Emilsson, G. Thorleifsson, B. Zhang, A.S. Leonardson, F. Zink, J. Zhu, S. Carlson, A. Helgason, G.B. Walters, S. Gunnarsdottir, et al. Variations in dna elucidate molecular networks that cause disease. Nature, 452(27):423–28, 2008. [6] J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Technical Report 703, Department of Statistics, Stanford University, 2009. [7] S. Kim and E. P. Xing. Statistical estimation of correlated genome associations to a quantitative trait network. PLoS Genetics, 5(8):e1000587, 2009. [8] K. Koh, S. Kim, and S. Boyd. An interior-point method for large-scale l1-regularized logistic regression. Journal of Machine Learning Research, 8(8):1519–1555, 2007. [9] G. Obozinski, B. Taskar, and M. Jordan. Joint covariate selection for grouped classification. Technical Report 743, Department of Statistics, University of California, Berkeley, 2007. [10] G. Obozinski, M.J. Wainwright, and M.J. Jordan. High-dimensional union support recovery in multivariate regression. In Advances in Neural Information Processing Systems 21, 2008. [11] M. Schmidt, G. Fung, and R. Rosales. Fast optimization methods for l1 regularization: a comparative study and two new approaches. In Proceedings of the European Conference on Machine Learning, 2007. [12] The International HapMap Consortium. A haplotype map of the human genome. Nature, 437:1399–1320, 2005. [13] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of Royal Statistical Society, Series B, 58(1):267–288, 1996. [14] K. Yu, V. Tresp, and A. Schwaighofer. Learning gaussian processes from multiple tasks. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [15] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of Royal Statistical Society, Series B, 68(1):49–67, 2006. [16] J. Zhang, Z. Ghahramani, and Y. Yang. Flexible latent variable models for multi-task learning. Machine Learning, 73(3):221–242, 2008. [17] P. Zhao, G. Rocha, and B. Yu. Grouped and hierarchical model selection through composite absolute penalties. Technical Report 703, Department of Statistics, University of California, Berkeley, 2008. [18] J. Zhu, B. Zhang, E.N. Smith, B. Drees, R.B. Brem, L. Kruglyak, R.E. Bumgarner, and E.E. Schadt. Integrating large-scale functional genomic data to dissect the complexity of yeast regulatory networks. Nature Genetics, 40:854–61, 2008. 9
2009
94
3,848
Learning with Compressible Priors Volkan Cevher Rice University volkan@rice.edu Abstract We describe a set of probability distributions, dubbed compressible priors, whose independent and identically distributed (iid) realizations result in p-compressible signals. A signal x ∈RN is called p-compressible with magnitude R if its sorted coefficients exhibit a power-law decay as |x|(i) ≲R · i−d, where the decay rate d is equal to 1/p. p-compressible signals live close to K-sparse signals (K ≪N) in the ℓr-norm (r > p) since their best K-sparse approximation error decreases with O R · K1/r−1/p . We show that the membership of generalized Pareto, Student’s t, log-normal, Fr´echet, and log-logistic distributions to the set of compressible priors depends only on the distribution parameters and is independent of N. In contrast, we demonstrate that the membership of the generalized Gaussian distribution (GGD) depends both on the signal dimension and the GGD parameters: the expected decay rate of N-sample iid realizations from the GGD with the shape parameter q is given by 1/ [q log (N/q)]. As stylized examples, we show via experiments that the wavelet coefficients of natural images are 1.67-compressible whereas their pixel gradients are 0.95 log (N/0.95)-compressible, on the average. We also leverage the connections between compressible priors and sparse signals to develop new iterative re-weighted sparse signal recovery algorithms that outperform the standard ℓ1-norm minimization. Finally, we describe how to learn the hyperparameters of compressible priors in underdetermined regression problems by exploiting the geometry of their order statistics during signal recovery. 1 Introduction Many problems in signal processing, machine learning, and communications can be cast as a linear regression problem where an unknown signal x ∈RN is related to its observations y ∈RM via y = Φx + n. (1) In (1), the observation matrix Φ ∈RM×N is a non-adaptive measurement matrix with random entries in compressive sensing (CS), an over-complete dictionary of features in sparse Bayesian learning (SBL), or a code matrix in communications [1, 2]. The vector n ∈RM usually accounts for physical noise with partially or fully known distribution, or it models bounded perturbations in the measurement matrix or the signal. Because of its theoretical and practical interest, we focus on the instances of (1) where there are more unknowns than equations, i.e., M < N. Hence, determining x from y in (1) is ill-posed: ∀v ∈ kernel (Φ), x+v defines a solution space that produces the same observations y. Prior information is therefore necessary to distinguish the true x among the infinitely many possible solutions. For instance, CS and SBL frameworks assume that the signal x belongs to the set of sparse signals. By sparse, we mean that at most K out of the N signal coefficients are nonzero where K ≪N. CS and SLB algorithms then regularize the solution space by signal priors that promote sparseness and they have been extremely successful in practice in a number of applications even if M ≪N [1–3]. Unfortunately, prior information by itself is not sufficient to recover x from noisy y. Two more key ingredients are required: (i) the observation matrix Φ must stably embed (or encode) the set of signals x into the space of y, and (ii) a tractable decoding algorithm must exist to map y back to x. By stable embedding, we mean that Φ is bi-Lipschitz where the encoding x →Φx is one to one and the inverse mapping ∆= {∆(Φx) →x} is smooth. The bi-Lipschitz property of Φ is crucial to ensure the stability in decoding x by controlling the amount by which perturbations of the 1 observations are amplified [1, 4]. Tractable decoding is important for practical reasons as we have limited time and resources, and it can clearly restrict the class of usable signal priors. In this paper, we describe compressible prior distributions whose independent and identically distributed (iid) realizations result in compressible signals. A signal is compressible when sorted magnitudes of its coefficients exhibit a power-law decay. For certain decay rates, compressible signals live close to the sparse signals, i.e., they can be well-approximated by sparse signals. It is wellknown that the set of K-sparse signals has stable and tractable encoder-decoder pairs (Φ, ∆) for M as small as O(K log (N/K)) [1,5]. Hence, an N-dimensional compressible signal with the proper decay rate inherits the encoder-decoder pairs of its K-sparse approximation for a given approximation error, and can be stably embedded into dimensions logarithmic in N. Compressible priors analytically summarize the set of compressible signals and shed new light on underdetermined linear regression problems by building upon the literature on sparse signal recovery. Our main results are summarized as follows: 1) By using order statistics, we show that the compressibility of the iid realizations of generalized Pareto, Student’s t, Fr´echet, and log-logistics distributions is independent of the signals’ dimension. These distributions are natural members of compressible priors: they truly support logarithmic dimensionality reduction and have important parameter learning guarantees from finite sample sizes. We demonstrate that probabilistic models for the wavelet coefficients of natural images must also be a natural member of compressible priors. 2) We point out a common misconception about the generalized Gaussian distribution (GGD): GGD generates signals that lose their compressibility as N grows. For instance, special cases of the GGD distribution, e.g., Laplacian distribution, are commonly used as sparsity promoting priors in CS and SBL problems where M is assumed to grow logarithmically with N [1–3,6]. We show that signals generated from Laplacian distribution can only be stably embedded into lower dimensions that grow proportional to N. Hence, we identify an inconsistency between the decoding algorithms motivated by the GGD distribution and their sparse solutions. 3) We use compressible priors as a scaffold to build new decoding algorithms based on Bayesian inference arguments. The objective of these algorithms is to approximate the signal realization from a compressible prior as opposed to pragmatically producing sparse solutions. Some of these new algorithms are variants of the popular iterative re-weighting schemes [3,6–8]. We show how the tuning of these algorithms explicitly depends on the compressible prior parameters, and how to learn the parameters of the signal’s compressible prior on the fly while recovering the signal. The paper is organized as follows. Section 2 provides the necessary background on sparse signal recovery. Section 3 mathematically describes the compressible signals and ties them with the order statistics of distributions to introduce compressible priors. Section 4 defines compressible priors, identifies common misconceptions about the GGD distribution, and examines natural images as instances of compressible priors. Section 5 derives new decoding algorithms for underdetermined linear regression problems. Section 6 describes an algorithm for learning the parameters of compressible priors. Section 7 provides simulations results and is followed by our conclusions. 2 Background on Sparse Signals Any signal x ∈RN can be represented in terms of N coefficients αN×1 in a basis ΨN×N via x = Ψα. Signal x has a sparse representation if only K ≪N entries of α are nonzero. To account for sparse signals in an appropriate basis, (1) should be modified as y = Φx + n = ΦΨα + n. Let ΣK denote the set of all K-sparse signals. When Φ in (1) satisfies the so-called restricted isometry property (RIP), it can be shown that ΦΨ defines a bi-Lipschitz embedding of ΣK into RM [1,4,5]. Moreover, RIP implies the recovery of K-sparse signals to within a given error bound, and the best attainable lower bounds for M are related to the Gelfand width of ΣK, which is logarithmic in the signal dimension, i.e., M = O(K log (N/K)) [5]. Without loss of generality, we restrict our attention in the sequel to canonically sparse signals and assume that Ψ = I (the N × N identity matrix) so that x = α. With the sparsity prior and RIP assumptions, inverse maps can be obtained by solving the following convex problems: ∆1(y) = arg min ∥x′∥1 s.t. y = Φx′, ∆2(y) = arg min ∥x′∥1 s.t. ∥y −Φx′∥2 ≤ϵ, ∆3(y) = arg min ∥x′∥1 + τ∥y −Φx′∥2 2, (2) 2 where ϵ and τ are constants, and ∥x∥r ≜(P i |xi|r)1/r. The decoders ∆i (i = 1, 2) are known as basis pursuit (BP) and basis pursuit denoising (BPDN), respectively; and, ∆3 is a scalarization of BPDN [1,9]. They also have the following deterministic worst-case guarantee when Φ has RIP: ∥x −∆(y)∥2 ≤C1 ∥x −xK∥1 √ K + C2∥n∥2, (3) where C1,2 are constants, xK is the best K-term approximation, i.e., xK = arg min∥x′∥0≤K ∥x − x′∥r for r ≥1, and ∥x∥0 is a pseudo-norm that counts the number of nonzeros of x [1, 4, 5]. Note that the error guarantee (3) is adaptive to each given signal x because of the definition of xK. Moreover, the guarantee does not assume that the signal is sparse. 3 Compressible Signals, Order Statistics and Quantile Approximations We define a signal x as p-compressible if it lives close to the shell of the weak-ℓp ball of radius R (swℓp(R)–pronounced as swell p). Defining ¯xi = |xi|, we arrange the signal coefficients xi in decreasing order of magnitude as ¯x(1) ≥¯x(2) ≥. . . ≥¯x(N). (4) Then, when x ∈swℓp(R), the i-th ordered entry ¯x(i) in (4) obeys ¯x(i) ≲R · i−1/p, (5) where ≲means “less than or approximately equal to.” We deliberately substitute ≲for ≤in the p-compressibility definition of [1] to reduce the ambiguity of multiple feasible R and p values. In Section 6, we describe a geometric approach to learn R and p so that R · i−1/p ≈¯x(i). Signals in swℓp(R) can be well-approximated by sparse signals as the best K-term approximation error decays rapidly to zero as ∥x −xK∥r ≲(r/p −1)−1/r RK1/r−1/p, when p < r. (6) Given M, a good rule of thumb is to set K = M/[C log(N/M)] (C ≈4 or 5) and use (6) to predict the approximation error for the decoders ∆i in Section 2. Since the decoding guarantees are bounded by the best K-term approximation error in ℓ1 (i.e., r = 1; cf. (3)), we will restrict our attention to x ∈swℓp where p < 1. Including p = 1 adds a logarithmic error factor to the approximation errors, which is not severe; however, it is not considered in this paper to avoid a messy discussion. Suppose now the individual entries xi of the signal x are random variables (RV) drawn iid with respect to a probability density function (pdf) f(x), i.e., xi ∼f(x) for i = 1, . . . , N. Then, ¯x(i)’s in (4) are also RV’s and are known as the order statistics (OS) of yet another pdf ¯f(¯x), which can be related to f(x) in a straightforward manner: ¯f(¯x) = f(¯x) + f(−¯x). Note that even though the RV’s xi (hence, ¯xi) are iid, the RV’s ¯x(i) are statistically dependent. The concept of OS enables us to create a link between signals summarized by pdf’s and their compressibility, which is a deterministic property after the signals are realized. The key to establishing this link turns out to be the parameterized form of the quantile function of the pdf ¯f(¯x). Let ¯F(¯x) = R ¯x 0 ¯f(v)dv be the cumulative distribution function (CDF) and u = ¯F(¯x). The quantile function ¯F ⋆(u) of ¯f(¯x) is then given by the inverse of its CDF: ¯F ⋆(u) = ¯F −1(u). We will refer to ¯F ⋆(u) as the magnitude quantile function (MQF) of f(x). A well-known quantile approximation to the expected OS of a pdf is given by [10]: E[¯x(i)] = ¯F ⋆  1 − i N + 1  , (7) where E[·] is the expected value. Moreover, we have the following moment matching approximation ¯x(i) ∼N E[¯x(i)], i N 1 − i N  N  f E[¯x(i)] 2 ! , (8) which can be used to quantify how much the actual realizations ¯x(i) deviate from E[¯x(i)]. For instance, these deviations for i > K can be used to bound the statistical variations of the best Kterm approximation error. In practice, the deviations are relatively small for compressible priors. In Sections 4–6, we will use the quantile approximation in (7) as our basis to motivate the set of compressible priors, derive recovery algorithms for x, and learn the parameters of compressible priors during recovery. 3 Table 1: Example distributions and the swℓp(R) parameters of their iid realizations Distribution pdf R p Generalized Pareto q 2λ  1 + |x| λ −(q+1) λN1/q q Student’s t Γ((q+1)/2) √ 2πλΓ(q/2)  1 + x2 λ2 −(q+1)/2 h 2Γ((q+1)/2) √πqΓ(q/2) i1/q λN1/q q Fr´echet (q/λ) (x/λ)−(q+1) e−(x/λ)−q λN1/q q Log-Logistic (q/λ)(x/λ)q−1 [1+(x/λ)q]2 λN1/q q Generalized Gaussian q 2λΓ(1/q) e−(|x|/λ)q λ max {1, Γ (1 + 1/q)} log1/q (N/q) q log (N/q) Weibull (q/λ) (x/λ)q−1 e−(x/λ)q λ log1/q N q log N Gamma 1 λΓ(q) (x/λ)q−1 e−x/λ λ max {1, Γ (1 + 1/q)q} log (qN) log (qN) Log-Normal q √ 2πx e−(q log(x/λ))2/2 λe √2 log N/q √2 log Nq 4 Compressible Priors A compressible prior f(x; θ) in ℓr is a pdf with parameters θ whose MQF satisfies ¯F ⋆  1 − i N + 1  ≲R(N, θ) · i−1/p(N,θ), where R > 0 and p < r. (9) Table 4 lists example pdf’s, parameterized by θ = (q, λ) ≻0, and the swℓp(R) parameters of their N-sample iid realizations. In this paper, we fix r = 1 (cf. Section 3); hence, the example pdf’s are compressible priors whenever p < 1. In (9), we make it explicit that the swℓp(R) parameters can depend on the parameters θ of the specific compressible prior as well as the signal dimension N. The dependence of the parameter p on N is of particular interest since it has important implications in signal recovery as well as parameter learning from finite sample sizes, as discussed below. We define natural p-compressible priors as the set Np of compressible priors such that p = p(θ) < 1 is independent of N, ∀f(x; θ) ∈Np. It is possible to prove that we can capture most of the ℓ1energy in an N-sample iid realization from a natural p-compressible prior by using a constant K, i.e., ∥x −xK∥1 ≤ϵ∥x∥1 for any desired 0 < ϵ ≪1 by choosing K = ⌈(p/ϵ) p 1−p ⌉. Hence, N-sample iid signal realizations from the compressible priors in Np can be truly embedded into dimensions M that grow logarithmically with N with tractable decoding guarantees due to (3). Np members include the generalized Pareto (GPD), Fr´echet (FD), and log-logistic distributions (LLD). It then only comes as a surprise that generalized Gaussian distribution (GGD) is not a natural pcompressible prior since its iid realizations lose their compressibility as N grows (cf. Table 4). While it is common practice to use a GGD prior with q ≤1 for sparse signal recovery, we have no recovery guarantees for signals generated from GGD when M grows logarithmically with N in (1).1 In fact, to be p-compressible, the shape parameter of a GGD prior should satisfy q = NeW−1(−p/N), where W−1(·) is the Lambert W-function with the alternate branch. As a result, the learned GGD parameters from dimensionality-reduced data will in general depend on the dimension and may not generalize to other dimensions. Along with GGD, Table 4 shows how Weibull, gamma, and lognormal distributions are dimension-restricted in their membership to the set of compressible priors. Wavelet coefficients of natural images provide a stylized example to demonstrate why we should care about the dimensional independence of the parameter p.2 As a brief background, we first note that research in natural image modeling to date has had two distinct approaches, with one focusing on deterministic explanations and the other pursuing probabilistic models [12]. Deterministic approaches operate under the assumption that the natural images belong to Besov spaces, having a bounded number of derivatives between edges. Unsurprisingly, wavelet thresholding is proven nearoptimal for representing and denoising Besov space images. As the simplest example, the magnitude sorted discrete wavelet coefficients ¯w(i) of a Besov q-image should satisfy ¯w(i) = R · i−1/q. The probabilistic approaches, on the other hand, exploit the power-law decay of the power spectra of images and fit various pdf’s, such as GGD and the Gaussian scale mixtures, to the histograms of wavelet 1To illustrate the issues with the compressibility of GGD, consider the Laplacian distribution (LD: GGD with q = 1), which is the conventional convex prior for promoting sparsity. Via order statistics, it is possible to show that ¯x(i) ≈λ log N i for xi ∼GGD(1, λ). Without loss of generality, let us judiciously pick λ = 1/ log N so that R = 1. Then, we have ∥x∥1 ≈N −1 and ∥x −xK∥1 ≈N −K log (N/K) −K. When we only have K terms to capture (1 −ϵ) of the ℓ1 energy (ϵ ≪1) in the signal x, we need K ≈(1 −√ϵ)N. 2Here, we assume that the reader is familiar with the discrete wavelet transform and its properties [11]. 4 coefficients while trying to simultaneously capture the dependencies observed in the marginal and joint distributions of natural image wavelet coefficients. Probabilistic approaches are quite important in image compression because optimal compressors quantize the wavelet coefficients according to the estimated distributions, dictating the image compression limits via Shannon’s coding theorem. We conjecture that probabilistic models that summarize the wavelet coefficients of natural images belong to the set of natural (non-iid) p-compressible priors. We base our claim on two observations: 1) Due to the multiscale nature of the wavelet transform, the decay profile of the magnitude sorted wavelet coefficients are scale-invariant, i.e., preserved at different resolutions, where lower resolutions inherit the highest resolution. Hence, probabilistic models that explain the wavelet transform of any signals should exhibit this decay profile inheritance property. 2) The magnitude sorted wavelet coefficients of natural images exhibit a constant decay rate, as expected of Besov space images. Section 7.2 demonstrates the ideas using natural images from the Berkeley natural images database. 5 Signal Decoding Algorithms Convex problems to recover sparse or compressible signals in (2) are usually motivated by Bayesian inference. In a similar fashion, we formalize two new decoding algorithms below by assuming prior distributions on the signal x and the noise n, and then asking inference questions given y in (1). 5.1 Fixed point continuation for a non-iid compressible prior The multivariate Lomax distribution (MLD) provides an elementary example of a non-iid compressible prior. The pdf of the distribution is given by MLD(x; q, λ) ∝  1 + PN i=1 λ−1 i |xi| −q−N [13]. For MLD, the marginal distribution of the signal coefficients is GPD, i.e., xi ∼GPD(x; q, λi). Moreover, given n-realizations x1:n of MLD (n ≤N), the joint marginal distribution of xn+1:N is MLD(xn+1:N; q + k, λn+1:N 1 + Pn i=1 λ−1 i |xi| −1). In the sequel, we assume λi = λ ∀i, for which it can be proved that MLD is compressible with p = 1 [14]. For now, we will only demonstrate this property via simulations in Section 7.1. With the MLD prior on x, we focus on only two optimization problems below, one based on BP and the other based on maximum a posteriori (MAP) estimation. Other convex formulations, such as BPDN (∆2 in (2)) and LASSO [15], trivially follow. 1) BP Decoder: When there is no noise, the observations are given by y = Φx, which has infinitely many solutions, as discussed in Section 1. In this case, we can exploit the MLD likelihood function to regularize the solution space. For instance, when we ask for the solution that maximizes the MLD likelihood given y, it is easy to see that we obtain the BP decoder formulation, i.e., ∆1(y) in (2). 2) MAP Decoder: Suppose that the noise coefficients (ni’s in (1)) are iid Gaussian with zero mean and variance σ2, ni ∼N(n; 0, σ2). Although many inference questions are possible, here we seek the mode of the posterior distribution to obtain a point estimate, also known as the MAP estimate. Since we have f(y|x) = N(y −Φx; 0, σ2IM×M) and f(x) =MLD(x; q, λ), the MAP estimate can be derived using the Bayes rule as bxMAP = arg maxx′ f(y|x′)f(x′), which is explicitly given by bxMAP = arg min x′ ∥y −Φx′∥2 2 + 2σ2(q + N) log 1 + λ−1∥x′∥1  . (10) Unfortunately, we stumble upon a non-convex problem in (10) during our quest for the MAP estimate. We circumvent the non-convexity in (10) using a majorization-minimization idea where we iteratively obtain a tractable upperbound on the log-term in (10) using the following inequality: ∀u, v ∈(0, ∞), log u ≤log v + u/v −1. After some straightforward calculus, we obtain the iterative decoder below, indexed by k, where bx{k} is the k-th iteration estimate (bx{0} = 0): bx{k} = arg min x′ ∥y −Φx′∥2 2 + νk∥x′∥1, where νk = 2σ2(q + N) λ + ∥bx{k−1}∥1 . (11) The decoding approach in (11) can be viewed as a continuation (or a homotopy) algorithm where a fixed point is obtained at each iteration, similar to [16]. This decoding scheme has provable, linear convergence guarantees when ∥bx{k}∥1 is strictly increasing ⇈(equivalently, νk ⇊) [16]. 5.2 Iterative ℓs-decoding for iid scale mixtures of GGD We consider a generalization of GPD and the Student’s t distribution, which we will denote as the generalized Gaussian gamma scale mixture distribution (SMD, in short), whose pdf is given by SMD(x; q, λ, s) ∝(1 + |x|s /λs)−(q+1)/s. The additional parameter s of SMD modulates its OS near the origin. It can be proved that SMD is p-compressible with p = q [14]. SMD, for instance, arises through the following interaction of the gamma distribution and GGD: x = a−1/sb, a ∼Gamma(a; q/s, λ−s), and b ∼GGD(b; s, 1). Given a, the distribution of x is a scaled GGD: 5 f(x|a) ∼GGD(x; s, a−1). Marginalizing a from f(x|a), we reach the SMD as the true underlying distribution of x. SMD arise in multiple contexts, such as the SLB framework that exploit Student’s t (i.e., s = 2) for learning problems [2], and the Laplacian and Gaussian scale mixtures (i.e., s = 1 and 2, respectively) that model natural images [17,18]. Due to lack of space, we only focus on noiseless observations in (1). We assume that x is an Nsample iid realization from SMD(x; q, λ, s) with known parameters (q, λ, s) ≻0 and choose a solution bx that maximizes the SMD likehood to find the true vector x among the kernel of Φ: bx = max x′ SMD(x; q, λ, s) = min x′ X i log 1 + λ−s |xi|s , s.t. y = Φx′. (12) The majorization-minimization trick in Section 5.1 also circumvents the non-convexity in (12): bx{k} = min x′ X i wi,{k} |xi|s , s.t. y = Φx′; where wi,{k} = λs + xi,{k} s−1 . (13) The decoding scheme in (13) is well-known as the iterative re-weighted ℓs algorithms [7,19–21]. 6 Parameter Learning for Compressible Distributions While deriving decoding algorithms in Section 5, we assumed that the signal coefficients xi are generated from a compressible prior f(x; θ) and that θ is known. We now relax the latter assumption and discuss how to simultaneously estimate x and learn the parameters θ. When we visualize the joint estimation of x and θ from y in (1) as a graphical model, we immediately realize that x creates a Markov blanket for θ. Hence, to determine θ, we have to estimate the signal coefficients. When Φ has the stable embedding property, we know that the decoding algorithms can obtain x with approximation guarantees, such as (3). Then, given x, we can choose an estimator for θ via standard Bayesian inference arguments. Unfortunately, this argument leads to one important road block: estimation of the signal x without knowing the prior parameters θ. A n¨aive approach to overcoming this road block is to split the optimization space and alternate on x and θ while optimizing the Bayesian objective. Unfortunately, there is one important and unrecognized bug in this argument: the estimated signal values are in general not iid, hence we would be minimizing the wrong Bayesian objective to determine θ. To see this, we first note that the recovered signals bx in general consist of M ≪N non-zero coefficients that mimic the best K-term approximation of the signal xK and some other coefficients that explain the small tail energy. We then recall from Section (3) that the coefficients of xK are statistically dependent. Hence, at least partially, the significant coefficients of bx are also dependent. One way to overcome this dependency issue is to treat the recovered signals as if they are drawn iid from a censored GPD. However, the optimization becomes complicated and the approach does not provide any additional guarantees. As an alternative, we propose to exploit geometry and use the consensus among the coefficients in fitting the swℓp(R) parameters via the auxiliary signal estimates bx{k} during iterative recovery. To do this, we employ Fischler and Bolles’ probabilistic random sampling consensus (RANSAC) algorithm [22] to fit a line, whose y-intercept is log R(N, θ) and whose slope is 1/p(N, θ): log bxi,{k} = log R(N, θ) − 1 p(N, θ) log i, for i = 1, . . . , K; where K = M/[C log(N/M)], (14) where C ≈4, 5 as discussed in Section. 3. RANSAC provides excellent results with high probability even if the data contains significant outliers. Because of its probabilistic nature, it is computationally efficient. The RANSAC algorithm requires a threshold to gate the observations and count how much a proposed solution is supported by the observations [22]. We determine this threshold by bounding the tail probability that the OS of a compressible prior will be out of bounds. For the pseudo-code and further details of the RANSAC algorithm, cf. [22]. 7 Experiments 7.1 Order Statistics To demonstrate the swℓp(R) decay profile of p-compressible priors, we generated iid realizations of GGD with q = 1 (LD) and GPD with q = 1, and (non-iid) realizations of MLD with q = 1 of varying signal dimensions N = 10j, where j = 2, 3, 4, 5. We sorted the magnitudes of the signal coefficients, normalized them by their corresponding value of R. We then plotted the results on a log-log scale in Fig. 1. At http://dsp.rice.edu/randcs, we provide a MATLAB routine (randcs.m) so that it is easy to repeat the same experiment for the rest of the distributions in Table 4. 6 0 2 3 4 5 −10 −5 −4 −3 −2 −1 0 ordered index [power of 10] normalized values slope = −1 average of 100 realizations 0 2 3 4 5 −10 −5 −4 −3 −2 −1 0 ordered index [power of 10] normalized values slope = −1 average of 100 realizations 0 2 3 4 5 −10 −5 −4 −3 −2 −1 0 ordered index [power of 10] normalized values slope = −1 average of 100 realizations (a) LD (iid) (b) GPD (iid) (c) MLD Figure 1: Numerical illustration of the swℓp(R) decay profile of three different pdfs. To live in swℓp(1) with 0 < p ≤1, the slope of the resulting curve must be less than or equal to −1. Figure 1(a) illustrates that the iid LD slope is much greater than −1 and moreover logarithmically grows with N. In contrast, Fig. 1(b) shows that iid GPD with q = 1 exhibits the constant slope of −1 that is independent of N. MLD with q = 1 also delivers such a slope (Fig. 1(c)). The latter two distributions thus produce compressible signal realizations, while the Laplacian does not. 7.2 Natural Images We investigate the images from the Berkeley natural images database in the context of pcompressible priors. We randomly sample 100 image patches of varying sizes N = 2j × 2j (j = 3, . . . , 8), take their wavelet transforms (scaling filter: daub2), and plot the average of their magnitude ordered wavelet coefficients in Figs. 2(a) and (b) (solid lines). Figure 2(c) also illustrates the OS of the pixel gradients, which are of particular interest in many applications. Along with the wavelet coefficients, Fig. 2(a) superposes the expected OS of GPD with q = 1.67 and λ = 10 (dashed line), given by ¯x(i){GPD(q, λ)} = λ  (N + 1)1/qi−1/q −1  (i = 1, . . . , N). Although wavelet coefficients of natural images do not follow an iid distribution, they exhibit a constant decay rate, which can be well-approximated by an iid GPD distribution. This apparent constant decay rate is well-explained by the decay profile inheritance of the wavelet transform across different resolutions and supports the Besov space assumption used in the deterministic approaches. The GPD rate of q = 1.67 implies a disappointing O(K−0.1) approximation rate in the ℓ2-norm vs. the theoretical O(K−0.5) rate [23]. Moreover, we lose all the guarantees in the ℓ1-norm. 0 1 2 3 4 5 −5 0 1 2 3 4 5 ordered index [power of 10] coefficient amplitudes average of 100 images GPD(q=1/0.6;λ=10) 0 1 2 3 4 5 −5 0 1 2 3 4 5 ordered index [power of 10] coefficient amplitudes average of 100 images histogram fit − GGD 0 1 2 3 4 5 −5 0 1 2 3 4 5 ordered index [power of 10] coefficient amplitudes average of 100 images GGD(q=0.95;λ=25) (a) wavelet coefficients (b) wavelet coefficients (c) pixel gradients Figure 2: Approximation of the order statistics and histograms of natural images with GPD and GGD. In contrast, Fig. 2(b) demonstrates the GGD histogram fits to the wavelet coefficients, where the GGD exponent q ∈[0.5, 1] depends on the particular dimension and decreases as N increases. The histogram matching is common practice in the existing probabilistic approaches (e.g., [18]) to determine pdf’s that explain the statistics of natural images. Typically, least square error metrics or Kullback-Liebler (KL) divergence measures are used. Although the GGD fit via histogram matching in Fig. 2(b) deceptively appears to fit a small number of coefficients, we emphasize the log-log scale of the plots and mention that there is a significant number of coefficients in the narrow space where the GGD distribution is a good fit. Unfortunately, these approaches approximate the wavelet coeffi7 0.2 0.4 0.6 0.8 1 1.2 (a) 0.2 0.4 0.6 0.8 1 1.2 (b) 0 0.2 0.4 0.6 0.8 1 (c) Figure 3: Improvements afforded by re-weighted ℓ1-decoding (a) with known parameters θ and (b) with learning. (c) The learned swℓp exponent of the GPD distribution with q = 0.4 via the RANSAC algorithm. cients of natural images that have almost no approximation power of the overall image. Moreover, the learned GGD distribution is dimension dependent, assigns lower probability to the large coefficients that explain the image well, and predicts a mismatched OS of natural images (cf.Fig. 2(b)). Figure 2(c) compares the magnitude ordered pixel gradients of the images (solid lines) with the expected OS of GGD (dashed line). From the figure, it appears that the natural image pixel gradients lose their compressibility as the image dimensions grow, similar to the GGD, Weibull, gamma, and log-normal distributions. In the figure, the GGD parameters are given (q, λ) = (0.95, 25). 7.3 Iterative ℓ1 Decoding We repeat the compressible signal recovery experiment in Section 3.2 of [7] to demonstrate the performance of our iterative ℓs decoder with s = 1 in (13). We first randomly sample a signal x ∈RN (N = 256) where the signal coefficients are iid from the GPD distribution with q = 0.4 and λ = (N + 1)−1/q so that the E[¯x(1)] ≈1. We set M = 128 and draw a random M × N matrix with iid Gaussian entries to obtain y = Φx. We then decode signals via (13) where maximum iterations is set to 5, with the knowledge of the signal parameters and with learning. During the learning phase, we use log(2) as the threshold for the RANSAC algorithm. We set the maximum iteration count of RANSAC to 500. The results of a Monte Carlo run with 100 independent realizations are illustrated in Fig. 3. In Figs. 3(a) and (b), the plots summarize the average improvement over the standard decoder ∆1(y) via the histograms of ∥x −bx{4}∥2/∥x −∆1(y)∥2, which have mean and standard deviation (0.7062, 0.1380) when we know the parameters of the GPD (a) and (0.7101, 0.1364) when we learn the parameters of the GPD via RANSAC (b). The learned swℓp exponent is summarized by the histogram in Fig. 3(c), which has mean and standard deviation (0.3757, 0.0539). Hence, we conclude that the our alternative learning approach via the RANSAC algorithm is competitive with knowing the actual prior parameters that generated the signal. Moreover, the computational time of learning is insignificant compared to time required by the state-of-the art linear SPGL algorithm [24]. 8 Conclusions3 Compressible priors create a connection between probabilistic and deterministic models for signal compressibility. The bridge between these seemingly two different modeling frameworks turns out to be the concept of order statistics. We demonstrated that when the p-parameter of a compressible prior is independent of the ambient dimension N, it is possible to have truly logarithmic embedding of its iid signal realizations. Moreover, the learned parameters of such compressible priors are dimension agnostic. In contrast, we showed that when the p-parameter depends on N, we have many restrictions in signal embedding and recovery as well as in parameter learning. We illustrated that wavelet coefficients of natural images can be well approximated by the generalized Pareto prior, which in turn predicts a disappointing approximation rate for image coding with the n¨aive sparse model and for CS image recovery from measurements that grow only logarithmically with the image dimension. We motivated many of the existing sparse signal recovery algorithm as instances of a corresponding compressible prior and discussed parameter learning for these priors from dimensionality reduced data. We hope that the iid compressibility view taken in this paper will pave the way for a better understanding of probabilistic non-iid and structured compressibility models. 3We thank R. G. Baraniuk, M. Wakin, M. Davies, J. Haupt, and J. P. Slavinksy for useful discussions. Supported by ONR N00014-08-1-1112, DARPA N66001-08-1-2065, ARO W911NF-09-1-0383 grants. 8 References [1] E. J. Cand`es. Compressive sampling. In Proc. International Congress of Mathematicians, volume 3, pages 1433–1452, Madrid, Spain, 2006. [2] M.E. Tipping. Sparse bayesian learning and the relevance vector machine. The Journal of Machine Learning Research, 1:211–244, 2001. [3] D. P. Wipf and B. D. Rao. Sparse Bayesian learning for basis selection. IEEE Transactions on Signal Processing, 52(8):2153–2164, 2004. [4] T. Blumensath and M.E. Davies. Sampling theorems for signals from the union of linear subspaces. IEEE Trans. Info. Theory, 2009. [5] A. Cohen, W. Dahmen, and R. DeVore. Compressed sensing and best k-term approximation. American Mathematical Society, 22(1):211–231, 2009. [6] I. F. Gorodnitsky, J. S. George, and B. D. Rao. Neuromagnetic source imaging with FOCUSS: a recursive weighted minimum norm algorithm. Electroenceph. and Clin. Neurophys., 95(4):231–251, 1995. [7] 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] D. P. Wipf and S. Nagarajan. Iterative reweighted ℓ1 and ℓ2 methods for finding sparse solutions. In SPARS09, Rennes, France, 2009. [9] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM review, pages 129–159, 2001. [10] H.A. David and H.N. Nagaraja. Order Statistics. Wiley-Interscience, 2004. [11] S. Mallat. A Wavelet Tour of Signal Processing. Academic Press, 1999. [12] H. Choi and R. G. Baraniuk. Wavelet statistical models and Besov spaces. Lecture Notes in Statistics, pages 9–30, 2003. [13] T. K. Nayak. Multivariate Lomax distribution: properties and usefulness in reliability theory. Journal of Applied Probability, pages 170–177, 1987. [14] V. Cevher. Compressible priors. IEEE Trans. on Information Theory, in preparation, 2010. [15] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, pages 267–288, 1996. [16] E. T. Hale, W. Yin, and Y. Zhang. Fixed-point continuation for ℓ1-minimization: Methodology and convergence. SIAM Journal on Optimization, 19:1107, 2008. [17] P. J. Garrigues. Sparse Coding Models of Natural Images: Algorithms for Efficient Inference and Learning of Higher-Order Structure. PhD thesis, EECS Department, University of California, Berkeley, May 2009. [18] M. J. Wainwright and E. P. Simoncelli. Scale mixtures of Gaussians and the statistics of natural images. In NIPS, 2000. [19] D. Wipf and S. Nagarajan. A new view of automatic relevance determination. In NIPS, volume 20, 2008. [20] I. Daubechies, R. DeVore, M. Fornasier, and S. Gunturk. Iteratively re-weighted least squares minimization for sparse recovery. Commun. Pure Appl. Math, 2009. [21] R. Chartrand and W. Yin. Iteratively reweighted algorithms for compressive sensing. In ICASSP, pages 3869–3872, 2008. [22] M.A. Fischler and R.C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381–395, 1981. [23] E. J. Candes and D. L. Donoho. Curvelets and curvilinear integrals. Journal of Approximation Theory, 113(1):59–90, 2001. [24] E. van den Berg and M. P. Friedlander. Probing the Pareto frontier for basis pursuit solutions. SIAM Journal on Scientific Computing, 31(2):890–912, 2008. 9
2009
95
3,849
Inter-domain Gaussian Processes for Sparse Inference using Inducing Features Miguel L´azaro-Gredilla and An´ıbal R. Figueiras-Vidal Dep. Signal Processing & Communications Universidad Carlos III de Madrid, SPAIN {miguel,arfv}@tsc.uc3m.es Abstract We present a general inference framework for inter-domain Gaussian Processes (GPs) and focus on its usefulness to build sparse GP models. The state-of-the-art sparse GP model introduced by Snelson and Ghahramani in [1] relies on finding a small, representative pseudo data set of m elements (from the same domain as the n available data elements) which is able to explain existing data well, and then uses it to perform inference. This reduces inference and model selection computation time from O(n3) to O(m2n), where m ≪n. Inter-domain GPs can be used to find a (possibly more compact) representative set of features lying in a different domain, at the same computational cost. Being able to specify a different domain for the representative features allows to incorporate prior knowledge about relevant characteristics of data and detaches the functional form of the covariance and basis functions. We will show how previously existing models fit into this framework and will use it to develop two new sparse GP models. Tests on large, representative regression data sets suggest that significant improvement can be achieved, while retaining computational efficiency. 1 Introduction and previous work Along the past decade there has been a growing interest in the application of Gaussian Processes (GPs) to machine learning tasks. GPs are probabilistic non-parametric Bayesian models that combine a number of attractive characteristics: They achieve state-of-the-art performance on supervised learning tasks, provide probabilistic predictions, have a simple and well-founded model selection scheme, present no overfitting (since parameters are integrated out), etc. Unfortunately, the direct application of GPs to regression problems (with which we will be concerned here) is limited due to their training time being O(n3). To overcome this limitation, several sparse approximations have been proposed [2, 3, 4, 5, 6]. In most of them, sparsity is achieved by projecting all available data onto a smaller subset of size m ≪n (the active set), which is selected according to some specific criterion. This reduces computation time to O(m2n). However, active set selection interferes with hyperparameter learning, due to its non-smooth nature (see [1, 3]). These proposals have been superseded by the Sparse Pseudo-inputs GP (SPGP) model, introduced in [1]. In this model, the constraint that the samples of the active set (which are called pseudoinputs) must be selected among training data is relaxed, allowing them to lie anywhere in the input space. This allows both pseudo-inputs and hyperparameters to be selected in a joint continuous optimisation and increases flexibility, resulting in much superior performance. In this work we introduce Inter-Domain GPs (IDGPs) as a general tool to perform inference across domains. This allows to remove the constraint that the pseudo-inputs must remain within the same domain as input data. This added flexibility results in an increased performance and allows to encode prior knowledge about other domains where data can be represented more compactly. 1 2 Review of GPs for regression We will briefly state here the main definitions and results for regression with GPs. See [7] for a comprehensive review. Assume we are given a training set with n samples D ≡{xj, yj}n j=1, where each D-dimensional input xj is associated to a scalar output yj. The regression task goal is, given a new input x∗, predict the corresponding output y∗based on D. The GP regression model assumes that the outputs can be expressed as some noiseless latent function plus independent noise, y = f(x)+ε, and then sets a zero-mean1 GP prior on f(x), with covariance k(x, x′), and a zero-mean Gaussian prior on ε, with variance σ2 (the noise power hyperparameter). The covariance function encodes prior knowledge about the smoothness of f(x). The most common choice for it is the Automatic Relevance Determination Squared Exponential (ARD SE): k(x, x′) = σ2 0 exp " −1 2 D X d=1 (xd −x′ d)2 ℓ2 d # , (1) with hyperparameters σ2 0 (the latent function power) and {ℓd}D d=1 (the length-scales, defining how rapidly the covariance decays along each dimension). It is referred to as ARD SE because, when coupled with a model selection method, non-informative input dimensions can be removed automatically by growing the corresponding length-scale. The set of hyperparameters that define the GP are θ = {σ2, σ2 0 , {ℓd}D d=1}. We will omit the dependence on θ for the sake of clarity. If we evaluate the latent function at X = {xj}n j=1, we obtain a set of latent variables following a joint Gaussian distribution p(f|X) = N(f|0, Kff), where [Kff]ij = k(xi, xj). Using this model it is possible to express the joint distribution of training and test cases and then condition on the observed outputs to obtain the predictive distribution for any test case pGP(y∗|x∗, D) = N(y∗|k⊤ f∗(Kff+ σ2In)−1y, σ2 + k∗∗−k⊤ f∗(Kff+ σ2In)−1kf∗), (2) where y = [y1, . . . , yn]⊤, kf∗= [k(x1, x∗), . . . , k(xn, x∗)]⊤, and k∗∗= k(x∗, x∗). In is used to denote the identity matrix of size n. The O(n3) cost of these equations arises from the inversion of the n × n covariance matrix. Predictive distributions for additional test cases take O(n2) time each. These costs make standard GPs impractical for large data sets. To select hyperparameters θ, Type-II Maximum Likelihood (ML-II) is commonly used. This amounts to selecting the hyperparameters that correspond to a (possibly local) maximum of the log-marginal likelihood, also called log-evidence. 3 Inter-domain GPs In this section we will introduce Inter-Domain GPs (IDGPs) and show how they can be used as a framework for computationally efficient inference. Then we will use this framework to express two previous relevant models and develop two new ones. 3.1 Definition Consider a real-valued GP f(x) with x ∈RD and some deterministic real function g(x, z), with z ∈RH. We define the following transformation: u(z) = Z RD f(x)g(x, z)dx. (3) There are many examples of transformations that take on this form, the Fourier transform being one of the best known. We will discuss possible choices for g(x, z) in Section 3.3; for the moment we will deal with the general form. Since u(z) is obtained by a linear transformation of GP f(x), 1We follow the common approach of subtracting the sample mean from the outputs and then assume a zero-mean model. 2 it is also a GP. This new GP may lie in a different domain of possibly different dimension. This transformation is not invertible in general, its properties being defined by g(x, z). IDGPs arise when we jointly consider f(x) and u(z) as a single, “extended” GP. The mean and covariance function of this extended GP are overloaded to accept arguments from both the input and transformed domains and treat them accordingly. We refer to each version of an overloaded function as an instance, which will accept a different type of arguments. If the distribution of the original GP is f(x) ∼GP(m(x), k(x, x′)), then it is possible to compute the remaining instances that define the distribution of the extended GP over both domains. The transformed-domain instance of the mean is m(z) = E[u(z)] = Z RD E[f(x)]g(x, z)dx = Z RD m(x)g(x, z)dx. The inter-domain and transformed-domain instances of the covariance function are: k(x, z′) = E[f(x)u(z′)] = E  f(x) Z RD f(x′)g(x′, z′)dx′  = Z RD k(x, x′)g(x′, z′)dx′ (4) k(z, z′) = E[u(z)u(z′)] = E Z RD f(x)g(x, z)dx Z RD f(x′)g(x′, z′)dx′  = Z RD Z RD k(x, x′)g(x, z)g(x′, z′)dxdx′. (5) Mean m(·) and covariance function k(·, ·) are therefore defined both by the values and domains of their arguments. This can be seen as if each argument had an additional domain indicator used to select the instance. Apart from that, they define a regular GP, and all standard properties hold. In particular k(a, b) = k(b, a). This approach is related to [8], but here the latent space is defined as a transformation of the input space, and not the other way around. This allows to pre-specify the desired input-domain covariance. The transformation is also more general: Any g(x, z) can be used. We can sample an IDGP at n input-domain points f = [f1, f2, . . . , fn]⊤(with fj = f(xj)) and m transformed-domain points u = [u1, u2, . . . , um]⊤(with ui = u(zi)). With the usual assumption of f(x) being a zero mean GP and defining Z = {zi}m i=1, the joint distribution of these samples is: p  f u  X, Z  = N  f u  0,  Kff Kfu K⊤ fu Kuu  , (6) with [Kff]pq = k(xp, xq), [Kfu]pq = k(xp, zq), [Kuu]pq = k(zp, zq), which allows to perform inference across domains. We will only be concerned with one input domain and one transformed domain, but IDGPs can be defined for any number of domains. 3.2 Sparse regression using inducing features In the standard regression setting, we are asked to perform inference about the latent function f(x) from a data set D lying in the input domain. Using IDGPs, we can use data from any domain to perform inference in the input domain. Some latent functions might be better defined by a set of data lying in some transformed space rather than in the input space. This idea is used for sparse inference. Following [1] we introduce a pseudo data set, but here we place it in the transformed domain: D = {Z, u}. The following derivation is analogous to that of SPGP. We will refer to Z as the inducing features and u as the inducing variables. The key approximation leading to sparsity is to set m ≪n and assume that f(x) is well-described by the pseudo data set D, so that any two samples (either from the training or test set) fp and fq with p ̸= q will be independent given xp, xq and D. With this simplifying assumption2, the prior over f can be factorised as a product of marginals: p(f|X, Z, u) ≈ n Y j=1 p(fj|xj, Z, u). (7) 2Alternatively, (7) can be obtained by proposing a generic factorised form for the approximate conditional p(f|X, Z, u) ≈ q(f|X, Z, u) = Qn j=1 qj(fj|xj, Z, u) and then choosing the set of functions {qj(·)}n j=1 so as to minimise the Kullback-Leibler (KL) divergence from the exact joint prior KL(p(f|X, Z, u)p(u|Z)||q(f|X, Z, u)p(u|Z)), as noted in [9], Section 2.3.6. 3 Marginals are in turn obtained from (6): p(fj|xj, Z, u) = N(fj|kjK−1 uuu, λj), where kj is the j-th row of Kfu and λj is the j-th element of the diagonal of matrix Λf = diag(Kff −KfuK−1 uuKuf). Operator diag(·) sets all off-diagonal elements to zero, so that Λf is a diagonal matrix. Since p(u|Z) is readily available and also Gaussian, the inducing variables can be integrated out from (7), yielding a new, approximate prior over f(x): p(f|X, Z) = Z p(f, u|X, Z)du ≈ Z n Y j=1 p(fj|xj, Z, u)p(u|Z)du = N(f|0, KfuK−1 uuKuf + Λf) Using this approximate prior, the posterior distribution for a test case is: pIDGP(y∗|x∗, D, Z) = N(y∗|k⊤ u∗Q−1K⊤ fuΛ−1 y y, σ2 + k∗∗+ k⊤ u∗(Q−1 −K−1 uu)ku∗), (8) where we have defined Q = Kuu + K⊤ fuΛ−1 y Kfu and Λy = Λf + σ2In. The distribution (2) is approximated by (8) with the information available in the pseudo data set. After O(m2n) time precomputations, predictive means and variances can be computed in O(m) and O(m2) time per test case, respectively. This model is, in general, non-stationary, even when it is approximating a stationary input-domain covariance and can be interpreted as a degenerate GP plus heteroscedastic white noise. The log-marginal likelihood (or log-evidence) of the model, explicitly including the conditioning on kernel hyperparameters θ can be expressed as log p(y|X, Z, θ) = −1 2[y⊤Λ−1 y y−y⊤Λ−1 y KfuQ−1K⊤ fuΛ−1 y y+log(|Q||Λy|/|Kuu|)+n log(2π)] which is also computable in O(m2n) time. Model selection will be performed by jointly optimising the evidence with respect to the hyperparameters and the inducing features. If analytical derivatives of the covariance function are available, conjugate gradient optimisation can be used with O(m2n) cost per step. 3.3 On the choice of g(x, z) The feature extraction function g(x, z) defines the transformed domain in which the pseudo data set lies. According to (3), the inducing variables can be seen as projections of the target function f(x) on the feature extraction function over the whole input space. Therefore, each of them summarises information about the behaviour of f(x) everywhere. The inducing features Z define the concrete set of functions over which the target function will be projected. It is desirable that this set captures the most significant characteristics of the function. This can be achieved either using prior knowledge about data to select {g(x, zi)}m i=1 or using a very general family of functions and letting model selection automatically choose the appropriate set. Another way to choose g(x, z) relies on the form of the posterior. The posterior mean of a GP is often thought of as a linear combination of “basis functions”. For full GPs and other approximations such as [1, 2, 3, 4, 5, 6], basis functions must have the form of the input-domain covariance function. When using IDGPs, basis functions have the form of the inter-domain instance of the covariance function, and can therefore be adjusted by choosing g(x, z), independently of the input-domain covariance function. If two feature extraction functions g(·, ·) and h(·, ·) can be related by g(x, z) = h(x, z)r(z) for any function r(·), then both yield the same sparse GP model. This property can be used to simplify the expressions of the instances of the covariance function. In this work we use the same functional form for every feature, i.e. our function set is {g(x, zi)}m i=1, but it is also possible to use sets with different functional forms for each inducing feature, i.e. {gi(x, zi)}m i=1 where each zi may even have a different size (dimension). In the sections below we will discuss different possible choices for g(x, z). 3.3.1 Relation with Sparse GPs using pseudo-inputs The sparse GP using pseudo-inputs (SPGP) was introduced in [1] and was later renamed to Fully Independent Training Conditional (FITC) model to fit in the systematic framework of [10]. Since 4 the sparse model introduced in Section 3.2 also uses a fully independent training conditional, we will stick to the first name to avoid possible confusion. IDGP innovation with respect to SPGP consists in letting the pseudo data set lie in a different domain. If we set gSPGP(x, z) ≡δ(x −z) where δ(·) is a Dirac delta, we force the pseudo data set to lie in the input domain. Thus there is no longer a transformed space and the original SPGP model is retrieved. In this setting, the inducing features of IDGP play the role of SPGP’s pseudo-inputs. 3.3.2 Relation with Sparse Multiscale GPs Sparse Multiscale GPs (SMGPs) are presented in [11]. Seeking to generalise the SPGP model with ARD SE covariance function, they propose to use a different set of length-scales for each basis function. The resulting model presents a defective variance that is healed by adding heteroscedastic white noise. SMGPs, including the variance improvement, can be derived in a principled way as IDGPs: gSMGP(x, z) ≡ 1 QD d=1 p 2π(c2 d −ℓ2 d) exp " − D X d=1 (xd −µd)2 2(c2 d −ℓ2 d) # with z =  µ c  (9) kSMGP(x, z′) = exp " − D X d=1 (xd −µ′ d)2 2c′2 d # D Y d=1 s ℓ2 d c′2 d (10) kSMGP(z, z′) = exp " − D X d=1 (µd −µ′ d)2 2(c2 d + c′2 d −ℓ2 d) # D Y d=1 s ℓ2 d c2 d + c′2 d −ℓ2 d . (11) With this approximation, each basis function has its own centre µ = [µ1, µ2, . . . , µd]⊤and its own length-scales c = [c1, c2, . . . , cd]⊤, whereas global length-scales {ℓd}D d=1 are shared by all inducing features. Equations (10) and (11) are derived from (4) and (5) using (1) and (9). The integrals defining kSMGP(·, ·) converge if and only if c2 d ≥ℓ2 d, ∀d, which suggests that other values, even if permitted in [11], should be avoided for the model to remain well defined. 3.3.3 Frequency Inducing Features GP If the target function can be described more compactly in the frequency domain than in the input domain, it can be advantageous to let the pseudo data set lie in the former domain. We will pursue that possibility for the case where the input domain covariance is the ARD SE. We will call the resulting sparse model Frequency Inducing Features GP (FIFGP). Directly applying the Fourier transform is not possible because the target function is not square integrable (it has constant power σ2 0 everywhere, so (5) does not converge). We will workaround this by windowing the target function in the region of interest. It is possible to use a square window, but this results in the covariance being defined in terms of the complex error function, which is very slow to evaluate. Instead, we will use a Gaussian window3. Since multiplying by a Gaussian in the input domain is equivalent to convolving with a Gaussian in the frequency domain, we will be working with a blurred version of the frequency space. This model is defined by: gFIF(x, z) ≡ 1 QD d=1 p 2πc2 d exp " − D X d=1 x2 d 2c2 d # cos  ω0 + D X d=1 xdωd  with z = ω (12) kFIF(x, z′) = exp " − D X d=1 x2 d + c2 dω′2 d 2(c2 d + ℓ2 d) # cos ω′ 0 + D X d=1 c2 dω′ dxd c2 d + ℓ2 d ! D Y d=1 s ℓ2 d c2 d + ℓ2 d (13) kFIF(z, z′) = exp " − D X d=1 c2 d(ω2 d + ω′2 d ) 2(2c2 d + ℓ2 d) # exp " − D X d=1 c4 d(ωd −ω′ d)2 2(2c2 d + ℓ2 d) # cos(ω0 −ω′ 0) + exp " − D X d=1 c4 d(ωd + ω′ d)2 2(2c2 d + ℓ2 d) # cos(ω0 + ω′ 0) ! D Y d=1 s ℓ2 d 2c2 d + ℓ2 d . (14) 3A mixture of m Gaussians could also be used as window without increasing the complexity order. 5 The inducing features are ω = [ω0, ω1, . . . , ωd]⊤, where ω0 is the phase and the remaining components are frequencies along each dimension. In this model, both global length-scales {ℓd}D d=1 and window length-scales {cd}D d=1 are shared, thus c′ d = cd. Instances (13) and (14) are induced by (12) using (4) and (5). 3.3.4 Time-Frequency Inducing Features GP Instead of using a single window to select the region of interest, it is possible to use a different window for each feature. We will use windows of the same size but different centres. The resulting model combines SPGP and FIFGP, so we will call it Time-Frequency Inducing Features GP (TFIFGP). It is defined by gTFIF(x, z) ≡gFIF(x −µ, ω), with z = [µ⊤ω⊤]⊤. The implied inter-domain and transformed-domain instances of the covariance function are: kTFIF(x, z′) = kFIF(x −µ′, ω′) , kTFIF(z, z′) = kFIF(z, z′) exp " − D X d=1 (µd −µ′ d)2 2(2c2 d + ℓ2 d) # FIFGP is trivially obtained by setting every centre to zero {µi = 0}m i=1, whereas SPGP is obtained by setting window length-scales c, frequencies and phases {ωi}m i=1 to zero. If the window lengthscales were individually adjusted, SMGP would be obtained. While FIFGP has the modelling power of both FIFGP and SPGP, it might perform worse in practice due to it having roughly twice as many hyperparameters, thus making the optimisation problem harder. The same problem also exists in SMGP. A possible workaround is to initialise the hyperparameters using a simpler model, as done in [11] for SMGP, though we will not do this here. 4 Experiments In this section we will compare the proposed approximations FIFGP and TFIFGP with the current state of the art, SPGP on some large data sets, for the same number of inducing features/inputs and therefore, roughly equal computational cost. Additionally, we provide results using a full GP, which is expected to provide top performance (though requiring an impractically big amount of computation). In all cases, the (input-domain) covariance function is the ARD SE (1). We use four large data sets: Kin-40k, Pumadyn-32nm4 (describing the dynamics of a robot arm, used with SPGP in [1]), Elevators and Pole Telecomm5 (related to the control of the elevators of an F16 aircraft and a telecommunications problem, and used in [12, 13, 14]). Input dimensions that remained constant throughout the training set were removed. Input data was additionally centred for use with FIFGP (the remaining methods are translation invariant). Pole Telecomm outputs actually take discrete values in the 0-100 range, in multiples of 10. This was taken into account by using the corresponding quantization noise variance (102/12) as lower bound for the noise hyperparameter6. Hyperparameters are initialised as follows: σ2 0 = 1 n Pn j=1 y2 j , σ2 = σ2 0/4, {ℓd}D d=1 to one half of the range spanned by training data along each dimension. For SPGP, pseudo-inputs are initialised to a random subset of the training data, for FIFGP window size c is initialised to the standard deviation of input data, frequencies are randomly chosen from a zero-mean ℓ−2 d -variance Gaussian distribution, and phases are obtained from a uniform distribution in [0 . . . 2π). TFIFGP uses the same initialisation as FIFGP, with window centres set to zero. Final values are selected by evidence maximisation. Denoting the output average over the training set as y and the predictive mean and variance for test sample y∗l as µ∗l and σ∗l respectively, we define the following quality measures: Normalized Mean Square Error (NMSE) ⟨(y∗l −µ∗l)2⟩/⟨(y∗l −y)2⟩and Mean Negative Log-Probability (MNLP) 1 2⟨(y∗l −µ∗l)2/σ2 ∗l + log σ2 ∗l + log 2π⟩, where ⟨·⟩averages over the test set. 4Kin-40k: 8 input dimensions, 10000/30000 samples for train/test, Pumadyn-32nm: 32 input dimensions, 7168/1024 samples for train/test, using exactly the same preprocessing and train/test splits as [1, 3]. Note that their error measure is actually one half of the Normalized Mean Square Error defined here. 5Pole Telecomm: 26 non-constant input dimensions, 10000/5000 samples for train/test. Elevators: 17 non-constant input dimensions, 8752/7847 samples for train/test. Both have been downloaded from http://www.liaad.up.pt/∼ltorgo/Regression/datasets.html 6If unconstrained, similar plots are obtained; in particular, no overfitting is observed. 6 For Kin-40k (Fig. 1, top), all three sparse methods perform similarly, though for high sparseness (the most useful case) FIFGP and TFIFGP are slightly superior. In Pumadyn-32nm (Fig. 1, bottom), only 4 out the 32 input dimensions are relevant to the regression task, so it can be used as an ARD capabilities test. We follow [1] and use a full GP on a small subset of the training data (1024 data points) to obtain the initial length-scales. This allows better minima to be found during optimisation. Though all methods are able to properly find a good solution, FIFGP and especially TFIFGP are better in the sparser regime. Roughly the same considerations can be made about Pole Telecomm and Elevators (Fig. 2), but in these data sets the superiority of FIFGP and TFIFGP is more dramatic. Though not shown here, we have additionally tested these models on smaller, overfitting-prone data sets, and have found no noticeable overfitting even using m > n, despite the relatively high number of parameters being adjusted. This is in line with the results and discussion of [1]. 25 50 100 200 300 500 750 1250 0.001 0.005 0.01 0.05 0.1 0.5 Inducing features / pseudo−inputs Normalized Mean Squared Error SPGP FIFGP TFIFGP Full GP on 10000 data points (a) Kin-40k NMSE (log-log plot) 25 50 100 200 300 500 750 1250 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 Inducing features / pseudo−inputs Mean Negative Log−Probability SPGP FIFGP TFIFGP Full GP on 10000 data points (b) Kin-40k MNLP (semilog plot) 10 25 50 75 100 0.04 0.05 0.1 Inducing features / pseudo−inputs Normalized Mean Squared Error SPGP FIFGP TFIFGP Full GP on 7168 data points (c) Pumadyn-32nm NMSE (log-log plot) 10 25 50 75 100 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 Inducing features / pseudo−inputs Mean Negative Log−Probability SPGP FIFGP TFIFGP Full GP on 7168 data points (d) Pumadyn-32nm MNLP (semilog plot) Figure 1: Performance of the compared methods on Kin-40k and Pumadyn-32nm. 5 Conclusions and extensions In this work we have introduced IDGPs, which are able combine representations of a GP in different domains, and have used them to extend SPGP to handle inducing features lying in a different domain. This provides a general framework for sparse models, which are defined by a feature extraction function. Using this framework, SMGPs can be reinterpreted as fully principled models using a transformed space of local features, without any need for post-hoc variance improvements. Furthermore, it is possible to develop new sparse models of practical use, such as the proposed FIFGP and TFIFGP, which are able to outperform the state-of-the-art SPGP on some large data sets, especially for high sparsity regimes. 7 10 25 50 100 250 500 7501000 0.1 0.15 0.2 0.25 Inducing features / pseudo−inputs Normalized Mean Squared Error SPGP FIFGP TFIFGP Full GP on 8752 data points (a) Elevators NMSE (log-log plot) 10 25 50 100 250 500 7501000 −4.8 −4.6 −4.4 −4.2 −4 −3.8 Inducing features / pseudo−inputs Mean Negative Log−Probability SPGP FIFGP TFIFGP Full GP on 8752 data points (b) Elevators MNLP (semilog plot) 10 25 50 100 250 500 1000 0.01 0.02 0.03 0.04 0.05 0.1 0.15 0.2 Inducing features / pseudo−inputs Normalized Mean Squared Error SPGP FIFGP TFIFGP Full GP on 10000 data points (c) Pole Telecomm NMSE (log-log plot) 10 25 50 100 250 500 1000 2.5 3 3.5 4 4.5 5 5.5 Inducing features / pseudo−inputs Mean Negative Log−Probability SPGP FIFGP TFIFGP Full GP on 10000 data points (d) Pole Telecomm MNLP (semilog plot) Figure 2: Performance of the compared methods on Elevators and Pole Telecomm. Choosing a transformed space for the inducing features enables to use domains where the target function can be expressed more compactly, or where the evidence (which is a function of the features) is easier to optimise. This added flexibility translates as a detaching of the functional form of the input-domain covariance and the set of basis functions used to express the posterior mean. IDGPs approximate full GPs optimally in the KL sense noted in Section 3.2, for a given set of inducing features. Using ML-II to select the inducing features means that models providing a good fit to data are given preference over models that might approximate the full GP more closely. This, though rarely, might lead to harmful overfitting. To more faithfully approximate the full GP and avoid overfitting altogether, our proposal can be combined with the variational approach from [15], in which the inducing features would be regarded as variational parameters. This would result in more constrained models, which would be closer to the full GP but might show reduced performance. We have explored the case of regression with Gaussian noise, which is analytically tractable, but it is straightforward to apply the same model to other tasks such as robust regression or classification, using approximate inference (see [16]). Also, IDGPs as a general tool can be used for other purposes, such as modelling noise in the frequency domain, aggregating data from different domains or even imposing constraints on the target function. Acknowledgments We would like to thank the anonymous referees for helpful comments and suggestions. This work has been partly supported by the Spanish government under grant TEC2008- 02473/TEC, and by the Madrid Community under grant S-505/TIC/0223. 8 References [1] E. Snelson and Z. Ghahramani. Sparse Gaussian processes using pseudo-inputs. In Advances in Neural Information Processing Systems 18, pages 1259–1266. MIT Press, 2006. [2] A. J. Smola and P. Bartlett. Sparse greedy Gaussian process regression. In Advances in Neural Information Processing Systems 13, pages 619–625. MIT Press, 2001. [3] M. Seeger, C. K. I. Williams, and N. D. Lawrence. Fast forward selection to speed up sparse Gaussian process regression. In Proceedings of the 9th International Workshop on AI Stats, 2003. [4] V. Tresp. A Bayesian committee machine. Neural Computation, 12:2719–2741, 2000. [5] L. Csat´o and M. Opper. Sparse online Gaussian processes. Neural Computation, 14(3):641–669, 2002. [6] C. K. I. Williams and M. Seeger. Using the Nystr¨om method to speed up kernel machines. In Advances in Neural Information Processing Systems 13, pages 682–688. MIT Press, 2001. [7] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. Adaptive Computation and Machine Learning. MIT Press, 2006. [8] M. Alvarez and N. D. Lawrence. Sparse convolved Gaussian processes for multi-output regression. In Advances in Neural Information Processing Systems 21, pages 57–64, 2009. [9] Ed. Snelson. Flexible and efficient Gaussian process models for machine learning. PhD thesis, University of Cambridge, 2007. [10] J. Qui˜nonero-Candela and C. E. Rasmussen. A unifying view of sparse approximate Gaussian process regression. Journal of Machine Learning Research, 6:1939–1959, 2005. [11] C. Walder, K. I. Kim, and B. Sch¨olkopf. Sparse multiscale Gaussian process regression. In 25th International Conference on Machine Learning. ACM Press, New York, 2008. [12] G. Potgietera and A. P. Engelbrecht. Evolving model trees for mining data sets with continuous-valued classes. Expert Systems with Applications, 35:1513–1532, 2007. [13] L. Torgo and J. Pinto da Costa. Clustered partial linear regression. In Proceedings of the 11th European Conference on Machine Learning, pages 426–436. Springer, 2000. [14] G. Potgietera and A. P. Engelbrecht. Pairwise classification as an ensemble technique. In Proceedings of the 13th European Conference on Machine Learning, pages 97–110. Springer-Verlag, 2002. [15] M. K. Titsias. Variational learning of inducing variables in sparse Gaussian processes. In Proceedings of the 12th International Workshop on AI Stats, 2009. [16] A. Naish-Guzman and S. Holden. The generalized FITC approximation. In Advances in Neural Information Processing Systems 20, pages 1057–1064. MIT Press, 2008. 9
2009
96
3,850
Particle-based Variational Inference for Continuous Systems Alexander T. Ihler Dept. of Computer Science Univ. of California, Irvine ihler@ics.uci.edu Andrew J. Frank Dept. of Computer Science Univ. of California, Irvine ajfrank@ics.uci.edu Padhraic Smyth Dept. of Computer Science Univ. of California, Irvine smyth@ics.uci.edu Abstract Since the development of loopy belief propagation, there has been considerable work on advancing the state of the art for approximate inference over distributions defined on discrete random variables. Improvements include guarantees of convergence, approximations that are provably more accurate, and bounds on the results of exact inference. However, extending these methods to continuous-valued systems has lagged behind. While several methods have been developed to use belief propagation on systems with continuous values, recent advances for discrete variables have not as yet been incorporated. In this context we extend a recently proposed particle-based belief propagation algorithm to provide a general framework for adapting discrete message-passing algorithms to inference in continuous systems. The resulting algorithms behave similarly to their purely discrete counterparts, extending the benefits of these more advanced inference techniques to the continuous domain. 1 Introduction Graphical models have proven themselves to be an effective tool for representing the underlying structure of probability distributions and organizing the computations required for exact and approximate inference. Early examples of the use of graph structure for inference include join or junction trees [1] for exact inference, Markov chain Monte Carlo (MCMC) methods [2], and variational methods such as mean field and structured mean field approaches [3]. Belief propagation (BP), originally proposed by Pearl [1], has gained in popularity as a method of approximate inference, and in the last decade has led to a number of more sophisticated algorithms based on conjugate dual formulations and free energy approximations [4, 5, 6]. However, the progress on approximate inference in systems with continuous random variables has not kept pace with that for discrete random variables. Some methods, such as MCMC techniques, are directly applicable to continuous domains, while others such as belief propagation have approximate continuous formulations [7, 8]. Sample-based representations, such as are used in particle filtering, are particularly appealing as they are relatively easy to implement, have few numerical issues, and have no inherent distributional assumptions. Our aim is to extend particle methods to take advantage of recent advances in approximate inference algorithms for discrete-valued systems. Several recent algorithms provide significant advantages over loopy belief propagation. Doubleloop algorithms such as CCCP [9] and UPS [10] use the same approximations as BP but guarantee convergence. More general approximations can be used to provide theoretical bounds on the results of exact inference [5, 3] or are guaranteed to improve the quality of approximation [6], allowing an informed trade-off between computation and accuracy. Like belief propagation, they can be formulated as local message-passing algorithms on the graph, making them amenable to parallel computation [11] or inference in distributed systems [12, 13]. 1 In short, the algorithmic characteristics of these recently-developed algorithms are often better, or at least more flexible, than those of BP. However, these methods have not been applied to continuous random variables, and in fact this subject was one of the open questions posed at a recent NIPS workshop [14]. In order to develop particle-based approximations for these algorithms, we focus on one particular technique for concreteness: tree-reweighted belief propagation (TRW) [5]. TRW represents one of the earliest of a recent class of inference algorithms for discrete systems, but as we discuss in Section 2.2 the extensions of TRW can be incorporated into the same framework if desired. The basic idea of our algorithm is simple and extends previous particle formulations of exact inference [15] and loopy belief propagation [16]. We use collections of samples drawn from the continuous state space of each variable to define a discrete problem, “lifting” the inference task from the original space to a restricted, discrete domain on which TRW can be performed. At any point, the current results of the discrete inference can be used to re-select the sample points from a variable’s continuous domain. This iterative interaction between the sample locations and the discrete messages produces a dynamic discretization that adapts itself to the inference results. We demonstrate that TRW and similar methods can be naturally incorporated into the lifted, discrete phase of particle belief propagation and that they confer similar benefits on the continuous problem as hold in truly discrete systems. To this end we measure the performance of the algorithm on an Ising grid, an analogous continuous model, and the sensor localization problem. In each case, we show that tree-reweighted particle BP exhibits behavior similar to TRW and produces significantly more robust marginal estimates than ordinary particle BP. 2 Graphical Models and Inference Graphical models provide a convenient formalism for describing structure within a probability distribution p(X) defined over a set of variables X = {x1, . . . , xn}. This structure can then be applied to organize computations over p(X) and construct efficient algorithms for many inference tasks, including optimization to find a maximum a posteriori (MAP) configuration, marginalization, or computing the likelihood of observed data. 2.1 Factor Graphs Factor graphs [17] are a particular type of graphical model that describe the factorization structure of the distribution p(X) using a bipartite graph consisting of factor nodes and variable nodes. Specifically, suppose such a graph G consists of factor nodes F = {f1, . . . , fm} and variable nodes X = {x1, . . . , xn}. Let Xu ⊆X denote the neighbors of factor node fu and Fs ⊆F denote the neighbors of variable node xs. Then, G is consistent with a distribution p(X) if and only if p(x1, . . . , xn) = 1 Z m Y u=1 fu(Xu). (1) In a common abuse of notation, we use the same symbols to represent each variable node and its associated variable xs, and similarly for each factor node and its associated function fu. Each factor fu corresponds to a strictly positive function over a subset of the variables. The graph connectivity captures the conditional independence structure of p(X), enabling the development of efficient exact and approximate inference algorithms [1, 17, 18]. The quantity Z, called the partition function, is also of importance in many problems; for example in normalized distributions such as Bayes nets, it corresponds to the probability of evidence and can be used for model comparison. A common inference problem is that of computing the marginal distributions of p(X). Specifically, for each variable xs we are interested in computing the marginal distribution ps(xs) = Z X\xs p(X) ∂X. For discrete-valued variables X, the integral is replaced by a summation. When the variables are discrete and the graph G representing p(X) forms a tree (G has no cycles), marginalization can be performed efficiently using the belief propagation or sum-product algorithm [1, 17]. For inference in more general graphs, the junction tree algorithm [19] creates a 2 tree-structured hypergraph of G and then performs inference on this hypergraph. The computational complexity of this process is O(ndb), where d is the number of possible values for each variable and b is the maximal clique size of the hypergraph. Unfortunately, for even moderate values of d, this complexity becomes prohibitive for even relatively small b. 2.2 Approximate Inference Loopy BP [1] is a popular alternative to exact methods and proceeds by iteratively passing “messages” between variable and factor nodes in the graph as though the graph were a tree (ignoring cycles). The algorithm is exact when the graph is tree-structured and can provide excellent approximations in some cases even when the graph has loops. However, in other cases loopy BP may perform poorly, have multiple fixed points, or fail to converge at all. Many of the more recent varieties of approximate inference are framed explicitly as an optimization of local approximations over locally defined cost functions. Variational or free-energy based approaches convert the problem of exact inference into the optimization of a free energy function over the set of realizable marginal distributions M, called the marginal polytope [18]. Approximate inference then corresponds to approximating the constraint set and/or energy function. Formally, max µ∈M Eµ[log P(X)] + H(µ) ≈max µ∈c M Eµ[log P(X)] + bH(µ) where H is the entropy of the distribution corresponding to µ. Since the solution µ may not correspond to the marginals of any consistent joint distribution, these approximate marginals are typically referred to as pseudomarginals. If both the constraints in c M and approximate entropy bH decompose locally on the graph, the optimization process can be interpreted as a message-passing procedure, and is often performed using fixed-point equations like those of BP. Belief propagation can be understood in this framework as corresponding to an outer approximation c M ⊇M enforcing local consistency and the Bethe approximation to H [4]. This viewpoint provides a clear path to directly improve upon the properties of BP, leading to a number of different algorithms. For example, CCCP [9] and UPS [10] make the same approximations but use an alternative, direct optimization procedure to ensure convergence. Fractional belief propagation [20] corresponds to a more general Bethe-like approximation with additional parameters, which can be modified to ensure that the cost function is convex and used with convergent algorithms [21]. A special case includes tree-reweighted belief propagation [5], which both ensures convexity and provides an upper bound on the partition function Z. The approximation of M can also be improved using cutting plane methods, which include additional, higher-order consistency constraints on the pseudomarginals [6]. Other choices of local cost functions lead to alternative families of approximations [8]. Overall, these advances have provided significant improvements in the state of the art for approximate inference in discrete-valued systems. They provide increased flexibility, theoretical bounds on the results of exact inference, and can provably increase the quality of the estimates. However, these advances have not been carried over into the continuous domain. For concreteness, in the rest of the paper we will use tree-reweighted belief propagation (TRW) [5] as our inference method of choice, although the same ideas can be applied to any of the discussed inference algorithms. As we will see shortly, the details specific to TRW are nicely encapsulated and can be swapped out for those of another algorithm with minimal effort. The fixed-point equations for TRW lead to a message-passing algorithm similar to BP, defined by mxsfu(xs) ∝ Y fv∈Fs mfvxs(xs)ρv mfuxs(xs) , mfuxs(xs) ∝ X Xu\xs fu(Xu)1/ρu Y xt∈Xu\xs mxtfu(xt) (2) The parameters ρv are called edge weights or appearance probabilities. For TRW, the ρ are required to correspond to the fractional occurrence rates of the edges in some collection of tree-structured subgraphs of G. The choice of ρ affects the quality of the approximation; the tightest upper bound can be obtained via a convex optimization of ρ which computes the pseudomarginals as an inner loop. 3 3 Continuous Random Variables For continuous-valued random variables, many of these algorithms cannot be applied directly. In particular, any reasonably fine-grained discretization produces a discrete variable whose domain size d is quite large. The domain size is typically exponential in the dimension of the variable and the complexity of the message-passing algorithms is O(ndb), where n is the total number of variables and b is the number of variables in the largest factor. Thus, the computational cost can quickly become intractable even with pairwise factors over low dimensional variables. Our goal is to adapt the algorithms of Section 2.2 to perform efficient approximate inference in such systems. For time-series problems, in which G forms a chain, a classical solution is to use sequential Monte Carlo approximations, generally referred to as particle filtering [22]. These methods use samples to define an adaptive discretization of the problem with fine granularity in regions of high probability. The stochastic nature of the discretization is simple to implement and enables probabilistic assurances of quality including convergence rates which are independent of the problem’s dimensionality. (In sufficiently few dimensions, deterministic adaptive discretizations can also provide a competitive alternative, particularly if the factors are analytically tractable [23, 24].) 3.1 Particle Representations for Message-Passing Particle-based approximations have been extended to loopy belief propagation as well. For example, in the nonparametric belief propagation (NBP) algorithm [7], the BP messages are represented as Gaussian mixtures and message products are approximated by drawing samples, which are then smoothed to form new Gaussian mixture distributions. A key aspect of this approach is the fact that the product of several mixtures of Gaussians is also a mixture of Gaussians, and thus can be sampled from with relative ease. However, it is difficult to see how to extend this algorithm to more general message-passing algorithms, since for example the TRW fixed point equations (2) involve ratios and powers of messages, which do not have a simple form for Gaussian mixtures and may not even form finitely integrable functions. Instead, we adapt a recent particle belief propagation (PBP) algorithm [16] to work on the treereweighted formulation. In PBP, samples (particles) are drawn for each variable, and each message is represented as a set of weights over the available values of the target variable. At a high level, the procedure iterates between sampling particles from each variable’s domain, performing inference over the resulting discrete problem, and adaptively updating the sampling distributions. This process is illustrated in Figure 1. Formally, we define a proposal distribution Ws(xs) for each variable xs such that Ws(xs) is non-zero over the domain of xs. Note that we may rewrite the factor message computation (2) as an importance reweighted expectation: mfuxs(xs) ∝ E Xu\xs  fu(Xu)1/ρu Y xt∈Xu\xs mxtfu(xt) Wt(xt)   (3) Let us index the variables that are neighbors of factor fu as Xu = {xu1, . . . , xub}. Then, after sampling particles {x(1) s , · · · , x(N) s } from Ws(xs), we can index a particular assignment of particle values to the variables in Xu with X(⃗j) u = [x(j1) u1 , . . . , x(jb) ub ]. We then obtain a finite-sample approximation of the factor message in the form mfuxuk  x(j) uk  ∝ 1 N b−1 X ⃗i:ik=j  fu  X(⃗i) u 1/ρu Y l̸=k mxulfu  x(il) ul  Wxul  x(il) ul    (4) In other words, we construct a Monte Carlo approximation to the integral using importance weighted samples from the proposal. Each of the values in the message then represents an estimate of the continuous function (2) evaluated at a single particle. Observe that the sum is over N b−1 elements, and hence the complexity of computing an entire factor message is O(N b); this could be made more efficient at the price of increased stochasticity by summing over a random subsample of the vectors 4 (1) Sample  x(i) s ∼Ws(xs) (1) (2) Inference on discrete system (3) Adjust Wt(xt) (3) µ x(i) s  µ x(j) t  f x(i) s , x(j) t  Figure 1: Schematic view of particle-based inference. (1) Samples for each variable provide a dynamic discretization of the continuous space; (2) inference proceeds by optimization or messagepassing in the discrete space; (3) the resulting local functions can be used to change the proposals Ws(·) and choose new sample locations for each variable. ⃗i. Likewise, we compute variable messages and beliefs as simple point-wise products: mxsfu  x(j) s  ∝ Q fv∈Fs mfvxs  x(j) s ρv mfuxs  x(j) s  , bs(x(j) s ) ∝ Y fv∈Fs mfvxs  x(j) s ρv (5) This parallels the development in [16], except here we use factor weights ⃗ρ to compute messages according to TRW rather than standard loopy BP. Just as in discrete problems, it is often desirable to obtain estimates of the log partition function for use in goodness-of-fit testing or model comparison. Our implementation of TRW-PBP gives us a stochastic estimate of an upper bound on the true partition function. Using other message passing approaches that fit into this framework, such as mean field, can provide a similar a lower bound. These bounds provide a possible alternative to Monte Carlo estimates of marginal likelihood [25]. 3.2 Rao-Blackwellized Estimates Quantities about xs such as expected values under the pseudomarginal can be computed using the samples x(i) s . However, for any given variable node xs, the incoming messages to xs given in (4) are defined in terms of the importance weights and sampled values of the neighboring variables. Thus, we can compute an estimate of the messages and beliefs defined in (4)–(5) at arbitrary values of xs, simply by evaluating (4) at that point. This allows us to perform Rao-Blackwellization, conditioning on the samples at the neighbors of xs rather than using xs’s samples directly. Using this trick we can often get much higher quality estimates from the inference for small N. In particular, if the variable state spaces are sufficiently small that they can be discretized (for example, in 3 or fewer dimensions the discretized domain size d may be manageable) but the resulting factor domain size, db, is intractably large, we can evaluate (4) on the discretized grid for only O(dN b−1). More generally, we can substitute a larger number of samples N ′ ≫N with cost that grows only linearly in N ′. 3.3 Resampling and Proposal Distributions Another critical point is that the efficiency of this procedure hinges on the quality of the proposal distributions Ws. Unfortunately, this forms a circular problem – W must be chosen to perform inference, but the quality of W depends on the distribution and its pseudomarginals. This interdependence motivates an attempt to learn the sampling distributions in an online fashion, adaptively updating them based on the results of the partially completed inference procedure. Note that this procedure depends on the same properties as Rao-Blackwellized estimates: that we be able to compute our messages and beliefs at a new set of points given the message weights at the other nodes. Both [15] and [16] suggest using the current belief at each iteration to form a new proposal distribution. In [15], parametric density estimates are formed using the message-weighted samples at the current iteration, which form the sampling distributions for the next phase. In [16], a short Metropolis-Hastings MCMC sequence is run at a single node, using the Rao-Blackwellized belief estimate to compute an acceptance probability. A third possibility is to use a sampling/importance 5 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 η L1 error 20 100 500 BP 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 η L1 error 20 100 500 TRW 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 η L1 error PBP 500 TRW−PBP 500 Figure 2: 2-D Ising model performance. L1 error for PBP (left) and TRW-PBP (center) for varying numbers of particles; (right) PBP and TRW-PBP juxtaposed to reveal the gap for high η. resampling (SIR) procedure, drawing a large number of samples, computing weights, and probabilistically retaining only N. In our experiments we draw samples from the current beliefs, as approximated by Rao-Blackwellized estimation over a fine grid of particles. For variables in more than 2 dimensions, we recommend the Metropolis-Hastings approach. 4 Ising-like Models The Ising model corresponds to a graphical model, typically a grid, over binary-valued variables with pairwise factors. Originating in statistical physics, similar models are common in many applications including image denoising and stereo depth estimation. Ising models are well understood, and provide a simple example of how BP can fail and the benefits of more general forms such as TRW. We initially demonstrate the behavior of our particle-based algorithms on a small (3 × 3) lattice of binary-valued variables to compare with the exact discrete implementations, then show that the same observed behavior arises in an analagous continuous-valued problem. 4.1 Ising model Our factors consist of single-variable and pairwise functions, given by f(xs) = [ 0.5 0.5 ] f(xs, xt) =  η 1 −η 1 −η η  (6) for η > .5. By symmetry, it is easy to see that the true marginal of each variable is uniform, [.5 .5]. However, around η ≈.78 there is a phase transition; the uniform fixed point becomes unstable and several others appear, becoming more skewed toward one state or another as η increases. As the strength of coupling in an Ising model increases, the performance of BP often degrades sharply, while TRW is comparatively robust and remains near the true marginals [5]. Figure 2 shows the performance of PBP and TRW-PBP on this model. Each data point represents the median L1 error between the beliefs and the true marginals, across all nodes and 40 randomly initialized trials, after 50 iterations. The left plot (BP) clearly shows the phase shift; in contrast, the error of TRW remains low even for very strong interactions. In both cases, as N increases the particle versions of the algorithms converge to their discrete equivalents. 4.2 Continuous grid model The results for discrete systems, and their corresponding intuition, carry over naturally into continuous systems as well. To illustrate on an interpretable analogue of the Ising model, we use the same graph structure but with real-valued variables, and factors given by: f(xs) = exp  −x2 s 2σ2 l  + exp  −(xs −1)2 2σ2 l  f(xs, xt) = exp  −|xs −xt|2 2σ2p  . (7) Local factors consist of bimodal Gaussian mixtures centered at 0 and 1, while pairwise factors encourage similarity using a zero-mean Gaussian on the distance between neighboring variables. We set σl = 0.2 and vary σp analagously to η in the discrete model. Since all potentials are Gaussian mixtures, the joint distribution is also a Gaussian mixture and can be computed exactly. 6 −2 0 2 4 0 0.2 0.4 0.6 0.8 1 log(σp −2) L1 error 20 100 500 −2 0 2 4 0 0.2 0.4 0.6 0.8 1 log(σp −2) L1 error 20 100 500 −2 0 2 4 0 0.2 0.4 0.6 0.8 1 log(σp −2) L1 error PBP 500 TRW−PBP 500 Figure 3: Continuous grid model performance. L1 error for PBP (left) and TRW-PBP (center) for varying numbers of particles; (right) PBP and TRW-PBP juxtaposed to reveal the gap for low σp. Figure 3 shows the results of running PBP and TRW-PBP on the continuous grid model, demonstrating similar characteristics to the discrete model. The left panel reveals that our continuous grid model also induces a phase shift in PBP, much like that of the Ising model. For sufficiently small values of σp (large values on our transformed axis), the beliefs in PBP collapse to unimodal distributions with an L1 error of 1. In contrast, TRW-PBP avoids this collapse and maintains multi-modal distributions throughout; its primary source of error (0.2 at 500 particles) corresponds to overdispersed bimodal beliefs. This is expected in attractive models, in which BP tends to “overcount” information leading to underestimates of variance; TRW removes some of this overcounting and may overestimate uncertainty. Figure 4: Bounds on the log partition function. As mentioned in Section 3.1, we can use the results of TRW-PBP to compute an upper bound on the log partition function. We implement naive mean field within this same framework to achieve a lower bound as well. The resulting bounds, computed for a continuous grid model in which mean field collapses to a single mode, are shown in Figure 4. With sufficiently many particles, the values produced by TRW-PBP and MF inference bound the true value, as they should. With only 20 particles per variable, however, TRW-PBP occasionally fails and yields “upper bounds” below the true value. This is not surprising; the consistency guarantees associated with the importancereweighted expectation take effect only when N is sufficiently large. 5 Sensor Localization We also demonstrate the presence of these effects in a simulation of a real-world application. Sensor localization considers the task of estimating the position of a collection of sensors in a network given noisy estimates of a subset of the distances between pairs of sensors, along with known positions for a small number of anchor nodes. Typical localization algorithms operate by optimizing to find the most likely joint configuration of sensor positions. A classical model consists of (at a minimum) three anchor nodes, and a Gaussian model on the noise in the distance observations. In [12], this problem is formulated as a graphical model and an alternative solution is proposed using nonparametric belief propagation to perform approximate marginalization. A significant advantage of this approach is that by providing approximate marginals, we can estimate the degree of uncertainty in the sensor positions. Gauging this uncertainty can be particularly important when the distance information is sufficiently ambiguous that the posterior belief is multi-modal, since in this case the estimated sensor position may be quite far from its true value. Unfortunately, belief propagation is not ideal for identifying multimodality, since the model is essentially attractive. BP may underestimate the degree of uncertainty in the marginal distributions and (as in the case of the Ising-like models in the previous section) collapse into a single mode, providing beliefs which are misleadingly overconfident. Figure 5 shows a set of sensor configurations where this is the case. The distance observations induce a fully connected graph; the edges are omitted for clarity. In this network the anchor nodes are nearly collinear. This induces a bimodal uncertainty about the locations of the remaining nodes 7 Anchor Mobile Target (a) Exact Anchor Mobile Target (b) PBP Anchor Mobile Target (c) TRW-PBP Figure 5: Sensor location belief at the target node. (a) Exact belief computed using importance sampling. (b) PBP collapses and represents only one of the two modes. (c) TRW-PBP overestimates the uncertainty around each mode, but represents both. – the configuration in which they are all reflected across the crooked line formed by the anchors is nearly as likely as the true configuration. Although this example is anecdotal, it reflects a situation which can arise regularly in practice [26]. Figure 5a shows the true marginal distribution for one node, estimated exhaustively using importance sampling with 5 × 106 samples. It shows a clear bimodal structure – a slightly larger mode near the sensor’s true location and a smaller mode at a point corresponding to the reflection. In this system there is not enough information in the measurements to resolve the sensor positions. We compare these marginals to the results found using PBP. Figure 5b displays the Rao-Blackwellized belief estimate for one node after 20 iterations of PBP with each variable represented by 100 particles. Only one mode is present, suggesting that PBP’s beliefs have “collapsed,” just as in the highly attractive Ising model. Examination of the other nodes’ beliefs (not shown for space) confirms that all are unimodal distributions centered around their reflected locations. It is worth noting that PBP converged to the alternative set of unimodal beliefs (supporting the true locations) in about half of our trials. Such an outcome is only slightly better; an accurate estimate of confidence is equally important. The corresponding belief estimate generated by TRW-PBP is shown in Figure 5c. It is clearly bimodal, with significant probability mass supporting both the true and reflected locations. Also, each of the two modes is less concentrated than the belief in 5b. As with the continuous grid model we see increased stability at the price of conservative overdispersion. Again, similar effects occur for the other nodes in the network. 6 Conclusion We propose a framework for extending recent advances in discrete approximate inference for application to continuous systems. The framework directly integrates reweighted message passing algorithms such as TRW into the lifted, discrete phase of PBP. Furthermore, it allows us to iteratively adjust the proposal distributions, providing a discretization that adapts to the results of inference, and allows us to use Rao-Blackwellized estimates to improve our final belief estimates. We consider the particular case of TRW and show that its benefits carry over directly to continuous problems. Using an Ising-like system, we argue that phase transitions exist for particle versions of BP similar to those found in discrete systems, and that TRW significantly improves the quality of the estimate in those regimes. This improvement is highly relevant to approximate marginalization for sensor localization tasks, in which it is important to accurately represent the posterior uncertainty. The flexibility in the choice of message passing algorithm makes it easy to consider several instantiations of the framework and use the one best suited to a particular problem. Furthermore, future improvements in message-passing inference algorithms on discrete systems can be directly incorporated into continuous problems. Acknowledgements: This material is based upon work partially supported by the Office of Naval Research under MURI grant N00014-08-1-1015. 8 References [1] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufman, San Mateo, 1988. [2] S. Geman and D. Geman. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Trans. PAMI, 6(6):721–741, November 1984. [3] M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. An introduction to variational methods for graphical methods. Machine Learning, 37:183–233, 1999. [4] J. Yedidia, W. Freeman, and Y. Weiss. Constructing free energy approximations and generalized belief propagation algorithms. Technical Report 2004-040, MERL, May 2004. [5] M. Wainwright, T. Jaakkola, and A. Willsky. A new class of upper bounds on the log partition function. IEEE Trans. Info. Theory, 51(7):2313–2335, July 2005. [6] D. Sontag and T. Jaakkola. New outer bounds on the marginal polytope. In NIPS 20, pages 1393–1400. MIT Press, Cambridge, MA, 2008. [7] E. Sudderth, A. Ihler, W. Freeman, and A. Willsky. Nonparametric belief propagation. In CVPR, 2003. [8] T. Minka. Divergence measures and message passing. Technical Report 2005-173, Microsoft Research Ltd, January 2005. [9] A. Yuille. CCCP algorithms to minimize the Bethe and Kikuchi free energies: convergent alternatives to belief propagation. Neural Comput., 14(7):1691–1722, 2002. [10] Y.-W. Teh and M. Welling. The unified propagation and scaling algorithm. In NIPS 14. 2002. [11] J. Gonzalez, Y. Low, and C. Guestrin. Residual splash for optimally parallelizing belief propagation. In In Artificial Intelligence and Statistics (AISTATS), Clearwater Beach, Florida, April 2009. [12] A. Ihler, J. Fisher, R. Moses, and A. Willsky. Nonparametric belief propagation for self-calibration in sensor networks. IEEE J. Select. Areas Commun., pages 809–819, April 2005. [13] J. Schiff, D. Antonelli, A. Dimakis, D. Chu, and M. Wainwright. Robust message-passing for statistical inference in sensor networks. In IPSN, pages 109–118, April 2007. [14] A. Globerson, D. Sontag, and T. Jaakkola. Approximate inference – How far have we come? (NIPS’08 Workshop), 2008. http://www.cs.huji.ac.il/˜gamir/inference-workshop.html. [15] D. Koller, U. Lerner, and D. Angelov. A general algorithm for approximate inference and its application to hybrid Bayes nets. In UAI 15, pages 324–333, 1999. [16] A. Ihler and D. McAllester. Particle belief propagation. In AI & Statistics: JMLR W&CP, volume 5, pages 256–263, April 2009. [17] F. Kschischang, B. Frey, and H.-A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Trans. Info. Theory, 47(2):498–519, February 2001. [18] M. Wainwright and M. Jordan. Graphical models, exponential families, and variational inference. Technical Report 629, UC Berkeley Dept. of Statistics, September 2003. [19] SL Lauritzen and DJ Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological), pages 157–224, 1988. [20] W. Wiegerinck and T. Heskes. Fractional belief propagation. In NIPS 15, pages 438–445. 2003. [21] T. Hazan and A. Shashua. Convergent message-passing algorithms for inference over general graphs with convex free energies. In UAI 24, pages 264–273. July 2008. [22] M. S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp. A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking. 50(2):174–188, February 2002. [23] J. Coughlan and H. Shen. Dynamic quantization for belief propagation in sparse spaces. Comput. Vis. Image Underst., 106(1):47–58, 2007. [24] M. Isard, J. MacCormick, and K. Achan. Continuously-adaptive discretization for message-passing algorithms. In NIPS 21, pages 737–744. 2009. [25] S. Chib. Marginal likelihood from the gibbs output. JASA, 90(432):1313–1321, 1995. [26] D. Moore, J. Leonard, D. Rus, and S. Teller. Robust distributed network localization with noisy range measurements. In 2nd Int’l Conf. on Emb. Networked Sensor Sys. (SenSys’04), pages 50–61, 2004. 9
2009
97
3,851
Efficient Learning using Forward-Backward Splitting John Duchi University of California Berkeley jduchi@cs.berkeley.edu Yoram Singer Google singer@google.com Abstract We describe, analyze, and experiment with a new framework for empirical loss minimization with regularization. Our algorithmic framework alternates between two phases. On each iteration we first perform an unconstrained gradient descent step. We then cast and solve an instantaneous optimization problem that trades off minimization of a regularization term while keeping close proximity to the result of the first phase. This yields a simple yet effective algorithm for both batch penalized risk minimization and online learning. Furthermore, the two phase approach enables sparse solutions when used in conjunction with regularization functions that promote sparsity, such as ℓ1. We derive concrete and very simple algorithms for minimization of loss functions with ℓ1, ℓ2, ℓ2 2, and ℓ∞regularization. We also show how to construct efficient algorithms for mixed-norm ℓ1/ℓq regularization. We further extend the algorithms and give efficient implementations for very high-dimensional data with sparsity. We demonstrate the potential of the proposed framework in experiments with synthetic and natural datasets. 1 Introduction Before we begin, we establish notation for this paper. We denote scalars by lower case letters and vectors by lower case bold letters, e.g. w. The inner product of vectors u and v is denoted ⟨u, v⟩. We use ∥x∥p to denote the p-norm of the vector x and ∥x∥as a shorthand for ∥x∥2. The focus of this paper is an algorithmic framework for regularized convex programming to minimize the following sum of two functions: f(w) + r(w) , (1) where both f and r are convex bounded below functions (so without loss of generality we assume they are into R+). Often, the function f is an empirical loss and takes the form P i∈S ℓi(w) for a sequence of loss functions ℓi : Rn →R+, and r(w) is a regularization term that penalizes for excessively complex vectors, for instance r(w) = λ∥w∥p. This task is prevalent in machine learning, in which a learning problem for decision and prediction problems is cast as a convex optimization problem. To that end, we propose a general and intuitive algorithm to minimize Eq. (1), focusing especially on derivations for and the use of non-differentiable regularization functions. Many methods have been proposed to minimize general convex functions such as that in Eq. (1). One of the most general is the subgradient method [1], which is elegant and very simple. Let ∂f(w) denote the subgradient set of f at w, namely, ∂f(w) = {g | ∀v : f(v) ≥f(w) + ⟨g, v −w⟩}. Subgradient procedures then minimize the function f(w) by iteratively updating the parameter vector w according to the update rule wt+1 = wt −ηtgf t , where ηt is a constant or diminishing step size and gf t ∈∂f(wt) is an arbitrary vector from the subgradient set of f evaluated at wt. A slightly more general method than the above is the projected gradient method, which iterates wt+1 = ΠΩ  wt −ηtgf t  = argmin w∈Ω  w −(wt −ηtgf t ) 2 2  1 where ΠΩ(w) is the Euclidean projection of w onto the set Ω. Standard results [1] show that the (projected) subgradient method converges at a rate of O(1/ε2), or equivalently that the error f(w)− f(w⋆) = O(1/ √ T), given some simple assumptions on the boundedness of the subdifferential set and Ω(we have omitted constants dependent on ∥∂f∥or dim(Ω)). Using the subgradient method to minimize Eq. (1) gives simple iterates of the form wt+1 = wt −ηtgf t −ηtgr t, where gr t ∈∂r(wt). A common problem in subgradient methods is that if r or f is non-differentiable, the iterates of the subgradient method are very rarely at the points of non-differentiability. In the case of regularization functions such as r(w) = ∥w∥1, however, these points (zeros in the case of the ℓ1-norm) are often the true minima of the function. Furthermore, with ℓ1 and similar penalties, zeros are desirable solutions as they tend to convey information about the structure of the problem being solved [2, 3]. There has been a significant amount of work related to minimizing Eq. (1), especially when the function r is a sparsity-promoting regularizer. We can hardly do justice to the body of prior work, and we provide a few references here to the research we believe is most directly related. The approach we pursue below is known as “forward-backward splitting” or a composite gradient method in the optimization literature and has been independently suggested by [4] in the context of sparse signal reconstruction, where f(w) = ∥y −Aw∥2, though they note that the method can apply to general convex f. [5] give proofs of convergence for forward-backward splitting in Hilbert spaces, though without establishing strong rates of convergence. The motivation of their paper is signal reconstruction as well. Similar projected-gradient methods, when the regularization function r is no longer part of the objective function but rather cast as a constraint so that r(w) ≤λ, are also well known [1]. [6] give a general and efficient projected gradient method for ℓ1-constrained problems. There is also a body of literature on regret analysis for online learning and online convex programming with convex constraints upon which we build [7, 8]. Learning sparse models generally is of great interest in the statistics literature, specifically in the context of consistency and recovery of sparsity patterns through ℓ1 or mixed-norm regularization across multiple tasks [2, 3, 9]. In this paper, we describe a general gradient-based framework, which we call FOBOS, and analyze it in batch and online learning settings. The paper is organized as follows. In the next section, we begin by introducing and formally defining the method, giving some simple preliminary analysis. We follow the introduction by giving in Sec. 3 rates of convergence for batch (offline) optimization. We then provide bounds for online convex programming and give a convergence rate for stochastic gradient descent. To demonstrate the simplicity and usefulness of the framework, we derive in Sec. 4 algorithms for several different choices of the regularizing function r. We extend these methods to be efficient in very high dimensional settings where the input data is sparse in Sec. 5. Finally, we conclude in Sec. 6 with experiments examining various aspects of the proposed framework, in particular the runtime and sparsity selection performance of the derived algorithms. 2 Forward-Looking Subgradients and Forward-Backward Splitting In this section we introduce our algorithm, laying the framework for its strategy for online or batch convex programming. We originally named the algorithm Folos as an abbreviation for FOrwardLOoking Subgradient. Our algorithm is a distillation of known approaches for convex programming, in particular the Forward-Backward Splitting method. In order not to confuse readers of the early draft, we attempt to stay close to the original name and use the acronym FOBOS rather than Fobas. FOBOS is motivated by the desire to have the iterates wt attain points of non-differentiability of the function r. The method alleviates the problems of non-differentiability in cases such as ℓ1-regularization by taking analytical minimization steps interleaved with subgradient steps. Put informally, FOBOS is analogous to the projected subgradient method, but replaces or augments the projection step with an instantaneous minimization problem for which it is possible to derive a closed form solution. FOBOS is succinct as each iteration consists of the following two steps: wt+ 1 2 = wt −ηtgf t (2) wt+1 = argmin w 1 2 w −wt+ 1 2 2 + ηt+ 1 2 r(w)  . (3) In the above, gf t is a vector in ∂f(wt) and ηt is the step size at time step t of the algorithm. The actual value of ηt depends on the specific setting and analysis. The first step thus simply amounts to an unconstrained subgradient step with respect to the function f. In the second step we find a 2 new vector that interpolates between two goals: (i) stay close to the interim vector wt+ 1 2 , and (ii) attain a low complexity value as expressed by r. Note that the regularization function is scaled by an interim step size, denoted ηt+ 1 2 . The analyses we describe in the sequel determine the specific value of ηt+ 1 2 , which is either ηt or ηt+1. A key property of the solution of Eq. (3) is the necessary condition for optimality and gives the reason behind the name FOBOS. Namely, the zero vector must belong to subgradient set of the objective at the optimum wt+1, that is, 0 ∈∂ 1 2 w −wt+ 1 2 2 + ηt+ 1 2 r(w)  w=wt+1 . Since wt+ 1 2 = wt −ηtgf t , the above property amounts to 0 ∈wt+1 −wt +ηtgf t +ηt+ 1 2 ∂r(wt+1). This property implies that so long as we choose wt+1 to be the minimizer of Eq. (3), we are guaranteed to obtain a vector gr t+1 ∈∂r(wt+1) such that 0 = wt+1 −wt + ηtgf t + ηt+ 1 2 gr t+1. We can understand this as an update scheme where the new weight vector wt+1 is a linear combination of the previous weight vector wt, a vector from the subgradient set of f at wt, and a vector from the subgradient of r evaluated at the yet to be determined wt+1. To recap, we can write wt+1 as wt+1 = wt −ηt gf t −ηt+ 1 2 gr t+1, (4) where gf t ∈∂f(wt) and gr t+1 ∈∂r(wt+1). Solving Eq. (3) with r above has two main benefits. First, from an algorithmic standpoint, it enables sparse solutions at virtually no additional computational cost. Second, the forward-looking gradient allows us to build on existing analyses and show that the resulting framework enjoys the formal convergence properties of many existing gradient-based and online convex programming algorithms. 3 Convergence and Regret Analysis of FOBOS In this section we build on known results while using the forward-looking property of FOBOS to provide convergence rate and regret analysis. To derive convergence rates we set ηt+ 1 2 properly. As we show in the sequel, it is sufficient to set ηt+ 1 2 to ηt or ηt+1, depending on whether we are doing online or batch optimization, in order to obtain convergence and low regret bounds. We provide proofs of all theorems in this paper, as well as a few useful technical lemmas, in the appendices, as the main foci of the paper are the simplicity of the method and derived algorithms and their experimental usefulness. The overall proof techniques all rely on the forward-looking property in Eq. (4) and moderately straightforward arguments with convexity and subgradient calculus. Throughout the section we denote by w⋆the minimizer of f(w)+r(w). The first bounds we present rely only on the assumption that ∥w⋆∥≤D, though they are not as tight as those in the sequel. In what follows, define ∥∂f(w)∥≜supg∈∂f(w) ∥g∥. We begin by deriving convergence results under the fairly general assumption [10, 11] that the subgradients are bounded as follows: ∥∂f(w)∥2 ≤Af(w) + G2, ∥∂r(w)∥2 ≤Ar(w) + G2 . (5) For example, any Lipschitz loss (such as the logistic or hinge/SVM) satisfies the above with A = 0 and G equal to the Lipschitz constant; least squares satisfies Eq. (5) with G = 0 and A = 4. Theorem 1. Assume the following hold: (i) the norm of any subgradient from ∂f and the norm of any subgradient from ∂r are bounded as in Eq. (5), (ii) the norm of w⋆is less than or equal to D, (iii) r(0) = 0, and (iv) 1 2ηt ≤ηt+1 ≤ηt. Then for a constant c ≤4 with w1 = 0 and ηt+ 1 2 = ηt+1, T X t=1 [ηt ((1 −cAηt)f(wt) −f(w⋆)) + ηt ((1 −cAηt)r(wt) −r(w⋆))] ≤D2 + 7G2 T X t=1 η2 t . The proof of the theorem is in Appendix A. We also provide in the appendix a few useful corollaries. We provide one corollary below as it underscores that the rate of convergence ≈ √ T. Corollary 2 (Fixed step rate). Assume that the conditions of Thm. 1 hold and that we run FOBOS for a predefined T iterations with ηt = D √ 7T G and that (1 −cA D √ 7T G) > 0. Then min t∈{1,...,T } f(wt) + r(wt) ≤1 T T X t=1 f(wt) + r(wt) ≤ 3DG √ T  1 − cAD G √ 7T  + f(w⋆) + r(w⋆) 1 − cAD G √ 7T 3 Bounds of the form we present above, where the point minimizing f(wt) + r(wt) converges rather than the last point wT , are standard in subgradient optimization. This occurs since there is no way to guarantee a descent direction when using arbitrary subgradients (see, e.g., [12, Theorem 3.2.2]). We next derive regret bounds for FOBOS in online settings in which we are given a sequence of functions ft : Rn →R. The goal is for the sequence of predictions wt to attain low regret when compared to a single optimal predictor w⋆. Formally, let ft(w) denote the loss suffered on the tth input loss function when using a predictor w. The regret of an online algorithm which uses w1, . . . , wt, . . . as its predictors w.r.t a fixed predictor w⋆while using a regularization function r is Rf+r(T) = T X t=1 [ft(wt) + r(wt) −(ft(w⋆) + r(w⋆))] . Ideally, we would like to achieve 0 regret to a stationary w⋆for arbitrary length sequences. To achieve an online bound for a sequence of convex functions ft, we modify arguments of [7]. We begin with a slightly different assignment for ηt+ 1 2 : specifically, we set ηt+ 1 2 = ηt. We have the following theorem, whose proof we provide in Appendix B. Theorem 3. Assume that ∥wt −w⋆∥≤D for all iterations and the norm of the subgradient sets ∂ft and ∂r are bounded above by G. Let c > 0 an arbitrary scalar. Then the regret bound of FOBOS with ηt = c/ √ t satisfies Rf+r(T) ≤GD +  D2 2c + 7G2c  √ T. For slightly technical reasons, the assumption on the boundedness of wt and the subgradients is not actually restrictive (see Appendix A for details). It is possible to obtain an O(log T) regret bound for FOBOS when the sequence of loss functions ft(·) or the function r(·) is strongly convex, similar to [8], by using the curvature of ft or r. While we can extend these results to FOBOS, we omit the extension for lack of space (though we do perform some experiments with such functions). Using the regret analysis for online learning, we can also give convergence rates for stochastic FOBOS, which are O( √ T). Further details are given in Appendix B and the long version of this paper [13]. 4 Derived Algorithms We now give a few variants of FOBOS by considering different regularization functions. The emphasis of the section is on non-differentiable regularization functions that lead to sparse solutions. We also give simple extensions to apply FOBOS to mixed-norm regularization [9] that build on the first part of this section. For lack of space, we mostly give the resulting updates, skipping technical derivations. We would like to note that some of the following results were tacitly given in [4]. First, we make a few changes to notation. To simplify our derivations, we denote by v the vector wt+ 1 2 = wt −ηtgf t and let ˜λ denote ηt+ 1 2 · λ. Using this notation the problem given in Eq. (3) can be rewritten as minw 1 2∥w −v∥2 + ˜λ r(w). Lastly, we let [z]+ denote max {0, z}. FOBOS with ℓ1 regularization: The update obtained by choosing r(w) = λ ∥w∥1 is simple and intuitive. The objective is decomposable into a sum of 1-dimensional convex problems of the form minw 1 2(w −v)2 + ˜λ|w|. As a result, the components of the optimal solution w⋆= wt+1 are computed from wt+ 1 2 as wt+1,j = sign  wt+ 1 2 ,j h |wt+ 1 2 ,j| −˜λ i += sign  wt,j −ηtgf t,j h wt,j −ηtgf t,j −ληt+ 1 2 i + (6) Note that this update leads to sparse solutions: whenever the absolute value of a component of wt+ 1 2 is smaller than ˜λ, the corresponding component in wt+1 is set to zero. Eq. (6) gives a simple online and offline method for minimizing a convex f with ℓ1 regularization. [10] recently proposed and analyzed the same update, terming it the “truncated gradient,” though the analysis presented here stems from a more general framework. This update can also be implemented very efficiently when the support of gf t is small [10], but we defer details to Sec. 5, where we describe a unified view that facilitates an efficient implementation for all the regularization functions discussed in this paper. FOBOS with ℓ2 2 regularization: When r(w) = λ 2 ∥w∥2 2, we obtain a very simple optimization problem, minw 1 2∥w −v∥2 + 1 2 ˜λ∥w∥2. Differentiating the objective and setting the result equal to 4 zero, we have w⋆−v + ˜λw⋆= 0, which, using the original notation, yields the update wt+1 = wt −ηtgf t 1 + ˜λ . (7) Informally, the update simply shrinks wt+1 back toward the origin after each gradient-descent step. FOBOS with ℓ2 regularization: A lesser used regularization function is the ℓ2 norm of the weight vector. By setting r(w) = ˜λ∥w∥we obtain the following problem: minw 1 2∥w −v∥2 + ˜λ∥w∥. The solution of the above problem must be in the direction of v and takes the form w⋆= sv where s ≥0. The resulting second step of the FOBOS update with ℓ2 regularization amounts to wt+1 = " 1 − ˜λ ∥wt+ 1 2 ∥ # + = " 1 − ˜λ ∥wt −ηtgf t ∥ # + (wt −ηtgf t ) . ℓ2-regularization results in a zero weight vector under the condition that ∥wt −ηtgf t ∥≤˜λ. This condition is rather more stringent for sparsity than the condition for ℓ1, so it is unlikely to hold in high dimensions. However, it does constitute a very important building block when using a mixed ℓ1/ℓ2-norm as the regularization, as we show in the sequel. FOBOS with ℓ∞regularization: We now turn to a less explored regularization function, the ℓ∞ norm of w. Our interest stems from the recognition that there are settings in which it is desirable to consider blocks of variables as a group (see below). We wish to obtain an efficient solution to min w 1 2∥w −v∥2 + ˜λ ∥w∥∞. (8) A solution to the dual form of Eq. (8) is well established. Recalling that the conjugate of the quadratic function is a quadratic function and the conjugate of the ℓ∞norm is the ℓ1 barrier function, we immediately obtain that the dual of the problem in Eq. (8) is maxα −1 2 ∥α −v∥2 2 s.t. ∥α∥1 ≤ ˜λ. Moreover, the vector of dual variables α satisfies the relation α = v −w. [6] describes a linear time algorithm for finding the optimal α to this ℓ1-constrained projection, and the analysis there shows the optimal solution to Eq. (8) is wt+1,j = sign(wt+ 1 2 ,j) min{|wt+ 1 2 ,j|, θ}. The optimal solution satisfies θ = 0 iff ∥wt+ 1 2 ∥1 ≤˜λ, and otherwise θ > 0 and can be found in O(n) steps. Mixed norms: We saw above that when using either the ℓ2 or the ℓ∞norm as the regularizer we obtain an all zeros vector if ||wt+ 1 2 ||2 ≤˜λ or ||wt+ 1 2 ||1 ≤˜λ, respectively. This phenomenon can be useful. For example, in multiclass categorization problems each class s may be associated with a different weight vector ws. The prediction for an instance x is a vector w1, x , . . . , wk, x , where k is the number of classes, and the predicted class is argmaxj wj, x . Since all the weight vectors operate over the same instance space, it may be beneficial to tie the weights corresponding to the same input feature: we would to zero the row of weights w1 j, . . . , wk j simultaneously. Formally, let W represent an n×k matrix where the jth column of the matrix is the weight vector wj associated with class j. Then the ith row contains weight of the ith feature for each class. The mixed ℓr/ℓs-norm [9] of W is obtained by computing the ℓs-norm of each row of W and then applying the ℓr-norm to the resulting n dimensional vector, for instance, ∥W∥ℓ1/ℓ∞= Pn j=1 maxj |Wi,j|. In a mixed-norm regularized optimization problem, we seek the minimizer of f(W) + λ ∥W∥ℓr/ℓs. Given the specific variants of norms described above, the FOBOS update for the ℓ1/ℓ∞and the ℓ1/ℓ2 mixed-norms is readily available. Let ¯ws be the sth row of W. Analogously to standard norm-based regularization, we use the shorthand V = Wt+ 1 2 . For the ℓ1/ℓp mixed-norm, we need to solve min W 1 2 ∥W −V ∥2 Fr + ˜λ ∥W∥ℓ1/ℓp ≡ min ¯w1,..., ¯wk n X i=1 1 2 ¯wi −¯vi 2 2 + ˜λ ¯wi p  (9) where ¯vi is the ith row of V . It is immediate to see that the problem given in Eq. (9) is decomposable into n separate problems of dimension k, each of which can be solved by the procedures described in the prequel. The end result of solving these types of mixed-norm problems is a sparse matrix with numerous zero rows. We demonstrate the merits of FOBOS with mixed-norms in Sec. 6. 5 5 Efficient implementation in high dimensions In many settings, especially online learning, the weight vector wt and the gradients gf t reside in a very high-dimensional space, but only a relatively small number of the components of gf t are nonzero. Such settings are prevalent, for instance, in text-based applications: in text categorization, the full dimension corresponds to the dictionary or set of tokens that is being employed while each gradient is typically computed from a single or a few documents, each of which contains words and bigrams constituting only a small subset of the full dictionary. The need to cope with gradient sparsity becomes further pronounced in mixed-norm problems, as a single component of the gradient may correspond to an entire row of W. Updating the entire matrix because a few entries of gf t are non-zero is clearly undesirable. Thus, we would like to extend our methods to cope efficiently with gradient sparsity. For concreteness, we focus in this section on the efficient implementation of ℓ1, ℓ2, and ℓ∞regularization, since the extension to mixed-norms (as in the previous section) is straightforward. We postpone the proof of the following proposition to Appendix C. Proposition 4. Let wT be the end result of solving a succession of T self-similar optimization problems for t = 1, . . . , T, P.1 : wt = argmin w 1 2∥w −wt−1∥2 + λt∥w∥q . (10) Let w⋆be the optimal solution of the following optimization problem, P.2 : w⋆= argmin w 1 2∥w −w0∥2 + T X t=1 λt ! ∥w∥q . (11) For q ∈{1, 2, ∞} the vectors wT and w⋆are identical. The algorithmic consequence of Proposition 4 is that it is possible to perform a lazy update on each iteration by omitting the terms of wt (or whole rows of the matrix Wt when using mixed-norms) that are outside the support of gf t , the gradient of the loss at iteration t. We do need to maintain the stepsizes used on each iteration and have them readily available on future rounds when we newly update coordinates of w or W. Let Λt denote the sum of the step sizes times regularization multipliers ληt used from round 1 through t. Then a simple algebraic manipulation yields that instead of solving wt+1 = argminw n 1 2 ∥w −wt∥2 2 + ληt∥w∥q o repeatedly when wt is not changing, we can simply cache the last time t0 that w (or a coordinate in w or a row from W) was updated and, when it is needed, solve wt+1 = argminw n 1 2 ∥w −wt∥2 2 + (Λt −Λt0)∥w∥q o . The advantage of the lazy evaluation is pronounced when using mixed-norm regularization as it lets us avoid updating entire rows so long as the row index corresponds to a zero entry of the gradient gf t . In sum, at the expense of keeping a time stamp t for each entry of w or row of W and maintaining the cumulative sums Λ1, Λ2, . . ., we get O(k) updates of w when the gradient gf t has only k non-zero components. 6 Experiments In this section we compare FOBOS to state-of-the-art optimizers to demonstrate its relative merits and weaknesses. We perform more substantial experiments in the full version of the paper [13]. ℓ2 2 and ℓ1-regularized experiments: We performed experiments using FOBOS to solve both ℓ1 and ℓ2-regularized learning problems. For the ℓ2-regularized experiments, we compared FOBOS to Pegasos [14], a fast projected gradient solver for SVM. Pegasos was originally implemented and evaluated on SVM-like problems by using the the hinge-loss as the empirical loss function along with an ℓ2 2 regularization term, but it can be straightforwardly extended to the binary logistic loss function. We thus experimented with both f(w) = m X i=1 [1 −yi ⟨xi, w⟩]+ (hinge) and f(w) = m X i=1 log  1 + e−yi⟨xi,w⟩ (logistic) as loss functions. To generate data for our experiments, we chose a vector w with entries distributed normally with 0 mean and unit variance, while randomly zeroing 50% of the entries in the vector. 6 10 20 30 40 50 60 70 10 −3 10 −2 10 −1 10 0 10 1 10 2 Number of Operations f(wt) − f(w*) L2 Folos Pegasos 0 20 40 60 80 100 120 140 160 180 10 −2 10 −1 10 0 Approximate Operations f(wt) + r(wt) − f(w*) − r(w*) L2 Folos Pegasos 10 20 30 40 50 60 70 80 10 −5 10 −4 10 −3 10 −2 10 −1 10 0 Approximate Operations f(wt) + r(wt) − f(w*) − r(w*) L2 Folos Pegasos Figure 1: Comparison of FOBOS with Pegasos on the problems of logistic regression (left and right) and SVM (middle). The rightmost plot shows the performance of the algorithms without projection. The examples xi ∈Rn were also chosen at random with entries normally distributed. To generate target values, we set yi = sign(⟨xi, w⟩), and flipped the sign of 10% of the examples to add label noise. In all experiments, we used 1000 training examples of dimension 400. The graphs of Fig. 1 show (on a log-scale) the regularized empirical loss of the algorithms minus the optimal value of the objective function. These results were averaged over 20 independent runs of the algorithms. In all experiments with the regularizer 1 2λ ∥w∥2 2, we used step size ηt = λ/t to achieve logarithmic regret. The two left graphs of Fig. 1 show that FOBOS performs comparably to Pegasos on the logistic loss (left figure) and hinge (SVM) loss (middle figure). Both algorithms quickly approach the optimal value. In these experiments we let both Pegasos and FOBOS employ a projection after each gradient step into a 2-norm ball containing w⋆(see [14]). However, in the experiment corresponding to the rightmost plot of Fig. 1, we eliminated this additional projection step and ran the algorithms with the logistic loss. In this case, FOBOS slightly outperforms Pegasos. We hypothesize that the slightly faster rate of FOBOS is due to the explicit shrinkage that FOBOS performs in the ℓ2 update (see Eq. (7)). In the next experiment, whose results are given in Fig. 2, we solved ℓ1-regularized logistic regression problems. We compared FOBOS to a simple subgradient method, where the subgradient of the λ ∥w∥1 term is simply λ sign(w)), and a fast interior point (IP) method which was designed specifically for solving ℓ1-regularized logistic regression [15]. On the left side of Fig. 2 we show the objective function (empirical loss plus the ℓ1 regularization term) obtained by each of the algorithms minus the optimal objective value. We again used 1000 training examples of dimension 400. The learning rate was set to ηt ∝1/ √ t. The standard subgradient method is clearly much slower than the other two methods even though we chose the initial step size for which the subgradient method converged the fastest. Furthermore, the subgradient method does not achieve any sparsity along its entire run. FOBOS quickly gets close to the optimal value of the objective function, but eventually the specialized IP method’s asymptotically faster convergence causes it to surpass FOBOS. In order to obtain a weight vector wt such that f(wt) −f(w⋆) ≤10−2, FOBOS works very well, though the IP method enjoys faster convergence rate when the weight vector is very close to optimal solution. However, the IP algorithm was specifically designed to minimize empirical logistic loss with ℓ1 regularization whereas FOBOS enjoys a broad range of applicable settings. The middle plot in Fig. 2 shows the sparsity levels (fraction of non-zero weights) achieved by FOBOS as a function of the number of iterations of the algorithm. Each line represents a different synthetic experiment as λ is modified to give more or less sparsity to the solution vector w⋆. The results show that FOBOS quickly selects the sparsity pattern of w⋆, and the level of sparsity persists throughout its execution. We found this sparsity pattern common to non-stochastic versions of FOBOS we tested. Mixed-norm experiments: Our experiments with mixed-norm regularization (ℓ1/ℓ2 and ℓ1/ℓ∞) focus mostly on sparsity rather than on the speed of minimizing the objective. Our restricted focus is a consequence of the relative paucity of benchmark methods for learning problems with mixednorm regularization. Our methods, however, as described in Sec. 4, are quite simple to implement, and we believe could serve as benchmarks for other methods to solve mixed-norm problems. Our experiments compared multiclass classification with ℓ1, ℓ1/ℓ2, and ℓ1/ℓ∞regularization on the MNIST handwritten digit database and the StatLog Landsat Satellite dataset [16]. The MNIST database consists of 60,000 training examples and a 10,000 example test set with 10 classes. Each digit is a 28 × 28 gray scale image represented as a 784 dimensional vector. Linear classifiers 7 10 20 30 40 50 60 70 80 90 100 110 10 −2 10 −1 10 0 10 1 Number of Operations f(wt) − f(w*) L1 Folos L1 IP L1 Subgrad 10 20 30 40 50 60 70 80 90 100 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Folos Steps Sparsity Proportion Figure 2: Left: Performance of FOBOS, a subgradient method, and an interior point method on ℓ1regularized logistic regularization. Left: sparsity level achieved by FOBOS along its run. 0 100 200 300 400 500 600 700 800 900 1000 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 Test Error 10% NNZ 10% Test Error 20% NNZ 20% Test Error 100% NNZ 100% 0 100 200 300 400 500 600 700 800 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Figure 3: Left: FOBOS sparsity and test error for LandSat dataset with ℓ1-regularization. Right: FOBOS sparsity and test error for MNIST dataset with ℓ1/ℓ2-regularization. do not perform well on MNIST. Thus, rather than learning weights for the original features, we learn the weights for classifier with Gaussian kernels, where value of the jth feature for the ith example is xij = K(zi, zj) = e−1 2 ∥zi−zj∥2. For the LandSat dataset we attempt to classify 3 × 3 neighborhoods of pixels in a satellite image as a particular type of ground, and we expanded the input 36 features into 1296 features by taking the product of all features. In the left plot of Fig. 3, we show the test set error and row sparsity in W as a function of training time (number of single-example gradient calculations) for the ℓ1-regularized multiclass logistic loss with 720 training examples. The green lines show results for using all 720 examples to calculate the gradient, black using 20% of the examples, and blue using 10% of the examples to perform stochastic gradient. Each used the same learning rate ηt, and the reported results are averaged over 5 independent runs with different training data. The righthand figure shows a similar plot but for MNIST with 10000 training examples and ℓ1/ℓ2-regularization. The objective value in training has a similar contour to the test loss. It is interesting to note that very quickly, FOBOS with stochastic gradient descent gets to its minimum test classification error, and as the training set size increases this behavior is consistent. However, the deterministic version increases the level of sparsity throughout its run, while the stochastic-gradient version has highly variable sparsity levels and does not give solutions as sparse as the deterministic counterpart. The slowness of nonstochastic gradient mitigates this effect for the larger sample size on MNIST in the right figure, but for longer training times, we do indeed see similar behavior. For comparison of the different regularization approaches, we report in Table 1 the test error as a function of row sparsity of the learned matrix W. For the LandSat data, we see that using the block ℓ1/ℓ2 regularizer yields better performance for a given level of structural sparsity. However, on the MNIST data the ℓ1 regularization and the ℓ1/ℓ2 achieve comparable performance for each level of structural sparsity. Moreover, for a given level of structural sparsity, the ℓ1-regularized solution matrix W attains significantly higher overall sparsity, roughly 90% of the entries of each non-zero row are zero. The performance on the different datasets might indicate that structural sparsity is effective only when the set of parameters indeed exhibit natural grouping. % Non-zero ℓ1 Test ℓ1/ℓ2 Test ℓ1/ℓ∞Test ℓ1 Test ℓ1/ℓ2 Test ℓ1/ℓ∞Test 5 .43 .29 .40 .37 .36 .47 10 .30 .25 .30 .26 .26 .31 20 .26 .22 .26 .15 .15 .24 40 .22 .19 .22 .08 .08 .16 Table 1: LandSat (left) and MNIST (right) classification error versus sparsity 8 References [1] D.P. Bertsekas. Nonlinear Programming. Athena Scientific, 1999. [2] P. Zhao and B. Yu. On model selection consistency of Lasso. Journal of Machine Learning Research, 7:2541–2567, 2006. [3] N. Meinshausen and P. B¨uhlmann. High dimensional graphs and variable selection with the Lasso. Annals of Statistics, 34:1436–1462, 2006. [4] S. Wright, R. Nowak, and M. Figueiredo. Sparse reconstruction by separable approximation. In IEEE International Conference on Acoustics, Speech, and Signal Processing, pages 3373– 3376, 2008. [5] P. Combettes and V. Wajs. Signal recovery by proximal forward-backward splitting. Multiscale Modeling and Simulation, 4(4):1168–1200, 2005. [6] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the ℓ1ball for learning in high dimensions. In Proceedings of the 25th International Conference on Machine Learning, 2008. [7] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the Twentieth International Conference on Machine Learning, 2003. [8] E. Hazan, A. Kalai, S. Kale, and A. Agarwal. Logarithmic regret algorithms for online convex optimization. In Proceedings of the Nineteenth Annual Conference on Computational Learning Theory, 2006. [9] G. Obozinski, M. Wainwright, and M. Jordan. High-dimensional union support recovery in multivariate regression. In Advances in Neural Information Processing Systems 22, 2008. [10] J. Langford, L. Li, and T. Zhang. Sparse online learning via truncated gradient. In Advances in Neural Information Processing Systems 22, 2008. [11] S. Shalev-Shwartz and A. Tewari. Stochastic methods for ℓ1-regularized loss minimization. In Proceedings of the 26th International Conference on Machine Learning, 2009. [12] Y. Nesterov. Introductory Lectures on Convex Optimization. Kluwer Academic Publishers, 2004. [13] J. Duchi and Y. Singer. Efficient online and batch learning using forward-backward splitting. Journal of Machine Learning Research, 10:In Press, 2009. [14] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In Proceedings of the 24th International Conference on Machine Learning, 2007. [15] K. Koh, S.J. Kim, and S. Boyd. An interior-point method for large-scale ℓ1-regularized logistic regression. Journal of Machine Learning Research, 8:1519–1555, 2007. [16] D. Spiegelhalter and C. Taylor. Machine Learning, Neural and Statistical Classification. Ellis Horwood, 1994. [17] R.T. Rockafellar. Convex Analysis. Princeton University Press, 1970. 9
2009
98
3,852
L1-Penalized Robust Estimation for a Class of Inverse Problems Arising in Multiview Geometry Arnak S. Dalalyan and Renaud Keriven IMAGINE/LabIGM, Universit´e Paris Est - Ecole des Ponts ParisTech, Marne-la-Vall´ee, France dalalyan,keriven@imagine.enpc.fr Abstract We propose a new approach to the problem of robust estimation in multiview geometry. Inspired by recent advances in the sparse recovery problem of statistics, we define our estimator as a Bayesian maximum a posteriori with multivariate Laplace prior on the vector describing the outliers. This leads to an estimator in which the fidelity to the data is measured by the L∞-norm while the regularization is done by the L1-norm. The proposed procedure is fairly fast since the outlier removal is done by solving one linear program (LP). An important difference compared to existing algorithms is that for our estimator it is not necessary to specify neither the number nor the proportion of the outliers. We present strong theoretical results assessing the accuracy of our procedure, as well as a numerical example illustrating its efficiency on real data. 1 Introduction In the present paper, we are concerned with a class of non-linear inverse problems appearing in the structure and motion problem of multiview geometry. This problem, that have received a great deal of attention by the computer vision community in last decade, consists in recovering a set of 3D points (structure) and a set of camera matrices (motion), when only 2D images of the aforementioned 3D points by some cameras are available. Throughout this work we assume that the internal parameters of cameras as well as their orientations are known. Thus, only the locations of camera centers and 3D points are to be estimated. In solving the structure and motion problem by state-ofthe-art methods, it is customary to start by establishing correspondences between pairs of 2D data points. We will assume in the present study that these point correspondences have been already established. One can think of the structure and motion problem as the inverse problem of inverting the operator O that takes as input the set of 3D points and the set of cameras, and produces as output the 2D images of the 3D points by the cameras. This approach will be further formalized in the next section. Generally, the operator O is not injective, but in many situations (for example, when for each pair of cameras there are at least five 3D points in general position that are seen by these cameras [23]), there is only a small number of inputs, up to an overall similarity transform, having the same image by O. In such cases, the solutions to the structure and motion problem can be found using algebraic arguments. The main flaw of algebraic solutions is their sensitivity to the noise in the data: very often, thanks to the noise in the measurements, there is no input that could have generated the observed output. A natural approach to cope with such situations consists in searching for the input providing the closest possible output to the observed data. Then, a major issue is how to choose the metric in the output space. A standard approach [16] consists in measuring the distance between two elements 1 (a) (b) (c) (d) (e) Figure 1: (a) One image from the dinosaur sequence. Camera locations and scene points estimated by the blind L∞-cost minimization (b,c) and by the proposed “outlier aware” procedure (d,e). of the output space in the Euclidean L2-norm. In the structure and motion problem with more than two cameras, this leads to a hard non-convex optimization problem. A particularly elegant way of circumventing the non-convexity issues inherent to the use of L2-norm consists in replacing it by the L∞-norm [15, 18, 24, 25, 27, 13, 26]. It has been shown that, for a number of problems, L∞-norm based estimators can be computed very efficiently using, for example, the iterative bisection method [18, Algorithm 1, p. 1608] that solves a convex program at each iteration. There is however an issue with the L∞-techniques that dampens the enthusiasm of practitioners: it is highly sensitive to outliers (c.f. Fig. 1). In fact, among all Lq-metrics with q ≥1, the L∞-metric is the most seriously affected by the outliers in the data. Two procedures have been introduced [27, 19] that make the L∞-estimator less sensitive to outliers. Although these procedures demonstrate satisfactory empirical performance, they suffer from a lack of sufficient theoretical support assessing the accuracy of produced estimates. The purpose of the present work is to introduce and to theoretically investigate a new procedure of estimation in presence of noise and outliers. Our procedure combines L∞-norm for measuring the fidelity to the data and L1-norm for regularization. It can be seen as a maximum a posteriori (MAP) estimator under uniformly distributed random noise and a sparsity favoring prior on the vector of outliers. Interestingly, this study bridges the work on the robust estimation in multiview geometry [12, 27, 19, 21] and the theory of sparse recovery in statistics and signal processing [10, 2, 5, 6]. The rest of the paper is organized as follows. The next section gives the precise formulation of the translation estimation and triangulation problem to which the presented methodology can be applied. A brief review of the L∞-norm minimization algorithm is presented in Section 3. In Section 4, we introduce the statistical framework and derive a new procedure as a MAP estimator. The main result on the accuracy of this procedure is stated and proved in Section 5, while Section 6 contains some numerical experiments. The methodology of our study is summarized in Section 7. 2 Translation estimation and triangulation Let us start by presenting a problem of multiview geometry to which our approach can be successfully applied, namely the problem of translation estimation and triangulation in the case of known rotations. For rotation estimation algorithms, we refer the interested reader to [22, 14] and the references therein. Let P∗ i , i = 1, . . . , m, be a sequence of m cameras that are known up to a translation. Recall that a camera is characterized by a 3×4 matrix P with real entries that can be written as P = K[R|t], where K is an invertible 3 × 3 matrix called the camera calibration matrix, R is a 3 × 3 rotation matrix and t ∈R3. We will refer to t as the translation of the camera P. We can thus write P∗ i = Ki[Ri|t∗ i ], i = 1, . . . , m. For a set of unknown scene points U∗ j,, j = 1, . . . , n, expressed in homogeneous coordinates (i.e., U∗ j is an element of the projective space P3), we assume that noisy images of each U∗ j by some cameras P∗ i are observed. Thus, we have at our disposal the measurements xij = 1 eT 3 P∗ i U∗ j eT 1 P∗ i U∗ j eT 2 P∗ i U∗ j  + ξij, j = 1, . . . , n, i ∈Ij, (1) where eℓ, ℓ= 1, 2, 3, stands for the unit vector of R3 having one as the ℓth coordinate and Ij is the set of indices of cameras for which the point U∗ j is visible. We assume that the set {U∗ j} does not contain points at infinity: U∗ j = [X∗T j |1]T for some X∗ j ∈R3 and for every j = 1, . . . , n. 2 We are now in a position to state the problem of translation estimation and triangulation in the context of multiview geometry. It consists in recovering the 3-vectors {t∗ i } (translation estimation) and the 3D points {X∗ j} (triangulation) from the noisy measurements {xij; j = 1, . . . , n; i ∈Ij} ⊂ R2. In what follows, we use the notation θ∗= (t∗T 1 , . . . , t∗T m , X∗T 1 , . . . , X∗T n )T ∈R3(m+n). Thus, we are interested in estimating θ∗. Remark 1 (Cheirality). It should be noted right away that if the point U∗ j is in front of the camera P∗ i , then eT 3 P∗ i U∗ j ≥0. This is termed cheirality condition. Furthermore, we will assume that none of the true 3D points U∗ j lies on the principal plane of a camera P∗ i . This assumption implies that eT 3 P∗ i U∗ j > 0 so that the quotients eT ℓP∗ i U∗ j/eT 3 P∗ i U∗ j, ℓ= 1, 2, are well defined. Remark 2 (Identifiability). The parameter θ we have just defined is, in general, not identifiable from the measurements {xij}. In fact, one easily checks that, for every α ̸= 0 and for every t ∈R3, the parameters {t∗ i , X∗ j} and {α(t∗ i −Rit), α(X∗ j +t)} generate the same measurements. To cope with this issue, we assume that t∗ 1 = 03 and that mini,j eT 3 P∗ i U∗ j = 1. Thus, in what follows we assume that t∗ 1 is removed from θ∗and θ∗∈R3(m+n−1). Further assumptions ensuring the identifiability of θ∗are given below. 3 Estimation by Sequential Convex Programming This section presents results on the estimation of θ based on the reprojection error (RE) minimization. This material is essential for understanding the results that are at the core of the present work. In what follows, for every s ≥1, we denote by ∥x∥s the Ls-norm of a vector x, i.e.∥x∥s s = P j |xj|s if x = (x1, . . . , xd)T. As usual, we extend this to s = +∞by setting ∥x∥∞= maxj |xj|. A classical method [16] for estimating the parameter θ is based on minimizing the sum of the squared REs. This defines the estimator bθ as a minimizer of the cost function C2,2(θ) = P i,j ∥xij − xij(θ)∥2 2, where xij(θ) :=  eT 1 PiUj; eT 2 PiUj T/eT 3 PiUj is the 2-vector that we would obtain if θ were the true parameter. It can also be written as xij(θ) = eT 1 Ki(RiXj + ti) eT 3 Ki(RiXj + ti); eT 2 Ki(RiXj + ti) eT 3 Ki(RiXj + ti) T . (2) The minimization of C2,2 is a hard nonconvex problem. In general, it does not admit closed-form solution and the existing iterative algorithms may often get stuck in local minima. An ingenious idea to overcome this difficulty [15, 17] is based on the minimization of the L∞cost function C∞,s(θ) = max j=1,...,n max i∈Ij ∥xij −xij(θ)∥s, s ∈[1, +∞]. (3) Note that the substitution of the L2-cost function by the L∞-cost function has been proved to lead to improved algorithms in other estimation problems as well, cf., e.g., [8]. This cost function has a clear practical advantage in that all its sublevel sets are convex. This property ensures that all minima of C∞,s form a convex set and that an element of this set can be computed by solving a sequence of convex programs [18], e.g., by the bisection algorithm. Note that for s = 1 and s = +∞, the minimization of C∞,s can be recast in a sequence of LPs. The main idea behind the bisection algorithm can be summarized as follows. We aim to designate an algorithm computing bθs ∈arg minθ C∞,s(θ), for any prespecified s ≥1, over the set of all vectors θ satisfying the cheirality condition. Let us introduce the residuals rij(θ) = xij −xij(θ) that can be represented as rij(θ) = aT ij1θ cT ijθ ; aT ij2θ cT ijθ T , (4) for some vectors aijℓ, cij ∈R2. Furthermore, as presented in Remark 2, the cheirality conditions imply the set of linear constraints cT ijθ ≥1. Thus, the problem of computing bθs can be rewritten as minimize γ subject to ∥rij(θ)∥s ≤γ, cT ijθ ≥1. (5) Note that the inequality ∥rij(θ)∥s ≤γ can be replaced by ∥AT ijθ∥s ≤γcT ijθ with Aij = [aij1; aij2]. Although (5) is not a convex problem, its solution can be well approximated by solving a sequence of convex feasibility problems. 3 4 Robust estimation by linear programming This and the next sections contain the main theoretical contribution of the present work. We start with the precise formulation of the statistical model. We then exhibit a prior distribution on the unknown parameters of the model that leads to a MAP estimator. 4.1 The statistical model Let us first observe that, in view of (1) and (4), the model we are considering can be rewritten as aT ij1θ∗ cT ijθ∗; aT ij2θ∗ cT ijθ∗ T = ξij, j = 1, . . . , n; i ∈Ij. (6) Let N = 2 Pn j=1 Ij be the total number of measurements and let M = 3(n + m −1) be the size of the vector θ∗. Let us denote by A (resp. C) the M × N matrix formed by the concatenation of the column-vectors aijℓ(resp. cij1). Similarly, let us denote by ξ the N-vector formed by concatenating the vectors ξij. In these notation, Eq. (6) is equivalent to aT pθ∗= (cT pθ∗)ξp, p = 1, . . . , N. This equation defines the statistical model in the case where there is no outlier. To extend this model to cover the situation where some outliers are present in the measurements, we introduce the vector ω∗∈RN defined by ω∗ p = aT pθ∗−(cT pθ∗)ξp so that ω∗ p = 0 if the pth measurement is an inlier and |ω∗ p| > 0 otherwise. This leads us to the model: ATθ∗= ω∗+ diag(CTθ∗)ξ, (7) where diag(v) stands for the diagonal matrix having the components of v as diagonal entries. Statement of the problem: Given the matrices A and C, estimate the parameter-vector β∗= [θ∗T; ω∗T]T based on the following prior information: C1 : Eq. (7) holds with some small noise vector ξ, C2 : minp cT pθ∗= 1, C3 : ω∗is sparse, i.e., only a small number of coordinates of ω∗are different from zero. 4.2 Sparsity prior and MAP estimator To derive an estimator of the parameter β∗, we place ourselves in the Bayesian framework. To this end, we impose a probabilistic structure on the noise vector ξ and introduce a prior distribution on the unknown vector β. Since the noise ξ represents the difference (in pixels) between the measurements and the true image points, it is naturally bounded and, generally, does not exceeds the level of a few pixels. Therefore, it is reasonable to assume that the components of ξ are uniformly distributed in some compact set of R2, centered at the origin. We assume in what follows that the subvectors ξij of ξ are uniformly distributed in the square [−σ, σ]2 and are mutually independent. Note that this implies that all the coordinates of ξ are independent. In practice, this assumption can be enforced by decorrelating the measurements using the empirical covariance matrix [20]. We define the prior on θ as the uniform distribution on the polytope P = {θ ∈RM : CTθ ≥1}, where the inequality is understood componentwise. The density of this distribution is p1(θ) ∝1P(θ), where ∝stands for the proportionality relation and 1P(θ) = 1 if θ ∈P and 0 otherwise. When P is unbounded, this results in an improper prior, which is however not a problem for defining the Bayes estimator. The task of choosing a prior on ω is more delicate in that it should reflect the information that ω is sparse. The most natural prior would be the one having a density which is a decreasing function of the L0-norm of ω, i.e., of the number of its nonzero coefficients. However, the computation of estimators based on this type of priors is NP-hard. An approach for overcoming this difficulty relies on using the L1-norm instead of the L0-norm. Following this idea, we define the prior distribution on ω by the probability density p2(ω) ∝f(∥ω∥1), where f is some decreasing function2 defined on [0, ∞). Assuming in addition that θ and ω are independent, we get the following prior on β: π(β) = π(θ; ω) ∝1P(θ) · f(∥ω∥1). (8) 1To get a matrix of the same size as A, in the matrix C each column is duplicated two times. 2The most common choice is f(x) = e−x corresponding to the multivariate Laplace density. 4 Theorem 1. Assume that the noise ξ has independent entries which are uniformly distributed in [−σ, σ] for some σ > 0, then the MAP estimator bβ = [bθT; bωT]T based on the prior π defined by Eq. (8) is the solution of the optimization problem: minimize ∥ω∥1 subject to |aT pθ −ωp| ≤σcT pθ, ∀p cT pθ ≥1, ∀p. (9) The proof of this theorem is a simple exercise and is left to the reader. Remark 3 (Condition C2). One easily checks that any solution of (9) satisfies condition C2. Indeed, if for some solution bβ it were not the case, then ˜β = bβ/ minp cT p bθ would satisfy the constraints of (9) and ˜ω would have a smaller L1-norm than that of bω, which is in contradiction with the fact that bβ solves (9). Remark 4 (The role of σ). In the definition of bβ, σ is a free parameter that can be interpreted as the level of separation of inliers from outliers. The proposed algorithm implicitly assumes that all the measurements xij for which ∥ξij∥∞> σ are outliers, while all the others are treated as inliers. If σ is unknown, a reasonable way of acting is to impose a prior distribution on the possible values of σ and to define the estimator bβ as a MAP estimator based on the prior incorporating the uncertainty on σ. When there are no outliers and the prior on σ is decreasing, this approach leads to the estimator minimizing the L∞cost function. In the presence of outliers, the shape of the prior on σ becomes more important for the definition of the estimator. This is an interesting point for future investigation. 4.3 Two-step procedure Building on the previous arguments, we introduce the following two-step algorithm. Input: {ap, cp; p = 1, . . . , N} and σ. Step 1: Compute [bθT; bωT]T as a solution to (9) and set J = {p : bωp = 0} . Step 2: Apply the bisection algorithm to the reduced data set {xp; p ∈J}. Two observations are in order. First, when applying the bisection algorithm at Step 2, we can use C∞,s(bθ) as the initial value of γu. The second observation is that a better way of acting would be to minimize the weighted L1-norm of ω, where the weight assigned to ωp is inversely proportional to the depth cT pθ∗. Since θ∗is unknown, a reasonable strategy consists in adding a step in between Step 1 and Step 2, which performs the weighted minimization with weights {(cT p bθ)−1; p = 1, . . . , N}. 5 Accuracy of estimation Let us introduce some additional notation. Recall the definition of P and set ∂P = {θ : minp cT p θ = 1} and ∆P∗= {θ −θ′ : θ, θ′ ∈∂P, θ ̸= θ}. For every subset of indices J ⊂{1, . . . , N}, we denote by AJ the M ×N matrix obtained from A by replacing the columns that have an index outside J by zero. Furthermore, let us define δJ(θ) = sup θ′∈∂P,ATθ′̸=ATθ ∥AT J(θ′ −θ)∥2 ∥AT(θ′ −θ)∥2 , ∀J ⊂{1, . . . , N}, ∀θ ∈∂P. (10) One easily checks that δJ ∈[0, 1] and δJ ≤δJ′ if J ⊂J′. Assumption A: The real number λ defined by λ = ming∈∆P∗∥ATg∥2/∥g∥2 is strictly positive. Assumption A is necessary for identifying the parameter vector θ∗even in the case without outliers. In fact, if ω∗= 0, and if Assumption A is not fulfilled, then3 ∃g ∈∆P∗such that ATg = 0. That is, given the matrices A and C, there are two distinct vectors θ1 and θ2 in ∂P such that ATθ1 = ATθ2. Therefore, if eventually θ1 is the true parameter vector satisfying C1 and C3, then θ2 satisfies these conditions as well. As a consequence, the true vector cannot be accurately estimated. 3We assume for simplicity that ∂P is compact. 5 5.1 The noise free case To evaluate the quality of estimation, we first place ourselves in the case where σ = 0. The estimator bβ of β∗is then defined as a solution to the optimization problem min ∥ω∥1 over β =  θ ω  s.t.  ATθ = ω CTθ ≥1 . (11) From now on, for every index set T and for every vector h, hT stands for the vector equal to h on an index set T and zero elsewhere. The complementary set of T will be denoted by T c. Theorem 2. Let Assumption A be fulfilled and let T0 (resp. T1) denote the index set corresponding to the locations of S largest entries4 of ω∗(resp. (ω∗−bω)T c 0 ). If δT0(θ∗) + δT0∪T1(θ∗) < 1 then, for some constant C0, it holds: ∥bβ −β∗∥2 ≤C0∥ω∗−ω∗ S∥1, (12) where ω∗ S stands for the vector ω∗with all but the S-largest entries set to zero. In particular, if ω∗ has no more than S nonzero entries, then the estimation is exact: bβ = β∗. Proof. We set h = ω∗−bω and g = θ∗−bθ. It follows from Remark 3 that g ∈∆P. To proceed with the proof, we need the following auxiliary result, the proof of which can be easily deduced from [4]. Lemma 1. Let v ∈Rd be some vector and let S ≤d be a positive integer. If we denote by T the indices of S largest entries of the vector |v|, then ∥vT c∥2 ≤S−1/2∥v∥1. Applying Lemma 1 to the vector v = hT c 0 and to the index set T = T1, we get ∥h(T0∪T1)c∥2 ≤S−1/2∥hT c 0 ∥1. (13) On the other hand, summing up the inequalities ∥hT c 0 ∥1 ≤∥(ω∗−h)T c 0 ∥1 +∥ω∗ T c 0 ∥1 and ∥ω∗ T0∥1 ≤ ∥(ω∗−h)T0∥1 + ∥hT0∥1, and using the relation ∥(ω∗−h)T0∥1 + ∥(ω∗−h)T c 0 ∥1 = ∥ω∗−h∥1 = ∥bω∥1, we get ∥hT c 0 ∥1 + ∥ω∗ T0∥1 ≤∥bω∥1 + ∥ω∗ T c 0 ∥1 + ∥hT0∥1. (14) Since β∗satisfies the constraints of the optimization problem (11) a solution of which is bβ, we have ∥bω∥1 ≤∥ω∗∥1. This inequality, in conjunction with (13) and (14), implies ∥h(T0∪T1)c∥2 ≤S−1/2∥hT0∥1 + 2S−1/2∥ω∗ T c 0 ∥1 ≤∥hT0∥2 + 2S−1/2∥ω∗ T c 0 ∥1, (15) where the last step follows from the Cauchy-Schwartz inequality. Using once again the fact that both bβ and β∗satisfy the constraints of (11), we get h = ATg. Therefore, ∥h∥2 ≤∥hT0∪T1∥2 + ∥h(T0∪T1)c∥2 ≤∥hT0∪T1∥2 + ∥hT0∥2 + 2S−1/2∥ω∗ T c 0 ∥1 = ∥AT T0∪T1g∥2 + ∥AT T0g∥2 + 2S−1/2∥ω∗ T c 0 ∥1 ≤(δ2S + δS)∥ATg∥2 + 2S−1/2∥ω∗ T c 0 ∥1 = (δ2S + δS)∥h∥2 + 2S−1/2∥ω∗ T c 0 ∥1. (16) Since ω∗ T c 0 = ω∗−ωS, the last inequality yields ∥h∥2 ≤ 2S−1/2/(1 −δS −δ2S)  ∥ω∗−ω∗ S∥1. To complete the proof, it suffices to observe that ∥bβ −β∗∥2 ≤∥g∥2 + ∥h∥2 ≤λ−1∥Ag∥2 + ∥h∥2 = λ−1 + 1  ∥h∥2 ≤C0∥ω∗−ω∗ S∥1. Remark 5. The assumption δT0(θ∗) + δT0∪T1(θ∗) < 1 is close in spirit to the restricted isometry assumption (cf., e.g., [10, 6, 3] and the references therein). It is very likely that results similar to that of Theorem 2 hold under other kind of assumptions recently introduced in the theory of L1minimization [11, 29, 2]. This investigation is left for future research. We emphasize that the constant C0 is rather small. For example, if δT0(θ∗) + δT0∪T1(θ∗) = 0.5, then max(∥bω −ω∗∥2, ∥AT(bθ −θ∗)∥2) ≤(4/ √ S)∥ω∗−ω∗ S∥1. 4in absolute value 6 5.2 The noisy case The assumption σ = 0 is an idealization of the reality that has the advantage of simplifying the mathematical derivations. While such a simplified setting is useful for conveying the main ideas behind the proposed methodology, it is of major practical importance to discuss the extensions to the more realistic noisy model. To this end, we introduce the vector bξ of estimated residuals satisfying ATbθ = bω + diag(CTbθ) bξ and ∥bξ∥∞≤σ. Theorem 3. Let the assumptions of Theorem 2 be fulfilled. If for some ϵ > 0 we have max(∥diag(CTbθ)bξ∥2; ∥diag(CTθ∗)ξ∥2) ≤ϵ, then ∥bβ −β∗∥2 ≤C0∥ω∗−ω∗ S∥1 + C1ϵ (17) where C0 and C1 are some constants. Proof. Let us define η = diag(CTθ∗)ξ and bη = diag(CTbθ)bξ. On the one hand, in view of (15), we have ∥h(T0∪T1)c∥2 ≤∥hT0∥2 + 2S−1/2∥ω∗ T c 0 ∥1 with h = ω∗−bω. On the other hand, since h = ATg + bη −η, we have ∥h(T0∪T1)c∥2 ≥∥AT (T0∪T1)cg∥2 −∥bη(T0∪T1)c∥2 −∥η(T0∪T1)c∥2 ≥∥AT (T0∪T1)cg∥2 −2ϵ and ∥hT0∥2 ≤∥AT T0g∥2 + ∥bηT0∥2 + ∥ηT0∥2 ≤∥AT T0g∥2 + 2ϵ. These inequalities imply that ∥ATg∥2 ≤∥AT T0∪T1g∥2 + ∥AT T0g∥2 + 4ϵ + 2S−1/2∥ω∗ T c 0 ∥1 ≤(δT0∪T1 + δT0)∥ATg∥2 + 4ϵ + 2S−1/2∥ω∗ T c 0 ∥1. To complete the proof, it suffices to remark that ∥bβ −β∗∥2 ≤∥h∥2 + ∥g∥2 ≤∥AT g∥2 + ∥g∥2 + 2ϵ ≤(1 + λ−1)∥ATg∥2 + 2ϵ ≤ 1+λ−1 1−δT0∪T1−δT0 (4ϵ + 2S−1/2∥ω∗ T c 0 ∥1). 5.3 Discussion The main assumption in Theorems 2 and 3 is that δT0(θ∗)+δT0∪T1(θ∗) < 1. While this assumption is by no means necessary, it should be recognized that it cannot be significantly relaxed. In fact, the condition δT0(θ∗) < 1 is necessary for θ∗to be consistently estimated. Indeed, if δT0(θ∗) = 1, then it is possible to find θ′ ∈∂P such that AT T c 0 θ∗= AT T c 0 θ′, which makes the problem of robust estimation ill-posed, since both θ∗and θ′ satisfy (7) with the same number of outliers. Note also that the mapping J 7→δJ(θ) is subadditive, that is δJ ∪J′(θ) ≤δJ(θ) + δJ′(θ). Therefore, the condition of Thm. 2 is fulfilled as soon as δJ(θ∗) < 1/3 for every index set J of cardinality ≤S. Thus, the condition maxJ:|J|≤S δS(θ∗) < 1/3 is sufficient for identifying θ∗in presence of S outliers, while maxJ:|J|≤S δS(θ∗) < 1 is necessary. A simple upper bound on δJ, obtained by replacing the sup over ∂P by the sup over RM, is δJ(θ) ≤ ∥OT J∥, ∀θ ∈∂P, where O = O(A) stands for the Rank(A)×N matrix with orthonormal rows spanning the image of AT. The matrix norm is understood as the largest singular value. Note that for a given J, the computation of ∥OT J∥is far easier than that of δJ(θ). We emphasize that the model we have investigated comprises the robust linear model as a particular case. Indeed, if the last row of the matrix A is equal to zero as well as all the rows of C except the last row which that has all the entries equal to one, then the model described by (7) is nothing else but a linear model with unknown noise variance. To close this section, let us stress that other approaches (cf., for instance, [9, 7, 1]) recently introduced in sparse learning and estimation may potentially be useful for the problem of robust estimation. 6 Numerical illustration We implemented the algorithm in MatLab, using the SeDuMi package for solving LPs [28]. We applied our algorithm of robust estimation to the well-known dinosaur sequence 5. which consists 5http://www.robots.ox.ac.uk/˜vgg/data1.html 7 Figure 2: (a)-(c) Overhead view of the scene points estimated by the KK-procedure (a), by the SHprocedure (b) and by our procedure. (d) Boxplots of the errors when estimating the camera centers by our procedure (left) and by the KK-procedure. (e) Boxplots of the errors when estimating the camera centers by our procedure (left) and by the SH-procedure. of 36 images of a dinosaur on a turntable, see Fig. 1 (a) for one example. The 2D image points which are tracked across the image sequence and the projection matrices of 36 cameras are provided as well. There are 16,432 image points corresponding to 4,983 scene points. This data is severely affected by outliers which results in a very poor accuracy of the “blind” L∞-cost minimization procedure. Its maximal RE equals 63 pixel and, as shown in Fig. 1, the estimated camera centers are not on the same plane and the scatter plot of scene points is inaccurate. We ran our procedure with σ = 0.5 pixel. If for pth measurement |ωp/cT pθ| was larger than σ/4, then the it has been considered is an outlier and removed from the dataset. The corresponding 3D scene point was also removed if, after the step of outlier removal, it was seen by only one camera. This resulted in removing 1, 306 image points and 297 scene points. The plots (d) and (e) of Fig. 1 show the estimated camera centers and estimated scene points. We see, in particular, that the camera centers are almost coplanar. Note that in this example, the second step of the procedure described in Section 4.3 does not improve on the estimator computed at the first step. Thus, an accurate estimate is obtained by solving only one linear program. We compared our procedure with the procedures proposed by Sim and Hartley [27], hereafter referred to as SH-procedure, and by Kanade and Ke [19], hereafter KK-procedure. For the SHprocedure, we iteratively computed the L∞-cost minimizer by removing, at each step j, the measurements that had a RE larger than Emax,j −0.5ϵ, where Emax,j was the largest RE. We have stopped the SH-procedure when the number of removed measurements exceeded 1,500. This number has been attained after 53 cycles. Therefore, the execution time was approximately 50 times larger than for our procedure. The estimator obtained by SH-procedure has a maximal RE equal to 1.33 pixel, whereas the maximal RE for our estimator is of 0.62 pixel. Concerning the KKprocedure, we run it with the parameter value m = N −NO = 15, 000, which is approximately the number of inliers detected by our method. Recall that the KK-procedure aims at minimizing the mth largest RE. As shown in Fig. 2, our procedure performs better than that of [19]. 7 Conclusion In this paper, we presented a rigorous Bayesian framework for the problem of translation estimation and triangulation that have leaded to a new robust estimation procedure. We have formulated the problem under consideration as a nonlinear inverse problem with a high-dimensional unknown parameter-vector. This parameter-vector encapsulates the information on the scene points and the camera locations, as well as the information on the location of outliers in the data. The proposed estimator exploits the sparse nature of the vector of outliers through L1-norm minimization. We have given the mathematical proof of the result demonstrating the efficiency of the proposed estimator under mild assumptions. Real data analysis conducted on the dinosaur sequence supports our theoretical results. Acknowledgments The work of the first author was partially supported by ANR under grants Callisto and Parcimonie. 8 References [1] F. Bach. Bolasso: model consistent Lasso estimation through the bootstrap. In Twenty-fifth International Conference on Machine Learning (ICML), 2008. 7 [2] P. J. Bickel, Y. Ritov, and A. B. Tsybakov. Simultaneous analysis of lasso and Dantzig selector. Ann. Statist., 37(4):1705–1732, 2009. 2, 6 [3] E. Cand`es and T. Tao. The Dantzig selector: statistical estimation when p is much larger than n. Ann. Statist., 35(6):2313–2351, 2007. 6 [4] E. J. Cand`es. The restricted isometry property and its implications for compressed sensing. C. R. Math. Acad. Sci. Paris, 346(9-10):589–592, 2008. 6 [5] E. J. Cand`es and P. A. Randall. Highly robust error correction by convex programming. IEEE Trans. Inform. Theory, 54(7):2829–2840, 2008. 2 [6] E. J. Cand`es, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Comm. Pure Appl. Math., 59(8):1207–1223, 2006. 2, 6 [7] C. Chesneau and M. Hebiri. Some theoretical results on the grouped variables Lasso. Math. Methods Statist., 17(4):317–326, 2008. 7 [8] A. S. Dalalyan, A. Juditsky, and V. Spokoiny. A new algorithm for estimating the effective dimensionreduction subspace. Journal of Machine Learning Research, 9:1647–1678, Aug. 2008. 3 [9] A. S. Dalalyan and A. B. Tsybakov. Aggregation by exponential weighting, sharp PAC-bayesian bounds and sparsity. Machine Learning, 72(1-2):39–61, 2008. 7 [10] D. Donoho, M. Elad, and V. Temlyakov. Stable recovery of sparse overcomplete representations in the presence of noise. IEEE Trans. Inform. Theory, 52(1):6–18, 2006. 2, 6 [11] D. L. Donoho and X. Huo. Uncertainty principles and ideal atomic decomposition. IEEE Trans. Inform. Theory, 47(7):2845–2862, 2001. 6 [12] O. Enqvist and F. Kahl. Robust optimal pose estimation. In ECCV, pages I: 141–153, 2008. 2 [13] R. Hartley and F. Kahl. Optimal algorithms in multiview geometry. In ACCV, volume 1, pages 13 – 34, Nov. 2007. 2 [14] R. Hartley and F. Kahl. Global optimization through rotation space search. IJCV, 2009. 2 [15] R. I. Hartley and F. Schaffalitzky. L∞minimization in geometric reconstruction problems. In CVPR (1), pages 504–509, 2004. 2, 3 [16] R. I. Hartley and A. Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, June 2004. 1, 3 [17] F. Kahl. Multiple view geometry and the L∞-norm. In ICCV, pages 1002–1009. IEEE Computer Society, 2005. 3 [18] F. Kahl and R. I. Hartley. Multiple-view geometry under the L∞norm. IEEE Trans. Pattern Analysis and Machine Intelligence, 30(9):1603–1617, sep 2008. 2, 3 [19] T. Kanade and Q. Ke. Quasiconvex optimization for robust geometric reconstruction. In ICCV, pages II: 986–993, 2005. 2, 8 [20] Q. Ke and T. Kanade. Uncertainty models in quasiconvex optimization for geometric reconstruction. In CVPR, pages I: 1199–1205, 2006. 4 [21] H. D. Li. A practical algorithm for L∞triangulation with outliers. In CVPR, pages 1–8, 2007. 2 [22] D. Martinec and T. Pajdla. Robust rotation and translation estimation in multiview reconstruction. In CVPR, pages 1–8, 2007. 2 [23] D. Nist´er. An efficient solution to the five-point relative pose problem. IEEE Trans. Pattern Anal. Mach. Intell, 26(6):756–777, 2004. 1 [24] C. Olsson, A. P. Eriksson, and F. Kahl. Efficient optimization for L∞problems using pseudoconvexity. In ICCV, pages 1–8, 2007. 2 [25] Y. D. Seo and R. I. Hartley. A fast method to minimize L∞error norm for geometric vision problems. In ICCV, pages 1–8, 2007. 2 [26] Y. D. Seo, H. J. Lee, and S. W. Lee. Sparse structures in L-infinity norm minimization for structure and motion reconstruction. In ECCV, pages I: 780–793, 2008. 2 [27] K. Sim and R. Hartley. Removing outliers using the L∞norm. In CVPR, pages I: 485–494, 2006. 2, 8 [28] J. F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optim. Methods Softw., 11/12(1-4):625–653, 1999. 7 [29] P. Zhao and B. Yu. On model selection consistency of Lasso. J. Mach. Learn. Res., 7:2541–2563, 2006. 6 9
2009
99
3,853
Agnostic Active Learning Without Constraints Alina Beygelzimer IBM Research Hawthorne, NY beygel@us.ibm.com Daniel Hsu Rutgers University & University of Pennsylvania djhsu@rci.rutgers.edu John Langford Yahoo! Research New York, NY jl@yahoo-inc.com Tong Zhang Rutgers University Piscataway, NJ tongz@rci.rutgers.edu Abstract We present and analyze an agnostic active learning algorithm that works without keeping a version space. This is unlike all previous approaches where a restricted set of candidate hypotheses is maintained throughout learning, and only hypotheses from this set are ever returned. By avoiding this version space approach, our algorithm sheds the computational burden and brittleness associated with maintaining version spaces, yet still allows for substantial improvements over supervised learning for classification. 1 Introduction In active learning, a learner is given access to unlabeled data and is allowed to adaptively choose which ones to label. This learning model is motivated by applications in which the cost of labeling data is high relative to that of collecting the unlabeled data itself. Therefore, the hope is that the active learner only needs to query the labels of a small number of the unlabeled data, and otherwise perform as well as a fully supervised learner. In this work, we are interested in agnostic active learning algorithms for binary classification that are provably consistent, i.e. that converge to an optimal hypothesis in a given hypothesis class. One technique that has proved theoretically profitable is to maintain a candidate set of hypotheses (sometimes called a version space), and to query the label of a point only if there is disagreement within this set about how to label the point. The criteria for membership in this candidate set needs to be carefully defined so that an optimal hypothesis is always included, but otherwise this set can be quickly whittled down as more labels are queried. This technique is perhaps most readily understood in the noise-free setting [1, 2], and it can be extended to noisy settings by using empirical confidence bounds [3, 4, 5, 6, 7]. The version space approach unfortunately has its share of significant drawbacks. The first is computational intractability: maintaining a version space and guaranteeing that only hypotheses from this set are returned is difficult for linear predictors and appears intractable for interesting nonlinear predictors such as neural nets and decision trees [1]. Another drawback of the approach is its brittleness: a single mishap (due to, say, modeling failures or computational approximations) might cause the learner to exclude the best hypothesis from the version space forever; this is an ungraceful failure mode that is not easy to correct. A third drawback is related to sample re-usability: if (labeled) data is collected using a version space-based active learning algorithm, and we later decide to use a different algorithm or hypothesis class, then the earlier data may not be freely re-used because its collection process is inherently biased. 1 Here, we develop a new strategy addressing all of the above problems given an oracle that returns an empirical risk minimizing (ERM) hypothesis. As this oracle matches our abstraction of many supervised learning algorithms, we believe active learning algorithms built in this way are immediately and widely applicable. Our approach instantiates the importance weighted active learning framework of [5] using a rejection threshold similar to the algorithm of [4] which only accesses hypotheses via a supervised learning oracle. However, the oracle we require is simpler and avoids strict adherence to a candidate set of hypotheses. Moreover, our algorithm creates an importance weighted sample that allows for unbiased risk estimation, even for hypotheses from a class different from the one employed by the active learner. This is in sharp contrast to many previous algorithms (e.g., [1, 3, 8, 4, 6, 7]) that create heavily biased data sets. We prove that our algorithm is always consistent and has an improved label complexity over passive learning in cases previously studied in the literature. We also describe a practical instantiation of our algorithm and report on some experimental results. 1.1 Related Work As already mentioned, our work is closely related to the previous works of [4] and [5], both of which in turn draw heavily on the work of [1] and [3]. The algorithm from [4] extends the selective sampling method of [1] to the agnostic setting using generalization bounds in a manner similar to that first suggested in [3]. It accesses hypotheses only through a special ERM oracle that can enforce an arbitrary number of example-based constraints; these constraints define a version space, and the algorithm only ever returns hypotheses from this space, which can be undesirable as we previously argued. Other previous algorithms with comparable performance guarantees also require similar example-based constraints (e.g., [3, 5, 6, 7]). Our algorithm differs from these in that (i) it never restricts its attention to a version space when selecting a hypothesis to return, and (ii) it only requires an ERM oracle that enforces at most one example-based constraint, and this constraint is only used for selective sampling. Our label complexity bounds are comparable to those proved in [5] (though somewhat worse that those in [3, 4, 6, 7]). The use of importance weights to correct for sampling bias is a standard technique for many machine learning problems (e.g., [9, 10, 11]) including active learning [12, 13, 5]. Our algorithm is based on the importance weighted active learning (IWAL) framework introduced by [5]. In that work, a rejection threshold procedure called loss-weighting is rigorously analyzed and shown to yield improved label complexity bounds in certain cases. Loss-weighting is more general than our technique in that it extends beyond zero-one loss to a certain subclass of loss functions such as logistic loss. On the other hand, the loss-weighting rejection threshold requires optimizing over a restricted version space, which is computationally undesirable. Moreover, the label complexity bound given in [5] only applies to hypotheses selected from this version space, and not when selected from the entire hypothesis class (as the general IWAL framework suggests). We avoid these deficiencies using a new rejection threshold procedure and a more subtle martingale analysis. Many of the previously mentioned algorithms are analyzed in the agnostic learning model, where no assumption is made about the noise distribution (see also [14]). In this setting, the label complexity of active learning algorithms cannot generally improve over supervised learners by more than a constant factor [15, 5]. However, under a parameterization of the noise distribution related to Tsybakov’s low-noise condition [16], active learning algorithms have been shown to have improved label complexity bounds over what is achievable in the purely agnostic setting [17, 8, 18, 6, 7]. We also consider this parameterization to obtain a tighter label complexity analysis. 2 Preliminaries 2.1 Learning Model Let D be a distribution over X × Y where X is the input space and Y = {±1} are the labels. Let (X, Y ) ∈X × Y be a pair of random variables with joint distribution D. An active learner receives a sequence (X1, Y1), (X2, Y2), . . . of i.i.d. copies of (X, Y ), with the label Yi hidden unless it is explicitly queried. We use the shorthand a1:k to denote a sequence (a1, a2, . . . , ak) (so k = 0 correspond to the empty sequence). 2 Let H be a set of hypotheses mapping from X to Y. For simplicity, we assume H is finite but does not completely agree on any single x ∈X (i.e., ∀x ∈X, ∃h, h′ ∈H such that h(x) ̸= h′(x)). This keeps the focus on the relevant aspects of active learning that differ from passive learning. The error of a hypothesis h : X →Y is err(h) := Pr(h(X) ̸= Y ). Let h∗:= arg min{err(h) : h ∈H} be a hypothesis of minimum error in H. The goal of the active learner is to return a hypothesis h ∈H with error err(h) not much more than err(h∗), using as few label queries as possible. 2.2 Importance Weighted Active Learning In the importance weighted active learning (IWAL) framework of [5], an active learner looks at the unlabeled data X1, X2, . . . one at a time. After each new point Xi, the learner determines a probability Pi ∈[0, 1]. Then a coin with bias Pi is flipped, and the label Yi is queried if and only if the coin comes up heads. The query probability Pi can depend on all previous unlabeled examples X1:i−1, any previously queried labels, any past coin flips, and the current unlabeled point Xi. Formally, an IWAL algorithm specifies a rejection threshold function p : (X × Y × {0, 1})∗× X → [0, 1] for determining these query probabilities. Let Qi ∈{0, 1} be a random variable conditionally independent of the current label Yi, Qi ⊥⊥Yi | X1:i, Y1:i−1, Q1:i−1 and with conditional expectation E[Qi|Z1:i−1, Xi] = Pi := p(Z1:i−1, Xi). where Zj := (Xj, Yj, Qj). That is, Qi indicates if the label Yi is queried (the outcome of the coin toss). Although the notation does not explicitly suggest this, the query probability Pi = p(Z1:i−1, Xi) is allowed to explicitly depend on a label Yj (j < i) if and only if it has been queried (Qj = 1). 2.3 Importance Weighted Estimators We first review some standard facts about the importance weighting technique. For a function f : X × Y →R, define the importance weighted estimator of E[f(X, Y )] from Z1:n ∈(X × Y × {0, 1})n to be bf(Z1:n) := 1 n n X i=1 Qi Pi · f(Xi, Yi). Note that this quantity depends on a label Yi only if it has been queried (i.e., only if Qi = 1; it also depends on Xi only if Qi = 1). Our rejection threshold will be based on a specialization of this estimator, specifically the importance weighted empirical error of a hypothesis h err(h, Z1:n) := 1 n n X i=1 Qi Pi · 1[h(Xi) ̸= Yi]. In the notation of Algorithm 1, this is equivalent to err(h, Sn) := 1 n X (Xi,Yi,1/Pi)∈Sn (1/Pi) · 1[h(Xi) ̸= Yi] (1) where Sn ⊆X × Y × R is the importance weighted sample collected by the algorithm. A basic property of these estimators is unbiasedness: E[ bf(Z1:n)] = (1/n) Pn i=1 E[E[(Qi/Pi) · f(Xi, Yi) | X1:i, Y1:i, Q1:i−1]] = (1/n) Pn i=1 E[(Pi/Pi) · f(Xi, Yi)] = E[f(X, Y )]. So, for example, the importance weighted empirical error of a hypothesis h is an unbiased estimator of its true error err(h). This holds for any choice of the rejection threshold that guarantees Pi > 0. 3 A Deviation Bound for Importance Weighted Estimators As mentioned before, the rejection threshold used by our algorithm is based on importance weighted error estimates err(h, Z1:n). Even though these estimates are unbiased, they are only reliable when 3 the variance is not too large. To get a handle on this, we need a deviation bound for importance weighted estimators. This is complicated by two factors that rules out straightforward applications of some standard bounds: 1. The importance weighted samples (Xi, Yi, 1/Pi) (or equivalently, the Zi = (Xi, Yi, Qi)) are not i.i.d. This is because the query probability Pi (and thus the importance weight 1/Pi) generally depends on Z1:i−1 and Xi. 2. The effective range and variance of each term in the estimator are, themselves, random variables. To address these issues, we develop a deviation bound using a martingale technique from [19]. Let f : X × Y →[−1, 1] be a bounded function. Consider any rejection threshold function p : (X ×Y ×{0, 1})∗×X →(0, 1] for which Pn = p(Z1:n−1, Xn) is bounded below by some positive quantity (which may depend on n). Equivalently, the query probabilities Pn should have inverses 1/Pn bounded above by some deterministic quantity rmax (which, again, may depend on n). The a priori upper bound rmax on 1/Pn can be pessimistic, as the dependence on rmax in the final deviation bound will be very mild—it enters in as log log rmax. Our goal is to prove a bound on | bf(Z1:n) −E[f(X, Y )]| that holds with high probability over the joint distribution of Z1:n. To start, we establish bounds on the range and variance of each term Wi := (Qi/Pi) · f(Xi, Yi) in the estimator, conditioned on (X1:i, Y1:i, Q1:i−1). Let Ei[ · ] denote E[ · |X1:i, Y1:i, Q1:i−1]. Note that Ei[Wi] = (Ei[Qi]/Pi) · f(Xi, Yi) = f(Xi, Yi), so if Ei[Wi] = 0, then Wi = 0. Therefore, the (conditional) range and variance are non-zero only if Ei[Wi] ̸= 0. For the range, we have |Wi| = (Qi/Pi) · |f(Xi, Yi)| ≤1/Pi, and for the variance, Ei[(Wi −Ei[Wi])2] ≤(Ei[Q2 i ]/P 2 i ) · f(Xi, Yi)2 ≤1/Pi. These range and variance bounds indicate the form of the deviations we can expect, similar to that of other classical deviation bounds. Theorem 1. Pick any t ≥0 and n ≥1. Assume 1 ≤1/Pi ≤rmax for all 1 ≤i ≤n, and let Rn := 1/ min({Pi : 1 ≤i ≤n ∧f(Xi, Yi) ̸= 0} ∪{1}). With probability at least 1 −2(3 + log2 rmax)e−t/2, 1 n n X i=1 Qi Pi · f(Xi, Yi) −E[f(X, Y )] ≤ r 2Rnt n + r 2t n + Rnt 3n . We defer all proofs to the appendices. 4 Algorithm First, we state a deviation bound for the importance weighted error of hypotheses in a finite hypothesis class H that holds for all n ≥1. It is a simple consequence of Theorem 1 and union bounds; the form of the bound motivates certain algorithmic choices to be described below. Lemma 1. Pick any δ ∈(0, 1). For all n ≥1, let εn := 16 log(2(3 + n log2 n)n(n + 1)|H|/δ) n = O log(n|H|/δ) n  . (3) Let (Z1, Z2, . . .) ∈(X × Y × {0, 1})∗be the sequence of random variables specified in Section 2.2 using a rejection threshold p : (X × Y × {0, 1})∗× X →[0, 1] that satisfies p(z1:n, x) ≥1/nn for all (z1:n, x) ∈(X × Y × {0, 1})n × X and all n ≥1. The following holds with probability at least 1 −δ. For all n ≥1 and all h ∈H, |(err(h, Z1:n) −err(h∗, Z1:n)) −(err(h) −err(h∗))| ≤ r εn Pmin,n(h) + εn Pmin,n(h) (4) where Pmin,n(h) = min{Pi : 1 ≤i ≤n ∧h(Xi) ̸= h∗(Xi)} ∪{1} . We let C0 = O(log(|H|/δ)) ≥2 be a quantity such that εn (as defined in Eq. (3)) is bounded as εn ≤C0 ·log(n+1)/n. The following absolute constants are used in the description of the rejection 4 Algorithm 1 Notes: see Eq. (1) for the definition of err (importance weighted error), and Section 4 for the definitions of C0, c1, and c2. Initialize: S0 := ∅. For k = 1, 2, . . . , n: 1. Obtain unlabeled data point Xk. 2. Let hk := arg min{err(h, Sk−1) : h ∈H}, and h′ k := arg min{err(h, Sk−1) : h ∈H ∧h(Xk) ̸= hk(Xk)}. Let Gk := err(h′ k, Sk−1) −err(hk, Sk−1), and Pk := ( 1 if Gk ≤ q C0 log k k−1 + C0 log k k−1 s otherwise  = min  1, O  1 G2 k + 1 Gk  · C0 log k k −1  where s ∈(0, 1) is the positive solution to the equation Gk =  c1 √s −c1 + 1  · r C0 log k k −1 + c2 s −c2 + 1  · C0 log k k −1 . (2) 3. Toss a biased coin with Pr(heads) = Pk. If heads, then query Yk, and let Sk := Sk−1 ∪{(Xk, Yk, 1/Pk)}. Else, let Sk := Sk−1. Return: hn+1 := arg min{err(h, Sn) : h ∈H}. Figure 1: Algorithm for importance weighted active learning with an error minimization oracle. threshold and the subsequent analysis: c1 := 5 + 2 √ 2, c2 := 5, c3 := ((c1 + √ 2)/(c1 −2))2, c4 := (c1 + √c3)2, c5 := c2 + c3 . Our proposed algorithm is shown in Figure 1. The rejection threshold (Step 2) is based on the deviation bound from Lemma 1. First, the importance weighted error minimizing hypothesis hk and the “alternative” hypothesis h′ k are found. Note that both optimizations are over the entire hypothesis class H (with h′ k only being required to disagree with hk on xk)—this is a key aspect where our algorithm differs from previous approaches. The difference in importance weighted errors Gk of the two hypotheses is then computed. If Gk ≤ p (C0 log k)/(k −1) + (C0 log k)/(k −1), then the query probability Pk is set to 1. Otherwise, Pk is set to the positive solution s to the quadratic equation in Eq. (2). The functional form of Pk is roughly min{1, (1/G2 k + 1/Gk) · (C0 log k)/(k − 1)}. It can be checked that Pk ∈(0, 1] and that Pk is non-increasing with Gk. It is also useful to note that (log k)/(k−1) is monotonically decreasing with k ≥1 (we use the convention log(1)/0 = ∞). In order to apply Lemma 1 with our rejection threshold, we need to establish the (very crude) bound Pk ≥1/kk for all k. Lemma 2. The rejection threshold of Algorithm 1 satisfies p(z1:n−1, x) ≥1/nn for all n ≥1 and all (z1:n−1, x) ∈(X × Y × {0, 1})n−1 × X. Note that this is a worst-case bound; our analysis shows that the probabilities Pk are more like 1/poly(k) in the typical case. 5 Analysis 5.1 Correctness We first prove a consistency guarantee for Algorithm 1 that bounds the generalization error of the importance weighted empirical error minimizer. The proof actually establishes a lower bound on 5 the query probabilities Pi ≥1/2 for Xi such that hn(Xi) ̸= h∗(Xi). This offers an intuitive characterization of the weighting landscape induced by the importance weights 1/Pi. Theorem 2. The following holds with probability at least 1 −δ. For any n ≥1, 0 ≤err(hn) −err(h∗) ≤err(hn, Z1:n−1) −err(h∗, Z1:n−1) + r 2C0 log n n −1 + 2C0 log n n −1 . This implies, for all n ≥1, err(hn) ≤err(h∗) + r 2C0 log n n −1 + 2C0 log n n −1 . Therefore, the final hypothesis returned by Algorithm 1 after seeing n unlabeled data has roughly the same error bound as a hypothesis returned by a standard passive learner with n labeled data. A variant of this result under certain noise conditions is given in the appendix. 5.2 Label Complexity Analysis We now bound the number of labels requested by Algorithm 1 after n iterations. The following lemma bounds the probability of querying the label Yn; this is subsequently used to establish the final bound on the expected number of labels queried. The key to the proof is in relating empirical error differences and their deviations to the probability of querying a label. This is mediated through the disagreement coefficient, a quantity first used by [14] for analyzing the label complexity of the A2 algorithm of [3]. The disagreement coefficient θ := θ(h∗, H, D) is defined as θ(h∗, H, D) := sup Pr(X ∈DIS(h∗, r)) r : r > 0  where DIS(h∗, r) := {x ∈X : ∃h′ ∈H such that Pr(h∗(X) ̸= h′(X)) ≤r and h∗(x) ̸= h′(x)} (the disagreement region around h∗at radius r). This quantity is bounded for many learning problems studied in the literature; see [14, 6, 20, 21] for more discussion. Note that the supremum can instead be taken over r > ǫ if the target excess error is ǫ, which allows for a more detailed analysis. Lemma 3. Assume the bounds from Eq. (4) holds for all h ∈H and n ≥1. For any n ≥1, E[Qn] ≤θ · 2 err(h∗) + O θ · r C0 log n n −1 + θ · C0 log2 n n −1 ! . Theorem 3. With probability at least 1 −δ, the expected number of labels queried by Algorithm 1 after n iterations is at most 1 + θ · 2 err(h∗) · (n −1) + O  θ · p C0n log n + θ · C0 log3 n  . The bound is dominated by a linear term scaled by err(h∗), plus a sublinear term. The linear term err(h∗) · n is unavoidable in the worst case, as evident from label complexity lower bounds [15, 5]. When err(h∗) is negligible (e.g., the data is separable) and θ is bounded (as is the case for many problems studied in the literature [14]), then the bound represents a polynomial label complexity improvement over supervised learning, similar to that achieved by the version space algorithm from [5]. 5.3 Analysis under Low Noise Conditions Some recent work on active learning has focused on improved label complexity under certain noise conditions [17, 8, 18, 6, 7]. Specifically, it is assumed that there exists constants κ > 0 and 0 < α ≤ 1 such that Pr(h(X) ̸= h∗(X)) ≤κ · (err(h) −err(h∗))α (5) for all h ∈H. This is related to Tsybakov’s low noise condition [16]. Essentially, this condition requires that low error hypotheses not be too far from the optimal hypothesis h∗under the disagreement metric Pr(h∗(X) ̸= h(X)). Under this condition, Lemma 3 can be improved, which in turn yields the following theorem. 6 Theorem 4. Assume that for some value of κ > 0 and 0 < α ≤1, the condition in Eq. (5) holds for all h ∈H. There is a constant cα > 0 depending only on α such that the following holds. With probability at least 1 −δ, the expected number of labels queried by Algorithm 1 after n iterations is at most θ · κ · cα · (C0 log n)α/2 · n1−α/2. Note that the bound is sublinear in n for all 0 < α ≤1, which implies label complexity improvements whenever θ is bounded (an improved analogue of Theorem 2 under these conditions can be established using similar techniques). The previous algorithms of [6, 7] obtain even better rates under these noise conditions using specialized data dependent generalization bounds, but these algorithms also required optimizations over restricted version spaces, even for the bound computation. 6 Experiments Although agnostic learning is typically intractable in the worst case, empirical risk minimization can serve as a useful abstraction for many practical supervised learning algorithms in non-worst case scenarios. With this in mind, we conducted a preliminary experimental evaluation of Algorithm 1, implemented using a popular algorithm for learning decision trees in place of the required ERM oracle. Specifically, we use the J48 algorithm from Weka v3.6.2 (with default parameters) to select the hypothesis hk in each round k; to produce the “alternative” hypothesis h′ k, we just modify the decision tree hk by changing the label of the node used for predicting on xk. Both of these procedures are clearly heuristic, but they are similar in spirit to the required optimizations. We set C0 = 8 and c1 = c2 = 1—these can be regarded as tuning parameters, with C0 controlling the aggressiveness of the rejection threshold. We did not perform parameter tuning with active learning although the importance weighting approach developed here could potentially be used for that. Rather, the goal of these experiments is to assess the compatibility of Algorithm 1 with an existing, practical supervised learning procedure. 6.1 Data Sets We constructed two binary classification tasks using MNIST and KDDCUP99 data sets. For MNIST, we randomly chose 4000 training 3s and 5s for training (using the 3s as the positive class), and used all of the 1902 testing 3s and 5s for testing. For KDDCUP99, we randomly chose 5000 examples for training, and another 5000 for testing. In both cases, we reduced the dimension of the data to 25 using PCA. To demonstrate the versatility of our algorithm, we also conducted a multi-class classification experiment using the entire MNIST data set (all ten digits, so 60000 training data and 10000 testing data). This required modifying how h′ k is selected: we force h′ k(xk) ̸= hk(xk) by changing the label of the prediction node for xk to the next best label. We used PCA to reduce the dimension to 40. 6.2 Results We examined the test error as a function of (i) the number of unlabeled data seen, and (ii) the number of labels queried. We compared the performance of the active learner described above to a passive learner (one that queries every label, so (i) and (ii) are the same) using J48 with default parameters. In all three cases, the test errors as a function of the number of unlabeled data were roughly the same for both the active and passive learners. This agrees with the consistency guarantee from Theorem 2. We note that this is a basic property not satisfied by many active learning algorithms (this issue is discussed further in [22]). In terms of test error as a function of the number of labels queried (Figure 2), the active learner had minimal improvement over the passive learner on the binary MNIST task, but a substantial improvement over the passive learner on the KDDCUP99 task (even at small numbers of label queries). For the multi-class MNIST task, the active learner had a moderate improvement over the passive learner. Note that KDDCUP99 is far less noisy (more separable) than MNIST 3s vs 5s task, so the results are in line with the label complexity behavior suggested by Theorem 3, which states that the label complexity improvement may scale with the error of the optimal hypothesis. Also, 7 0 1000 2000 3000 4000 0.05 0.1 0.15 0.2 0.25 number of labels queried test error Passive Active 0 1000 2000 3000 4000 5000 0 0.01 0.02 0.03 0.04 0.05 number of labels queried test error Passive Active MNIST 3s vs 5s KDDCUP99 0 100 200 300 400 500 600 0 0.02 0.04 0.06 0.08 0.1 number of labels queried test error Passive Active 0 1 2 3 4 x 10 4 0.14 0.16 0.18 0.2 0.22 0.24 number of labels queried test error Passive Active KDDCUP99 (close-up) MNIST multi-class (close-up) Figure 2: Test errors as a function of the number of labels queried. the results from MNIST tasks suggest that the active learner may require an initial random sampling phase during which it is equivalent to the passive learner, and the advantage manifests itself after this phase. This again is consistent with the analysis (also see [14]), as the disagreement coefficient can be large at initial scales, yet much smaller as the number of (unlabeled) data increases and the scale becomes finer. 7 Conclusion This paper provides a new active learning algorithm based on error minimization oracles, a departure from the version space approach adopted by previous works. The algorithm we introduce here motivates computationally tractable and effective methods for active learning with many classifier training algorithms. The overall algorithmic template applies to any training algorithm that (i) operates by approximate error minimization and (ii) for which the cost of switching a class prediction (as measured by example errors) can be estimated. Furthermore, although these properties might only hold in an approximate or heuristic sense, the created active learning algorithm will be “safe” in the sense that it will eventually converge to the same solution as a passive supervised learning algorithm. Consequently, we believe this approach can be widely used to reduce the cost of labeling in situations where labeling is expensive. Recent theoretical work on active learning has focused on improving rates of convergence. However, in some applications, it may be desirable to improve performance at much smaller sample sizes, perhaps even at the cost of improved rates as long as consistency is ensured. Importance sampling and weighting techniques like those analyzed in this work may be useful for developing more aggressive strategies with such properties. Acknowledgments This work was completed while DH was at Yahoo! Research and UC San Diego. 8 References [1] D. Cohn, L. Atlas, and R. Ladner. Improving generalization with active learning. Machine Learning, 15(2):201–221, 1994. [2] S. Dasgupta. Coarse sample complexity bounds for active learning. In Advances in Neural Information Processing Systems 18, 2005. [3] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. In Twenty-Third International Conference on Machine Learning, 2006. [4] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. In Advances in Neural Information Processing Systems 20, 2007. [5] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance weighted active learning. In Twenty-Sixth International Conference on Machine Learning, 2009. [6] S. Hanneke. Adaptive rates of convergence in active learning. In Twenty-Second Annual Conference on Learning Theory, 2009. [7] V. Koltchinskii. Rademacher complexities and bounding the excess risk in active learning. Manuscript, 2009. [8] M.-F. Balcan, A. Broder, and T. Zhang. Margin based active learning. In Twentieth Annual Conference on Learning Theory, 2007. [9] R. .S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. [10] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal of Computing, 32:48–77, 2002. [11] M. Sugiyama, M. Krauledat, and K.-R. M¨uller. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research, 8:985–1005, 2007. [12] M. Sugiyama. Active learning for misspecified models. In Advances in Neural Information Processing Systems 18, 2005. [13] F. Bach. Active learning for misspecified generalized linear models. In Advances in Neural Information Processing Systems 19, 2006. [14] S. Hanneke. A bound on the label complexity of agnostic active learning. In Twenty-Fourth International Conference on Machine Learning, 2007. [15] M. K¨a¨ari¨ainen. Active learning in the non-realizable case. In Seventeenth International Conference on Algorithmic Learning Theory, 2006. [16] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, 32(1):135– 166, 2004. [17] R. Castro and R. Nowak. Upper and lower bounds for active learning. In Allerton Conference on Communication, Control and Computing, 2006. [18] R. Castro and R. Nowak. Minimax bounds for active learning. In Twentieth Annual Conference on Learning Theory, 2007. [19] T. Zhang. Data dependent concentration bounds for sequential prediction algorithms. In Eighteenth Annual Conference on Learning Theory, 2005. [20] E. Friedman. Active learning for smooth problems. In Twenty-Second Annual Conference on Learning Theory, 2009. [21] L. Wang. Sufficient conditions for agnostic active learnable. In Advances in Neural Information Processing Systems 22, 2009. [22] S. Dasgupta and D. Hsu. Hierarchical sampling for active learning. In Twenty-Fifth International Conference on Machine Learning, 2008. 9
2010
1
3,854
Label Embedding Trees for Large Multi-Class Tasks Samy Bengio(1) Jason Weston(1) David Grangier(2) (1) Google Research, New York, NY {bengio, jweston}@google.com (2)NEC Labs America, Princeton, NJ {dgrangier}@nec-labs.com Abstract Multi-class classification becomes challenging at test time when the number of classes is very large and testing against every possible class can become computationally infeasible. This problem can be alleviated by imposing (or learning) a structure over the set of classes. We propose an algorithm for learning a treestructure of classifiers which, by optimizing the overall tree loss, provides superior accuracy to existing tree labeling methods. We also propose a method that learns to embed labels in a low dimensional space that is faster than non-embedding approaches and has superior accuracy to existing embedding approaches. Finally we combine the two ideas resulting in the label embedding tree that outperforms alternative methods including One-vs-Rest while being orders of magnitude faster. 1 Introduction Datasets available for prediction tasks are growing over time, resulting in increasing scale in all their measurable dimensions: separate from the issue of the growing number of examples m and features d, they are also growing in the number of classes k. Current multi-class applications such as web advertising [6], textual document categorization [11] or image annotation [12] have tens or hundreds of thousands of classes, and these datasets are still growing. This evolution is challenging traditional approaches [1] whose test time grows at least linearly with k. At training time, a practical constraint is that learning should be feasible, i.e. it should not take more than a few days, and must work with the memory and disk space requirements of the available hardware. Most algorithms’ training time, at best, linearly increases with m, d and k; algorithms that are quadratic or worse with respect to m or d are usually discarded by practitioners working on real large scale tasks. At testing time, depending on the application, very specific time constraints are necessary, usually measured in milliseconds, for example when a real-time response is required or a large number of records need to be processed. Moreover, memory usage restrictions may also apply. Classical approaches such as One-vs-Rest are at least O(kd) in both speed (of testing a single example) and memory. This is prohibitive for large scale problems [6, 12, 26]. In this work, we focus on algorithms that have a classification speed sublinear at testing time in k as well as having limited dependence on d with best-case complexity O(de(log k + d)) with de ≪d and de ≪k. In experiments we observe no loss in accuracy compared to methods that are O(kd), further, memory consumption is reduced from O(kd) to O(kde). Our approach rests on two main ideas: firstly, an algorithm for learning a label tree: each node makes a prediction of the subset of labels to be considered by its children, thus decreasing the number of labels k at a logarithmic rate until a prediction is reached. We provide a novel algorithm that both learns the sets of labels at each node, and the predictors at the nodes to optimize the overall tree loss, and show that this approach is superior to existing tree-based approaches [7, 6] which typically lose accuracy compared to O(kd) approaches. Balanced label trees have O(d log k) complexity as the predictor at each node is still 1 Algorithm 1 Label Tree Prediction Algorithm Input: test example x, parameters T. Let s = 0. - Start at the root node repeat Let s = argmax{c:(s,c)∈E}fc(x). - Traverse to the most confident child. until |ℓs| = 1 - Until this uniquely defines a single label. Return ℓs. linear in d. Our second main idea is to learn an embedding of the labels into a space of dimension de that again still optimizes the overall tree loss. Hence, we are required at test time to: (1) map the test example in the label embedding space with cost O(dde) and then (2) predict using the label tree resulting in our overall cost O(de(log k +d)). We also show that our label embedding approach outperforms other recently proposed label embedding approaches such as compressed sensing [17]. The rest of the paper is organized as follows. Label trees are discussed and label tree learning algorithms are proposed in Section 2. Label embeddings are presented in Section 3. Related prior work is presented in Section 4. An experimental study on three large tasks is given in Section 5 showing the good performance of our proposed techniques. Finally, Section 6 concludes. 2 Label Trees A label tree is a tree T = (N, E, F, L) with n+1 indexed nodes N = {0, . . . n}, a set of edges E = {(p1, c1), (p|E|, c|E|)} which are ordered pairs of parent and child node indices, label predictors F = {f1, . . . , fn} and label sets L = {ℓ0, . . . , ℓn} associated to each node. The root node is labeled with index 0. The edges E are such that all other nodes have one parent, but they can have an arbitrary number of children (but still in all cases |E| = n). The label sets indicate the set of labels to which a point should belong if it arrives at the given node, and progress from generic to specific along the tree, i.e. the root label set contains all classes |ℓ0| = k and each child label set is a subset of its parent label set with ℓp = S (p,c)∈E ℓc. We differentiate between disjoint label trees where there are only k leaf nodes, one per class, and hence any two nodes i and j at the same depth cannot share any labels, ℓi ∩ℓj = ∅, and joint label trees that can have more than k leaf nodes. Classifying an example with the label tree is achieved by applying Algorithm 1. Prediction begins at the root node (s = 0) and for each edge leading to a child (s, c) ∈E one computes the score of the label predictor fc(x) which predicts whether the example x belongs to the set of labels ℓc. One takes the most confident prediction, traverses to that child node, and then repeats the process. Classification is complete when one arrives at a node that identifies only a single label, which is the predicted class. Instances of label trees have been used in the literature before with various methods for choosing the parameters (N, E, F, L). Due to the difficulty of learning, many methods make approximations such as a random choice of E and optimization of F that does not take into account the overall loss of the entire system leading to suboptimal performance (see [7] for a discussion). Our goal is to provide an algorithm to learn these parameters to optimize the overall empirical loss (called the tree loss) as accurately as possible for a given tree size (speed). We can define the tree loss we wish to minimize as: R(ftree) = Z I(ftree(x) ̸= y)dP(x, y) = Z max i∈B(x)={b1(x),...bD(x)(x)} I(y /∈ℓi)dP(x, y) (1) where I is the indicator function and bj(x) = argmax{c : (bj−1(x),c)∈E}fc(x) is the index of the winning (“best”) node at depth j, b0(x) = 0, and D(x) is the depth in the tree of the final prediction for x, i.e. the number of loops plus one of the repeat block when running Algorithm 1. The tree loss measures an intermediate loss of 1 for each prediction at each depth j of the label tree where the true label is not in the label set ℓbj(x). The final loss for a single example is the max over these losses, because if any one of these classifiers makes a mistake then regardless 2 of the other predictions the wrong class will still be predicted. Hence, any algorithm wishing to optimize the overall tree loss should train all the nodes jointly with respect to this maximum. We will now describe how we propose to learn the parameters T of our label tree. In the next subsection we show how to minimize the tree loss for a given fixed tree (N, E and L are fixed, F is to be learned). In the following subsection, we will describe our algorithm for learning N, E and L. 2.1 Learning with a Fixed Label Tree Let us suppose we are given a fixed label tree N, E, L chosen in advance. Our goal is simply to minimize the tree loss (1) over the variables F, given training data {(xi, yi)}i=1,...,m. We follow the standard approach of minimizing the empirical loss over the data, while regularizing our solution. We consider two possible algorithms for solving this problem. Relaxation 1: Independent convex problems The simplest (and poorest) procedure is to consider the following relaxation to this problem: Remp(ftree) = 1 m m X i=1 max j∈B(x) I(yi /∈ℓj) ≤ 1 m m X i=1 n X j=1 I(sgn(fj(xi)) = Cj(yi)) where Cj(y) = 1 if y ∈ℓj and -1 otherwise. The number of errors counted by the approximation cannot be less than the empirical tree loss Remp as when, for a particular example, the loss is zero for the approximation it is also zero for Remp. However, the approximation can be much larger because of the sum. One then further approximates this by replacing the indicator function with the hinge loss and choosing linear (or kernel) models of the form fi(x) = w⊤ i φ(x). We are then left with the following convex problem: minimize n X j=1 γ||wj||2 + 1 m m X i=1 ξij ! s.t. ∀i, j,  Cj(yi)fj(xi) ≥1 −ξij ξij ≥0 where we also added a classical 2-norm regularizer controlled by the hyperparameter γ. In fact, this can be split into n independent convex problems because the hyperplanes wi, i = 1, . . . , n, do not interact in the objective function. We consider this simple relaxation as a baseline approach. Relaxation 2: Tree Loss Optimization (Joint convex problem) We propose a tighter minimization of the tree loss with the following: 1 m m X i=1 ξα i s.t. fr(xi) ≥fs(xi) −ξi, ∀r, s : yi ∈ℓr ∧yi /∈ℓs ∧(∃p : (p, r) ∈E ∧(p, s) ∈E) (2) ξi ≥0, i = 1, . . . , m. (3) When α is close to zero, the shared slack variables simply count a single error if any of the predictions at any depth of the tree are incorrect, so this is very close to the true optimization of the tree loss. This is measured by checking, out of all the nodes that share the same parent, if the one containing the true label in its label set is highest ranked. In practice we set α = 1 and arrive at a convex optimization problem. Nevertheless, unlike relaxation (1) the max is not approximated with a sum. Again, using the hinge loss and a 2-norm regularizer, we arrive at our final optimization problem: γ n X j=1 ||wj||2 + 1 m m X i=1 ξi (4) subject to constraints (2) and (3). 2.2 Learning Label Tree Structures The previous section shows how to optimize the label predictors F while the nodes N, edges E and label sets L which specify the structure of the tree are fixed in advance. However, we want to be able to learn specific tree structures dependent on our prediction problem such that we minimize the 3 Algorithm 2 Learning the Label Tree Structure Train k One-vs-Rest classifiers ¯f1, . . . , ¯fk independently (no tree structure is used). Compute the confusion matrix ¯Cij = |{(x, yi) ∈V : argmaxr ¯fr(x) = j}| on validation set V. For each internal node l of the tree, from root to leaf, partition its label set ℓl between its children’s label sets Ll = {ℓc : c ∈Nl}, where Nl = {c ∈N : (l, c) ∈E} and ∪c∈Nlℓc = ℓl, by maximizing: Rl(Ll) = X c∈Nl X yp,yq∈ℓc Apq, where A = 1 2( ¯C + ¯C⊤) is the symmetrized confusion matrix, subject to constraints preventing trivial solutions, e.g. putting all labels in one set (see [4]). This optimization problem (including the appropriate constraints) is a graph cut problem and it can be solved with standard spectral clustering, i.e. we use A as the affinity matrix for step 1 of the algorithm given in [21], and then apply all of its other steps (2-6). Learn the parameters f of the tree by minimizing (4) subject to constraints (2) and (3). overall tree loss. This section describes an algorithm for learning the parameters N, E and L, i.e. optimizing equation (1) with respect to these parameters. The key to the generalization ability of a particular choice of tree structure is the learnability of the label sets ℓ. If some classes are often confused but are in different label sets the functions f may not be easily learnable, and the overall tree loss will hence be poor. For example for an image labeling task, a decision in the tree between two label sets, one containing tiger and jaguar labels versus one containing frog and toad labels is presumably more learnable than (tiger, frog) vs. (jaguar, toad). In the following, we consider a learning strategy for disjoint label trees (the methods in the previous section were for both joint and disjoint trees). We begin by noticing that Remp can be rewritten as: Remp(ftree) = 1 m m X i=1 max j  I(yi ∈ℓj) X ¯y /∈ℓj C(xi, ¯y)   where C(xi, ¯y) = I(ftree(xi) = ¯y) is the confusion of labeling example xi (with true label yi) with label ¯y instead. That is, the tree loss for a given example is 1 if there is a node j in the tree containing yi, but we predict a different node at the same depth leading to a prediction not in the label set of j. Intuitively, the confusion of predicting node i instead of j comes about because of the class confusion between the labels y ∈ℓi and the labels ¯y ∈ℓj. Hence, to provide the smallest tree loss we want to group together labels into the same label set that are likely to be confused at test time. Unfortunately we do not know the confusion matrix of a particular tree without training it first, but as a proxy we can use the class confusion matrix of a surrogate classifier with the supposition that the matrices will be highly correlated. This motivates the proposed Algorithm 2. The main idea is to recursively partition the labels into label sets between which there is little confusion (measuring confusion using One-vs-Rest as a surrogate classifier) solving at each step a graph cut problem where standard spectral clustering is applied [20, 21]. The objective function of spectral clustering penalizes unbalanced partitions, hence encouraging balanced trees. (To obtain logarithmic speedups the tree has to be balanced; one could also enforce this constraint directly in the k-means step.) The results in Section 5 show that our learnt trees outperform random structures and in fact match the accuracy of not using a tree at all, while being orders of magnitude faster. 3 Label Embeddings An orthogonal angle of attack of the solution of large multi-class problems is to employ shared representations for the labelings, which we term label embeddings. Introducing the function φ(y) = (0, . . . , 0, 1, 0, . . . , 0) which is a k-dimensional vector with a 1 in the yth position and 0 otherwise, we would like to find a linear embedding E(y) = V φ(y) where V is a de × k matrix assuming that labels y ∈{1, . . . , k}. Without a tree structure, multi-class classification is then achieved with: fembed(x) = argmaxi=1,...,k S (Wx, V φ(i)) (5) 4 where W is a de × d matrix of parameters and S(·, ·) is a measure of similarity, e.g. an inner product or negative Euclidean distance. This method, unlike label trees, is unfortunately still linear with respect to k. However, it does have better behavior with respect to the feature dimension d, with O(de(d + k)) testing time, compared to methods such as One-vs-Rest which is O(kd). If the embedding dimension de is much smaller than d this gives a significant saving. There are several ways we could train such models. For example, the method of compressed sensing [17] has a similar form to (5), but the matrix V is not learnt but chosen randomly, and only W is learnt. In the next section we will show how we can train such models so that the matrix V captures the semantic similarity between classes, which can improve generalization performance over random choices of V in an analogous way to the improvement of label trees over random trees. Subsequently, we will show how to combine label embeddings with label trees to gain the advantages of both approaches. 3.1 Learning Label Embeddings (Without a Tree) We consider two possibilities for learning V and W. Sequence of Convex Problems Firstly, we consider learning the label embedding by solving a sequence of convex problems using the following method. First, train independent (convex) classifiers fi(x) for each class 1, . . . , k and compute the k×k confusion matrix ¯C over the data (xi, yi), i.e. the same as the first two steps of Algorithm 2. Then, find the label embedding vectors Vi that minimize: k X i,j=1 Aij||Vi −Vj||2, where A = 1 2( ¯C + ¯C⊤) is the symmetrized confusion matrix, subject to the constraint V ⊤DV = I where Dii = P j Aij (to prevent trivial solutions) which is the same problem solved by Laplacian Eigenmaps [4]. We then obtain an embedding matrix V where similar classes i and j should have small distance between their vectors Vi and Vj. All that remains is to learn the parameters W of our model. To do this, we can then train a convex multi-class classifier utilizing the label embedding V : minimize γ||W||F RO + 1 m m X i=1 ξi where ||.||F RO is the Frobenius norm, subject to constraints: ||Wxi −V φ(i)||2 ≤||Wxi −V φ(j)||2 + ξi, ∀j ̸= i (6) ξi ≥0, i = 1, . . . , m. Note that the constraint (6) is linear as we can multiply out and subtract ||Wxi||2 from both sides. At test time we employ equation (5) with S(z, z′) = −||z −z′||. Non-Convex Joint Optimization The second method is to learn W and V jointly, which requires non-convex optimization. In that case we wish to directly minimize: γ||W||F RO + 1 m m X i=1 ξi subject to (Wxi)⊤V φ(i) ≥(Wxi)⊤V φ(j) −ξi, ∀j ̸= i and ||Vi|| ≤1 , ξi ≥0, i = 1, . . . , m. We optimize this using stochastic gradient descent (with randomly initialized weights) [8]. At test time we employ equation (5) with S(z, z′) = z⊤z′. 3.2 Learning Label Embedding Trees In this work, we also propose to combine the use of embeddings and label trees to obtain the advantages of both approaches, which we call the label embedding tree. At test time, the resulting label embedding tree prediction is given in Algorithm 3. The label embedding tree has potentially O(de(d + log(k))) testing speed, depending on the structure of the tree (e.g. being balanced). 5 Algorithm 3 Label Embedding Tree Prediction Algorithm Input: test example x, parameters T. Compute z = Wx. - Cache prediction on example Let s = 0. - Start at the root node repeat - Traverse to the most Let s = argmax{c:(s,c)∈E}fc(x) = argmax{c:(s,c)∈E}z⊤E(c). confident child. until |ℓs| = 1 - Until this uniquely defines a single label. Return ℓs. To learn a label embedding tree we propose the following minimization problem: γ||W||F RO + 1 m m X i=1 ξi subject to constraints: (Wxi)⊤V φ(r) ≥(Wxi)⊤V φ(s) −ξi, ∀r, s : yi ∈ℓr ∧yi /∈ℓs ∧(∃p : (p, r) ∈E ∧(p, s) ∈E) ||Vi|| ≤1, ξi ≥0, i = 1, . . . , m. This is essentially a combination of the optimization problems defined in the previous two Sections. Learning the tree structure for these models can still be achieved using Algorithm 2. 4 Related Work Multi-class classification is a well studied problem. Most of the prior approaches build upon binary classification and have a classification cost which grows at least linearly with the number of classes k. Common multi-class strategies include one-versus-rest, one-versus-one, label ranking and Decision Directed Acyclic Graph (DDAG). One-versus-rest [25] trains k binary classifiers discriminating each class against the rest and predicts the class whose classifier is the most confident, which yields a linear testing cost O(k). One-versus-one [16] trains a binary classifier for each pair of classes and predicts the class getting the most pairwise preferences, which yields a quadratic testing cost O(k · (k −1)/2). Label ranking [10] learns to assign a score to each class so that the correct class should get the highest score, which yields a linear testing cost O(k). DDAG [23] considers the same k · (k −1)/2 classifiers as one-versus-one but achieves a linear testing cost O(k). All these methods are reported to perform similarly in terms of accuracy [25, 23]. Only a few prior techniques achieve sub-linear testing cost. One way is to simply remove labels the classifier performs poorly on [11]. Error correcting code approaches [13] on the other hand represent each class with a binary code and learn a binary classifier to predict each bit. This means that the testing cost could potentially be O(log k). However, in practice, these approaches need larger redundant codes to reach competitive performance levels [19]. Decision trees, such as C4.5 [24], can also yield a tree whose depth (and hence test cost) is logarithmic in k. However, testing complexity also grows linearly with the number of training examples making these methods impractical for large datasets [22]. Filter tree [7] and Conditional Probability Tree (CPT) [6] are logarithmic approaches that have been introduced recently with motivations similar to ours, i.e. addressing large scale problems with a thousand classes or more. Filter tree considers a random binary tree in which each leaf is associated with a class and each node is associated with a binary classifier. A test example traverses the tree from the root. At each node, the node classifier decides whether the example is directed to the right or to the left subtree, each of which are associated to half of the labels of the parent node. Finally, the label of the reached leaf is predicted. Conditional Probability Tree (CPT) relies on a similar paradigm but builds the tree during training. CPT considers an online setup in which the set of classes is discovered during training. Hence, CPT builds the tree greedily: when a new class is encountered, it is added by splitting an existing leaf. In our case, we consider that the set of classes are available prior to training and propose to tessellate the class label sets such that the node classifiers are likely to achieve high generalization performance. This contribution is shown to have a significant advantage in practice, see Section 5. 6 Finally, we should mention that a related active area of research involves partitioning the feature space rather than the label space, e.g. using hierarchical experts [18], hashing [27] and kd-trees [5]. Label embedding is another key aspect of our work when it comes to efficiently handling thousands of classes. Recently, [26] proposed to exploit class taxonomies via embeddings by learning to project input vectors and classes into a common space such that the classes close in the taxonomy should have similar representations while, at the same time, examples should be projected close to their class representation. In our case, we do not rely on a pre-existing taxonomy: we also would like to assign similar representations to similar classes but solely relying on the training data. In that respect, our work is closer to work in information retrieval [3], which proposes to embed documents – not classes – for the task of document ranking. Compressed sensing based approaches [17] do propose to embed class labels, but rely on a random projection for embedding the vector representing class memberships, with the added advantages of handling problems for which multiple classes are active for a given example. However, relying on a random projection does not allow for the class embedding to capture the relation between classes. In our experiments, this aspect is shown to be a drawback, see Section 5. Finally, the authors of [2] do propose an embedding approach over class labels, but it is not clear to us if their approach is scalable to our setting. 5 Experimental Study We consider three datasets: one publicly available image annotation dataset and two proprietary datasets based on images and textual descriptions of products. ImageNet Dataset ImageNet [12] is a new image dataset organized according to WordNet [14] where quality-controlled human-verified images are tagged with labels. We consider the task of annotating images from a set of about 16 thousand labels. We split the data into 2.5M images for training, 0.8M for validation and 0.8M for testing, removing duplicates between training, validation and test sets by throwing away test examples which had too close a nearest neighbor training or validation example in feature space. Images in this database were represented by a large but sparse vector of color and texture features, known as visual terms, described in [15]. Product Datasets We had access to a large proprietary database of about 0.5M product descriptions. Each product is associated with a textual description, an image, and a label. There are ≈18 thousand unique labels. We consider two tasks: predicting the label given the textual description, and predicting the label given the image. For the text task we extracted the most frequent set of 10 thousand words (discounting stop words) to yield a textual dictionary, and represented each document by a vector of counts of these words in the document, normalized using tf-idf. For the image task, images were represented by a dense vector of 1024 real values of texture and color features. Table 1 summarizes the various datasets. Next, we describe the approaches that we compared. Flat versus Tree Learning Approaches In Table 2 we compare label tree predictor training methods from Section 2.1: the baseline relaxation 1 (“Independent Optimization”) versus our proposed relaxation 2 (“Tree Loss Optimization”), both of which learn the classifiers for fixed trees; and we compare our “Learnt Label Tree” structure learning algorithm from Section 2.2 to random structures. In all cases we considered disjoint trees of depth 2 with 200 internal nodes. The results show that learnt structure performs better than random structure and tree loss optimization is superior to independent optimization. We also compare to three other baselines: One-vs-Rest large margin classifiers trained using the passive aggressive algorithm [9], the Filter Tree [7] and the Conditional Probability Tree (CPT) [6]. For all algorithms, hyperparameters are chosen using the validation set. The combination of Learnt Label Tree structure and Tree Loss Optimization for the label predictors is the only method that is comparable to or better than One-vs-Rest while being around 60× faster to compute at test time. For ImageNet one could wonder how well using WordNet (a graph of human annotated label similarities) to build a tree would perform instead. We constructed a matrix C for Algorithm 2 where Cij = 1 if there is an edge in the WordNet graph, and 0 otherwise, and used that to learn a label tree as before, obtaining 0.99% accuracy using “Independent Optimization”. This is better than a random tree but not as good as using the confusion matrix, implying that the best tree to use is the one adapted to the supervised task of interest. 7 Table 1: Summary Statistics of the Three Datasets Used in the Experiments. Statistics ImageNet Product Descriptions Product Images Task image annotation product categorization image annotation Number of Training Documents 2518604 417484 417484 Number of Test Documents 839310 60278 60278 Validation Documents 837612 105572 105572 Number of Labels 15952 18489 18489 Type of Documents images texts images Type of Features visual terms words dense image features Number of Features 10000 10000 1024 Average Feature Sparsity 97.5% 99.6% 0.0% Table 2: Flat versus Tree Learning Results Test set accuracies for various tree and non-tree methods on three datasets. Speed-ups compared to One-vs-Rest are given in brackets. Classifier Tree Type ImageNet Product Desc. Product Images One-vs-Rest None (flat) 2.27% [1×] 37.0% [1×] 12.6% [1×] Filter Tree Filter Tree 0.59% [1140×] 14.4% [1285×] 0.73% [1320×] Conditional Prob. Tree (CPT) CPT 0.74% [41×] 26.3% [45×] 2.20% [115×] Independent Optimization Random Tree 0.72% [60×] 21.3% [59×] 1.35% [61×] Independent Optimization Learnt Label Tree 1.25% [60×] 27.1% [59×] 5.95% [61×] Tree Loss Optimization Learnt Label Tree 2.37% [60×] 39.6% [59×] 10.6% [61×] Table 3: Label Embeddings and Label Embedding Tree Results ImageNet Product Images Classifier Tree Type Accuracy Speed Memory Accuracy Speed Memory One-vs-Rest None (flat) 2.27% 1× 1.2 GB 12.6% 1× 170 MB Compressed Sensing None (flat) 0.6% 3× 18 MB 2.27% 10× 20 MB Seq. Convex Embedding None (flat) 2.23% 3× 18 MB 3.9% 10× 20 MB Non-Convex Embedding None (flat) 2.40% 3× 18 MB 14.1% 10× 20 MB Label Embedding Tree Label Tree 2.54% 85× 18 MB 13.3% 142× 20 MB Embedding and Embedding Tree Approaches In Table 3 we compare several label embedding methods: (i) the convex and non-convex methods from Section 5; (ii) compressed sensing; and (iii) the label embedding tree from Section 3.2. In all cases we fixed the embedding dimension de = 100. The results show that the random embeddings given by compressed sensing are inferior to learnt embeddings and Non-Convex Embedding is superior to Sequential Convex Embedding, presumably as the overall loss which is dependent on both W and V is jointly optimized. The latter gives results as good or superior to One-vs-Rest with modest computational gain (3× or 10× speedup). Note, we do not detail results on the product descriptions task because no speed-up is gained there from embedding as the sparsity is already so high, however the methods still gave good test accuracy (e.g. Non-Convex Embedding yields 38.2%, which should be compared to the methods in Table 2). Finally, combining embedding and label tree learning using the “Label Embedding Tree” of Section 3.2 yields our best method on ImageNet and Product Images with a speed-up of 85× or 142× respectively with accuracy as good or better than any other method tested. Moreover, memory usage of this method (and other embedding methods) is significantly less than One-vs-Rest. 6 Conclusion We have introduced an approach for fast multi-class classification by learning label embedding trees by (approximately) optimizing the overall tree loss. Our approach obtained orders of magnitude speedup compared to One-vs-Rest while yielding as good or better accuracy, and outperformed other tree-based or embedding approaches. Our method makes real-time inference feasible for very large multi-class tasks such as web advertising, document categorization and image annotation. Acknowledgements We thank Ameesh Makadia for very useful discussions. 8 References [1] E. Allwein, R. Schapire, and Y. Singer. Reducing multiclass to binary: a unifying approach for margin classifiers. Journal of Machine Learning Research (JMLR), 1:113–141, 2001. [2] Y. Amit, M. Fink, N. Srebro, and S. Ullman. Uncovering shared structures in multiclass classification. In Proceedings of the 24th international conference on Machine learning, page 24. ACM, 2007. [3] B. Bai, J. Weston, D. Grangier, R. Collobert, C. Cortes, and M. Mohri. Half transductive ranking. In Artificial Intelligence and Statistics (AISTATS), 2010. [4] M. Belkin and P. Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. Advances in neural information processing systems, 1:585–592, 2002. [5] J.L. Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):517, 1975. [6] A. Beygelzimer, J. Langford, Y. Lifshits, G. Sorkin, and A. Strehl. Conditional probability tree estimation analysis and algorithm. In Conference in Uncertainty in Artificial Intelligence (UAI), 2009. [7] A. Beygelzimer, J. Langford, and P. Ravikumar. Error-correcting tournaments. In International Conference on Algorithmic Learning Theory (ALT), pages 247–262, 2009. [8] L´eon Bottou. Stochastic learning. In Olivier Bousquet and Ulrike von Luxburg, editors, Advanced Lectures on Machine Learning, Lecture Notes in Artificial Intelligence, LNAI 3176, pages 146–168. Springer Verlag, Berlin, 2004. [9] 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. [10] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. Journal of Machine Learning Research (JMLR), 2:265–292, 2002. [11] O. Dekel and O. Shamir. Multiclass-Multilabel Learning when the Label Set Grows with the Number of Examples. In Artificial Intelligence and Statistics (AISTATS), 2010. [12] J. Deng, W. Dong, R. Socher, Li-Jia Li, K. Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 248–255, 2009. [13] T. Dietterich and G. Bakiri. On the algorithmic implementation of multiclass kernel-based vector machines. Journal of Artificial Intelligence Research (JAIR), 2:263–286, 1995. [14] C. Fellbaum, editor. WordNet: An Electronic Lexical Database. MIT Press, 1998. [15] David Grangier and Samy Bengio. A discriminative kernel-based model to rank images from text queries. Transactions on Pattern Analysis and Machine Intelligence, 30(8):1371–1384, 2008. [16] T. Hastie and R. Tibshirani. Classication by pairwise coupling. The Annals of Statistics, 26(2):451–471, 2001. [17] D. Hsu, S. Kakade, J. Langford, and T. Zhang. Multi-label prediction via compressed sensing. In Neural Information Processing Systems (NIPS), 2009. [18] M.I. Jordan and R.A. Jacobs. Hierarchical mixtures of experts and the EM algorithm. Neural computation, 6(2):181–214, 1994. [19] J. Langford and A. Beygelzimer. Sensitive error correcting output codes. In Conference on Learning Theory (COLT), pages 158–172, 2005. [20] U. Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):416, 2007. [21] 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. [22] T. Oates and D. Jensen. The effects of training set size on decision tree complexity. In International Conference on Machine Learning (ICML), pages 254–262, 1997. [23] J. Platt, N. Cristianini, and J. Shawe-Taylor. Large margin dags for multiclass classification. In NIPS, pages 547–553, 2000. [24] J. Quinlan. C4.5 : programs for machine learning. Morgan Kaufmann, 1993. [25] R. Rifkin and A. Klautau. In defense of one-vs-all classification. Journal of Machine Learning Research (JMLR), 5:101–141, 2004. [26] K. Weinberger and O. Chapelle. Large margin taxonomy embedding for document categorization. In NIPS, pages 1737–1744, 2009. [27] P.N. Yianilos. Data structures and algorithms for nearest neighbor search in general metric spaces. In Proceedings of the fourth annual ACM-SIAM Symposium on Discrete algorithms, page 321. Society for Industrial and Applied Mathematics, 1993. 9
2010
10
3,855
Optimal Web-scale Tiering as a Flow Problem Gilbert Leung eBay, Inc. San Jose, CA, USA gleung@alum.mit.edu Novi Quadrianto SML-NICTA & RSISE-ANU Canberra, ACT, Australia novi.quad@gmail.com Alexander J. Smola Yahoo! Research Santa Clara, CA, USA alex@smola.org Kostas Tsioutsiouliklis Yahoo! Labs Sunnyvale, CA, USA kostas@yahoo-inc.com Abstract We present a fast online solver for large scale parametric max-flow problems as they occur in portfolio optimization, inventory management, computer vision, and logistics. Our algorithm solves an integer linear program in an online fashion. It exploits total unimodularity of the constraint matrix and a Lagrangian relaxation to solve the problem as a convex online game. The algorithm generates approximate solutions of max-flow problems by performing stochastic gradient descent on a set of flows. We apply the algorithm to optimize tier arrangement of over 84 million web pages on a layered set of caches to serve an incoming query stream optimally. 1 Introduction Parametric flow problems have been well-studied in operations research [7]. It has received a significant amount of contributions and has been applied in many problem areas such as database record segmentation [2], energy minimization for computer vision [10], critical load factor determination in two-processor systems [16], end-of-session baseball elimination [6], and most recently by [19, 18, 20] in product portfolio selection. In other words, it is a key technique for many estimation and assignment problems. Unfortunately many algorithms proposed in the literature are geared towards thousands to millions of objects rather than billions, as is common in web-scale problems. Our motivation for solving parametric flow is the problem of webpage tiering for search engine indices. While our methods are entirely general and could be applied to a range of other machine learning and optimization problems, we focus on webpage tiering as the illustrative example in this paper. The rationale for choosing this application is threefold: firstly, it is a real problem in search engines. Secondly, it provides very large datasets. Thirdly, in doing so we introduce a new problem to the machine learning community. That said, our approach would also be readily applicable to very large scale versions of the problems described in [2, 16, 6, 19]. The specific problem that will provide our running example is that of assigning webpages to several tiers of a search engine cache such that the time to serve a query is minimized. For a given query, a search engine returns a number of documents (typically 10). The time it takes to serve a query depends on where the documents are located. The first tier (or cache) is the fastest (using premium hardware, etc. thus also often the smallest) and retrieves its documents with little latency. If even just a single document is located in a back tier, the delay is considerably increased since now we need to search the larger (and slower) tiers until the desired document is found. Hence it is our goal to assign the most popular documents to the fastest tiers while taking the interactions between documents into account. 1 2 The Tiering Problem We would like to allocate documents d ∈D into k tiers of storage at our disposal. Moreover, let q ∈Q be the queries arriving at a search engine, with finite values vq > 0 (e.g. the probability of the query, possibly weighted by the relevance of the retrieved results), and a set of documents Dq retrieved for the query. This input structure is stored in a bipartite graph G with vertices V = D ∪Q and edges (d, q) ∈E whenever document d should be retrieved for query q. The k tiers, with tier 1 as the most desirable and k the least (most costly for retrieval), form an increasing sequence of cummulative capacities Ct, with Ct indicating how many pages can be stored by tiers t′ ≤t together. Without loss of generality, assume Ck−1 < |D| (that is, the last tier is required to hold all documents, or the problem can be reduced). Finally, for each t ≥2 we assume that there is a penalty pt−1 > 0 incurred by a tier-miss at level t (known as “fallthrough” from tier t −1 to tier t). And since we have to access tier 1 regardless, we set p0 = 0 for convenience. For instance, retrieving a page in tier 3 incurs a total penalty of p1 + p2. 2.1 Background Optimization of index structures and data storage is a key problem in building an efficient search engine. Much work has been invested into building efficient inverted indices which are optimized for query processing [17, 3]. These papers all deal with the issue of optimizing the data representation for a given query and how an inverted index should be stored and managed for general queries. In particular, [3, 14] address the problem of computing the top-k results without scanning over the entire inverted lists. Recently, machine learning algorithms have been proposed [5] to improve the ordering within a given collection beyond the basic inverted indexing setup [3]. A somewhat orthogonal strategy to this is to decompose the collection of webpages into a number of disjoint tiers [15] ordered in decreasing level of relevance. That is, documents are partitioned according to their relevance for answering queries into different tiers of (typically) increasing size. This leads to putting the most frequently retrieved or the most relevant (according to the value of query, the market or other operational parameters) pages into the top tier with the smallest latency and relegating the less frequently retrieved or the less relevant pages into bottom tiers. Since queries are often carried out by sequentially searching this hierarchy of tiers, an improved ordering minimizes latency, improves user satisfaction, and it reduces computation. A naive implementation of this approach would simply assign a value to each page in the index and arrange them such that the most frequently accessed pages reside in the highest levels of the cache. Unfortunately this approach is suboptimal: in order to answer a given query well a search engine typically does not only return a single page as a result but rather returns a list of r (typically r = 10) pages. This means that if even just one of these pages is found at a much lower tier, we either need to search the backtiers to retrieve this page or alternatively we need to sacrifice result relevance. At first glance, the problem is daunting: we need to take all correlations among pages induced by user queries into account. Moreover, for reasons of practicality we need to design an algorithm which is linear in the amount of data presented (i.e. the number of queries) and whose storage requirements are only linear in the number of pages. Finally, we would like to obtain guarantees in terms of performance for the assignment that we obtain from the algorithm. Our problem, even for r = 2, is closely related to the weighted k-densest subgraph problem, which is NP hard [13]. 2.2 Optimization Problem Since the problem we study is somewhat more general than the parametric flow problem we give a self-contained derivation of the problem and derive the more general version beyond [7]. For brevity, we relegate all proofs to the Appendix. We denote the result set for query q by Dq := {d : (d, q) ∈G}, and similarly, the set of queries seeking for a document d by Qd := {q : (d, q) ∈G}. For a document d we denote by zd ∈{1, . . . , k} the tier storing d. Define uq := max d∈Dq zd (1) 2 as the number of cache levels we need to traverse to answer query q. In other words, it is the document found in the worst tier which determines the cost of access. Integrating the optimization over uq we may formulate the tiering problem as an integer program: minimize z,u X q∈Q vq uq−1 X t=1 pt subject to zd ≤uq ≤k for all (q, d) ∈G and X d∈D {zd ≤t} ≤Ct ∀t. (2) Note that we replaced the maximization condition (1) by a linear inequality in preparation for a reformulation as an integer linear program. Obviously, the optimal uq for a given z will satisfy (1). Lemma 1 Assume that Ck ≥|D| > Ck−1. Then there exists an optimal solution of (2) such that P d {zd ≤t} = Ct for all 1 ≤t < k. In the following we address several issues associated with the optimization problem: A) Eq. (2) is an integer program and consequently it is discrete and nonconvex. We show that there exists a convex reformulation of the problem. B) It is at a formidable scale (often |D| > 109). Section 3.4 presents a stochastic gradient descent procedure to solve the problem in few passes through the database. C) We have insufficient data for an accurate tier assignment for pages associated with tail queries. This can be addressed by a smoothing estimator for the tier index of a page. 2.3 Integer Linear Program We now replace the selector variables zd and uq by binary variables via a “thermometer” code. Let x ∈{0; 1}D×(k−1) subject to xdt ≥xd,t+1 for all d, t (3a) y ∈{0; 1}Q×(k−1) subject to yqt ≥yq,t+1 for all q, t (3b) be index variables. Thus we have the one-to-one mapping zd = 1 + P t xdt and xdt = {zd > t} between z and x. For instance, for k = 5, a middle tier z = 3 maps into x = (1, 1, 0, 0) (requiring two fallthroughs), and the best tier z = 1 corresponds to x = (0, 0, 0, 0). The mapping between u and y is analogous. The constraint uq ≥zd can simply be rewritten coordinate-wise yqt ≥xdt. Finally, the capacity constraints assume the form P d xdt ≥|D| −Ct. That is, the number of pages allocated to higher tiers are at least |D| −Ct. Define remaining capacities ¯Ct := |D| −Ct and use the variable transformation (1) we have the following integer linear program: minimize x,y v⊤yp (4a) subject to xdt ≥xd,t+1 and yqt ≥yq,t+1 and yqt ≥xdt for all (q, d) ∈G (4b) P d xdt ≥¯Ct for all 1 ≤t ≤k −1 (4c) x ∈{0; 1}D×(k−1) ; y ∈{0; 1}Q×(k−1) (4d) where p = (p1, . . . , pk−1)⊤and v = (v1, . . . , v|Q|)⊤are column vectors, and y a matrix (yqt). The advantage of (4) is that while still discrete, we now have linear constraints and a linear objective function. The only problem is that the variables x and y need to be binary. Lemma 2 The solutions of (2) and (4) are equivalent. 2.4 Hardness Before discussing convex relaxations and approximation algorithms it is worthwhile to review the hardness of the problem: consider only two tiers, and a case where we retrieve only two pages per query. The corresponding graph has vertices D and edges (d, d′) ∈E, whenever d and d′ are displayed together to answer a query. In this case the tiering problem reduces to one of finding a subset of vertices D′ ⊂D such that the induced subgraph has the largest number (possibly weighted) of edges subject to the capacity constraint |D′| ≤C. For the case of k pages per query, simply assume that k −2 of the pages are always the same. Hence the problem of finding the best subset reduces to the case of 2 pages per query. This problem is identical to the k-densest subgraph problem which is known to be NP hard [13]. 3 URL query URL query Figure 1: k-densest subgraph reduction. Vertices correspond to URLs and queries correspond to edges. Queries can be served whenever the corresponding URLs are in the cache. This is the case whenever the induced subgraph contains the edge. 3 Convex Programming The key idea in solving (4) is to relax the capacity constraints for the tiers. This renders the problem totally unimodular and therefore amenable to a solution by a linear program. We replace the capacity constraint by a partial Lagrangian. This does not ensure that we will be able to meet the capacity constraints exactly anymore. Instead, we will only be able to state ex-post that the relaxed solution is optimal for the observed capacity distribution. Moreover, we are still able to control capacity by a suitable choice of the associated Lagrange multipliers. 3.1 Linear Program Instead of solving (4) we study the linear program: minimize x,y v⊤yp −1⊤xλ subject to xdt ≥xd,t+1 and yqt ≥yq,t+1 (5) yqt ≥xdt for (q, d) ∈G and xdt, yqt ∈[0, 1] Here λ = (λ1, . . . , λk−1)⊤act as Lagrange multipliers λt ≥0 for enforcing capacity constraints and 1 denotes a column of |D| ones. We now relate the solution of (5) to that of (4). Lemma 3 For any choice of λ with λt ≥0 the linear program (5) has an integral solution, i.e. there exists some x∗, y∗satisfying x∗ dt, y∗ qt ∈{0; 1} which minimize (5). Moreover, for ¯Ct = P d x∗ dt the solution (x∗, y∗) also solves (4). We have succeeded in reducing the complexity of the problem to that of a linear program, yet it is still formidable and it needs to be solved to optimality for an accurate caching prescription. Moreover, we need to adjust λ such that we satisfy the desired capacity constraints (approximately). Lemma 4 Denote by L∗(λ) the value of (5) at the solution of (5) and let L(λ) := L∗(λ)+P t ¯Ctλt. Hence L(λ) is concave in λ and moreover, L(λ) is maximized for a choice of λ where the solution of (5) satisfies the constraints of (4). Note that while the above two lemmas provide us with a guarantee that for every λ and for every associated integral solution of (5) there exists a set of capacity constraints for which this is optimal and that such a capacity satisfying constraint can be found efficiently by concave maximization, they do not guarantee the converse: not every capacity constraint can be satisfied by the convex relaxation, as the following example demonstrates. Example 1 Consider the case of 2 tiers (hence we drop the index t), a single query q and 3 documents d. Set the capacity constraint of the first tier to 1. In this case it is impossible to avoid a cache miss in the ILP. In the LP relaxation of (4), however, the optimal (non-integral) solution is to set all xd = 1 3 and yq = 1 3. The partial Lagrangian L(λ) is maximized for λ = −p/3. Moreover, for λ < −p/3 the optimization problem (5) has as its solution x = y = 1; whereas for λ > −p/3 the solution is x = y = 0. For the critical value any convex combination of those two values is valid. This example shows why the optimal tiering problem is NP hard — it is possible to design cases where the tier assignment for a page is highly ambiguous. Note that for the integer programming problem with capacity constraint C = 2 we could allocate an arbitrary pair of pages to the cache. This does not change the objective function (total cache miss) or feasibility. 4 s t pages queries λ ∞ (1-vq) s t pages queries λ ∞ (1-vq) Figure 2: Left: maximum flow problem for a problem of 4 pages and 3 queries. The minimum cut of the directed graph needs to sever all pages leading to a query or alternatively it needs to sever the corresponding query incurring a penalty of (1 −vq). This is precisely the tiering objective function for the case of two tiers. Right: the same query graph for three tiers. Here the black nodes and dashed edges represent a copy of the original graph — additionally each page in the original graph also has an infinite-capacity link to the corresponding query in the additional graph. 3.2 Graph Cut Equivalence It is well known that the case of two tiers (k = 2) can be relaxed to a min-cut, max-flow problem [7, 4]. The transformation works by designing a bipartite graph between queries q and documents d. All documents are connected to the source s by edges with capacity λ and queries are connected to the sink t with capacity (1 −vq). Documents d retrieved for a query q are connected to q with capacity ∞. Figure 2 provides an example of such a maximum-flow, minimum-cut graph from source s to sink t. The conversion to several tiers is slightly more involved. Denote by vdi vertices associated with document d and tier i and moreover, denote by wqi vertices associated with a query q and tier i. Then the graph is given by edges (s, vdi) with capacities λi; edges (vdi, wqi′) for all (document, query) pairs and for all i ≤i′, endowed with infinite capacity; and edges (wqi, t) with capacity (1 −vq). As with the simple caching problem, we need to impose a cut on any query edge for which not all incoming page edges have been cut. The key difference is that in order to benefit from storing pages in a better tier we need to guarantee that the page is contained in the lower tier, too. 3.3 Variable Reduction We now simplify the relaxed problem (5) further by reducing the number of variables, without sacrificing integrality of the solution. A first step is to substitute yqt = maxd∈Dq xdt, to obtain an optimization problem over the documents alone: minimize x v⊤ max d∈Dq xdt  p −1⊤xλ subject to xdt ≥xdt′ for t′ > t and xdt ∈[0, 1] (6) Note that the monotonicity condition yqt ≥yqt′ for t′ > t is automatically inherited from that of x. The solution of (6) is still integral since the problem is equivalent to one with integral solution. Lemma 5 We may scale pt and λt together by constants βt > 0, such that p′ t/pt = βt = λ′ t/λt. The resulting solution of this new problem (6) with (p′, λ′) is unchanged. Essentially, problem (5) as parameterized by (p, λ) yields solutions which form equivalence classes. Consequently for the convenience of solving (5), we may assume p′ t = 1 for t ≥1. We only need to consider the original p for evaluating the objective using solution z (thus, same observed capacities Ct). Since (5) is a relaxation of (4) this reformulation can be extended to the integer linear program, too. Moreover, under reasonable conditions on the capacity constraints, there is more structure in λ. Lemma 6 Assume that ¯Ct is monotonically decreasing and that pt = 1 for t ≥1. Then any choice of λ satisfying the capacity constraints is monotonically non-increasing. 5 Algorithm 1 Tiering Optimization Initialize all zd = 0 Initialize n = 100 for i = 1 to MAXITER do for all q ∈Q do η = 1 √n (learning rate) n ←n + 1 (increment counter) Update z ←z −η∂xℓq(z) Project z to [1, k]D via zd ←max(1, min(k, zd)) end for end for Algorithm 2 Deferred updates Observe current time n′ Read timestamp n for document d Compute update steps δ = δ(n′, n) repeat j = ⌊zd + 1⌋(next largest tier) t = (j −zd)/λj (change needed to reach next tier) if t > δ then δ = 0 and zd ←zd + λjδ (partial step; we are done) else δ ←δ −t and zd ←zd + 1 (full step; next tier) end if until δ = 0 (no more updates) or zd = k−1 (bottom tier) One interpretation of this is that, unless the tiers are increasingly inexpensive, the optimal solution would assign pages in a fashion yielding empty middle tiers (the remaining capacities ¯Ct not strictly decreasing). This monotonicity simplifies the problem. Consequently, we exploit this fact to complete the variable reduction. Define δλi := λi −λi+1 for i ≥1 (all non-negative by virtue of Lemma 6) and fλ(χ) := −λ1χ + k−2 X i=1 δλi max(0, i −χ) for χ ∈[0, k-1]. (7) Note that by construction ∂χfλ(χ) = −λi whenever χ ∈(i −1, i). The function fλ is clearly convex, which helps describe our tiering problem via the following convex program minimize z v⊤ max d∈Dq zd  + X d fλ(zd −1) for zd ∈[1, k] (8) We now use only one variable per document. Moreover, the convex constraints are simple box constraints. This simplifies convex projections, as needed for online programming. Lemma 7 The solution of (8) is equivalent to that of (5). 3.4 Online Algorithm We now turn our attention to a fast algorithm for minimizing (8). While greatly simplified relative to (2) it still remains a problem of billions of variables. The key observation is that the objective function of (8) can be written as sum over the following loss functions lq(z) := vq max d∈Dq zd + 1 |Q| X d fλ(zd −1) (9) where |Q| denotes the cardinality of the query set. The transformation suggests a simple stochastic gradient descent optimization algorithm: traverse the input stream by queries, and update the values of xd of all those documents d that would need to move into the next tier in order to reduce service time for a query. Subsequently, perform a projection of the page vectors to the set [1, k] to ensure that we do not assign pages to non-existent tiers. Algorithm 1 proceeds by processing the input query-result records (q, vq, Dq) as a stream comprising the set of pages that need to be displayed to answer a given query. More specifically, it updates the tier preferences of the pages that have the lowest tier scores for each level and it decrements the preferences for all other pages. We may apply results for online optimization algorithms [1] to show that a small number of passes through the dataset suffice. Lemma 8 The solution obtained by Algorithm 1 converges at rate O( p (log T)/T) to its minimum value. Here T is the number of queries processed. 6 3.5 Deferred and Approximate Updates The naive implementation of algorithm 1 is infeasible as it would require us to update all |D| coordinates of xd for each query q. However, it is possible to defer the updates until we need to inspect zd directly. The key idea is to exploit that for all zd with d ̸∈Dq the updates only depend on the value of zd at update time (Section A.1) and that fλ is piecewise linear and monotonically decreasing. 3.6 Path Following The tiering problem has the appealing property [19] that the solutions for increasing λ form a nested subset. In other words, relaxing capacity constraints never demotes but only promotes pages. This fact can be used to design specialized solvers which work well at determining the entire solution path at once for moderate-sized problems [19]. Alternatively, we can simply take advantage of solutions for successive values of λ in determining an approximate solution path by using the solution for λ as initialization for λ′. This strategy is well known as path-following in numerical optimization. In this context it is undesirable to solve the optimization for a particular value of λ to optimality. Instead, we simply solve it approximately (using a small number of passes) and readjust λ. Due to the nesting property [19] and the fact that the optimal solutions are binary (via total unimodularity) the average over solutions on the entire path provides an ordering of pages into tiers. Thus, Lemma 9 Denote by xd(λ) the solution of the two-tier optimization problem for a given value of λ. Moreover, denote by ζd := [λ′ −λ]−1 R λ′ λ xd(λ) the average value over a range of Lagrange multipliers. Then ζd provides an order for sorting documents into tiers for the entire range [λ, λ′]. In practice1, we only choose a finite number of steps for near-optimal solutions. This yields Algorithm 3 Path Following Initialize all (xdt) = zd ∈[1, k] for each λ ∈Λ do Refine variables xdt(λ) by Algorithm 1 using a small number of iterations. end for Average the variables xdt = P λ∈Λ xdt(λ)/|Λ| Sort the documents with the resulting total scores zd Fill the ordered documents to tier 1, then tier 2, etc. Experiments show that using synthetic data (where it was feasible to compute and compare with the optimal LP solution pointwise) even |Λ| = 5 values of λ produce nearoptimal results in the two-tier case. Moreover, we may carry out the optimization procedure for several parameters simultaneously. This is advantageous since the main cost is sequential RAM read-write access rather than CPU speed. 4 Experiments To examine the efficacy of our algorithm at web-scale we tested it with real data from a major search engine. The results of our proposed methods are compared to those of the max and sum heuristics in Section A.2. We also performed experiments on small synthetic data (2-tier and 3-tier), where we were able to show that our algorithm converges to exact solution given by an LP solver (Appendix C). However, since LP solvers are very slow, it is not feasible for web-scale problems. We processed the logs for one week of September 2009 containing results from the top geographic regions which include a majority of the search engine’s user base. To simplify the heavy processing involved for collecting such a massive data set, we only record whether a particular result, defined as a (query, document) pair, appears in top 10 (first result page) for a given session and we aggregate the view counts of such results, which will be used for the session value vq once. In its entirety this subset contains about 108 viewed documents and 1.6 · 107 distinct queries. We excluded results viewed only once, yielding a final data set of 8.4 · 107 documents.2 For simplicity, our experiments are carried out for a two-tier (single cache) system such that the only design parameter is the relative 1This result can be readily extended to k > 2, and any probability measure over a set of Lagrangian values λ ∈Λ ⊆Rk−1 + so long as there are positive weights around the values yielding all the nested solutions. 2The search results for any fixed query vary for a variety of reasons, e.g. database updates. We approximate the session graph by treating queries with different result sets as if they were different. This does not change 7 Figure 3: Left: Experimental results for real web-search data with 8.4 · 107 pages and 1.6 · 107 queries. Session miss rate for the online procedure, the max and sum heuristics (A.2). (The yaxis is normalized such that SUM-tier’s first point is at 1). As seen, the max heuristic cannot be optimal for any but small cache sizes, but it performs comparably well to Online. Right: “Online” is outperforming MAX for cache size larger than 60%, sometimes more than twofold. size of the prime tier (the cache). The ranking variant of our online Algorithm 3 (30 passes over the data) consistently outperforms the max and sum heuristics over a large span of cache sizes (Figure 3). Direct comparison can now be made between our online procedure and the max and sum heuristics since each one induces a ranking on the set of documents. We then calculate the session miss rate of each procedure at any cache size, and report the relative improvement of our online algorithm as ratios of miss rates in Figure 3–Right. The optimizer fits well in a desktop’s RAM since 5 values of λ only amount to about 2GB of singleprecision x(λ). We measure a throughput of approximately 0.5 million query-sessions per second (qps) for this version, and about 2 million qps for smaller problems (as they incur fewer memory page faults). Billion-scale problems can readily fit in 24GB of RAM by serializing computation one λ value at a time. We also implemented a multi-thread version utilizing 4 CPU cores, although its performance did not improve since memory and disk bandwidth limits have already been reached. 5 Discussion We showed that very large tiering and densest subset optimization problems can be solved efficiently by a relatively simple online optimization procedure (Some extensions are in Appendix B). It came somewhat as a surprise that the max heuristic often works nearly as well as the optimal tiering solution. Since we experienced this correlation on both synthetic and real data we believe that it might be possible to prove approximation guarantees for this strategy whenever the bipartite graphs satisfy certain power-law properties. Some readers may question the need for a static tiering solution, given that data could, in theory, be reassigned between different caching tiers on the fly. The problem is that in production systems of a search engine, such reassignment of large amounts of data may not always be efficient for operational reasons (e.g. different versions of the ranking algorithm, different versions of the index, different service levels, constraints on transfer bandwidth). In addition to that, tiering is a problem not restricted to the provision of webpages. It occurs in product portfolio optimization and other resource constrained settings. We showed that it is possible to solve such problems at several orders of magnitude larger scale than what was previously considered feasible. Acknowledgments We thank Kelvin Fong for providing computer facilities. 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. This work was carried out while GL and NQ were with Yahoo! Labs. the optimization problem and keeps the model accurate. Moreover, we remove rare results by maintaining that the lowest count of a document is at least as large as the square root of the highest within the same session. 8 References [1] P. Bartlett, E. Hazan, and A. Rakhlin. Adaptive online gradient descent. In J. C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, NIPS 20, Cambridge, MA, 2008. [2] M. J. Eisner and D. G. Severance. Mathematical techniques for efficient record segmentation in large shared databases. J. ACM, 23(4):619–635, 1976. [3] R. Fagin. Combining fuzzy information from multiple systems. In Fifteenth ACM SIGACTSIGMOD-SIGART Symposium on Principles of Database Systems, pages 216–226, Montreal, Canada, 1996. [4] L. R. Ford and D. R. Fulkerson. Maximal flow through a network. Canadian Journal of Mathematics, 8:399–404, 1956. [5] S. Goel, J. Langford, and A. Strehl. Predictive indexing for fast search. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, NIPS, pages 505–512. MIT Press, 2008. [6] D. Gusfield and C. U. Martel. A fast algorithm for the generalized parametric minimum cut problem and applications. Algorithmica, 7(5&6):499–519, 1992. [7] D. Gusfield and ´E. Tardos. A faster parametric minimum-cut algorithm. Algorithmica, 11(3):278–290, 1994. [8] I. Heller and C. Tompkins. An extension of a theorem of dantzig’s. In H. Kuhn and A. Tucker, editors, Linear Inequalities and Related Systems, volume 38 of Annals of Mathematics Studies. AMS, 1956. [9] J. Kleinberg. Authoritative sources in a hyperlinked environment. Journal of the ACM, 46(5):604–632, 1999. [10] V. Kolmogorov, Y. Boykov and C. Rother. Applications of parametric maxflow in computer vision. ICCV, 1–8, 2007. [11] Y. Nesterov and J.-P. Vial. Confidence level solutions for stochastic programming. Technical Report 2000/13, Universit´e Catholique de Louvain - Center for Operations Research and Economics, 2000. [12] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford Digital Library Technologies Project, Stanford, CA, USA, Nov. 1998. [13] C. H. Papadimitriou and K. Steiglitz. Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, New Jersey, 1982. [14] M. Persin, J. Zobel, and R. Sacks-Davis. Filtered document retrieval with frequency-sorted indexes. JASIS, 47(10):749–764, 1996. [15] K. M. Risvik, Y. Aasheim, and M. Lidal. Multi-tier architecture for web search engines. In LA-WEB, pages 132–143. IEEE Computer Society, 2003. [16] H. S. Stone. Critical load factors in two-processor distributed systems. IEEE Trans. Softw. Eng., 4(3):254–258, 1978. [17] H. Yan, S. Ding, and T. Suel. Inverted index compression and query processing with optimized document ordering. In J. Quemada, G. Le´on, Y. Maarek, and W. Nejdl, editors, 18th International Conference on World Wide Web, Madrid, Spain, pages 401–410. ACM, 2009. [18] B. Zhang, J. Ward, and A. Feng. A simultaneous maximum flow algorithm for the selection model. Technical Report HPL-2005-91, Hewlett Packard Laboratories, 2005. [19] B. Zhang, J. Ward, and Q. Feng. A simultaneous parametric maximum-flow algorithm for finding the complete chain of solutions. Technical Report HPL-2004-189, Hewlett Packard Laboratories, 2004. [20] B. Zhang, J. Ward, and Q. Feng. Simultaneous parametric maximum flow algorithm with vertex balancing. Technical Report HPL-2005-121, Hewlett Packard Laboratories, 2005. 9
2010
100
3,856
Slice sampling covariance hyperparameters of latent Gaussian models Iain Murray School of Informatics University of Edinburgh Ryan Prescott Adams Dept. Computer Science University of Toronto Abstract The Gaussian process (GP) is a popular way to specify dependencies between random variables in a probabilistic model. In the Bayesian framework the covariance structure can be specified using unknown hyperparameters. Integrating over these hyperparameters considers different possible explanations for the data when making predictions. This integration is often performed using Markov chain Monte Carlo (MCMC) sampling. However, with non-Gaussian observations standard hyperparameter sampling approaches require careful tuning and may converge slowly. In this paper we present a slice sampling approach that requires little tuning while mixing well in both strong- and weak-data regimes. 1 Introduction Many probabilistic models incorporate multivariate Gaussian distributions to explain dependencies between variables. Gaussian process (GP) models and generalized linear mixed models are common examples. For non-Gaussian observation models, inferring the parameters that specify the covariance structure can be difficult. Existing computational methods can be split into two complementary classes: deterministic approximations and Monte Carlo simulation. This work presents a method to make the sampling approach easier to apply. In recent work Murray et al. [1] developed a slice sampling [2] variant, elliptical slice sampling, for updating strongly coupled a-priori Gaussian variates given non-Gaussian observations. Previously, Agarwal and Gelfand [3] demonstrated the utility of slice sampling for updating covariance parameters, conventionally called hyperparameters, with a Gaussian observation model, and questioned the possibility of slice sampling in more general settings. In this work we develop a new slice sampler for updating covariance hyperparameters. Our method uses a robust representation that should work well on a wide variety of problems, has very few technical requirements, little need for tuning and so should be easy to apply. 1.1 Latent Gaussian models We consider generative models of data that depend on a vector of latent variables f that are Gaussian distributed with covariance Σθ set by unknown hyperparameters θ. These models are common in the machine learning Gaussian process literature [e.g. 4] and throughout the statistical sciences. We use standard notation for a Gaussian distribution with mean m and covariance Σ, N(f; m, Σ) ≡|2πΣ|−1/2 exp −1 2(f −m)⊤Σ−1(f −m) , (1) and use f ∼N(m, Σ) to indicate that f is drawn from a distribution with the density in (1). 1 0 0.2 0.4 0.6 0.8 1 −2 −1.5 −1 −0.5 0 0.5 1 Input Space, x Latent values, f l = 0.1 l = 0.5 l = 2 (a) Prior draws 10 −2 10 −1 10 0 10 1 0 0.02 0.04 0.06 0.08 0.1 lengthscale, l p(log l | f) l = 0.1 l = 0.5 l = 2 (b) Lengthscale given f Figure 1: (a) Shows draws from the prior over f using three different lengthscales in the squared exponential covariance (2). (b) Shows the posteriors over log-lengthscale for these three draws. The generic form of the generative models we consider is summarized by covariance hyperparameters θ ∼ph, latent variables f ∼N(0, Σθ), and a conditional likelihood P(data|f) = L(f). The methods discussed in this paper apply to covariances Σθ that are arbitrary positive definite functions parameterized by θ. However, our experiments focus on the popular case where the covariance is associated with N input vectors {xn}N n=1 through the squaredexponential kernel, (Σθ)ij = k(xi, xj) = σ2 f exp  −1 2 PD d=1 (xd,i−xd,j)2 ℓ2 d  , (2) with hyperparameters θ={σ2 f, {ℓd}}. Here σ2 f is the ‘signal variance’ controlling the overall scale of the latent variables f. The ℓd give characteristic lengthscales for converting the distances between inputs into covariances between the corresponding latent values f. For non-Gaussian likelihoods we wish to sample from the joint posterior over unknowns, P(f, θ|data) = 1 Z L(f) N(f; 0, Σθ) ph(θ) . (3) We would like to avoid implementing new code or tuning algorithms for different covariances Σθ and conditional likelihood functions L(f). 2 Markov chain inference A Markov chain transition operator T(z′ ←z) defines a conditional distribution on a new position z′ given an initial position z. The operator is said to leave a target distribution π invariant if π(z′) = R T(z′ ←z) π(z) dz. A standard way to sample from the joint posterior (3) is to alternately simulate transition operators that leave its conditionals, P(f |data, θ) and P(θ|f), invariant. Under fairly mild conditions the Markov chain will equilibrate towards the target distribution [e.g. 5]. Recent work has focused on transition operators for updating the latent variables f given data and a fixed covariance Σθ [6, 1]. Updates to the hyperparameters for fixed latent variables f need to leave the conditional posterior, P(θ|f) ∝N(f; 0, Σθ) ph(θ), (4) invariant. The simplest algorithm for this is the Metropolis–Hastings operator, see Algorithm 1. Other possibilities include slice sampling [2] and Hamiltonian Monte Carlo [7, 8]. Alternately fixing the unknowns f and θ is appealing from an implementation standpoint. However, the resulting Markov chain can be very slow in exploring the joint posterior distribution. Figure 1a shows latent vector samples using squared-exponential covariances with different lengthscales. These samples are highly informative about the lengthscale hyperparameter that was used, especially for short lengthscales. The sharpness of P(θ|f), Figure 1b, dramatically limits the amount that any Markov chain can update the hyperparameters θ for fixed latent values f. 2 Algorithm 1 M–H transition for fixed f Input: Current f and hyperparameters θ; proposal dist. q; covariance function Σ(). Output: Next hyperparameters 1: Propose: θ′ ∼q(θ′ ; θ) 2: Draw u ∼Uniform(0, 1) 3: if u < N (f;0,Σθ′) ph(θ′) q(θ ; θ′) N (f;0,Σθ) ph(θ) q(θ′; θ) 4: return θ′ ▷Accept new state 5: else 6: return θ ▷Keep current state Algorithm 2 M–H transition for fixed ν Input: Current state θ, f; proposal dist. q; covariance function Σ(); likelihood L(). Output: Next θ, f 1: Solve for N(0, I) variate: ν =L−1 Σθ f 2: Propose θ′ ∼q(θ′ ; θ) 3: Compute implied values: f ′ =LΣθ′ ν 4: Draw u ∼Uniform(0, 1) 5: if u < L(f ′) ph(θ′) q(θ ; θ′) L(f) ph(θ) q(θ′; θ) 6: return θ′, f ′ ▷Accept new state 7: else 8: return θ, f ▷Keep current state 2.1 Whitening the prior Often the conditional likelihood is quite weak; this is why strong prior smoothing assumptions are often introduced in latent Gaussian models. In the extreme limit in which there is no data, i.e. L is constant, the target distribution is the prior model, P(f, θ) = N(f; 0, Σθ) ph(θ). Sampling from the prior should be easy, but alternately fixing f and θ does not work well because they are strongly coupled. One strategy is to reparameterize the model so that the unknown variables are independent under the prior. Independent random variables can be identified from a commonly-used generative procedure for the multivariate Gaussian distribution. A vector of independent normals, ν, is drawn independently of the hyperparameters and then deterministically transformed: ν ∼N(0, I), f = LΣθν, where LΣθL⊤ Σθ =Σθ. (5) Notation: Throughout this paper LC will be any user-chosen square root of covariance matrix C. While any matrix square root can be used, the lower-diagonal Cholesky decomposition is often the most convenient. We would reserve C1/2 for the principal square root, because other square roots do not behave like powers: for example, chol(C)−1 ̸= chol(C−1). We can choose to update the hyperparameters θ for fixed ν instead of fixed f. As the original latent variables f are deterministically linked to the hyperparameters θ in (5), these updates will actually change both θ and f. The samples in Figure 1a resulted from using the same whitened variable ν with different hyperparameters. They follow the same general trend, but vary over the lengthscales used to construct them. The posterior over hyperparameters for fixed ν is apparent by applying Bayes rule to the generative procedure in (5), or one can laboriously obtain it by changing variables in (3): P(θ|ν, data) ∝P(θ, ν, data) = P(θ, f =LΣθν, data) |LΣθ| ∝· · · ∝L(f(θ, ν)) ph(θ). (6) Algorithm 2 is the Metropolis–Hastings operator for this distribution. The acceptance rule now depends on the latent variables through the conditional likelihood L(f) instead of the prior N(f; 0, Σθ) and these variables are automatically updated to respect the prior. In the no-data limit, new hyperparameters proposed from the prior are always accepted. 3 Surrogate data model Neither of the previous two algorithms are ideal for statistical applications, which is illustrated in Figure 2. Algorithm 2 is ideal in the “weak data” limit where the latent variables f are distributed according to the prior. In the example, the likelihoods are too restrictive for Algorithm 2’s proposal to be acceptable. In the “strong data” limit, where the latent variables f are fixed by the likelihood L, Algorithm 1 would be ideal. However, the likelihood terms in the example are not so strong that the prior can be ignored. For regression problems with Gaussian noise the latent variables can be marginalised out analytically, allowing hyperparameters to be accepted or rejected according to their marginal posterior P(θ|data). If latent variables are required they can be sampled directly from the conditional posterior P(f |θ, data). To build a method that applies to non-Gaussian likelihoods, we create an auxiliary variable model that introduces surrogate Gaussian observations that will guide joint proposals of the hyperparameters and latent variables. 3 0 0.2 0.4 0.6 0.8 1 −2 −1.5 −1 −0.5 0 0.5 Input Space, x Observations, y current state f whitened prior proposal surrogate data proposal Figure 2: A regression problem with Gaussian observations illustrated by 2σ gray bars. The current state of the sampler has a short lengthscale hyperparameter (ℓ=0.3); a longer lengthscale (ℓ=1.5) is being proposed. The current latent variables do not lie on a straight enough line for the long lengthscale to be plausible. Whitening the prior (Section 2.1) updates the latent variables to a straighter line, but ignores the observations. A proposal using surrogate data (Section 3, with Sθ set to the observation noise) sets the latent variables to a draw that is plausible for the proposed lengthscale while being close to the current state. We augment the latent Gaussian model with auxiliary variables, g, a noisy version of the true latent variables: P(g|f, θ) = N(g; f, Sθ). (7) For now Sθ is an arbitrary free parameter that could be set by hand to either a fixed value or a value that depends on the current hyperparameters θ. We will discuss how to automatically set the auxiliary noise covariance Sθ in Section 3.2. The original model, f ∼N(0, Σθ) and (7) define a joint auxiliary distribution P(f, g|θ) given the hyperparameters. It is possible to sample from this distribution in the opposite order, by first drawing the auxiliary values from their marginal distribution P(g|θ) = N(g; 0, Σθ+Sθ), (8) and then sampling the model’s latent values conditioned on the auxiliary values from P(f |g, θ) = N(f; mθ,g, Rθ), where some standard manipulations give: Rθ = (Σ−1 θ +S−1 θ )−1 = Σθ−Σθ(Σθ+Sθ)−1Σθ = Sθ−Sθ(Sθ+Σθ)−1Sθ, mθ,g = Σθ(Σθ+Sθ)−1g = RθS−1 θ g. (9) That is, under the auxiliary model the latent variables of interest are drawn from their posterior given the surrogate data g. Again we can describe the sampling process via a draw from a spherical Gaussian: η ∼N(0, I), f = LRθη + mθ,g, where LRθ L⊤ Rθ =Rθ. (10) We then condition on the “whitened” variables η and the surrogate data g while updating the hyperparameters θ. The implied latent variables f(θ, η, g) will remain a plausible draw from the surrogate posterior for the current hyperparameters. This is illustrated in Figure 2. We can leave the joint distribution (3) invariant by updating the following conditional distribution derived from the above generative model: P(θ|η, g, data) ∝P(θ, η, g, data) ∝L f(θ, η, g)  N(g; 0, Σθ+Sθ) ph(θ). (11) The Metropolis–Hastings Algorithm 3 contains a ratio of these terms in the acceptance rule. 3.1 Slice sampling The Metropolis–Hastings algorithms discussed so far have a proposal distribution q(θ′; θ) that must be set and tuned. The efficiency of the algorithms depend crucially on careful choice of the scale σ of the proposal distribution. Slice sampling [2] is a family of adaptive search procedures that are much more robust to the choice of scale parameter. 4 Algorithm 3 Surrogate data M–H Input: θ, f; prop. dist. q; model of Sec. 3. Output: Next θ, f 1: Draw surrogate data: g ∼N(f, Sθ) 2: Compute implied latent variates: η=L−1 Rθ (f −mθ,g) 3: Propose θ′ ∼q(θ′ ; θ) 4: Compute function f ′ =LRθ′ η + mθ′,g 5: Draw u ∼Uniform(0, 1) 6: if u < L(f ′) N (g;0,Σθ′+Sθ′) ph(θ′) q(θ ; θ′) L(f) N (g;0,Σθ+Sθ) ph(θ) q(θ′ ; θ) 7: return θ′, f ′ ▷Accept new state 8: else 9: return θ, f ▷Keep current state Algorithm 4 Surrogate data slice sampling Input: θ, f; scale σ; model of Sec. 3. Output: Next f, θ 1: Draw surrogate data: g ∼N(f, Sθ) 2: Compute implied latent variates: η=L−1 Rθ (f −mθ,g) 3: Randomly center a bracket: v ∼Uniform(0, σ), θmin =θ−v, θmax =θmin+σ 4: Draw u ∼Uniform(0, 1) 5: Determine threshold: y = u L(f) N(g; 0, Σθ+Sθ) ph(θ) 6: Draw proposal: θ′ ∼Uniform(θmin, θmax) 7: Compute function f ′ =LRθ′ η + mθ′,g 8: if L(f ′) N(g; 0, Σθ′ +Sθ′) ph(θ′) > y 9: return f ′, θ′ 10: else if θ′ < θ 11: Shrink bracket minimum: θmin = θ′ 12: else 13: Shrink bracket maximum: θmax = θ′ 14: goto 6 Algorithm 4 applies one possible slice sampling algorithm to a scalar hyperparameter θ in the surrogate data model of this section. It has a free parameter σ, the scale of the initial proposal distribution. However, careful tuning of this parameter is not required. If the initial scale is set to a large value, such as the width of the prior, then the width of the proposals will shrink to an acceptable range exponentially quickly. Stepping-out procedures [2] could be used to adapt initial scales that are too small. We assume that axis-aligned hyperparameter moves will be effective, although reparameterizations could improve performance [e.g. 9]. 3.2 The auxiliary noise covariance Sθ The surrogate data g and noise covariance Sθ define a pseudo-posterior distribution that softly specifies a plausible region within which the latent variables f are updated. The noise covariance determines the size of this region. The first two baseline algorithms of Section 2 result from limiting cases of Sθ = αI: 1) if α = 0 the surrogate data and the current latent variables are equal and the acceptance ratio reduces to that of Algorithm 1. 2) as α →∞ the observations are uninformative about the current state and the pseudo-posterior tends to the prior. In the limit, the acceptance ratio reduces to that of Algorithm 2. One could choose α based on preliminary runs, but such tuning would be burdensome. For likelihood terms that factorize, L(f) = Q i Li(fi), we can measure how much the likelihood restricts each variable individually: P(fi |Li, θ) ∝Li(fi) N(fi; 0, (Σθ)ii). (12) A Gaussian can be fitted by moment matching or a Laplace approximation (matching second derivatives at the mode). Such fits, or close approximations, are often possible analytically and can always be performed numerically as the distribution is only one-dimensional. Given a Gaussian fit to the site-posterior (12) with variance vi, we can set the auxiliary noise to a level that would result in the same posterior variance at that site alone: (Sθ)ii =(v−1 i −(Σθ)ii −1)−1. (Any negative (Sθ)ii must be thresholded.) The moment matching procedure is a grossly simplified first step of “assumed density filtering” or “expectation propagation” [10], which are too expensive for our use in the inner-loop of a Markov chain. 4 Related work We have discussed samplers that jointly update strongly-coupled latent variables and hyperparameters. The hyperparameters can move further in joint moves than their narrow conditional posteriors (e.g., Figure 1b) would allow. A generic way of jointly sampling realvalued variables is Hamiltonian/Hybrid Monte Carlo (HMC) [7, 8]. However, this method is cumbersome to implement and tune, and using HMC to jointly update latent variables and hyperparameters in hierarchical models does not itself seem to improve sampling [11]. Christensen et al. [9] have also proposed a robust representation for sampling in latent Gaussian models. They use an approximation to the target posterior distribution to con5 struct a reparameterization where the unknown variables are close to independent. The approximation replaces the likelihood with a Gaussian form proportional to N(f;ˆf, Λ(ˆf)): ˆf = argmaxf L(f), Λij(ˆf) = ∂2 log L(f) ∂fi ∂fj ˆf , (13) where Λ is often diagonal, or it was suggested one would only take the diagonal part. This Taylor approximation looks like a Laplace approximation, except that the likelihood function is not a probability density in f. This likelihood fit results in an approximate Gaussian posterior N(f; mθ,g=ˆf, Rθ) as found in (9), with noise Sθ =Λ(ˆf)−1 and data g=ˆf. Thinking of the current latent variables as a draw from this approximate posterior, ω∼N(0, I), f = LRθω + mθ,ˆf, suggests using the reparameterization ω = L−1 Rθ (f −mθ,ˆf). We can then fix the new variables and update the hyperparameters under P(θ|ω, data) ∝L(f(ω, θ)) N(f(ω, θ); 0, Σθ) ph(θ) |LRθ| . (14) When the likelihood is Gaussian, the reparameterized variables ω are independent of each other and the hyperparameters. The hope is that approximating non-Gaussian likelihoods will result in nearly-independent parameterizations on which Markov chains will mix rapidly. Taylor expanding some common log-likelihoods around the maximum is not well defined, for example approximating probit or logistic likelihoods for binary classification, or Poisson observations with zero counts. These Taylor expansions could be seen as giving flat or undefined Gaussian approximations that do not reweight the prior. When all of the likelihood terms are flat the reparameterization approach reduces to that of Section 2.1. The alternative Sθ auxiliary covariances that we have proposed could be used instead. The surrogate data samplers of Section 3 can also be viewed as using reparameterizations, by treating η = L−1 Rθ (f −mθ,g) as an arbitrary random reparameterization for making proposals. A proposal density q(η′, θ′; η, θ) in the reparameterized space must be multiplied by the Jacobian |L−1 Rθ′ | to give a proposal density in the original parameterization. The probability of proposing the reparameterization must also be included in the Metropolis–Hastings acceptance probability: min  1, P (θ′,f ′ |data)·P (g |f ′,Sθ′)·q(θ;θ′) |L−1 Rθ | P (θ,f |data)·P (g |f,Sθ)·q(θ′;θ) |L−1 Rθ′ |  . (15) A few lines of linear algebra confirms that, as it must do, the same acceptance ratio results as before. Alternatively, substituting (3) into (15) shows that the acceptance probability is very similar to that obtained by applying Metropolis–Hastings to (14) as proposed by Christensen et al. [9]. The differences are that the new latent variables f ′ are computed using different pseudo-posterior means and the surrogate data method has an extra term for the random, rather than fixed, choice of reparameterization. The surrogate data sampler is easier to implement than the previous reparameterization work because the surrogate posterior is centred around the current latent variables. This means that 1) no point estimate, such as the maximum likelihood ˆf, is required. 2) picking the noise covariance Sθ poorly may still produce a workable method, whereas a fixed reparameterized can work badly if the true posterior distribution is in the tails of the Gaussian approximation. Christensen et al. [9] pointed out that centering the approximate Gaussian likelihood in their reparameterization around the current state is tempting, but that computing the Jacobian of the transformation is then intractable. By construction, the surrogate data model centers the reparameterization near to the current state. 5 Experiments We empirically compare the performance of the various approaches to GP hyperparameter sampling on four data sets: one regression, one classification, and two Cox process inference problems. Further details are in the rest of this section, with full code as supplementary material. The results are summarized in Figure 3 followed by a discussion section. 6 In each of the experimental configurations, we ran ten independent chains with different random seeds, burning in for 1000 iterations and sampling for 5000 iterations. We quantify the mixing of the chain by estimating the effective number of samples of the complete data likelihood trace using R-CODA [12], and compare that with three cost metrics: the number of hyperparameter settings considered (each requiring a small number of covariance decompositions with O(n3) time complexity), the number of likelihood evaluations, and the total elapsed time on a single core of an Intel Xeon 3GHz CPU. The experiments are designed to test the mixing of hyperparameters θ while sampling from the joint posterior (3). All of the discussed approaches except Algorithm 1 update the latent variables f as a side-effect. However, further transition operators for the latent variables for fixed hyperparameters are required. In Algorithm 2 the “whitened” variables ν remain fixed; the latent variables and hyperparameters are constrained to satisfy f =LΣθν. The surrogate data samplers are ergodic: the full joint posterior distribution will eventually be explored. However, each update changes the hyperparameters and requires expensive computations involving covariances. After computing the covariances for one set of hyperparameters, it makes sense to apply several cheap updates to the latent variables. For every method we applied ten updates of elliptical slice sampling [1] to the latent variables f between each hyperparameter update. One could also consider applying elliptical slice sampling to a reparameterized representation, for simplicity of comparison we do not. Independently of our work Titsias [13] has used surrogate data like reparameterizations to update latent variables for fixed hyperparameters. Methods We implemented six methods for updating Gaussian covariance hyperparameters. Each method used the same slice sampler, as in Algorithm 4, applied to the following model representations. fixed: fixing the latent function f [14]. prior-white: whitening with the prior. surr-site: using surrogate data with the noise level set to match the site posterior (12). We used Laplace approximations for the Poisson likelihood. For classification problems we used moment matching, because Laplace approximations do not work well [15]. surr-taylor: using surrogate data with noise variance set via Taylor expansion of the log-likelihood (13). Infinite variances were truncated to a large value. post-taylor and post-site: as for the surr- methods but a fixed reparameterization based on a posterior approximation (14). Binary Classification (Ionosphere) We evaluated four different methods for performing binary GP classification: fixed, prior-white, surr-site and post-site. We applied these methods to the Ionosphere dataset [16], using 200 training data and 34 dimensions. We used a logistic likelihood with zero-mean prior, inferring lengthscales as well as signal variance. The -taylor methods reduce to other methods or don’t apply because the maximum of the log-likelihood is at plus or minus infinity. Gaussian Regression (Synthetic) When the observations have Gaussian noise the post-taylor reparameterization of Christensen et al. [9] makes the hyperparameters and latent variables exactly independent. The random centering of the surrogate data model will be less effective. We used a Gaussian regression problem to assess how much worse the surrogate data method is compared to an ideal reparameterization. The synthetic data set had 200 input points in 10-D drawn uniformly within a unit hypercube. The GP had zero mean, unit signal variance and its ten lengthscales in (2) drawn from Uniform(0, √10). Observation noise had variance 0.09. We applied the fixed, prior-white, surr-site/surr-taylor, and post-site/post-taylor methods. For Gaussian likelihoods the -site and -taylor methods coincide: the auxiliary noise matches the observation noise (Sθ = 0.09 I). Cox process inference We tested all six methods on an inhomogeneous Poisson process with a Gaussian process prior for the log-rate. We sampled the hyperparameters in (2) and a mean offset to the log-rate. The model was applied to two point process datasets: 1) a record of mining disasters [17] with 191 events in 112 bins of 365 days. 2) 195 redwood tree locations in a region scaled to the unit square [18] split into 25×25=625 bins. The results for the mining problem were initially highly variable. As the mining experiments were also the quickest we re-ran each chain for 20,000 iterations. 7 ionosphere synthetic mining redwoods 0 1 2 3 4 Effective samples per likelihood evaluation ionosphere synthetic mining redwoods 0 1 2 3 4 Effective samples per covariance construction fixed prior−white surr−site post−site surr−taylor post−taylor ionosphere synthetic mining redwoods 0 1 2 3 4 Effective samples per second x1.6e−04 x3.3e−04 x4.3e−05 x4.8e−04 x2.9e−04 x1.1e−03 x7.4e−04 x3.7e−03 x7.7e−03 x5.4e−02 x1.2e−01 x1.5e−02 Figure 3: The results of experimental comparisons of six MCMC methods for GP hyperparameter inference on four data sets. Each figure shows four groups of bars (one for each experiment) and the vertical axis shows the effective number of samples of the complete data likelihood per unit cost. The costs are per likelihood evaluation (left), per covariance construction (center), and per second (right). Means and standard errors for 10 runs are shown. Each group of bars has been rescaled for readability: the number beneath each group gives the effective samples for the surr-site method, which always has bars of height 1. Bars are missing where methods are inapplicable (see text). 6 Discussion On the Ionosphere classification problem both of the -site methods worked much better than the two baselines. We slightly prefer surr-site as it involves less problem-specific derivations than post-site. On the synthetic test the post- and surr- methods perform very similarly. We had expected the existing post- method to have an advantage of perhaps up to 2–3×, but that was not realized on this particular dataset. The post- methods had a slight time advantage, but this is down to implementation details and is not notable. On the mining problem the Poisson likelihoods are often close to Gaussian, so the existing post-taylor approximation works well, as do all of our new proposed methods. The Gaussian approximations to the Poisson likelihood fit most poorly to sites with zero counts. The redwood dataset discretizes two-dimensional space, leading to a large number of bins. The majority of these bins have zero counts, many more than the mining dataset. Taylor expanding the likelihood gives no likelihood contribution for bins with zero counts, so it is unsurprising that post-taylor performs similarly to prior-white. While surr-taylor works better, the best results here come from using approximations to the site-posterior (12). For unreasonably fine discretizations the results can be different again: the site- reparameterizations do not always work well. Our empirical investigation used slice sampling because it is easy to implement and use. However, all of the representations we discuss could be combined with any other MCMC method, such as [19] recently used for Cox processes. The new surrogate data and post-site representations offer state-of-the-art performance and are the first such advanced methods to be applicable to Gaussian process classification. An important message from our results is that fixing the latent variables and updating hyperparameters according to the conditional posterior — as commonly used by GP practitioners — can work exceedingly poorly. Even the simple reparameterization of “whitening the prior” discussed in Section 2.1 works much better on problems where smoothness is important in the posterior. Even if site approximations are difficult and the more advanced methods presented are inapplicable, the simple whitening reparameterization should be given serious consideration when performing MCMC inference of hyperparameters. Acknowledgements We thank an anonymous reviewer for useful comments. This work was supported in part by the IST Programme of the European Community, under the PASCAL2 Network of Excellence, IST-2007-216886. This publication only reflects the authors’ views. RPA is a junior fellow of the Canadian Institute for Advanced Research. 8 References [1] Iain Murray, Ryan Prescott Adams, and David J.C. MacKay. Elliptical slice sampling. Journal of Machine Learning Research: W&CP, 9:541–548, 2010. Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS). [2] Radford M. Neal. Slice sampling. Annals of Statistics, 31(3):705–767, 2003. [3] Deepak K. Agarwal and Alan E. Gelfand. Slice sampling for simulation based fitting of spatial data models. Statistics and Computing, 15(1):61–69, 2005. [4] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for machine learning. MIT Press, 2006. [5] Luke Tierney. Markov chains for exploring posterior distributions. The Annals of Statistics, 22(4):1701–1728, 1994. [6] Michalis Titsias, Neil D Lawrence, and Magnus Rattray. Efficient sampling for Gaussian process inference using control variables. In Advances in Neural Information Processing Systems 21, pages 1681–1688. MIT Press, 2009. [7] Simon Duane, A. D. Kennedy, Brian J. Pendleton, and Duncan Roweth. Hybrid Monte Carlo. Physics Letters B, 195(2):216–222, September 1987. [8] Radford M. Neal. MCMC using Hamiltonian dynamics. To appear in the Handbook of Markov Chain Monte Carlo, Chapman & Hall / CRC Press, 2011. http://www.cs.toronto.edu/~radford/ftp/ham-mcmc.pdf. [9] Ole F. Christensen, Gareth O. Roberts, and Martin Sk˜ald. Robust Markov chain Monte Carlo methods for spatial generalized linear mixed models. Journal of Computational and Graphical Statistics, 15(1):1–17, 2006. [10] Thomas Minka. Expectation propagation for approximate Bayesian inference. In Proceedings of the 17th Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 362–369, 2001. Corrected version available from http://research.microsoft.com/~minka/papers/ep/. [11] Kiam Choo. Learning hyperparameters for neural network models using Hamiltonian dynamics. Master’s thesis, Department of Computer Science, University of Toronto, 2000. Available from http://www.cs.toronto.edu/~radford/ftp/kiam-thesis.ps. [12] Mary Kathryn Cowles, Nicky Best, Karen Vines, and Martyn Plummer. R-CODA 0.10-5, 2006. http://www-fis.iarc.fr/coda/. [13] Michalis Titsias. Auxiliary sampling using imaginary data, 2010. Unpublished. [14] Radford M. Neal. Regression and classification using Gaussian process priors. In J. M. Bernardo et al., editors, Bayesian Statistics 6, pages 475–501. OU Press, 1999. [15] Malte Kuss and Carl Edward Rasmussen. Assessing approximate inference for binary Gaussian process classification. Journal of Machine Learning Research, 6:1679–1704, 2005. [16] V. G. Sigillito, S. P. Wing, L. V. Hutton, and K. B. Baker. Classification of radar returns from the ionosphere using neural networks. Johns Hopkins APL Technical Digest, 10:262–266, 1989. [17] R. G. Jarrett. A note on the intervals between coal-mining disasters. Biometrika, 66 (1):191–193, 1979. [18] Brian D. Ripley. Modelling spatial patterns. Journal of the Royal Statistical Society, Series B, 39:172–212, 1977. [19] Mark Girolami and Ben Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society. Series B (Methodological), 2011. To appear. 9
2010
101
3,857
Efficient Optimization for Discriminative Latent Class Models Armand Joulin∗ INRIA 23, avenue d’Italie, 75214 Paris, France. armand.joulin@inria.fr Francis Bach∗ INRIA 23, avenue d’Italie, 75214 Paris, France. francis.bach@inria.fr Jean Ponce∗ Ecole Normale Sup´erieure 45, rue d’Ulm 75005 Paris, France. jean.ponce@ens.fr Abstract Dimensionality reduction is commonly used in the setting of multi-label supervised classification to control the learning capacity and to provide a meaningful representation of the data. We introduce a simple forward probabilistic model which is a multinomial extension of reduced rank regression, and show that this model provides a probabilistic interpretation of discriminative clustering methods with added benefits in terms of number of hyperparameters and optimization. While the expectation-maximization (EM) algorithm is commonly used to learn these probabilistic models, it usually leads to local maxima because it relies on a non-convex cost function. To avoid this problem, we introduce a local approximation of this cost function, which in turn leads to a quadratic non-convex optimization problem over a product of simplices. In order to maximize quadratic functions, we propose an efficient algorithm based on convex relaxations and lowrank representations of the data, capable of handling large-scale problems. Experiments on text document classification show that the new model outperforms other supervised dimensionality reduction methods, while simulations on unsupervised clustering show that our probabilistic formulation has better properties than existing discriminative clustering methods. 1 Introduction Latent representations of data are wide-spread tools in supervised and unsupervised learning. They are used to reduce the dimensionality of the data for two main reasons: on the one hand, they provide numerically efficient representations of the data; on the other hand, they may lead to better predictive performance. In supervised learning, latent models are often used in a generative way, e.g., through mixture models on the input variables only, which may not lead to increased predictive performance. This has led to numerous works on supervised dimension reduction (e.g., [1, 2]), where the final discriminative goal of prediction is taken explicitly into account during the learning process. In this context, various probabilistic models have been proposed, such as mixtures of experts [3] or discriminative restricted Boltzmann machines [4], where a layer of hidden variables is used between the inputs and the outputs of the supervised learning model. Parameters are usually estimated by expectation-maximization (EM), a method that is computationally efficient but whose cost function may have many local maxima in high dimensions. In this paper, we consider a simple discriminative latent class (DLC) model where inputs and outputs are independent given the latent representation.We make the following contributions: ∗WILLOW project-team, Laboratoire d’Informatique de l’Ecole Normale Sup´erieure, (ENS/INRIA/CNRS UMR 8548). 1 – We provide in Section 2 a quadratic (non convex) local approximation of the log-likelihood of our model based on the EM auxiliary function. This approximation is optimized to obtain robust initializations for the EM procedure. – We propose in Section 3.3 a novel probabilistic interpretation of discriminative clustering with added benefits, such as fewer hyperparameters than previous approaches [5, 6, 7]. – We design in Section 4 a low-rank optimization method for non-convex quadratic problems over a product of simplices. This method relies on a convex relaxation over completely positive matrices. – We perform experiments on text documents in Section 5, where we show that our inference technique outperforms existing supervised dimension reduction and clustering methods. 2 Probabilistic discriminative latent class models We consider a set of N observations xn ∈Rp, and their labels yn ∈{1, . . . , M}, n ∈{1, . . . , N}. We assume that each observation xn has a certain probability to be in one of K latent classes, modeled by introducing hidden variables zn ∈{1, . . . , K}, and that these classes should be predictive of the label yn. We model directly the conditional probability of zn given the input data xn and the probability of the label yn given zn, while making the assumption that yn and xn are independent given zn (leading to the directed graphical model xn →zn →yn). More precisely, we assume that, given xn, zn follows a multinomial logit model while, given zn, yn is a multinomial variable: p(zn = k|xn) = ewT k xn+bk PK j=1 ewT j xn+bj and p(yn = m|zn = k) = αkm, (1) with wk ∈Rp, bk ∈R and PM m=1 αkm = 1. We use the notation w = (w1, . . . , wK), b = (b1, . . . , bK) and α = (αkm)1≤k≤K,1≤m≤M. Note that the model defined by (1) can be kernelized by replacing implicitly or explicitly x by the image Φ(x) of a non linear mapping. Related models. The simple two-layer probabilistic model defined in Eq. (1), can be interpreted and compared to other methods in various ways. First, it is an instance of a mixture of experts [3] where each expert has a constant prediction. It has thus weaker predictive power than general mixtures of experts; however, it allows efficient optimization as shown in Section 4. It would be interesting to extend our optimization techniques to the case of experts with non-constant predictions. This is what is done in [8] where a convex relaxation of EM for a similar mixture of experts is considered. However, [8] considers the maximization with respect to hidden variables rather than their marginalization, which is essential in our setting to have a well-defined probabilistic model. Note also that in [8], the authors derive a convex relaxation of the softmax regression problems, while we derive a quadratic approximation. It is worth trying to combine the two approaches in future work. Another related model is a two-layer neural network. Indeed, if we marginalize the latent variable z, we get that the probability of y given x is a linear combination of softmax functions of linear functions of the input variables x. Thus, the only difference with a two-layer neural network with softmax functions for the last layer is the fact that our last layer considers linear parameterization in the mean parameters rather than in the natural parameters of the multinomial variable. This change allows us to provide a convexification of two-layer neural networks in Section 4. Among probabilistic models, a discriminative restricted Boltzmann machine (RBM) [4, 9] models p(y|z) as a softmax function of linear functions of z. Our model assumes instead that p(y|z) is linear in z. Again, this distinction between mean parameters and natural parameters allows us to derive a quadratic approximation of our cost function. It would of course be of interest to extend our optimization technique to the discriminative RBM. Finally, one may also see our model as a multinomial extension of reduced-rank regression (see, e.g. [10]), which is commonly used with Gaussian distributions and reduces to singular value decomposition in the maximum likelihood framework. 2 3 Inference We consider the negative conditional log-likelihood of yn given xn (regularized in w to avoid overfitting) where θ = (α, w, b) and ynm is equal to 1 if yn = m and 0 otherwise: ℓ(θ) = −1 N N X n=1 M X m=1 ynm log p(ynm = 1|xn) + λ 2K ∥w∥2 F . (2) 3.1 Expectation-maximization A popular tool for solving maximum likelihood problems is the EM algorithm [10]. A traditional way of viewing EM is to add auxiliary variables and minimize the following upperbound of the negative log-likelihood ℓ, obtained by using the concavity of the logarithm: F(ξ, θ) = −1 N N X n=1 M X m=1 ynm " K X k=1 ξnk log yT n αkewT k xn+bk ξnk −log  K X k=1 ewT k xn+bk # + λ 2K ∥w∥2 F , where αk = (αk1, . . . , αkm)T ∈ RM and ξ = (ξ1, . . . , ξK)T ∈ RN×K with ξn = (ξn1, . . . , ξnK) ∈RK. The EM algorithm can be viewed as a two-step block-coordinate descent procedure [11], where the first step (E-step) consists in finding the optimal auxiliary variables ξ, given the parameters of the model θ. In our case, the result of this step is obtained in closed form as ξnk ∝yT n αkewT k xn+bk with ξT n 1K = 1. The second step (M-step) consists of finding the best set of parameters θ, given the auxiliary variables ξ. Optimizing the parameters αk leads to the closed form updates αk ∝PN n=1 ξnkyn with αT k 1M = 1 while optimizing jointly on w and b leads to a softmax regression problem, which we solved with Newton method. Since F(ξ, θ) is not jointly convex in ξ and θ, this procedure stops when it reaches a local minimum, and its performance strongly depends on its initialization. We propose in the following section, a robust initialization for EM given our latent model, based on an approximation of the auxiliary cost function obtained with the M-step. 3.2 Initialization of EM Minimizing F w.r.t. ξ leads to the original log-likelihood ℓ(θ) depending on θ alone. Minimizing F w.r.t. θ gives a function of ξ alone. In this section, we focus on deriving a quadratic approximation of this function, which will be minimized to obtain an initialization for EM. We consider second-order Taylor expansions around the value of ξ corresponding to the uniformly distributed latent variables zn, independent of the observations xn, i.e., ξ0 = 1 K 1N1T K. This choice is motivated by the lack of a priori information on the latent classes. We briefly explain the calculation of the expansion of the terms depending on (w, b). For the rest of the calculation, see the supplementary material. Second-order Taylor expansion of the terms depending on (w, b). Assuming uniformly distributed variables zn and independence between zn and xn implies that wT k xn + bk = 0. Therefore, using the second-order expansion of the log-sum-exp function ϕ(u) = log(PK k=1 exp(uk)) around 0 leads to the following approximation of the terms depending on (w, b): Jwb(ξ) = cst + K 2N tr(ξξT ) − 1 2K min w,b h 1 N ∥(Kξ −Xw −b)ΠK∥2 F + λ∥w∥2 F + O(∥Xw + b∥3) i , where ΠK = I −1 K 1K1T K is the usual centering projection matrix, and X = (x1, . . . , xN)T . The third-order term O(∥Xw + b∥3 F ) can be replaced by third-order terms in ∥ξ −ξ0∥, which makes the minimization with respect to w and b correspond to a multi-label classification problem with a square-loss [7, 10, 12]. Its solution may be obtained in closed form and leads to: Jwb(ξ) = cst + K 2N tr h ξξT I −A(X, λ) i + O(∥ξ −ξ0∥3), where A(X, λ) = ΠN  I −X(NλI + XT ΠN)−1XT  ΠN. 3 Quadratic approximation. Omitting the terms that are independent of ξ or of an order in ξ higher than two, the second-order approximation Japp of the function obtained for the M-step is: Japp(ξ) = K 2 tr h ξξT  B(Y ) −A(X, λ) i , (3) where B(Y ) = 1 N  Y (Y T Y )−1Y T −1 N 1N1T N  and Y ∈RN×M is the matrix with entries ynm. Link with ridge regression. The first term, tr(ξξT B(Y )), is a concave function in ξ, whose maximum is obtained for ξξT = I (each variable in a different cluster). The second term, A(X, λ), is the matrix obtained in ridge regression [7, 10, 12]. Since A(x, λ) is a positive semi-definite matrix such that A(X, λ)1N = 0, the maximum of the second term is obtained for ξξT = 1N1T N (all variables in the same cluster). Japp(ξ) is thus a combination of a term trying to put every point in the same cluster and a term trying to spread them equally. Note that in general, Japp is not convex. Non linear predictions. Using the matrix inversion lemma, A(X, λ) can be expressed in terms of the Gram matrix K = XXT , which allows us to use any positive definite kernel in our framework [12], and tackle problems that are not linearly separable. Moreover, the square loss gives a natural interpretation of the regularization parameter λ in terms of the implicit number of parameters of the learning procedure [10]. Indeed, the degree of freedom defined as df = n(1 −trA) provides a intuitive method for setting the value of λ [7, 10]. Initialization of EM. We optimize Japp(ξ) to get a robust initialization for EM. Since the entries of each vector ξn sum to 1, we optimize Japp over a set of N simplices in K dimensions, S = {v ∈ RK | v ≥0, vT 1K = 1}. However, since this function is not convex, minimizing it directly leads to local minima. We propose, in Section 4, a general reformulation of any non-convex quadratic program over a set of N simplices and propose an efficient algorithm to optimize it. 3.3 Discriminative clustering The goal of clustering is to find a low-dimensional representation of unlabeled observations, by assigning them to K different classes, Xu et al. [5] proposes a discriminative clustering framework based on the SVM and [7] simplifies it by replacing the hinge loss function by the square loss, leading to ridge regression. By taking M = N and the labels Y = I, we obtain a formulation similar to [7] where we are looking for a latent representation that can recover the identity matrix. However, unlike [5, 7], our discriminative clustering framework is based on a probabilistic model which may allow natural extensions. Moreover, our formulation naturally avoids putting all variables in the same cluster, whereas [5, 7] need to introduce constraints on the size of each cluster. Also, our model leads to a soft assignment of the variables, allowing flexibility in the shape of the clusters, whereas [5, 7] is based on hard assignment. Finally, since our formulation is derived from EM, we obtain a natural rounding by applying the EM algorithm after the optimization whereas [7] uses a coarse k-means rounding. Comparisons with these algorithms can be found in Section 5. 4 Optimization of quadratic functions over simplices To initialize the EM algorithm, we must minimize the non-convex quadratic cost function defined by Eq. (3) over a product of N simplices. More precisely, we are interested in the following problems: min V f(V ) = 1 2tr (V V T B) s.t. V = (V1, . . . , VN)T ∈RN×K and ∀n, Vn ∈S, (4) where B can be any N ×N symmetric matrix. Denoting v = vec(V ) ∈RNK the vector obtained by stacking all the columns of V and defining Q = (BT ⊗IK)T , where ⊗is the Kronecker product [13], the problem (4) is equivalent to: min v 1 2 vT Qv s.t. v ∈RNK, v ≥0 and (IN ⊗1T K)v = 1N. (5) Note that this formulation is general, and that Q could be any NK × NK symmetric matrix. Traditional convex relaxation methods [14] would rewrite the objective function as vT Qv = tr(QvvT ) = 4 tr(QT) where T = vvT is a rank-one matrix which satisfies the set of constraints: − T ∈DN K = {T ∈RNK×NK | T ≥0, T ≽0} (6) − ∀n, m ∈{1, . . . , N}, 1T KTnm1K = 1, (7) − ∀n, i, j ∈{1, . . . , N}, Tni1K = Tnj1K. (8) We note F the set of matrix T verifying (7-8). With the unit-rank constraint, optimizing over v is exactly equivalent to optimizing over T. The problem is relaxed into a convex problem by removing the rank constraint, leading to a semidefinite programming problem (SDP) [15]. Relaxation. Optimizing T instead of v is computationally inefficient since the running time complexity of general purpose SDP toolboxes is in this case O (KN)7 . On the other hand, for problems without pointwise positivity, [16, 17] have considered low-rank representations of matrices T, of the form T = V V T where V has more than one column. In particular, [17] shows that the non convex optimization with respect to V leads to the global optimum of the convex problem in T. In order to apply the same technique here, we need to deal with the pointwise nonnegativity. This can be done by considering the set of completely positive matrices, i.e., CPK = {T ∈RNK×NK|∃R ∈N∗, ∃V ∈RNK×R, V ≥0, T = V V T }. This set is strictly included in the set DN K of doubly non-negative matrices (i.e., both pointwise nonnegative and positive semi-definite). For R ≥5, it turns out that the intersection of CPK and F is the convex hull of the matrices vvT such that v is an element of the product of simplices [16]. This implies that the convex optimization problem of minimizing tr (QT) over CPK ∩F is equivalent to our original problem (for which no polynomial-time algorithm is known). However, even if the set CPK ∩F is convex, optimizing over it is computationally inefficient [18]. We thus follow [17] and consider the problem through the low-rank pointwise nonnegative matrix V ∈RNK×R instead of through matrices T = V V T . Note that following arguments from [16], if R is large enough, there are no local minima. However, because of the positivity constraint one cannot find in polynomial time a local minimum of a differentiable function. Nevertheless, any gradient descent algorithm will converge to a stationary point. In Section 5, we compare results with R > 1 than with R = 1, which corresponds to a gradient descent directly on the simplex. Problem reformulation. In order to derive a local descent algorithm, we reformulate the constraints (7-8) in terms of V (details can be found in the supplementary material). Denoting by Vr the r-th column of V , V n r the K-vector such as Vr = (V 1 r , . . . , V N r )T and V n = (V n 1 , . . . , V n R ), condition (8) is equivalent to ∥V m r ∥1 = ∥V n r ∥1 for all n and m. Substituting this in (7) yields that for all n, ∥V n∥2−1 = 1, where ∥V n∥2 2−1 = PR r=1(1T V n r )2 is the squared ℓ2−1 norm. We drop this condition by using a rescaled cost function which equivalent. Finally, using the notation D: D = {W ∈RNK | W ≥0, ∀n, m, ∥W n∥1 = ∥W m∥1}, we obtain a new equivalent formulation: min V ∈RNK×R, ∀r, Vr∈D 1 2tr(V D−1V T Q) with D = Diag((IN ⊗1K)T V V T (IN ⊗1K)), (9) where Diag(A) is the matrix with the diagonal of A and 0 elsewhere. Since the set of constraints for V is convex, we can use a projected gradient method [19] with the projection step we now describe. Projection on D. Given N K-vectors Zn stacked in a NK vector Z = [Z1; . . . ; ZN], we consider the projection of Z on D. For a given positive real number a, the projection of Z on the set of all U ∈D such that for all n, ∥U n∥1 = a, is equivalent to N independent projections on the ℓ1 ball with radius a. Thus projecting Z on D is equivalent to find the solution of: min a≥0 L(a) = N X n=1 max λn∈R min U n≥0 1 2∥U n −Zn∥2 2 + λn(1T KU n −a), where (λn)n≤N are Lagrange multipliers. The problem of projecting each Zn on the ℓ1ball of radius a is well studied [20], with known expressions for the optimal Lagrange multipliers, (λn(a))n≤N and the corresponding projection for a given a. The function L(a) is 5 0 5 10 40 60 80 100 K = 2 noise dimension classification rate (%) avg round min round ind − avg round ind − min round 0 5 10 40 60 80 100 K = 3 noise dimension classification rate (%) 0 5 10 40 60 80 100 K = 5 noise dimension classification rate (%) Figure 1: Comparison between our algorithm and R independent optimizations. Also comparison between two rounding: by summing and by taking the best column. Average results for K = 2, 3, 5 (Best seen in color). convex, piecewise-quadratic and differentiable, which yields the first-order optimality condition PN n=1 λn(a) = 0 for a. Several algorithms can be used to find the optimal value of a. We use a binary search by looking at the sign of PN n=1 λn(a) on the interval [0, λmax], where λmax is found iteratively. This method was found to be empirically faster than gradient descent. Overall complexity and running time. We use projected gradient descent, the bottleneck of our algorithm is the projection with a complexity of O(RN 2K log(K)). We present experiments on running times in the supplementary material. 5 Implementation and results We first compare our algorithm with others to optimize the problem (4). We show that the performances are equivalent but, our algorithm can scale up to larger database. We also consider the problem of supervised and unsupervised discriminative clustering. In both cases, we show that our algorithm outperforms existing methods. Implementation. For supervised and unsupervised multilabel classification, we first optimize the second-order approximation Japp, using the reformulation (9). We use a projected gradient descent method with Armijo’s rule along the projection arc for backtracking [19]. It is stopped after a maximum number of iterations (500) or if relative updates are too small (10−8). When the algorithm stops, the matrix V has rank greater than 1 and we use the heuristic v∗= PR r=1 Vr ∈S as our final solution (“avg round”). We also compare this rounding with another heuristic obtained by taking v∗= argminVrf(Vr) (“min round”). v∗is then used to initialize the EM algorithm described in Section 2. Optimization over simplices. We compare our optimization of the non-convex quadratic problem (9) in V , to the convex SDP in T = V V T on the set of constraints defined by T ∈DN K, (7) and (8). To optimize the SDP, we use generic algorithms, CVX [21] and PPXA [22]. CVX uses interior points methods whereas PPXA uses proximal methods [22]. Both algorithms are computationally inefficient and do not scale well with either the number of points or the number of constraints. Thus we set N = 10 and K = 2 on discriminative clustering problems (which are described later in this section). We compare the performances of these algorithms after rounding. For the SDP, we take ξ∗= T1NK and for our algorithm we report performances obtained for both rounding discuss above (“avg round” and “min round”). On these small examples, our algorithm associated with “min round” reaches similar performances than the SDP, whereas, associated with “avg round”, its performance drops. Study of rounding procedures. We compare the performances of the two different roundings, “min round” and “avg round” on discriminative clustering problems. After rounding, we apply the EM algorithm and look at the classification scores. We also compare our algorithm for a given R, to two baselines where we solve independently problem (4) R times and then apply the same roundings (“ind - min round” and “ind - avg round”). Results are shown Figure 1. We consider three 6 100 200 300 400 50 60 70 80 90 N Classification rate (%) 1 vs. 20 − K = 3 100 200 300 400 50 60 70 80 90 N 1 vs. 20 − K = 7 100 200 300 400 50 60 70 80 90 N 1 vs. 20 − K = 15 100 200 300 400 50 60 70 80 90 N Classification rate (%) 4 vs. 5 − K = 3 100 200 300 400 50 60 70 80 90 N 4 vs. 5 − K = 7 100 200 300 400 50 60 70 80 90 N 4 vs. 5 − K = 15 Figure 2: Classification rate for several binary classification tasks (from top to bottom) and for different values of K, from left to right (Best seen in color). different problems, N = 100 and K = 2, K = 3 and K = 5. We look at the average performances as the number of noise dimensions increases in discriminative clustering problems. Our method outperforms the baseline whatever rounding we use. Figure 1 shows that on problems with a small number of latent classes (K < 5), we obtain better performances by taking the column associated with the lowest value of the cost function (“min round”), than summing all the columns (“avg round”). On the other hand, when dealing with a larger number of classes (K ≥5), the performance of “min round’ drops significantly while “avg round” maintains good results. A potential explanation is that summing the columns of V gives a solution close to 1 K 1N1T K in expectation, thus in the region where our quadratic approximation is valid. Moreover, the best column of V is usually a local minimum of the quadratic approximation, which we have found to be close to similar local minima of our original problem, therefore, preventing the EM algorithm from converging to another solution. In all others experiments, we choose “avg round”. Application to classification. We evaluate the optimization performance of our algorithm (DLC) on text classification tasks. For our experiments, we use the 20 Newsgroups dataset (http://people.csail.mit.edu/jrennie/), which contains postings to Usenet newsgroups. The postings are organized by content into 20 categories. We use the five binary classification tasks considered in [23, Chapter 4, page 91]. To set the regularization parameter λ, we use the degree of freedom df (see Section 3.2). Each document has 13312 entries and we take df = 1000. We use 50 random initializations for our algorithm. We compare our method with classifiers such as the linear SVM and the supervised Latent Dirichlet Allocation (sLDA) classifier of Blei et al. [2]. We also compare our results to those obtained by an SVM using the features obtained with dimensionreducing methods such as LDA [1] and PCA. For these models, we select parameters with 5-fold cross-validation. We also compare to the EM without our initialization (“rand-init”) but also with 50 random initializations, a local descent method which is close to back-propagation in a two-layer neural network, which in this case strongly suffers from local minima problems. An interesting result on computational time is that EM without our initialization needs more steps to obtain a local minimum. It is therefore slower than with our initialization in this particular set of experiments. We show some results in Figure 2 (others maybe found in the supplementary material) for different values of K and with an increasing number N of training samples. In the case of topic models, K represents the number of topics. Our method significantly outperforms all the other classifiers. The comparison with “rand-init” shows the importance of our convex initialization. We also note that our performance increases slowly with K. Indeed, the number of latent classes needed to correctly separate two classes of text is small. Moreover, the algorithm tends to automatically select K. Empirically, we notice that starting with K = 15 classes, our average final number of active classes is around 3. This explains the relatively small gain in performance as K increases. 7 5 10 15 20 0 0.1 0.2 0.3 0.4 noise dimension clustering error 5 10 15 20 0 0.2 0.4 0.6 0.8 noise dimension clustering error Figure 3: Clustering error when increasing the number of noise dimensions. We have take 50 different problems and 10 random initializations for each of them. K = 2, N = 100 and R = 5, on the left, and K = 5, N = 250 and R = 10, on the right(Best seen in color). Figure 4: Comparison between our method (left) and k-means (right). First, circles with RBF kernels. Second, linearly separable bumps. K = 2, N = 200 and R = 5 in both cases. Application to discriminative clustering. Figure 3 shows the optimization performance of the EM algorithm with 10 random starting points with (“DLC”) and without (“rand-init”) our initialization method. We compare their performances to K-means, Gaussian Mixture Model (“GMM”), Diffrac [7] and max-margin clustering (“MMC”) [24]. Following [7], we take linearly separable bumps in a two-dimensional space and add dimensions containing random independent Gaussian noise (e.g. “noise dimensions”) to the data. We evaluate the ratio of misclassified observations over the total number of observations. For the first experiment, we fix K = 2, N = 100, and R = 5, and for the second K = 5, N = 250, and R = 10. The additional independent noise dimensions are normally distributed. We use linear kernels for all the methods. We set the regularization parameters λ to 10−2 for all experiments but we have seen that results do not change much as long as λ is not too small (> 10−8). Note that we do not show results for the MMC algorithm when K = 5 since this algorithm is specially designed for problems with K = 2. It would be interesting to compare to the extension for multi-class problems proposed by Zhang et al. [24]. On both examples, we are significantly better than Diffrac, k-means and MMC. We show in Figure 4 additional examples which are non linearly separable. 6 Conclusion We have presented a probabilistic model for supervised dimension reduction, together with associated optimization tools to improve upon EM. Application to text classification has shown that our model outperforms related ones and we have extended it to unsupervised situations, thus drawing new links between probabilistic models and discriminative clustering. The techniques presented in this paper could be extended in different directions: First, in terms of optimization, while the embedding of the problem to higher dimensions has empirically led to finding better local minima, sharp statements might be made to characterize the robustness of our approach. In terms of probabilistic models, such techniques should generalize to other latent variable models. Finally, some additional structure could be added to the problem to take into account more specific problems, such as multiple instance learning [25], multi-label learning or discriminative clustering for computer vision [26, 27]. Acknowledgments. This paper was partially supported by the Agence Nationale de la Recherche (MGA Project) and the European Research Council (SIERRA Project). We would like to thank Toby Dylan Hocking, for his help on the comparison with other methods for the classification task. 8 References [1] David M. Blei, Andrew Y. Ng, Michael I. Jordan, and John Lafferty. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3, 2003. [2] David M. Blei and Jon D. Mcauliffe. Supervised topic models. In Advances in Neural Information Processing Systems (NIPS), 2007. [3] R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton. Adaptive mixtures of local experts. Neural Computation, 3(1):79–87, 1991. [4] H. Larochelle and Y. Bengio. Classification using discriminative restricted boltzmann machines. In Proceedings of the international conference on Machine learning (ICML), 2008. [5] Linli Xu, James Neufeld, Bryce Larson, and Dale Schuurmans. Maximum margin clustering. In Advances in Neural Information Processing Systems (NIPS), 2004. [6] Linli Xu. Unsupervised and semi-supervised multi-class support vector machines. In AAAI, 2005. [7] F. Bach and Z. Harchaoui. Diffrac : a discriminative and flexible framework for clustering. In Advances in Neural Information Processing Systems (NIPS), 2007. [8] N. Quadrianto, T. Caetano, J. Lim, and D. Schuurmans. Convex relaxation of mixture regression with efficient algorithms. In Advances in Neural Information Processing Systems (NIPS), 2009. [9] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504, 2006. [10] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. Springer-Verlag, 2001. [11] David R Hunter and Kenneth Lange. A tutorial on MM algorithms. The American Statistician, 58(1):30– 37, February 2004. [12] J Shawe-Taylor and N Cristianini. Kernel Methods for Pattern Analysis. Cambridge Univ Press, 2004. [13] Gene H. Golub and Charles F. Van Loan. Matrix computations. Johns Hopkins University Press, 3rd edition, October 1996. [14] Kurt Anstreicher and Samuel Burer. D.C. versus copositive bounds for standard QP. Journal of Global Optimization, 33(2):299–312, October 2005. [15] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge Univ. Press, 2004. [16] Samuel Burer. Optimizing a polyhedral-semidefinite relaxation of completely positive programs. Mathematical Programming Computation, 2(1):1–19, March 2010. [17] M. Journ´ee, F. Bach, P.-A. Absil, and R. Sepulchre. Low-rank optimization for semidefinite convex problems. volume 20, pages 2327–2351. SIAM Journal on Optimization, 2010. [18] A. Berman and N. Shaked-Monderer. Completely Positive Matrices. World Scientific Publishing Company, 2003. [19] D. Bertsekas. Nonlinear programming. Athena Scientific, 1995. [20] P. Brucker. An O(n) algorithm for quadratic knapsack problems. In Journal of Optimization Theory and Applications, volume 134, pages 549–554, 1984. [21] M. Grant and S. Boyd. CVX: Matlab software for disciplined convex programming, version 1.21. http://cvxr.com/cvx, August 2010. [22] Patrick L. Combettes. Solving monotone inclusions via compositions of nonexpansive averaged operators. Optimization, 53:475–504, 2004. [23] Simon Lacoste-Julien. Discriminative Machine Learning with Structure. PhD thesis, University of California, Berkeley, 2009. [24] Kai Zhang, Ivor W. Tsang, and James T. Kwok. Maximum margin clustering made practical. In Proceedings of the international conference on Machine learning (ICML), 2007. [25] Thomas G. Dietterich and Richard H. Lathrop. Solving the multiple-instance problem with axis-parallel rectangles. Artificial Intelligence, 89:31–71, 1997. [26] P. Felzenszwalb, D. Mcallester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), 2008. [27] A. Joulin, F. Bach, and J. Ponce. Discriminative clustering for image co-segmentation. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), 2010. 9
2010
102
3,858
Universal Kernels on Non-Standard Input Spaces Andreas Christmann University of Bayreuth Department of Mathematics D-95440 Bayreuth andreas.christmann@uni-bayreuth.de Ingo Steinwart University of Stuttgart Department of Mathematics D-70569 Stuttgart ingo.steinwart@mathematik.uni-stuttgart.de Abstract During the last years support vector machines (SVMs) have been successfully applied in situations where the input space X is not necessarily a subset of Rd. Examples include SVMs for the analysis of histograms or colored images, SVMs for text classification and web mining, and SVMs for applications from computational biology using, e.g., kernels for trees and graphs. Moreover, SVMs are known to be consistent to the Bayes risk, if either the input space is a complete separable metric space and the reproducing kernel Hilbert space (RKHS) H ⊂Lp(PX) is dense, or if the SVM uses a universal kernel k. So far, however, there are no kernels of practical interest known that satisfy these assumptions, if X ̸⊂Rd. We close this gap by providing a general technique based on Taylor-type kernels to explicitly construct universal kernels on compact metric spaces which are not subset of Rd. We apply this technique for the following special cases: universal kernels on the set of probability measures, universal kernels based on Fourier transforms, and universal kernels for signal processing. 1 Introduction For more than a decade, kernel methods such as support vector machines (SVMs) have belonged to the most successful learning methods. Besides several other nice features, one key argument for using SVMs has been the so-called “kernel trick” [22], which decouples the SVM optimization problem from the domain of the samples, thus making it possible to use SVMs on virtually any input space X. This flexibility is in strong contrast to more classical learning methods from both machine learning and non-parametric statistics, which almost always require input spaces X ⊂Rd. As a result, kernel methods have been successfully used in various application areas that were previously infeasible for machine learning methods. The following, by no means exhaustive, list illustrates this: • SVMs processing probability measures, e.g. histograms, as input samples have been used to analyze histogram data such as colored images, see [5, 11, 14, 12, 27, 29], and also [17] for nonextensive information theoretic kernels on measures. • SVMs for text classification and web mining [15, 12, 16], • SVMs with kernels from computational biology, e.g. kernels for trees and graphs [23]. In addition, several extensions or generalizations of kernel-methods have been considered, see e.g. [13, 26, 9, 16, 7, 8, 4]. Besides their practical success, SVMs nowadays also possess a rich 1 statistical theory, which provides various learning guarantees, see [31] for a recent account. Interestingly, in this analysis, the kernel and its reproducing kernel Hilbert space (RKHS) make it possible to completely decouple the statistical analysis of SVMs from the input space X. For example, if one uses the hinge loss and a bounded measurable kernel whose RKHS H is separable and dense in L1(µ) for all distributions µ on X, then [31, Theorem 7.22] together with [31, Theorem 2.31] and the discussion on [31, page 267ff] shows that the corresponding SVM is universally classification consistent even without an entropy number assumption if one picks a sequence (λn) of positive regularization parameters that satisfy λn →0 and nλn/ ln n →∞. In other words, independently of the input space X, the universal consistency of SVMs is well-understood modulo an approximation theoretical question, namely that of the denseness of H in all L1(µ). For standard input spaces X ⊂Rd and various classical kernels, this question of denseness has been positively answered. For example, for compact X ⊂Rd, [30] showed that, among a few others, the RKHSs of the Gaussian RBF kernels are universal, that is, they are dense in the space C(X) of continuous functions f : X →R. With the help of a standard result from measure theory, see e.g. [1, Theorem 29.14], it is then easy to conclude that these RKHS are also dense in all L1(µ) for which µ has a compact support. This key result has been extended in a couple of different directions: For example, [18] establishes universality for more classes of kernels on compact X ⊂Rd, whereas [32] shows the denseness of the Gaussian RKHSs in L1(µ) for all distributions µ on Rd. Finally, [7, 8, 28, 29] show that universal kernels are closely related to so-called characteristic kernels that can be used to distinguish distributions. In addition, all these papers contain sufficient or necessary conditions for universality of kernels on arbitrary compact metric spaces X, and [32] further shows that the compact metric spaces are exactly the compact topological spaces on which there exist universal spaces. Unfortunately, however, it appears that neither the sufficient conditions for universality nor the proof of the existence of universal kernels can be used to construct universal kernels on compact metric spaces X ̸⊂Rd. In fact, to the best of our knowledge, no explicit example of such kernels has so far been presented. As a consequence, it seems fair to say that, beyond the X ⊂Rd-case, the theory of SVMs is incomplete, which is in contrast to the obvious practical success of SVMs for such input spaces X as illustrated above. The goal of this paper is to close this gap by providing the first explicit and constructive examples of universal kernels that live on compact metric spaces X ̸⊂Rd. To achieve this, our first step is to extend the definition of the Gaussian RBF kernels, or more generally, kernels that can be expressed by a Taylor series, from the Euclidean Rd to its infinite dimensional counter part, that is, the space ℓ2 of square summable sequences. Unfortunately, on the space ℓ2 we face new challenges due to its infinite dimensional nature. Indeed, the closed balls of ℓ2 are no longer (norm)-compact subsets of ℓ2 and hence we cannot expect universality on these balls. To address this issue, one may be tempted to use the weak∗-topology on ℓ2, since in this topology the closed balls are both compact and metrizable, thus universal kernels do exist on them. However, the Taylor kernels do not belong to them, because –basically– the inner product ⟨· , · ⟩ℓ2 fails to be continuous with respect to the weak∗-topology as the sequence of the standard orthonormal basis vectors show. To address this compactness issue we consider (norm)-compact subsets of ℓ2, only. Since the inner product of ℓ2 is continuous with respect to the norm by virtue of the Cauchy-Schwarz inequality, it turns out that the Taylor kernels are continuous with respect to the norm topology. Moreover, we will see that in this situation the Stone-Weierstraß-argument of [30] yields a variety of universal kernels including the infinite dimensional extensions of the Gaussian RBF kernels. However, unlike the finite dimensional Euclidean spaces Rd and their compact subsets, the compact subsets of ℓ2 can be hardly viewed as somewhat natural examples of input spaces X. Therefore, we go one step further by considering compact metric spaces X for which there exist a separable Hilbert space H and an injective and continuous map ρ : X →H. If, in this case, we fix an analytic function K : R →R that can be globally expressed by its Taylor series developed at zero and that has strictly positive Taylor coefficients, then k(x, x′) := K(⟨ρ(x), ρ(x′)⟩H) defines a universal kernel on X and the same is true for the analogous definition of Gaussian kernels. Although this situation may look at a first glance even more artificial than the ℓ2-case, it turns out that quite a few interesting explicit examples can be derived from this situation. Indeed, we will use this general result to present examples of Gaussian kernels defined on the set of distributions over some input space Ωand on certain sets of functions. 2 The paper has the following structure. Section 2 contains the main results and constructs examples for universal kernels based on our technique. In particular, we show how to construct universal kernels on sets of probability measures and on sets of functions, the latter being interesting for signal processing. Section 3 contains a short discussion and Section 4 gives the proofs of the main results. 2 Main result A kernel k on a set X is a function k : X × X →R for which all matrices of the form (k(xi, xj))n i,j=1, n ∈N, x1, . . . , xn ∈X, are symmetric and positive semi-definite. Equivalently, k is a kernel if and only there exists a Hilbert space ˜H and a map ˜Φ : X → ˜H such that k(x, x′) = ⟨˜Φ(x), ˜Φ(x′)⟩˜ H for all x, x′ ∈X. While neither ˜H or ˜Φ are uniquely determined, the so-called reproducing kernel Hilbert space (RKHS) of k, which is given by H :=  ⟨v, Φ( · )⟩˜ H : v ∈˜H and ∥f∥H := inf{∥v∥˜ H : f = ⟨v, Φ( · )⟩˜ H} is uniquely determined, see e.g. [31, Chapter 4.2]. For more information on kernels, we refer to [31, Chapter 4]. Moreover, for a compact metric space (X, d), we write C(X) := {f : X →R | f continuous} for the space of continuous functions on X and equip this space with the usual supremum norm ∥· ∥∞. A kernel k on X is called universal, if k is continuous and its RKHS H is dense in C(X). As mentioned before, this notion, which goes back to [30], plays a key role in the analysis of kernel-based learning methods. Let r ∈(0, ∞]. The kernels we consider in this paper are constructed by functions K : [−r, r] →R that can be expressed by its Taylor series, that is K(t) = ∞ X n=0 antn, t ∈[−r, r] . (1) For such functions [31, Lemma 4.8] showed that k(x, x′) := K(⟨x, x′⟩Rd) = ∞ X n=0 an⟨x, x′⟩n Rd , x, x′ ∈√rBRd, (2) defines a kernel on the closed ball √rBRd := {x ∈Rd : ∥x∥2 ≤√r} with radius √r, whenever all Taylor coefficients an are non-negative. Following [31], we call such kernels Taylor kernels. [30], see also [31, Lemma 4.57], showed that Taylor kernels are universal, if an > 0 for all n ≥0, while [21] notes that strict positivity on certain subsets of indices n suffices. Obviously, the definition (2) of k is still possible, if one replaces Rd by its infinite dimensional and separable counterpart ℓ2 := {(wj)j≥1 : ∥(wj)∥2 ℓ2 := P j≥1 w2 j < ∞}. Let us denote the closed unit ball in ℓ2 by Bℓ2, or more generally, the closed unit ball of a Banach space E by BE, that is BE := {v ∈E : ∥v∥E ≤1}. Our first main result shows that this extension leads to a kernel, whose restrictions to compact subsets are universal, if an > 0 for all n ∈N0 := N ∪{0}. Theorem 2.1 Let K : [−r, r] →R be a function of the form (1). Then we have: i) If an ≥0 for all n ≥0, then k : √rBℓ2 × √rBℓ2 →R is a kernel, where k(w, w′) := K ⟨w, w′⟩ℓ2  = ∞ X n=0 an⟨w, w′⟩n ℓ2 , w, w′ ∈√rBℓ2. (3) ii) If an > 0 for all n ∈N0, then the restriction k|W ×W : W × W →R of k to an arbitrary compact set W ⊂√rBℓ2 is universal. To consider a first explicit example, let K := exp : R →R be the exponential function. Then K clearly satisfies the assumptions of Theorem 2.1 for all r > 0, and hence the resulting exponential kernel is universal on every compact subset W of ℓ2. Moreover, for σ ∈(0, ∞), the related Gaussian-type RBF kernel kσ : ℓ2 × ℓ2 →R defined by kσ(w, w′) := exp −σ2∥w −w′∥2 ℓ2  = exp(2σ2⟨w, w′⟩ℓ2) exp(σ2∥w∥2 ℓ2) exp(σ2∥w′∥2 ℓ2) (4) 3 is also universal on every compact W ⊂ℓ2, since modulo the scaling by σ it is the normalized version of the exponential kernel, and thus it is universal by [31, Lemma 4.55]. Although we have achieved our first goal, namely explicit, constructive examples of universal kernels on X ̸⊂Rd, the result is so far not really satisfying. Indeed, unlike the finite dimensional Euclidean spaces Rd, the infinite dimensional space ℓ2 rarely appears as the input space in realworld applications. The following second result can be used to address this issue. Theorem 2.2 Let X be a compact metric space and H be a separable Hilbert space such that there exists a continuous and injective map ρ : X →H. Furthermore, let K : R →R be a function of the form (1). Then the following statements hold: i) If an ≥0 for all n ∈N0, then k : X × X →R defines a kernel, where k(x, x′) := K ρ(x), ρ(x′) H  = ∞ X n=0 an ρ(x), ρ(x′) n H , x, x′ ∈X. (5) ii) If an > 0 for all n ∈N0, then k is a universal kernel. iii) For σ > 0, the Gaussian-type RBF-kernel kσ : X × X →R is a universal kernel, where kσ(x, x′) := exp −σ2∥ρ(x) −ρ(x′)∥2 H  , x, x′ ∈X. (6) It seems possible that the latter result for the Gaussian-type RBF kernel can be extended to other positive non-constant radial basis function kernels such as kσ(x, x′) := exp −σ2∥ρ(x) −ρ(x′)∥H  or the Student-type RBF kernels kσ(x, x′) := 1 + σ2∥ρ(x) −ρ(x′)∥2 H −α for σ2 > 0 and α ≥1. Indeed, [25] uses the fact that on Rd such kernels have an integral representation in terms of the Gaussian RBF kernels to show, see [25, Corollary 4.9], that these kernels inherit approximation properties such as universality from the Gaussian RBF kernels. We expect that the same arguments can be made for ℓ2 and then, in a second step, for the situation of Theorem 2.2. Before we provide some examples of situations in which Theorem 2.2 can be used to define explicit universal kernels, we point to a technical detail of Theorem 2.2, which may be overseen, thus leading to wrong conclusions. To this end, let (X, dX) be an arbitrary metric space, H be a separable Hilbert space and ρ : X →H be an injective map. We write V := ρ(X) and equip this space with the metric defined by H. Thus, ρ : X →V is bijective by definition. Moreover, since H is assumed to be separable, it is isometrically isomorphic to ℓ2, and hence there exists an isometric isomorphism I : H →ℓ2. We write W := I(V ) and equip this set with the metric defined by the norm of ℓ2. For a function f : W →R, we can then consider the following diagram (X, dX) (R, | · |) (V, ∥· ∥H) (W, ∥· ∥ℓ2) ? 6 6  f ◦I ◦ρ ρ f I (7) Since both ρ and I are bijective, it is easy to see that f not only defines a function g : X →R by g := f ◦I ◦ρ, but conversely, every function g : X →R has such a representation and this representation is unique. In other words, there is a one-to-one relationship between the functions X →R and the functions W →R. Let us now assume that we have a kernel kW on W with RKHS HW and canonical feature map ΦW : W →HW . Then kX : X × X →R, given by kX(x, x′) := kW (I ◦ρ(x), I ◦ρ(x′)) , x, x′ ∈X, defines a kernel on X, since kX(x, x′) = kW (I ◦ρ(x), I ◦ρ(x′)) = ⟨ΦW (I(ρ(x′))), ΦW (I(ρ(x)))⟩HW , x, x′ ∈X, 4 shows that ΦW ◦I ◦ρ : X →HW is a feature map of kX. Moreover, [31, Theorem 4.21] shows that the RKHS HX of kX is given by HX =  ⟨f, ΦW ◦I ◦ρ( · )⟩HW : f ∈HW . Since, for f ∈HW , the reproducing property of HW gives f ◦I ◦ρ(x) = ⟨f, ΦW ◦I ◦ρ(x)⟩HW for all x ∈X we thus conclude that HX = {f ◦I ◦ρ : f ∈HW } =: HW ◦I ◦ρ. Let us now assume that X is compact and that kW is one of the universal kernels considered in Theorem 2.1 or the Gaussian RBF kernel (4). Then the proof of Theorem 2.2 shows that kX is one of the universal kernels considered in Theorem 2.2. Moreover, if we consider the kernel kV : V × V →R defined by kV (v, v′) := kW (I(v), I(v′)), then an analogous argument shows that kV is a universal kernel. This raises the question, whether we need the compactness of X, or whether it suffices to assume that ρ is injective, continuous and has a compact image V . Surprisingly, the answer is that it depends on the type of universality one needs. Indeed, if ρ is as in Theorem 2.2, then the compactness of X ensures that ρ is a homeomorphism, that is, ρ−1 : V →X is continuous, too. Since I is clearly also a homeomorphism, we can easily conclude that C(X) = C(W) ◦I ◦ρ, that is, we have the same relationship as we have for the RKHSs HW and HX. From this, the universality is easy to establish. Let us now assume the compactness of V instead of the compactness of X. Then, in general, ρ is not a homeomorphism and the sets of continuous functions on X and V are in general different, even if we consider the set of bounded continuous functions on X. To see the latter, consider e.g. the map ρ : [0, 1) →S1 onto the unit sphere S1 of R2 defined by ρ(t) := (sin(2πt), cos(2πt)). Now this difference makes it impossible to conclude from the universality of kV (or kW ) to the universality of kX. However, if τV denotes the topology of V , then ρ−1(τV ) := {ρ−1(O) : O ∈τV } defines a new topology on X, which satisfies ρ−1(τV ) ⊂τX. Consequently, there are, in general, fewer continuous functions with respect to ρ−1(τV ). Now, it is easy to check that dρ(x, x′) := ∥ρ(x) −ρ(x′)∥H defines a metric that generates ρ−1(τV ) and, since ρ is isometric with respect to this new metric, we can conclude that (X, dρ) is a compact metric space. Consequently, we are back in the situation of Theorem 2.2, and hence kX is universal with respect to the space C(X, dρ) of functions X →R that are continuous with respect to dρ. In other words, while HX may fail to approximate every function that is continuous with respect to dX, it does approximate every function that is continuous with respect to dρ. Whether the latter approximation property is enough clearly depends on the specific application at hand. Let us now present some universal kernels of practical interest. Please note, that although the function ρ in our examples is even linear, the Theorem 2.2 only assumes ρ to be continuous and injective. We start with two examples where X is the set of distributions on some space Ω. Example 1: universal kernels on the set of probability measures. Let (Ω, dΩ) be a compact metric space, B(Ω) be its Borel σ-algebra, and X := M1(Ω) be the set of all Borel probability measures on Ω. Then the topology describing weak convergence of probability measures can be metrized, e.g., by the Prohorov metric dX(P, P′) := inf  ε > 0 : P(A) ≤P′(Aε) + ε for all A ∈B(Ω) , P, P′ ∈X , (8) where Aε := {ω′ ∈Ω: dΩ(ω, ω′) < ε for some ω ∈A}, see e.g. [2, Theorem 6.8, p. 73]. Moreover, (X, dX) is a compact metric space if and only if (Ω, dΩ) is a compact metric space, see [19, Thm. 6.4]. In order to construct universal kernels on (X, dX) with the help of Theorem 2.2, it thus remains to find separable Hilbert spaces H and injective, continuous embeddings ρ : X → H. Let kΩbe a continuous kernel on Ωwith RKHS HΩand canonical feature map ΦΩ(ω) := kΩ(ω, ·), ω ∈Ω. Note that kΩis bounded because it is continuous and Ωis compact. Then HΩ is separable and ΦΩis bounded and continuous, see [31, Lemmata 4.23, 4.29, 4.33]. Assume that kΩis additionally characteristic, i.e. the function ρ : X →HΩdefined by the Bochner integral ρ(P) := EPΦΩis injective. Then the next lemma, which is taken from [10, Thm. 5.1] and which is a modification of a theorem in [3, p. III. 40], ensures the continuity of ρ. Lemma 2.3 Let (Ω, dΩ) be a complete separable metric space, H be a separable Banach space and Φ : Ω→H be a bounded, continuous function. Then ρ : M1(Ω) →H defined by ρ(P) := EPΦ is continuous, i.e., EPnΦ →EPΦ, whenever (Pn)n∈N ⊂M1(Ω) converges weakly in M1(Ω) to P. Consequently, the map ρ : M1(Ω) →HΩsatisfies the assumptions of Theorem 2.2, and hence the Gaussian-type RBF kernel kσ(P, P′) := exp −σ2∥EPΦΩ−EP′ΦΩ∥2 HΩ  , P, P′ ∈M1(Ω), (9) 5 is universal and obviously bounded. Note that this kernel is conceptionally different to characteristic kernels on Ω. Indeed, characteristic kernels live on Ωand their RKHS consist of functions Ω→ R, while the new kernel kσ lives on M1(Ω) and its RKHS consists of functions M1(Ω) →R. Consequently, kσ can be used to learn from samples that are individual distributions, e.g. represented by histograms, densities or data, while characteristic kernels can only be used to check whether two of such distributions are equal or not. Example 2: universal kernels based on Fourier transforms of probability measures. Consider, the set X := M1(Ω), where Ω⊂Rd is compact. Moreover, let ρ be the Fourier transform (or characteristic function), that is ρ(P) := ˆP, where ˆP(t) := R ei⟨z,t⟩dµ(z) ∈C, t ∈Rd. It is well-known, see e.g. [6, Chap. 9], that, for all P ∈M1(Ω), ˆP is uniformly continuous on Rd and ∥ˆP∥∞≤1. Moreover, ρ : P 7→ˆP is injective, and if a sequence (Pn) converges weakly to some P, then (ˆPn) converges uniformly to ˆP on every compact subset of Rd. Now let µ be a finite Borel measure on Rd with support(µ) = Rd, e.g., µ can be any probability distribution on Rd with Lebesgue density h > 0. Then the previous properties of the Fourier transform can be used to show that ρ : M1(Ω) →L2(µ) is continuous, and hence Theorem 2.2 ensures that the following Gaussian-type kernel is universal and bounded: kσ(P, P′) := exp −σ2∥ˆP −ˆP′∥2 L2(µ)  , P, P′ ∈M1(Ω). (10) In view of the previous two examples, we mention that the probability measures P and P′ are often not directly observable in practice, but only corresponding empirical distributions can be obtained. In this case, a simple standard technique is to construct histograms to represent these empirical distributions as vectors in a finite-dimensional Euclidean space, although it is well-known that histograms can yield bad estimates for probability measures. Our new kernels make it possible to directly plug the empirical distributions into the kernel kσ, even if these distributions do not have the same length. Moreover, other techniques to convert empirical distributions to absolutely continuous distributions such as kernel estimators derived via weighted averaging of rounded points (WAPRing) and (averaging) histograms with different origins, [20, 24] can be used in kσ, too. Clearly, the preferred method will most likely depend on the specific application at hand, and one benefit of our construction is that it allows this flexibility. Example 3: universal kernels for signal processing. Let (Ω, A, µ) be an arbitrary measure space and L2(µ) be the usual space of square µ-integrable functions on Ω. Let us additionally assume that L2(µ) is separable, which is typically, but not always, satisfied. In addition, let us assume that our input values xi ∈X are functions taken from some compact set X ⊂L2(µ). A typical example, where this situation occurs, is signal processing, where the true signal f ∈L2([0, 1]), which is a function of time, cannot be directly observed, but a smoothed version g := T ◦f of the signal is observable. This smoothing can often be described by a compact linear operator T : L2([0, 1]) →L2([0, 1]), e.g., a convolution operator, acting on the true signals. Hence, if we assume that the true signals are contained in the closed unit ball BL2([0,1]), then the observed, smoothed signals T ◦f are contained in a compact subset X of L2([0, 1]). Let us now return to the general case introduced above. Then the identity map ρ := id : X →L2(µ) satisfies the assumptions of Theorem 2.2, and hence the Gaussian-type kernel kσ(g, g′) := exp −σ2∥g −g′∥2 L2(µ)  , g, g′ ∈X, (11) defines a universal and bounded kernel on X. As in the previous examples, note that the computation of kσ does not require the functions g and g′ to be in a specific format such as a certain discretization. 3 Discussion The main goal of this paper was to provide an explicit construction of universal kernels that are defined on arbitrary compact metric spaces, which are not necessarily a subset of Rd. There is a still increasing interest in kernel methods including support vector machines on such input spaces, e.g. for classification or regression purposes for input values being probability measures, histograms or colored images. As examples, we gave explicit universal kernels on the set of probability distributions and for signal processing. One direction of further research may be to generalize our results to the case of non-compact metric spaces or to find quantitative approximation results. 6 4 Proofs In the following, we write NN 0 for the set of all sequences (ji)i≥1 with values in N0 := N ∪{0}. Elements of this set will serve us as multi-indices with countably many components. For j = (ji) ∈ NN 0 , we will therefore adopt the multi-index notation |j| := X i≥1 ji . Note that |j| < ∞implies that j has only finitely many components ji with ji ̸= 0. Lemma 4.1 Assume that n ∈N is fixed and that for all j ∈NN 0 with |j| = n, we have some constant cj ∈(0, ∞). Then for all j ∈NN 0 with |j| = n + 1, there exists a constant ˜cj ∈(0, ∞) such that for all summable sequences (bi) ⊂[0, ∞) we have  X j∈NN 0 :|j|=n cj ∞ Y i=1 bji i  ∞ X i=1 bi  = X j∈NN 0 :|j|=n+1 ˜cj ∞ Y i=1 bji i . Proof: This can be shown by induction, where the induction step is similar to the proof for the Cauchy product of series. Lemma 4.2 Assume that n ∈N0 is fixed. Then for all j ∈NN 0 with |j| = n, there exists a constant cj ∈(0, ∞) such that for all summable sequences (bi) ⊂[0, ∞) we have  ∞ X i=1 bi n = X j∈NN 0 :|j|=n cj ∞ Y i=1 bji i . Proof: This can be shown by induction using Lemma 4.1. Given a non-empty countable set J and a family w := (wj)j∈J ⊂R, we write ∥w∥2 2 := P j∈J w2 j, and, as usual, we denote the space of all families for which this quantity is finite by ℓ2(J). Recall that ℓ2(J) together with ∥· ∥2 is a Hilbert space and we denote its inner product by ⟨· , · ⟩ℓ2(J). Moreover, ℓ2 := ℓ2(N) is separable, and by using an orthonormal basis representation, it is further known that every separable Hilbert space is isometrically isomorphic to ℓ2. In this sense, ℓ2 can be viewed as a generic model for separable Hilbert spaces. The following result provides a method to construct Taylor kernels on closed balls in ℓ2. Proposition 4.3 Let r ∈(0, ∞] and K : [−r, r] →R be a function that can be expressed by its Taylor series given in (1), i.e. K(t) = P∞ n=0 antn, t ∈[−r, r]. Define J := {j ∈NN 0 : |j| < ∞}. If an ≥0 for all n ≥0, then k : √rBℓ2 × √rBℓ2 →R defined by (3), i.e. k(w, w′) := K ⟨w, w′⟩ℓ2  = ∞ X n=0 an⟨w, w′⟩n ℓ2 , w, w′ ∈√rBℓ2, is a kernel. Moreover, for all j ∈J, there exists a constant cj ∈(0, ∞) such that Φ : √rBℓ2 → ℓ2(J) defined by Φ(w) :=  cj ∞ Y i=1 wji i  j∈J , w ∈√rBℓ2, (12) is a feature map of k, where we use the convention 00 := 1. Proof: For w, w′ ∈√rBℓ2, the Cauchy-Schwarz inequality yields |⟨w, w′⟩| ≤∥w∥2∥w′∥2 ≤r and thus k is well-defined. Let wi denote the i-th component of w ∈ℓ2. Since (1) is absolutely convergent, Lemma 4.2 then shows that, for all j ∈NN 0 , there exists a constant ˜cj ∈(0, ∞) such that k(w, w′) = X j∈NN 0 a|j|˜cj ∞ Y i=1 (w′ i)ji ∞ Y i=1 wji i . Setting cj := pa|j|˜cj, we obtain that Φ defined in (12) is indeed a feature map of k, and hence k is a kernel. 7 Before we can state our first main result the need to recall the following test of universality from [31, Theorem 4.56]. Theorem 4.4 Let W be a compact metric space and k be a continuous kernel on W with k(w, w) > 0 for all w ∈W. Suppose that we have an injective feature map Φ : W →ℓ2(J) of k, where J is some countable set. We write Φj : W →R for its j-th component, i.e., Φ(w) = (Φj(w))j∈J, w ∈W. If A := span {Φj : j ∈J} is an algebra, then k is universal. With the help of Theorem 4.4 and Proposition 4.3 we can now prove our first main result. Proof of Theorem 2.1: We have already seen in Proposition 4.3 that k is a kernel on √rBℓ2. Let us now fix a compact W ⊂√rBℓ2. For every j ∈J, where J is defined in Proposition 4.3, there are only finitely many components ji with ji ̸= 0. Consequently, there exists a bijection between J and the set of all finite subsets of N. Since the latter is countable, J is countable. Furthermore, we have k(w, w) = ∞ X n=0 an∥w∥2n ℓ2 ≥a0 > 0 for all w ∈W, and it is obvious, that the components of the feature map Φ found in Proposition 4.3 span an algebra. Finally, if we have w, w′ ∈W with w ̸= w′, there exists an i ≥1 such that wi ̸= w′ i. For the multi-index j ∈J that equals 1 at the i-component and vanishes everywhere else we then have Φ(w) = cjwi ̸= cjw′ i = Φ(w′), and hence Φ is injective. Proof of Theorem 2.2: Since H is separable Hilbert space there exists an isometric isomorphism I : H →ℓ2. We define V := ρ(X), see also the diagram in (7). Since ρ is continuous, V is the image of a compact set under a continuous map, and thus V is compact and the inverse of the bijective map I ◦ρ : X →W is continuous. Consequently, there is a one-to-one relationship between the continuous functions fX on X and the continuous functions fW on W, namely C(X) = C(W) ◦I ◦ρ, see also the discussion following (7). Moreover, the fact that I : H →ℓ2 is an isometric isomorphism yields ⟨I(ρ(x)), I(ρ(x′))⟩ℓ2 = ⟨ρ(x), ρ(x′)⟩H for all x, x′ ∈X, and hence the kernel k considered in Theorem 2.2 is of the form kX = kW (I ◦ρ( · ), I ◦ρ( · )), where kW is the corresponding kernel defined on W ⊂ℓ2 considered in Theorem 2.2. Now, the discussion following (7) showed HX = HW ◦I ◦ρ. Consequently, if we fix a function g ∈C(X), then f := g ◦ρ−1 ◦I−1 ∈C(W) can be approximated by HW , that is, for all ε > 0, there exists an h ∈HW such that ∥h −f∥∞≤ε. Since I ◦ρ : X →W is bijective and f ◦I ◦ρ = g, we conclude that ∥h ◦I ◦ρ −g∥∞≤ε. Now the assertion follows from h ◦I ◦ρ ∈HX. References [1] H. Bauer. Measure and Integration Theory. De Gruyter, Berlin, 2001. [2] P. Billingsley. Convergence of probability measures. John Wiley & Sons, New York, 2nd edition, 1999. [3] N. Bourbaki. Integration I. Chapters 1-6. Springer, Berlin, 2004. Translated from the 1959, 1965, and 1967 French originals by S.K. Berberian. [4] A. Caponnetto, C.A. Micchelli, M. Pontil, and Y. Ying. Universal multi-task kernels. J. Mach. Learn. Res., 9:1615–1646, 2008. [5] O. Chapelle, P. Haffner, and V. Vapnik. SVMs for histogram-based image classification. IEEE Transactions on Neural Networks, 10:1055–1064, 1999. [6] R. M. Dudley. Real Analysis and Probability. Cambridge University Press, Cambridge, 2002. [7] K. Fukumizu, F. R. Bach, and M. I. Jordan. Dimensionality reduction for supervised learning with reproducing kernel hilbert spaces. J. Mach. Learn. Res., 5:73–99, 2005. [8] K. Fukumizu, F. R. Bach, and M. I. Jordan. Kernel Dimension Reduction in Regression. Ann. Statist., 37:1871–1905, 2009. [9] K. Fukumizu, B. K. Sriperumbudur, A. Gretton, and B. Sch¨olkopf. Characteristic kernels on groups and semigroups. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 473–480. 2009. 8 [10] R. Hable and A. Christmann. Qualitative robustness of support vector machines. arXiv:0912.0874v1, 2009. [11] M. Hein and O. Bousquet. Kernels, associated structures and generalizations. Technical report, MaxPlanck-Institute for Biological Cybernetics, 2004. [12] M. Hein and O. Bousquet. Hilbertian metrics and positive definite kernels on probability measures. In Z. Ghahramani and R. Cowell, editors, AISTATS, pages 136–143, 2005. [13] M. Hein, O. Bousquet, and B. Sch¨olkopf. Maximal margin classification for metric spaces. Journal of Computer and System Sciences, 71:333–359, 2005. [14] M. Hein, T. N. Lal, and O. Bousquet. Hilbertian metrics on probability measures and their application in SVM’s. In C. E. Rasmussen, H. H. B¨ulthoff, M. Giese, and B. Sch¨olkopf, editors, Pattern Recognition, Proceedings of the 26th DAGM Symposium, pages 270–277, Berlin, 2004. Springer. [15] T. Joachims. Learning to Classify Text Using Support Vector Machines. Kluwer Academic Publishers, Boston, 2002. [16] J. Lafferty and G. Lebanon. Diffusion kernels on statistical manifolds. J. Mach. Learn. Res., 6:129–163, 2005. [17] A.F.T. Martins, N.A. Smith, E.P. Xing, P.M.Q. Aguiar, and M.A.T. Figueiredo. Nonextensive information theoretic kernels on measures. J. Mach. Learn. Res., 10:935–975, 2009. [18] C. A. Micchelli, Y. Xu, and H. Zhang. Universal kernels. J. Mach. Learn. Res., 7:2651–2667, 2006. [19] K. R. Parthasarathy. Probability Measures on Metric Spaces. Academic Press, New York, 1967. [20] E. Parzen. On estimating of a probability density and mode. Ann. Math. Statist., 35:1065–1076, 1962. [21] A. Pinkus. Strictly positive definite functions on a real inner product space. Adv. Comput. Math., 20:263– 271, 2004. [22] B. Sch¨olkopf, A. J. Smola, and K.-R. M¨uller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Comput., 10:1299–1319, 1998. [23] B. Sch¨olkopf, K. Tsuda, and J. P. Vert. Kernel Methods in Computational Biology. MIT Press, Cambridge, MA, 2004. [24] D. Scott. Averaged shifted histograms: Effective nonparametric density estimation in several dimensions. Ann. Statist., 13:1024–1040, 1985. [25] C. Scovel, D. Hush, I. Steinwart, and J. Theiler. Radial kernels and their reproducing kernel Hilbert spaces. Journal of Complexity, 2010, to appear. [26] A.J. Smola, A. Gretton, L. Song, and B. Sch¨olkopf. A Hilbert Space Embedding for Distributions. In E. Takimoto, editor, Algorithmic Learning Theory, Lecture Notes on Computer Science. Springer, 2007. Proceedings of the 10th International Conference on Discovery Science, 40-41. [27] B. Sriperumbudur, K. Fukumizu, A. Gretton, G. Lanckriet, and B. Sch¨olkopf. Kernel choice and classifiability for RKHS embeddings of probability distributions. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1750–1758. 2009. [28] B. Sriperumbudur, K. Fukumizu, and G. Lanckriet. On the relation between universality, characteristic kernels and RKHS embeddings of measures. In Yee Whye Teh and M. Titterington, editors, AISTATS 2010, Proc. of the 13th International Conference on Artificial Intelligence and Statistics, volume 9, pages 773–780. 2010. [29] B. Sriperumbudur, K. Fukumizu, and G. Lanckriet. Universality, characteristic kernels and RKHS embeddings of measures. arXiv:1003.0887v1, 2010. [30] I. Steinwart. On the influence of the kernel on the consistency of support vector machines. J. Mach. Learn. Res., 2:67–93, 2001. [31] I. Steinwart and A. Christmann. Support Vector Machines. Springer, New York, 2008. [32] I. Steinwart, D. Hush, and C. Scovel. Function classes that approximate the Bayes risk. In COLT’06, 19th Conference on Learning Theory, Pittsburgh, 2006. 9
2010
103
3,859
Worst-Case Linear Discriminant Analysis Yu Zhang and Dit-Yan Yeung Department of Computer Science and Engineering Hong Kong University of Science and Technology {zhangyu,dyyeung}@cse.ust.hk Abstract Dimensionality reduction is often needed in many applications due to the high dimensionality of the data involved. In this paper, we first analyze the scatter measures used in the conventional linear discriminant analysis (LDA) model and note that the formulation is based on the average-case view. Based on this analysis, we then propose a new dimensionality reduction method called worst-case linear discriminant analysis (WLDA) by defining new between-class and within-class scatter measures. This new model adopts the worst-case view which arguably is more suitable for applications such as classification. When the number of training data points or the number of features is not very large, we relax the optimization problem involved and formulate it as a metric learning problem. Otherwise, we take a greedy approach by finding one direction of the transformation at a time. Moreover, we also analyze a special case of WLDA to show its relationship with conventional LDA. Experiments conducted on several benchmark datasets demonstrate the effectiveness of WLDA when compared with some related dimensionality reduction methods. 1 Introduction With the development of advanced data collection techniques, large quantities of high-dimensional data are commonly available in many applications. While high-dimensional data can bring us more information, processing and storing such data poses many challenges. From the machine learning perspective, we need a very large number of training data points to learn an accurate model due to the so-called ‘curse of dimensionality’. To alleviate these problems, one common approach is to perform dimensionality reduction on the data. An assumption underlying many dimensionality reduction techniques is that the most useful information in many high-dimensional datasets resides in a low-dimensional latent space. Principal component analysis (PCA) [8] and linear discriminant analysis (LDA) [7] are two classical dimensionality reduction methods that are still widely used in many applications. PCA, as an unsupervised linear dimensionality reduction method, finds a lowdimensional subspace that preserves as much of the data variance as possible. On the other hand, LDA is a supervised linear dimensionality reduction method which seeks to find a low-dimensional subspace that keeps data points from different classes far apart and those from the same class as close as possible. The focus of this paper is on the supervised dimensionality reduction setting like that for LDA. To set the stage, we first analyze the between-class and within-class scatter measures used in conventional LDA. We then establish that conventional LDA seeks to maximize the average pairwise distance between class means and minimize the average within-class pairwise distance over all classes. Note that if the purpose of applying LDA is to increase the accuracy of the subsequent classification task, then it is desirable for every pairwise distance between two class means to be as large as possible and every within-class pairwise distance to be as small as possible, but not just the average distances. To put this thinking into practice, we incorporate a worst-case view to define a new between-class 1 scatter measure as the minimum of the pairwise distances between class means, and a new withinclass scatter measure as the maximum of the within-class pairwise distances over all classes. Based on the new scatter measures, we propose a novel dimensionality reduction method called worst-case linear discriminant analysis (WLDA). WLDA solves an optimization problem which simultaneously maximizes the worst-case between-class scatter measure and minimizes the worst-case within-class scatter measure. If the number of training data points or the number of features is not very large, e.g., below 100, we propose to relax the optimization problem and formulate it as a metric learning problem. In case both the number of training data points and the number of features are large, we propose a greedy approach based on the constrained concave-convex procedure (CCCP) [24, 18] to find one direction of the transformation at a time with the other directions fixed. Moreover, we also analyze a special case of WLDA to show its relationship with conventional LDA. We will report experiments conducted on several benchmark datasets. 2 Worst-Case Linear Discriminant Analysis We are given a training set of 푛data points, 풟= {x1, . . . , x푛} ⊂ℝ푑. Let 풟be partitioned into 퐶≥2 disjoint classes Π푖, 푖= 1, . . . , 퐶, where class Π푖contains 푛푖examples. We perform linear dimensionality reduction by finding a transformation matrix W ∈ℝ푑×푟. 2.1 Objective Function We first briefly review the conventional LDA. The between-class scatter matrix and within-class scatter matrix are defined as S푏= 퐶 ∑ 푘=1 푛푘 푛( ¯m푘−¯m)( ¯m푘−¯m)푇, S푤= 퐶 ∑ 푘=1 ∑ x푖∈Π푘 1 푛(x푖−¯m푘)(x푖−¯m푘)푇, where ¯m푘= 1 푛푘 ∑ x푖∈Π푘x푖is the class mean of the 푘th class Π푘and ¯m = 1 푛 ∑푛 푖=1 x푖is the sample mean of all data points. Based on the scatter matrices, the between-class scatter measure and within-class scatter measure are defined as 휂푏= tr ( W푇S푏W ) , 휂푤= tr ( W푇S푤W ) , where tr(⋅) denotes the trace of a square matrix. LDA seeks to find the optimal solution of W that maximizes the ratio 휂푏/휂푤as the optimality criterion. By using the fact that ¯m = 1 푛 ∑퐶 푘=1 푛푘¯m푘, we can rewrite S푏as S푏= 1 2푛2 퐶 ∑ 푖=1 퐶 ∑ 푗=1 푛푖푛푗( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇. According to this and the definition of the within-class scatter measure, we can see that LDA tries to maximize the average pairwise distance between class means { ¯m푖} and minimize the average within-class pairwise distance over all classes. Instead of taking this average-case view, our WLDA model adopts a worst-case view which arguably is more suitable for classification applications. We define the sample covariance matrix for the 푘th class Π푘as S푘= 1 푛푘 ∑ x푖∈Π푘 (x푖−¯m푘)(x푖−¯m푘)푇. (1) Unlike LDA which uses the average of the distances between each class mean and the sample mean as the between-class scatter measure, here we use the minimum of the pairwise distances between class means as the between-class scatter measure: 휌푏= min 푖,푗 { tr ( W푇( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇W )} . (2) Also, we define the new within-class scatter measure as 휌푤= max 푖 { tr ( W푇S푖W )} , (3) which is the maximum of the average within-class pairwise distances. 2 Similar to LDA, we define the optimality criterion of WLDA as the ratio of the between-class scatter measure to the within-class scatter measure: max W 퐽(W) = 휌푏 휌푤 s.t. W푇W = I푟, (4) where I푟denotes the 푟× 푟identity matrix. The orthonormality constraint in problem (4) is widely used by many existing dimensionality reduction methods. Its role is to limit the scale of each column of W and eliminate the redundancy among all columns of W. 2.2 Optimization Procedure Since problem (4) is not easy to optimize with respect to W, we resort to formulate this dimensionality reduction problem as a metric learning problem [22, 21, 4]. We define a new variable Σ = WW푇which can be used to define a metric. Then we express 휌푏and 휌푤in terms of Σ as 휌푏 = min 푖,푗 { tr ( ( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇Σ )} 휌푤 = max 푖 { tr ( S푖Σ )} , due to a property of the matrix trace that tr(AB) = tr(BA) for any matrices A and B with proper sizes. The orthonormality constraint in problem (4) is non-convex with respect to W and cannot be expressed in terms of Σ. We define a set ℳ푤as ℳ푤= { M푤∣M푤= WW푇, W푇W = I푟, W ∈ℝ푑×푟} . Apparently Σ ∈ℳ푤. It has been shown in [16] that the convex hull of ℳ푤can be precisely expressed as a convex set ℳ푒given by ℳ푒= { M푒∣tr(M푒) = 푟, 0 ⪯M푒⪯I푑 } , where 0 denotes the zero vector or matrix of appropriate size and A ⪯B means that the matrix B −A is positive semidefinite. Each element in ℳ푤is referred to as an extreme point of ℳ푒. Since ℳ푒consists of all convex combinations of the elements in ℳ푤, ℳ푒is the smallest convex set that contains ℳ푤, and hence ℳ푤⊆ℳ푒. Then problem (4) can be relaxed as max Σ 퐽(Σ) = min푖,푗 { tr ( S푖푗Σ )} max푖 { tr ( S푖Σ )} s.t. tr(Σ) = 푟, 0 ⪯Σ ⪯I푑, (5) where S푖푗= ( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇. For notational simplicity, we denote the constraint set as ℂ= {Σ ∣tr(Σ) = 푟, 0 ⪯Σ ⪯I푑}. Table 1 shows an iterative algorithm for solving problem (5). Table 1: Algorithm for solving optimization problem (5) Input: { ¯m푖}, {S푖} and 푟 1: Initialize Σ(0); 2: For 푘= 1, . . . , 푁iter 2.1: Compute the ratio 훼푘from Σ(푘−1) as: 훼푘= 퐽(Σ(푘−1)); 2.2: Solve the optimization problem Σ(푘) = arg maxΣ∈ℂmin푖,푗 { tr ( S푖푗Σ )} −훼푘max푖 { tr ( S푖Σ )} ; 2.3: If ∥Σ(푘) −Σ(푘−1)∥퐹≤휀(here we set 휀= 10−4) break; Output: Σ We now present the solution of the optimization problem in step 2.2. It is equivalent to the following problem min Σ∈ℂ훼푘max 푖 { tr ( S푖Σ )} −min 푖,푗 { tr ( S푖푗Σ )} . (6) 3 According to [3], we know that max푖 { tr ( S푖Σ )} is a convex function because it is the maximum of several convex functions, and min푖,푗 { tr ( S푖푗Σ )} is a concave function because it is the minimum of several concave functions. Moreover, 훼푘is a positive scalar since 훼푘= 퐽(Σ(푘−1)). So problem (6) is a convex optimization problem. We introduce new variables 푠and 푡to simplify problem (6) as min Σ,푠,푡 훼푘푠−푡 s.t. tr ( S푖Σ ) ≤푠, ∀푖 tr ( S푖푗Σ ) ≥푡> 0, ∀푖, 푗 tr(Σ) = 푟, 0 ⪯Σ ⪯I푑. (7) Note that problem (7) is a semidefinite programming (SDP) problem [19] which can be solved using a standard SDP solver. After obtaining the optimal Σ★, we can recover the optimal W★as the top 푟 eigenvectors of Σ★. In the following, we will prove the convergence of the algorithm in Table 1. Theorem 1 For the algorithm in Table 1, we have 퐽(Σ(푘)) ≥퐽(Σ(푘−1)). Proof: We define 푔(Σ) = min푖,푗 { tr ( S푖푗Σ )} −훼푘max푖 { tr ( S푖Σ )} . Then 푔(Σ(푘−1)) = 0 since 훼푘= min푖,푗 { tr ( S푖푗Σ(푘−1))} max푖 { tr ( S푖Σ(푘−1))} . Because Σ(푘) = arg maxΣ∈ℂ푔(Σ) and Σ(푘−1) ∈ℂ, we have 푔(Σ(푘)) ≥푔(Σ(푘−1)) = 0. This means min푖,푗 { tr ( S푖푗Σ(푘))} max푖 { tr ( S푖Σ(푘))} ≥훼푘, which implies that 퐽(Σ(푘)) ≥퐽(Σ(푘−1)). □ Theorem 2 For any Σ ∈ℂ, we have 0 ≤퐽(Σ) ≤ 2tr(S푏) ∑푟 푖=1 휆푑−푖+1 where 휆푖is the 푖th largest eigenvalue of S푤. Proof: It is obvious that 퐽(Σ) ≥0. The numerator of 퐽(Σ) can be upper-bounded as min 푖,푗 { tr ( S푖푗Σ )} ≤ ∑퐶 푖=1 ∑퐶 푗=1 푛푖푛푗tr ( S푖푗Σ ) ∑퐶 푖=1 ∑퐶 푗=1 푛푖푛푗 = 2tr(S푏Σ) ≤2tr(S푏). (8) Moreover, the denominator of 퐽(Σ) can be lower-bounded as max 푖 { tr ( S푖Σ )} ≥ ∑퐶 푖=1 푛푖tr ( S푖Σ ) ∑퐶 푖=1 푛푖 = tr ( S푤Σ ) ≥ 푑 ∑ 푖=1 휆푑−푖+1˜휆푖≥ 푟 ∑ 푖=1 휆푑−푖+1, (9) where ˜휆푖is the 푖th largest eigenvalue of Σ and satisfies 0 ≤˜휆푖≤1 and ∑푑 푖=1 ˜휆푖= 푟due to the constraints ℂon Σ. By utilizing Eqs. (8) and (9), we can reach the conclusion. □ From Theorem 2, we can see that 퐽(Σ) is bounded and our method is non-decreasing. So our method can achieve a local optimum when converged. 2.3 Optimization in Dual Form In the previous subsection, we need to solve the SDP problem in problem (7). However, SDP is not scalable to high dimensionality 푑. In many real-world applications to which dimensionality reduction is applied, the number of data points 푛is much smaller than the dimensionality 푑. Under such circumstances, speedup can be obtained by solving the dual form of problem (4) instead. It is easy to show that the solution of problem (4) satisfies W = XA [14] where X = (x1, . . . , x푛) is the data matrix and A ∈ℝ푛×푟. Then problem (4) can be formulated as max A min푖,푗 { tr ( A푇X푇S푖푗XA )} max푖 { tr ( A푇X푇S푖XA )} s.t. A푇KA = I푟, (10) 4 where K = X푇X is the linear kernel matrix. Here we assume that K is positive definite since the data points are independent and identically distributed and 푑is much larger than 푛. We define a new variable B = K 1 2 A and problem (10) can be reformulated as max B min푖,푗 { tr ( B푇K−1 2 X푇S푖푗XK−1 2 B )} max푖 { tr ( B푇K−1 2 X푇S푖XK−1 2 B )} s.t. B푇B = I푟. (11) Note that problem (11) is almost the same as problem (4) and so we can use the same relaxation technique above to solve problem (11). In the relaxed problem, the variable ˜Σ = BB푇used to define the metric in the dual form is of size 푛× 푛which is much smaller than that (푑× 푑) of Σ in the primal form when 푛< 푑. So solving the problem in the dual form is more efficient. Moreover, the dual form facilitates kernel extension of our method. 2.4 Alternative Optimization Procedure In case the number of training data points 푛and the dimensionality 푑are both large, the above optimization procedures will be infeasible. Here we introduce yet another optimization procedure based on a greedy approach to solve problem (4) when both 푛and 푑are large. We find the first column of W by solving problem (4) where W is a vector, then find the second column of W by assuming the first column is fixed, and so on. This procedure consists of 푟steps. In the 푘th step, we assume that the first 푘−1 columns of W have been obtained and we find the 푘th column according to problem (4). We use W푘−1 to denote the matrix in which the first 푘−1 columns are already known and the constraint in problem (4) becomes w푇 푘w푘= 1, W푇 푘−1w푘= 0. When 푘= 1, W푇 푘−1 can be viewed as an empty matrix and the constraint W푇 푘−1w푘= 0 does not exist. So in the 푘th step, we need to solve the following problem min w푘,푠,푡 푠 푡 s.t. w푇 푘S푖w푘+ 푎푖−푠≤0, ∀푖 푡−w푇 푘( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇w푘−푏푖푗≤0, ∀푖, 푗 푠, 푡> 0 w푇 푘w푘≤1, W푇 푘−1w푘= 0, (12) where 푎푖= tr ( W푇 푘−1S푖W푘−1 ) and 푏푖푗= tr ( W푇 푘−1( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇W푘−1 ) . In the last constraint of problem (12), we relax the constraint on w푘as w푇 푘w푘≤1 to make it convex. The function 푠 푡is not convex with respect to (푠, 푡)푇since the Hessian matrix is not positive semidefinite. So the objective function of problem (12) is non-convex. Moreover, the second constraint in problem (12), which is the difference of two convex functions, is also non-convex. We rewrite the objective function as 푠 푡= (푠+ 1)2 4푡 −(푠−1)2 4푡 , which is also the difference of two convex functions since 푓(푥, 푦) = (푥+푏)2 푦 for 푦> 0 is convex with respect to 푥and 푦according to [3]. Then we can use the constrained concave-convex procedure (CCCP) [24, 18] to optimize problem (12). More specifically, in the (푙+ 1)th iteration of CCCP, we replace the non-convex parts of the objective function and the second constraint with their first-order Taylor expansions at the solution {푠(푙), 푡(푙), w(푙) 푘} in the 푙th iteration and solve the following problem min w푘,푠,푡 (푠+ 1)2 4푡 −푐푠+ 푐2푡 s.t. w푇 푘S푖w푘+ 푎푖−푠≤0, ∀푖 푡−2(w(푙) 푘)푇( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇w푘+ ℎ(푙) 푖푗−푏푖푗≤0, ∀푖, 푗 푠, 푡> 0 w푇 푘w푘≤1, W푇 푘−1w푘= 0, (13) 5 where 푐= 푠(푙)−1 2푡(푙) and ℎ(푙) 푖푗= (w(푙) 푘)푇( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇w(푙) 푘. By putting an upper bound on (푠+1)2 4푡 , i.e., (푠+1)2 4푡 ≤푢, and using the fact that (푠+ 1)2 4푡 ≤푢(푢, 푡> 0) ⇔ 푠+ 1 푢−푡 2 ≤푢+ 푡, where ∥⋅∥2 denotes the 2-norm of a vector, we can reformulate problem (13) into a second-order cone programming (SOCP) problem [12] which is more efficient than SDP: min w푘,푢,푠,푡 푢−푐푠+ 푐2푡 s.t. w푇 푘S푖w푘+ 푎푖−푠≤0, ∀푖 푡−2(w(푙) 푘)푇( ¯m푖−¯m푗)( ¯m푖−¯m푗)푇w푘+ ℎ(푙) 푖푗−푏푖푗≤0, ∀푖, 푗 푠+ 1 푢−푡 2 ≤푢+ 푡with 푢, 푠, 푡> 0 w푇 푘w푘≤1, W푇 푘−1w푘= 0. (14) 2.5 Analysis It is well known that in binary classification problems when both classes are normally distributed with the same covariance matrix, the solution given by conventional LDA is the Bayes optimal solution. We will show here that this property still holds for WLDA. The objective function for WLDA in a binary classification problem is formulated as max w w푇( ¯m1 −¯m2)( ¯m1 −¯m2)푇w max{w푇S1w, w푇S2w} s.t. w ∈ℝ푑, w푇w ≤1. (15) Here, similar to conventional LDA, the reduced dimensionality 푟is set to 1. When the two classes have the same covariance matrix, i.e., S1 = S2, the problem degenerates to the optimization problem of conventional LDA since w푇S1w = w푇S2w for any w and w is the solution of conventional LDA.1 So WLDA also gives the same Bayes optimal solution as conventional LDA. Since the scale of w does not affect the final solution in problem (15), we simplify problem (15) as max w w푇( ¯m1 −¯m2)( ¯m1 −¯m2)푇w s.t. w푇S1w ≤1, w푇S2w ≤1. (16) Since problem (16) is to maximize a convex function, it is not a convex problem. We can still use CCCP to optimize problem (16). In the (푙+ 1)th iteration of CCCP, we need to solve the following problem max w (w(푙))푇( ¯m1 −¯m2)( ¯m1 −¯m2)푇w s.t. w푇S1w ≤1, w푇S2w ≤1. (17) The Lagrangian is given by 퐿= −(w(푙))푇( ¯m1 −¯m2)( ¯m1 −¯m2)푇w + 훼(w푇S1w −1) + 훽(w푇S2w −1), where 훼≥0 and 훽≥0. We calculate the gradients of 퐿with respect to w and set them to 0 to obtain w = (2훼S1 + 2훽S2)−1( ¯m1 −¯m2)( ¯m1 −¯m2)푇w(푙). From this, we can see that when the algorithm converges, the optimal w★satisfies w★∝(2훼★S1 + 2훽★S2)−1( ¯m1 −¯m2). This is similar to the following property of the optimal solution in conventional LDA w★∝S−1 푤( ¯m1 −¯m2) ∝(푛1S1 + 푛2S2)−1( ¯m1 −¯m2). 1The constraint w푇w ≤1 in problem (15) only serves to limit the scale of w. 6 However, in our method, 훼★and 훽★are not fixed but learned from the following dual problem min 훼,훽 훾 4 ( ¯m1 −¯m2)(훼S1 + 훽S2)−1( ¯m1 −¯m2) + 훼+ 훽 s.t. 훼≥0, 훽≥0, (18) where 훾= ( ( ¯m1 −¯m2)푇w(푙))2 . Note that the first term in the objective function of problem (18) is just the scaled optimality criterion of conventional LDA when we assume the within-class scatter matrix S푤to be S푤= 훼S1 + 훽S2. From this view, WLDA seeks to find a linear combination of S1 and S2 as the within-class scatter matrix to maximize the optimality criterion of conventional LDA while controlling the complexity of the within-class scatter matrix as reflected by the second and third terms of the objective function in problem (18). 3 Related Work In [11], Li et al. proposed a maximum margin criterion for dimensionality reduction by changing the optimization problem of conventional LDA to: maxW tr ( W푇(S푏−S푤)W ) . The objective function has a physical meaning similar to that of LDA which favors a large between-class scatter measure and a small within-class scatter measure. However, similar to LDA, the maximum margin criterion also uses the average distances to describe the between-class and within-class scatter measures. Kocsor et al. [10] proposed another maximum margin criterion for dimensionality reduction. The objective function in [10] is identical to that of support vector machine (SVM) and it treats the decision function in SVM as one direction in the transformation matrix W. In [9], Kim et al. proposed a robust LDA algorithm to deal with data uncertainty in classification applications by formulating the problem as a convex problem. However, in many applications, it is not easy to obtain the information about data uncertainty. Moreover, its limitation is that it can only handle binary classification problems but not more general multi-class problems. The orthogonality constraint on the transformation matrix W has been widely used by dimensionality reduction methods, such as Foley-Sammon LDA (FSLDA) [6, 5] and orthogonal LDA [23]. The orthogonality constraint can help to eliminate the redundant information in W. This has been shown to be effective for dimensionality reduction. 4 Experimental Validation In this section, we evaluate WLDA empirically on some benchmark datasets and compare WLDA with several related methods, including conventional LDA, trace-ratio LDA [20], FSLDA [6, 5], and MarginLDA [11]. For fair comparison with conventional LDA, we set the reduced dimensionality of each method compared to 퐶−1 where 퐶is the number of classes in the dataset. After dimensionality reduction, we use a simple nearest-neighbor classifier to perform classification. Our choice of the optimization procedure follows this strategy: when the number of features 푑or the number of training data points 푛is smaller than 100, the optimization method in Section 2.2 or 2.3 is used depending on which one is smaller; otherwise, we use the greedy method in Section 2.4. 4.1 Experiments on UCI Datasets Ten UCI datasets [1] are used in the first set of experiments. For each dataset, we randomly select 70% to form the training set and the rest for the test set. We perform 10 random splits and report in Table 2 the average results across the 10 trials. For each setting, the lowest classification error is shown in bold. We can see that WLDA gives the best result for most datasets. For some datasets, e.g., balance-scale and hayes-roth, even though WLDA is not the best, the difference between it and the best one is very small. Thus it is fair to say that the results obtained demonstrate convincingly the effectiveness of WLDA. 4.2 Experiments on Face and Object Datasets Dimensionality reduction methods have been widely used for face and object recognition applications. Previous research found that face and object images usually lie in a low-dimensional subspace 7 Table 2: Average classification errors on the UCI datasets. Here tr-LDA denotes the trace-ratio LDA [20]. Dataset LDA tr-LDA FSLDA MarginLDA WLDA diabetes 0.3233 0.3143 0.4039 0.4143 0.2996 heart 0.2448 0.2259 0.4395 0.2407 0.2157 liver 0.4001 0.3933 0.4365 0.5058 0.3779 sonar 0.2806 0.2895 0.3694 0.2806 0.2661 spambase 0.1279 0.1301 0.3093 0.1440 0.1260 balance-scale 0.1193 0.1198 0.1176 0.1150 0.1174 iris 0.0244 0.0267 0.0622 0.0644 0.0211 hayes-roth 0.3125 0.3104 0.3104 0.2958 0.3050 waveform 0.1861 0.1865 0.2261 0.2303 0.1671 mfeat-factors 0.0732 0.0518 0.0868 0.0817 0.0250 of the ambient image space. Fisherface (based on LDA) [2] is one representative dimensionality reduction method. We use three face databases, ORL [2], PIE [17] and AR [13], and one object database, COIL [15], in our experiments. In the AR face database, 2,600 images of 100 persons (50 men and 50 women) are used. Before the experiment, each image is converted to gray scale and normalized to a size of 33 × 24 pixels. The ORL face database contains 400 face images of 40 persons, each having 10 images. Each image is preprocessed to a size of 28 × 23 pixels. In our experiment, we choose the frontal pose from the PIE database with varying lighting and illumination conditions. There are about 49 images for each subject. Before the experiment, we resize each image to a resolution of 32 × 32 pixels. The COIL database contains 1,440 grayscale images with black background for 20 objects with each object having 72 different images. In face and object recognition applications, the size of the training set is usually not very large since labeling data is very laborious and costly. To simulate this realistic situation, we randomly choose 4 images of a person or object in the database to form the training set and the remaining images to form the test set. We perform 10 random splits and report the average classification error rates across the 10 trials in Table 3. From the result, we can see that WLDA is comparable to or even better than the other methods compared. Table 3: Average classification errors on the face and object datasets. Here tr-LDA denotes the trace-ratio LDA [20]. Dataset LDA tr-LDA FSLDA MarginLDA WLDA ORL 0.1529 0.1042 0.0654 0.0536 0.0446 PIE 0.4305 0.2527 0.6715 0.2936 0.2469 AR 0.2498 0.1919 0.7726 0.4282 0.1965 COIL 0.2554 0.1737 0.1726 0.1653 0.1593 5 Conclusion In this paper, we have presented a new supervised dimensionality reduction method by exploiting the worst-case view instead of average-case view in the formulation. One interesting direction of our future work is to extend WLDA to handle tensors for 2D or higher-order data. Moreover, we will investigate the semi-supervised extension of WLDA to exploit the useful information contained in the unlabeled data available in some applications. Acknowledgement This research has been supported by General Research Fund 621407 from the Research Grants Council of Hong Kong. 8 References [1] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. [2] P. N. Belhumeur, J. P. Hespanha, and D. J. Kriegman. Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(7):711– 720, 1997. [3] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, New York, NY, 2004. [4] J. V. Davis, B. Kulis, P. Jain, S. Sra, and I. S. Dhillon. Information-theoretic metric learning. In Proceedings of the Twenty-Fourth International Conference on Machine Learning, pages 209–216, Corvalis, Oregon, USA, 2007. [5] J. Duchene and S. Leclercq. An optimal transformation for discriminant and principal component analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 10(6):978–983, 1988. [6] D. H. Foley and J. W. Sammon. An optimal set of discriminant vectors. IEEE Transactions on Computers, 24(3):281–289, 1975. [7] K Fukunnaga. Introduction to Statistical Pattern Recognition. Academic Press, New York, 1991. [8] I. T. Jolliffe. Principal Component Analysis. Springer-Verlag, New York, 2nd edition, 2002. [9] S.-J. Kim, A. Magnani, and S. Boyd. Robust Fisher discriminant analysis. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 659–666. Vancouver, British Columbia, Canada, 2006. [10] A. Kocsor, K. Kov´acs, and C. Szepesv´ari. Margin maximizing discriminant analysis. In Proceedings of the 15th European Conference on Machine Learning, pages 227–238, Pisa, Italy, 2004. [11] H. Li, T. Jiang, and K. Zhang. Efficient and robust feature extraction by maximum margin criterion. In S. Thrun, L. K. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems 16, Vancouver, British Columbia, Canada, 2003. [12] M. S. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret. Applications of second-order cone programming. Linear Algebra and its Applications, 284:193–228, 1998. [13] A. M. Mart´ınez and R. Benavente. The AR-face database. Technical Report 24, CVC, 1998. [14] S. Mika, G. R¨atsch, J. Weston, B. Sch¨olkopf, A. J. Smola, and K.-R. M¨uller. Constructing descriptive and discriminative nonlinear features: Rayleigh coefficients in kernel feature spaces. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(5):623–633, 2003. [15] S. A. Nene, S. K. Nayar, and H. Murase. Columbia object image library (COIL-20). Technical Report 005, CUCS, 1996. [16] M. L. Overton and R. S. Womersley. Optimality conditions and duality theory for minimizing sums of the largest eigenvalues of symmetric matrices. Math Programming, 62(2):321–357, 1993. [17] T. Sim, S. Baker, and M. Bsat. The CMU pose, illumination and expression database. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(12):1615–1618, 2003. [18] A. J. Smola, S. V. N. Vishwanathan, and T. Hofmann. Kernel methods for missing variables. In Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics, Barbados, 2005. [19] L. Vandenberghe and S. Boyd. Semidefinite prgramming. SIAM Review, 38(1):49–95, 1996. [20] H. Wang, S. Yan, D. Xu, X. Tang, and T. Huang. Trace ratio vs. ratio trace for dimensionality reduction. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 1–8, Minneapolis, Minnesota, USA, 2007. [21] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 1473–1480, Vancouver, British Columbia, Canada, 2005. [22] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. J. Russell. Distance metric learning with application to clustering with side-information. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 505–512, Vancouver, British Columbia, Canada, 2002. [23] J.-P. Ye and T. Xiong. Computational and theoretical analysis of null space and orthogonal linear discriminant analysis. Journal of Machine Learning Research, 7:1183–1204, 2006. [24] A. Yuille and A. Rangarajan. The concave-convex procedure. Neural Computation, 15(4):915–936, 2003. 9
2010
104
3,860
Learning Multiple Tasks with a Sparse Matrix-Normal Penalty Yi Zhang Machine Learning Department Carnegie Mellon University yizhang1@cs.cmu.edu Jeff Schneider The Robotics Institute Carnegie Mellon University schneide@cs.cmu.edu Abstract In this paper, we propose a matrix-variate normal penalty with sparse inverse covariances to couple multiple tasks. Learning multiple (parametric) models can be viewed as estimating a matrix of parameters, where rows and columns of the matrix correspond to tasks and features, respectively. Following the matrix-variate normal density, we design a penalty that decomposes the full covariance of matrix elements into the Kronecker product of row covariance and column covariance, which characterizes both task relatedness and feature representation. Several recently proposed methods are variants of the special cases of this formulation. To address the overfitting issue and select meaningful task and feature structures, we include sparse covariance selection into our matrix-normal regularization via ℓ1 penalties on task and feature inverse covariances. We empirically study the proposed method and compare with related models in two real-world problems: detecting landmines in multiple fields and recognizing faces between different subjects. Experimental results show that the proposed framework provides an effective and flexible way to model various different structures of multiple tasks. 1 Introduction Learning multiple tasks has been studied for more than a decade [6, 24, 11]. Research in the following two directions has drawn considerable interest: learning a common feature representation shared by tasks [1, 12, 30, 2, 3, 9, 23], and directly inferring the relatedness of tasks [4, 26, 21, 29]. Both have a natural interpretation if we view learning multiple tasks as estimating a matrix of model parameters, where the rows and columns correspond to tasks and features. From this perspective, learning the feature structure corresponds to discovering the structure of the columns in the parameter matrix, and modeling the task relatedness aims to find and utilize the relations among rows. Regularization methods have shown promising results in finding either feature or task structure [1, 2, 12, 21]. In this paper we propose a new regularization approach and show how several previous approaches are variants of special cases of it. The key contribution is a matrix-normal penalty with sparse inverse covariances, which provides a framework for characterizing and coupling the model parameters of related tasks. Following the matrix normal density, we design a penalty that decomposes the full covariance of matrix elements into the Kronecker product of row and column covariances, which correspond to task and feature structures in multi-task learning. To address overfitting and select task and feature structures, we incorporate sparse covariance selection techniques into our matrix-normal regularization framework via ℓ1 penalties on task and feature inverse covariances. We compare the proposed method to related models on two real-world data sets: detecting landmines in multiple fields and recognizing faces between different subjects. 1 2 Related Work Multi-task learning has been an active research area for more than a decade [6, 24, 11]. For joint learning of multiple tasks, connections need to be established to couple related tasks. One direction is to find a common feature structure shared by tasks. Along this direction, researchers proposed to infer task structure via principal components [1, 12], independent components [30] and covariance [2, 3] in the parameter space, to select a common subset of features [9, 23], as well as to use shared hidden nodes in neural networks [6, 11]. Specifically, learning a shared feature covariance for model parameters [2] is a special case of our proposed framework. On the other hand, assuming models of all tasks are equally similar is risky. Researchers recently began exploring methods to infer the relatedness of tasks. These efforts include using mixtures of Gaussians [4] or Dirichlet processes [26] to model task groups, encouraging clustering of tasks via a convex regularization penalty [21], identifying “outlier” tasks by robust t-processes [29], and inferring task similarity from task-specific features [8, 27, 28]. The present paper uses the matrix normal density and ℓ1-regularized sparse covariance selection to specify a structured penalty, which provides a systematic way to characterize and select both task and feature structures in multiple parametric models. Matrix normal distributions have been studied in probability and statistics for several decades [13, 16, 18] and applied to predictive modeling in the Bayesian literature. For example, the standard matrix normal can serve as a prior for Bayesian variable selection in multivariate regression [9], where MCMC is used for sampling from the resulting posterior. Recently, matrix normal distributions have also been used in nonparametric Bayesian approaches, especially in learning Gaussian Processes (GPs) for multi-output prediction [7] and collaborative filtering [27, 28]. In this case, the covariance function of the GP prior is decomposed as the Kronecker product of a covariance over functions and a covariance over examples. We note that the proposed matrix-normal penalty with sparse inverse covariances in this paper can also be viewed as a new matrix-variate prior, upon which Bayesian inference can be performed. We will pursue this direction in our future work. 3 Matrix-Variate Normal Distributions 3.1 Definition The matrix-variate normal distribution is one of the most widely studied matrix-variate distributions [18, 13, 16]. Consider an m × p matrix W. Since we can vectorize W to be a mp × 1 vector, the normal distribution on a matrix W can be considered as a multivariate normal distribution on a vector of mp dimensions. However, such an ordinary multivariate distribution ignores the special structure of W as an m × p matrix, and as a result, the covariance characterizing the elements of W is of size mp × mp. This size is usually prohibitive for modeling and estimation. To utilize the structure of W, matrix normal distributions assume that the mp×mp covariance can be decomposed as the Kronecker product Σ ⊗Ω, and elements of W follow: V ec(W) ∼N(V ec(M), Σ ⊗Ω) (1) where Ωis an m × m positive definite matrix indicating the covariance between rows of W, Σ is a p × p positive definite matrix indicating the covariance between columns of W, Σ ⊗Ωis the Kronecker product of Σ and Ω, M is a m × p matrix containing the expectation of each element of W, and V ec is the vectorization operation which maps a m × p matrix into a mp × 1 vector. Due to the decomposition of covariance as the Kronecker product, the matrix-variate normal distribution of an m × p matrix W, parameterized by the mean M, row covariance Ωand column covariance Σ, has a compact log-density [18]: log P(W) = −mp 2 log(2π) −p 2 log(|Ω|) −m 2 log(|Σ|) −1 2tr{Ω−1(W −M)Σ−1(W −M)T } (2) where | | is the determinant of a square matrix, and tr{} is the trace of a square matrix. 3.2 Maximum likelihood estimation (MLE) Consider a set of n samples {Wi}n i=1 where each Wi is a m×p matrix generated by a matrix-variate normal distribution as eq. (2). The maximum likelihood estimation (MLE) of mean M is [16]: ˆ M = 1 n n X i=1 Wi (3) 2 The MLE estimators of Ωand Σ are solutions to the following system: n ˆΩ = 1 np Pn i=1(Wi −ˆM) ˆΣ−1(Wi −ˆM)T ˆΣ = 1 nm Pn i=1(Wi −ˆM)T ˆΩ−1(Wi −ˆ M) (4) It is efficient to iteratively solve (4) until convergence, known as the “flip-flop” algorithm [16]. Also, ˆΩand ˆΣ are not identifiable and solutions for maximizing the log density in eq. (2) are not unique. If (Ω∗, Σ∗) is an MLE estimate for the row and column covariances, for any α > 0, (αΩ∗, 1 αΣ∗) will lead to the same log density and thus is also an MLE estimate. This can be seen from the definition in eq. (1), where only the Kronecker product Σ ⊗Ωis identifiable. 4 Learning Multiple Tasks with a Sparse Matrix-Normal Penalty Regularization is a principled way to control model complexity [20]. Classical regularization penalties (for single-task learning) can be interpreted as assuming a multivariate prior distribution on the parameter vector and performing maximum-a-posterior estimation, e.g., ℓ2 penalty and ℓ1 penalty correspond to multivariate Gaussian and Laplacian priors, respectively. For multi-task learning, it is natural to use matrix-variate priors to design regularization penalties. In this section, we propose a matrix-normal penalty with sparse inverse covariances for learning multiple related tasks. In Section 4.1 we start with learning multiple tasks with a matrix-normal penalty. In Section 4.2 we study how to incorporate sparse covariance selection into our framework by further imposing ℓ1 penalties on task and feature inverse covariances. In Section 4.3 we outline the algorithm, and in Section 4.4 we discuss other useful constraints in our framework. 4.1 Learning with a Matrix Normal Penalty Consider a multi-task learning problem with m tasks in a p-dimensional feature space. The training sets are {Dt}m t=1, where each set Dt contains nt examples {(x(t) i , y(t) i )}nt i=1. We want to learn m models for the m tasks but appropriately share knowledge among tasks. Model parameters are represented by an m × p matrix W, where parameters for a task correspond to a row. The last term in the matrix-variate normal density (2) provides a structure to couple the parameters of multiple tasks as a matrix W: 1) we set M = 0, indicating a preference for simple models; 2) the m × m row covariance Ωdescribes the similarity among tasks; 3) the p × p column covariance matrix Σ represents a shared feature structure. This yields the following total loss L to optimize: L = m X t=1 nt X i=1 L(y(t) i , x(t) i , W(t, :)) + λ tr{Ω−1WΣ−1WT } (5) where λ controls the strength of the regularization, (y(t) i , x(t) i ) is the ith example in the training set of the tth task, W(t, :) is the parameter vector of the tth task, and L() is a convex empirical loss function depending on the specific model we use, e.g., squared loss for linear regression, loglikelihood loss for logistic regression, hinge loss for SVMs, and so forth. When Ωand Σ are known and positive definite, eq. (5) is convex w.r.t. W and thus W can be optimized efficiently [22]. Now we discuss a few special cases of (5) and how is previous work related to them. When we fix Ω= Im and Σ = Ip, the penalty term can be decomposed into standard ℓ2-norm penalties on the m rows of W. In this case, the m tasks in (5) can be learned almost independently using single-task ℓ2 regularization (but tasks are still tied by sharing the parameter λ). When we fix Ω= Im, tasks are linked only by a shared feature covariance Σ. This corresponds to a multi-task feature learning framework [2, 3] which optimizes eq. (5) w.r.t. W and Σ, with an additional constraint tr{Σ} ≤1 on the trace of Σ to avoid setting Σ to infinity. When we fix Σ = Ip, tasks are coupled only by a task similarity matrix Ω. This is used in a recent clustered multi-task learning formulation [21], which optimizes eq. (5) w.r.t. W and Ω, with additional constraints on the singular values of Ωthat are motivated and derived from task clustering. A more recent multi-label classification model [19] essentially optimizes W in eq. (5) with a label correlation Ωgiven as prior knowledge and empirical loss L as the max-margin hinge loss. 3 We usually do not know task and feature structures in advance. Therefore, we would like to infer Ω and Σ in eq. (5). Note that if we jointly optimize W, Ωand Σ in eq. (5), we will always set Ωand Σ to be infinity matrices. We can impose constraints on Ωand Σ to avoid this, but a more natural way is to further expand eq. (5) to include all relevant terms w.r.t. Ωand Σ from the matrix normal log-density (2). As a result, the total loss L is: L = m X t=1 nt X i=1 L(y(t) i , x(t) i , W(t, :)) + λ [p log |Ω| + m log |Σ| + tr{Ω−1WΣ−1WT }] (6) Based on this formula, we can infer task structure Ωand feature structure Σ given the model parameters W, as the following problem: min Ω,Σ p log |Ω| + m log |Σ| + tr{Ω−1WΣ−1WT } (7) This problem is equivalent to maximizing the log-likelihood of a matrix normal distribution as in eq. (2), given W as observations and expectation M fixed at 0. Following Section 3.2, the MLE of Ωand Σ can be obtained by the “flip-flop” algorithm: n ˆΩ = 1 pW ˆΣ−1WT + ǫIm ˆΣ = 1 mWT ˆΩ−1W + ǫIp (8) where ǫ is a small positive constant to improve numerical stability. As discussed in Section 3.2, only Σ ⊗Ωis uniquely defined, and ˆΩand ˆΣ are only identifiable up to an multiplicative constant. This will not affect the optimization of W using eq. (5), since only Σ ⊗Ωmatters for this purpose. 4.2 Sparse Covariance Selection in the Matrix-Normal Penalty Consider the sparsity of Ω−1 and Σ−1. When Ωhas a sparse inverse, task pairs corresponding to zero entries in Ω−1 will not be explicitly coupled in the penalty of (6). Similarly, a zero entry in Σ−1 indicates no direct interaction between the two corresponding features in the penalty. Also, note that a clustering of tasks can be expressed by block-wise sparsity of Ω−1. Covariance selection aims to select nonzero entries in the Gaussian inverse covariance and discover conditional independence between variables (indicated by zero entries in the inverse covariance) [14, 5, 17, 15]. The matrix-normal density in eq. (6) enables us to perform sparse covariance selection to regularize and select task and feature structures. Formally, we rewrite (6) to include two additional ℓ1 penalty terms on the inverse covariances: L = m X t=1 nt X i=1 L(y(t) i , x(t) i , W(t, :)) + λ[p log |Ω| + m log |Σ| + tr{Ω−1WΣ−1WT }] + λΩ||Ω−1||ℓ1 + λΣ||Σ−1||ℓ1 (9) where || ||ℓ1 is the ℓ1-norm of a matrix, and λΩand λΣ control the strength of ℓ1 penalties and therefore the sparsity of task and feature structures. Based on the new regularization formula (9), estimating W given Ωand Σ as in (5) is not affected, while inferring Ωand Σ given W, previously shown as (7), becomes a new problem: min Ω,Σ p log |Ω| + m log |Σ| + tr{Ω−1WΣ−1WT } + λΩ λ ||Ω−1||ℓ1 + λΣ λ ||Σ−1||ℓ1 (10) As in (8), we can iteratively optimize Ωand Σ until convergence, as follows: n ˆΩ = argminΩp log |Ω| + tr{Ω−1(WΣ−1WT )} + λΩ λ ||Ω−1||ℓ1 ˆΣ = argminΣ m log |Σ| + tr{Σ−1(WT ˆΩ−1W)} + λΣ λ ||Σ−1||ℓ1 (11) Note that both equations in (11) are ℓ1 regularized covariance selection problems, for which efficient optimization has been intensively studied [5, 17, 15]. For example, we can use graphical lasso [17] as a basic solver and consider (11) as an ℓ1 regularized “flip-flop” algorithm: n ˆΩ = glasso( 1 pW ˆΣ−1WT , λΩ λ ) ˆΣ = glasso( 1 mWT ˆΩ−1W, λΣ λ ) 4 Finally, an annoying part of eq. (9) is the presence of two additional regularization parameters λΩ and λΣ. Due to the property of matrix normal distributions that only Σ ⊗Ωis identifiable, we can safely reduce the complexity of choosing regularization parameters by considering the restriction: λΩ= λΣ (12) The following lemma proves that restricting λΩand λΣ to be equal in eq. (9) will not reduce the space of optimal models W we can obtain. As a result, we eliminate one regularization parameter. Lemma 1. Suppose W∗belongs to a minimizer (W∗, Ω∗, Σ∗) for eq. (9) with some arbitrary choice of λ, λΩand λΣ > 0. Then, W∗must also belong to a minimizer for eq. (9) with certain choice of λ′, λ′ Ωand λ′ Σ such that λ′ Ω= λ′ Σ. Proof of lemma 1 is provided in Appendix A. 4.3 The Algorithm Based on the regularization formula (9), we study the following algorithm to learning multiple tasks: 1) Estimate W by solving (5), using Ω= Im and Σ = Ip; 2) Infer Ωand Σ in (9) (by solving (11) until convergence), using the estimated W from step 1); 3) Estimate W by solving (5), using the inferred Ωand Σ from step 2). One can safely iterate over steps 2) and 3) and convergence to a local minimum of eq. (9) is guaranteed. However, we observed that a single pass yields good results1. Steps 1) and 3) are linear in the number of data points and step 2) is independent of it, so the method scales well with the number of samples. Step 2) needs to solve ℓ1 regularized covariance selection problems as (11). We use the state of the art technique [17], but more efficient optimization for large covariances is still desirable. 4.4 Additional Constraints We can have additional structure assumptions in the matrix-normal penalty. For example, consider: Ωii = 1 i = 1, 2, . . . , m (13) Σjj = 1 j = 1, 2, . . ., p (14) In this case, we ignore variances and restrict our attention to correlation structures. For example, off-diagonal entries of task covariance Ωcharacterize the task similarity; diagonal entries indicate different amounts of regularization on tasks, which may be fixed as a constant if we prefer tasks to be equally regularized. Similar arguments apply to feature covariance Σ. We include these restrictions by converting inferred covariance(s) into correlation(s) in step 2) of the algorithm in Section 4.3. In other words, the restrictions are enforced by a projection step. If one wants to iterative over steps 2) and 3) of the algorithm in Section 4.3 until convergence, we may consider the constraints Ωii = c1 i = 1, 2, . . . , m (15) Σjj = c2 j = 1, 2, . . . , p (16) with unknown quantities c1 and c2, and consider eq. (9) in step 2) as a constrained optimization problem w.r.t. W, Ω, Σ, c1 and c2, instead of using a projection step. As a result, the “flip-flop” algorithm in (11) needs to solve ℓ1 penalized covariance selection with equality constraints (15) or (16), where the dual block coordinate descent [5] and graphical lasso [17] are no longer directly applicable. In this case, one can solve the two steps of (11) as determinant maximization problems with linear constraints [25], but this is inefficient. We will study this direction (efficient constrained sparse covariance selection) in the future work. 5 Empirical Studies In this section, we present our empirical studies on a landmine detection problem and a face recognition problem, where multiple tasks correspond to detecting landmines at different landmine fields and classifying faces between different subjects, respectively. 1Further iterations over step 2) and 3) will not dramatically change model estimation. Also, early stopping as regularization might also lead to better generalizability. 5 5.1 Data Sets and Experimental Settings The landmine detection data set from [26] contains examples collected from different landmine fields. Each example in the data set is represented by a 9-dimensional feature vector extracted from radar imaging, which includes moment-based features, correlation-based features, an energy ratio feature and a spatial variance feature. As a binary classification problem, the goal is to predict landmines (positive class) or clutter (negative class). Following [26], we jointly learn 19 tasks from landmine fields 1−10 and 19−24 in the data set. As a result, the model parameters W are a 19×10 matrix, corresponding to 19 tasks and 10 coefficients (including the intercept) for each task. The distribution of examples is imbalanced in each task, with a few dozen positive examples and several hundred negative examples. Therefore, we use the average AUC (Area Under the ROC Curve) over 19 tasks as the performance measure. We vary the size of the training set for each task as 30, 40, 80 and 160. Note that we intentionally keep the training sets small because the need for cross-task learning diminishes as the training set becomes large relative to the number of parameters being learned. For each training set size, we randomly select training examples for each task and the rest is used as the testing set. This is repeated 30 times. Task-average AUC scores are collected over 30 runs, and mean and standard errors are reported. Note that for small training sizes (e.g., 30 per task) we often have some task(s) that do not have any positive training sample. It is interesting to see how well multi-task learning handles this case. The face recognition data set is the Yale face database, which contains 165 images of 15 subjects. The 11 images per subject correspond to different configurations in terms of expression, emotion, illumination, and wearing glasses (or not), etc. Each image is scaled to 32 × 32 pixels. We use the first 8 subjects to construct 8×7 2 = 28 binary classification tasks, each to classify two subjects. We vary the size of the training set as 3, 5 and 7 images per subject. We have 30 random runs for each training size. In each run, we randomly select the training set and use the rest as the testing set. We collect task-average classification errors over 30 runs, and report mean and standard errors. Choice of features is important for face recognition problems. In our experiments, we use orthogonal Laplacianfaces [10], which have been shown to provide better discriminative power than Eigenfaces (PCA), fisherfaces (LDA) and Laplacianfaces on several benchmark data sets. In each random run, we extract 30 orthogonalLaplacianfaces using the selected training set of all 8 subjects2, and conduct experiments of all 28 classification tasks in the extracted feature space. 5.2 Models and Implementation Details We use the logistic regression loss as the empirical loss L in (9). We compare the following models. STL: learn ℓ2 regularized logistic regression for each task separately. MTL-C: clustered multi-task learning [21], which encourages task clustering in regularization. As discussed in Section 4.1, this is related to eq. (5) with only a task structure Ω. MTL-F: multi-task feature learning [2], which corresponds to fixing the task covariance Ωas Im and optimizing (6) with only the feature covariance Σ. In addition, we also study various different configurations of the proposed framework: MTL(Im&Ip): learn W using (9) with Ωand Σ fixed as identity matrices Im and Ip. MTL(Ω&Ip): learn W and task covariance Ωusing (9), with feature covariance Σ fixed as Ip. MTL(Im&Σ): learn W and feature covariance Σ using (9), with task covariance Ωfixed as Im. MTL(Ω&Σ): learn W, Ωand Σ using (9), inferring both task and feature structures. MTL(Ω&Σ)Ωii=Σjj=1: learn W, Ωand Σ using (9), with restricted Ωand Σ as (13) and (14). MTL(Ω&Σ)Ωii=1: learn W, Ωand Σ using (9), with restricted Ωas (13) and free Σ. Intuitively, free diagonal entries in Σ are useful when features are of different importance, e.g, components extracted as orthogonal Laplacianfaces usually capture decreasing amounts of information [10]. We use conjugate gradients [22] to optimize W in (5), and infer Ωand Σ in (11) using graphical lasso [17] as the basic solver. Regularization parameters λ and λΩ= λΣ are chosen by 3-fold cross 2For experiments with 3 images per subject, we can only extract 23 Laplacianfaces, which is limited by the size of training examples (3 × 8 = 24) [10]. 6 Avg AUC Score 30 samples 40 samples 80 samples 160 samples STL 64.85(0.52) 67.62(0.64) 71.86(0.38) 76.22(0.25) MTL-C [21] 67.09(0.44) 68.95(0.40) 72.89(0.31) 76.64(0.17) MTL-F [2] 72.39(0.79) 74.75(0.63) 77.12(0.18) 78.13(0.12) MTL(Im&Ip) 66.10(0.65) 69.91(0.40) 73.34(0.28) 76.17(0.22) MTL(Ω&Ip) 74.88(0.29) 75.83(0.28) 76.93(0.15) 77.95(0.17) MTL(Im&Σ) 72.71(0.65) 74.98(0.32) 77.35(0.14) 78.13(0.14) MTL(Ω&Σ) 75.10(0.27) 76.16(0.15) 77.32(0.24) 78.21(0.17)∗ MTL(Ω&Σ)Ωii=Σjj=1 75.31(0.26)∗ 76.64(0.13)∗ 77.56(0.16)∗ 78.01(0.12) MTL(Ω&Σ)Ωii=1 75.19(0.22) 76.25(0.14) 77.22(0.15) 78.03(0.15) Table 1: Average AUC scores (%) on landmine detection: means (and standard errors) over 30 random runs. For each column, the best model is marked with ∗and competitive models (by paired t-tests) are shown in bold. validation within the range [10−7, 103]. The model in [21] uses 4 regularization parameters, and we consider 3 values for each parameter, leading to 34 = 64 combinations chosen by cross validation. 5.3 Results on Landmine Detection The results on landmine detection are shown in Table 1. Each row of the table corresponds to a model in our experiments. Each column is a training sample size. We have 30 random runs for each sample size. We use task-average AUC score as the performance measure and report the mean and standard error of this measure over 30 random runs. The best model is marked with ∗, and models displayed in bold fonts are statistically competitive models (i.e. not significantly inferior to the best model in a one-sided paired t-test with α = 0.05). Overall speaking, MTL(Ω&Σ) and MTL(Ω&Σ)Ωii=Σjj=1 lead to the best prediction performance. For small training sizes, restricted Ωand Σ (Ωii = Σjj = 1) offer better prediction; for large training size (160 per task), free Ωand Σ give the best performance. The best model performs better than MTL-F [2] and much better than MTL-C [21] with small training sets. MTL(Im&Ip) performs better than STL, i.e., even the simplest coupling among tasks (by sharing λ) can be helpful when the size of training data is small. Consider the performance of MTL(Ω&Ip) and MTL(Im&Σ), which learn either a task structure or a feature structure. When the size of training samples is small (i.e., 30 or 40), coupling by task similarity is more effective, and as the training size increases, learning a common feature representation is more helpful. Finally, consider MTL(Ω&Σ), MTL(Ω&Σ)Ωii=Σjj=1 and MTL(Ω&Σ)Ωii=1. MTL(Ω&Σ)Ωii=Σjj=1 imposes a strong restriction and leads to better performance when the training size is small. MTL(Ω&Σ) is more flexible and performs well given large numbers of training samples. MTL(Ω&Σ)Ωii=1 performs similarly to MTL(Ω&Σ)Ωii=Σjj=1, indicating no significant variation of feature importance in this problem. 5.4 Results on Face Recognition Empirical results on face recognition are shown in Table 2, with the best model in each column marked with ∗and competitive models displayed in bold. MTL-C [21] performs even worse than STL. One possible explanation is that, since tasks are to classify faces between different subjects, there may not be a clustered structure over tasks and thus a cluster norm will be inappropriate. In this case, using a task similarity matrix may be more appropriate than clustering over tasks. In addition, MTL(Ω&Σ)Ωii=1 shows advantages over other models, especially if given relatively sufficient training data (5 or 7 per subject). Compared to MTL(Ω&Σ), MTL(Ω&Σ)Ωii=1 imposes restrictions on diagonal entries of task covariance Ω: all tasks seem to be similarly difficult and should be equally regularized. Compared to MTL(Ω&Σ)Ωii=Σjj=1, MTL(Ω&Σ)Ωii=1 allows the diagonal entries of feature covariance Σ to capture varying degrees of importance of Laplacianfaces. 7 Avg Classification Errors 3 samples per class 5 samples per class 7 samples per class STL 10.97(0.46) 7.62(0.30) 4.75(0.35) MTL-C [21] 11.09(0.49) 7.87(0.34) 5.33(0.34) MTL-F [2] 10.78(0.60) 6.86(0.27) 4.20(0.31) MTL(Im&Ip) 10.88(0.48) 7.51(0.28) 5.00(0.35) MTL(Ω&Ip) 9.98(0.55) 6.68(0.30) 4.12(0.38) MTL(Im&Σ) 9.87(0.59) 6.25(0.27) 4.06(0.34) MTL(Ω&Σ) 9.81(0.49) 6.23(0.29) 4.11(0.36) MTL(Ω&Σ)Ωii=Σjj=1 9.67(0.57)∗ 6.21(0.28) 4.02(0.32) MTL(Ω&Σ)Ωii=1 9.67(0.51)∗ 5.98(0.29)∗ 3.53(0.34)∗ Table 2: Average classification errors (%) on face recognition: means (and standard errors) over 30 random runs. For each column, the best model is marked with ∗and competitive models (by paired t-tests) are shown in bold. 6 Conclusion We propose a matrix-variate normal penalty with sparse inverse covariances to couple multiple tasks. The proposed framework provides an effective and flexible way to characterize and select both task and feature structures for learning multiple tasks. Several recently proposed methods can be viewed as variants of the special cases of our formulation and our empirical results on landmine detection and face recognition show that we consistently outperform previous methods. Acknowledgement: this work was funded in part by the National Science Foundation under grant NSF-IIS0911032 and the Department of Energy under grant DESC0002607. Appendix A Proof of Lemma 1. We prove lemma 1 by construction. Given an arbitrary choice of λ, λΩand λΣ > 0 in eq. (9) and an optimal solution (W∗, Ω∗, Σ∗), we want to prove that W∗also belongs to an optimal solution for eq. (9) with certain λ′, λ′ Ωand λ′ Σ s.t. λ′ Ω= λ′ Σ. Let’s construct λ′, λ′ Ωand λ′ Σ as follows: (λ′, λ′ Ω, λ′ Σ) = (λ, p λΩλΣ, p λΩλΣ) (17) We denote the objective function in eq. (9) with λ, λΩand λΣ as Objλ,λΩ,λΣ(W, Ω, Σ). Also, we denote the objective function with our constructed parameters λ′, λ′ Ωand λ′ Σ as Objλ′,λ′ Ω,λ′ Σ(W, Ω, Σ). For any (W, Ω, Σ), we further construct an invertible (i.e., one-to-one) transform as follows: (W′, Ω′, Σ′) = (W, r λΣ λΩ Ω, r λΩ λΣ Σ) (18) The key step in our proof is that, by construction, the following equality always holds: Objλ,λΩ,λΣ(W, Ω, Σ) = Objλ′,λ′ Ω,λ′ Σ(W′, Ω′, Σ′) (19) To see this, notice that eq. (9) consists of three parts. The first part is the empirical loss on training examples, depending only on W (and training data). The second part is the log-density of matrix normal distributions, which depends on W and Σ⊗Ω. The third part is the sum of two ℓ1 penalties. The equality in eq. (19) stems from the fact that all three parts of eq. (9) are not changed: 1) W′ = W so the first part remains unchanged; 2) Σ′ ⊗Ω′ = Σ⊗Ωso the second part of the matrix normal log-density is the same; 3) by our construction, the third part is not changed. Based on this equality, if (W∗, Ω∗, Σ∗) minimizes Objλ,λΩ,λΣ(), we have that (W∗, q λΣ λΩΩ∗, q λΩ λΣ Σ∗) minimizes Objλ′,λ′ Ω,λ′ Σ(), where λ′ = λ and λ′ Ω= λ′ Σ = √λΩλΣ. 8 References [1] R. K. Ando and T. Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6:1817–1853, 2005. [2] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. In NIPS, 2006. [3] A. Argyriou, C. A. Micchelli, M. Pontil, and Y. Ying. A spectral regularization framework for multi-task structure learning. In NIPS, 2007. [4] B. Bakker and T. Heskes. Task clustering and gating for bayesian multitask learning. Journal of Machine Learning Research, 4:83–99, 2003. [5] O. Banerjee, L. E. Ghaoui, and A. d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. J. Mach. Learn. Res., 9:485–516, 2008. [6] J. Baxter. Learning Internal Representations. In COLT, pages 311–320, 1995. [7] E. Bonilla, K. M. Chai, and C. Williams. Multi-task gaussian process prediction. In J. Platt, D. Koller, Y. Singer, and S. Roweis, editors, NIPS, pages 153–160. 2008. [8] E. V. Bonilla, F. V. Agakov, and C. K. I. Williams. Kernel multi-task learning using task-specific features. In AISTATS, 2007. [9] P. J. Brown and M. Vannucci. Multivariate Bayesian Variable Selection and Prediction. Journal of the Royal Statistical Soceity, Series B, 60(3):627–641, 1998. [10] D. Cai, X. He, J. Han, and H. Zhang. Orthogonal laplacianfaces for face recognition. IEEE Transactions on Image Processing, 15(11):3608–3614, 2006. [11] R. Caruana. Multitask Learning. Machine Learning, 28:41–75, 1997. [12] J. Chen, L. Tang, J. Liu, and J. Ye. A Convex Formulation for Learning Shared Structures from Multiple Tasks. In ICML, 2009. [13] A. P. Dawid. Some matrix-variate distribution theory: Notational considerations and a bayesian application. Biometrika, 68(1):265–274, 1981. [14] A. P. Dempster. Covariance selection. Biometrics, 1972. [15] J. Duchi, S. Gould, and D. Koller. Projected subgradient methods for learning sparse gaussians. In Proceedings of the Twenty-fourth Conference on Uncertainty in AI (UAI), 2008. [16] P. Dutilleul. The MLE Algorithm for the Matrix Normal Distribution. J. Statist. Comput. Simul., 64:105– 123, 1999. [17] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 2007. [18] A. K. Gupta and D. K. Nagar. Matrix Variate Distributions. Chapman Hall, 1999. [19] B. Hariharan, S. Vishwanathan, and M. Varma. Large scale max-margin multi-label classification with priors. In ICML, 2010. [20] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, 2001. [21] L. Jacob, F. Bach, and J. P. Vert. Clustered multi-task learning: A convex formulation. In NIPS, pages 745–752, 2008. [22] J. Nocedal and S. Wright. Numerical Optimization. Springer, 2000. [23] G. Obozinski, B. Taskar, and M. I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing, 2009. [24] S. Thrun and J. O’Sullivan. Discovering Structure in Multiple Learning Tasks: The TC Algorithm. In ICML, pages 489–497, 1996. [25] L. Vandenberghe, S. Boyd, and S.-P. Wu. Determinant maximization with linear matrix inequality constraints. SIAM Journal on Matrix Analysis and Applications, 19:499–533, 1996. [26] Y. Xue, X. Liao, L. Carin, and B. Krishnapuram. Multi-task learning for classification with dirichlet process priors. Journal of Machine Learning Research, 8:35–63, 2007. [27] K. Yu, W. Chu, S. Yu, V. Tresp, and Z. Xu. Stochastic relational models for discriminative link prediction. In NIPS, pages 1553–1560, 2007. [28] K. Yu, J. Lafferty, S. Zhu, and Y. Gong. Large-scale collaborative prediction using a nonparametric random effects model. In ICML, pages 1185–1192, 2009. [29] S. Yu, V. Tresp, and K. Yu. Robust multi-task learning with t-processes. In ICML, page 1103, 2007. [30] J. Zhang, Z. Ghahramani, and Y. Yang. Learning multiple related tasks using latent independent component analysis. In NIPS, pages 1585–1592, 2006. 9
2010
105
3,861
Network Flow Algorithms for Structured Sparsity Julien Mairal∗ INRIA - Willow Project-Team† julien.mairal@inria.fr Rodolphe Jenatton∗ INRIA - Willow Project-Team† rodolphe.jenatton@inria.fr Guillaume Obozinski INRIA - Willow Project-Team† guillaume.obozinski@inria.fr Francis Bach INRIA - Willow Project-Team† francis.bach@inria.fr Abstract We consider a class of learning problems that involve a structured sparsityinducing norm defined as the sum of ℓ∞-norms over groups of variables. Whereas a lot of effort has been put in developing fast optimization methods when the groups are disjoint or embedded in a specific hierarchical structure, we address here the case of general overlapping groups. To this end, we show that the corresponding optimization problem is related to network flow optimization. More precisely, the proximal problem associated with the norm we consider is dual to a quadratic min-cost flow problem. We propose an efficient procedure which computes its solution exactly in polynomial time. Our algorithm scales up to millions of variables, and opens up a whole new range of applications for structured sparse models. We present several experiments on image and video data, demonstrating the applicability and scalability of our approach for various problems. 1 Introduction Sparse linear models have become a popular framework for dealing with various unsupervised and supervised tasks in machine learning and signal processing. In such models, linear combinations of small sets of variables are selected to describe the data. Regularization by the ℓ1-norm has emerged as a powerful tool for addressing this combinatorial variable selection problem, relying on both a well-developed theory (see [1] and references therein) and efficient algorithms [2, 3, 4]. The ℓ1-norm primarily encourages sparse solutions, regardless of the potential structural relationships (e.g., spatial, temporal or hierarchical) existing between the variables. Much effort has recently been devoted to designing sparsity-inducing regularizations capable of encoding higher-order information about allowed patterns of non-zero coefficients [5, 6, 7, 8, 9, 10], with successful applications in bioinformatics [6, 11], topic modeling [12] and computer vision [9, 10]. By considering sums of norms of appropriate subsets, or groups, of variables, these regularizations control the sparsity patterns of the solutions. The underlying optimization problem is usually difficult, in part because it involves nonsmooth components. Proximal methods have proven to be effective in this context, essentially because of their fast convergence rates and their scalability [3, 4]. While the settings where the penalized groups of variables do not overlap or are embedded in a treeshaped hierarchy [12] have already been studied, regularizations with general overlapping groups have, to the best of our knowledge, never been addressed with proximal methods. This paper makes the following contributions: −It shows that the proximal operator associated with the structured norm we consider can be ∗Contributed equally. †Laboratoire d’Informatique de l’Ecole Normale Sup´erieure (INRIA/ENS/CNRS UMR 8548) 1 computed with a fast and scalable procedure by solving a quadratic min-cost flow problem. −It shows that the dual norm of the sparsity-inducing norm we consider can also be evaluated efficiently, which enables us to compute duality gaps for the corresponding optimization problems. −It demonstrates that our method is relevant for various applications, from video background subtraction to estimation of hierarchical structures for dictionary learning of natural image patches. 2 Structured Sparse Models We consider in this paper convex optimization problems of the form min w∈Rp f(w) + λΩ(w), (1) where f : Rp →R is a convex differentiable function and Ω: Rp →R is a convex, nonsmooth, sparsity-inducing regularization function. When one knows a priori that the solutions of this learning problem have only a few non-zero coefficients, Ωis often chosen to be the ℓ1-norm (see [1, 2]). When these coefficients are organized in groups, a penalty encoding explicitly this prior knowledge can improve the prediction performance and/or interpretability of the learned models [13, 14]. Denoting by G a set of groups of indices, such a penalty might for example take the form: Ω(w) ≜ X g∈G ηg max j∈g |wj| = X g∈G ηg∥wg∥∞, (2) where wj is the j-th entry of w for j in [1; p] ≜{1, . . . , p}, the vector wg in R|g| records the coefficients of w indexed by g in G, and the scalars ηg are positive weights. A sum of ℓ2-norms is also used in the literature [7], but the ℓ∞-norm is piecewise linear, a property that we take advantage of in this paper. Note that when G is the set of singletons of [1; p], we get back the ℓ1-norm. If G is a more general partition of [1; p], variables are selected in groups rather than individually. When the groups overlap, Ωis still a norm and sets groups of variables to zero together [5]. The latter setting has first been considered for hierarchies [7, 11, 15], and then extended to general group structures [5].1 Solving Eq. (1) in this context becomes challenging and is the topic of this paper. Following Jenatton et al. [12] who tackled the case of hierarchical groups, we propose to approach this problem with proximal methods, which we now introduce. 2.1 Proximal Methods In a nutshell, proximal methods can be seen as a natural extension of gradient-based techniques, and they are well suited to minimizing the sum f + λΩof two convex terms, a smooth function f —continuously differentiable with Lipschitz-continuous gradient— and a potentially non-smooth function λΩ(see [16] and references therein). At each iteration, the function f is linearized at the current estimate w0 and the so-called proximal problem has to be solved: min w∈Rp f(w0) + (w −w0)⊤∇f(w0) + λΩ(w) + L 2 ∥w −w0∥2 2. The quadratic term keeps the solution in a neighborhood where the current linear approximation holds, and L>0 is an upper bound on the Lipschitz constant of ∇f. This problem can be rewritten as min w∈Rp 1 2 ∥u −w∥2 2 + λ′Ω(w), (3) with λ′ ≜λ/L, and u ≜w0−1 L∇f(w0). We call proximal operator associated with the regularization λ′Ωthe function that maps a vector u in Rp onto the (unique, by strong convexity) solution w⋆ of Eq. (3). Simple proximal methods use w⋆as the next iterate, but accelerated variants [3, 4] are also based on the proximal operator and require to solve problem (3) exactly and efficiently to enjoy their fast convergence rates. Note that when Ωis the ℓ1-norm, the solution of Eq. (3) is obtained by soft-thresholding [16]. The approach we develop in the rest of this paper extends [12] to the case of general overlapping groups when Ωis a weighted sum of ℓ∞-norms, broadening the application of these regularizations to a wider spectrum of problems.2 1Note that other types of structured sparse models have also been introduced, either through a different norm [6], or through non-convex criteria [8, 9, 10]. 2For hierarchies, the approach of [12] applies also to the case of where Ωis a weighted sum of ℓ2-norms. 2 3 A Quadratic Min-Cost Flow Formulation In this section, we show that a convex dual of problem (3) for general overlapping groups G can be reformulated as a quadratic min-cost flow problem. We present an efficient algorithm to solve it exactly, as well as a related algorithm to compute the dual norm of Ω. We start by considering the dual formulation to problem (3) introduced in [12], for the case where Ωis a sum of ℓ∞-norms: Lemma 1 (Dual of the proximal problem [12]) Given u in Rp, consider the problem min ξ∈Rp×|G| 1 2 u − X g∈G ξg 2 2 s.t. ∀g ∈G, ∥ξg∥1 ≤ληg and ξg j = 0 if j /∈g, (4) where ξ = (ξg)g∈G is in Rp×|G|, and ξg j denotes the j-th coordinate of the vector ξg. Then, every solution ξ⋆=(ξ⋆g)g∈G of Eq. (4) satisfies w⋆=u−P g∈G ξ⋆g, where w⋆is the solution of Eq. (3). Without loss of generality,3 we assume from now on that the scalars uj are all non-negative, and we constrain the entries of ξ to be non-negative. We now introduce a graph modeling of problem (4). 3.1 Graph Model Let G be a directed graph G = (V, E, s, t), where V is a set of vertices, E ⊆V × V a set of arcs, s a source, and t a sink. Let c and c′ be two functions on the arcs, c : E →R and c′ : E →R+, where c is a cost function and c′ is a non-negative capacity function. A flow is a non-negative function on arcs that satisfies capacity constraints on all arcs (the value of the flow on an arc is less than or equal to the arc capacity) and conservation constraints on all vertices (the sum of incoming flows at a vertex is equal to the sum of outgoing flows) except for the source and the sink. We introduce a canonical graph G associated with our optimization problem, and uniquely characterized by the following construction: (i) V is the union of two sets of vertices Vu and Vgr, where Vu contains exactly one vertex for each index j in [1; p], and Vgr contains exactly one vertex for each group g in G. We thus have |V | = |G| + p. For simplicity, we identify groups and indices with the vertices of the graph. (ii) For every group g in G, E contains an arc (s, g). These arcs have capacity ληg and zero cost. (iii) For every group g in G, and every index j in g, E contains an arc (g, j) with zero cost and infinite capacity. We denote by ξg j the flow on this arc. (iv) For every index j in [1; p], E contains an arc (j, t) with infinite capacity and a cost cj ≜1 2(uj −¯ξj)2, where ¯ξj is the flow on (j, t). Note that by flow conservation, we necessarily have ¯ξj =P g∈G ξg j. Examples of canonical graphs are given in Figures 1(a)-(c). The flows ξg j associated with G can now be identified with the variables of problem (4): indeed, the sum of the costs on the edges leading to the sink is equal to the objective function of (4), while the capacities of the arcs (s, g) match the constraints on each group. This shows that finding a flow minimizing the sum of the costs on such a graph is equivalent to solving problem (4). When some groups are included in others, the canonical graph can be simplified to yield a graph with a smaller number of edges. Specifically, if h and g are groups with h ⊂g, the edges (g, j) for j ∈h carrying a flow ξg j can be removed and replaced by a single edge (g, h) of infinite capacity and zero cost, carrying the flow P j∈h ξg j. This simplification is illustrated in Figure 1(d), with a graph equivalent to the one of Figure 1(c). This does not change the optimal value of ¯ξ ⋆, which is the quantity of interest for computing the optimal primal variable w⋆(a proof and a formal definition of these equivalent graphs are available in a longer technical report [17]). These simplifications are useful in practice, since they reduce the number of edges in the graph and improve the speed of the algorithms we are now going to present. 3Let ξ⋆denote a solution of Eq. (4). Optimality conditions of Eq. (4) derived in [12] show that for all j in [1; p], the signs of the non-zero coefficients ξ⋆g j for g in G are the same as the signs of the entries uj. To solve Eq. (4), one can therefore flip the signs of the negative variables uj, then solve the modified dual formulation (with non-negative variables), which gives the magnitude of the entries ξ⋆g j (the signs of these being known). 3 s g ξg 1+ξg 2+ξg 3 ≤ληg u2 ξg 2 u1 ξg 1 u3 ξg 3 t ¯ξ1, c1 ¯ξ2, c2 ¯ξ3, c3 (a) G ={g ={1, 2, 3}}. s g ξg 1+ξg 2 ≤ληg h ξh 2 +ξh 3 ≤ληh u2 ξh 2 ξg 2 u1 ξg 1 u3 ξh 3 t ¯ξ1, c1 ¯ξ2, c2 ¯ξ3, c3 (b) G ={g ={1, 2}, h={2, 3}}. s g ξg 1+ξg 2+ξg 3 ≤ληg h ξh 2 +ξh 3 ≤ληh u2 ξh 2 ξg 2 u1 ξg 1 u3 ξg 3 ξh 3 t ¯ξ1, c1 ¯ξ2, c2 ¯ξ3, c3 (c) G ={g ={1, 2, 3}, h={2, 3}}. s g ξg 1+ξg 2+ξg 3 ≤ληg h ξh 2 +ξh 3 ≤ληh ξg 2+ξg 3 u2 ξg 2+ξh 2 u1 ξg 1 u3 ξg 3+ξh 3 t ¯ξ1, c1 ¯ξ2, c2 ¯ξ3, c3 (d) G ={g ={1} ∪h, h={2, 3}}. Figure 1: Graph representation of simple proximal problems with different group structures G. The three indices 1, 2, 3 are represented as grey squares, and the groups g, h in G as red discs. The source is linked to every group g, h with respective maximum capacity ληg, ληh and zero cost. Each variable uj is linked to the sink t, with an infinite capacity, and with a cost cj ≜1 2(uj −¯ξj)2. All other arcs in the graph have zero cost and infinite capacity. They represent inclusion relationships in-between groups, and between groups and variables. The graphs (c) and (d) correspond to a special case of tree-structured hierarchy in the sense of [12]. Their min-cost flow problems are equivalent. 3.2 Computation of the Proximal Operator Quadratic min-cost flow problems have been well studied in the operations research literature [18]. One of the simplest cases, where G contains a single group g (Ωis the ℓ∞-norm) as in Figure 1(a), can be solved by an orthogonal projection on the ℓ1-ball of radius ληg. It has been shown that such a projection can be done in O(p) operations [18, 19]. When the group structure is a tree as in Figure 1(d), the problem can be solved in O(pd) operations, where d is the depth of the tree [12, 18].4 The general case of overlapping groups is more difficult. Hochbaum and Hong have shown in [18] that quadratic min-cost flow problems can be reduced to a specific parametric max-flow problem, for which an efficient algorithm exists [20].5 While this generic approach could be used to solve Eq. (4), we propose to use Algorithm 1 that also exploits the fact that our graphs have non-zero costs only on edges leading to the sink. As shown in the technical report [17], it has a significantly better performance in practice. This algorithm clearly shares some similarities with existing approaches in network flow optimization such as the simplified version of [20] presented in [21] that uses a divide and conquer strategy. Moreover, we have discovered after that this paper was accepted for publication that an equivalent algorithm exists for minimizing convex functions over polymatroid 4When restricted to the case where Ωis a sum of ℓ∞-norms, the approach of [12] is in fact similar to [18]. 5By definition, a parametric max-flow problem consists in solving, for every value of a parameter, a maxflow problem on a graph whose arc capacities depend on this parameter. 4 sets [22]. This equivalence, however, requires a non-trivial representation of structured sparsityinducing norms with submodular functions, as recently pointed out by [23]. Algorithm 1 Computation of the proximal operator for overlapping groups. 1: Inputs: u ∈Rp, a set of groups G, positive weights (ηg)g∈G, and λ (regularization parameter). 2: Build the initial graph G0 = (V0, E0, s, t) as explained in Section 3.2. 3: Compute the optimal flow: ¯ξ ←computeFlow(V0, E0). 4: Return: w = u −¯ξ (optimal solution of the proximal problem). Function computeFlow(V = Vu ∪Vgr, E) 1: Projection step: γ ←arg minγ P j∈Vu 1 2(uj −γj)2 s.t. P j∈Vu γj ≤λ P g∈Vgr ηg. 2: For all nodes j in Vu, set γj to be the capacity of the arc (j, t). 3: Max-flow step: Update (¯ξj)j∈Vu by computing a max-flow on the graph (V, E, s, t). 4: if ∃j ∈Vu s.t. ¯ξj ̸= γj then 5: Denote by (s, V +) and (V −, t) the two disjoint subsets of (V, s, t) separated by the minimum (s, t)-cut of the graph, and remove the arcs between V + and V −. Call E+ and E−the two remaining disjoint subsets of E corresponding to V + and V −. 6: (¯ξj)j∈V + u ←computeFlow(V +, E+). 7: (¯ξj)j∈V − u ←computeFlow(V −, E−). 8: end if 9: Return: (¯ξj)j∈Vu. The intuition behind this algorithm is the following: The first step looks for a candidate value for ¯ξ=P g∈G ξg by solving a relaxed version of problem Eq. (4), where the constraints ∥ξg∥1 ≤ληg are dropped and replaced by a single one ∥¯ξ∥1 ≤λ P g∈G ηg. The relaxed problem only depends on ¯ξ and can be solved in linear time. By calling its solution γ, it provides a lower bound ∥u −γ∥2 2/2 on the optimal cost. Then, the second step tries to find a feasible flow of the original problem (4) such that the resulting vector ¯ξ matches γ, which is in fact a max-flow problem [24]. If ¯ξ = γ, then the cost of the flow reaches the lower bound, and the flow is optimal. If ¯ξ ̸= γ, the lower bound is not achievable, and we construct a minimum (s, t)-cut of the graph [25] that defines two disjoints sets of nodes V + and V −; V + is the part of the graph that could potentially have received more flow from the source (the arcs between s and V + are not saturated), whereas all arcs linking s to V −are saturated. At this point, it is possible to show that the value of the optimal min-cost flow on all arcs between V + and V −is necessary zero. Thus, removing them yields an equivalent optimization problem, which can be decomposed into two independent problems of smaller sizes and solved recursively by the calls to computeFlow(V +, E+) and computeFlow(V −, E−). A formal proof of correctness of Algorithm 1 and further details are relegated to [17]. The approach of [18, 20] is guaranteed to have the same worst-case complexity as a single max-flow algorithm. However, we have experimentally observed a significant discrepancy between the worst case and empirical complexities for these flow problems, essentially because the empirical cost of each max-flow is significantly smaller than its theoretical cost. Despite the fact that the worst-case guarantee of our algorithm is weaker than their (up to a factor |V |), it is more adapted to the structure of our graphs and has proven to be much faster in our experiments (see technical report [17]). Some implementation details are crucial to the efficiency of the algorithm: • Exploiting connected components: When there exists no arc between two subsets of V , it is possible to process them independently in order to solve the global min-cost flow problem. • Efficient max-flow algorithm: We have implemented the “push-relabel” algorithm of [24] for solving our max-flow problems, using classical heuristics that significantly speed it up in practice (see [24, 26]). This algorithm leverages the concept of pre-flow that relaxes the definition of flow and allows vertices to have a positive excess. It can be initialized with any valid pre-flow, enabling warm-restarts when the max-flow is called several times as in our algorithm. • Improved projection step: The first line of the function computeFlow can be replaced by γ ←arg minγ P j∈Vu 1 2(uj −γj)2 s.t. P j∈Vu γj ≤λ P g∈Vgr ηg and |γj| ≤λ P g∋j ηg. The idea is that the structure of the graph will not allow ¯ξj to be greater than λ P g∋j ηg after the maxflow step. Adding these additional constraints leads to better performance when the graph is not well balanced. This modified projection step can still be computed in linear time [19]. 5 3.3 Computation of the Dual Norm The dual norm Ω∗of Ω, defined for any vector κ in Rp by Ω∗(κ) ≜maxΩ(z)≤1 z⊤κ, is a key quantity to study sparsity-inducing regularizations [5, 15, 27]. We use it here to monitor the convergence of the proximal method through a duality gap, and define a proper optimality criterion for problem (1). We denote by f ∗the Fenchel conjugate of f [28], defined by f ∗(κ) ≜supz[z⊤κ −f(z)]. The duality gap for problem (1) can be derived from standard Fenchel duality arguments [28] and it is equal to f(w) + λΩ(w) + f ∗(−κ) for w, κ in Rp with Ω∗(κ) ≤λ. Therefore, evaluating the duality gap requires to compute efficiently Ω∗in order to find a feasible dual variable κ. This is equivalent to solving another network flow problem, based on the following variational formulation: Ω∗(κ) = min ξ∈Rp×|G|τ s.t. X g∈G ξg = κ, and ∀g ∈G, ∥ξg∥1 ≤τηg with ξg j = 0 if j /∈g. (5) In the network problem associated with (5), the capacities on the arcs (s, g), g ∈G, are set to τηg, and the capacities on the arcs (j, t), j in [1; p], are fixed to κj. Solving problem (5) amounts to finding the smallest value of τ, such that there exists a flow saturating the capacities κj on the arcs leading to the sink t (i.e., ¯ξ = κ). The algorithm below is proven to be correct in [17]. Algorithm 2 Computation of the dual norm. 1: Inputs: κ ∈Rp, a set of groups G, positive weights (ηg)g∈G. 2: Build the initial graph G0 = (V0, E0, s, t) as explained in Section 3.3. 3: τ ←dualNorm(V0, E0). 4: Return: τ (value of the dual norm). Function dualNorm(V = Vu ∪Vgr, E) 1: τ ←(P j∈Vu κj)/(P g∈Vgr ηg) and set the capacities of arcs (s, g) to τηg for all g in Vgr. 2: Max-flow step: Update (¯ξj)j∈Vu by computing a max-flow on the graph (V, E, s, t). 3: if ∃j ∈Vu s.t. ¯ξj ̸= κj then 4: Define (V +, E+) and (V −, E−) as in Algorithm 1, and set τ ←dualNorm(V −, E−). 5: end if 6: Return: τ. 4 Applications and Experiments Our experiments use the algorithm of [4] based on our proximal operator, with weights ηg set to 1. 4.1 Speed Comparison We compare our method (ProxFlow) and two generic optimization techniques, namely a subgradient descent (SG) and an interior point method,6 on a regularized linear regression problem. Both SG and ProxFlow are implemented in C++. Experiments are run on a single-core 2.8 GHz CPU. We consider a design matrix X in Rn×p built from overcomplete dictionaries of discrete cosine transforms (DCT), which are naturally organized on one- or two-dimensional grids and display local correlations. The following families of groups G using this spatial information are thus considered: (1) every contiguous sequence of length 3 for the one-dimensional case, and (2) every 3×3-square in the two-dimensional setting. We generate vectors y in Rn according to the linear model y = Xw0 + ε, where ε ∼N(0, 0.01∥Xw0∥2 2). The vector w0 has about 20% percent nonzero components, randomly selected, while respecting the structure of G, and uniformly generated between [−1, 1]. In our experiments, the regularization parameter λ is chosen to achieve the same sparsity as w0. For SG, we take the step size to be equal to a/(k + b), where k is the iteration number, and (a, b) are the best parameters selected in {10−3, . . . , 10}×{102, 103, 104}. For the interior point methods, since problem (1) can be cast either as a quadratic (QP) or as a conic program (CP), we show in Figure 2 the results for both formulations. Our approach compares favorably with the other methods, on three problems of different sizes, (n, p) ∈{(100, 103), (1024, 104), (1024, 105)}, see Figure 2. In addition, note that QP, CP and SG do not obtain sparse solutions, whereas ProxFlow does. We have also run ProxFlow and SG on a larger dataset with (n, p) = (100, 106): after 12 hours, ProxFlow and SG have reached a relative duality gap of 0.0006 and 0.02 respectively.7 6In our simulations, we use the commercial software Mosek, http://www.mosek.com/. 7Due to the computational burden, QP and CP could not be run on every problem. 6 −2 −1 0 1 2 −10 −8 −6 −4 −2 0 2 n=100, p=1000, one−dimensional DCT log(CPU time) in seconds log(relative distance to optimum) CP QP ProxFlow SG −2 0 2 4 −10 −8 −6 −4 −2 0 2 n=1024, p=10000, two−dimensional DCT log(CPU time) in seconds log(relative distance to optimum) CP ProxFlow SG −2 0 2 4 −10 −8 −6 −4 −2 0 2 n=1024, p=100000, one−dimensional DCT log(CPU time) in seconds log(relative distance to optimum) ProxFlow SG Figure 2: Speed comparisons: distance to the optimal primal value versus CPU time (log-log scale).6 Figure 3: From left to right: original image y; estimated background Xw; foreground (the sparsity pattern of e used as mask on y) estimated with ℓ1; foreground estimated with ℓ1 + Ω; another foreground obtained with Ω, on a different image, with the same values of λ1, λ2 as for the previous image. For the top row, the percentage of pixels matching the ground truth is 98.8% with Ω, 87.0% without. As for the bottom row, the result is 93.8% with Ω, 90.4% without (best seen in color). 4.2 Background Subtraction Following [9, 10], we consider a background subtraction task. Given a sequence of frames from a fixed camera, we try to segment out foreground objects in a new image. If we denote by y ∈Rn a test image, we model y as a sparse linear combination of p other images X ∈Rn×p, plus an error term e in Rn, i.e., y ≈Xw + e for some sparse vector w in Rp. This approach is reminiscent of [29] in the context of face recognition, where e is further made sparse to deal with occlusions. The term Xw accounts for background parts present in both y and X, while e contains specific, or foreground, objects in y. The resulting optimization problem is minw,e 1 2∥y −Xw −e∥2 2 + λ1∥w∥1 + λ2∥e∥1, with λ1, λ2 ≥0. In this formulation, the ℓ1-norm penalty on e does not take into account the fact that neighboring pixels in y are likely to share the same label (background or foreground), which may lead to scattered pieces of foreground and background regions (Figure 3). We therefore put an additional structured regularization term Ωon e, where the groups in G are all the overlapping 3×3-squares on the image. A dataset with hand-segmented evaluation images is used to illustrate the effect of Ω.8 For simplicity, we use a single regularization parameter, i.e., λ1 = λ2, chosen to maximize the number of pixels matching the ground truth. We consider p = 200 images with n = 57600 pixels (i.e., a resolution of 120×160, times 3 for the RGB channels). As shown in Figure 3, adding Ωimproves the background subtraction results for the two tested videos, by encoding, unlike the ℓ1-norm, both spatial and color consistency. 4.3 Multi-Task Learning of Hierarchical Structures In [12], Jenatton et al. have recently proposed to use a hierarchical structured norm to learn dictionaries of natural image patches. Following this work, we seek to represent n signals {y1, . . . , yn} of dimension m as sparse linear combinations of elements from a dictionary X = [x1, . . . , xp] in Rm×p. This can be expressed for all i in [1; n] as yi ≈Xwi, for some sparse vector wi in Rp. In [12], the dictionary elements are embedded in a predefined tree T , via a particular instance of the structured norm Ω; we refer to it as Ωtree, and call G the underlying set of groups. In this case, each signal yi admits a sparse decomposition in the form of a subtree of dictionary elements. 8http://research.microsoft.com/en-us/um/people/jckrumm/wallflower/testimages.htm 7 Inspired by ideas from multi-task learning [14], we propose to learn the tree structure T by pruning irrelevant parts of a larger initial tree T0. We achieve this by using an additional regularization term Ωjoint across the different decompositions, so that subtrees of T0 will simultaneously be removed for all signals yi. In other words, the approach of [12] is extended by the following formulation: min X,W 1 n n X i=1 h1 2∥yi −Xwi∥2 2 + λ1Ωtree(wi) i +λ2Ωjoint(W), s.t. ∥xj∥2 ≤1, for all j in [1; p], (6) where W ≜[w1, . . . , wn] is the matrix of decomposition coefficients in Rp×n. The new regularization term operates on the rows of W and is defined as Ωjoint(W) ≜P g∈G maxi∈[1;n] |wi g|.9 The overall penalty on W, which results from the combination of Ωtree and Ωjoint, is itself an instance of Ωwith general overlapping groups, as defined in Eq (2). To address problem (6), we use the same optimization scheme as [12], i.e., alternating between X and W, fixing one variable while optimizing with respect to the other. The task we consider is the denoising of natural image patches, with the same dataset and protocol as [12]. We study whether learning the hierarchy of the dictionary elements improves the denoising performance, compared to standard sparse coding (i.e., when Ωtree is the ℓ1-norm and λ2 = 0) and the hierarchical dictionary learning of [12] based on predefined trees (i.e., λ2 = 0). The dimensions of the training set — 50 000 patches of size 8×8 for dictionaries with up to p = 400 elements — impose to handle large graphs, with |E| ≈|V | ≈4.107. Since problem (6) is too large to be solved many times to select the regularization parameters (λ1, λ2) rigorously, we use the following heuristics: we optimize mostly with the currently pruned tree held fixed (i.e., λ2 = 0), and only prune the tree (i.e., λ2 > 0) every few steps on a random subset of 10 000 patches. We consider the same hierarchies as in [12], involving between 30 and 400 dictionary elements. The regularization parameter λ1 is selected on the validation set of 25 000 patches, for both sparse coding (Flat) and hierarchical dictionary learning (Tree). Starting from the tree giving the best performance (in this case the largest one, see Figure 4), we solve problem (6) following our heuristics, for increasing values of λ2. As shown in Figure 4, there is a regime where our approach performs significantly better than the two other compared methods. The standard deviation of the noise is 0.2 (the pixels have values in [0, 1]); no significant improvements were observed for lower levels of noise. 0 100 200 300 400 0.19 0.2 0.21 Denoising Experiment: Mean Square Error Dictionary Size Mean Square Error Flat Tree Multi−task Tree Figure 4: Left: Hierarchy obtained by pruning a larger tree of 76 elements. Right: Mean square error versus dictionary size. The error bars represent two standard deviations, based on three runs. 5 Conclusion We have presented a new optimization framework for solving sparse structured problems involving sums of ℓ∞-norms of any (overlapping) groups of variables. Interestingly, this sheds new light on connections between sparse methods and the literature of network flow optimization. In particular, the proximal operator for the formulation we consider can be cast as a quadratic min-cost flow problem, for which we propose an efficient and simple algorithm. This allows the use of accelerated gradient methods. Several experiments demonstrate that our algorithm can be applied to a wide class of learning problems, which have not been addressed before within sparse methods. Acknowledgments This paper was partially supported by the European Research Council (SIERRA Project). The authors would like to thank Jean Ponce for interesting discussions and suggestions. 9The simplified case where Ωtree and Ωjoint are the ℓ1- and mixed ℓ1/ℓ2-norms [13] corresponds to [30]. 8 References [1] P. Bickel, Y. Ritov, and A. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. Ann. Stat., 37(4):1705–1732, 2009. [2] B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani. Least angle regression. Ann. Stat., 32(2):407–499, 2004. [3] Y. Nesterov. Gradient methods for minimizing composite objective function. Technical report, Center for Operations Research and Econometrics (CORE), Catholic University of Louvain, 2007. [4] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imag. Sci., 2(1):183–202, 2009. [5] R. Jenatton, J-Y. Audibert, and F. Bach. Structured variable selection with sparsity-inducing norms. Technical report, 2009. Preprint arXiv:0904.3523v1. [6] L. Jacob, G. Obozinski, and J.-P. Vert. Group Lasso with overlap and graph Lasso. In Proc. ICML, 2009. [7] P. Zhao, G. Rocha, and B. Yu. The composite absolute penalties family for grouped and hierarchical variable selection. Ann. Stat., 37(6A):3468–3497, 2009. [8] R. G. Baraniuk, V. Cevher, M. Duarte, and C. Hegde. Model-based compressive sensing. IEEE T. Inform. Theory, 2010. to appear. [9] V. Cehver, M.F. Duarte, C. Hedge, and R.G. Baraniuk. Sparse signal recovery using markov random fields. In Adv. NIPS, 2008. [10] J. Huang, T. Zhang, and D. Metaxas. Learning with structured sparsity. In Proc. ICML, 2009. [11] S. Kim and E. P. Xing. Tree-guided group lasso for multi-task regression with structured sparsity. In Proc. ICML, 2010. [12] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for sparse hierarchical dictionary learning. In Proc. ICML, 2010. [13] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. J. Roy. Stat. Soc. B, 68:49–67, 2006. [14] G. Obozinski, B. Taskar, and M. I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Stat. Comput., 20(2):231–252, 2010. [15] F. Bach. Exploring large feature spaces with hierarchical multiple kernel learning. In Adv. NIPS, 2008. [16] P. L. Combettes and J.-C. Pesquet. Proximal splitting methods in signal processing. In Fixed-Point Algorithms for Inverse Problems in Science and Engineering. Springer, 2010. [17] J. Mairal, R. Jenatton, G. Obozinski, and F. Bach. Network flow algorithms for structured sparsity. Technical report, 2010. Preprint arXiv:1008.5209v1. [18] D. S. Hochbaum and S. P. Hong. About strongly polynomial time algorithms for quadratic optimization over submodular constraints. Math. Program., 69(1):269–309, 1995. [19] P. Brucker. An O(n) algorithm for quadratic knapsack problems. Oper. Res. Lett., 3:163–166, 1984. [20] G. Gallo, M. E. Grigoriadis, and R. E. Tarjan. A fast parametric maximum flow algorithm and applications. SIAM J. Comput., 18:30–55, 1989. [21] M. Babenko and A.V. Goldberg. Experimental evaluation of a parametric flow algorithm. Technical report, Microsoft Research, 2006. MSR-TR-2006-77. [22] H. Groenevelt. Two algorithms for maximizing a separable concave function over a polymatroid feasible region. Eur. J. Oper. Res., pages 227–236, 1991. [23] F. Bach. Structured sparsity-inducing norms through submodular functions. In Adv. NIPS, 2010. [24] A. V. Goldberg and R. E. Tarjan. A new approach to the maximum flow problem. In Proc. of ACM Symposium on Theory of Computing, 1986. [25] L. R. Ford and D. R. Fulkerson. Maximal flow through a network. Canadian J. Math., 8(3), 1956. [26] B. V. Cherkassky and A. V. Goldberg. On implementing the pushrelabel method for the maximum flow problem. Algorithmica, 19(4):390–410, 1997. [27] S. Negahban, P. Ravikumar, M. J. Wainwright, and B. Yu. A unified framework for high-dimensional analysis of M-estimators with decomposable regularizers. In Adv. NIPS, 2009. [28] J. M. Borwein and A. S. Lewis. Convex analysis and nonlinear optimization. Springer, 2006. [29] J. Wright, A. Y. Yang, A. Ganesh, S. S. Sastry, and Y. Ma. Robust face recognition via sparse representation. IEEE T. Pattern. Anal., pages 210–227, 2008. [30] P. Sprechmann, I. Ramirez, G. Sapiro, and Y. C. Eldar. Collaborative hierarchical sparse modeling. Technical report, 2010. Preprint arXiv:1003.0400v1. 9
2010
106
3,862
Active Learning by Querying Informative and Representative Examples Sheng-Jun Huang1 Rong Jin2 Zhi-Hua Zhou1 1National Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210093, China 2Department of Computer Science and Engineering, Michigan State University, East Lansing, MI 48824 {huangsj, zhouzh}@lamda.nju.edu.cn rongjin@cse.msu.edu Abstract Most active learning approaches select either informative or representative unlabeled instances to query their labels. Although several active learning algorithms have been proposed to combine the two criteria for query selection, they are usually ad hoc in finding unlabeled instances that are both informative and representative. We address this challenge by a principled approach, termed QUIRE, based on the min-max view of active learning. The proposed approach provides a systematic way for measuring and combining the informativeness and representativeness of an instance. Extensive experimental results show that the proposed QUIRE approach outperforms several state-of -the-art active learning approaches. 1 Introduction In this work, we focus on the pool-based active learning, which selects an unlabeled instance from a given pool for manually labeling. There are two main criteria, i.e., informativeness and representativeness, that are widely used for active query selection. Informativeness measures the ability of an instance in reducing the uncertainty of a statistical model, while representativeness measures if an instance well represents the overall input patterns of unlabeled data [16]. Most active learning algorithms only deploy one of the two criteria for query selection, which could significantly limit the performance of active learning: approaches favoring informative instances usually do not exploit the structure information of unlabeled data, leading to serious sample bias and consequently undesirable performance for active learning; approaches favoring representative instances may require querying a relatively large number of instances before the optimal decision boundary is found. Although several active learning algorithms [19, 8, 11] have been proposed to find the unlabeled instances that are both informative and representative, they are usually ad hoc in measuring the informativeness and representativeness of an instance, leading to suboptimal performance. In this paper, we propose a new active learning approach by QUerying Informative and Representative Examples (QUIRE for short). The proposed approach is based on the min-max view of active learning [11], which provides a systematic way for measuring and combining the informativeness and the representativeness. The interesting feature of the proposed approach is that it measures both the informativeness and representativeness of an instance by its prediction uncertainty: the informativeness of an instance x is measured by its prediction uncertainty based on the labeled data, while the representativeness of x is measured by its prediction uncertainty based on the unlabeled data. The rest of this paper is organized as follows: Section 2 reviews the related work on active learning; Section 3 presents the proposed approach in details; experimental results are reported in Section 4; Section 5 concludes this work with issues to be addressed in the future. 1 (a) A binary classification problem (b) An approach favoring informative instances (c) An approach favoring representative instances (d) Our approach Figure 1: An illustrative example for selecting informative and representative instances 2 Related Work Querying the most informative instances is probably the most popular approach for active learning. Exemplar approaches include query-by-committee [17, 6, 10], uncertainty sampling [13, 12, 18, 2] and optimal experimental design [9, 20]. The main weakness of these approaches is that they are unable to exploit the abundance of unlabeled data and the selection of query instances is solely determined by a small number of labeled examples, making it prone to sample bias. Another school of active learning is to select the instances that are most representative to the unlabeled data. These approaches aim to exploit the cluster structure of unlabeled data [14, 7], usually by a clustering method. The main weakness of these approaches is that their performance heavily depends on the quality of clustering results [7]. Several active learning algorithms tried to combine the informativeness measure with the representativeness measure for finding the optimal query instances. In [19], the authors propose a sampling algorithm that exploits both the cluster information and the classification margins of unlabeled instances. One limitation of this approach is that since clustering is only performed on the instances within the classification margin, it is unable to exploit the unlabeled instances outside the margin. In [8], Donmez et al. extended the active learning approach in [14] by dynamically balancing the uncertainty and the density of instances for query selection. This approach is ad hoc in combining the measure of informativeness and representativeness for query selection, leading to suboptimal performance. Our work is based on the min-max view of active learning, which was first proposed in the study of batch mode active learning [11]. Unlike [11] which measures the representativeness of an instance by its similarity to the remaining unlabeled instances, our proposed measure of representativeness takes into account the cluster structure of unlabeled instances as well as the class assignments of the labeled examples, leading to a better selection of unlabeled instances for active learning. 3 QUIRE: QUery Informative and Representative Examples We start with a synthesized example that illustrates the importance of querying instances that are both informative and representative for active learning. Figure 1 (a) shows a binary classification problem with each class represented by a different legend. We examine three different active learning algorithms by allowing them to sequentially select 15 data points. Figure 1 (b) and (c) show the data points selected by an approach favoring informative instances (i.e., [18]) and by an approach favoring representative instances (i.e., [7]), respectively. As indicated by Figure 1 (b), due to the sample bias, the approach preferring informative instances tends to choose the data points close to the horizontal line, leading to incorrect decision boundaries. On the other hand, as indicated by Figure 1 (c), the approach preferring representative instances is able to identify the approximately correct decision boundary but with a slow convergence. Figure 1 (d) shows the data points selected by the proposed approach that favors data points that are both informative and representative. It is clear that the proposed algorithm is more efficient in finding the accurate decision boundary than the other two approaches. We denote by D = {(x1, y1), (x2, y2), · · · , (xnl, ynl), xnl+1, · · · , xn} the training data set that consists of nl labeled instances and nu = n −nl unlabeled instances, where each instance xi = [xi1, xi2, · · · , xid]⊤is a vector of d dimension and yi ∈{−1, +1} is the class label of xi. 2 Active learning selects one instance xs from the pool of unlabeled data to query its class label. For convenience, we divide the data set D into three parts: the labeled data Dl, the currently selected instance xs, and the rest of the unlabeled data Du. We also use Da = Du ∪{xs} to represent all the unlabeled instances. We use y = [yl, ys, yu] for the class label assignment of the entire data set, where yl, ys and yu are the class labels assigned to Dl, xs and Du, respectively. Finally, we denote by ya = [ys, yu] the class assignment for all the unlabeled instances. 3.1 The Framework To motivate the proposed approach, we first re-examine the margin-based active learning from the viewpoint of min-max [11]. Let f ∗be a classification model trained by the labeled examples, i.e., f ∗= arg min f∈H λ 2 |f|2 H + nl X i=1 ℓ(yi, f(xi)), (1) where H is a reproducing kernel Hilbert space endowed with kernel function κ(·, ·) : Rd ×Rd →R. ℓ(z) is the loss function. Given the classifier f ∗, the margin-based approach chooses the unlabeled instance closest to the decision boundary, i.e., s∗= arg min nl<s≤n |f ∗(xs)|. (2) It is shown in the supplementary document that this criterion can be approximated by s∗= arg min n1<s≤n L(Dl, xs), (3) where L(Dl, xs) = max ys=±1 min f∈H λ 2 |f|2 H + nl X i=1 ℓ(yi, f(xi)) + ℓ(ys, f(xs)). (4) We can also write Eq. 3 in a minimax form min nl<s≤n max ys=±1 A(Dl, xs), where A(Dl, xs) = min f∈H λ 2 |f|2 H + nl X i=1 ℓ(yi, f(xi)) + ℓ(ys, f(xs)). In this min-max view of active learning, it guarantees that the selected instance xs will lead to a small value for the objective function regardless of its class label ys. In order to select queries that are both informative and representative, we extend the evaluation function L(Dl, xs) to include all the unlabeled data. Hypothetically, if we know the class assignment yu for the unselected unlabeled instances in Du, the evaluation function can be modified as L(Dl, Du, yu, xs) = max ys=±1 min f∈H λ 2 |f|2 H + n X i=1 ℓ(yi, f(xi)). (5) The problem is that the class assignment yu is unknown. According to the manifold assumption [3], we expect that a good solution for yu should result in a small value of L(Dl, Du, yu, xs). We therefore approximate the solution for yu by minimizing L(Dl, Du, yu, xs), which leads to the following evaluation function for query selection: bL(Dl, Du, xs) = min yu∈{±1}nu−1 L(Dl, Du, yu, xs) (6) = min yu∈{±1}nu−1 max ys=±1 min f∈H λ 2 |f|2 H + n X i=1 ℓ(yi, f(xi)) 3.2 The Solution For computational simplicity, for the rest of this work, we choose a quadratic loss function, i.e., ℓ(y, by) = (y −by)2/2 1. It is straightforward to show min f∈H λ 2 |f|2 H + 1 2 n X i=1 (yi −f(xi))2 = 1 2y⊤Ly, 1Although quadratic loss may not be ideal for classification, it does yield competitive classification results when compared to the other loss functions such as hinge loss [15]. 3 where L = (K + λI)−1 and K = [κ(xi, xj)]n×n is the kernel matrix of size n × n. Thus, the evaluation function bL(Dl, Du, xs) is simplified as bL(Dl, Du, xs) = min yu∈{−1,+1}nu−1 max ys∈{−1,+1} y⊤Ly. (7) Our goal is to efficiently compute the above quantity for each unlabeled instance. For the convenience of presentation, we refer to by subscript u the rows/columns in a matrix M for the unlabeled instances in Du, by subscript l the rows/columns in M for labeled instances in Dl, and by subscript s the row/column in M for the selected instance. We also refer to by subscript a the rows/columns in M for all the unlabeled instances (i.e., Du ∪{xs}). Using these conventions, we rewrite the objective y⊤Ly as y⊤Ly = ylLl,lyl + Ls,s + yT u Lu,uyu + 2yT u (Lu,lyl + Lu,sys) + 2ysy⊤ l Ll,s. Note that since the above objective function is concave (linear) in ys and convex (quadratic) in yu, we can switch the maximization of yu with the minimization of ys in (7). By relaxing yu to continuous variables, the solution to minyu y⊤Ly is given by byu = −Lu,u −1(Lu,lyl + Lu,sys), (8) leading to the following expression for the evaluation function bL(Dl, Du, xs): bL(Dl, Du, xs) = Ls,s + yT l Ll,lyl + max ys {2ysLs,lyl (9) −(Lu,lyl + Lu,sys)T Lu,u −1(Lu,lyl + Lu,sys)} ∝ Ls,s −det(La,a) Ls,s + 2 Ls,l −Ls,uL−1 u,uLu,l  yl , where the last step follows the relation det  A11 A12 A21 A22  = det(A22)det A11 −A12A−1 22 A21  . Note that although yu is relaxed to real numbers, according to our empirical studies, we find that in most cases, yu falls between −1 and +1. Remark. The evaluation function bL(Dl, Du, xs) essentially consists of two components: Ls,s − det(La,a)/Ls,s and |(Ls,l −Ls,uL−1 u,uLu,l)yl|. Minimizing the first component is equivalent to minimizing Ls,s because La,a is independent from the selected instance xs. Since L = (K+λI)−1, we have Ls,s =  Ks,s −(Ks,l, Ks,u)  Kl,l Kl,u Ku,l Ku,u   Kl,s Ku,s −1 ≈ 1 Ks,s  1 + 1 Ks,s (Ks,l, Ks,u)  Kl,l Kl,u Ku,l Ku,u  Kl,s Ku,s  . Therefore, to choose an instance with small Ls,s, we select the instance with large self-similarity Ks,s. When self-similarity Ks,s is a constant, this term will not affect query selection. To analyze the effect of the second component, we approximate it as: 2 Ls,l −Ls,uL−1 u,uLu,l  yl ≈ 2 |Ls,lyl| + 2 Ls,uL−1 u,uLu,lyl (10) ≈ 2|Ls,lyl| + 2|Ls,ubyu|. The first term in the above approximation measures the confidence in predicting xs using only labeled data, which corresponds to the informativeness of xs. The second term measures the prediction confidence using only the predicted labels of the unlabeled data, which can be viewed as the measure of representativeness. This is because when xs is a representative instance, it is expected to share a large similarity with many of the unlabeled instances in the pool. As a result, the prediction for xs by the unlabeled data in Du is decided by the average of their assigned class labels byu. If we assume that the classes are evenly distributed over the unlabeled data, we should expect a low confidence in predicting the class label for xs by unlabeled data. It is important to note that unlike the 4 Algorithm 1 The QUIRE Algorithm Input: D : A data set of n instances Initialize: Dl = ∅; nl = 0 % no labeled data is available at the very beginning Du = D; nu = n % the pool of unlabeled data Calculate K repeat Calculate L−1 a,a using Proposition 2 and det(La,a) for s = 1 to nu do Calculate L−1 uu according to Theorem 1 Calculate bL(Dl, Du, xs) using Eq. 9 end for Select the xs∗with the smallest bL(Dl, Du, xs∗) and query its label ys∗ Dl = Dl ∪(xs∗, ys∗); Du = Du \ xs∗ until the number of queries or the required accuracy is reached existing work that measures the representativeness only by the cluster structure of unlabeled data, our proposed measure of representativeness depends on byu, which essentially combines the cluster structure of unlabeled data with the class assignments of labeled data. Given high-dimensional data, there could be many possible cluster structures that are consistent with the unlabeled data and it is unclear which one is consistent with the target classification problem. It is therefore critical to take into account the label information when exploiting the cluster structure of unlabeled data. 3.3 Efficient Algorithm Computing the evaluation function bL(Dl, Du, xs) in Eq. 9 requires computing L−1 u,u for every unlabeled instance xs, leading to high computational cost when the number of unlabeled instances is very large. The theorem below allows us to improve the computational efficiency dramatically. Theorem 1. Let L−1 a,a =  Ls,s Ls,u Lu,s Lu,u −1 =  a −b⊤ −b D  . We have L−1 u,u = D −1 abb⊤. The proof can be found in the supplementary document. As indicated by Theorem 1, we only need to compute L−1 a,a once; for each xs, its L−1 u,u can be computed directly from L−1 a,a. The following proposition allows us to simplify the computation for L−1 a,a. Proposition 2. L−1 a,a = (λIa + Ka,a) −Ka,l(λIl + Kl,l)−1Kl,a Proposition 2 follows directly from the inverse of a block matrix. As indicated by Proposition 2, we only need to compute (λI + Kl,l)−1. Given that the number of labeled examples is relatively small compared to the size of unlabeled data, the computation of L−1 a,a is in general efficient. The pseudo-code of QUIRE is summarized in Algorithm 1. Excluding the time for computing the kernel matrix, the computational complexity of our algorithm is just O(nu). 4 Experiments We compare QUIRE with the following five baseline approaches: (1) RANDOM: randomly select query instances, (2) MARGIN: margin-based active learning [18], a representative approach which selects informative instances, (3) CLUSTER: hierarchical-clustering-based active learning [7], a representative approach that chooses representative instances, (4) IDE: active learning that selects informative and diverse examples [11], and (5) DUAL: a dual strategy for active learning that exploits both informativeness and representativeness for query selection. Note that the original algorithm in [11] is designed for batch mode active learning. We turn it into an active learning algorithm that selects a single instance in each iteration by setting the parameter k = 1. 5 0 20 40 60 80 50 60 70 80 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (a) austra 0 20 40 60 80 100 50 60 70 80 90 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (b) digit1 0 100 200 300 400 500 600 50 60 70 80 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (c) g241n 0 5 10 15 20 25 30 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (d) isolet 0 50 100 150 200 250 300 40 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (e) titato 0 50 100 150 50 60 70 80 90 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (f) vehicle 0 10 20 30 40 50 60 40 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (g) wdbc 0 10 20 30 40 50 60 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (h) letterDvsP 0 10 20 30 40 50 60 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (i) letterEvsF 0 10 20 30 40 50 60 50 60 70 80 90 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (j) letterIvsJ 0 20 40 60 80 100 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (k) letterMvsN 0 10 20 30 40 50 60 50 60 70 80 90 100 Number of queried examples Accuracy (%) Random Margin Cluster IDE DUAL Quire (l) letterUvsV Figure 2: Comparison on classification accuracy Twelve data sets are used in our study and their statistics are shown in the supplementary document. Digit1 and g241n are benchmark data sets for semi-supervised learning [5]; austria, isolet, titato, vechicle, and wdbc are UCI data sets [1]; letter is a multi-class data set [1] from which we select five pairs of letters that are relatively difficult to distinguish, i.e., D vs P, E vs F, I vs J, M vs N, U vs V, and construct a binary class data set for each pair. Each data set is randomly divided into two parts of equal size, with one part as the test data and the other part as the unlabeled data that is used for active learning. We assume that no labeled data is available at the very beginning of active learning. For MARGIN, IDE and DUAL, instances are randomly selected when no classification model is available, which only takes place at the beginning. In each iteration, an unlabeled instance is first selected to solicit its class label and the classification model is then retrained using additional labeled instance. We evaluate the classification model by its performance on the holdout test data. Both classification accuracy and Area Under ROC curve (AUC) are used for evaluation metrics. For every data set, we run the experiment for ten times, each with a random partition of the data set. We also conduct experiments with a few initially labeled examples and have similar observation. Due to the space limit, we put in the supplementary document the experimental results with a few initially labeled examples. In all the experiments, the parameter λ is set to 1 and a RBF kernel with default 6 Table 1: Comparison on AUC values (mean ± std). The best performance and its comparable performances based on paired t-tests at 95% significance level are highlighted in boldface. Data Algorithms Number of queries (percentage of the unlabeled data) 5% 10% 20% 30% 40% 50% 80% austra RANDOM .868±.027 .894±.022 .897±.023 .901±.022 .909±.015 .909±.012 .917±.011 MARGIN .751±.137 .838±.119 .885±.043 .909±.010 .911±.012 .914±.009 .915±.008 CLUSTER .877±.045 .888±.029 .894±.015 .896±.015 .903±.014 .907±.015 .913±.011 IDE .858±.101 .885±.058 .902±.012 .912±.008 .913±.009 .914±.007 .916±.007 DUAL .866±.037 .878±.036 .875±.018 .876±.016 .879±.013 .881±.013 .904±.008 QUIRE .887±.014 .901±.010 .906±.016 .912±.009 .914±.009 .915±.007 .916±.007 digit1 RANDOM .945±.009 .969±.006 .979±.005 .984±.003 .985±.003 .988±.003 .991±.002 MARGIN .941±.028 .972±.009 .989±.002 .992±.002 .992±.002 .992±.002 .992±.002 CLUSTER .938±.035 .952±.018 .963±.019 .974±.011 .985±.002 .988±.003 .992±.002 IDE .954±.011 .973±.007 .987±.002 .991±.002 .992±.002 .992±.002 .992±.002 DUAL .929±.014 .953±.009 .975±.004 .982±.005 .985±.003 .987±.003 .991±.002 QUIRE .976±.006 .986±.003 .990±.002 .992±.002 .992±.002 .992±.002 .992±.002 g241n RANDOM .713±.040 .769±.021 .822±.018 .854±.016 .873±.015 .886±.012 .906±.014 MARGIN .700±.057 .751±.048 .830±.022 .864±.019 .896±.012 .911±.008 .918±.008 CLUSTER .720±.038 .770±.024 .815±.018 .835±.021 .860±.022 .880±.013 .909±.009 IDE .727±.030 .786±.029 .840±.017 .866±.016 .883±.013 .899±.011 .916±.010 DUAL .722±.040 .751±.019 .822±.011 .838±.022 .865±.016 .881±.012 .912±.007 QUIRE .757±.035 .825±.019 .857±.020 .884±.013 .900±.009 .912±.006 .920±.009 isolet RANDOM .995±.006 .998±.002 .999±.001 1.00±.000 1.00±.000 1.00±.000 1.00±.000 MARGIN .965±.052 .999±.001 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 CLUSTER .998±.002 .999±.002 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 IDE .998±.003 .999±.002 .999±.001 1.00±.001 1.00±.000 1.00±.000 1.00±.000 DUAL .993±.008 .999±.001 .999±.001 1.00±.000 1.00±.001 1.00±.000 1.00±.000 QUIRE .997±.002 .999±.001 .999±.001 1.00±.000 1.00±.001 1.00±.000 1.00±.000 titato RANDOM .762±.033 .861±.031 .954±.023 .979±.011 .991±.007 .997±.004 1.00±.000 MARGIN .645±.096 .753±.078 .946±.043 .998±.001 1.00±.000 1.00±.000 1.00±.000 CLUSTER .717±.087 .806±.054 .908±.031 .971±.021 .989±.010 .997±.003 1.00±.000 IDE .735±.040 .906±.029 .996±.003 .999±.001 1.00±.001 1.00±.000 1.00±.000 DUAL .708±.069 .782±.064 .900±.027 .981±.012 .995±.006 .999±.001 1.00±.000 QUIRE .736±.037 .861±.025 .991±.004 .999±.001 1.00±.000 1.00±.000 1.00±.000 vehicle RANDOM .818±.064 .864±.039 .925±.032 .949±.026 .968±.016 .975±.013 .989±.006 MARGIN .693±.078 .828±.077 .883±.105 .981±.014 .993±.005 .993±.005 .992±.005 CLUSTER .771±.088 .845±.056 .927±.022 .955±.018 .973±.010 .978±.011 .992±.006 IDE .731±.141 .849±.106 .878±.093 .957±.037 .977±.010 .985±.009 .991±.006 DUAL .680±.074 .706±.114 .817±.061 .875±.035 .908±.035 .947±.035 .980±.016 QUIRE .750±.137 .912±.024 .956±.025 .985±.007 .989±.006 .991±.005 .992±.005 wdbc RANDOM .984±.006 .986±.005 .990±.004 .991±.004 .991±.004 .991±.004 .993±.003 MARGIN .967±.038 .990±.002 .993±.003 .993±.003 .993±.003 .993±.003 .993±.003 CLUSTER .981±.007 .987±.004 .991±.003 .992±.003 .992±.003 .993±.003 .993±.003 IDE .983±.006 .984±.008 .990±.004 .992±.003 .993±.003 .993±.003 .993±.003 DUAL .955±.025 .964±.016 .972±.015 .988±.009 .992±.003 .992±.003 .992±.004 QUIRE .985±.006 .990±.004 .993±.003 .993±.003 .993±.003 .993±.003 .993±.003 letterDvsP RANDOM .990±.004 .995±.002 .997±.002 .998±.001 .998±.001 .998±.001 .999±.001 MARGIN .994±.005 .999±.001 .999±.000 .999±.001 .999±.001 .999±.001 .999±.001 CLUSTER .988±.008 .995±.004 .997±.002 .998±.001 .999±.001 .999±.001 .999±.001 IDE .992±.006 .997±.002 .998±.001 .999±.001 .999±.001 .999±.001 .999±.001 DUAL .978±.005 .986±.001 .988±.004 .990±.004 .996±.001 .998±.001 .999±.001 QUIRE .998±.001 .999±.001 .999±.001 .999±.001 .999±.001 .999±.001 .999±.001 letterEvsF RANDOM .977±.020 .988±.009 .994±.002 .997±.002 .998±.001 .999±.001 1.00±.000 MARGIN .987±.008 .999±.001 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 CLUSTER .975±.016 .991±.003 .997±.004 .999±.001 1.00±.000 1.00±.000 1.00±.000 IDE .977±.014 .995±.003 .999±.000 .999±.000 .999±.000 1.00±.000 1.00±.000 DUAL .976±.011 .993±.003 .996±.002 .996±.002 .996±.002 .998±.001 1.00±.000 QUIRE .988±.009 .999±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 letterIvsJ RANDOM .943±.025 .966±.017 .980±.004 .983±.005 .985±.005 .987±.004 .990±.004 MARGIN .882±.096 .960±.027 .986±.005 .989±.006 .991±.004 .991±.004 .991±.004 CLUSTER .952±.022 .961±.017 .976±.008 .985±.007 .987±.006 .989±.005 .991±.004 IDE .934±.030 .969±.011 .979±.006 .980±.006 .982±.008 .985±.005 .990±.004 DUAL .819±.120 .897±.058 .934±.030 .954±.017 .959±.014 .953±.015 .988±.004 QUIRE .951±.023 .963±.013 .976±.011 .989±.010 .991±.004 .991±.004 .991±.004 letterMvsN RANDOM .977±.010 .992±.002 .994±.003 .996±.002 .997±.001 .997±.001 .998±.001 MARGIN .964±.040 .991±.014 .999±.000 .999±.000 .999±.000 .999±.000 .999±.000 CLUSTER .971±.017 .986±.009 .994±.003 .997±.002 .998±.001 .998±.001 .999±.000 IDE .969±.017 .988±.007 .997±.002 .998±.001 .998±.001 .998±.001 .999±.000 DUAL .950±.025 .972±.011 .974±.007 .980±.008 .983±.007 .983±.007 .998±.001 QUIRE .986±.007 .996±.003 .998±.001 .999±.000 .999±.000 .999±.000 .999±.000 letterUvsV RANDOM .992±.005 .996±.004 .998±.001 .999±.000 1.00±.000 1.00±.000 1.00±.000 MARGIN .998±.002 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 CLUSTER .990±.008 .996±.009 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 IDE .995±.004 .999±.001 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 DUAL .983±.014 .986±.008 .990±.008 .991±.008 .993±.007 .995±.005 .999±.000 QUIRE .999±.001 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 1.00±.000 parameters is used (performances with linear kernel are not as stable as that with RBF kernel). LibSVM [4] is used to train a SVM classifier for all active learning approaches in comparison. 7 Table 2: Win/tie/loss counts of QUIRE versus the other methods with varied numbers of queries. Algorithms Number of queries (percentage of the unlabeled data) 5% 10% 20% 30% 40% 50% 80% In All RANDOM 4/8/0 8/4/0 9/3/0 9/2/1 10/2/0 10/2/0 6/6/0 56/27/1 MARGIN 6/6/0 4/7/1 2/8/2 2/8/2 0/11/1 0/11/1 1/11/0 15/62/7 CLUSTER 6/6/0 7/5/0 8/4/0 11/1/0 9/3/0 6/6/0 3/9/0 50/34/0 IDE 6/6/0 6/5/1 6/5/1 8/4/0 8/4/0 8/4/0 2/10/0 44/38/2 DUAL 8/4/0 10/2/0 11/1/0 10/2/0 10/2/0 11/1/0 9/3/0 69/15/0 In All 30/30/0 35/23/2 36/21/3 40/17/3 37/22/1 35/24/1 21/39/0 234/176/10 4.1 Results Figure 2 shows the classification accuracy of different active learning approaches with varied numbers of queries. Table 1 shows the AUC values, with 5%, 10%, 20%, 30%, 40%, 50% and 80% of unlabeled data used as queries. For each case, the best result and its comparable performances are highlighted in boldface based on paired t-tests at 95% significance level. Table 2 summarizes the win/tie/loss counts of QUIRE versus the other methods based on the same test. We also perform the Wilcoxon signed ranks test at 95% significance level, and obtain almost the same results, which can be found in the supplementary document. First, we observe that the RANDOM approach tends to yield decent performance when the number of queries is very small. However, as the number of queries increases, this simple approach loses its edge and often is not as effective as the other active learning approaches. MARGIN, the most commonly used approach for active learning, is not performing well at the beginning of the learning stage. As the number of queries increases, we observe that MARGIN catches up with the other approaches and yields decent performance. This phenomenon can be attributed to the fact that with only a few training examples, the learned decision boundary tends to be inaccurate, and as a result, the unlabeled instances closest to the decision boundary may not be the most informative ones. The performance of CLUSTER is mixed. It works well on some data sets, but performs poorly on the others. We attribute the inconsistency of CLUSTER to the fact that the identified cluster structure of unlabeled data may not always be consistent with the target classification model. The behavior of IDE is similar to that of CLUSTER in that it achieves good performance on certain data sets and fails on the others. DUAL does not yield good performance on most data sets although we have tried our best efforts to tune the related parameters. We attribute the failure of DUAL to the setup of our experiment in which no initially labeled examples are provided. Further study shows that starting with a few initially labeled examples does improve the performance of DUAL though it is still significantly outperformed by QUIRE.Detailed results can be found in the supplementary document. Finally, we observe that for most cases, QUIRE is able to outperform the baseline methods significantly, as indicated by Figure 2, Tables 1 and 2. We attribute the success of QUIRE to the principle of choosing unlabeled instances that are both informative and representative, and the specially designed computational framework that appropriately measures and combines the informativeness and representativeness. The computational cost are reported in the supplementary document. 5 Conclusion We propose a new approach for active learning, called QUIRE, that is designed to find unlabeled instances that are both informative and representative. The proposed approach is based on the min-max view of active learning, which provides a systematic way for measuring and combining the informativeness and the representativeness. Our current work is restricted to binary classification. In the future, we plan to extend this work to multi-class learning. We also plan to develop the mechanism which allows the user to control the tradeoff between informativeness and representativeness based on their domain, leading to the incorporation of domain knowledge into active learning algorithms. Acknowledgements This work was supported in part by the NSFC (60635030), 973 Program (2010CB327903), JiangsuSF (BK2008018) and NSF (IIS-0643494). 8 References [1] A. Asuncion and D.J. Newman. UCI machine learning repository, 2007. [2] M. F. Balcan, A. Z. Broder, and T. Zhang. Margin based active learning. In Proceedings of the 20th Annual Conference on Learning Theory, pages 35–50, 2007. [3] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of Machine Learning Research, 7:2399–2434, 2006. [4] C. C. Chang and C. J. Lin. LIBSVM: A library for support vector machines, 2001. [5] O. Chapelle, B. Sch¨olkopf, and A. Zien, editors. Semi-supervised learning. MIT Press, Cambridge, MA, 2006. [6] I. Dagan and S. P. Engelson. Committee-based sampling for training probabilistic classifiers. In Proceedings of the 12th International Conference on Machine Learning, pages 150–157, 1995. [7] S. Dasgupta and D. Hsu. Hierarchical sampling for active learning. In Proceedings of the 25th International Conference on Machine Learning, pages 208–215, 2008. [8] P. Donmez, J. G. Carbonell, and P. N. Bennett. Dual strategy active learning. In Proceedings of the 18th European Conference on Machine Learning, pages 116–127, 2007. [9] P. Flaherty, M. I. Jordan, and A. P. Arkin. Robust design of biological experiments. In Advances in Neural Information Processing Systems 18, pages 363–370, 2005. [10] Y. Freund, H. S. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28(2-3):133–168, 1997. [11] S. C. H. Hoi, R. Jin, J. Zhu, and M. R. Lyu. Semi-supervised svm batch mode active learning for image retrieval. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2008. [12] D. D. Lewis and J. Catlett. Heterogeneous uncertainty sampling for supervised learning. In Proceedings of the 11th International Conference on Machine Learning, pages 148–156, 1994. [13] D. D. Lewis and W. A. Gale. A sequential algorithm for training text classifiers. In Proceedings of the 17th Annual International ACM-SIGIR Conference on Research and Development in Information Retrieval, pages 3–12, 1994. [14] H. T. Nguyen and A. W. M. Smeulders. Active learning using pre-clustering. In Proceedings of the 21st International Conference on Machine Learning, pages 623–630, 2004. [15] R. Rifkin R, G. Yeo, and T. Poggio. Regularized least squares classification. In S. Basu C. Micchelli J. A. K. Suykens, G. Horvath and J. Vandewalle, editors, Advances in Learning Theory: Methods, Model and Applications, NATO Science Series III: Computer and Systems Sciences. Volume 190, pages 131–154, 2003. [16] B. Settles. Active learning literature survey. Computer Sciences Technical Report 1648, University of Wisconsin–Madison, 2009. [17] H. S. Seung, M. Opper, and H. Sompolinsky. Query by committee. In Proceedings of the 5th ACM Workshop on Computational Learning Theory, pages 287–294, 1992. [18] S. Tong and D. Koller. Support vector machine active learning with applications to text classification. In Proceedings of the 17th International Conference on Machine Learning, pages 999–1006, 2000. [19] Z. Xu, K. Yu, V. Tresp, X. Xu, and J. Wang. Representative sampling for text classification using support vector machines. In Proceedings of the 25th European Conference on Information Retrieval Research, pages 393–407, 2003. [20] K. Yu, J. Bi, and V. Tresp. Active learning via transductive experimental design. In Proceedings of the 23th International Conference on Machine Learning, pages 1081–1088, 2006. 9
2010
107
3,863
Optimal Bayesian Recommendation Sets and Myopically Optimal Choice Query Sets Paolo Viappiani∗ Department of Computer Science University of Toronto paolo.viappiani@gmail.com Craig Boutilier Department of Computer Science University of Toronto cebly@cs.toronto.edu Abstract Bayesian approaches to utility elicitation typically adopt (myopic) expected value of information (EVOI) as a natural criterion for selecting queries. However, EVOI-optimization is usually computationally prohibitive. In this paper, we examine EVOI optimization using choice queries, queries in which a user is ask to select her most preferred product from a set. We show that, under very general assumptions, the optimal choice query w.r.t. EVOI coincides with the optimal recommendation set, that is, a set maximizing the expected utility of the user selection. Since recommendation set optimization is a simpler, submodular problem, this can greatly reduce the complexity of both exact and approximate (greedy) computation of optimal choice queries. We also examine the case where user responses to choice queries are error-prone (using both constant and mixed multinomial logit noise models) and provide worst-case guarantees. Finally we present a local search technique for query optimization that works extremely well with large outcome spaces. 1 Introduction Utility elicitation is a key component in many decision support applications and recommender systems, since appropriate decisions or recommendations depend critically on the preferences of the user on whose behalf decisions are being made. Since full elicitation of user utility is prohibitively expensive in most cases (w.r.t. time, cognitive effort, etc.), we must often rely on partial utility information. Thus in interactive preference elicitation, one must selectively decide which queries are most informative relative to the goal of making good or optimal recommendations. A variety of principled approaches have been proposed for this problem. A number of these focus directly on (myopically or heuristically) reducing uncertainty regarding utility parameters as quickly as possible, including max-margin [10], volumetric [12], polyhedral [22] and entropy-based [1] methods. A different class of approaches does not attempt to reduce utility uncertainty for its own sake, but rather focuses on discovering utility information that improves the quality of the recommendation. These include regret-based [3, 23] and Bayesian [7, 6, 2, 11] models. We focus on Bayesian models in this work, assuming some prior distribution over user utility parameters and conditioning this distribution on information acquired from the user (e.g., query responses or behavioral observations). The most natural criterion for choosing queries is expected value of information (EVOI), which can be optimized myopically [7] or sequentially [2]. However, optimization of EVOI for online query selection is not feasible except in the most simple cases. Hence, in practice, heuristics are used that offer no theoretical guarantees with respect to query quality. In this paper we consider the problem of myopic EVOI optimization using choice queries. Such queries are commonly used in conjoint analysis and product design [15], requiring a user to indicate which choice/product is most preferred from a set of k options. We show that, under very general assumptions, optimization of choice queries reduces to the simpler problem of choosing the optimal recommendation set, i.e., the set of k products such that, if a user were forced to choose one, ∗From 9/2010 to 12/2010 at the University of Regina; from 01/2011 onwards at Aalborg University. 1 maximizes utility of that choice (in expectation). Not only is the optimal recommendation set problem somewhat easier computationally, it is submodular, admitting a greedy algorithm with approximation guarantees. Thus, it can be used to determine approximately optimal choice queries. We develop this connection under several different (noisy) user response models. Finally, we describe query iteration, a local search technique that, though it has no formal guarantees, finds near-optimal recommendation sets and queries much faster than either exact or greedy optimization. 2 Background: Bayesian Recommendation and Elicitation We assume a system is charged with the task of recommending an option to a user in some multiattribute space, for instance, the space of possible product configurations from some domain (e.g., computers, cars, rental apartments, etc.). Products are characterized by a finite set of attributes X = {X1, ...Xn}, each with finite domain Dom(Xi). Let X ⊆Dom(X) denote the set of feasible configurations. For instance, attributes may correspond to the features of various cars, such as color, engine size, fuel economy, etc., with X defined either by constraints on attribute combinations (e.g., constraints on computer components that can be put together) or by an explicit database of feasible configurations (e.g., a rental database). The user has a utility function u : Dom(X) →R. The precise form of u is not critical, but in our experiments we assume that u(x; w) is linear in the parameters (or weights) w (e.g., as in generalized additive independent (GAI) models [8, 5].) We often refer to w as the user’s “utility function” for simplicity, assuming a fixed form for u. A simple additive model in the car domain might be: u(Car; w) = w1f1(MPG) + w2f2(EngineSize) + w3f3(Color). The optimal product x∗ w for a user with utility parameters w is the x ∈X that maximizes u(x; w). Generally, a user’s utility function w will not be known with certainty. Following recent models of Bayesian elicitation, the system’s uncertainty is reflected in a distribution, or beliefs, P(w; θ) over the space W of possible utility functions [7, 6, 2]. Here θ denotes the parameterization of our model, and we often refer to θ as our belief state. Given P(·; θ), we define the expected utility of an option x to be EU (x; θ) = R W u(x; w)P(w; θ)dw. If required to make a recommendation given belief θ, the optimal option x∗(θ) is that with greatest expected utility EU ∗(θ) = maxx∈X EU (x; θ), with x∗(θ) = arg maxx∈X EU (x; θ). In some settings, we are able to make set-based recommendations: rather than recommending a single option, a small set of k options can be presented, from which the user selects her most preferred option [15, 20, 23]. We discuss the problem of constructing an optimal recommendation set S further below. Given recommendation set S with x ∈S, let S ⊲x denote that x has the greatest utility among those items in S (for a given utility function w). Given feasible utility space W, we define W ∩S ⊲x ≡{w ∈W : u(x; w) ≥u(y; w), ∀y ̸= x, y ∈S} to be those utility functions satisfying S ⊲x. Ignoring “ties” over full-dimensional subsets of W (which are easily dealt with, but complicate the presentation), the regions W ∩S ⊲xi, xi ∈S, partition utility space. A recommender system can refine its belief state θ by learning more about the user’s utility function w. A reduction in uncertainty will lead to better recommendations (in expectation). While many sources of information can be used to assess a user preferences—including the preferences of related users, as in collaborative filtering [14], or observed user choice behavior [15, 19]—we focus on explicit utility elicitation, in which a user is asked questions about her preferences. There are a variety of query types that can be used to refine one’s knowledge of a user’s utility function (we refer to [13, 3, 5] for further discussion). Comparison queries are especially natural, asking a user if she prefers one option x to another y. These comparisons can be localized to specific (subsets of) attributes in additive or GAI models, and such structured models allow responses w.r.t. specific options to “generalize,” providing constraints on the utility of related options. In this work we consider the extension of comparions to choice sets of more than two options [23] as is common in conjoint analysis [15, 22]. Any set S can be interpreted as a query: the user states which of the k elements xi ∈S she prefers. We refer to S interchangeably as a query or a choice set. The user’s response to a choice set tells us something about her preferences; but this depends on the user response model. In a noiseless model, the user correctly identifies the preferred item in the slate: the choice of xi ∈S refines the set of feasible utility functions W by imposing k −1 linear constraints of the form u(xi; w) ≥u(xj; w), j ̸= i, and the new belief state is obtained by 2 restricting θ to have non-zero density only on W ∩S ⊲xi and renormalizing. More generally, a noisy response model allows that a user may select an option that does not maximize her utility. For any choice set S with xi ∈S, let S ⇝xi denote the event of the user selecting xi. A response model R dictates, for any choice set S, the probability PR(S ⇝xi; w) of any selection given utility function w. When the beliefs about a user’s utility are uncertain, we define PR(S ⇝xi; θ) = R W PR(S ⇝ xi; w)P(w; θ)dw. We discuss various response models below. When treating S as a query set (as opposed to a recommendation set), we are not interested in its expected utility, but rather in its expected value of information (EVOI), or the (expected) degree to which a response will increase the quality of the system’s recommendation. We define: Definition 1 Given belief state θ, the expected posterior utility (EPU ) of query set S under R is EPU R(S; θ) = X x∈S PR(S ⇝x; θ) EU ∗(θ|S ⇝x) (1) EVOI (S; θ) is then EPU (S; θ) −EU ∗(θ), the expected improvement in decision quality given S. An optimal query (of fixed size k) is any S with maximal EV OI, or equivalently, maximal EPU . In many settings, we may wish to present a set of options to a user with the dual goals of offering a good set of recommendations and eliciting valuable information about user utility. For instance, product navigation interfaces for e-commerce sites often display a set of options from which a user can select, but also give the user a chance to critique the proposed options [24]. This provides one motivation for exploring the connection between optimal recommendation sets and optimal query sets. Moreover, even in settings where queries and recommendation are separated, we will see that query optimization can be made more efficient by exploiting this relationship. 3 Optimal Recommendation Sets We consider first the problem of computing optimal recommendation sets given the system’s uncertainty about the user’s true utility function w. Given belief state θ, if a single recommendation is to be made, then we should recommend the option x∗(θ) that maximizes expected utility EU (x, θ). However, there is often value in suggesting a “shortlist” containing multiple options and allowing the user to select her most preferred option. Intuitively, such a set should offer options that are diverse in the following sense: recommended options should be highly preferred relative to a wide range of “likely” user utility functions (relative to θ) [23, 20, 4]. This stands in contrast to some recommender systems that define diversity relative to product attributes [21], with no direct reference to beliefs about user utility. It is not hard to see that “top k” systems, those that present the k options with highest expected utility, do not generally result in good recommendation sets [20]. In broad terms, we assume that the utility of a recommendation set S is the utility of its most preferred item. However, it is unrealistic to assume that users will select their most preferred item with complete accuracy [17, 15]. So as with choice queries, we assume a response model R dictating the probability PR(S ⇝x; θ) of any choice x from S: Definition 2 The expected utility of selection (EUS) of recommendation set S given θ and R is: EUS R(S; θ) = X x∈S PR(S ⇝x; θ)EU (x; θ|S ⇝x) (2) We can expand the definition to rewrite EUS R(S; θ) as: EUS R(S; θ) = Z W [ X x∈S PR(S ⇝x; w) u(x; w)]P(w; θ)dw (3) User behavior is largely dictated by the response model R. In the ideal setting, users would always select the option with highest utility w.r.t. her true utility function w. This noiseless model is assumed in [20] for example. However, this is unrealistic in general. Noisy response models admit user “mistakes” and the choice of optimal sets should reflect this possibility (just as belief update does, 3 see Defn. 1). Possible constraints on response models include: (i) preference bias: a more preferred outcome in the slate given w is selected with probability greater than a less preferred outcome; and (ii) Luce’s choice axiom [17], a form of independence of irrelevant alternatives that requires that the relative probability (if not 0 or 1) of selecting any two items x and y from S is not affected by the addition or deletion of other items from the set. We consider three different response models: • In the noiseless response model, RNL, we have PNL(S ⇝x; w) = Q y∈S I[u(x; w) ≥u(y; w)] (with indicator function I). Then EUS becomes EUS NL(S; θ) = Z W [max x∈S u(x; w)]P(w; θ)dw. This is identical to the expected max criterion of [20]. Under RNL we have S ⇝x iff S ⊲x. • The constant noise model RC assumes a multinomial distribution over choices or responses where each option x, apart from the most preferred option x∗ w relative to w, is selected with (small) constant probability PC(S ⇝x; w) = β, with β independent of w. We assume β < 1 k, so the most preferred option is selected with probability PC(S ⇝x∗ w; w) = α = 1 −(k −1)β > β. This generalizes the model used in [10, 2] to sets of any size. If x∗ w(S) the optimal element in S given w, and u∗ w(S) is its utility, then EUS is: EUS C(S; θ) = Z W [αu∗ w(S) + X y∈S−{x∗w(S)} βu(x; w)]P(w; θ)dw • The logistic response model RL is commonly used in choice modeling, and is variously known as the Luce-Sheppard [16], Bradley-Terry [11], or mixed multinomial logit model. Selection probabilities are given by PL(S ⇝x; w) = exp(γu(x;w)) P y∈S exp(γu(y;w)), where γ is a temperature parameter. For comparison queries (i.e., |S| = 2), RL is the logistic function of the difference in utility between the two options. We now consider properties of the expected utility of selection EUS under these various models. All three models satisfy preference bias, but only RNL and RL satisfy Luce’s choice axiom. EUS is monotone under the noiseless response model RNL: the addition of options to a recommendation set S cannot decrease its expected utility EUS NL(S; θ). Moreover, say that option xi dominates xj relative to belief state θ, if u(xi; w) > u(xj; w) for all w with nonzero density. Adding a set-wise dominated option x to S (i.e., an x dominated by some element of S) does not change expected utility under RNL: EUS NL(S ∪{x}; θ) = EUS NL(S; θ). This stands in constrast to noisy response models, where adding dominated options might actually decrease expected utility. Importantly, EUS is submodular for both the noiseless and the constant response models RC: Theorem 1 For R ∈{RNL, RC}, EUS R is a submodular function of the set S. That is, given recommendation sets S ⊆Q, option x ̸∈S, S′ = S ∪{x}, and Q′ = Q ∪{x}, we have: EUS R(S′; θ) −EUS R(S; θ) ≥EUS R(Q′; θ) −EUS R(Q; θ) (4) The proof is omitted, but simply shows that EUS has the required property of diminishing returns. Submodularity serves as the basis for a greedy optimization algorithm (see Section 5 and worst-case results on query optimization below). EUS under the commonly used logistic response model RL is not submodular, but can be related to EUS under the noiseless model—as we discuss next—allowing us to exploit submodularity of the noiseless model when optimizing w.r.t. RL. 4 The Connection between EUS and EPU We now develop the connection between optimal recommendation sets (using EUS) and optimal choice queries (using EPU/EVOI). As discussed above, we’re often interested in sets that can serve as both good recommendations and good queries; and since EPU/EVOI can be computationally difficult, good methods for EUS-optimization can serve to generate good queries as well if we have a tight relationship between the two. 4 In the following, we make use of a transformation Tθ,R that modifies a set S in such a way that EUS usually increases (and in the case of RNL and RC cannot decrease). This transformation is used in two ways: (i) to prove the optimality (near-optimality in the case of RL) of EUS-optimal recommendation sets when used as query sets; (ii) and directly as a computationally viable heuristic strategy for generating query sets. Definition 3 Let S = {x1, · · · , xk} be a set of options. Define: Tθ,R(S) = {x∗(θ|S ⇝x1; R), · · · , x∗(θ|S ⇝xk; R)} where x∗(θ|S ⇝xi; R) is the optimal option (in expectation) when θ is conditioned on S ⇝xi w.r.t. R. Intuitively, T (we drop the subscript when θ, R are clear from context) refines a recommendation set S of size k by producing k updated beliefs for each possible user choice, and replacing each option in S with the optimal option under the corresponding update. Note that T generally produces different sets under different response models. Indeed, one could use T to construct a set using one response model, and measure EUS or EPU of the resulting set under a different response model. Some of our theoretical results use this type of “cross-evaluation.” We first show that optimal recommendation sets under both RNL and RC are optimal (i.e., EPU/EVOI-maximizing) query sets. Lemma 1 EUS R(Tθ,R(S); θ) ≥EPU R(S; θ) for R ∈{NL, C} Proof: For the RNL, the argument relies on partitioning W w.r.t. options in S: EPUNL(S; θ) = X i,j P (S ⊲xi, T (S)⊲x′ j; θ)EU(x′ i, θ[S ⊲xi, T (S)⊲x′ j]) (5) EUSNL(T (S); θ) = X i,j P (S ⊲xi, T (S)⊲x′ j ; θ)EU(x′ j; θ[S ⊲xi, T (S)⊲x′ j]) (6) Compare the two expression componentwise: 1) If i = j then the components of each expression are the same. 2) If i ̸= j, for any w with nonzero density in θ[S ⊲xi, T (S) ⊲x′ j], we have u(x′ j; w) ≥u(x′ i, w), thus EU (x′ j) ≥EU (xi) in the region S ⊲xi, T (S) ⊲x′ j. Since EUSNL(T (S); ·) ≥ EPU NL(S; ·) in each component, the result follows. For RC the proof uses the same argument, along with the observation that: EUSC(S; θ) = P i P (S ⊲ xi; θ)(α EU(xi, θ[S ⊲xi]) + β P j̸=i EU(sj, θ[S ⊲xi])). From Lemma 1 and the fact that EUS R(S; θ) ≤EPUR(S, θ), it follows that EUS R(T (S); θ) ≥ EUS R(S; θ). We now state the main theorem (we assume the size k of S is fixed): Theorem 2 Assume response model R ∈{NL, C} and let S∗be an optimal recommendation set. Then S∗is an optimal query set: EPU (S∗; θ) ≥EPU (S; θ), ∀S ∈Xk Proof: Suppose S∗is not an optimal query set, i.e., there is some S s.t. EPU(S; θ) > EPU(S∗; θ). Applying T to S gives a new query set T (S), which by the results above shows: EUS(T (S); θ) ≥EPU(S; θ) > EPU(S∗; θ) ≥EUS(S∗; θ). This contradicts the EUS-optimality of S∗. Another consequence of Lemma 1 is that posing a query S involving an infeasible option is pointless: there is always a set with only elements in X with EPU/EVOI at least as great. This is proved by observing the lemma still holds if T is redefined to allow sets containing infeasible options. It is not hard to see that admitting noisy responses under the logistic response model RL can decrease the value of a recommendation set, i.e., EUS L(S; θ) ≤EUS NL(S; θ). However, the loss in EUS under RL can in fact be bounded. The logistic response model is such that, if the probability of incorrect selection of some option is high, then the utility of that option must be close to that of the best item, so the relative loss in utility is small. Conversely, if the loss associated with some incorrect selection is great, its utility must be significantly less than that of the best option, rendering such an event extremely unlikely. This allows us to bound the difference between EUS NL and EUS L at some value ∆max that depends only on the set cardinality k and on the temperature parameter γ (we derive an expression for ∆max below): Theorem 3 EUS L(S; θ) ≥EUS NL(S; θ) −∆max. Under RL, our transformation TL does not, in general, improve the value EUS L(S) of a recommendation set S. However the set TL(S) is such that its value EUS NL, assuming selection under the noiseless model, is greater than the expected posterior utility EPU L(S) under RL: 5 Lemma 2 EUS NL(TL(S); θ) ≥EPU L(S; θ) We use this fact below to prove the optimal recommendation set under RL is a near-optimal query under RL. It has two other consequences: First, from Thm. 3 it follows that EUS L(TL(S); θ) ≥ EPU L(S; θ) −∆max. Second, EPU of the optimal query under the noiseless model is at least as great that of the optimal query under the logistic model: EPU ∗ NL(θ) ≥EPU ∗ L(θ).1 We now derive our main result for logistic responses: the EUS of the optimal recommendation set (and hence its EPU) is at most ∆max less than the EPU of the optimal query set. Theorem 4 EUS ∗ L(θ) ≥EPU ∗ L(θ) −∆max. Proof: Consider the optimal query S∗ L and the set S′ = TL(S∗ L) obtained by applying TL. From Lemma 2, EUSNL(S′; θ) ≥EPU L(S∗ L, θ) = EPU ∗ L(θ). From Thm. 3, EUSL(S′; θ) ≥EUSNL(S′; θ) −∆max; and from Thm. 2, EUS∗ NL(θ) = EPU ∗ NL(θ). Thus EUS∗ L(θ) ≥ EUSL(S′; θ) ≥EUSNL(S′; θ) −∆max ≥EPU ∗ L(θ) −∆max The loss ∆(S; θ) = EUS NL(S; θ) −EUS L(S; θ) in the EUS of set S due to logistic noise can be characterized as a function of the utility difference z = u(x1) −u(x2) between options x1 and x2 of S, and integrating over the possible values of z (weighted by θ). For a specific value of z ≥0, EUS-loss is exactly the utility difference z times the probability of choosing the less preferred option under RL: 1 −L(γz) = L(−γz) where L is the logistic function. We have ∆(S; θ) = R +∞ −∞|z| · 1 1+eγ|z| P(z; θ)dz. We derive a problem-independent upper bound on ∆(S; θ) for any S, θ by maximizing f(z) = z · 1 1+eγz with z ≥0. The maximal loss ∆max = f(zmax) for a set of two hypothetical items s1 and s2 is attained by having the same utility difference u(s1, w) − u(s2, w) = zmax for any w ∈W. By imposing ∂f ∂z = 0, we obtain e−γz −γz +1 = 0. Numerically, this yields zmax ∼1.279 1 γ and ∆max ∼0.2785 1 γ . This bound can be expressed on a scale that is independent of the temperature parameter γ; intuitively, ∆max corresponds to a utility difference so slight that the user identifies the best item only with probability 0.56 under RL with temperature γ. In other words, the maximum loss is so small that the user is unable able to identify the preferred item 44% of the time when asked to compare the two items in S. This derivation can be generalized to sets of any size k, yielding ∆k max = 1 γ · LW( k−1 e ), where LW (·) is the Lambert W function.2 5 Set Optimization Strategies We discuss several strategies for the optimization of query/recommendation sets in this section, and summarize their theoretical and computational properties. In what follows, n is the number of options |X|, k the size of the query/recommendation set, and l is the “cost” of Bayesian inference (e.g., the number of particles in a Monte Carlo sampling procedure). Exact Methods The naive maximization of EPU is more computationally intensive than EUSoptimization, and is generally impractical. Given a set S of k elements, computing EPU (S, θ) requires Bayesian update of θ for each possible response, and expected utility optimization for each such posterior. Query optimization requires this be computed for nk possible query sets. Thus EPU maximization is O(nk+1kl). Exact EUS optimization, while still quite demanding, is only O(nkkl) as it does not require EU-maximization in updated distributions. Thm. 2 allows us to compute optimal query sets using EUS-maximization under RC and RNL, reducing complexity by a factor of n. Under RL, Thm. 4 allows us to use EUS-optimization to approximate the optimal query, with a quality guarantee of EPU ∗−∆max. Greedy Optimization A simple greedy algorithm can be used construct a recommendation set of size k by iteratively adding the option offering the greatest improvement in value: arg maxx EUS R(S ∪{x}; θ). Under RNL and RC, since EUS is submodular (Thm. 1), the greedy algorithm determines a set with EUS that is within η = 1 −( k−1 k )k of the optimal value 1EPU L(S; θ) is not necessarily less than EPU NL(S; θ): there are sets S for which a noisy response might be “more informative” than a noiseless one. However, this is not the case for optimal query sets. 2Lambert W, or product-log, is defined as the principal value of the inverse of x · ex. The loss-maximizing set Smax may contain infeasible outcomes; so in practice loss may be much lower. 6 EUS∗= EPU ∗[9].3 Thm. 2 again allows us to use greedy maximization of EUS to determine a query set with similar gaurantees. Under RL, EUS L is no longer submodular. However, Lemma 2 and Thm. 3 allow us to use EUS NL, which is submodular, as a proxy. Let Sg the set determined by greedy optimization of EUS NL. By submodularity, η · EUS ∗ NL ≤EUS NL(Sg) ≤EUS ∗ NL; we also have EUS ∗ L ≤EUS ∗ NL. Applying Thm. 3 to Sg gives: EUS L(Sg) ≥EUS NL(Sg) −∆. Thus, we derive EUS L(Sg) EUS ∗ L ≥η · EUS ∗ NL −∆ EUS ∗ L ≥η · EUS ∗ NL −∆ EUS ∗ NL ≥η − ∆ EUS ∗ NL (7) Similarly, we derive a worst-case bound for EPU w.r.t. greedy EUS-optimization (using the fact that EUS is a lower bound for EPU, Thm. 3 and Thm. 2): EPU L(Sg) EPU ∗ L ≥EUS L(Sg) EPU ∗ L ≥η · EUS ∗ NL −∆ EPU ∗ NL = η · EUS ∗ NL −∆ EUS ∗ NL ≥η − ∆ EUS ∗ NL (8) Greedy maximization of S w.r.t. EUS is extremely fast, O(k2ln), or linear in the number of options n: it requires O(kn) evaluations of EUS, each with cost kl.4 Query Iteration The T transformation (Defn. 3) gives rise to a natural heuristic method for computing, good query/recommendationsets. Query iteration (QI) starts with an initial set S, and locally optimizes S by repeatedly applying operator T (S) until EUS(T (S); θ)=EUS(S; θ). QI is sensitive to the initial set S, which can lead to different fixed points. We consider several initialization strategies: random (randomly choose k options), sampling (include x∗(θ), and sample k −1 points wi from P(w; θ), and for each of these add the optimal item to S, while forcing distinctness) and greedy (initialize with the greedy set Sg). We can bound the performance of QI relative to optimal query/recommendation sets assuming RNL or RC. If QI is initialized with Sg, performance is no worse than greedy optimization. If initialized with an arbitrary set, we note that, because of submodularity, EU ∗≤EUS ∗≤kEU ∗. The condition T (S) = S implies EUS(S) = EPU (S). Also note that, for any set Q, EPU (Q) ≥EU ∗. Thus, EUS(S) ≥1 kEUS ∗. This means for comparison queries (|S| = 2), QI achieves at least 50% of the optimal recommendation set value. This bound is tight and corresponds to the singleton degenerate set Sd = {x∗(θ), .., x∗(θ)} = {x∗(θ)}. This solution is problematic since T (Sd) = Sd and has EVOI of zero. However, under RNL, QI with sampling initialization avoids this fixed point provably by construction, always leading to a query set with positive EVOI. Complexity of one iteration of QI is O(nk + lk), i.e., linear in the number of options, exactly like Greedy. However, in practice it is much faster than Greedy since typically k << l. While we have no theoretical results that limit the iterations required by QI to converge, in practice, a fixed point is reached in very quickly (see below). Evaluation We compare the strategies above empirically on choice problems with random user utility functions using both noiseless and noisy response models.5 Bayesian inference is realized by a Monte Carlo method with importance sampling (particle weights are determined by applying the response model to observed responses). To overcome the problem of particle degeneration (most particles eventually have low or zero weight), we use slice-sampling [18] to regenerate particles w.r.t. to the response-updated belief state θ whenever the effective number of samples drops significantly (50000 particles were used in the simulations). Figure 1(a) shows the average loss of our strategies in an apartment rental dataset, with 187 outcomes, each characterized by 10 attributes (either numeric or categorical with domain sizes 2–6), when asking pairwise comparison queries with noiseless responses. We note that greedy performs almost as well as exact optimization, and the optimal item is found in roughly 10–15 queries. Query iteration performs reasonably well when initialized with sampling, but poorly with random seeds. 3This is 75% for comparison queries (k = 2) and at worst 63% (as k →∞). 4A practical speedup can be achieved by maintaining a priority queue of outcomes sorted by their potential EUS-contribution (monotonically decreasing due to submodularity). When choosing the item to add to the set, we only need to evaluate a few outcomes at the top of the queue (lazy evaluation). 5Utility priors are mixtures of 3 Gaussians with µ = U[0, 10] and σ = µ/3 for each component. 7 0 5 10 15 20 25 0 0.2 0.4 0.6 0.8 1 number of queries normalized average loss exactEUS greedy(EUS,NL) QI(sampling) QI(rand) random (a) Average Loss (187 outcomes, 30 runs, RNL) 0 5 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 number of queries normalized average loss QI(greedy,L) greedy(EUS,L) greedy(EUS,NL) QI(sampling,NL) QI(rand,L) random (b) Average Loss (506 outcomes, 30 runs, RL) In the second experiment, we consider the Boston Housing dataset with 506 items (1 binary and 13 continous attributes) and a logistic noise model for responses with γ = 1. We compare the greedy and QI strategies (exact methods are impractical on problems of this size) in Figure 1(b); we also consider a hybrid greedy(EUS,NL) strategy that optimizes “assuming” noiseless responses, but is evaluated using the true response model RL. QI(sampling) is more efficient when using TNL instead of TL and this is the version plotted. Overall these experiments show that (greedy or exact) maximization of EUS is able to find optimal—or near-optimal when responses are noisy—query sets. Finally, we compare query optimization times on the two datasets in the following table: exactEPU exactEUS greedy(EPU,L) QI(greedy(EUS,L)) greedy(EUS,L) greedy(EUS,NL) QI(sampling) QI(rand) n=30, k=2 47.3s 10.3s 1.5s 0.76s 0.65s 0.12s 0.11s 0.11s n=187, k=2 1815s 405s 9.19s 2.07s 1.97s 1.02s 0.15s 0.17s n=187, k=4 10000s 39.7s 7.89s 7.71s 1.86s 0.16s 0.19s n=187, k=6 87.1s 15.7s 15.4s 2.55s 0.51s 0.64s n=506, k=2 14.6s 4.09s 3.99s 0.93s 0.05s 0.06s n=506, k=4 64.9s 15.4s 15.2s 1.12s 0.08s 0.10s n=506, k=6 142s 32.9s 32.8s 1.53s 0.09s 0.13s Among our strategies, QI is certainly most efficient computationally, and is best suited to large outcome spaces. Interestingly, QI is often faster with sampling initialization than with random initialization because it needs fewer iteration on average before convergence (3.1 v.s. 4.0). 6 Conclusions We have provided a novel analysis of set-based recommendations in Bayesian recommender systems, and have shown how it is offers a tractable means of generating myopically optimal or nearoptimal choice queries for preference elicitation. We examined several user response models, showing that optimal recommendation sets are EVOI-optimal queries under noiseless and constant noise models; and that they are near-optimal under the logistic/Luce-Sheppard model (both theoretically and practically). We stress that our results are general and do not depend on the specific implementation of Bayesian update, nor on the specific form of the utility function. Our greedy strategies— exploiting submodularity of EUS computation—perform very well in practice and have theoretical approximation guarantees. Finally our experimental results demonstrate that query iteration, a simple local search strategy, is especially well-situated to large decision spaces. A number of important directions for future research remain. Further theoretical and practical investigation of local search strategies such as query iteration is important. Another direction is the development of strategies for Bayesian recommendation and elicitation in large-scale configuration problems, e.g., where outcomes are specified by a CSP, and for sequential decision problems (such as MDPs with uncertain rewards). Finally, we are interested in elicitation strategies that combine probabilistic and regret-based models. Acknowledgements The authors would like to thank Iain Murray and Cristina Manfredotti for helpful discussion on Monte Carlo methods, sampling techniques and particle filters. This research was supported by NSERC. 8 References [1] Ali Abbas. Entropy methods for adaptive utility elicitation. IEEE Transactions on Systems, Science and Cybernetics, 34(2):169–178, 2004. [2] Craig Boutilier. A POMDP formulation of preference elicitation problems. In Proceedings of the Eighteenth National Conference on Artificial Intelligence (AAAI-02), pp.239–246, Edmonton, 2002. [3] Craig Boutilier, Relu Patrascu, Pascal Poupart, and Dale Schuurmans. Constraint-based optimization and utility elicitation using the minimax decision criterion. Artifical Intelligence, 170(8–9):686–713, 2006. [4] Craig Boutilier, Richard S. Zemel, and Benjamin Marlin. Active collaborative filtering. In Proc. 19th Conference on Uncertainty in Artificial Intelligence (UAI-03), pp.98–106, Acapulco, 2003. [5] Darius Braziunas and Craig Boutilier. Minimax regret-based elicitation of generalized additive utilities. In Proc. 23rd Conference on Uncertainty in Artificial Intelligence (UAI-07), pp.25–32, Vancouver, 2007. [6] U. Chajewska and D. Koller. Utilities as random variables: Density estimation and structure discovery. In Proc. 16th Conference on Uncertainty in Artificial Intelligence (UAI-00), pp.63–71, Stanford, 2000. [7] U. Chajewska, D. Koller, and R. Parr. Making rational decisions using adaptive utility elicitation. In Proc. 17th National Conference on Artificial Intelligence (AAAI-00), pp.363–369, Austin, TX, 2000. [8] Peter C. Fishburn. Interdependence and additivity in multivariate, unidimensional expected utility theory. International Economic Review, 8:335–342, 1967. [9] L. A. Wolsey G. L. Nemhauser and M. L. Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14(1):265–294, December 1978. [10] Krzysztof Gajos and Daniel S. Weld. Preference elicitation for interface optimization. In Patrick Baudisch, Mary Czerwinski, and Dan R. Olsen, editors, UIST, pp.173–182. ACM, 2005. [11] Shengbo Guo and Scott Sanner. Real-time multiattribute bayesian preference elicitation with pairwise comparison queries. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS-10), Sardinia, Italy, 2010. [12] V. S. Iyengar, J. Lee, and M. Campbell. Q-Eval: Evaluating multiple attribute items using queries. In Proceedings of the Third ACM Conference on Electronic Commerce, pp.144–153, Tampa, FL, 2001. [13] Ralph L. Keeney and Howard Raiffa. Decisions with Multiple Objectives: Preferences and Value Tradeoffs. Wiley, New York, 1976. [14] J. A. Konstan, B. N. Miller, D. Maltz, J. L. Herlocker, L. R. Gordon, and J. Riedl. Grouplens: Applying collaborative filtering to usenet news. Communications of the ACM, 40(3):77–87, 1997. [15] Jordan J. Louviere, David A. Hensher, and Joffre D. Swait. Stated Choice Methods: Analysis and Application. Cambridge University Press, Cambridge, 2000. [16] Christopher G. Lucas, Thomas L. Griffiths, Fei Xu, and Christine Fawcett. A rational model of preference learning and choice prediction by children. In Proceedings of the Twenty-Second Annual Conference on Neural Information Processing Systems, Vancouver, Canada, 2008, pp.985–992, 2008. [17] Robert D. Luce. Individual choice behavior: a theoretical analysis. Wiley, New York, 1959. [18] Radford M. Neal. Slice sampling. The Annals of Statistics, 31(3):705–70, 2003. [19] A. Ng and S. Russell. Algorithms for inverse reinforcement learning. In Proc. 17th International Conference on Machine Learning (ICML-00), pp.663–670, Stanford, CA, 2000. [20] Robert Price and Paul R. Messinger. Optimal recommendation sets: Covering uncertainty over user preferences. In Proceedings of the Twentieth National Conference on Artificial Intelligence (AAAI’05), pp.541–548, 2005. [21] James Reilly, Kevin McCarthy, Lorraine McGinty, and Barry Smyth. Incremental critiquing. KnowledgeBased Systems, 18(4–5):143–151, 2005. [22] Olivier Toubia, John Hauser, and Duncan Simester. Polyhedral methods for adaptive choice-based conjoint analysis. Journal of Marketing Research, 41:116–131, 2004. [23] Paolo Viappiani and Craig Boutilier. Regret-based optimal recommendation sets in conversational recommender systems. In Proceedings of the 3rd ACM Conference on Recommender Systems (RecSys09), pp.101–108, New York, 2009. [24] Paolo Viappiani, Boi Faltings, and Pearl Pu. Preference-based search using example-critiquing with suggestions. Journal of Artificial Intelligence Research, 27:465–503, 2006. 9
2010
108
3,864
Semi-Supervised Learning with Adversarially Missing Label Information Umar Syed Ben Taskar Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 {usyed,taskar}@cis.upenn.edu Abstract We address the problem of semi-supervised learning in an adversarial setting. Instead of assuming that labels are missing at random, we analyze a less favorable scenario where the label information can be missing partially and arbitrarily, which is motivated by several practical examples. We present nearly matching upper and lower generalization bounds for learning in this setting under reasonable assumptions about available label information. Motivated by the analysis, we formulate a convex optimization problem for parameter estimation, derive an efficient algorithm, and analyze its convergence. We provide experimental results on several standard data sets showing the robustness of our algorithm to the pattern of missing label information, outperforming several strong baselines. 1 Introduction Semi-supervised learning algorithms use both labeled and unlabeled examples. Most theoretical analyses of semi-supervised learning assume that m + n labeled examples are drawn i.i.d. from a distribution, and then a subset of size n is chosen uniformly at random and their labels are erased [1]. This missing-at-random assumption is best suited for a situation where the labels are acquired by annotating a random subset of all available data. But in many applications of semi-supervised learning, the partially-labeled data is “naturally occurring”, and the learning algorithm has no control over which examples were labeled. For example, pictures on popular websites like Facebook and Flikr are tagged by users at their discretion, and it is difficult to know how users decide which pictures to tag. A similar problem occurs when data is submitted to an online labor marketplace, such as Amazon Mechanical Turk, to be manually labeled. The workers who label the data are often poorly motivated, and may deliberately skip examples that are difficult to correctly label. In such a setting, a learning algorithm should not assume that the examples were labeled at random. Additionally, in many semi-supervised learning settings, the partial label information is not provided on a per-example basis. For example, in multiple instance learning [2], examples are presented to a learning algorithm in sets, with either zero or one positive examples per set. In graph-based regularization [3], a learning algorithm is given information about which examples are likely to have the same label, but not necessarily the identity of that label. Recently, there has been much interest in algorithms that learn from labeled features [4]; in this setting, the learning algorithm is given information about the expected value of several features with respect to the true distribution on labeled examples. To summarize, in a typical semi-supervised learning problem, label information is often missing in an arbitrary fashion, and even when present, does not always have a simple form, like one label per example. Our goal in this paper is to develop and analyze a learning algorithm that is explicitly 1 designed for these types of problems. We derive our learning algorithm within a framework that is expressive enough to permit a very general notion of label information, allowing us to make minimal assumptions about which examples in a data set have been labeled, how they have been labeled, and why. We present both theoretical upper and lower bounds for learning in this framework, and motivated by these bounds, derive a simple yet provably optimal learning algorithm. We also provide experimental results on several standard data sets, which show that our algorithm is effective and robust when the label information has been provided by “lazy” or “unhelpful” labelers. Related Work: Our learning framework is related to the malicious label noise setting, in which the labeler is allowed to mislabel a small fraction of the training set (this is a special case of the even more challenging malicious noise setting [5], where an adverary can inject a small number of arbitrary examples into the training set). Learning with this type of label noise is known to be quite difficult, and positive results often make quite restrictive assumptions about the underlying data distribution [6, 7]. By contrast, our results apply far more generally, at the expense of assuming a more benign (but possibly more realistic) model of label noise, where the labeler can adversarially erase labels, but not change them. In other words, we assume that the labeler equivocates, but does not lie. The difference in these assumptions shows up quite clearly in our analysis: As we point out in Section 3, our bounds become vacuous if the labeler is allowed to mislabel data. In Section 2 we describe how our framework encodes label information in a label regularization function, which closely resembles the idea of a compatibility function introduced by Balcan & Blum [8]. However, they did not analyze a setting where this function is selected adversarially. 2 Learning Framework Let X be the set of all possible examples, and Y the set of all possible labels, where |Y| = k. Let D be an unknown distribution on X × Y. We write x and y as abbreviations for (x1, . . . , xm) ∈X m and (y1, . . . , ym) ∈Ym, respectively. We write (x, y) ∼Dm to denote that each (xi, yi) is drawn i.i.d. from the distribution D on X × Y, and x ∼Dm to denote that each xi is drawn i.i.d. from the marginal distribution of D on X. Let (ˆx, ˆy) ∼Dm be the m labeled training examples. In supervised learning, one assumes access to the entire training set (ˆx, ˆy). In semi-supervised learning, one assumes access to only some of the labels ˆy, and in most theoretical analyses, the missing components of ˆy are assumed to have been selected uniformly at random. We make a much weaker assumption about what label information is available. We assume that, after the labeled training set (ˆx, ˆy) has been drawn, the learning algorithm is only given access to the examples ˆx and to a label regularization function R. The function R encodes some information about the labels ˆy of ˆx, and is selected by a potentially adversarial labeler from a family R(ˆx, ˆy). A label regularization function R maps each possible soft labeling q of the training examples ˆx to a real number R(q) (a soft labeling is natual generalization of a labeling that we will define formally in a moment). Except for knowing that R belongs to R(ˆx, ˆy), the learner can make no assumptions about how the labeler selects R. We give examples of label regularization functions in Section 2.1. Let ∆denote the set of distributions on Y. A soft labeling q ∈∆m of the training examples ˆx is a doubly-indexed vector, where q(i, y) is interpreted as the probability that example ˆxi has label y ∈Y. The correct soft labeling has q(i, y) = 1{y = ˆyi}, where the indicator function 1{·} is 1 when its argument is true and 0 otherwise; we overload notation and write ˆy to denote the correct soft labeling. Although the labeler is possibly adversarial, the family R(ˆx, ˆy) of label regularization functions restricts the choices the labeler can make. We are interested in designing learning algorithms that work well when each R ∈R(ˆx, ˆy) assigns a low value to the correct labeling ˆy. In the examples we describe in Section 2.1, the correct labeling ˆy will be near the minimum of R, but there will be many other minima and near-minima as well. This is the sense in which label information is “missing” — it is difficult for any learning algorithm to distinguish among these minima. We emphasize that, while our algorithms work best when ˆy is close to the minimum of each R ∈ R(ˆx, ˆy), nothing in our framework requires this to be true; in Section 3 we will see that our learning bounds degrade gracefully as this condition is violated. 2 We are interested in learning a parameterized model that predicts a label y given an example x. Let L(θ, x, y) be the loss of parameter θ ∈Rd with respect to labeled example (x, y). While some of the development in this paper will apply to generic loss functions, but two loss functions that will particularly interest us are the negative log-likelihood of a log-linear model Llike(θ, x, y) = −log pθ(y|x) = −log exp(θTφφφ(x, y)) P y′ exp(θTφφφ(x, y′)) where φφφ(x, y) ∈Rd is the feature function, and the 0-1 loss of a linear classifier L0,1(θ, x, y) = 1{arg max y′∈Y θTφφφ(x, y′) ̸= y}. Given training examples ˆx, label regularization function R, and loss function L, the goal of a learning algorithm is to find a parameter θ that minimizes the expected loss ED[L(θ, x, y)], where ED[·] denotes expectation with respect to (x, y) ∼D. Let Eˆx,q[f(x, y)] denote the expected value of f(x, y) when example x is chosen uniformly at random from the training examples ˆx and — supposing that this is example ˆxi — label y is chosen from the distribution q(i, ·). Accordingly, Eˆx,ˆy[f(x, y)] denotes the expected value of f(x, y) when labeled example (x, y) is chosen uniformly at random from the labeled training examples (ˆx, ˆy). 2.1 Examples of Label Regularization Functions To make the concept of a label regularization function more clear, we describe several well-known learning settings in which the information provided to the learning algorithm is less than the fully labeled training set. We show that, for each these settings, there is a natural definition of R that captures the information that is provided to the learning algorithm, and thus each of these settings can be seen as special cases of our framework. Before proceeding with the partially labeled cases, we explain how supervised learning can be expressed in our framework. In the supervised learning setting, the label of every example in the training set is revealed to the learner. In this setting, the label regularization function family R(ˆx, ˆy) contains a single function Rˆy such that Rˆy(q) = 0 if q = ˆy, and Rˆy(q) = ∞otherwise. In the semi-supervised learning setting, the labels of only some of the training examples are revealed. In this case, there is a function RI ∈R(ˆx, ˆy) for each I ⊆[m] such that RI(q) = 0 if q(i, y) = 1{y = ˆyi} for all i ∈I and y ∈Y, and RI(q) = ∞otherwise. In other words, RI(q) is zero if and only if the soft labeling q agrees with ˆy on the examples in I. This implies that RI(q) is independent of how q labels examples not in I — these are the examples whose labels are missing. In the ambiguous learning setting [9, 10], which is a generalization of semi-supervised learning, the labeler reveals a label set ˆYi ⊆Y for each training example ˆxi such that ˆyi ∈ˆYi. That is, for each training example, the learning algorithm is given a set of possibile labels the example can have (semi-supervised learning is the special case where each label set has size 1 or k). Letting ˆY = ( ˆY1, . . . , ˆYm) be all the label sets revealed to the learner, there is a function R ˆY ∈R(ˆx, ˆy) for each possible ˆY such that R ˆY (q) = 0 if supp(qi) ⊆ˆYi for all i ∈[m] and RY(q) = ∞otherwise. Here qi ≜q(i, ·) and supp(qi) is the support of label distribution qi. In other words, R ˆY (q) is zero if and only if the soft labeling q is supported on the sets ˆY1, . . . , ˆYm. The label regularization functions described above essentially give only local information; they specify, for each example in the training set, which labels are possible for that example. In some cases, we may want to allow the labeler to provide more global information about the correct labeling. One example of providing global information is Laplacian regularization, a kind of graph-based regularization [3] that encodes information about which examples are likely to have the same labels. For any soft labeling q, let q[y] be the m-length vector whose ith component is q(i, y). The Laplacian regularizer is defined to be RL(q) = P y∈Y q[y]T L(ˆx)q[y], where L(ˆx) is an m × m positive semi-definite matrix defined so that RL(q) is large whenever examples in ˆx that are believed to have the same label are assigned different label distributions by q. Another possibility is posterior regularization. Define a feature function f(x, y) ∈Rℓ; these features may or may not be related to the model features φφφ defined in Section 2. As noted by several authors 3 [4, 11, 12], it is often convenient for a labeler to provide information about the expected value of f(x, y) with respect to the true distribution. A typical posterior regularizer of this type will have the form Rf,b(q) = ∥Eˆx,q[f(x, y)] −b∥2 2, where the vector b ∈Rℓis the labeler’s estimate of the expected value of f. This term penalizes soft labelings q which cause the expected value of f on the training set to deviate from b. Label regularization functions can also be added together. So, for instance, ambiguous learning can be combined with a Laplacian, and in this case the learner is given a label regularization function of the form R ˆY (q)+RL(q). We will experiment with these kinds of combined regularization functions in Section 5. Note that, in all the examples described above, while the correct labeling ˆy is at or close to the minimum of each function R ∈R(ˆx, ˆy), there may be many labelings meeting this condition. Again, this is the sense in which label information is “missing”. It is also important to note that we have only specified what information the labeler can reveal to the learner (some function from the set R(ˆx, ˆy)), but we do not specify how that information is chosen by the labeler (which function R ∈R(ˆx, ˆy)?). This will have a significant impact on our analysis of this framework. To see why, consider the example of semi-supervised learning. Using the notation defined above, most analyses of semi-supervised learning assume that RI is chosen be selecting a random subset I of the training examples [13, 14]. By constrast, we make no assumptions about how RI is chosen, because we are interested in settings where such assumptions are not realistic. 3 Upper and Lower Bounds In this section, we state upper and lower bounds for learning in our framework. But first, we provide a definition of the well-known concept of uniform convergence. Definition 1 (Uniform Convergence). Loss function L has ǫ-uniform convergence if with probability 1 −δ sup θ∈Θ ED[L(θ, x, y)] −Eˆx,ˆy[L(θ, x, y)] ≤ǫ(δ, m) where (ˆx, ˆy) ∼Dm and ǫ(·, ·) is an expression bounding the rate of convergence. For example, if ∥φφφ(x, y)∥≤c for all (x, y) ∈X × Y and Θ = {θ : ∥θ∥≤1} ⊆Rd, then the loss function Llike has ǫ-uniform convergence with ǫ(δ, m) = O  c q d log m+log(1/δ) m  , which follows from standard results about Rademacher complexity and covering numbers. Other commonly used loss functions, such as hinge loss and 0-1 loss, also have ǫ-uniform convergence under similar boundedness assumptions on φφφ and Θ. We are now ready to state an upper bound for learning in our framework. The proof is contained in the supplement. Theorem 1. Suppose loss function L has ǫ-uniform convergence. If (ˆx, ˆy) ∼Dm then with probability at least 1 −δ for all parameters θ ∈Θ and label regularization functions R ∈R(ˆx, ˆy) ED[L(θ, x, y)] ≤max q∈∆m (Eˆx,q[L(θ, x, y)] −R(q)) + R(ˆy) + ǫ(δ, m). Theorem 2 below states a lower bound that nearly matches the upper bound in Theorem 1, in certain cases. As we will see, the existence of a matching lower bound depends strongly on the structure of the label regularization function family R. Note that, given a labeled training set (x, y), the set R(x, y) essentially constrains what information the labeler can reveal to the learning algorithm, thereby encoding our assumptions about how the labeler will behave. We make three such assumptions, described below. For the remainder of this section, we let the set of all possible examples X = {˜x1, . . . , ˜xN} be finite. Recall that all the label regularization functions described in Section 2.1 use the value ∞to indicate which labelings of the training set are impossible. Our first assumption is that, for each R ∈R(x, y), the set of possible labelings under R is separable over examples. 4 Assumption 1 (∞-Separability). For all labeled training sets (x, y) and R ∈R(x, y) there exists a collection of label sets {Y˜x : ˜x ∈X} and real-valued function F such that R(q) = Pm i=1 χ{supp(qi) ⊆Yxi} + F(q), where the characteristic function χ{·} is 0 when its argument is true and ∞otherwise, and F(q) < ∞for all q ∈∆m. It is easy to verify that all the examples of label regularization function families given in Section 2.1 satisfy Assumption 1. Also note that Assumption 1 allows the finite part of R (denoted by F) to depend on the entire soft labeling q in a basically arbitrarily manner. Before describing our second assumption, we need a few additional definitions. We write h to denote a labeling function that maps examples X to labels Y. Also, for any labeling function h and unlabeled training set x ∈X m, we let h(x) ∈Ym denote the vector of labels whose ith component is h(xi). Let px be an N-length vector that represents unlabeled training set x as a distribution on X, whose ith component is px(i) ≜|{j : xj=˜xi}| m . Our second assumption is the labeler’s behavior is stable: If training sets (x, y) and (x′, y′) are “close” (by which we mean that they are consistently labeled and ∥px −px′∥∞is small) then the label regularization functions available to the labeler for each training set are the “same”, in the sense that the sets of possible labelings under each of them are identical. Assumption 2 (γ-Stability). For any labeling function h∗and unlabeled training sets x, x′ such that ∥px −px′∥∞≤γ the following holds: For all R ∈R(x, h∗(x)) there exists R′ ∈R(x′, h∗(x′)) such that R(h(x)) < ∞if and only if R′(h(x′)) < ∞, for all labeling functions h. Our final assumption, which we call reciprocity, states there is no way to deduce which of the possible labelings under R is the correct one only by examining R. Assumption 3 (Reciprocity). For all labeled training sets (x, y) and R ∈R(x, y), if R(y′) < ∞ then R ∈R(x, y′). Of all our assumptions, reciprocity seems to be the most unnatural and unmotivated. We argue it is necessary for two reasons: Firstly, all the examples of label regularization function families given in Section 2.1 satisfy this assumption, and secondly, in Theorem 3 we show that lifting the reciprocity assumption makes the upper bound in Theorem 1 very loose. We are nearly ready to state our lower bound. Let A be a (possibly randomized) learning algorithm that takes a set of unlabeled training examples ˆx and a label regularization function R as input, and outputs an estimated parameter ˆθ. Also, if under distribution D each example x ∈X is associated with exactly one label h∗(x) ∈Y, then we write D = DX · h∗, where the data distribution DX is the marginal distribution of D on X. Theorem 2 proves the existence of a true labeling function h∗ such that a nearly tight lower bound holds for all learning algorithms A and all data distributions DX whenever the training set is drawn from DX · h∗. The fact that our lower bound holds for all data distributions significantly complicates the analysis, but this generality is important: since DX is typically easy to estimate, it is possible that the learning algorithm A has been tuned for DX . The proof of Theorem 2 is contained in the supplement. Theorem 2. Suppose Assumptions 1, 2 and 3 hold for label regularization function family R, the loss function L is 0-1 loss, and the set of all possible examples X is finite. For all learning algorithms A and data distributions DX there exists a labeling function h∗such that if (ˆx, ˆy) ∼Dm (where D = DX · h∗) and m ≥O( 1 γ2 log |X| δ ) then with probability at least 1 4 −2δ ED[L(ˆθ, x, y)] ≥1 4 max q∈∆m  Eˆx,q[L(ˆθ, x, y)] −R(q)  + min q∈∆m R(q) −ǫ(δ, m) for some R ∈R(ˆx, ˆy), where ˆθ is the parameter output by A, and γ is the constant from Assumption 2. Obviously, Assumptions 1, 2 and 3 restrict the kinds of label regularization function families to which Theorem 2 can be applied. However, some restriction is necessary in order to prove a meaningful lower bound, as Theorem 3 below shows. This theorem states that if Assumption 3 does not hold, then it may happen that each family R(x, y) has a structure which a clever (but computationally infeasible) learning algorithm can exploit to perform much better than the upper bound given in Theorem 1. The proof of Theorem 3, which is contained in the supplement, constructs an example of such a family. 5 Theorem 3. Suppose the loss function L is 0-1 loss. There exists a label regularization function family R that satisfies Assumptions 1 and 2, but not Assumption 3, and a learning algorithm A such that for all distributions D if (ˆx, ˆy) ∼Dm then with probability at least 1 −δ ED[L(ˆθ, x, y)] ≤max q∈∆m  Eˆx,q[L(ˆθ, x, y)] −R(q)  + min q∈∆m R(q) + ǫ(δ, m) −1 for some R ∈R(ˆx, ˆy), where ˆθ is the parameter output by A. Whenever limm→∞ǫ(δ, m) = 0 the gap between the upper and lower bounds in Theorems 1 and 2 approaches R(ˆy) −minq R(q) as m →∞(ignoring constant factors). Therefore, these bounds are asymptotically matching if the labeler always chooses a label regularization function R such that R(ˆy) = minq R(q). We emphasize that this is true even if ˆy is a nonunique minimum of R. Several of the example learning settings described in Section 2.1, such as semi-supervised learning and ambiguous learning, meet this criteria. On the other hand, if R(ˆy) −minq R(q) is large, then the gap is very large, and the utility of our analysis degrades. In the extreme case that R(ˆy) = ∞ (i.e., the correct labeling of the training set is not possible under R), our upper bound is vacuous. In this sense, our framework is best suited to settings in which the information provided by the labeler is equivocal, but not actually untruthful, as it is in the malicious label noise setting [6, 7]. Finally, note that if limm→∞ǫ(δ, m) = 0, then the upper bound in Theorem 3 is smaller than the lower bound in Theorem 2 for all sufficiently large m, which establishes the importance of Assumption 3. 4 Algorithm Given the unlabeled training examples ˆx and label regularization function R, the bounds in Section 3 suggest an obvious learning algorithm: Find a parameter θ∗that realizes the minimum min θ max q∈∆m (Eˆx,q[L(θ, x, y)] −R(q)) + α ∥θ∥2 . (1) The objective (1) is simply the minimization of the upper bound in Theorem 1, with one difference: for algorithmic convenience, we do not minimize over the set Θ, but instead add the quantity α ∥θ∥2 to the objective and leave θ unconstrained (here, and in the rest of the paper, ∥·∥denotes L2 norm). If we assume that Θ = {θ : ∥θ∥≤c} for some c > 0, then this modification is without loss of generality, since there exists a constant αc for which this is an equivalent formulation. In order to estimate θ∗, throughout this section we make the following assumption about the loss function L and label regularization function R. Assumption 4. The loss function L is convex in θ, and the label regularization function R is convex in q. It is easy to verify that all of the loss functions and label regularization functions we gave as examples in Sections 2 and 2.1 satisfy Assumption 4. Instead of finding θ∗directly, our approach will be to “swap” the min and max in (1), find the soft labeling q∗that realizes the maximum, and then use q∗to compute θ∗. For convenience, we abbreviate the function that appears in the objective (1) as F(θ, q) ≜Eˆx,q[L(θ, x, y)] −R(q) + α ∥θ∥2. A high-level version of our learning algorithm — called GAME due to the use of a gametheoretic minimax theorem in its proof of correctness — is given in Algorithm 1; the implementation details for each step are given below Theorem 4. Algorithm 1 GAME: Game for Adversarially Missing Evidence 1: Given: Constants ǫ1, ǫ2 > 0. 2: Find ˜q such that minθ F(θ, ˜q) ≥maxq∈∆m minθ F(θ, q) −ǫ1 3: Find ˜θ such that F(˜θ, ˜q) ≤minθ F(θ, ˜q) + ǫ2 4: Return: Parameter estimate ˜θ. In the first step of Algorithm 1, we modify the objective (1) by swapping the min and max, and then find a soft labeling ˜q that approximately maximizes this modified objective. In the next step, we 6 find a parameter ˜θ that approximately minimizes the original objective with respect to the fixed soft labeling ˜q. The next theorem proves that Algorithm 1 produces a good estimate of θ∗, the minimum of the objective (1). Its proof is in the supplement. Theorem 4. The parameter ˜θ output by Algorithm 1 satisfies ∥˜θ −θ∗∥≤ q 8 α(ǫ1 + ǫ2). We now briefly explain how the steps of Algorithm 1 can be implemented using off-the-shelf algorithms. For concreteness, we focus on an implementation for the loss function L = Llike, which is also the loss function we use in our experiments in Section 5. The second step of Algorithm 1 is the easier one, so we explain it first. In this step, we need to minimize F(θ, ˜q) over θ. Since ˜q is fixed in this minimization, we can ignore the R(˜q) term in the definition of F, and we see that this minimization amounts to maximizing the likelihood of a log-linear model. This is a very well-studied problem, and there are numerous efficient methods available for solving it, such as stochastic gradient descent. The first step of Algorithm 1 is more complicated, as it requires finding the maximum of a maxmin objective. Our approach is to first take the dual of the inner minimization; after doing this the function to maximize becomes G(p, q) ≜H(p) −1 α ∥∆φφφ(p, q)∥2 −R(q), where we let H(p) ≜ −P i,y p(i, y) log p(i, y) and ∆φφφ(p, q) ≜Eˆx,p[φφφ(x, y)] −Eˆx,q[φφφ(x, y)]. By convex duality we have maxq minθ F(θ, q) = maxp,q G(p, q). This dual has been previously derived by several authors; see [15] for more details. Note that G is concave function, and we need to maximize it over simplex constraints. Exponentiated-gradient-style algorithms [16, 15] are well-suited for this kind of problem, as they “natively” maintain the simplex constraint, and converged quickly in the experiments described in Section 5. 5 Experiments We tested our GAME algorithm (Algorithm 1) on several standard learning data sets. In all of our experiments, we labeled a fraction of the training examples sets in a non-random manner that was designed to simulate various types of difficult — even adversarial — labelers. Our first set of experiments involved two binary classification data sets that belong to a benchmark suite1 accompanying a widely-used semi-supervied learning book [1]: the Columbia object image library (COIL) [17], and a data set of EEG scans of a human subject connected to a brain-computer interface (BCI) [18]. For each data set, a training set was formed by randomly sampling a subset of the data in a way that produced a skewed class distribution. We defined the outlier score of a training example to be the fraction of its nearest neighbors that belong to a different class. For several values of p ∈[0, 1] and for each training set, we labeled only the p-fraction of examples with the highest outlier score. In this way, we simulated an “unhelpful” labeler who only labels examples that are exceptions to the general rule, thinking (perhaps sincerely, but erroneously) that this is the most effective use of her effort. We tested three algorithms on these data sets: GAME, where R(ˆx, ˆy) was chosen to match the semi-supervised learning setting with a Laplacian regularizer (see Section 2.1); Laplacian SVM [3]; and Transductive SVM [19]. When constructing the Laplacian matrix and choosing values for hyperparameters, we adhered closely to the model-selection procedure described in [1, Sections 21.2.1 and 21.2.5]. The results of our experiments are given in Figures 1(a) and 1(b). We also tested the GAME algorithm on a multiclass data set, namely a subset of the Labeled Faces in the Wild data set [20], a standard corpus of face photographs. Our subset contained 500 faces of the top 10 characters from the corpus, but with a randomly skewed distribution, so that some faces appeared more often than others. The feature representation for each photograph was PCA on the pixel values (i.e., eigenfaces). We used an ambiguously-labeled version of this data set, where each face in the training set is associated with one or more labels, only one of which is correct (see Section 2.1 for a definition of ambiguous learning). We labeled trainined examples to simulate a “lazy” labeler, in the following way: For each pair of labels (y, y′), we sorted the examples with true 1This benchmark suite contains several data sets; we selected these two because they contain a large number of examples that meet our definition of outliers. 7 0.1 0.2 0.3 0.4 30 40 50 60 70 Fraction of training set labeled Accuracy Transductive SVM Laplacian SVM Game 0.1 0.2 0.3 0.4 40 50 60 70 80 90 100 Fraction of training set labeled Accuracy Transductive SVM Laplacian SVM Game 0.2 0.4 0.6 0.8 20 40 60 80 Fraction of training set labeled Accuracy Uniform EM Game Figure 1: (a) Accuracy vs. fraction of unlabeled data for BCI data set. (b) Accuracy vs. fraction of unlabeled data for COIL data set. (c) Accuracy vs. fraction of partially labeled data for Faces in the Wild data set. In all plots, error bars represent 1 standard deviation over 10 trials. label y with respect to their distance, in feature space, from the centroid of the cluster of examples with true label y′. For several values of p ∈[0, 1], we added the label y′ to the top p-fraction of this list. The net effect of this procedure is that examples on the “border” of the two clusters are given both labels y and y′ in the training set. The idea behind this labeling procedure is to mimic a (realistic, in our view) situation where a “lazy” labeler declines to commit to one label for those examples that are especially difficult to distinguish. We tested the GAME algorithm on this data set, where R(ˆx, ˆy) was chosen to match the ambiguous learning setting with a Laplacian regularizer (see Section 2.1). We compared with two algorithms from [9]: UNIFORM, which assumes each label in the ambiguous label set is equally likely, and learns a maximum likelihood log-linear model; and a discrimitive EM algorithm that guesses the true labels, learns the most likely parameter, updates the guess, and repeats. The results of our experiments are given in Figure 1(c). Perhaps the best way to characterize the difference between GAME and the algorithms we compared it to is that the other algorithms are “optimistic”, by which we mean they assume that the missing labels most likely agree with the estimated parameter, while GAME is a “pessimistic” algorithm that, because it was designed for an adverarial setting, assumes exactly the opposite. The results of our experiments indicate that, for certain labeling styles, as the fraction of fully labeled examples decreases, the GAME algorithm’s pessimistic approach is substantially more effective. Importantly, Figures 1(a)-(c) show that the GAME algorithm’s performance advantage is most significant when the number of labeled examples is very small. Semi-supervised learning algorithms are often promoted as being able to learn from only a handful of labeled examples. Our results show that this ability may be quite sensitive to how these examples are labeled. 6 Future Work Our framework lends itself to several natural extensions. For example, it can be straightforwardly extended to the structured prediction setting [21], in which both examples and labels have some internal structure, such as sequences or trees. One can show that both steps of the GAME algorithm can be implemented efficiently even when the number of labels is combinatorial, provided that both the loss function and label regularization function decompose appropriately over the structure. Another possibility is to interactively poll the labeler for label information, resulting in a sequence of successively more informative label regularization functions, with the aim of extracting the most useful label information from the labeler with a minimum of labeling effort. Also, it would be interesting to design Amazon Mechanical Turk experiments that test whether the “unhelpful” and “lazy” labeling styles described in Section 5 in fact occur in practice. Finally, of the three technical assumptions we introduced in Section 3 to aid our analysis, we only proved (in Theorem 3) that one of them is necessary. We would like to determine whether the other assumptions are necessary as well, or can be relaxed. Acknowledgements Umar Syed was partially supported by DARPA CSSG 2009 Award. Ben Taskar was partially supported by DARPA CSSG 2009 Award and the ONR 2010 Young Investigator Award. 8 References [1] Olivier Chapelle, Bernhard Sch¨olkopf, and Alexander Zien, editors. Semi-Supervised Learning. MIT Press, Cambridge, MA, 2006. [2] Thomas G. Dietterich, Richard H. Lathrop, and Tom´as Lozano-P´erez. Solving the multiple instance problem with axis-parallel rectangles. Artificial Intelligence, 89(1-2):31–71, 1997. [3] 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, 2006. [4] Gregory Druck, Gideon Mann, and Andrew McCallum. Learning from labeled features using generalized expectation criteria. In Proceedings of the 31st Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 595–602, 2008. [5] Michael Kearns and Ming Li. Learning in the presence of malicious errors. In Proceedings of the 20th Annual ACM Symposium on Theory of Computing, pages 267–280, New York, NY, USA, 1988. ACM. [6] Adam T. Kalai, Adam R. Klivans, Yishay Mansour, and Rocco A. Servedio. Agnostically learning halfspaces. In Proceedings of the 46th Annual IEEE Symposium on Foundations of Computer Science, pages 11–20, 2005. [7] Adam R. Klivans, Philip M. Long, and Rocco A. Servedio. Learning halfspaces with malicious noise. Journal of Machine Learning Research, 10:2715–2740, 2009. [8] Maria-Florina Balcan and Avrim Blum. A PAC-style model for learning from labeled and unlabeled data. In Proceedings of the 18th Annual Conference on Learning Theory, pages 111–126, 2005. [9] Rong Jin and Zoubin Ghahramani. Learning with multiple labels. In Advances in Neural Information Processing Systems 16, 2003. [10] Timothee Cour, Ben Sapp, Chris Jordan, and Ben Taskar. Learning from ambiguously labeled images. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2009. [11] Kuzman Ganchev, Jo˜ao Grac¸a, Jennifer Gillenwater, and Ben Taskar. Posterior regularization for structured latent variable models. Journal of Machine Learning Research, 11:2001–2049, 2010. [12] Percy Liang, Michael I. Jordan, and Dan Klein. Learning from measurements in exponential families. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 641–648, 2009. [13] Rie Johnson and Tong Zhang. On the effectiveness of laplacian normalization for graph semi-supervised learning. Journal of Machine Learning Research, 8:1489–1517, December 2007. [14] Philippe Rigollet. Generalization error bounds in semi-supervised classification under the cluster assumption. Journal of Machine Learning Research, 8:1369–1392, December 2007. [15] Michael Collins, Amir Globerson, Terry Koo, Xavier Carreras, and Peter L. Bartlett. Exponentiated gradient algorithms for conditional random fields and max-margin markov networks. Journal of Machine Learning Research, 9:1775–1822, 2008. [16] Jyrki Kivinen and Manfred K. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Inf. Comput., 132(1):1–63, 1997. [17] Sameer A. Nene, Shree K. Nayar, and Hiroshi Murase. Columbia object image library (COIL-100). Technical Report CUCS-006-96, Columbia University, 1996. [18] Thomas Navin Lal, Thilo Hinterberger, Guido Widman, Michael Schr¨oder, N. Jeremy Hill, Wolfgang Rosenstiel, Christian Erich Elger, Bernhard Sch¨olkopf, and Niels Birbaumer. Methods towards invasive human brain computer interfaces. In Advances in Neural Information Processing Systems 17, 2004. [19] Thorsten Joachims. Transductive inference for text classification using support vector machines. In Proceedings of the 16th International Conference on Machine Learning, pages 200–209, 1999. [20] Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. [21] Ben Taskar, Carlos Guestrin, and Daphne Koller. Max-margin markov networks. In Advances in Neural Information Processing Systems 16, 2004. 9
2010
109
3,865
Deep Coding Network Yuanqing Lin† Tong Zhang‡ Shenghuo Zhu† Kai Yu† †NEC Laboratories America, Cupertino, CA 95129 ‡Rutgers University, Piscataway, NJ 08854 Abstract This paper proposes a principled extension of the traditional single-layer flat sparse coding scheme, where a two-layer coding scheme is derived based on theoretical analysis of nonlinear functional approximation that extends recent results for local coordinate coding. The two-layer approach can be easily generalized to deeper structures in a hierarchical multiple-layer manner. Empirically, it is shown that the deep coding approach yields improved performance in benchmark datasets. 1 Introduction Sparse coding has attracted significant attention in recent years because it has been shown to be effective for some classification problems [12, 10, 9, 13, 11, 14, 2, 5]. In particular, it has been empirically observed that high-dimensional sparse coding plus linear classifier is successful for image classification tasks such as PASCAL 2009 [7, 15]. The empirical success of sparse coding can be justified by theoretical analysis [17], which showed that a modification of sparse coding with added locality constraint, called local coordinate coding (LCC), represents a new class of effective high dimensional non-linear function approximation methods with sound theoretical guarantees. Specifically, LCC learns a nonlinear function in high dimension by forming an adaptive set of basis functions on the data manifold, and it has nonlinear approximation power. A recent extension of LCC with added local tangent directions [16] demonstrated the possibility to achieve locally quadratic approximation power when the underlying data manifold is relatively flat. This also indicates that the nonlinear function approximation view of sparse coding not only yields deeper theoretical understanding of its success, but also leads to improved algorithms based on refined analysis. This paper follows the same idea, where we propose a principled extension of single-layer sparse coding based on theoretical analysis of a two level coding scheme. The algorithm derived from this approach has some advantages over the single-layer approach, and can also be extended into multi-layer hierarchical systems. Such extension draws connection to deep belief networks (DBN) [8], and hence we call this approach deep coding network. Hierarchical sparse coding has two main advantages over its single-layer counter-part. First, at the intuitive level, the first layer (traditional single-layer basis) yields a crude description of the data at each basis function, and multi-layer basis functions provide a natural way to zoom into each single basis for finer local details — this intuition can be reflected more rigorously in our nonlinear function approximation result. Due to the more localized zoom-in effect, it also alleviates the problem of overfitting when many basis functions are needed. Second, it is computationally more efficient than flat coding because we only need to look at locations in the second (or higher) layer corresponding to basis functions with nonzero coefficients in the first (or previous) layer. Since sparse coding produces many zero coefficients, the hierarchical structure significantly eliminates many of the coding computation. Moreover, instead of fitting a single model with many variables as in a flat single layer approach, our proposal of multi-layer coding requires fitting many small models separately, each 1 with a small number of parameters. In particular, fitting the small models can be done in parallel, e.g. using Hadoop, so that learning a fairly big number of codebooks can still be fast. 2 Sparse Coding and Nonlinear Function Approximation This section reviews the nonlinear function approximation results of single-layer coding scheme in [17], and then presents our multi-layer extension. Since the result of [17] requires a modification of the traditional sparse coding scheme called local coordinate coding (LCC), our analysis will rely on a similar modification. Consider the problem of learning a nonlinear function f(x) in high dimension: x ∈Rd with large d. While there are many algorithms in traditional statistics that can learn such a function in low dimension, when the dimensionality d is large compared to n, the traditional statistical methods will suffer the so called “curse of dimensionality”. The recently popularized coding approach addresses this issue. Specifically, it was theoretically shown in [17] that a specific coding scheme called Local Coordinate Coding can take advantage of the underlying data manifold geometric structure in order to learn a nonlinear function in high dimension and alleviate the curse of dimensionality problem. The main idea of LCC, described in [17], is to locally embed points on the underlying data manifold into a lower dimensional space, expressed as coordinates with respect to a set of anchor points. The main theoretical observation was relatively simple: it was shown in [17] that on the data manifold, a nonlinear function can be effectively approximated by a globally linear function with respect to the local coordinate coding. Therefore the LCC approach turns a very difficult high dimensional nonlinear learning problem into a much simpler linear learning problem, which can be effectively solved using standard machine learning techniques such as regularized linear classifiers. This linearization is effective because the method naturally takes advantage of the geometric information. In order to describe the results more formally, we introduce a number of notations. First we denote by ∥· ∥the Euclidean norm (2-norm) on Rd: ∥x∥= ∥x∥2 = q x2 1 + · · · + x2 d. Definition 2.1 (Smoothness Conditions) A function f(x) on Rd is (α, β, ν) Lipschitz smooth with respect to a norm ∥· ∥if ∥∇f(x)∥≤α, and f(x′) −f(x) −∇f(x)⊤(x′ −x) ≤β∥x′ −x∥2, and f(x′) −f(x) −0.5(∇f(x′) + ∇f(x))⊤(x′ −x) ≤ν∥x −x′∥3, where we assume α, β, ν ≥0. These conditions have been used in [16], and they characterize the smoothness of f under zero-th, first, and second order approximations. The parameter α is the Lipschitz constant of f(x), which is finite if f(x) is Lipschitz; in particular, if f(x) is constant, then α = 0. The parameter β is the Lipschitz derivative constant of f(x), which is finite if the derivative ∇f(x) is Lipschitz; in particular, if ∇f(x) is constant (that is, f(x) is a linear function of x), then β = 0. The parameter ν is the Lipschitz Hessian constant of f(x), which is finite if the Hessian of f(x) is Lipschitz; in particular, if the Hessian ∇2f(x) is constant (that is, f(x) is a quadratic function of x), then ν = 0. In other words, these parameters measure different levels of smoothness of f(x): locally when ∥x −x′∥is small, α measures how well f(x) can be approximated by a constant function, β measures how well f(x) can be approximated by a linear function in x, and ν measures how well f(x) can be approximated by a quadratic function in x. For local constant approximation, the error term α∥x−x′∥is the first order in ∥x−x′∥; for local linear approximation, the error term β∥x−x′∥2 is the second order in ∥x −x′∥; for local quadratic approximation, the error term ν∥x −x′∥3 is the third order in ∥x −x′∥. That is, if f(x) is smooth with relatively small α, β, ν, the error term becomes smaller (locally when ∥x −x′∥is small) if we use a higher order approximation. 2 Similar to the single-layer coordinate coding in [17], here we define a two-layer coordinate coding as the following. Definition 2.2 (Coordinate Coding) A single-layer coordinate coding is a pair (γ1, C1), where C1 ⊂Rd is a set of anchor points (aka basis functions), and γ is a map of x ∈Rd to [γ1 v(x)]v∈C1 ∈ R|C1| such that P v∈C1 γ1 v(x) = 1. It induces the following physical approximation of x in Rd: hγ1,C1(x) = X v∈C1 γ1 v(x)v. A two-layer coordinate coding (γ, C) consists of coordinate coding systems {(γ1, C1)} ∪ {(γ2,v, C2,v) : v ∈C1}. The pair (γ1, C1) is the first layer coordinate coding, (γ2,v, C2,v) are second layer coordinate-coding pairs that refine the first layer coding for every first-layer anchor point v ∈C1. The performance of LCC is characterized in [17] using the following nonlinear function approximation result. Lemma 2.1 (Single-layer LCC Nonlinear Function Approximation) Let (γ1, C1) be an arbitrary single-layer coordinate coding scheme on Rd. Let f be an (α, β, ν)-Lipschitz smooth function. We have for all x ∈Rd: f(x) − X v∈C1 wvγ1 v(x) ≤α x −hγ1,C1(x) + β X v∈C1 |γ1 v(x)|∥v −x∥2, (1) where wv = f(v) for v ∈C1. This result shows that a high dimensional nonlinear function can be globally approximated by a linear function with respect to the single-layer coding [γ1 v(x)], with unknown linear coefficients [wv]v∈C1 = [f(v)]v∈C1, where the approximation on the right hand size is second order. This bounds directly suggests the following learning method: for each x, we use its coding [γ1 v(x)] ∈ R|C1| as features. We then learn a linear function of the form P v wvγ1 v(x) using a standard linear learning method such as SVM, where [wv] is the unknown coefficient vector to be learned. The optimal coding can be learned using unlabeled data by optimizing the right hand side of (1) over unlabeled data. In the same spirit, we can extend the above result on LCC by including additional layers. This leads to the following bound. Lemma 2.2 (Two-layer LCC Nonlinear Function Approximation) Let (γ, C) = {(γ1, C1)} ∪ {(γ2,v, C2,v) : v ∈C1} be an arbitrary two-layer coordinate coding on Rd. Let f be an (α, β, ν)Lipschitz smooth function. We have for all x ∈Rd: ∥f(x) − X v∈C1 wvγ1 v(x) − X v∈C1 γ1 v(x) X u∈C2,v wv,uγ2,v u (x)∥ ≤0.5α∥x −hγ1,C1(x)∥+ 0.5α X v∈C1 |γ1 v(x)|∥x −hγ2,v,C2,v(x)∥+ ν X v∈C1 |γ1 v(x)|∥x −v∥3, (2) where wv = f(v) for v ∈C1 and wv,u = 0.5∇f(v)⊤(u −v) for u ∈C2,v, and ∥f(x) − X v∈C1 γ1 v(x) X u∈C2,v wv,uγ2,v u (x)∥ ≤α X v∈C1 |γ1 v(x)|∥x −hγ2,v,C2,v(x)∥+ β X v∈C1 |γ1 v(x)|∥x −hγ2,v,C2,v(x)∥2 + β X v∈C1 |γ1 v(x)| X u∈C2,v |γ2,v u (x)|∥u −hγ2,v,C2,v(x)∥2, (3) where wv,u = f(u) for u ∈C2,v. 3 Similar to the interpretation of Lemma 2.1, bounds in Lemma 2.2 implies that we can approximate a nonlinear function f(x) with linear function of the form X v∈C1 wvγ1 v(x) + X v∈C1 X u∈C2,v wv,uγ1 v(x)γ2,v u (x), where [wv] and [wv,u] are the unknown linear coefficients to be learned, and [γ1 v(x)]v∈C1 and [γ2,v u (x)]v∈C1,u∈C2,v form the feature vector. The coding can be learned from unlabeled data by minimizing the right hand side of (2) or (3). Compare with the single-layer coding, we note that the second term on the right hand side of (1) is replaced by the third term on the right hand side of (2). That is, the linear approximation power of the single-layer coding scheme (with a quadratic error term) becomes quadratic approximation power of the two-layer coding scheme (with a cubic error term). The first term on the right hand side of (1) is replaced by the first two terms on the right hand of (2). If the manifold is relatively flat, then the error terms ∥x−hγ1,C1(x)∥and ∥x−hγ2,v,C2,v(x)∥will be relatively small in comparison to the second term on the right hand side of (1). In such case the two-layer coding scheme can potentially improve the single-layer system significantly. This result is similar to that of [16], where the second layer uses local PCA instead of another layer of nonlinear coding. However, the bound in Lemma 2.2 is more refined and specifically applicable to nonlinear coding. The bound in (2) shows the potential of the two-layer coding scheme in achieving higher order approximation power than single layer coding. Higher order approximation gives meaningful improvement when each |C2,v| is relatively small compared to |C1|. On the other hand, if |C1| is small but each |C2,v| is relatively large, then achieving higher order approximation does not lead to meaningful improvement. In such case, the bound in (3) shows that the performance of the two-level coding is still comparable to that of one-level coding scheme in (1). This is the situation where the 1st layer is mainly used to partition the space (while its approximation accuracy is not important), while the main approximation power is achieved with the second layer. The main advantage of two-layer coding in this case is to save computation. This is because instead of solving a single layer coding system with many parameters, we can solve many smaller coding systems, each with a small number of parameters. This is the situation when including nonlinearity in the second layer becomes useful, which means that the deep-coding network approach in this paper has some advantage over [16] which can only approximate linear function with local PCA in the second layer. 3 Deep Coding Network We shall discuss the computational algorithm motivated by Lemma 2.2. While the two bounds (2) and (3) consider different scenarios depending on the relative size of the first layer versus the second layer, in reality it is difficult to differentiate and usually both bounds play a role at the same time. Therefore we have to consider a mixed effect. Instead of minimizing one bound versus another, we shall use them to motivate our algorithm, and design a method that accommodate the underlying intuition reflected by the two bounds. 3.1 Two Layer Formulation In the following, we let C1 = {v1, . . . , vL1}, γ1 vj(Xi) = γi j, C2,vj = {vj,1, . . . , vj,L2}, and γ2,vj vj,k (Xi) = γi j,k, where L1 is the size of the first-layer codebook, and L2 is the size of each individual codebook at the second layer. We take a layer-by-layer approach for training, where the second layer is regarded as a refinement of the first layer, which is consistent with Lemma 2.2. In the first layer, we learn a simple sparse coding model with all data: [γ1, C1] = arg min γ,v   n X i=1   1 2 Xi − L1 X j=1 γi jvj 2 2      subject to γi j ≥0, X j γi j = 1, ∥vj∥≤κ, (4) where κ is some constant, e.g., if all Xi are normalized to have unit length, κ can be set to be 1. For convenience, we not only enforce sum-to-one-constraint on the sparse coefficients, but also 4 impose nonnegative constraints so that P j |γi j| = P j γi j = 1 for all i. This presents a probability interpretation of the data, and allow us to approximate the following term on the right hand sides of (2) and (3): X j γi j Xi − L2 X k=1 γi j,kvj,k ≤  X j γi j Xi − L2 X k=1 γi j,kvj,k 2  1/2 . Note that neither sum to one or 1-norm regularization of coefficients is needed in the derivation of (2), while such constraints are needed in (3). This means additional constraints may hurt performance in the case of (2) although it may help in the case of (3). Since we don’t know which case is the dominant effect, as a compromise we remove the sum-to-one constraint but put in 1-norm regularization which is tunable. We still keep the positivity constraint for interpretability. This leads to the following formulation for the second layer: [γ2,vj, C2,vj] = arg min γ,v   n X i=1 γi j  1 2 Xi − L2 X k=1 γi j,kvj,k 2 2 + λ2 L2 X k=1 γi j,k     subject to γi j,k ≥0, ∥vj,k∥≤1, (5) where λ2 is a l1-norm sparsity regularization parameter controlling the sparseness of solutions. With the codings on both layers, the sparse representation of Xi is  sγi j, γi j[γi j,1, γi j,2, ..., γi j,L2]  j=1,...L1 where s is a scaling factor balances the coding from the two different layers. 3.2 Multi-layer Extension The two-level coding scheme can be easily extended to the third and higher layers. For example, at the third layer, for each base vj,k, the third-layer coding is to solve the following weighted optimization: [γj,k 3 , Cj,k 3 ] = arg min γ,v   n X i=1 γi j,k  1 2 Xi − L3 X l=1 γi j,k,lvj,k,l 2 2 + λ3 X l γi j,k,l     subject to γi j,k,l ≥0, ∥vj,k,l∥≤1. (6) 3.3 Optimization The optimization problems in Equations (4) to (6) can be generally solved by alternating the following two steps: 1) given current cookbook estimation v, compute the optimal sparse coefficients γ; 2) given the new estimates of the sparse coefficients, optimize the cookbooks. Step 1 requires solving an independent optimization problem for each data sample, and it can be computationally very expensive when there are many training examples. In such case, computational efficiency becomes an important issue. We developed some efficient algorithms for solving the optimizations problem in Step 1 by exploiting the fact that the solutions of the optimization problems are sparse. The optimization problem in Step 1 of (4) can be posed as a nonnegative quadratic programming problem with a single sum-to-one equality constraint. We employ an active set method for this problem that easily handles the constraints [4]. Most importantly, since the optimal solutions are very sparse, the active set method often gives the exact solution after a few dozen of iterations. The optimization problem in (5) contains only nonnegative constraints (but not the sum-to-one constraint), for which we employ a pathwise projected Newton (PPN) method [3] that optimizes a block of coordinates per iteration instead of one coordinate at a time in the active set method. As a result, in typical sparse coding settings (for example, in the experiments that we will present shortly in Section 4), the PPN method is able to give the exact solution of a median size (e.g. 2048 dimension) nonnegative quadratic programming problem in milliseconds. Step 2 can be solved in its dual form, which is convex optimization with nonnegative constraints [9]. Since the dual problem contains only nonnegative constraints, we can still employ projected Newton method. It is known that the projected Newton method has superlinear convergence rate under 5 fairly mild conditions [3]. The computational cost in Step 2 is often negligible compared to the computational cost in Step 1 when the cookbook size is no more than a few thousand. A significant advantage of the second layer optimization in our proposal is parallelization. As shown in (5), the second-layer sparse coding is decomposed into L1 independent coding problems, and thus can be naturally parallelized. In our implementation, this is done through Hadoop. 4 Experiments 4.1 MNIST dataset We first demonstrate the effectiveness of the proposed deep coding scheme on the popular MNIST benchmark data [1]. MNIST dataset consists of 60,000 training digits and 10,000 testing digits. In our experiments of deep coding network, the entire training set is used to learn the first-layer coding, with codebook of size 64. For each of the 64 bases in the first layer, a second-layer codebook was learned – the deep coding scheme presented in the paper ensures that the codebook learning can be done independently. We implemented a Hadoop parallel program that solved the 64 codebook learning tasks in about an hour – which would have taken 64 hours on single machine. This shows that easy parallelization is a very attractive aspect of the proposed deep coding scheme, especially for large scale problems. Table 1 shows the performance of deep coding network on MNIST compared to some previous coding schemes. There are a number of interesting observations in these results. First, adding an extra layer yields significant improvement on classification; e.g. for L1 = 512, the classification error rate for single layer LCC is 2.60% [17] while extended LCC achieves 1.98% [16] (the extended LCC method in [16] may also be regarded as a two layer method but the second layer is linear); the two-layer coding scheme here significantly improves the performance with classification error rate of 1.51% . Second, the two-layer coding is less prone to overfitting than its single-layer counterpart. In fact, for the single-layer coding, our experiment shows that further increasing the codebook size will cause overfitting (e.g., with L1 = 8192, the classification error deteriorates to 1.78%). In contrast, the performance of two-layer coding still improves when the second-layer codebook is as large as 512 (and the total codebook size is 64 × 512 = 32768, which is very high-dimensional considering the total number of training data is only 60,000). This property is desirable especially when high-dimensional representation is preferred in the case of using sparse coding plus linear classifier for classifications. Figure 1 shows some first-layer bases and their associated second-layer bases. We can see that the second-layer bases provide deeper details that helps to further explain their first layer parent basis; on the other hand, the parent first-layer basis provides an informative context for its child secondlayer bases. For example, in the seventh row in Fig. 1 where the first-layer basis is like Digit 7, this basis can come from Digit 7, Digit 9 or even Digit 4. Then, its second-layer bases help to further explain the meaning of the first-layer basis: in its associated second-layer bases, the first two bases in that row are parts of Digit 9 while the last basis in that row is a part of Digit ’4’. Meanwhile, the first-layer 7-like basis provides important context for its second-layer part-like bases – without the first-layer basis, the fragmented parts (like the first two second-layer bases in that row) may not be very informative. The zoomed-in details contained in deeper bases significantly help a classifier to resolve difficult examples, and interestingly, coarser details provide useful context for finer details. Single layer sparse coding Number of bases (L1) 512 1024 2048 4096 Local coordinate coding 2.60 2.17 1.79 1.75 Extended LCC 1.95 1.82 1.78 1.64 Two-layer sparse coding Number of bases (L2) 64 128 256 512 L1 = 64 1.85 1.69 1.53 1.51 Table 1: The classification error rate (in %) on MNIST dataset with different sparse coding schemes. 6 Second−layer bases First−layer bases Figure 1: Example of bases from a two-layer coding network on MNIST data. For each row, the first image is a first-layer basis, and the remaining images are its associated second-layer bases. The colorbar is the same for all images, but the range it represents differs from image to image – generally, the color of the background of a image represent zero value, and the colors above and below that color respectively represent positive and negative values. 4.2 PASCAL 2007 The PASCAL 2007 dataset [6] consists of 20 categories of images such as airplanes, persons, cats, tables, and so on. It consists of 2501 training images and 2510 validation images, and the task is to classify an image into one or more of the 20 categories. Therefore, this task can be casted as training 20 binary classifiers. The critical issue is how to extract effective visual features from the images. Among different methods, one particularly effective approach is to use sparse coding to derive a codebook of low-level features (such as SIFT) and represent an image as a bag of visual words [15]. Here, we intend to learn two-layer hierarchical codebooks instead of single flat codebook for the bag-of-word image representation. In our experiments, we first sampled dense SIFT descriptors (each is represented by a 128×1 vector) on each image using four scales, 7 × 7, 16 × 16, 25 × 25 and 31 × 31 with stepsize of 4. Then, the SIFT descriptors from all images (both training and validation images) were utilized to learn first-layer codebooks with different dimensions, L1 = 512, 1024 and 2048. Then, given a firstlayer codebook, for each basis in the codebook, we learned its second-layer codebook of size 64 by solving the weighted optimization in (5). Again, the second-layer codebook learning was done in parallel using Hadoop. With the first-layer and second-layer codebooks, each SIFT feature was coded into a very high dimensional space: using L1 = 1024 as an example, the coding dimension 7 Dimension of the first layer (L1) 512 1024 2048 Single-layer sparse coding 42.7 45.3 48.4 Two-layer sparse coding (L2=64) 51.1 52.8 53.3 Table 2: Average precision (in %) of classification on PASCAL07 dataset using different sparse coding schemes. in total is 1024 + 1024 × 64 = 66, 560. For each image, we employed 1 × 1, 2 × 2 and 1 × 3 spatial pyramid matching with max-pooling. Therefore in the end, each image is represented by a 532, 480(= 66, 560×8)×1 high-dimensionalvector for L1 = 1024. Table 2 shows the classification results. It is clear that the two-layer sparse coding performs significantly better than its single-layer counterpart. We would like to point out that, although we simply employed max-pooling in the experiments, it may not be the best pooling strategy for the hierarchical coding scheme presented in this paper. We believe a better pooling scheme needs to take the hierarchical structure into account, but this remains as an open problem and is one of our future work. 5 Conclusion This paper proposes a principled extension of the traditional single-layer flat sparse coding scheme, where a two-layer coding scheme is derived based on theoretical analysis of nonlinear functional approximation that extends recent results for local coordinate coding. The two-layer approach can be easily generalized to deeper structures in a hierarchical multiple-layer manner. There are two main advantages of multi-layer coding: it can potentially achieve better performance because the deeper layers provide more details and structures; it is computationally more efficient because coding are decomposed into smaller problems. Experiment showed that the performance of two-layer coding can significantly improve that of single-layer coding. For the future directions, it will be interesting to explore the deep coding network with more than two layers. The formulation proposed in this paper grants a straightforward extension from two layers to multiple layers. For small datasets like MNIST, the two-layer scheme seems to be already very powerful. However, for more complicated data, deeper coding with multiple layers may be an effective way for gaining finer and finer features. For example, the first layer coding picks up some large categories such as human, bikes, cups, and so on; then for the human category, the secondlayer coding may find difference among adult, teenager, and senior person; and then the third layer may find even finer features such as race feature at different ages. References [1] http://yann.lecun.com/exdb/mnist/. [2] Samy Bengio, Fernando Pereira, Yoram Singer, and Dennis Strelow. Group sparse coding. In NIPS’ 09, 2009. [3] D P. Bertsekas. Projected newton methods for optimization problems with simple constraints. SIAM J. Control Optim., 20(2):221–246, 1982. [4] Dimitri P. Bertsekas. Nonlinear programming. Athena Scientific, 2003. [5] David Bradley and J. Andrew (Drew) Bagnell. Differentiable sparse coding. In Proceedings of Neural Information Processing Systems 22, December 2008. [6] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. [7] Mark Everingham. Overview and results of the classification challenge. The PASCAL Visual Object Classes Challenge Workshop at ICCV, 2009. [8] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504 – 507, July 2006. 8 [9] Honglak Lee, Alexis Battle, Rajat Raina, and Andrew Y. Ng. Efficient sparse coding algorithms. In Proceedings of the Neural Information Processing Systems (NIPS) 19, 2007. [10] Michael S. Lewicki and Terrence J. Sejnowski. Learning overcomplete representations. Neural Computation, 12:337–365, 2000. [11] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Supervised dictionary learning. In NIPS’ 08, 2008. [12] B.A. Olshausen and D.J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for nature images. Nature, 381:607–609, 1996. [13] Rajat Raina, Alexis Battle, Honglak Lee, Benjamin Packer, and Andrew Y. Ng. Self-taught learning: Transfer learning from unlabeled data. International Conference on Machine Learning, 2007. [14] Marc Aurelio Ranzato, Y-Lan Boureau, and Yann LeCun. Sparse feature learning for deep belief networks. In NIPS’ 07, 2007. [15] Jianchao Yang, Kai Yu, Yihong Gong, and Thomas Huang. Linear spatial pyramid matching using sparse coding for image classification. In IEEE Conference on Computer Vision and Pattern Recognition, 2009. [16] Kai Yu and Tong Zhang. Improved local coordinate coding using local tangents. In ICML’ 09, 2010. [17] Kai Yu, Tong Zhang, and Yihong Gong. Nonlinear learning using local coordinate coding. In NIPS’ 09, 2009. 9
2010
11
3,866
Gated Softmax Classification Roland Memisevic Department of Computer Science ETH Zurich Switzerland roland.memisevic@gmail.com Christopher Zach Department of Computer Science ETH Zurich Switzerland chzach@inf.ethz.ch Geoffrey Hinton Department of Computer Science University of Toronto Canada hinton@cs.toronto.edu Marc Pollefeys Department of Computer Science ETH Zurich Switzerland marc.pollefeys@inf.ethz.ch Abstract We describe a ”log-bilinear” model that computes class probabilities by combining an input vector multiplicatively with a vector of binary latent variables. Even though the latent variables can take on exponentially many possible combinations of values, we can efficiently compute the exact probability of each class by marginalizing over the latent variables. This makes it possible to get the exact gradient of the log likelihood. The bilinear score-functions are defined using a three-dimensional weight tensor, and we show that factorizing this tensor allows the model to encode invariances inherent in a task by learning a dictionary of invariant basis functions. Experiments on a set of benchmark problems show that this fully probabilistic model can achieve classification performance that is competitive with (kernel) SVMs, backpropagation, and deep belief nets. 1 Introduction Consider the problem of recognizing an image that contains a single hand-written digit that has been approximately normalized but may have been written in one of a number of different styles. Features extracted from the image often provide much better evidence for a combination of a class and a style than they do for the class alone. For example, a diagonal stroke might be highly compatible with an italic 1 or a non-italic 7. A short piece of horizontal stroke at the top right may be compatible with a very italic 3 or a 5 with a disconnected top. A fat piece of vertical stroke at the bottom of the image near the center may be compatible with a 1 written with a very thick pen or a narrow 8 written with a moderately thick pen so that the bottom loop has merged. If each training image was labeled with both the class and the values of a set of binary style features, it would make sense to use the image features to create a bipartite conditional random field (CRF) which gave low energy to combinations of a class label and a style feature that were compatible with the image feature. This would force the way in which local features were interpreted to be globally consistent about style features such as stroke thickness or ”italicness”. But what if the values of the style features are missing from the training data? We describe a way of learning a large set of binary style features from training data that are only labeled with the class. Our ”gated softmax” model allows the 2K possible combinations of the K learned style features to be integrated out. This makes it easy to compute the posterior probability of a class label on test data and easy to get the exact gradient of the log probability of the correct label on training data. 1 1.1 Related work The model is related to several models known in the literature, that we discuss in the following. [1] describes a bilinear sparse coding model that, similar to our model, can be trained discriminatively to predict classes. Unlike in our case, there is no interpretation as a probabilistic model, and – consequently – not a simple learning rule. Furthermore, the model parameters, unlike in our case, are not factorized, and as a result the model cannot extract features which are shared among classes. Feature sharing, as we shall show, greatly improves classification performance as it allows for learning of invariant representations of the input. Our model is similar to the top layer of the deep network discussed in [2], again, without factorization and feature sharing. We also derive and utilize discriminative gradients that allow for efficient training. Our model can be viewed also as a “degenerate” special case of the image transformation model described in [3], which replaces the output-image in that model with a “one-hot” encoded class label. The intractable objective function of that model, as a result, collapses into a tractable form, making it possible to perform exact inference. We describe the basic model, how it relates to logistic regression, and how to perform learning and inference in the following section. We show results on benchmark classification tasks in Section 3 and discuss possible extensions in Section 4. 2 The Gated Softmax Model 2.1 Log-linear models We consider the standard classification task of mapping an input vector x ∈IRn to a class-label y. One of the most common, and certainly oldest, approaches to solving this task is logistic regression, which is based on a log-linear relationship between inputs and labels (see, for example, [4]). In particular, using a set of linear, class-specific score functions sy(x) = wt yx (1) we can obtain probabilities over classes by exponentiating and normalizing: p(y|x) = exp(wt yx) P y′ exp(wt y′x) (2) Classification decisons for test-cases xtest are given by arg max p(y|xtest). Training amounts to adapting the vectors wy by maximizing the average conditional log-probability 1 N P α log p(yα|xα) for a set {(xα, yα)}N α=1 of training cases. Since there is no closed form solution, training is typically performed using some form of gradient based optimization. In the case of two or more labels, logistic regression is also referred to as the “multinomial logit model” or the “maximum entropy model” [5]. It is possible to include additive “bias” terms by in the definition of the score function (Eq. 1) so that class-scores are affine, rather than linear, functions of the input. Alternatively, we can think of the inputs as being in a “homogeneous” representation with an extra constant 1-dimension, in which biases are implemented implicitly. Important properties of logistic regression are that (a) the training objective is convex, so there are no local optima, and (b) the model is probabilistic, hence it comes with well-calibrated estimates of uncertainty in the classification decision (ref. Eq. 2) [4]. Property (a) is shared with, and property (b) a possible advantage over, margin-maximizing approaches, like support vector machines [4]. 2.2 A log-bilinear model Logistic regression makes the assumption that classes can be separated in the input space with hyperplanes (up to noise). A common way to relax this assumption is to replace the linear separation manifold, and thus, the score function (Eq. 1), with a non-linear one, such as a neural network [4]. Here, we take an entirely different, probabilistic approach. We take the stance that we do not know what form the separation manifold takes on, and instead introduce a set of probabilistic hidden variables which cooperate to model the decision surface jointly. To obtain classification decisions at test-time and for training the model, we then need to marginalize over these hidden variables. 2 hk xi h x y xi x hk h y f f f (a) (b) Figure 1: (a) A log-bilinear model: Binary hidden variables hk can blend in log-linear dependencies that connect input features xi with labels y. (b) Factorization allows for blending in a learned feature space. More specifically, we consider the following variation of logistic regression: We introduce a vector h of binary latent variables (h1, . . . , hK) and replace the linear score (Eq. 1) with a bilinear score of x and h: sy(x, h) = htWyx. (3) The bilinear score combines, quadratically, all pairs of input components xi with hidden variables hk. The score for each class is thus a quadratic product, parameterized by a class-specific matrix Wy. This is in contrast to the inner product, parameterized by class-specific vectors wy, for logistic regression. To turn scores into probabilities we can again exponentiate and normalize p(y, h|x) = exp(htWyx) P y′h′ exp(h′tWy′x). (4) In contrast to logistic regression, we obtain a distribution over both the hidden variables h and labels y. We get back the (input-dependent) distributions over labels with an additional marginalization over h: p(y|x) = X h∈{0,1}K p(y, h|x). (5) As with logistic regression, we thus get a distribution over labels y, conditioned on inputs x. The parameters are the set of class-specific matrices Wy. As before, we can add bias terms to the score, or add a constant 1-dimension to x and h. Note that for any single and fixed instantiation of h in Eq. 3, we obtain the logistic regression score (up to normalization), since the argument in the “exp()” collapses to the class-specific row-vector htWy. Each of the 2K summands in Eq. 5 is therefore exactly one logistic classifier, showing that the model is equivalent to a mixture of 2K logistic regressors with shared weights. Because of the weight-sharing the number of parameters grows linearly not exponentially in the number of hidden variables. In the following, we let W denote the three-way tensor of parameters (by “stacking” the matrices Wy). The sum over 2K terms in Eq. 5 seems to preclude any reasonably large value for K. However, similar to the models in [6], [7], [2], the marginalization can be performed in closed form and can be computed tractably by a simple re-arrangement of terms: p(y|x) = X h p(y, h|x) ∝ X h exp(htWyx) = X h exp( X ik Wyikxihk) = Y k 1 + exp( X i Wyikxi) (6) 3 This shows that the class probabilities decouple into a product of K terms1, each of which is a mixture of a uniform and an input-conditional “softmax”. The model is thus a product of experts [8] (which is conditioned on input vectors x). It can be viewed also as a “strange” kind of Gated Boltzmann Machine [9] that models a single discrete output variable y using K binary latent variables. As we shall show, it is the conditioning on the inputs x that renders this model useful. Typically, training products of experts is performed using approximate, sampling based schemes, because of the lack of a closed form for the data probability [8]. The same is true for most conditional products of experts [9]. Note that in our case, the distribution that the model outputs is a distribution over a countable (and, in particular, fairly small2) number of possible values, so we can compute the constant Ω= P y′ Q k(1 + exp(P i Wyikxi)), that normalizes the left-hand side in Eqs. 6, efficiently. The same observation was utilized before in [6], [7], [10]. 2.3 Sharing features among classes The score (or “activation”) that class label y receives from each of the 2K terms in Eq. 5 is a linear function of the inputs. A different class y′ receives activations from a different, non-overlapping set of functions. The number of parameters is thus: (number of inputs) × (number of labels) × (number of hidden variables). As we shall show in Section 3 the model can achieve fairly good classification performance. A much more natural way to define class-dependencies in this model, however, is by allowing for some parameters to be shared between classes. In most natural problems, inputs from different classes share the same domain, and therefore show similar characteristics. Consider, for example, handwritten digits, which are composed of strokes, or human faces, which are composed of facial features. The features behave like “atoms” that, by themselves, are only weakly indicative of a class; it is the composition of these atoms that is highly class-specific3. Note that parameter sharing would not be possible in models like logistic regression or SVMs, which are based on linear score functions. In order to obtain class-invariant features, we factorize the parameter tensor W as follows: Wyik = F X f=1 W x ifW y yfW h kf (7) The model parameters are now given by three matrices W x, W y, W h, and each component Wyik of W is defined as a three-way inner product of column vectors taken from these matrices. This factorization of a three-way parameter tensor was previously used by [3] to reduce the number of parameters in an unsupervised model of images. Plugging the factorized form for the weight tensor into the definition of the probability (Eq. 4) and re-arranging terms yields p(y, h|x) ∝exp  X f X i xiW x if  X k hkW h kf  W y yf  (8) This shows that, after factorizing, we obtain a classification decision by first projecting the input vector x (and the vector of hidden variables h) onto F basis functions, or filters. The resulting filter responses are multiplied and combined linearly using class-specific weights W y yf. An illustration of the model is shown in Figure 1 (b). As before, we need to marginalize over h to obtain class-probabilities. In analogy to Eqs. 6, we obtain the final form (here written in the log-domain): log p(y|x) = ay −log X y′ exp(ay′) (9) 1The log-probability thus decouples into a sum over K terms and is the preferred object to compute in a numerically stable implementation. 2We are considering “usual” classification problems, so the number of classes is in the tens, hundreds or possibly even millions, but it is not exponential like in a CRF. 3If this was not the case, then many practical classification problems would be much easier to solve. 4 where ay = X k log  1 + exp X f ( X i xiW x if)W h kfW y yf  . (10) Note that in this model, learning of features (the F basis functions W x ·f) is tied in with learning of the classifier itself. In contrast to neural networks and deep learners ([11], [12]), the model does not try to learn a feature hierarchy. Instead, learned features are combined multiplicatively with hidden variables and the results added up to provide the inputs to the class-units. In terms of neural networks nomenclature, the factored model can best be thought of as a single-hidden-layer network. In general, however, the concept of “layers” is not immediately applicable in this architecture. 2.4 Interpretation An illustration of the graphical model is shown in Figure 1 (non-factored model on the left, factored model on the right). Each hidden variable hk that is “on” contributes a slice W·k· of the parameter tensor to a blend P k hkW·k· of at most K matrices. The classification decision is the sum over all possible instantiations of h and thus over all possible such blends. A single blend is simply a linear logistic classifier. An alternative view is that each output unit y accumulates evidence for or against its class by projecting the input onto K basis functions (the rows of Wy in Eq. 4). Each instantiation of h constitutes one way of combining a subset of basis function responses that are considered to be consistent into a single piece of evidence. Marginalizing over h allows us to express the fact that there can be multiple alternative sets of consistent basis function responses. This is like using an “OR” gate to combine the responses of a set of “AND” gates, or like computing a probabilistic version of a disjunctive normal form (DNF). As an example, consider the task of classifying a handwritten 0 that is roughly centered in the image but rotated by a random angle (see also Section 3): Each of the following combinations: (i) a vertical stroke on the left and a vertical stroke on the right; (ii) a horizontal stroke on the top and a horizontal stroke on the bottom; (iii) a diagonal stroke on the bottom left and a diagonal stroke on the top right, would constitute positive evidence for class 0. The model can accomodate each if necessary by making appropriate use of the hidden variables. The factored model, where basis function responses are computed jointly for all classes and then weighted differently for each class, can be thought of as accumulating evidence accordingly in the “spatial frequency domain”. 2.5 Discriminative gradients Like the class-probabilities (Eq. 5) and thus the model’s objective function, the derivative of the log-probability w.r.t. model parameters, is tractable, and scales linearly not exponentially with K. The derivative w.r.t. to a single parameter W¯yik of the unfactored form (Section 2.2) takes the form: ∂log p(y|x) ∂W¯yik = δ¯yy −p(¯y|x)  σ X i xiWyikhk  xi with σ(a) = 1 + exp(−a) −1. (11) To compute gradients of the factored model (Section 2.3) we use Eq. 11 and the chain rule, in conjunction with Eq. 7: ∂log p(y|x) ∂W x if = X ¯y,k ∂log p(y|x) ∂W¯yik ∂W¯yik ∂W x if . (12) Similarly for W y yf and W h kf (with the sums running over the remaining indices). As with logistic regression, we can thus perform gradient based optimization of the model likelihood for training. Moreover, since we have closed form expressions, it is possible to use conjugate gradients for fast training. However, in contrast to logistic regression, the model’s objective function is non-linear, so it can contain local optima. We discuss this issue in more detail in the following section. Like logistic regression, and in contrast to SVMs, the model computes probabilities and thus provides well-calibrated estimates of uncertainty in its decisions. 5 2.6 Optimization The log-probability is non-linear and can contain local optima w.r.t. W, so some care has to be taken to obtain good local optima during training. In general we found that simply deploying a generalpurpose conjugate gradient solver on random parameter initializations does not reliably yield good local optima (even though it can provide good solutions in some cases). Similar problems occur when training neural networks. While simple gradient descent tends to yield better results, we adopt the approach discussed in [2] in most of our experiments, which consists in initializing with class-specific optimization: The set of parameters in our proposed model is the same as the ones for an ensemble of class-specific distributions p(x|y) (by simply adjusting the normalization in Eq. 4). More specifically, the distribution p(x|y) of inputs given labels is a factored Restricted Boltzmann machine, that can be optimized using contrastive divergence [3]. We found that performing a few iterations of class-conditional optimization as an initialization reliably yields good local optima of the model‘s objective function. We also experimented with alternative approaches to avoiding bad local optima, such as letting parameters grow slowly during the optimization (“annealing”), and found that class-specific pretraining yields the best results. This pre-training is reminiscent of training deep networks, which also rely on a pre-training phase. In contrast, however, here we pre-train class-conditionally, and initialize the whole model at once, rather than layer-by-layer. It is possible to perform a different kind of annealing by adding the class-specific and the model’s actual objective function, and slowly reducing the class-specific influence using some weighting scheme. We used both the simple and the annealed optimization in some of our experiments, but did not find clear evidence that annealing leads to better local optima. We found that, given an initialization near a local optimum of the objective function, conjugate gradients can significantly outperform stochastic gradient descent in terms of the speed at which one can optimize both the model’s own objective function and the cost on validation data. In practice, one can add a regularization (or “weight-decay”) penalty −λ∥W∥2 to the objective function, as is common for logistic regression and other classifiers, where λ is chosen by crossvalidation. 3 Experiments We applied the Gated Softmax (GSM) classifier4 on the benchmark classification tasks described in [11]. The benchmark consists of a set of classification problems, that are difficult, because they contain many subtle, and highly complicated, dependencies of classes on inputs. It was initially introduced to evaluate the performance of deep neural networks. Some examples tasks are illustrated in Figure 3. The benchmark consists of 8 datasets, each of which contains several thousand graylevel images of size 28 × 28 pixels. Training set sizes vary between 1200 and 10000. The testsets contain 50000 examples each. There are three two-class problems (“rectangles”, “rectanglesimages” and “convex”) and five ten-class problems (which are variations of the MNIST data-set5). To train the model we make use of the approach described in Section 2.6. We do not make use of any random re-starts or other additional ways to find good local optima of the objective function. For the class-specific initializations, we use a class-specific RBM with binary observables on the datasets “rectangles”, “mnist-rot”, “convex” and “mnist”, because they contain essentially binary inputs (or a heavily-skewed histogram), and Gaussian observables on the others. For the Gaussian case, we normalize the data to mean zero and standard-deviation one (independently in each dimension). We also tried “hybrid” approaches on some data-sets where we optimize a sum of the RBM and the model objective function, and decrease the influence of the RBM as training progresses. 3.1 Learning task-dependent invariances The “rectangles” task requires the classification of rectangle images into the classes horizontal vs. vertical (some examples are shown in Figure 3 (a)). Figure 2 (left) shows random sets of 50 rows of the matrix Wy learned by the unfactored model (class horizontal on the top, class vertical on 4An implementation of the model is available at http://learning.cs.toronto.edu/∼rfm/gatedsoftmax/ 5http://yann.lecun.com/exdb/mnist/ 6 Figure 2: Left: Class-specific filters learned from the rectangle task – top: filters in support of the label horizontal, bottom: filters in support of the class label vertical. Right: Shared filters learned from rotation-invariant digit classification. the bottom). Each row Wy corresponds to a class-specific image filter. We display the filters using gray-levels, where brighter means larger. The plot shows that the hidden units, like “Hough-cells”, make it possible to accumulate evidence for the different classes, by essentially counting horizontal and vertical strokes in the images. Interestingly, classification error is 0.56% false, which is about a quarter the number of mis-classifications of the next best performer (SVMs with 2.15% error) and significantly more accurate than all other models on this data-set. An example of filters learned by the factored model is shown in Figure 2 (right). The task is classification of rotated digits in this example. Figure 3 (b) shows some example inputs. In this task, learning invariances with respect to rotation is crucial for achieving good classification performance. Interestingly, the model achieves rotation-invariance by projecting onto a set of circular or radial Fourier-like components. It is important to note that the model infers these filters to be the optimal input representation entirely from the task at hand. The filters resemble basis functions learned by an image transformation model trained to rotate image patches described in [3]. Classification performance is 11.75% error, which is comparable with the best results on this dataset. (a) (b) (c) (d) Figure 3: Example images from four of the “deep learning” benchmark tasks: (a) Rectangles (2class): Distinguish horizontal from vertical rectangles; (b) Rotated digits (10-class): Determine the class of the digit; (c) Convex vs. non-convex (2-class): Determine if the image shows a convex or non-convex shape; (d) Rectangles with images (2-class): Like (a), but rectangles are rendered using natural images. 3.2 Performance Classification performance on all 8 datasets is shown in Figure 4. To evaluate the model we chose the number of hiddens units K, the number of factors F and the regularizer λ based on a validation 7 set (typically by taking a fifth of the training set). We varied both K and F between 50 and 1000 on a fairly coarse grid, such as 50, 500, 1000, for most datasets, and for most cases we tried two values for the regularizer (λ = 0.001 and λ = 0.0). A finer grid may improve performance further. Table 4 shows that the model performs well on all data-sets (comparing numbers are from [11]). It is among the best (within 0.01 tolerance), or the best performer, in three out of 8 cases. For comparison, we also show the error rates achieved with the unfactored model (Section 2.2), which also performs fairly well as compared to deep networks and SVMs, but is significantly weaker in most cases than the factored model. SVM NNet RBM DEEP GSM dataset/model: SVMRBF SVMPOL NNet RBM DBN3 SAA3 GSM (unfact) rectangles 2.15 2.15 7.16 4.71 2.60 2.41 0.83 (0.56) rect.-images 24.04 24.05 33.20 23.69 22.50 24.05 22.51 (23.17) mnistplain 3.03 3.69 4.69 3.94 3.11 3.46 3.70 (3.98) convexshapes 19.13 19.82 32.25 19.92 18.63 18.41 17.08 (21.03) mnistbackrand 14.58 16.62 20.04 9.80 6.73 11.28 10.48 (11.89) mnistbackimg 22.61 24.01 27.41 16.15 16.31 23.00 23.65 (22.07) mnistrotbackimg 55.18 56.41 62.16 52.21 47.39 51.93 55.82 (55.16) mnistrot 11.11 15.42 18.11 14.69 10.30 10.30 11.75 (16.15) Figure 4: Classification error rates on test data (error rates are in %). Models: SVMRBF: SVM with RBF kernels. SVMPOL: SVM with polynomial kernels. NNet: (MLP) Feed-forward neural net. RBM: Restricted Boltzmann Machine. DBN3: Three-layer Deep Belief Net. SAA3: Three-layer stacked auto-associator. GSM: Gated softmax model (in brackets: unfactored model). 4 Discussion/Future work Several extensions of deep learning methods, including deep kernel methods, have been suggested recently (see, for example, [13], [14]), giving similar performance to the networks that we compare to here. Our method differs from these approaches in that it is not a multi-layer architecture. Instead, our model gets its power from the fact that inputs, hidden variables and labels interact in three-way cliques. Factored three-way interactions make it possible to learn task-specific features and to learn transformational invariances inherent in the task at hand. It is interesting to note that the model outperforms kernel methods on many of these tasks. In contrast to kernel methods, the GSM provides fully probabilistic outputs and can be easily trained online, which makes it directly applicable to very large datasets. Interestingly, the filters that the model learns (see previous Section; Figure 2) resemble those learned be recent models of image transformations (see, for example, [3]). In fact, learning of invariances in general is typically addressed in the context of learning transformations. Interestingly, most transformation models themselves are also defined via three-way interactions of some kind ([15], [16], [17], [18] , [19]). In contrast to a model of transformations, it is the classification task that defines the invariances here, and the model learns the invariant representations from that task only. Combining the explicit examples of transformations provided by video sequences with the implicit information about transformational invariances provided by labels is a promising future direction. Given the probabilistic definition of the model, it would be interesting to investigate a fully Bayesian formulation that integrates over model parameters. Note that we trained the model without sparsity constraints and in a fully supervised way. Encouraging the hidden unit activities to be sparse (e.g. using the approach in [20]) and/or training the model semi-supervised are further directions for further research. Another direction is the extension to structured prediction problems, for example, by deploying the model as clique potential in a CRF. Acknowledgments We thank Peter Yianilos and the anonymous reviewers for valuable discussions and comments. 8 References [1] Julien Mairal, Francis Bach, Jean Ponce, Guillermo Sapiro, and Andrew Zisserman. Supervised dictionary learning. In Advances in Neural Information Processing Systems 21. 2009. [2] Vinod Nair and Geoffrey Hinton. 3D object recognition with deep belief nets. In Advances in Neural Information Processing Systems 22. 2009. [3] Roland Memisevic and Geoffrey Hinton. Learning to represent spatial transformations with factored higher-order Boltzmann machines. Neural Computation, 22(6):1473–92, 2010. [4] Christopher Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2006. [5] Adam Berger, Vincent Della Pietra, and Stephen Della Pietra. A maximum entropy approach to natural language processing. Computational Linguistics, 22(1):39–71, 1996. [6] Geoffrey Hinton. To recognize shapes, first learn to generate images. Technical report, Toronto, 2006. [7] Hugo Larochelle and Yoshua Bengio. Classification using discriminative restricted Boltzmann machines. In ICML ’08: Proceedings of the 25th international conference on Machine learning, New York, NY, USA, 2008. ACM. [8] Geoffrey Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [9] Roland Memisevic and Geoffrey Hinton. Unsupervised learning of image transformations. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2007. [10] Vinod Nair and Geoffrey Hinton. Implicit mixtures of restricted Boltzmann machines. In Advances in Neural Information Processing Systems 21. 2009. [11] Hugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In ICML ’07: Proceedings of the 24th international conference on Machine learning, New York, NY, USA, 2007. ACM. [12] Yoshua Bengio and Yann LeCun. Scaling learning algorithms towards ai. In L. Bottou, O. Chapelle, D. DeCoste, and J. Weston, editors, Large-Scale Kernel Machines. MIT Press, 2007. [13] Youngmin Cho and Lawrence Saul. Kernel methods for deep learning. In Advances in Neural Information Processing Systems 22. 2009. [14] 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, New York, NY, USA, 2008. ACM. [15] Bruno Olshausen, Charles Cadieu, Jack Culpepper, and David Warland. Bilinear models of natural images. In SPIE Proceedings: Human Vision Electronic Imaging XII, San Jose, 2007. [16] Rajesh Rao and Dana Ballard. Efficient encoding of natural time varying images produces oriented spacetime receptive fields. Technical report, Rochester, NY, USA, 1997. [17] Rajesh Rao and Daniel Ruderman. Learning lie groups for invariant visual perception. In In Advances in Neural Information Processing Systems 11. MIT Press, 1999. [18] David Grimes and Rajesh Rao. Bilinear sparse coding for invariant vision. Neural Computation, 17(1):47– 73, 2005. [19] Joshua Tenenbaum and William Freeman. Separating style and content with bilinear models. Neural Computation, 12(6):1247–1283, 2000. [20] Honglak Lee, Chaitanya Ekanadham, and Andrew Ng. Sparse deep belief net model for visual area V2. In Advances in Neural Information Processing Systems 20. MIT Press, 2008. 9
2010
110
3,867
Estimation of R´enyi Entropy and Mutual Information Based on Generalized Nearest-Neighbor Graphs D´avid P´al Department of Computing Science University of Alberta Edmonton, AB, Canada dpal@cs.ualberta.ca Barnab´as P´oczos School of Computer Science Carnegie Mellon University Pittsburgh, PA, USA poczos@ualberta.ca Csaba Szepesv´ari Department of Computing Science University of Alberta Edmonton, AB, Canada szepesva@ualberta.ca Abstract We present simple and computationally efficient nonparametric estimators of R´enyi entropy and mutual information based on an i.i.d. sample drawn from an unknown, absolutely continuous distribution over Rd. The estimators are calculated as the sum of p-th powers of the Euclidean lengths of the edges of the ‘generalized nearest-neighbor’ graph of the sample and the empirical copula of the sample respectively. For the first time, we prove the almost sure consistency of these estimators and upper bounds on their rates of convergence, the latter of which under the assumption that the density underlying the sample is Lipschitz continuous. Experiments demonstrate their usefulness in independent subspace analysis. 1 Introduction We consider the nonparametric problem of estimating R´enyi α-entropy and mutual information (MI) based on a finite sample drawn from an unknown, absolutely continuous distribution over Rd. There are many applications that make use of such estimators, of which we list a few to give the reader a taste: Entropy estimators can be used for goodness-of-fit testing (Vasicek, 1976; Goria et al., 2005), parameter estimation in semi-parametric models (Wolsztynski et al., 2005), studying fractal random walks (Alemany and Zanette, 1994), and texture classification (Hero et al., 2002b,a). Mutual information estimators have been used in feature selection (Peng and Ding, 2005), clustering (Aghagolzadeh et al., 2007), causality detection (Hlav´ackova-Schindler et al., 2007), optimal experimental design (Lewi et al., 2007; P´oczos and L˝orincz, 2009), fMRI data processing (Chai et al., 2009), prediction of protein structures (Adami, 2004), or boosting and facial expression recognition (Shan et al., 2005). Both entropy estimators and mutual information estimators have been used for independent component and subspace analysis (Learned-Miller and Fisher, 2003; P´oczos and L˝orincz, 2005; Hulle, 2008; Szab´o et al., 2007), and image registration (Kybic, 2006; Hero et al., 2002b,a). For further applications, see Leonenko et al. (2008); Wang et al. (2009a). In a na¨ıve approach to R´enyi entropy and mutual information estimation, one could use the so called “plug-in” estimates. These are based on the obvious idea that since entropy and mutual information are determined solely by the density f (and its marginals), it suffices to first estimate the density using one’s favorite density estimate which is then “plugged-in” into the formulas defining entropy 1 and mutual information. The density is, however, a nuisance parameter which we do not want to estimate. Density estimators have tunable parameters and we may need cross validation to achieve good performance. The entropy estimation algorithm considered here is direct—it does not build on density estimators. It is based on k-nearest-neighbor (NN) graphs with a fixed k. A variant of these estimators, where each sample point is connected to its k-th nearest neighbor only, were recently studied by Goria et al. (2005) for Shannon entropy estimation (i.e. the special case α = 1) and Leonenko et al. (2008) for R´enyi α-entropy estimation. They proved the weak consistency of their estimators under certain conditions. However, their proofs contain some errors, and it is not obvious how to fix them. Namely, Leonenko et al. (2008) apply the generalized Helly-Bray theorem, while Goria et al. (2005) apply the inverse Fatou lemma under conditions when these theorems do not hold. This latter error originates from the article of Kozachenko and Leonenko (1987), and this mistake can also be found in Wang et al. (2009b). The first main contribution of this paper is to give a correct proof of consistency of these estimators. Employing a very different proof techniques than the papers mentioned above, we show that these estimators are, in fact, strongly consistent provided that the unknown density f has bounded support and α ∈(0, 1). At the same time, we allow for more general nearest-neighbor graphs, wherein as opposed to connecting each point only to its k-th nearest neighbor, we allow each point to be connected to an arbitrary subset of its k nearest neighbors. Besides adding generality, our numerical experiments seem to suggest that connecting each sample point to all its k nearest neighbors improves the rate of convergence of the estimator. The second major contribution of our paper is that we prove a finite-sample high-probability bound on the error (i.e. the rate of convergence) of our estimator provided that f is Lipschitz. According to the best of our knowledge, this is the very first result that gives a rate for the estimation of R´enyi entropy. The closest to our result in this respect is the work by Tsybakov and van der Meulen (1996) who proved the root-n consistency of an estimator of the Shannon entropy and only in one dimension. The third contribution is a strongly consistent estimator of R´enyi mutual information that is based on NN graphs and the empirical copula transformation (Dedecker et al., 2007). This result is proved for d ≥3 1 and α ∈(1/2, 1). This builds upon and extends the previous work of P´oczos et al. (2010) where instead of NN graphs, the minimum spanning tree (MST) and the shortest tour through the sample (i.e. the traveling salesman problem, TSP) were used, but it was only conjectured that NN graphs can be applied as well. There are several advantages of using k-NN graph over MST and TSP (besides the obvious conceptual simplicity of k-NN): On a serial computer the k-NN graph can be computed somewhat faster than MST and much faster than the TSP tour. Furthermore, in contrast to MST and TSP, computation of k-NN can be easily parallelized. Secondly, for different values of α, MST and TSP need to be recomputed since the distance between two points is the p-th power of their Euclidean distance where p = d(1 −α). However, the k-NN graph does not change for different values of p, since p-th power is a monotone transformation, and hence the estimates for multiple values of α can be calculated without the extra penalty incurred by the recomputation of the graph. This can be advantageous e.g. in intrinsic dimension estimators of manifolds (Costa and Hero, 2003), where p is a free parameter, and thus one can calculate the estimates efficiently for a few different parameter values. The fourth major contribution is a proof of a finite-sample high-probability error bound (i.e. the rate of convergence) for our mutual information estimator which holds under the assumption that the copula of f is Lipschitz. According to the best of our knowledge, this is the first result that gives a rate for the estimation of R´enyi mutual information. The toolkit for proving our results derives from the deep literature of Euclidean functionals, see, (Steele, 1997; Yukich, 1998). In particular, our strong consistency result uses a theorem due to Redmond and Yukich (1996) that essentially states that any quasi-additive power-weighted Euclidean functional can be used as a strongly consistent estimator of R´enyi entropy (see also Hero and Michel 1999). We also make use of a result due to Koo and Lee (2007), who proved a rate of convergence result that holds under more stringent conditions. Thus, the main thrust of the present work is show1Our result for R´enyi entropy estimation holds for d = 1 and d = 2, too. 2 ing that these conditions hold for p-power weighted nearest-neighbor graphs. Curiously enough, up to now, no one has shown this, except for the case when p = 1, which is studied in Section 8.3 of (Yukich, 1998). However, the condition p = 1 gives results only for α = 1 −1/d. Unfortunately, the space limitations do not allow us to present any of our proofs, so we relegate them into the extended version of this paper (P´al et al., 2010). We instead try to give a clear explanation of R´enyi entropy and mutual information estimation problems, the estimation algorithms and the statements of our converge results. Additionally, we report on two numerical experiments. In the first experiment, we compare the empirical rates of convergence of our estimators with our theoretical results and plug-in estimates. Empirically, the NN methods are the clear winner. The second experiment is an illustrative application of mutual information estimation to an Independent Subspace Analysis (ISA) task. The paper is organized as follows: In the next section, we formally define R´enyi entropy and R´enyi mutual information and the problem of their estimation. Section 3 explains the ‘generalized nearest neighbor’ graphs. This graph is then used in Section 4 to define our R´enyi entropy estimator. In the same section, we state a theorem containing our convergence results for this estimator (strong consistency and rates). In Section 5, we explain the copula transformation, which connects R´enyi entropy with R´enyi mutual information. The copula transformation together with the R´enyi entropy estimator from Section 4 is used to build an estimator of R´enyi mutual information. We conclude this section with a theorem stating the convergence properties of the estimator (strong consistency and rates). Section 6 contains the numerical experiments. We conclude the paper by a detailed discussion of further related work in Section 7, and a list of open problems and directions for future research in Section 8. 2 The Formal Definition of the Problem R´enyi entropy and R´enyi mutual information of d real-valued random variables2 X = (X1, X2, . . . , Xd) with joint density f : Rd →R and marginal densities fi : R →R, 1 ≤i ≤d, are defined for any real parameter α assuming the underlying integrals exist. For α ̸= 1, R´enyi entropy and R´enyi mutual information are defined respectively as3 Hα(X) = Hα(f) = 1 1 −α log Z Rd f α(x1, x2, . . . , xd) d(x1, x2, . . . , xd) , (1) Iα(X) = Iα(f) = 1 α −1 log Z Rd f α(x1, x2, . . . , xd) d Y i=1 fi(xi) !1−α d(x1, x2, . . . , xd). (2) For α = 1 they are defined by the limits H1 = limα→1 Hα and I1 = limα→1 Iα. In fact, Shannon (differential) entropy and the Shannon mutual information are just special cases of R´enyi entropy and R´enyi mutual information with α = 1. The goal of this paper is to present estimators of R´enyi entropy (1) and R´enyi information (2) and study their convergence properties. To be more explicit, we consider the problem where we are given i.i.d. random variables X1:n = (X1, X2, . . . , Xn) where each Xj = (X1 j , X2 j , . . . , Xd j ) has density f : Rd →R and marginal densities fi : R →R and our task is to construct an estimate bHα(X1:n) of Hα(f) and an estimate bIα(X1:n) of Iα(f) using the sample X1:n. 3 Generalized Nearest-Neighbor Graphs The basic tool to define our estimators is the generalized nearest-neighbor graph and more specifically the sum of the p-th powers of Euclidean lengths of its edges. Formally, let V be a finite set of points in an Euclidean space Rd and let S be a finite non-empty set of positive integers; we denote by k the maximum element of S. We define the generalized 2We use superscript for indexing dimension coordinates. 3The base of the logarithms in the definition is not important; any base strictly bigger than 1 is allowed. Similarly as with Shannon entropy and mutual information, one traditionally uses either base 2 or e. In this paper, for definitiveness, we stick to base e. 3 nearest-neighbor graph NNS(V ) as a directed graph on V . The edge set of NNS(V ) contains for each i ∈S an edge from each vertex x ∈V to its i-th nearest neighbor. That is, if we sort V \{x} = {y1, y2, . . . , y|V |−1} according to the Euclidean distance to x (breaking ties arbitrarily): ∥x −y1∥≤∥x −y2∥≤· · · ≤∥x −y|V |−1∥then yi is the i-th nearest-neighbor of x and for each i ∈S there is an edge from x to yi in the graph. For p ≥0 let us denote by Lp(V ) the sum of the p-th powers of Euclidean lengths of its edges. Formally, Lp(V ) = X (x,y)∈E(NNS(V )) ∥x −y∥p , (3) where E(NNS(V )) denotes the edge set of NNS(V ). We intentionally hide the dependence on S in the notation Lp(V ). For the rest of the paper, the reader should think of S as a fixed but otherwise arbitrary finite non-empty set of integers, say, S = {1, 3, 4}. The following is a basic result about Lp. The proof can be found in P´al et al. (2010). Theorem 1 (Constant γ). Let X1:n = (X1, X2, . . . , Xn) be an i.i.d. sample from the uniform distribution over the d-dimensional unit cube [0, 1]d. For any p ≥0 and any finite non-empty set S of positive integers there exists a constant γ > 0 such that lim n→∞ Lp(X1:n) n1−p/d = γ a.s. (4) The value of γ depends on d, p, S and, except for special cases, an analytical formula for its value is not known. This causes a minor problem since the constant γ appears in our estimators. A simple and effective way to deal with this problem is to generate a large i.i.d. sample X1:n from the uniform distribution over [0, 1]d and estimate γ by the empirical value of Lp(X1:n)/n1−p/d. 4 An Estimator of R´enyi Entropy We are now ready to present an estimator of R´enyi entropy based on the generalized nearest-neighbor graph. Suppose we are given an i.i.d. sample X1:n = (X1, X2, . . . , Xn) from a distribution µ over Rd with density f. We estimate entropy Hα(f) for α ∈(0, 1) by bHα(X1:n) = 1 1 −α log Lp(X1:n) γn1−p/d where p = d(1 −α), (5) and Lp(·) is the sum of p-th powers of Euclidean lengths of edges of the nearest-neighbor graph NNS(·) for some finite non-empty S ⊂N+ as defined by equation (3). The constant γ is the same as in Theorem 1. The following theorem is our main result about the estimator bHα. It states that bHα is strongly consistent and gives upper bounds on the rate of convergence. The proof of theorem is in P´al et al. (2010). Theorem 2 (Consistency and Rate for bHα). Let α ∈(0, 1). Let µ be an absolutely continuous distribution over Rd with bounded support and let f be its density. If X1:n = (X1, X2, . . . , Xn) is an i.i.d. sample from µ then lim n→∞ bHα(X1:n) = Hα(f) a.s. (6) Moreover, if f is Lipschitz then for any δ > 0 with probability at least 1 −δ, bHα(X1:n) −Hα(f) ≤    O  n− d−p d(2d−p) (log(1/δ))1/2−p/(2d) , if 0 < p < d −1 ; O  n− d−p d(d+1) (log(1/δ))1/2−p/(2d) , if d −1 ≤p < d . (7) 5 Copulas and Estimator of Mutual Information Estimating mutual information is slightly more complicated than estimating entropy. We start with a basic property of mutual information which we call rescaling. It states that if h1, h2, . . . , hd : R → R are arbitrary strictly increasing functions, then Iα(h1(X1), h2(X2), . . . , hd(Xd)) = Iα(X1, X2, . . . , Xd) . (8) 4 A particularly clever choice is hj = Fj for all 1 ≤j ≤d, where Fj is the cumulative distribution function (c.d.f.) of Xj. With this choice, the marginal distribution of hj(Xj) is the uniform distribution over [0, 1] assuming that Fj, the c.d.f. of Xj, is continuous. Looking at the definition of Hα and Iα we see that Iα(X1, X2, . . . , Xd) = Iα(F1(X1), F2(X2), . . . , Fd(Xd)) = −Hα(F1(X1), F2(X2), . . . , Fd(Xd)) . In other words, calculation of mutual information can be reduced to the calculation of entropy provided that marginal c.d.f.’s F1, F2, . . . , Fd are known. The problem is, of course, that these are not known and need to be estimated from the sample. We will use empirical c.d.f.’s ( bF1, bF2, . . . , bFd) as their estimates. Given an i.i.d. sample X1:n = (X1, X2, . . . , Xn) from distribution µ and with density f, the empirical c.d.f’s are defined as bFj(x) = 1 n|{i : 1 ≤i ≤n, x ≤Xj i }| for x ∈R, 1 ≤j ≤d . Introduce the compact notation F : Rd →[0, 1]d, bF : Rd →[0, 1]d, F(x1, x2, . . . , xd) = (F1(x1), F2(x2), . . . , Fd(xd)) for (x1, x2, . . . , xd) ∈Rd ; (9) bF(x1, x2, . . . , xd) = ( bF1(x1), bF2(x2), . . . , bFd(xd)) for (x1, x2, . . . , xd) ∈Rd . (10) Let us call the maps F, bF the copula transformation, and the empirical copula transformation, respectively. The joint distribution of F(X) = (F1(X1), F2(X2), . . . , Fd(Xd)) is called the copula of µ, and the sample (bZ1, bZ2, . . . , bZn) = (bF(X1), bF(X2), . . . , bF(Xn)) is called the empirical copula (Dedecker et al., 2007). Note that j-th coordinate of bZi equals bZj i = 1 n rank(Xj i , {Xj 1, Xj 2, . . . , Xj n}) , where rank(x, A) is the number of element of A less than or equal to x. Also, observe that the random variables bZ1, bZ2, . . . , bZn are not even independent! Nonetheless, the empirical copula (bZ1, bZ2, . . . , bZn) is a good approximation of an i.i.d. sample (Z1, Z2, . . . , Zn) = (F(X1), F(X2), . . . , F(Xn)) from the copula of µ. Hence, we estimate the R´enyi mutual information Iα by bIα(X1:n) = −bHα(bZ1, bZ2, . . . , bZn), (11) where bHα is defined by (5). The following theorem is our main result about the estimator bIα. It states that bIα is strongly consistent and gives upper bounds on the rate of convergence. The proof of this theorem can be found in P´al et al. (2010). Theorem 3 (Consistency and Rate for bIα). Let d ≥3 and α = 1 −p/d ∈(1/2, 1). Let µ be an absolutely continuous distribution over Rd with density f. If X1:n = (X1, X2, . . . , Xn) is an i.i.d. sample from µ then lim n→∞ bIα(X1:n) = Iα(f) a.s. Moreover, if the density of the copula of µ is Lipschitz, then for any δ > 0 with probability at least 1 −δ, bIα(X1:n) −Iα(f) ≤          O  max{n− d−p d(2d−p) , n−p/2+p/d}(log(1/δ))1/2 , if 0 < p ≤1 ; O  max{n− d−p d(2d−p) , n−1/2+p/d}(log(1/δ))1/2 , if 1 ≤p ≤d −1 ; O  max{n− d−p d(d+1) , n−1/2+p/d}(log(1/δ))1/2 , if d −1 ≤p < d . 6 Experiments In this section we show two numerical experiments to support our theoretical results about the convergence rates, and to demonstrate the applicability of the proposed R´enyi mutual information estimator, bIα. 5 6.1 The Rate of Convergence In our first experiment (Fig. 1), we demonstrate that the derived rate is indeed an upper bound on the convergence rate. Figure 1a-1c show the estimation error of bIα as a function of the sample size. Here, the underlying distribution was a 3D uniform, a 3D Gaussian, and a 20D Gaussian with randomly chosen nontrivial covariance matrices, respectively. In these experiments α was set to 0.7. For the estimation we used S = {3} (kth) and S = {1, 2, 3} (knn) sets. Our results also indicate that these estimators achieve better performances than the histogram based plug-in estimators (hist). The number and the sizes of the bins were determined with the rule of Scott (1979). The histogram based estimator is not shown in the 20D case, as in this large dimension it is not applicable in practice. The figures are based on averaging 25 independent runs, and they also show the theoretical upper bound (Theoretical) on the rate derived in Theorem 3. It can be seen that the theoretical rates are rather conservative. We think that this is because the theory allows for quite irregular densities, while the densities considered in this experiment are very nice. 10 2 10 3 10 −2 10 −1 10 0 10 1 kth knn hist Theoretical (a) 3D uniform 10 2 10 3 10 −2 10 −1 10 0 10 1 kth knn hist Theoretical (b) 3D Gaussian 10 2 10 3 10 4 10 0 10 1 kth knn Theoretical (c) 20D Gaussian Figure 1: Error of the estimated R´enyi informations in the number of samples. 6.2 Application to Independent Subspace Analysis An important application of dependence estimators is the Independent Subspace Analysis problem (Cardoso, 1998). This problem is a generalization of the Independent Component Analysis (ICA), where we assume the independent sources are multidimensional vector valued random variables. The formal description of the problem is as follows. We have S = (S1; . . . ; Sm) ∈Rdm, m independent d-dimensional sources, i.e. Si ∈Rd, and I(S1, . . . , Sm) = 0.4 In the ISA statistical model we assume that S is hidden, and only n i.i.d. samples from X = AS are available for observation, where A ∈Rq×dm is an unknown invertible matrix with full rank and q ≥dm. Based on n i.i.d. observation of X, our task is to estimate the hidden sources Si and the mixing matrix A. Let the estimation of S be denoted by Y = (Y1; . . . ; Ym) ∈Rdm, where Y = WX. The goal of ISA is to calculate argminWI(Y1, . . . , Ym), where W ∈Rdm×q is a matrix with full rank. Following the ideas of Cardoso (1998), this ISA problem can be solved by first preprocessing the observed quantities X by a traditional ICA algorithm which provides us WICA estimated separation matrix5, and then simply grouping the estimated ICA components into ISA subspaces by maximizing the sum of the MI in the estimated subspaces, that is we have to find a permutation matrix P ∈{0, 1}dm×dm which solves max P m X j=1 I(Y j 1 , Y j 2 , . . . , Y j d ) . (12) where Y = PWICAX. We used the proposed copula based information estimation, bIα with α = 0.99 to approximate the Shannon mutual information, and we chose S = {1, 2, 3}. Our experiment shows that this ISA algorithm using the proposed MI estimator can indeed provide good 4Here we need the generalization of MI to multidimensional quantities, but that is obvious by simply replacing the 1D marginals by d-dimensional ones. 5for simplicity we used the FastICA algorithm in our experiments (Hyv¨arinen et al., 2001) 6 estimation of the ISA subspaces. We used a standard ISA benchmark dataset from Szab´o et al. (2007); we generated 2,000 i.i.d. sample points on 3D geometric wireframe distributions from 6 different sources independently from each other. These sampled points can be seen in Fig. 2a, and they represent the sources, S. Then we mixed these sources by a randomly chosen invertible matrix A ∈R18×18. The six 3-dimensional projections of X = AS observed quantities are shown in Fig. 2b. Our task was to estimate the original sources S using the sample of the observed quantity X only. By estimating the MI in (12), we could recover the original subspaces as it can be seen in Fig. 2c. The successful subspace separation is shown in the form of Hinton diagrams as well, which is the product of the estimated ISA separation matrix W = PWICA and A. It is a block permutation matrix if and only if the subspace separation is perfect (Fig. 2d). (a) Original (b) Mixed (c) Estimated (d) Hinton Figure 2: ISA experiment for six 3-dimensional sources. 7 Further Related Works As it was pointed out earlier, in this paper we heavily built on the results known from the theory of Euclidean functionals (Steele, 1997; Redmond and Yukich, 1996; Koo and Lee, 2007). However, now we can be more precise about earlier work concerning nearest-neighbor based Euclidean functionals: The closest to our work is Section 8.3 of Yukich (1998), where the case of NNS graph based p-power weighted Euclidean functionals with S = {1, 2, . . . , k} and p = 1 was investigated. Nearest-neighbor graphs have first been proposed for Shannon entropy estimation by Kozachenko and Leonenko (1987). In particular, in the mentioned work only the case of NNS graphs with S = {1} was considered. More recently, Goria et al. (2005) generalized this approach to S = {k} and proved the resulting estimator’s weak consistency under some conditions on the density. The estimator in this paper has a form quite similar to that of ours: ˜H1 = log(n −1) −ψ(k) + log  2πd/2 dΓ(d/2)  + d n n X i=1 log ∥ei∥. Here ψ stands for the digamma function, and ei is the directed edge pointing from Xi to its kth nearest-neighbor. Comparing this with (5), unsurprisingly, we find that the main difference is the use of the logarithm function instead of | · |p and the different normalization. As mentioned before, Leonenko et al. (2008) proposed an estimator that uses the NNS graph with S = {k} for the purpose of estimating the R´enyi entropy. Their estimator takes the form ˜Hα = 1 1 −α log n −1 n V 1−α d C1−α k n X i=1 ∥ei∥d(1−α) (n −1)α ! , where Γ stands for the Gamma function, Ck = h Γ(k) Γ(k+1−α) i1/(1−α) and Vd = πd/2Γ(d/2 + 1) is the volume of the d-dimensional unit ball, and again ei is the directed edge in the NNS graph starting from node Xi and pointing to the k-th nearest node. Comparing this estimator with (5), it is apparent that it is (essentially) a special case of our NNS based estimator. From the results of Leonenko et al. (2008) it is obvious that the constant γ in (5) can be found in analytical form when S = {k}. However, we kindly warn the reader again that the proofs of these last three cited articles (Kozachenko and Leonenko, 1987; Goria et al., 2005; Leonenko et al., 2008) contain a few errors, just like the Wang et al. (2009b) paper for KL divergence estimation from two samples. Kraskov et al. (2004) also proposed a k-nearest-neighbors based estimator for the Shannon mutual information estimation, but the theoretical properties of their estimator are unknown. 7 8 Conclusions and Open Problems We have studied R´enyi entropy and mutual information estimators based on NNS graphs. The estimators were shown to be strongly consistent. In addition, we derived upper bounds on their convergence rate under some technical conditions. Several open problems remain unanswered: An important open problem is to understand how the choice of the set S ⊂N+ affects our estimators. Perhaps, there exists a way to choose S as a function of the sample size n (and d, p) which strikes the optimal balance between the bias and the variance of our estimators. Our method can be used for estimation of Shannon entropy and mutual information by simply using α close to 1. The open problem is to come up with a way of choosing α, approaching 1, as a function of the sample size n (and d, p) such that the resulting estimator is consistent and converges as rapidly as possible. An alternative is to use the logarithm function in place of the power function. However, the theory would need to be changed significantly to show that the resulting estimator remains strongly consistent. In the proof of consistency of our mutual information estimator bIα we used Kiefer-DvoretzkyWolfowitz theorem to handle the effect of the inaccuracy of the empirical copula transformation (see P´al et al. (2010) for details). Our particular use of the theorem seems to restrict α to the interval (1/2, 1) and the dimension to values larger than 2. Is there a better way to estimate the error caused by the empirical copula transformation and prove consistency of the estimator for a larger range of α’s and d = 1, 2? Finally, it is an important open problem to prove bounds on converge rates for densities that have higher order smoothness (i.e. β-H¨older smooth densities). A related open problem, in the context of of theory of Euclidean functionals, is stated in Koo and Lee (2007). Acknowledgements This work was supported in part by AICML, AITF (formerly iCore and AIF), NSERC, the PASCAL2 Network of Excellence under EC grant no. 216886 and by the Department of Energy under grant number DESC0002607. Cs. Szepesv´ari is on leave from SZTAKI, Hungary. References C. Adami. Information theory in molecular biology. Physics of Life Reviews, 1:3–22, 2004. M. Aghagolzadeh, H. Soltanian-Zadeh, B. Araabi, and A. Aghagolzadeh. A hierarchical clustering based on mutual information maximization. In in IEEE ICIP, pages 277–280, 2007. P. A. Alemany and D. H. Zanette. Fractal random walks from a variational formalism for Tsallis entropies. Phys. Rev. E, 49(2):R956–R958, Feb 1994. J. Cardoso. Multidimensional independent component analysis. Proc. ICASSP’98, Seattle, WA., 1998. B. Chai, D. B. Walther, D. M. Beck, and L. Fei-Fei. Exploring functional connectivity of the human brain using multivariate information analysis. In NIPS, 2009. J. A. Costa and A. O. Hero. Entropic graphs for manifold learning. In IEEE Asilomar Conf. on Signals, Systems, and Computers, 2003. J. Dedecker, P. Doukhan, G. Lang, J.R. Leon, S. Louhichi, and C Prieur. Weak Dependence: With Examples and Applications, volume 190 of Lecture notes in Statistics. Springer, 2007. M. N. Goria, N. N. Leonenko, V. V. Mergel, and P. L. Novi Inverardi. A new class of random vector entropy estimators and its applications in testing statistical hypotheses. Journal of Nonparametric Statistics, 17: 277–297, 2005. A. O. Hero and O. J. Michel. Asymptotic theory of greedy approximations to minimal k-point random graphs. IEEE Trans. on Information Theory, 45(6):1921–1938, 1999. A. O. Hero, B. Ma, O. Michel, and J. Gorman. Alpha-divergence for classification, indexing and retrieval, 2002a. Communications and Signal Processing Laboratory Technical Report CSPL-328. A. O. Hero, B. Ma, O. Michel, and J. Gorman. Applications of entropic spanning graphs. IEEE Signal Processing Magazine, 19(5):85–95, 2002b. 8 K. Hlav´ackova-Schindler, M. Paluˆsb, M. Vejmelkab, and J. Bhattacharya. Causality detection based on information-theoretic approaches in time series analysis. Physics Reports, 441:1–46, 2007. M. M. Van Hulle. Constrained subspace ICA based on mutual information optimization directly. Neural Computation, 20:964–973, 2008. A. Hyv¨arinen, J. Karhunen, and E. Oja. Independent Component Analysis. John Wiley, New York, 2001. Y. Koo and S. Lee. Rates of convergence of means of Euclidean functionals. Journal of Theoretical Probability, 20(4):821–841, 2007. L. F. Kozachenko and N. N. Leonenko. A statistical estimate for the entropy of a random vector. Problems of Information Transmission, 23:9–16, 1987. A. Kraskov, H. St¨ogbauer, and P. Grassberger. Estimating mutual information. Phys. Rev. E, 69:066138, 2004. J. Kybic. Incremental updating of nearest neighbor-based high-dimensional entropy estimation. In Proc. Acoustics, Speech and Signal Processing, 2006. E. Learned-Miller and J. W. Fisher. ICA using spacings estimates of entropy. Journal of Machine Learning Research, 4:1271–1295, 2003. N. Leonenko, L. Pronzato, and V. Savani. A class of R´enyi information estimators for multidimensional densities. Annals of Statistics, 36(5):2153–2182, 2008. J. Lewi, R. Butera, and L. Paninski. Real-time adaptive information-theoretic optimization of neurophysiology experiments. In Advances in Neural Information Processing Systems, volume 19, 2007. D. P´al, Cs. Szepesv´ari, and B. P´oczos. Estimation of R´enyi entropy and mutual information based on generalized nearest-neighbor graphs, 2010. http://arxiv.org/abs/1003.1954. H. Peng and C. Ding. Feature selection based on mutual information: Criteria of max-dependency, maxrelevance, and min-redundancy. IEEE Trans On Pattern Analysis and Machine Intelligence, 27, 2005. B. P´oczos and A. L˝orincz. Independent subspace analysis using geodesic spanning trees. In ICML, pages 673–680, 2005. B. P´oczos and A. L˝orincz. Identification of recurrent neural networks by Bayesian interrogation techniques. Journal of Machine Learning Research, 10:515–554, 2009. B. P´oczos, S. Kirshner, and Cs. Szepesv´ari. REGO: Rank-based estimation of R´enyi information using Euclidean graph optimization. In AISTATS 2010, 2010. C. Redmond and J. E. Yukich. Asymptotics for Euclidean functionals with power-weighted edges. Stochastic processes and their applications, 61(2):289–304, 1996. D. W. Scott. On optimal and data-based histograms. Biometrika, 66:605–610, 1979. C. Shan, S. Gong, and P. W. Mcowan. Conditional mutual information based boosting for facial expression recognition. In British Machine Vision Conference (BMVC), 2005. J. M. Steele. Probability Theory and Combinatorial Optimization. Society for Industrial and Applied Mathematics, 1997. Z. Szab´o, B. P´oczos, and A. L˝orincz. Undercomplete blind subspace deconvolution. Journal of Machine Learning Research, 8:1063–1095, 2007. A. B. Tsybakov and E. C. van der Meulen. Root-n consistent estimators of entropy for densities with unbounded support. Scandinavian Journal of Statistics, 23:75–83, 1996. O. Vasicek. A test for normality based on sample entropy. Journal of the Royal Statistical Society, Series B, 38:54–59, 1976. Q. Wang, S. R. Kulkarni, and S. Verd´u. Universal estimation of information measures for analog sources. Foundations and Trends in Communications and Information Theory, 5(3):265–352, 2009a. Q. Wang, S. R. Kulkarni, and S. Verd´u. Divergence estimation for multidimensional densities via k-nearestneighbor distances. IEEE Transactions on Information Theory, 55(5):2392–2405, 2009b. E. Wolsztynski, E. Thierry, and L. Pronzato. Minimum-entropy estimation in semi-parametric models. Signal Process., 85(5):937–949, 2005. J. E. Yukich. Probability Theory of Classical Euclidean Optimization Problems. Springer, 1998. 9
2010
111
3,868
Causal discovery in multiple models from different experiments Tom Claassen Radboud University Nijmegen The Netherlands tomc@cs.ru.nl Tom Heskes Radboud University Nijmegen The Netherlands tomh@cs.ru.nl Abstract A long-standing open research problem is how to use information from different experiments, including background knowledge, to infer causal relations. Recent developments have shown ways to use multiple data sets, provided they originate from identical experiments. We present the MCI-algorithm as the first method that can infer provably valid causal relations in the large sample limit from different experiments. It is fast, reliable and produces very clear and easily interpretable output. It is based on a result that shows that constraint-based causal discovery is decomposable into a candidate pair identification and subsequent elimination step that can be applied separately from different models. We test the algorithm on a variety of synthetic input model sets to assess its behavior and the quality of the output. The method shows promising signs that it can be adapted to suit causal discovery in real-world application areas as well, including large databases. 1 Introduction Discovering causal relations from observational data is an important, ubiquitous problem in science. In many application areas there is a multitude of data from different but related experiments. Often the set of measured variables is not the same between trials, or the circumstances under which they were conducted differed, making it difficult to compare and evaluate results, especially when they seem to contradict each other, e.g. when a certain dependency is observed in one experiment, but not in another. Results obtained from one data set are often used to either corroborate or challenge results from another. Yet how to reconcile information from multiple sources, including background knowledge, into a single, more informative model is still an open problem. Constraint-based methods like the FCI-algorithm [1] are provably correct in the large sample limit, as are Bayesian methods like the greedy search algorithm GES [2] (with additional post-processing steps to handle hidden confounders). Both are defined in terms of modeling a single data set and have no principled means to relate to results from other sources in the process. Recent developments, like the ION-algorithm by Tillman et al. [3], have shown that it is possible to integrate multiple, partially overlapping data sets. However, such algorithms are still essentially single model learners in the sense that they assume there is one, single encapsulating structure that accounts for all observed dependencies in the different models. In practice, observed dependencies often differ between data sets, precisely because the experimental circumstances were not identical in different experiments, even when the causal system at the heart of it was the same. The method we develop in this article shows how to distinguish between causal dependencies internal to the system under investigation and merely contextual dependencies. Mani et al. [4] recognized the ‘local’ aspect of causal discovery from Y-structures embedded in data: it suffices to establish a certain (in)dependency pattern between variables, without having to uncover the entire graph. In section 4 we take this one step further by showing that such causal 1 discovery can be decomposed into two separate steps: a conditional independency to identify a pair of possible causal relations (one of which is true), and then a conditional dependency that eliminates one option, leaving the other. The two steps rely only on local (marginal) aspects of the distribution. As a result the conclusion remains valid, even when, unlike causal inference from Y-structures, the two pieces of information are taken from different models. This forms the basis underpinning the MCI-algorithm in section 6. Section 2 of this article introduces some basic terminology. Section 3 models different experiments. Section 4 establishes the link between conditional independence and local causal relations, which is used in section 5 to combine multiple models into a single causal graph. Section 6 describes a practical implementation in the form of the MCI-algorithm. Sections 7 and 8 discuss experimental results and suggest possible extensions to other application areas. 2 Graphical model preliminaries First a few familiar notions from graphical model theory used throughout the article. A directed graph G is a pair ⟨V, E⟩, where V is a set of vertices or nodes and E is a set of edges between pairs of nodes, represented by arrows X →Y . A path π = ⟨V0, . . . , Vn⟩between V0 and Vn in G is a sequence of distinct vertices such that for 0 ≤i ≤n−1, Vi and Vi+1 are connected by an edge in G. A directed path is a path that is traversed entirely in the direction of the arrows. A directed acyclic graph (DAG) is a directed graph that does not contain a directed path from any node to itself. A vertex X is an ancestor of Y (and Y is a descendant of X) if there is a directed path from X to Y in G or if X = Y . A vertex Z is a collider on a path π = ⟨. . . , X, Z, Y, . . .⟩if it contains the subpath X →Z ←Y , otherwise it is a noncollider. A trek is a path that does not contain any collider. For disjoint (sets of) vertices X, Y and Z in a DAG G, X is d-connected to Y conditional on Z (possibly empty), iff there exists an unblocked path π = ⟨X, . . . , Y ⟩between X and Y given Z, i.e. such that every collider on π is an ancestor of some Z ∈Z and every noncollider on π is not in Z. If not, then all such paths are blocked, and X is said to be d-separated from Y ; see [5, 1] for details. Definition 1. Two nodes X and Y are minimally conditionally independent given a set of nodes Z, denoted [X ⊥⊥Y | Z], iff X is conditionally independent of Y given a minimal set of nodes Z. Here minimal, indicated by the square brackets, implies that the relation does not hold for any proper subset Z′ ⊊Z of the (possibly empty) set Z. A causal DAG GC is a graphical model in the form of a DAG where the arrows represent direct causal interactions between variables in a system [6]. There is a causal relation X ⇒Y , iff there is a directed path from X to Y in GC. Absence of such a path is denoted X ⇒ ⧹Y . The causal Markov condition links the structure of a causal graph to its probabilistic concomitant, [5]: two variables X and Y in a causal DAG GC are dependent given a set of nodes Z, iff they are connected by a path π in GC that is unblocked given Z; so there is a dependence X ⊥⊥ ⧹Y iff there is a trek between X and Y in the causal DAG. We assume that the systems we consider correspond to some underlying causal DAG over a great many observed and unobserved nodes. The distribution over the subset of observed variables can then be represented by a (maximal) ancestral graph (MAG) [7]. Different MAGs can represent the same distribution, but only the invariant features, common to all MAGs that can faithfully represent that distribution, carry identifiable causal information. The complete partial ancestral graph (CPAG) P that represents the equivalence class [G] of a MAG G is a graph with either a tail ‘−’, arrowhead ‘>’ or circle mark ‘◦’ at each end of an edge, such that P has the same adjacencies as G, and there is a tail or arrowhead on an edge in P iff it is invariant in [G], otherwise it has a circle mark [8]. The CPAG of a given MAG is unique and maximally informative for [G]. We use CPAGs as a concise and intuitive graphical representation of all conditional (in)dependence relations between nodes in an observed distribution; see [7, 8] for more information on how to read independencies directly from a MAG/CPAG using the m-separation criterion, which is essentially just the d-separation criterion, only applied to MAGs. Throughout this article we also adopt the causal faithfulness assumption, which implies that all and only the conditional independence relations entailed by the causal Markov condition applied to the true causal DAG will hold in the joint probability distribution over the variables in GC. For an in-depth discussion of the justification and connection between these assumptions, see [9]. 2 3 Modeling the system Random variation in a system corresponds to the impact of unknown external variables, see [5]. Some of these external factors may be actively controlled, e.g. in clinical trials, or passively observed as the natural embedding of a system in its environment. We refer to both observational and controlled studies as experiments. External factors that affect two or more variables in a system simultaneously, can lead to dependencies that are not part of the system. Different external factors may bring about observed dependencies that differ between models, seemingly contradicting each other. By modeling this external environment explicitly as a set of unobserved (hypothetical) context nodes that causally affect the system under scrutiny we can account for this effect. Definition 2. The external context GE of a causal DAG GC is a set of independent nodes U in combination with links from every U ∈U to one or more nodes in GC. The total causal structure of an experiment then becomes GT = {GE + GC}. Figure 1 depicts a causal system in three different experiments (double lined arrows indicate direct causal relations; dashed circles represent unobserved variables). The second and third experiment will result in an observed dependency between variables A and B, whereas the first one will not. The context only introduces arrows from nodes in GE to GC which can never result in a cycle, therefore the structure of an experiment GT is also a causal DAG. Note that differences in dependencies can only arise from different structures of the external context. Figure 1: A causal system GC in different experiments In this paradigm different experiments become variations in context of a constant causal system. The goal of causal discovery from multiple models can then be stated as: “Given experiments with unknown total causal structures GT = {GE + GC}, G′ T = {G′ E + GC}, etc., and known joint probability distributions P(V ⊂GT ), P ′(V′ ⊂G′ T ), etc., which variables are connected by a directed path in GC?”. We assume that the large sample limit distributions P(V) are known and can be used to obtain categorical statements about probabilistic (in)dependencies between sets of nodes. Finally, we will assume there is no selection bias, see [10], nor blocking interventions on GC, as accounting for the impact would unnecessarily complicate the exposition. 4 Causal relations in arbitrary context A remarkable result that, to the best of our knowledge, has not been noted before, is that a minimal conditional independence always implies the presence of a causal relation. (See appendix for an outline of all proofs in this article.) Theorem 1. Let X, Y , Z and W be four disjoint (sets of) nodes (possibly empty) in an experiment with causal structure GT = {GE + GC}, then the following rules apply, for arbitrary GE (1) a minimal conditional independence [X ⊥⊥Y | Z] implies causal links Z ⇒X and/or Z ⇒Y from every Z ∈Z to X and/or Y in GC, (2) a conditional dependence X ⊥⊥ ⧹Y | Z ∪W induced by a node W, i.e. with X ⊥⊥Y | Z, implies that there are no causal links W ⇒ ⧹X, W ⇒ ⧹Y or W ⇒ ⧹Z for any Z ∈Z in GC, (3) a conditional independence X ⊥⊥Y | Z implies the absence of (direct) causal paths X ⇒Y or X ⇐Y in GC between X and Y that are not mediated by nodes in Z. 3 The theorem establishes independence patterns that signify (absence of) a causal origin, independent of the (unobserved) external background. Rule (1) identifies a candidate pair of causal relations from a conditional independence. Rule (2) identifies the absence of causal paths from unshielded colliders in G, see also [1]. Rule (3) eliminates direct causal links between variables. The final step towards causal discovery from multiple models now takes a surprisingly simple form: Lemma 1. Let X, Y and Z ∈Z be disjoint (sets of) variables in an experiment with causal structure GT = {GE + GC}, then if there exists both: −a minimal conditional independence [X ⊥⊥Y | Z], −established absence of a causal path Z ⇒ ⧹X, then there is a causal link (directed path) Z ⇒Y in GC. The crucial observation is that these two pieces of information can be obtained from different models. In fact, the origin of the information Z ⇒ ⧹X is irrelevant: be it from (in)dependencies via rule (2), other properties of the distribution, e.g. non-Gaussianity [11] or nonlinear features [12], or existing background knowledge. The only prerequisite for bringing results from various sources together is that the causal system at the centre is invariant, i.e. that the causal structure GC remains the same across the different experiments GT , G′ T etc. This result also shows why the well-known Y-structure: 4 nodes with X →Z ←W and Z →Y , see [4], always enables identification of the causal link Z ⇒Y : it is simply lemma 1 applied to overlapping nodes in a single model, in the form of rule (1) for [X ⊥⊥Y | Z], together with dependency X ⊥⊥ ⧹W | Z created by Z to eliminate Z ⇒ ⧹X by rule (2). 5 Multiple models In this article we focus on combining multiple conditional independence models represented by CPAGs. We want to use these models to convey as much about the underlying causal structure GC as possible. We choose a causal CPAG as the target output model: similar in form and interpretation to a CPAG, where tails and arrowheads now represent all known (non)causal relations. This is not necessarily an equivalence class in accordance with the rules in [8], as it may contain more explicit information. Ingredients for extracting this information are the rules in theorem 1, in combination with the standard properties of causal relations: acyclic (if X ⇒Y then Y ⇒ ⧹X) and transitivity (if X ⇒Y and Y ⇒Z then X ⇒Z). As the causal system is assumed invariant, the established (absence of) causal relations in one model are valid in all models. A straightforward brute-force implementation is given by Algorithm 1. The input is a set of CPAG models Pi, representing the conditional (in)dependence information between a set of observed variables, e.g. as learned by the extended FCI-algorithm [1, 8], from a number of different experiments G(i) T on an invariant causal system GC. The output is the single causal CPAG G over the union of all nodes in the input models Pi. Input : set of CPAGs Pi, fully ◦−◦connected graph G Output : causal graph G 1: for all Pi do 2: G ←eliminate all edges not appearing between nodes in Pi ▷Rule (3) 3: G ←all definite (non)causal connections between nodes in Pi ▷invariant structure 4: end for 5: repeat 6: for all Pi do 7: for all {X, Y, Z, W} ∈Pi do 8: G ←(Z ⇒ ⧹{X, Y, W}), if X ⊥⊥Y | W and X ⊥⊥ ⧹Y | {W ∪Z} ▷Rule (2) 9: G ←(Z ⇒Y ), if [X ⊥⊥Y | {Z ∪W}] and (Z ⇒ ⧹X) ∈GC ▷Rule (1) 10: end for 11: end for 12: until no more new non/causal information found Algorithm 1: Brute force implementation of rules (1)-(3) 4 Figure 2: Three different experiments, one causal model As an example, consider the three CPAG models on the l.h.s. of figure 2. None of these identifies a causal relation, yet despite the different (in)dependence relations, it is easily verified that the algorithm terminates after two loops with the nearly complete causal CPAG on the r.h.s. as the final output. Figure 1 shows corresponding experiments that explain the observed dependencies above. To the best of our knowledge, Algorithm 1 is the first algorithm ever to perform such a derivation. Nevertheless, this brute-force approach exhibits a number of serious shortcomings. In the first place, the computational complexity of the repeated loop over all subsets in line 7 makes it not scalable: for small models like the ones in figure 2 the derivation is almost immediate, but for larger models it quickly becomes unfeasible. Secondly, for sparsely overlapping models, i.e. when the observed variables differ substantially between the models, the algorithm can miss certain relations: when a causal relation is found to be absent between two non-adjacent nodes, then this information cannot be recorded in G, and subsequent causal information identifiable by rule (1) may be lost. These problems are addressed in the next section, resulting in the MCI-algorithm. 6 The MCI-algorithm To tackle the computational complexity we first introduce the following notion: a path ⟨X, . . . , Y ⟩ in a CPAG is called a possibly directed path (or p.d. path) from X to Y , if it can be converted into a directed path by changing circle marks into appropriate tails and arrowheads [6]. We can now state: Theorem 2. Let X and Y be two variables in an experiment with causal structure GT = {GE + GC}, and let P[G] be the corresponding CPAG over a subset of observed nodes from GC. Then the absence of a causal link X ⇒ ⧹Y is detectable from the conditional (in)dependence structure in this experiment iff there exists no p.d. path from X to Y in P[G]. In other words: X cannot be a cause (ancestor) of Y if all paths from X to Y in the graph P[G] go against an invariant arrowhead (signifying non-ancestorship) and vice versa. We refer to this as rule (4). Calculating which variables are connected by a p.d. path from a given CPAG is straightforward: turn the graph into a {0, 1} adjacency matrix by setting all arrowheads to zero and all tails and circle marks to one, and compute the resulting reachability matrix. As this will uncover all detectable ‘non-causal’ relations in a CPAG in one go, it needs to be done only once for each model, and can be aggregated into a matrix MC to make all tests for rule (2) in line 8 superfluous. If we also record all other established (non)causal relations in the matrix MC as the algorithm progresses, then indirect causal relations are no longer lost when they cannot be transferred to the output graph G. The next lemma propagates indirect (non)causal information from MC to edge marks in the graph: Lemma 2. Let X, Y and Z be disjoint sets of variables in an experiment with causal structure GT = {GE + GC}, then for every [X ⊥⊥Y | Z]: −every (indirect) causal relation X ⇒Y implies causal links Z ⇒Y , −every (indirect) absence of causal relation X ⇒ ⧹Y implies no causal links X ⇒ ⧹Z. The first makes it possible to orient indirect causal chains, the second shortens indirect non-causal links. We refer to these as rules (5) and (6), respectively. As a final improvement it is worth noting that for rules (1), (5) and (6) it is only relevant to know that a node Z occurs in some Z in a minimal conditional independence relation [X ⊥⊥Y | Z] separating X and Y , but not what the other nodes in Z are or in what model(s) it occurred. We can introduce a structure SCI to record all nodes Z that occur in some minimal conditional independency in one of the models Pi for each combination of nodes (X, Y ), before any of the rules (1), (5) or (6) is processed. As a result, in the repeated causal inference loop no conditional independence / m-separation tests need to be performed at all. 5 Input : set of CPAGs Pi, fully ◦−◦connected graph G Output : causal graph G, causal relations matrix MC 1: MC ←0 ▷no causal relations 2: for all Pi do 3: G ←eliminate all edges not appearing between nodes in Pi ▷Rule (3) 4: MC ←(X ⇒ ⧹Y ), if no p.d. path ⟨X, . . . , Y ⟩∈Pi ▷Rule (4) 5: MC ←(X ⇒Y ), if causal path ⟨X ⇒. . . ⇒Y ⟩∈Pi ▷transitivity 6: for all (X, Y, Z) ∈Pi do 7: SCI ←triple (X, Y, Z), if Z ∈Z for which [X ⊥⊥Y | Z] ▷combined SCI-matrix 8: end for 9: end for 10: repeat 11: for all (X, Y, Z) ∈G do 12: MC ←(Z ⇒Y ), for unused (X, Y, Z) ∈SCI with (Z ⇒ ⧹X) ∈MC ▷Rule (1) 13: MC ←(X ⇒ ⧹Z), for unused (X ⇒ ⧹Y ) ∈MC with (X, Y, Z) ∈SCI ▷Rule (5) 14: MC ←(Z ⇒Y ), for unused (X ⇒Y ) ∈MC with (X, Y, Z) ∈SCI ▷Rule (6) 15: end for 16: until no more new causal information found 17: G ←non/causal info in MC ▷tails/arrowheads Algorithm 2: MCI algorithm With these results we can now give an improved version of the brute-force approach: the Multiple model Causal Inference (MCI) algorithm, above. The input is still a set of CPAG models from different experiments, but the output is now twofold: the graph G, containing the causal structure uncovered for the underlying system GC, as well as the matrix MC with an explicit representation of all (non)causal relations between observed variables, including remaining indirect information that cannot be read from the graph G. The first stage (lines 2-9) is a pre-processing step to extract all necessary information for the second stage from each of the models separately. Building the SCI matrix is the most expensive step as it involves testing for conditional independencies (m-separation) for increasing sets of variables. This can be efficiently implemented by noting that nodes connected by an edge will not be separated and that many other combinations will not have to be tested as they contain a subset for which a (minimal) conditional independency has already been established. If a (non)causal relation is found between adjacent variables in G, or one that can be used to infer other intermediate relations (lines 13-14), then it can be marked as ‘processed’ to avoid unnecessary checks. Similar for the entries recorded in the minimal conditional independence structure SCI. The MCI algorithm is provably sound in the sense that if all input CPAG models Pi are valid, then all (absence of) causal relations identified by the algorithm in the output graph G and (non)causal relations matrix MC are also valid, provided that the causal system GC is an invariant causal DAG and the causal faithfulness assumption is satisfied. 7 Experimental results We tested the MCI-algorithm on a variety of synthetic data sets to verify its validity and assess its behaviour and performance in uncovering causal information from multiple models. For the generation of random causal DAGs we used a variant of [13] to control the distribution of edges over nodes in the network. The random experiments in each run were generated from this causal DAG by including a random context and hidden nodes. For each network the corresponding CPAG was computed, and together used as the set of input models for the MCI-algorithm. The generated output G and MC was verified against the true causal DAG and expressed as a percentage of the true number of (non-)causal relations. To assess the performance we introduced two reference methods to act as a benchmark for the MCIalgorithm (in the absence of other algorithms that can validly handle different contexts). The first is a common sense method, indicated as ‘sum-FCI’, that utilizes the transitive closure of all causal relations in the input CPAGs, that could have been identified by FCI in the large sample limit. As the 6 ! " # $ %& & &'% &'! &'( &'" &') &'# &'* &'$ +,-.,/01203,453067-82,.-189 %!,8-952:,%!",/-865;6,8-952 , , <=> 21?!@=> 8/!=ABC ! " # $ %& & &'% &'! &'( &'" &') &'# &'* &'$ 84',-.,97..54586,?-9532 +,-.,/01203,453067-82,.-189 , , <=> 21?!@=> 8/!=ABC & ! " # $ %& & &'% &'! &'( &'" &') &'# &'* &'$ +,-.,/01203,453067-82,.-189 %!,8-952:,),?-9532 & ! " # $ %& & &'% &'! &'( &'" &') &'# &'* &'$ 84',-.,8-952,78,5;654803,/-865;6 /01203,453067-82,.-189,!,+ DE0467033F,-G5430EE78H,8-952I ! " # $ %& &'# &'#) &'* &'*) &'$ &'$) &'J &'J) % +,KLK!/01203,453067-82,.-189 %!,8-952:,%!",/-865;6,8-952 , , <=> 21?!@=> 8/!=ABC ! " # $ %& &'# &'#) &'* &'*) &'$ &'$) &'J &'J) % 84',-.,97..54586,?-9532 +,KLK!/01203,453067-82,.-189 , , <=> 21?!@=> 8/!=ABC D0I DMI D/I Figure 3: Proportion of causal relations discovered by the MCI-algorithm in different settings; (a) causal relations vs. nr. of models, (b) causal relations vs. nr. of context nodes, (c) non-causal relations ⇒ ⧹vs. nr. of models; (top) identical observed nodes in input models, (bottom) only partially overlapping observed nodes second benchmark we take all causal information contained in the CPAG over the union of observed variables, independent of the context, hence ‘nc-CPAG’ for ‘no context’. Note that this is not really a method as it uses information directly derived from the true causal graph. In figure 3, each graph depicts the percentage of causal (a&b) or non-causal (c) relations uncovered by each of the three methods: MCI, sum-FCI and nc-CPAG, as a function of the number of input models (a&c) or the number of nodes in the context (b), averaged over 200 runs, for both identical (top) or only partly overlapping (bottom) observed nodes in the input models. Performance is calculated as the proportion of uncovered relations as compared to the actual number of non/causal relations in the true causal graph over the union of observed nodes in each model set. In these runs the underlying causal graphs contained 12 nodes with edge degree ≤5. Tests for other, much sparser/denser graphs up to 20 nodes, showed comparable results. Some typical behaviour is easily recognized: MCI always outperforms sum-FCI, and more input models always improve performance. Also non-causal information (c) is much easier to find than definite causal relations (a&b). For single models / no context the performance of all three methods is very similar, although not necessarily identical. The perceived initial drop in performance in fig.3(c,bottom) is only because in going to two models the number of non-causal relations in the union rises more quickly than the number of new relations that is actually found (due to lack of overlap). A striking result that is clearly brought out is that adding random context actually improves detection rate of causal relations. The rationale behind this effect is that externally induced links can introduce conditional dependencies, allowing the deduction of non-causal links that are not otherwise detectable; these in turn may lead to other causal relations that can be inferred, and so on. If the context is expanded further, at some point the detection rate will start to deteriorate as the causal structure will be swamped by the externally induced links (b). We want to stress that for the many tens of thousands of (non)causal relations identified by the MCI algorithm in all the runs, not a single one was found to be invalid on comparing with the true causal graph. For ≳8 nodes the algorithm spends the majority of its time building the SCI matrix in lines 6-8. The actual number of minimal conditional independencies found, however, is quite low, typically in the order of a few dozen for graphs of up to 12 nodes. 7 8 Conclusion We have shown the first principled algorithm that can use results from different experiments to uncover new (non)causal information. It is provably sound in the large sample limit, provided the input models are learned by a valid algorithm like the FCI algorithm with CPAG extension [8]. In its current implementation the MCI-algorithm is a fast and practical method that can easily be applied to sets of models of up to 20 nodes. Compared to related algorithms like ION, it produces very concise and easily interpretable output, and does not suffer from the inability to handle any differences in observed dependencies between data sets [3]. For larger models it can be converted into an anytime algorithm by running over minimal conditional independencies from subsets of increasing size: at each level all uncovered causal information is valid, and, for reasonably sparse models, most will already be found at low levels. For very large models an exciting possibility is to target only specific causal relations: finding the right combination of (in)dependencies is sufficient to decide if it is causal, even when there is no hope of deriving a global CPAG model. From the construction of the MCI-algorithm it is sound, but not necessarily complete. Preliminary results show that theorem 1 already covers all invariant arrowheads in the single model case [8], and suggest that an additional rule is sufficient to cover all tails as well. We aim to extend this result to the multiple model domain. Integrating our approach with recent developments in causal discovery that are not based on independence constraints [11, 12] can provide for even more detectable causal information. When applied to real data sets the large sample limit no longer applies and inconsistent causal relations may result. It should be possible to exclude the contribution of such links on the final output. Alternatively, output might be generalized to quantities like ‘the probability of a causal relation’ based on the strength of appropriate conditional (in)dependencies in the available data. Acknowledgement This research was supported by VICI grant 639.023.604 from the Netherlands Organization for Scientific Research (NWO). Appendix - proof outlines Theorem 1 / Lemma 1 (for details see also [14]) (1) Without selection bias, nodes X and Y are dependent iff they are connected by treks in GT . A node Z ∈Z that blocks such a trek has a directed path in GC to X and/or Y , but can unblock other paths. These paths contain a trek between Z and X/Y , and must blocked by a node Z′ ∈Z\Z, which therefore also has a causal link to X or Y (possibly via Z). Z′ in turn can unblock other paths, etc. Minimality guarantees that it holds for all nodes in Z. Eliminating Z ⇒ ⧹X then leaves Z ⇒Y as the only option (lemma 1). (2) To create the dependency, W must be a (descendant of a) collider between two unblocked paths π1 = ⟨X, . . . , W⟩and π2 = ⟨Y, . . . , W⟩given Z. Any directed path from W to a Z ∈Z implies that conditioning on W is not needed when already conditioning on Z. In combination with π1 or π2, a directed path from W to X or Y in GC would make W a noncollider on an unblocked path between X and Y given Z, contrary to X ⊥⊥Y | Z. (3) A directed path between X and Y that is not blocked by Z would result in X ⊥⊥ ⧹Y | Z, see [1]. Theorem 2 ‘⇐’ follows from the fact that a directed path π = ⟨X, . . . , Y ⟩in the underlying causal DAG GC implies existence of a directed path in the true MAG over the observed nodes and therefore at least the existence of a p.d. path in the CPAG P[G]. ‘⇒’ follows from the completeness of the CPAG in combination with theorem 2 in [8] about orientability of CPAGs into MAGs. This, together with Meek’s algorithm [15] for orienting chordal graphs into DAGs with no unshielded colliders, shows that it is always possible to turn a p.d. path into a directed path in a MAG that is a member of the equivalence class P[G]. Therefore, a p.d. path from X to Y in P[G] implies there is at least some underlying causal DAG in which it is a causal path, and so cannot correspond to a valid, detectable absence of a causal link. □ Lemma 2 From rule (1) in Theorem 1, [X ⊥⊥Y | Z] implies causal links Z ⇒X and/or Z ⇒Y . If X ⇒Y then by transitivity Z ⇒X also implies Z ⇒Y . If X ⇒ ⧹Y then for any Z ∈Z, X ⇒Z implies Z ⇒Y and so (transitivity) also X ⇒Y , in contradiction of the given; therefore X ⇒ ⧹Z. □ 8 References [1] P. Spirtes, C. Glymour, and R. Scheines, Causation, Prediction, and Search. Cambridge, Massachusetts: The MIT Press, 2nd ed., 2000. [2] D. Chickering, “Optimal structure identification with greedy search,” Journal of Machine Learning Research, vol. 3, no. 3, pp. 507–554, 2002. [3] R. Tillman, D. Danks, and C. Glymour, “Integrating locally learned causal structures with overlapping variables,” in Advances in Neural Information Processing Systems, 21, 2008. [4] S. Mani, G. Cooper, and P. Spirtes, “A theoretical study of Y structures for causal discovery,” in Proceedings of the 22nd Conference in Uncertainty in Artificial Intelligence, pp. 314–323, 2006. [5] J. Pearl, Causality: models, reasoning and inference. Cambridge University Press, 2000. [6] J. Zhang, “Causal reasoning with ancestral graphs,” Journal of Machine Learning Research, vol. 9, pp. 1437 – 1474, 2008. [7] T. Richardson and P. Spirtes, “Ancestral graph Markov models,” Ann. Stat., vol. 30, no. 4, pp. 962–1030, 2002. [8] J. Zhang, “On the completeness of orientation rules for causal discovery in the presence of latent confounders and selection bias,” Artificial Intelligence, vol. 172, no. 16-17, pp. 1873 – 1896, 2008. [9] J. Zhang and P. Spirtes, “Detection of unfaithfulness and robust causal inference,” Minds and Machines, vol. 2, no. 18, pp. 239–271, 2008. [10] P. Spirtes, C. Meek, and T. Richardson, “An algorithm for causal inference in the presence of latent variables and selection bias,” in Computation, Causation, and Discovery, pp. 211–252, 1999. [11] S. Shimizu, P. Hoyer, A. Hyv¨arinen, and A. Kerminen, “A linear non-Gaussian acyclic model for causal discovery,” Journal of Machine Learning Research, vol. 7, pp. 2003–2030, 2006. [12] P. Hoyer, D. Janzing, J. Mooij, J. Peters, and B. Sch¨olkopf, “Nonlinear causal discovery with additive noise models,” in Advances in Neural Information Processing Systems 21 (NIPS*2008), pp. 689–696, 2009. [13] J. Ide and F. Cozman, “Random generation of Bayesian networks,” in Advances in Artificial Intelligence, pp. 366–376, Springer Berlin, 2002. [14] T. Claassen and T. Heskes, “Learning causal network structure from multiple (in)dependence models,” in Proceedings of the Fifth European Workshop on Probabilistic Graphical Models, 2010. [15] C. Meek, “Causal inference and causal explanation with background knowledge,” in UAI, pp. 403–410, Morgan Kaufmann, 1995. 9
2010
112
3,869
Learning Bounds for Importance Weighting Corinna Cortes Google Research New York, NY 10011 corinna@google.com Yishay Mansour Tel-Aviv University Tel-Aviv 69978, Israel mansour@tau.ac.il Mehryar Mohri Courant Institute and Google New York, NY 10012 mohri@cims.nyu.edu Abstract This paper presents an analysis of importance weighting for learning from finite samples and gives a series of theoretical and algorithmic results. We point out simple cases where importance weighting can fail, which suggests the need for an analysis of the properties of this technique. We then give both upper and lower bounds for generalization with bounded importance weights and, more significantly, give learning guarantees for the more common case of unbounded importance weights under the weak assumption that the second moment is bounded, a condition related to the R´enyi divergence of the training and test distributions. These results are based on a series of novel and general bounds we derive for unbounded loss functions, which are of independent interest. We use these bounds to guide the definition of an alternative reweighting algorithm and report the results of experiments demonstrating its benefits. Finally, we analyze the properties of normalized importance weights which are also commonly used. 1 Introduction In real-world applications of machine learning, often the sampling of the training and test instances may differ, which results in a mismatch between the two distributions. For example, in web search applications, there may be data regarding users who clicked on some advertisement link but little or no information about other users. Similarly, in credit default analyses, there is typically some information available about the credit defaults of customers who were granted credit, but no such information is at hand about rejected costumers. In other problems such as adaptation, the training data available is drawn from a source domain different from the target domain. These issues of biased sampling or adaptation have been long recognized and studied in the statistics literature. There is also a large body of literature dealing with different techniques for sample bias correction [11, 29, 16, 8, 25, 6] or domain adaptation [3, 7, 19, 10, 17] in the recent machine learning and natural language processing literature. A common technique used in several of these publications for correcting the bias or discrepancy is based on the so-called importance weighting technique. This consists of weighting the cost of errors on training instances to emphasize the error on some or de-emphasize it on others, with the objective of correcting the mismatch between the distributions of training and test points, as in sample bias correction, adaptation, and other related contexts such as active learning [24, 14, 8, 19, 5]. Different definitions have been adopted for these weights. A common definition of the weight for point x is w(x) = P(x)/Q(x) where P is the target or test distribution and Q is the distribution according to which training points are drawn. A favorable property of this definition, which is not hard to verify, is that it leads to unbiased estimates of the generalization error [8]. This paper presents an analysis of importance weighting for learning from finite samples. Our study was originally motivated by the observation that, while this corrective technique seems natural, in some cases in practice it does not succeed. An example in dimension two is illustrated by Figure 1. The target distribution P is the even mixture of two Gaussians centered at (0, 0) and (0, 2) both with 1 −2 −1 0 1 2 3 4 −2 −1 0 1 2 3 4 σQ σQ σ P σ P − − − − − − − − − − − − − − − − − − − − − − − − − − − + + − − − − − − − − − + + − − − − − − − − + + − − − − − − − − − + + − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − − x x x 20 100 500 5000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Ratio = 0.3 σ σ Q P 20 100 500 5000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Ratio = 0.75 σ σ Q P Figure 1: Example of importance weighting. Left figure: P (in blue) and Q (in red) are even mixtures of Gaussians. The labels are positive within the unit sphere centered at the origin (in grey), negative elsewhere. The hypothesis class is that of hyperplanes tangent to the unit sphere. Right figures: plots of test error vs training sample size using importance weighting for two different values of the ratio σQ/σP . The results indicate mean values of the error over 40 runs ± one standard deviation. standard deviation σP , while the source distribution Q is the even mixture of two Gaussians centered at (0, 0) and (2, 0) but with standard deviation σQ. The hypothesis class is that of hyperplanes tangent to the unit sphere. The best classifier is selected by empirical risk minimization. As shown in Figure 1, for σP /σQ =.3, the error of the hypothesis learned using importance weighting is close to 50% even for a training sample of 5,000 points and the standard deviation of the error is quite high. In contrast, for σP /σQ =.75, convergence occurs relatively rapidly and learning is successful. In Section 4, we discuss other examples where importance weighting does not succeed. The problem just described is not limited to isolated examples. Similar observations have been made in the past in both the statistics and learning literature, more recently in the context of the analysis of boosting by [9] who suggest that importance weighting must be used with care and highlight the need for convergence bounds and learning guarantees for this technique. We study the theoretical properties of importance weighting. We show using standard generalization bounds that importance weighting can succeed when the weights are bounded. However, this condition often does not hold in practice. We also show that, remarkably, convergence guarantees can be given even for unbounded weights under the weak assumption that the second moment of the weights is bounded, a condition that relates to the R´enyi divergence of P and Q. We further extend these bounds to guarantees for other possible reweightings. These results suggest minimizing a biasvariance tradeoff that we discuss and that leads to several algorithmic ideas. We explore in detail an algorithm based on these ideas and report the results of experiments demonstrating its benefits. Throughout this paper, we consider the case where the weight function w is known. When it is not, it is typically estimated from finite samples. The effect of this estimation error is specifically analyzed by [8]. This setting is closely related to the problem of importance sampling in statistics which is that of estimating the expectation of a random variable according to P while using a sample drawn according to Q, with w given [18]. Here, we are concerned with the effect of the weights on learning from finite samples. A different setting is when further full access to Q is assumed, von Neumann’s rejection sampling technique [28] can then be used. We note however that it requires w to be bounded by some constant M, which is often not guaranteed and is the simplest case of our bounds. Even then, the method is wasteful as it requires on average M samples to obtain one point. The remainder of this paper is structured as follows. Section 2 introduces the definition of the R´enyi divergences and gives some basic properties of the importance weights. In Section 3, we give generalization bounds for importance weighting in the bounded case. We also present a general lower bound indicating the key role played by the R´enyi divergence of P and Q in this context. Section 4 deals with the more frequent case of unbounded w. Standard generalization bounds do not apply here since the loss function is unbounded. We give novel generalization bounds for unbounded loss functions under the assumption that the second moment is bounded (see Appendix) and use them to derive learning guarantees for importance weighting in this more general setting. In Section 5, we discuss an algorithm inspired by these guarantees for which we report preliminary experimental results. We also discuss why the commonly used remedy of truncating or capping importance weights may not always provide the desired effect of improved performance. Finally, in Section 6, we study 2 the properties of an alternative reweighting also commonly used which is based on normalized importance weights, and discuss its relationship with the (unnormalized) weights w. 2 Preliminaries Let X denote the input space, Y the label set, and let L: Y×Y →[0, 1] be a loss function. We denote by P the target distribution and by Q the source distribution according to which training points are drawn. We also denote by H the hypothesis set used by the learning algorithm and by f : X →Y the target labeling function. 2.1 R´enyi divergences Our analysis makes use of the notion of R´enyi divergence, an information theoretical measure of the difference between two distributions directly relevant to the study of importance weighting. For α≥0, the R´enyi divergence Dα(P∥Q) between distributions P and Q is defined by [23] Dα(P∥Q) = 1 α −1 log2 ! x P(x) "P(x) Q(x) #α−1 . (1) The R´enyi divergence is a non-negative quantity and for any α > 0, Dα(P∥Q) = 0 iff P = Q. For α = 1, it coincides with the relative entropy. We denote by dα(P∥Q) the exponential in base 2 of the R´enyi divergence Dα(P∥Q): dα(P∥Q) = 2Dα(P ∥Q) = $ ! x P α(x) Qα−1(x) % 1 α−1 . (2) 2.2 Importance weights The importance weight for distributions P and Q is defined by w(x) = P(x)/Q(x). In the following, the expectations are taken with respect to Q. Lemma 1. The following identities hold for the expectation, second moment, and variance of w: E[w] = 1 E[w2] = d2(P∥Q) σ2(w) = d2(P∥Q) −1. (3) Proof. The first equality is immediate. The second moment of w can be expressed as follows in terms of the R´enyi divergence: E Q[w2] = ! x∈X w2(x) Q(x) = ! x∈X "P(x) Q(x) #2 Q(x) = ! x∈X P(x) "P(x) Q(x) # = d2(P∥Q). Thus, the variance of w is given by σ2(w) = EQ[w2] −EQ[w]2 = d2(P∥Q) −1. For any hypothesis h∈H, we denote by R(h) its loss and by &Rw(h) its weighted empirical loss: R(h) = E x∼P[L(h(x), f(x))] &Rw(h) = 1 m m ! i=1 w(xi) L(h(xi), f(xi)). We shall use the abbreviated notation Lh(x) for L(h(x), f(x)), in the absence of any ambiguity about the target function f. Note that the unnormalized importance weighting of the loss is unbiased: E Q[w(x)Lh(x)] = ! x P(x) Q(x) Lh(x) Q(x) = ! x P(x)Lh(x) = R(h). The following lemma gives a bound on the second moment. Lemma 2. For all α > 0 and x ∈X, the second moment of the importance weighted loss can be bounded as follows: E x∼Q[w2(x) L2 h(x)] ≤dα+1(P∥Q) R(h)1−1 α . (4) For α = 1, this becomes R(h)2 ≤Ex∼Q[w2(x) L2 h(x)] ≤d2(P∥Q). 3 Proof. The second moment can be bounded as follows: E x∼Q[w2(x) L2 h(x)] = ! x Q(x) $P(x) Q(x) %2 L2 h(x) = ! x P(x) 1 α $P(x) Q(x) % P(x) α−1 α L2 h(x) ≤ $ ! x P(x) $P(x) Q(x) %α% 1 α $ ! x P(x) L 2α α−1 h (x) % α−1 α (H¨older’s inequality) = dα+1(P∥Q) $ ! x P(x) Lh(x)L α+1 α−1 h (x) % α−1 α ≤dα+1(P∥Q) R(h)1−1 α B1+ 1 α = dα+1(P∥Q) R(h)1−1 α . 3 Learning Guarantees - Bounded Case Note that supx w(x)=supx P (x) Q(x) =d∞(P∥Q). We first examine the case d∞(P∥Q)<+∞and use the notation M =d∞(P∥Q). The following proposition follows then directly Hoeffding’s inequality. Proposition 1 (single hypothesis). Fix h ∈H. For any δ > 0, with probability at least 1 −δ, |R(h) −&Rw(h)| ≤M ' log(2/δ) 2m . The upper bound M, though finite, can be quite large. The following theorem provides a more favorable bound as a function of the ratio M/m when any of the moments of w, dα+1(P∥Q), is finite, which is the case when d∞(P∥Q) < ∞since the R´enyi divergence is a non-decreasing function of α [23, 2], in particular: ∀α > 0, dα+1(P∥Q) ≤d∞(P∥Q). (5) Theorem 1 (single hypothesis). Fix h ∈H. Then, for any α≥1, for any δ >0, with probability at least 1−δ, the following bound holds for the importance weighting method: R(h) ≤&Rw(h) + 2M log 1 δ 3m + ( 2 ) dα+1(P∥Q) R(h)1−1 α −R(h)2* log 1 δ m . (6) For α = 1 after further simplification, this gives R(h) ≤&Rw(h) + 2M log 1 δ 3m + + 2d2(P ∥Q) log 1 δ m . Proof. Let Z denote the random variable w(x) Lh(x)−R(h). Then, |Z| ≤M. By lemma 2, the variance of the random variable Z can be bounded in terms of the R´enyi divergence dα+1(P∥Q): σ2(Z) = E Q[w2(x) Lh(x)2] −R(h)2 ≤dα+1(P∥Q) R(h)1−1 α −R(h)2. Thus, by Bernstein’s inequality [4], it follows that: Pr[R(h) −&Rw(h) > ϵ] ≤exp " −mϵ2/2 σ2(Z) + ϵM/3 # . Setting δ to match this upper bound shows that with probability at least 1−δ, the following bound holds for the importance weighting method: R(h) ≤&Rw(h) + M log 1 δ 3m + ( M 2 log2 1 δ 9m2 + 2σ2(Z) log 1 δ m . Using the sub-additivity of √· leads to the simpler expression R(h) ≤&Rw(h) + 2M log 1 δ 3m + ( 2σ2(Z) log 1 δ m . These results can be straightforwardly extended to general hypothesis sets. In particular, for a finite hypothesis set and for α = 1, the application of the union bound yields the following result. 4 Theorem 2 (finite hypothesis set). Let H be a finite hypothesis set. Then, for any δ > 0, with probability at least 1−δ, the following bound holds for the importance weighting method: R(h) ≤&Rw(h) + 2M(log |H| + log 1 δ ) 3m + ( 2d2(P∥Q)(log |H| + log 1 δ ) m . (7) For infinite hypothesis sets, a similar result can be shown straightforwardly using covering numbers instead of |H| or a related measure based on samples of size m [20]. In the following proposition, we give a lower bound that further emphasizes the role of the R´enyi divergence of the second order in the convergence of importance weighting in the bounded case. Proposition 2 (Lower bound). Assume that M < ∞and σ2(w)/M 2 ≥1/m. Assume that H contains a hypothesis h0 such that Lh0(x) = 1 for all x. Then, there exists an absolute constant c, c=2/412, such that Pr $ sup h∈H ,,R(h) −&Rw(h) ,, ≥ ' d2(P∥Q) −1 4m % ≥c > 0. (8) Proof. Let σH =suph∈H σ(wLh). If for all x∈X, Lh0(x)= 1, then σ2(wLh0)=d2(P∥Q) −1 = σ2(w)=σ2 H. The result then follows a general theorem, Theorem 9 proven in the Appendix. 4 Learning Guarantees - Unbounded Case The condition d∞(P∥Q)<∞assumed in the previous section does not always hold, even in some natural cases, as illustrated by the following examples. 4.1 Examples Assume that P and Q both follow a Gaussian distribution with the standard deviations σP and σQ and with means µ and µ′: P(x) = 1 √ 2πσP exp $ −(x −µ)2 2σ2 P % Q(x) = 1 √ 2πσQ exp $ −(x −µ′)2 2σ2 Q % . In that case, P (x) Q(x) = σQ σP exp − σ2 Q(x−µ)2−σ2 P (x−µ′)2 2σ2 P σ2 Q . , thus, even for σP = σQ and µ ̸= µ′ the importance weights are unbounded, d∞(P∥Q) = supx P (x) Q(x) = +∞, and the bound of Theorem 1 is not informative. The R´enyi divergence of the second order is given by: d2(P∥Q) = σQ σP / +∞ −∞ exp $ − σ2 Q(x −µ)2 −σ2 P (x −µ′)2 2σ2 P σ2 Q % P(x)dx = σQ σ2 P √ 2π / +∞ −∞ exp $ − 2σ2 Q(x −µ)2 −σ2 P (x −µ′)2 2σ2 P σ2 Q % dx. That is, for σQ > √ 2 2 σP the variance of the importance weights is bounded. By the additivity property of the R´enyi divergence, a similar situation holds for the product and sums of such Gaussian distributions. Hence, in the rightmost example of Figure 1, the importance weights are unbounded, but their second moment is bounded. In the next section we provide learning guarantees even for this setting in agreement with the results observed. For σQ =0.3σP , the same favorable guarantees do not hold, and, as illustrated in Figure 1, learning is significantly more difficult. This example of Gaussians can further illustrate what can go wrong in importance weighting. Assume that µ = µ′ = 0, σQ = 1 and σP = 10. One could have expected this to be an easy case for importance weighting since sampling from Q provides useful information about P. The problem is, however, that a sample from Q will contain a very small number of points far from the mean (of either negative or positive label) and that these points will be assigned very large weights. For a sample of size m and σQ = 1, the expected value of an extreme point is √2 log m −o(1) and its 5 weight will be in the order of m−1/σ2 P +1/σ2 Q = m0.99. Therefore, a few extreme points will dominate all other weights and necessarily have a huge influence on the selection of a hypothesis by the learning algorithm. Another related example is when σQ = σP = 1 and µ′ = 0. Let µ ≫0 depend on the sample size m. If µ is large enough compared to log(m), then, with high probability, all the weights will be negligible. This is especially problematic, since the estimate of the probability of any event would be negligible (in fact both an event and its complement). If we normalize the weights, the issue is overcome, but then, with high probability, the maximum weight dominates the sum of all other weights, reverting the situation back to that of the previous example. 4.2 Importance weighting learning bounds - unbounded case As in these examples, in practice, the importance weights are typically not bounded. However, we shall show that, remarkably, under the weak assumption that the second moment of the weights w, d2(P∥Q), is bounded, generalization bounds can be given for this case as well. The following result relies on a general learning bound for unbounded loss functions proven in the Appendix (Corollary 1). We denote by Pdim(U) the pseudo-dimension of a real-valued function class U [21]. Theorem 3. Let H be a hypothesis set such that Pdim({Lh(x): h ∈H}) = p < ∞. Assume that d2(P∥Q) < +∞and w(x) ̸= 0 for all x. Then, for any δ > 0, with probability at least 1 −δ, the following holds: R(h) ≤&Rw(h) + 25/40 d2(P∥Q) 3 8 ( p log 2me p + log 4 δ m . Proof. Since d2(P∥Q) < +∞, the second moment of w(x)Lh(x) is finite and upper bounded by d2(P∥Q) (Lemma 2). Thus, by Corollary 1, we can write Pr $ sup h∈H R(h) −&Rw(h) 0 d2(P∥Q) > ϵ % ≤4 exp " p log 2em p −mϵ8/3 45/3 # , where p is the pseudo-dimension of the function class H′′ = {w(x)Lh(x): h ∈H}. We now show that p = Pdim({Lh(x): h ∈H}). Let H′ denote {Lh(x): h ∈H}. Let A = {x1, . . . , xk} be a set shattered by H′′. Then, there exist real numbers r1, . . . , rk such that for any subset B ⊆A there exists h ∈H such that ∀xi ∈B, w(xi)Lh(xi) ≥ri ∀xi ∈A −B, w(xi)Lh(xi) < ri. (9) Since by assumption w(xi)>0 for all i ∈[1, k], this implies that ∀xi ∈B, Lh(xi) ≥ri/w(xi) ∀xi ∈A −B, Lh(xi) < ri/w(xi). (10) Thus, H′ shatters A with the witnesses si = ri/w(xi), i ∈[1, k]. Using the same observations, it is straightforward to see that conversely, any set shattered by H′ is shattered by H′′. The convergence rate of the bound is slightly weaker (O(m−3/8)) than in the bounded case (O(m−1/2)). A faster convergence can be obtained however using the more precise bound of Theorem 8 at the expense of readability. The R´enyi divergence d2(P∥Q) seems to play a critical role in the bound and thus in the convergence of importance weighting in the unbounded case. 5 Alternative reweighting algorithms The previous analysis can be generalized to the case of an arbitrary positive function u: X →R, u>0. Let &Ru(h)= 1 m 1m i=1 u(xi)Lh(xi) and let &Q denote the empirical distribution. Theorem 4. Let H be a hypothesis set such that Pdim({Lh(x): h ∈H}) = p < ∞. Assume that 0 < EQ[u2(x)]<+∞and u(x) ̸= 0 for all x. Then, for any δ >0, with probability at least 1 −δ, the following holds: |R(h) −&Ru(h)| ≤ ,,, E Q ) [w(x) −u(x)]Lh(x) *,,,+ 25/4 max 20 EQ[u2(x)L2 h(x)], √ E b Q[u2(x)L2 h(x)] 3 3 8 ( p log 2me p + log 4 δ m . 6 20 50 200 500 2000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Unweighted, Ratio = 0.75 σ σ P Q 20 50 200 500 2000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Importance, Ratio = 0.75 σ σ P Q 20 50 200 500 2000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Quantile, Ratio = 0.75 σ σ P Q 20 50 200 500 2000 0.0 0.2 0.4 0.6 0.8 1.0 Training set size Error Capped 1%, Ratio = 0.75 σ σ P Q Figure 2: Comparison of the convergence of 4 different algorithms for the learning task of Figure 1: learning with equal weights for all examples (Unweighted), Importance weighting, using Quantiles to parameterize the function u, and Capping the largest weights. Proof. Since R(h) = E[w(x)Lh(x)], we can write R(h) −&Ru(h) = E Q ) [w(x) −u(x)]Lh(x) * + E[u(x)Lh(x)] −&Ru(h), and thus |R(h) −&Ru(h)| ≤ ,, E Q ) [w(x) −u(x)]Lh(x) *,, + | E[u(x)Lh(x)] −&Ru(h)|. By Corollary 2 applied to the function u Lh, | E[u(x)Lh(x)] −&Ru(h)| can be bounded by 25/4 max( 0 EQ[u2(x)L2 h(x)], √ E b Q[u2(x)L2 h(x)]) 3 8 + p log 2me p +log 4 δ m with probability 1 −δ, with p = Pdim({Lh(x): h ∈H}) by a proof similar to that of Theorem 3. The theorem suggests that other functions u than w can be used to reweight the cost of an error on each training point by minimizing the upper bound, which is a trade-off between the bias term | EQ[(w(x)−u(x))Lh(x)]| and the second moment max 40 EQ[u2(x)L2 h(x)], √ E b Q[u2(x)L2 h(x)] 5 , where the coefficients are explicitly given. Function u can be selected from different families. Using an upper bound on these quantities that is independent of h and a multiplicative bound of the form max 20 E Q[u2], 0 E b Q [u2] 3 ≤ 0 E Q[u2] 4 1 + O(1/√m) 5 , leads to the following optimization problem: min u∈U E Q ) |w(x) −u(x)| * + γ 0 E Q[u2], (11) where γ > 0 is a parameter controlling the trade-off between bias and variance minimization and where U is a family of possible weight functions out of which u is selected. Here, we consider a family of functions U parameterized by the quantiles q of the weight function w. A function uq ∈U is then defined as follows: within each quantile, the value taken by uq is the average of w over that quantile. For small values of γ, the bias term dominates, and very fine-grained quantiles minimize the bound of equation (11). For large values of γ the variance term dominates and the bound is minimized by using just one quantile, corresponding to an even weighting of the training examples. Hence by varying γ from small to large values, the algorithm interpolates between standard importance weighting with just one example per quantile, and unweighted learning where all examples are given the same weight. Figure 2 also shows the results of experiments for the learning task of Figure 1 using the algorithm defined by (11) with this family of functions. The optimal q is determined by 10-fold cross-validation. We see that a more rapid convergence can be obtained by using these weights compared to the standard importance weights w. Another natural family of functions is that of thresholded versions of the importance weights {uθ : θ>0, ∀x∈X, uθ(x)=min(w(x), θ)}. In fact, in practice, users often cap importance weights by choosing an arbitrary value θ. The advantage of this family is that, by definition, the weights are 7 bounded. However, in some cases, larger weights could be critical to achieve a better performance. Figure 2 illustrates the performance of this approach. Compared to importance weighting, no change in performance is observed until the largest 1% of the weights are capped, in which case we only observe a performance degradation. We expect the thresholding to be less beneficial when the large weights reflect the true w and are not an artifact of estimation uncertainties. 6 Relationship between normalized and unnormalized weights An alternative approach based on the weight function w = P(x)/Q(x) consists of normalizing the weights. Thus, while in the unnormalized case the unweighted empirical error is replaced by 1 m m ! i=1 w(xi) Lh(xi) = m ! i=1 w(xi) m Lh(xi), in the normalized case it is replaced by m ! i=1 w(xi) W Lh(xi), with W = 1m i=1 w(xi). We refer to &w(x) = w(x)/W as the normalized importance weight. An advantage of the normalized weights is that they are by definition bounded by one. However, the price to pay for this benefit is the fact that the weights are no more unbiased. In fact, several issues similar to those we pointed out in the Section 4 affect the normalized weights as well. Here, we maintain the assumption that the second moment of the importance weights is bounded and analyze the relationship between normalized and unnormalized weights. We show that, under this assumption, normalized and unnormalized weights are in fact very close, with high probability. Observe that for any i ∈[1, m], &w(xi) −w(xi) m = w(xi) $ 1 W −1 m % = w(xi) W $ 1 −W m % . Thus, since w(xi) W ≤1, we can write ,,, &w(xi) −w(xi) m ,,, ≤ ,,1 −W m ,, . Since E[w(x)]=1, we also have ES[W]= 1 m 1m k=1 E[w(xk)]=1. Thus, by Corollary 2, for any δ>0, with probability at least 1−δ, the following inequality holds ,,,,1 −W m ,,,, ≤25/4 max 6+ d2(P∥Q), + d2(P∥&Q) 7 3 8 ( log 2me + log 4 δ m , which implies the same upper bound on ,,, &w(xi) −w(xi) m ,,,, simultaneously for all i ∈[1, m]. 7 Conclusion We presented a series of theoretical results for importance weighting both in the bounded weights case and in the more general unbounded case under the assumption that the second moment of the weights is bounded. We also initiated a preliminary exploration of alternative weights and showed its benefits. A more systematic study of new algorithms based on these learning guarantees could lead to even more beneficial and practically useful results. Several of the learning guarantees we gave depend on the R´enyi divergence of the distributions P and Q. Accurately estimating that quantity is thus critical and should motivate further studies of the convergence of its estimates from finite samples. Finally, our novel unbounded loss learning bounds are of independent interest and could be useful in a variety of other contexts. References [1] M. Anthony and J. Shawe-Taylor. A result of Vapnik with applications. Discrete Applied Mathematics, 47:207 – 217, 1993. 8 [2] C. Arndt. Information Measures: Information and its Description in Science and Engineering. Signals and Communication Technology. Springer Verlag, 2004. [3] S. Ben-David, J. Blitzer, K. Crammer, and F. Pereira. Analysis of representations for domain adaptation. NIPS, 2007. [4] S. N. Bernstein. Sur l’extension du th´eor`eme limite du calcul des probabilit´es aux sommes de quantit´es d´ependantes. Mathematische Annalen, 97:1–59, 1927. [5] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance weighted active learning. In ICML, pages 49–56, New York, NY, USA, 2009. [6] S. Bickel, M. Br¨uckner, and T. Scheffer. Discriminative learning for differing training and test distributions. In ICML, pages 81–88, 2007. [7] J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. Wortman. Learning bounds for domain adaptation. NIPS 2007, 2008. [8] C. Cortes, M. Mohri, M. Riley, and A. Rostamizadeh. Sample selection bias correction theory. In ALT, 2008. [9] S. Dasgupta and P. M. Long. Boosting with diverse base classifiers. In COLT, 2003. [10] H. Daum´e III and D. Marcu. Domain adaptation for statistical classifiers. Journal of Artificial Intelligence Research, 26:101–126, 2006. [11] M. Dud´ık, R. E. Schapire, and S. J. Phillips. Correcting sample selection bias in maximum entropy density estimation. In NIPS, 2006. [12] R. M. Dudley. A course on empirical processes. Lecture Notes in Math., 1097:2 – 142, 1984. [13] R. M. Dudley. Universal Donsker classes and metric entropy. Annals of Probability, 14(4):1306 – 1326, 1987. [14] C. Elkan. The foundations of cost-sensitive learning. In IJCAI, pages 973–978, 2001. [15] D. Haussler. Decision theoretic generalizations of the PAC model for neural net and other learning applications. Inf. Comput., 100(1):78–150, 1992. [16] J. Huang, A. J. Smola, A. Gretton, K. M. Borgwardt, and B. Sch¨olkopf. Correcting sample selection bias by unlabeled data. In NIPS, volume 19, pages 601–608, 2006. [17] J. Jiang and C. Zhai. Instance Weighting for Domain Adaptation in NLP. In ACL, 2007. [18] J. S. Liu. Monte Carlo strategies in scientific computing. Springer, 2001. [19] Y. Mansour, M. Mohri, and A. Rostamizadeh. Domain adaptation: Learning bounds and algorithms. In COLT, 2009. [20] A. Maurer and M. Pontil. Empirical bernstein bounds and sample-variance penalization. In COLT, Montr´eal, Canada, June 2009. Omnipress. [21] D. Pollard. Convergence of Stochastic Processess. Springer, New York, 1984. [22] D. Pollard. Asymptotics via empirical processes. Statistical Science, 4(4):341 – 366, 1989. [23] A. R´enyi. On measures of information and entropy. In Proceedings of the 4th Berkeley Symposium on Mathematics, Statistics and Probability, page 547561, 1960. [24] H. Shimodaira. Improving predictive inference under covariate shift by weighting the loglikelihood function. Journal of Statistical Planning and Inference, 90(2):227–244, 2000. [25] M. Sugiyama, S. Nakajima, H. Kashima, P. von B¨unau, and M. Kawanabe. Direct importance estimation with model selection and its application to covariate shift adaptation. In NIPS, 2008. [26] V. N. Vapnik. Statistical Learning Theory. John Wiley & Sons, 1998. [27] V. N. Vapnik. Estimation of Dependences Based on Empirical Data, 2nd ed. Springer, 2006. [28] J. von Neumann. Various techniques used in connection with random digits. Monte Carlo methods. Nat. Bureau Standards, 12:36–38, 1951. [29] B. Zadrozny, J. Langford, and N. Abe. Cost-sensitive learning by cost-proportionate example weighting. In ICDM, 2003. 9
2010
113
3,870
A Reduction from Apprenticeship Learning to Classification Umar Syed∗ Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 usyed@cis.upenn.edu Robert E. Schapire Department of Computer Science Princeton University Princeton, NJ 08540 schapire@cs.princeton.edu Abstract We provide new theoretical results for apprenticeship learning, a variant of reinforcement learning in which the true reward function is unknown, and the goal is to perform well relative to an observed expert. We study a common approach to learning from expert demonstrations: using a classification algorithm to learn to imitate the expert’s behavior. Although this straightforward learning strategy is widely-used in practice, it has been subject to very little formal analysis. We prove that, if the learned classifier has error rate ǫ, the difference between the value of the apprentice’s policy and the expert’s policy is O(√ǫ). Further, we prove that this difference is only O(ǫ) when the expert’s policy is close to optimal. This latter result has an important practical consequence: Not only does imitating a near-optimal expert result in a better policy, but far fewer demonstrations are required to successfully imitate such an expert. This suggests an opportunity for substantial savings whenever the expert is known to be good, but demonstrations are expensive or difficult to obtain. 1 Introduction Apprenticeship learning is a variant of reinforcement learning, first introduced by Abbeel & Ng [1] (see also [2, 3, 4, 5, 6]), designed to address the difficulty of correctly specifying the reward function in many reinforcement learning problems. The basic idea underlying apprenticeship learning is that a learning agent, called the apprentice, is able to observe another agent, called the expert, behaving in a Markov Decision Process (MDP). The goal of the apprentice is to learn a policy that is at least as good as the expert’s policy, relative to an unknown reward function. This is a weaker requirement than the usual goal in reinforcement learning, which is to find a policy that maximizes reward. The development of the apprenticeship learning framework was prompted by the observation that, although reward functions are often difficult to specify, demonstrations of good behavior by an expert are usually available. Therefore, by observing such a expert, one can infer information about the true reward function without needing to specify it. Existing apprenticeship learning algorithms have a number of limitations. For one, they typically assume that the true reward function can be expressed as a linear combination of a set of known features. However, there may be cases where the apprentice is unwilling or unable to assume that the rewards have this structure. Additionally, most formulations of apprenticeship learning are actually harder than reinforcement learning; apprenticeship learning algorithms typically invoke reinforcement learning algorithms as subroutines, and their performance guarantees depend strongly on the quality of these subroutines. Consequently, these apprenticeship learning algorithms suffer from the same challenges of large state spaces, exploration vs. exploitation trade-offs, etc., as reinforcement ∗Work done while the author was a student at Princeton University. 1 learning algorithms. This fact is somewhat contrary to the intuition that demonstrations from an expert — especially a good expert — should make the problem easier, not harder. Another approach to using expert demonstrations that has received attention primarily in the empirical literature is to passively imitate the expert using a classification algorithm (see [7, Section 4] for a comprehensive survey). Classification is the most well-studied machine learning problem, and it is sensible to leverage our knowledge about this “easier” problem in order to solve a more “difficult” one. However, there has been little formal analysis of this straightforward learning strategy (the main recent example is Ross & Bagnell [8], discussed below). In this paper, we consider a setting in which an apprentice uses a classification algorithm to passively imitate an observed expert in an MDP, and we bound the difference between the value of the apprentice’s policy and the value of the expert’s policy in terms of the accuracy of the learned classifier. Put differently, we show that apprenticeship learning can be reduced to classification. The idea of reducing one learning problem to another was first proposed by Zadrozny & Langford [9]. Our main contributions in this paper are a pair of theoretical results. First, we show that the difference between the value of the apprentice’s policy and the expert’s policy is O(√ǫ),1 where ǫ ∈(0, 1] is the error of the learned classifier. Secondly, and perhaps more interestingly, we extend our first result to prove that the difference in policy values is only O(ǫ) when the expert’s policy is close to optimal. Of course, if one could perfectly imitate the expert, then naturally a near-optimal expert policy is preferred. But our result implies something further: that near-optimal experts are actually easier to imitate, in the sense that fewer demonstration are required to achieve the same performance guarantee. This has important practical consequences. If one is certain a priori that the expert is demonstrating good behavior, then our result implies that many fewer demonstrations need to be collected than if this were not the case. This can yield substantial savings when expert demonstrations are expensive or difficult to obtain. 2 Related Work Several authors have reduced reinforcement learning to simpler problems. Bagnell et al [10] described an algorithm for constructing a good nonstationary policy from a sequence of good “onestep” policies. These policies are only concerned with maximizing reward collected in a single time step, and are learned with the help of observations from an expert. Langford & Zadrozny [11] reduced reinforcement learning to a sequence of classification problems (see also Blatt & Hero [12]), but these problems have an unusual structure, and the authors are only able to provide a small amount of guidance as to how data for these problems can be collected. Kakade & Langford [13] reduced reinforcement learning to regression, but required additional assumptions about how easily a learning algorithm can access the entire state space. Importantly, all this work makes the standard reinforcement learning assumptions that the true rewards are known, and that a learning algorithm is able to interact directly with the environment. In this paper we are interested in settings where the reward function is not known, and where the learning algorithm is limited to passively observing an expert. Concurrently to this work, Ross & Bagnell [8] have described an approach to reducing imitation learning to classification, and some of their analysis resembles ours. However, their framework requires somewhat more than passive observation of the expert, and is focused on improving the sensitivity of the reduction to the horizon length, not the classification error. They also assume that the expert follows a deterministic policy, and assumption we do not make. 3 Preliminaries We consider a finite-horizon MDP, with horizon H. We will allow the state space S to be infinite, but assume that the action space A is finite. Let α be the initial state distribution, and θ the transition function, where θ(s, a, ·) specifies the next-state distribution from state s ∈S under action a ∈A. The only assumption we make about the unknown reward function R is that 0 ≤R(s) ≤Rmax for all states s ∈S, where Rmax is a finite upper bound on the reward of any state. 1The big-O notation is concealing a polynomial dependence on other problem parameters. We give exact bounds in the body of the paper. 2 We introduce some notation and definitions regarding policies. A policy π is stationary if it is a mapping from states to distributions over actions. In this case, π(s, a) denotes the probability of taking action a in state s. Let Π be the set of all stationary policies. A policy π is nonstationary if it belongs to the set ΠH = Π × · · · (H times) · · · × Π . In this case, πt(s, a) denotes the probability of taking action a in state s at time t. Also, if π is nonstationary, then πt refers to the stationary policy that is equal to the tth component of π. A (stationary or nonstationary) policy π is deterministic if each one of its action distributions is concentrated on a single action. If a deterministic policy π is stationary, then π(s) is the action taken in state s, and if π is nonstationary, the πt(s) is the action taken in state s at time t. We define the value function V π t (s) for a nonstationary policy π at time t as follows in the usual manner: V π t (s) ≜E " H X t′=t R(st′) st = s, at′ ∼πt′(st′, ·), st′+1 ∼θ(st′, at′, ·) # . So V π t (s) is the expected cumulative reward for following policy π when starting at state s and time step t. Note that there are several value functions per nonstationary policy, one for each time step t. The value of a policy is defined to be V (π) ≜E[V π 1 (s) | s ∼α(·)], and an optimal policy π∗is one that satisfies π∗≜arg maxπ V (π). We write πE to denote the (possibly nonstationary) expert policy, and V E t (s) as an abbreviation for V πE t (s). Our goal is to find a nonstationary apprentice policy πA such that V (πA) ≥V (πE). Note that the values of these policies are with respect to the unknown reward function. Let Dπ t be the distribution on state-action pairs at time t under policy π. In other words, a sample (s, a) is drawn from Dπ t by first drawing s1 ∼α(·), then following policy π for time steps 1 through t, which generates a trajectory (s1, a1, . . . , st, at), and then letting (s, a) = (st, at). We write DE t as an abbreviation for DπE t . In a minor abuse of notation, we write s ∼Dπ t to mean: draw state-action pair (s, a) ∼Dπ t , and discard a. 4 Details and Justification of the Reduction Our goal is to reduce apprenticeship learning to classification, so let us describe exactly how this reduction is defined, and also justify the utility of such a reduction. In a classification problem, a learning algorithm is given a training set ⟨(x1, y1), . . . , (xm, ym)⟩, where each labeled example (xi, yi) ∈X ×Y is drawn independently from a distribution D on X × Y. Here X is the example space and Y is the finite set of labels. The learning algorithm is also given the definition of a hypothesis class H, which is a set of functions mapping X to Y. The objective of the learning algorithm is to find a hypothesis h ∈H such that the error Pr(x,y)∼D(h(x) ̸= y) is small. For our purposes, the hypothesis class H is said to be PAC-learnable if there exists a learning algorithm A such that, whenever A is given a training set of size m = poly( 1 δ , 1 ǫ ), the algorithm runs for poly( 1 δ , 1 ǫ ) steps and outputs a hypothesis ˆh ∈H such that, with probability at least 1 −δ, we have Pr(x,y)∼D  ˆh(x) ̸= y  ≤ǫ∗ H,D + ǫ. Here ǫ∗ H,D = infh∈H Pr(x,y)∼D(h(x) ̸= y) is the error of the best hypothesis in H. The expression poly( 1 δ , 1 ǫ ) will typically also depend on other quantities, such as the number of labels |Y| and the VC-dimension of H [14], but this dependence is not germane to our discussion. The existence of PAC-learnable hypothesis classes is the reason that reducing apprenticeship learning to classification is a sensible endeavor. Suppose that the apprentice observes m independent trajectories from the expert’s policy πE, where the ith trajectory is a sequence si 1, ai 1, . . . , si H, ai H  . The key is to note that each (si t, ai t) can be viewed as an independent sample from the distribution DE t . Now consider a PAC-learnable hypothesis class H, where H contains a set of functions mapping the state space S to the finite action space A. If m = poly( 1 Hδ, 1 ǫ ), then for each time step t, the apprentice can use a PAC learning algorithm for H to learn a hypothesis ˆht ∈H such that, with probability at least 1 − 1 Hδ, we have Pr(s,a)∼DE t  ˆht(s) ̸= a  ≤ǫ∗ H,DE t + ǫ. And by the union 3 bound, this inequality holds for all t with probability at least 1−δ. If each ǫ∗ H,DE t +ǫ is small, then a natural choice for the apprentice’s policy πA is to set πA t = ˆht for all t. This policy uses the learned classifiers to imitate the behavior of the expert. In light of the preceding discussion, throughout the remainder of this paper we make the following assumption about the apprentice’s policy. Assumption 1. The apprentice policy πA is a deterministic policy that satisfies Pr(s,a)∼DE t (πA t (s) ̸= a) ≤ǫ for some ǫ > 0 and all time steps t. As we have shown, an apprentice policy satisfying Assumption 1 with small ǫ can be found with high probability, provided that expert’s policy is well-approximated by a PAC-learnable hypothesis class and that the apprentice is given enough trajectories from the expert. A reasonable intuition is that the value of the policy πA in Assumption 1 is nearly as high as the value of the policy πE; the remainder of this paper is devoted to confirming this intuition. 5 Guarantee for Any Expert If the error rate ǫ in Assumption 1 is small, then the apprentice’s policy πA closely imitates the expert’s policy πE, and we might hope that this implies that V (πA) is not much less than V (πE). This is indeed the case, as the next theorem shows. Theorem 1. If Assumption 1 holds, then V (πA) ≥V (πE) −2√ǫH2Rmax. In a typical classification problem, it is assumed that the training and test examples are drawn from the same distribution. The main challenge in proving Theorem 1 is that this assumption does not hold for the classification problems to which we have reduced the apprenticeship learning problem. This is because, although each state-action pair (si t, ai t) appearing in an expert trajectory is distributed according to DE t , a state-action pair (st, at) visited by the apprentice’s policy may not follow this distribution, since the behavior of the apprentice prior to time step t may not exactly match the expert’s behavior. So our strategy for proving Theorem 1 will be to show that these differences do not cause the value of the apprentice policy to degrade too much relative to the value of the expert’s policy. Before proceeding, we will show that Assumption 1 implies a condition that is, for our purposes, more convenient. Lemma 1. Let ˆπ be a deterministic nonstationary policy. If Pr(s,a)∼DE t (ˆπt(s) ̸= a) ≤ǫ, then for all ǫ1 ∈(0, 1] we have Prs∼DE t πE t (s, ˆπt(s)) ≥1 −ǫ1  ≥1 −ǫ ǫ1 Proof. Fix any ǫ1 ∈(0, 1], and suppose for contradiction that Prs∼DE t πE t (s, ˆπt(s)) ≥1 −ǫ1  < 1 −ǫ ǫ1 . Say that a state s is good if πE t (s, ˆπt(s)) ≥1 −ǫ1, and that s is bad otherwise. Then Pr(s,a)∼DE t (ˆπt(s) = a) = Prs∼DE t (s is good) · Pr(s,a)∼DE t (ˆπt(s) = a | s is good) + Prs∼DE t (s is bad) · Pr(s,a)∼DE t (ˆπt(s) = a | s is bad) ≤Prs∼DE t (s is good) · 1 + (1 −Prs∼DE t (s is good)) · (1 −ǫ1) = 1 −ǫ1(1 −Prs∼DE t (s is good)) < 1 −ǫ where the first inequality holds because Pr(s,a)∼DE t (ˆπt(s) = a | s is bad) ≤1 −ǫ1, and the second inequality holds because Prs∼DE t (s is good) < 1−ǫ ǫ1 . This chain of inequalities clearly contradicts the assumption of the lemma. The next two lemmas are the main tools used to prove Theorem 1. In the proofs of these lemmas, we write sa to denote a trajectory, where sa = (¯s1, ¯a1, . . . , ¯sH, ¯aH) ∈(S × A)H. Also, let dPπ denote the probability measure induced on trajectories by following policy π, and let R(sa) = PH t=1 R(¯st) 4 denote the sum of the rewards of the states in trajectory sa. Importantly, using these definitions we have V (π) = Z sa R(sa)dPπ. The next lemma proves that if a deterministic policy “almost” agrees with the expert’s policy πE in every state and time step, then its value is not much worse the value of πE. Lemma 2. Let ˆπ be a deterministic nonstationary policy. If for all states s and time steps t we have πE t (s, ˆπt(s)) ≥1 −ǫ then V (ˆπ) ≥V (πE) −ǫH2Rmax. Proof. Say a trajectory sa is good if it is “consistent” with ˆπ — that is, ˆπ(¯st) = ¯at for all time steps t — and that sa is bad otherwise. We have V (πE) = Z sa R(sa)dPπE = Z sa good R(sa)dPπE + Z sa bad R(sa)dPπE ≤ Z sa good R(sa)dPπE + ǫH2Rmax ≤ Z sa good R(sa)dPˆπ + ǫH2Rmax = V (ˆπ) + ǫH2Rmax where the first inequality holds because, by the union bound, PπE assigns at most an ǫH fraction of its measure to bad trajectories, and the maximum reward of a trajectory is HRmax. The second inequality holds because good trajectories are assigned at least as much measure by Pˆπ as by PπE, because ˆπ is deterministic. The next lemma proves a slightly different statement than Lemma 2: If a policy exactly agrees with the expert’s policy πE in “almost” every state and time step, then its value is not much worse the value of πE. Lemma 3. Let ˆπ be a nonstationary policy. If for all time steps t we have Prs∼DE t ˆπt(s, ·) = πE t (s, ·)  ≥1 −ǫ then V (ˆπ) ≥V (πE) −ǫH2Rmax. Proof. Say a trajectory sa is good if πE t (¯st, ·) = ˆπt(¯st, ·) for all time steps t, and that sa is bad otherwise. We have V (ˆπ) = Z sa R(sa)dPˆπ = Z sa good R(sa)dPˆπ + Z sa bad R(sa)dPˆπ = Z sa good R(sa)dPπE + Z sa bad R(sa)dPˆπ = Z sa R(sa)dPπE − Z sa bad R(sa)dPπE + Z sa bad R(sa)dPˆπ ≥V (πE) −ǫH2Rmax + Z sa bad R(sa)dPˆπ ≥V (πE) −ǫH2Rmax. The first inequality holds because, by the union bound, PπE assigns at most an ǫH fraction of its measure to bad trajectories, and the maximum reward of a trajectory is HRmax. The second inequality holds by our assumption that all rewards are nonnegative. We are now ready to combine the previous lemmas and prove Theorem 1. 5 Proof of Theorem 1. Since the apprentice’s policy πA satisfies Assumption 1, by Lemma 1 we can choose any ǫ1 ∈(0, 1] and have Prs∼DE t πE t (s, πA t (s)) ≥1 −ǫ1  ≥1 −ǫ ǫ1 . Now construct a “dummy” policy ˆπ as follows: For all time steps t, let ˆπt(s, ·) = πE t (s, ·) for any state s where πE t (s, πA t (s)) ≥1 −ǫ1. On all other states, let ˆπt(s, πA t (s)) = 1. By Lemma 2 V (πA) ≥V (ˆπ) −ǫ1H2Rmax and by Lemma 3 V (ˆπ) ≥V (πE) −ǫ ǫ1 H2Rmax. Combining these inequalities yields V (πA) ≥V (πE) −  ǫ1 + ǫ ǫ1  H2Rmax. Since ǫ1 was chosen arbitrarily, we set ǫ1 = √ǫ, which maximizes this lower bound. 6 Guarantee for Good Expert Theorem 1 makes no assumptions about the value of the expert’s policy. However, in many cases it may be reasonable to assume that the expert is following a near-optimal policy (indeed, if she is not, then we should question the decision to select her as an expert). The next theorem shows that the dependence of V (πA) on the classification error ǫ is significantly better when the expert is following a near-optimal policy. Theorem 2. If Assumption 1 holds, then V (πA) ≥V (πE) − 4ǫH3Rmax + ∆πE  , where ∆πE ≜ V (π∗) −V (πE) is the suboptimality of the expert’s policy πE. Note that the bound in Theorem 2 varies with ǫ and not with √ǫ. We can interpret this bound as follows: If our goal is to learn an apprentice policy whose value is within ∆πE of the expert policy’s value, we can double our progress towards that goal by halving the classification error rate. On the other hand, Theorem 2 suggests that the error rate must be reduced by a factor of four. To see why a near-optimal expert policy should yield a weaker dependence on ǫ, consider an expert policy πE that is an optimal policy, but in every state s ∈S selects one of two actions as 1 and as 2 uniformly at random. A deterministic apprentice policy πA that closely imitates the expert will either set πA(s) = as 1 or πA(s) = as 2, but in either case the classification error will not be less than 1 2. However, since πE is optimal, both actions as 1 and as 2 must be optimal actions for state s, and so the apprentice policy πA will be optimal as well. Our strategy for proving Theorem 2 is to replace Lemma 2 with a different result — namely, Lemma 6 below — that has a much weaker dependence on the classification error ǫ when ∆πE is small. To help us prove Lemma 6, we will first need to define several useful policies. The next several definitions will be with respect to an arbitrary nonstationary base policy πB; in the proof of Theorem 2, we will make a particular choice for the base policy. Fix a deterministic nonstationary policy πB,ǫ that satisfies πB t (s, πB,ǫ t (s)) ≥1 −ǫ for some ǫ ∈(0, 1] and all states s and time steps t. Such a policy always exists by letting ǫ = 1, but if ǫ is close to zero, then πB,ǫ is a deterministic policy that “almost” agrees with πB in every state and time step. Of course, depending on the choice of πB, a policy πB,ǫ may not exist for small ǫ, but let us set aside that concern for the moment; in the proof of Theorem 2, the base policy πB will be chosen so that ǫ can be as small as we like. Having thus defined πB,ǫ, we define πB\ǫ as follows: For all states s ∈S and time steps t, if πB t (s, πB,ǫ(s)) < 1, then let πB\ǫ t (s, a) =        0 if πB,ǫ t (s) = a πB t (s, a) P a′̸=πB,ǫ t (s) πB t (s, a′) otherwise 6 for all actions a ∈A, and otherwise let πB\ǫ t (s, a) = 1 |A| for all a ∈A. In other words, in each state s and time step t, the distribution πB\ǫ t (s, ·) is obtained by proportionally redistributing the probability assigned to action πB,ǫ t (s) by the distribution πB t (s, ·) to all other actions. The case where πB t (s, ·) assigns all probability to action πB,ǫ t (s) is treated specially, but as will be clear from the proof of Lemma 4, it is actually immaterial how the distribution πB\ǫ t (s, ·) is defined in these cases; we choose the uniform distribution for definiteness. Let πB+ be a deterministic policy defined by πB+ t (s) = arg max a E h V πB t+1(s′) s′ ∼θ(s, a, ·) i for all states s ∈S and time steps t. In other words, πB+ t (s) is the best action in state s at time t, assuming that the policy πB is followed thereafter. The next definition requires the use of mixed policies. A mixed policy consists of a finite set of deterministic nonstationary policies, along with a distribution over those policies; the mixed policy is followed by drawing a single policy according to the distribution in the initial time step, and following that policy exclusively thereafter. More formally, a mixed policy is defined by a set of ordered pairs {(πi, λ(i))}N i=1 for some finite N, where each component policy πi is a deterministic nonstationary policy, PN i=1 λ(i) = 1 and λ(i) ≥0 for all i ∈[N]. We define a mixed policy ˜πB,ǫ,+ as follows: For each component policy πi and each time step t, either πi t = πB,ǫ t or πi t = πB+ t . There is one component policy for each possible choice; this yields N = 2|H| component policies. And the probability λ(i) assigned to each component policy πi is λ(i) = (1 −ǫ)k(i)ǫH−k(i), where k(i) is the number of times steps t for which πi t = πB,ǫ t . Having established these definitions, we are now ready to prove several lemmas that will help us prove Theorem 2. Lemma 4. V (˜πB,ǫ,+) ≥V (πB). Proof. The proof will be by backwards induction on t. Clearly V ˜πB,ǫ,+ H (s) = V πB H (s) for all states s, since the value function V π H for any policy π depends only on the reward function R. Now suppose for induction that V ˜πB,ǫ,+ t+1 (s) ≥V πB t+1(s) for all states s. Then for all states s V ˜πB,ǫ,+ t (s) = R(s) + E h V ˜πB,ǫ,+ t+1 (s′) a′ ∼˜πB,ǫ,+ t (s, ·), s′ ∼θ(s, a′, ·) i ≥R(s) + E h V πB t+1(s′) a′ ∼˜πB,ǫ,+ t (s, ·), s′ ∼θ(s, a′, ·) i = R(s) + (1 −ǫ)E h V πB t+1(s′) s′ ∼θ(s, πB,ǫ t (s), ·) i + ǫE h V πB t+1(s′) s′ ∼θ(s, πB+ t (s), ·) i ≥R(s) + πB t (s, πB,ǫ t (s)) · E h V πB t+1(s′) s′ ∼θ(s, πB,ǫ t (s), ·) i +  1 −πB t (s, πB,ǫ t (s))  · E h V πB t+1(s′) s′ ∼θ(s, πB+ t (s), ·) i ≥R(s) + πB t (s, πB,ǫ t (s)) · E h V πB t+1(s′) s′ ∼θ(s, πB,ǫ t (s), ·) i +  1 −πB t (s, πB,ǫ t (s))  · E h V πB t+1(s′) a′ ∼πB\ǫ t (s, ·), s′ ∼θ(s, a′, ·) i = R(s) + E h V πB t+1(s′) a′ ∼πB t (s), s′ ∼θ(s, a′, ·) i = V πB t (s). The first equality holds for all policies π, and follows straightforwardly from the definition of V π t . The rest of the derivation uses, in order: the inductive hypothesis; the definition of ˜πB,ǫ,+; property of πB,ǫ and the fact that πB+ t (s) is the best action with respect to V πB t+1; the fact that πB+ t (s) is the best action with respect to V πB t+1; the definition of πB\ǫ; the definition of V πB t (s). Lemma 5. V (˜πB,ǫ,+) ≤(1 −ǫH)V (πB,ǫ) + ǫHV (π∗). 7 Proof. Since ˜πB,ǫ,+ is a mixed policy, by the linearity of expectation we have V (˜πB,ǫ,+) = N X i=1 λ(i)V (πi) where each πi is a component policy of ˜πB,ǫ,+ and λ(i) is its associated probability. Therefore V (˜πB,ǫ,+) = X i λ(i)V (πi) ≤(1 −ǫ)HV (πB,ǫ) + (1 −(1 −ǫ)H)V (π∗) ≤(1 −ǫH)V (πB,ǫ) + ǫHV (π∗). Here we used the fact that probability (1 −ǫ)H ≥1 −ǫH is assigned to a component policy that is identical to πB,ǫ, and the value of any component policy is at most V (π∗). Lemma 6. If ǫ < 1 H , then V (πB,ǫ) ≥V (πB) − ǫH 1−ǫH ∆πB. Proof. Combining Lemmas 4 and 5 yields (1 −ǫH)V (πB,ǫ) + ǫHV (π∗) ≥V (πB). And via algebraic manipulation we have (1 −ǫH)V (πB,ǫ) + ǫHV (π∗) ≥V (πB) ⇒(1 −ǫH)V (πB,ǫ) ≥(1 −ǫH)V (πB) + ǫHV (πB) −ǫHV (π∗) ⇒(1 −ǫH)V (πB,ǫ) ≥(1 −ǫH)V (πB) −ǫH∆πB ⇒V (πB,ǫ) ≥V (πB) − ǫH 1 −ǫH ∆πB. In the last line, we were able to divide by (1 −ǫH) without changing the direction of the inequality because of our assumption that ǫ < 1 H . We are now ready to combine the previous lemmas and prove Theorem 2. Proof of Theorem 2. Since the apprentice’s policy πA satisfies Assumption 1, by Lemma 1 we can choose any ǫ1 ∈(0, 1 H ) and have Prs∼DE t πE t (s, πA t (s)) ≥1 −ǫ1  ≥1 −ǫ ǫ1 . As in the proof of Theorem 1, let us construct a “dummy” policy ˆπ as follows: For all time steps t, let ˆπt(s, ·) = πE t (s, ·) for any state s where πE t (s, πA t (s)) ≥1 −ǫ1. On all other states, let ˆπt(s, πA t (s)) = 1. By Lemma 3 we have V (ˆπ) ≥V (πE) −ǫ ǫ1 H2Rmax. (1) Substituting V (πE) = V (π∗) −∆πE and V (ˆπ) = V (π∗) −∆ˆπ and rearranging yields ∆ˆπ ≤∆πE + ǫ ǫ1 H2Rmax. (2) Now observe that, if we set the base policy πB = ˆπ, then by definition πA is a valid choice for πB,ǫ1. And since ǫ1 < 1 H we have V (πA) ≥V (ˆπ) − ǫ1H 1 −ǫ1H ∆ˆπ ≥V (ˆπ) − ǫ1H 1 −ǫ1H  ∆πE + ǫ ǫ1 H2Rmax  ≥V (πE) −ǫ ǫ1 H2Rmax − ǫ1H 1 −ǫ1H  ∆πE + ǫ ǫ1 H2Rmax  (3) where we used Lemma 6, (2) and (1), in that order. Letting ǫ1 = 1 2H proves the theorem. 8 References [1] Pieter Abbeel and Andrew Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the 21st International Conference on Machine Learning, 2004. [2] P Abbeel and A Y Ng. Exploration and apprenticeship learning in reinforcement learning. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [3] Nathan D. Ratliff, J. Andrew Bagnell, and Martin A. Zinkevich. Maximum margin planning. In Proceedings of the 23rd International Conference on Machine Learning, 2006. [4] Umar Syed and Robert E. Schapire. A game-theoretic approach to apprenticeship learning. In Advances in Neural Information Processing Systems 20, 2008. [5] J. Zico Kolter, Pieter Abbeel, and Andrew Ng. Hierarchical apprenticeship learning with application to quadruped locomotion. In Advances in Neural Information Processing Systems 20, 2008. [6] Umar Syed and Robert E. Schapire. Apprenticeship learning using linear programming. In Proceedings of the 25th International Conference on Machine Learning, 2008. [7] Brenna D. Argall, Sonia Chernova, Manuela Veloso, and Brett Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5):469–483, 2009. [8] St´ephane Ross and J. Andrew Bagnell. Efficient reduction for imitation learning. In AISTATS, 2010. [9] Bianca Zadrozny, John Langford, and Naoki Abe. Cost-sensitive learning by costproportionate example weighting. In Proceedings of the Third IEEE International Conference on Data Mining, 2003. [10] J. Andrew Bagnell, Sham Kakade, Andrew Y. Ng, and Jeff Schneider. Policy search by dynamic programming. In Advances in Neural Information Processing Systems 15, 2003. [11] John Langford and Bianca Zadrozny. Relating reinforcement learning performance to classification performance. In Proceedings of the 22nd International Conference on Machine Learning, 2005. [12] Doron Blatt and Alfred Hero. From weighted classification to policy search. In Advances in Neural Information Processing Systems 18, pages 139–146, 2006. [13] Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In Proceedings 19th International Conference on Machine Learning, 2002. [14] V. N. Vapnik and A. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and Its Applications, 16:264–280, 1971. 9
2010
114
3,871
Extensions of Generalized Binary Search to Group Identification and Exponential Costs Gowtham Bellala1, Suresh K. Bhavnani2,3,4, Clayton Scott1 1Department of EECS, University of Michigan, Ann Arbor, MI 48109 2Institute for Translational Sciences, 3Dept. of Preventative Medicine and Community Health, University of Texas Medical Branch, Galveston, TX 77555 4School of Biomedical Informatics, University of Texas, Houston, TX 77030 gowtham@umich.edu, skbhavnani@gmail.com, clayscot@umich.edu Abstract Generalized Binary Search (GBS) is a well known greedy algorithm for identifying an unknown object while minimizing the number of “yes” or “no” questions posed about that object, and arises in problems such as active learning and active diagnosis. Here, we provide a coding-theoretic interpretation for GBS and show that GBS can be viewed as a top-down algorithm that greedily minimizes the expected number of queries required to identify an object. This interpretation is then used to extend GBS in two ways. First, we consider the case where the objects are partitioned into groups, and the objective is to identify only the group to which the object belongs. Then, we consider the case where the cost of identifying an object grows exponentially in the number of queries. In each case, we present an exact formula for the objective function involving Shannon or R´enyi entropy, and develop a greedy algorithm for minimizing it. 1 Introduction In applications such as active learning [1, 2, 3, 4], disease/fault diagnosis [5, 6, 7], toxic chemical identification [8], computer vision [9, 10] or the adaptive traveling salesman problem [11], one often encounters the problem of identifying an unknown object while minimizing the number of binary questions posed about that object. In these problems, there is a set Θ = {θ1, · · · , θM} of M different objects and a set Q = {q1, · · · , qN} of N distinct subsets of Θ known as queries. An unknown object θ is generated from this set Θ with a certain prior probability distribution Π = (π1, · · · , πM), i.e., πi = Pr(θ = θi), and the goal is to uniquely identify this unknown object through as few queries from Q as possible, where a query q ∈Q returns a value 1 if θ ∈q, and 0 otherwise. For example, in active learning, the objects are classifiers and the queries are the labels for fixed test points. In active diagnosis, objects may correspond to faults, and queries to alarms. This problem has been generically referred to as binary testing or object/entity identification in the literature [5, 12]. We will refer to this problem as object identification. Our attention is restricted to the case where Θ and Q are finite, and the queries are noiseless. The goal in object identification is to construct an optimal binary decision tree, where each internal node in the tree is associated with a query from Q, and each leaf node corresponds to an object from Θ. Optimality is often with respect to the expected depth of the leaf node corresponding to the unknown object θ. In general the determination of an optimal tree is NP-complete [13]. Hence, various greedy algorithms [5, 14] have been proposed to obtain a suboptimal binary decision tree. A well studied algorithm for this problem is known as the splitting algorithm [5] or generalized binary search (GBS) [1, 2]. This is the greedy algorithm which selects a query that most evenly divides the probability mass of the remaining objects [1, 2, 5, 15]. 1 GBS assumes that the end goal is to rapidly identify individual objects. However, in applications such as disease diagnosis, where Θ is a collection of possible diseases, it may only be necessary to identify the intervention or response to an object, rather than the object itself. In these problems, the object set Θ is partitioned into groups and it is only necessary to identify the group to which the unknown object belongs. We note below that GBS is not necessarily efficient for group identification. To address this problem, we first present a new interpretation of GBS from a coding-theoretic perspective by viewing the problem of object identification as constrained source coding. Specifically, we present an exact formula for the expected number of queries required to identify an unknown object in terms of Shannon entropy of the prior distribution Π, and show that GBS is a top-down algorithm that greedily minimizes this cost function. Then, we extend this framework to the problem of group identification and derive a natural extension of GBS for this problem. We also extend the coding theoretic framework to the problem of object (or group) identification where the cost of identifying an object grows exponentially in the number of queries, i.e., the cost of identifying an object using d queries is λd for some fixed λ > 1. Applications where such a scenario arises have been discussed earlier in the context of source coding [16], random search trees [17] and design of alphabetic codes [18], for which efficient optimal or greedy algorithms have been presented. In the context of object/group identification, the exponential cost function has certain advantages in terms of avoiding deep trees (which is crucial in time-critical applications) and being more robust to misspecification of the prior probabilities. However, there does not exist an algorithm to the best of our knowledge that constructs a good suboptimal decision tree for the problem of object/group identification with exponential costs. Once again, we show below that GBS is not necessarily efficient for minimizing the exponential cost function, and propose an improved greedy algorithm that generalizes GBS. 1.1 Notation We denote an object identification problem by a pair (B, Π) where B is a known M × N binary matrix with bij equal to 1 if θi ∈qj, and 0 otherwise. A decision tree T constructed on (B, Π) has a query from the set Q at each of its internal nodes, with the leaf nodes terminating in the objects from Θ. For a decision tree with L leaves, the leaf nodes are indexed by the set L = {1, · · · , L} and the internal nodes are indexed by the set I = {L+1, · · · , 2L−1}. At any node ‘a’, let Qa ⊆Q denote the set of queries that have been performed along the path from the root node up to that node. An object θi reaches node ‘a’ if it agrees with the true θ on all queries in Qa, i.e., the binary values in B for the rows corresponding to θi and θ are same over the columns corresponding to queries in Qa. At any internal node a ∈I, let l(a), r(a) denote the “left” and “right” child nodes, and let Θa ⊆Θ denote the set of objects that reach node ‘a’. Thus, the sets Θl(a) ⊆Θa, Θr(a) ⊆Θa correspond to the objects in Θa that respond 0 and 1 to the query at node ‘a’, respectively. We denote by πΘa := P {i:θi∈Θa} πi, the probability mass of the objects reaching node ‘a’ in the tree. Finally, we denote the Shannon entropy of a proportion π ∈[0, 1] by H(π) := −π log2 π −(1 −π) log2(1 −π) and that of a vector Π = (π1, · · · , πM) by H(Π) := −P i πi log2 πi, where we use the limit, lim π→0 π log2 π = 0, to define the value of 0 log2 0. 2 GBS Greedily Minimizes the Expected Number of Queries We begin by noting that object identification reduces to the standard source coding problem [19] in the special case when Q is complete, meaning, for any S ⊆Θ there exists a query q ∈Q such that either q = S or Θ \ q = S. Here, the problem of constructing an optimal binary decision tree is equivalent to constructing optimal variable length binary prefix codes, for which there exists an efficient optimal algorithm known as the Huffman algorithm [20]. It is also known that the expected length of any binary prefix code (i.e., expected depth of any binary decision tree) is bounded below by the Shannon entropy of the prior distribution Π [19]. For the problem of object identification, where Q is not complete, the entropy lower bound is still valid, but Huffman coding cannot be implemented. In this case, GBS is a greedy, top-down algorithm that is analogous to Shannon-Fano coding [21, 22]. We now show that GBS is actually greedily minimizing the expected number of queries required to identify an object. 2 First, we define a parameter called the reduction factor on the binary matrix/tree combination that provides a useful quantification on the expected number of queries required to identify an object. Definition 1 (Reduction factor). Let T be a decision tree constructed on the pair (B, Π). The reduction factor at any internal node ‘a’ in the tree is defined by ρa = max{πΘl(a), πΘr(a)}/πΘa. Note that 0.5 ≤ρa ≤1. Given an object identification problem (B, Π), let T (B, Π) denote the set of decision trees that can uniquely identify all the objects in the set Θ. We assume that the rows of B are distinct so that T (B, Π) ̸= ∅. For any decision tree T ∈T (B, Π), let {ρa}a∈I denote the set of reduction factors and let di denote the number of queries required to identify object θi in the tree. Then the expected number of queries required to identify an unknown object using a tree (or, the expected depth of a tree) is L1(Π) = P i πidi. Note that the cost function depends on both Π and d = (d1, · · · , dM). However, we do not show the dependence on d explicitly. Theorem 1. For any T ∈T (B, Π), the expected number of queries required to identify an unknown object is given by L1(Π) = H(Π) + X a∈I πΘa[1 −H(ρa)]. (1) Theorems 1, 2 and 3 are special cases of Theorem 4, whose proof is sketched in the Appendix. Complete proofs are given in the Supplemental Material. Since H(ρa) ≤1, this theorem recovers the result that L1(Π) is bounded below by the Shannon entropy H(Π). It presents the exact formula for the gap in this lower bound. It also follows from the above result that a tree attains the entropy bound iff the reduction factors are equal to 0.5 at each internal node in the tree. Using this result, minimizing L1(Π) can be formulated as the following optimization problem: min T ∈T (B,Π)H(Π) + P a∈I πΘa[1 −H(ρa)]. (2) Since Π is fixed, this optimization problem reduces to minimizing P a∈I πΘa[1 −H(ρa)] over T (B, Π). As mentioned earlier, finding a global optimal solution for this optimization problem is NP-complete [13]. Instead, we may take a top down approach and minimize the objective function by minimizing the term Ca := πΘa[1 −H(ρa)] at each internal node, starting from the root node. Note that the only term that depends on the query chosen at node ‘a’ in this cost function is ρa. Hence the algorithm reduces to minimizing ρa (i.e., choosing a split as balanced as possible) at each internal node a ∈I. In other words, greedy minimization of (2) is equivalent to GBS. In the next section, we show how this framework can be extended to derive greedy algorithms for the problems of group identification and object identification with exponential costs. 3 Extensions of GBS 3.1 Group Identification In group identification1, the goal is not to determine the unknown object θ ∈Θ, rather the group to which it belongs, in as few queries as possible. Here, in addition to B and Π, the group labels for the objects are also provided, where the groups are assumed to be disjoint. We denote a group identification problem by (B, Π, y), where y = (y1, · · · , yM) denotes the group labels of the objects, yi ∈{1, · · · , K}. Let {Θk}K k=1 be the partition of Θ, where Θk = {θi ∈Θ : yi = k}. It is important to note here that the group identification problem cannot be simply reduced to an object identification problem with groups {Θ1, · · · , ΘK} as “meta objects,” since the objects within a group need not respond the same to each query. For instance, consider the toy example shown in Figure 1 where the objects θ1, θ2 and θ3 belonging to group 1 cannot be collapsed into a single meta object as these objects respond differently to queries q1 and q3. In this context, we also note that GBS can fail to produce a good solution for a group identification problem as it does not take the group labels into consideration while choosing queries. Once again, consider the toy example shown in Figure 1 where query q2 is sufficient to identify the group of an unknown object, whereas GBS requires 2 queries to identify the group when the unknown object is either θ2 or θ4. Here, we propose a natural extension of GBS to the problem of group identification. 1Golovin et.al. [23] simultaneously studied the problem of group identification in the context of object identification with persistent noise. Their algorithm is an extension of that in [24]. 3 q1 q2 q3 Group label, y Π θ1 0 1 1 1 0.25 θ2 1 1 0 1 0.25 θ3 0 1 0 1 0.25 θ4 1 0 0 2 0.25 Figure 1: Toy Example ?>=< 89:; q1 0 {wwwww 1 !D D D D D y = 1 ?>=< 89:; q2 0 |xxxx 1 "F F F F y = 2 y = 1 Figure 2: Decision tree constructed using GBS Note that when constructing a tree for group identification, a greedy, top-down algorithm terminates splitting when all the objects at the node belong to the same group. Hence, a tree constructed in this fashion can have multiple objects ending in the same leaf node and multiple leaves ending in the same group. For a tree with L leaves, we denote by Lk ⊂L = {1, · · · , L} the set of leaves that terminate in group k. Similar to Θk ⊆Θ, we denote by Θk a ⊆Θa the set of objects belonging to group k that reach node ‘a’ in a tree. Also, in addition to the reduction factor defined in Section 2, we define a new parameter called the group reduction factor for each group k ∈{1, · · · , K} at each internal node. Definition 2 (Group reduction factor). Let T be a decision tree constructed on a group identification problem (B, Π, y). The group reduction factor for any group k at an internal node ‘a’ is defined by ρk a = max{πΘk l(a), πΘk r(a)}/πΘka. Given (B, Π, y), let T (B, Π, y) denote the set of decision trees that can uniquely identify the groups of all objects in the set Θ. For any decision tree T ∈T (B, Π, y), let dj denote the depth of leaf node j ∈L. Let random variable X denote the number of queries required to identify the group of an unknown object θ. Then, the expected number of queries required to identify the group of an unknown object using the given tree is equal to L1(Π) = K X k=1 Pr(θ ∈Θk) E[X|θ ∈Θk] = K X k=1 πΘk  X j∈Lk πΘj πΘk dj   (3) Theorem 2. For any T ∈T (B, Π, y), the expected number of queries required to identify the group of an unknown object is given by L1(Π) = H(Πy) + X a∈I πΘa " 1 −H(ρa) + K X k=1 πΘka πΘa H(ρk a) # (4) where Πy = (πΘ1, · · · , πΘK) denotes the probability distribution of the object groups induced by the labels y and H(·) denotes the Shannon entropy. Note that the term in the summation in (4) is non-negative. Hence, the above result implies that L1(Π) is bounded below by the Shannon entropy of the probability distribution of the groups. It also follows from this result that this lower bound is achieved iff the reduction factor ρa is equal to 0.5 and the group reduction factors {ρk a}K k=1 are equal to 1 at every internal node in the tree. Also, note that the result in Theorem 1 is a special case of this result where each group is of size 1 leading to ρk a = 1 for all groups at every internal node. Using this result, the problem of finding a decision tree with minimum L1(Π) can be formulated as: min T ∈T (B,Π,y) P a∈I πΘa h 1 −H(ρa) + PK k=1 πΘka πΘa H(ρk a) i . (5) This optimization problem being a generalized version of that in (2) is NP-complete. Hence, we may take a top-down approach and minimize the objective function greedily by minimizing the term πΘa[1 −H(ρa) + PK k=1 πΘka πΘa H(ρk a)] at each internal node, starting from the root node. Note that the terms that depend on the query chosen at node ‘a’ are ρa and ρk a. Hence the algorithm reduces to minimizing Ca := 1 −H(ρa) + PK k=1 πΘka πΘa H(ρk a) at each internal node ‘a’. 4 Group-GBS (GGBS) Initialize: L = {root node}, Qroot = ∅ while some a ∈L has more than one group Choose query q∗= arg minq∈Q\Qa Ca(q) Form child nodes l(a), r(a) Replace ‘a’ with l(a), r(a) in L end Ca = 1 −H(ρa) + PK k=1 πΘka πΘa H(ρk a) Figure 3: Greedy algorithm for group identification λ-GBS Initialize: L = {root node}, Qroot = ∅ while some a ∈L has more than one object Choose query q∗= arg minq∈Q\Qa Ca(q) Form child nodes l(a), r(a) Replace ‘a’ with l(a), r(a) in L end Ca = πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a)) Figure 4: Greedy algorithm for object identification with exponential costs Note that this objective function consists of two terms, the first term [1 −H(ρa)] favors queries that evenly distribute the probability mass of the objects at node ‘a’ to its child nodes (regardless of the group) while the term P k πΘka πΘa H(ρk a) favors queries that transfer an entire group of objects to one of its child nodes. This algorithm, which we refer to as Group Generalized Binary Search (GGBS), is summarized in Figure 3. Finally, as an interesting connection with greedy decision-tree algorithms for multi-class classification, it can be shown that GGBS is equivalent to the decision-tree splitting algorithm used in the C4.5 software package, based on the entropy impurity measure [25]. 3.2 Exponential Costs Now assume the cost of identifying an object is defined by Lλ(Π) := logλ(P i πiλdi), where λ > 1 and di corresponds to the depth of object θi in a tree. In the limiting case where λ tends to 1 and ∞, this cost function reduces to the average depth and worst case depth, respectively. That is, L1(Π) = lim λ→1Lλ(Π) = M X i=1 πidi, L∞(Π) := lim λ→∞Lλ(Π) = max i∈{1,··· ,M}di. As mentioned in Section 2, GBS is tailored to minimize L1(Π), and hence may not produce a good suboptimal solution for the exponential cost function with λ > 1. Thus, we derive an extension of GBS for the problem of exponential costs. Here, we use a result by Campbell [26] which states that the exponential cost Lλ(Π) of any tree T is bounded below by the α-R´enyi entropy, given by Hα(Π) := 1 1−α log2 (P i πα i ), where α = 1 1+log2 λ. We consider a general object identification problem and derive an explicit formula for the gap in this lower bound. We then use this formula to derive a family of greedy algorithms that minimize the exponential cost function Lλ(Π) for λ > 1. Note that the entropy bound reduces to the Shannon entropy H(Π) and log2 M, in the limiting cases where λ tends to 1 and ∞, respectively. Theorem 3. For any λ > 1 and any T ∈T (B, Π), the exponential cost Lλ(Π) is given by λLλ(Π) = λHα(Π) + X a∈I πΘa  (λ −1)λda −Dα(Θa) + πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a))  where da denotes the depth of any internal node ‘a’ in the tree, Θa denotes the set of objects that reach node ‘a’, πΘa = P {i:θi∈Θa} πi, α = 1 1+log2 λ and Dα(Θa) := hP {i:θi∈Θa}  πi πΘa αi1/α . The term in summation over internal nodes I in the above result corresponds to the gap in the Campbell’s lower bound. This result suggests a top-down greedy approach to minimize Lλ(Π), which is to minimize the term (λ −1)λda −Dα(Θa) + πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a)) at each internal node, starting from the root node. Noting that the terms that depend on the query chosen at node ‘a’ are πΘl(a), πΘr(a), Dα(Θl(a)) and Dα(Θr(a)), this reduces to minimizing Ca := πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a)) at each internal node. This algorithm, which we refer to as λ-GBS, can be summarized as shown in Figure 4. Also, it can be shown by the application of L’Hˆopital’s rule that in the limiting case where λ →1, λ-GBS reduces to GBS, and in the case where λ →∞, λ-GBS reduces to GBS with uniform prior πi = 1/M. The latter algorithm is GBS but with the true prior Π replaced by a uniform distribution. 5 0.5 0.6 0.7 0.8 0.9 1 2 4 6 8 10 β > 1 β < 1 β = 1 Figure 5: Beta distribution over the range [0.5, 1] for different values of β when α = 1 0.5 0.750.951 2 4 8 0.75 0.95 1 2 4 8 4 5 6 7 8 9 βb βw Expected # of queries GBS GGBS Entropy bound Figure 6: Expected number of queries required to identify the group of an object using GBS and GGBS 3.3 Group Identification with Exponential Costs Finally, we complete our discussion by considering the problem of group identification with exponential costs. Here, the cost of identifying the group of an object given a tree T ∈T (B, Π, y), is defined to be Lλ(Π) = logλ P j∈L πΘjλdj  , which reduces to (3) in the limiting case as λ →1, and to maxj∈L dj, i.e., the worst case depth of the tree, in the case where λ →∞. Theorem 4. For any λ > 1 and any T ∈T (B, Π, y), the exponential cost Lλ(Π) of identifying the group of an object is given by λLλ(Π) = λHα(Πy) + X a∈I πΘa  (λ −1)λda −Dα(Θa) + πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a))  where Πy = (πΘ1, · · · , πΘK) denotes the probability distribution of the object groups induced by the labels y, Dα(Θa) := hPK k=1  πΘka πΘa αi1/α with α = 1 1+log2 λ. Note that the definition of Dα(Θa) in this theorem is a generalization of that in Theorem 3. As mentioned earlier, Theorems 1-3 are special cases of the above theorem, where Theorem 2 follows as λ →1 and Theorem 1 follows when each group is of size one in addition. This result also implies a top-down, greedy algorithm to minimize Lλ(Π), which is to choose a query that minimizes Ca := πΘl(a) πΘa Dα(Θl(a)) + πΘr(a) πΘa Dα(Θr(a)) at each internal node. Once again, it can be shown by the application of L’Hˆopital’s rule that in the limiting case where λ →1, this reduces to GGBS, and in the case where λ →∞, this reduces to choosing a query that minimizes the maximum number of groups in the child nodes [27]. 4 Performance of the Greedy Algorithms We compare the performance of the proposed algorithms to that of GBS on synthetic data generated using different random data models. 4.1 Group Identification For fixed M = |Θ| and N = |Q|, we consider a random data model where each query q ∈Q is associated with a pair of parameters (γw(q), γb(q)) ∈[0.5, 1]2. Here, γw(q) reflects the correlation of the object responses within a group, and γb(q) captures the correlation of object responses between groups. When γw(q) is close to 0.5, each object within a group is equally likely to exhibit 0 or 1 as its response to query q, whereas, when it is close to 1, most of the objects within a group are highly likely to exhibit the same query response. Similarly, when γb(q) is close to 0.5, each group is equally likely to exhibit 0 or 1 as its response to the query, where a group response corresponds to the majority vote of the object responses within a group, while, as γb(q) tends to 1, most of the 6 10 0 10 1 10 2 10 3 10 4 10 5 7 8 9 10 11 λ Average Exponential cost, Lλ(Π) δ = 1 10 0 10 1 10 2 10 3 10 4 10 5 4 6 8 10 12 14 λ δ = 2 GBS GBS−Uniform λ−GBS Entropy bound Figure 7: Exponential cost incurred in identifying an object using GBS and λ-GBS groups are highly likely to exhibit the same response. Given these correlation values (γw(q), γb(q)) for a query q, the object responses to query q (i.e., the binary column of 0’s and 1’s corresponding to query q in B) are generated as follows 1. Flip a fair coin to generate a Bernoulli random variable, x 2. For each group k ∈{1, · · · , K}, assign a binary label bk, where bk = x with probability γb(q) 3. For each object in group k, assign bk as the object response to q with probability γw(q) Given the correlation parameters (γw(q), γb(q)), ∀q ∈Q, a random dataset can be created by following the above procedure for each query. We compare the performances of GBS and GGBS on random datasets generated using the above model. We demonstrate the results on datasets of size N = 200 (# of queries) and M = 400 (# of objects), where we randomly partitioned the objects into 15 groups and assumed a uniform prior on the objects. For each dataset, the correlation parameters are drawn from independent beta distributions over the range [0.5, 1], i.e., γw(q) ∼Beta(1, βw) and γb(q) ∼Beta(1, βb) where βw, βb ∈{0.5, 0.75, 0.95, 1, 2, 4, 8}. Figure 5 shows the density function (pdf) of Beta(1, β) for different values of β. Note that β = 1 corresponds to a uniform distribution, while, for β < 1 the distribution is right skewed and for β > 1 the distribution is left skewed. Figure 6 compares the mean value of the cost function L1(Π) for GBS and GGBS over 100 randomly generated datasets, for each value of (βw, βb). This shows the improved performance of GGBS over GBS in group identification. Especially, note that GGBS achieves performance close to the entropy bound as βw decreases. This is due to the increased number of queries with γw(q) close to 1 in the dataset. As the correlation parameter γw(q) tends to 1, choosing that query keeps the groups intact, i.e., the group reduction factors ρk a tend to 1 for these queries. Such queries offer significant gains in group identification, but can be overlooked by GBS. 4.2 Object Identification with Exponential Costs We consider the same random data model as above where we set K = M, i.e., each group is comprised of one object. Thus, the only correlation parameter that determines the structure of the dataset is γb(q), q ∈Q. Figure 7 demonstrates the improved performance of λ-GBS over standard GBS, and GBS with uniform prior, over a range of λ values, for a dataset generated using the above random data model with γb(q) ∼Beta(1, 1) = unif[0.5, 1]. Each curve in the figure corresponds to the average value of the cost function Lλ(Π) as a function of λ over 100 repetitions. In each repetition, the prior is generated according to Zipf’s law, i.e., (j−δ/ PM i=1 i−δ)M j=1, δ ≥0, after randomly permuting the objects. Note that in the special case when δ = 0, this reduces to the uniform distribution and as δ increases, it tends to a skewed distribution with most of the probability mass concentrated on few objects. Similar experiments have been performed on datasets generated using γb(q) ∼Beta(α, β) for different values of α, β. In all our experiments, we observed λ-GBS to be consistently performing better than both the standard GBS, and GBS with uniform prior. In addition, the performance of λ-GBS has been observed to be very close to that of the entropy bound. Finally, Figure 7 also reflects that λ-GBS converges to GBS as λ →1, and to GBS with uniform prior as λ →∞. 7 5 Conclusions In this paper, we show that generalized binary search (GBS) is a top-down algorithm that greedily minimizes the expected number of queries required to identify an object. We then use this interpretation to extend GBS in two ways. First, we consider the case where the objects are partitioned into groups, and the goal is to identify only the group of the unknown object. Second, we consider the problem where the cost of identifying an object grows exponentially in the number of queries. The algorithms are derived in a common framework. In particular, we prove the exact formulas for the cost function in each case that close the gap between previously known lower bounds related to Shannon and R´enyi entropy. These exact formulas are then optimized in a greedy, top-down manner to construct a decision tree. We demonstrate the improved performance of the proposed algorithms over GBS through simulations. An important open question and the direction of our future work is to relate these greedy algorithms to the global optimizer of their respective cost functions. Acknowledgements G. Bellala and C. Scott were supported in part by NSF Awards No. 0830490 and 0953135. S. Bhavnani was supported in part by CDC/NIOSH grant No. R21OH009441. 6 Appendix: Proof Sketch for Theorem 4 Define two new functions eLλ and eHα as eLλ := 1 λ −1  X j∈L πΘjλdj −1  = X j∈L πΘj   dj−1 X h=0 λh   and eHα := 1 − 1 PK k=1 πα Θk  1 α , where eLλ is related to the cost function Lλ(Π) as λLλ(Π) = (λ −1)eLλ + 1, and eHα is related to the α-R´enyi entropy Hα(Πy) as Hα(Πy) = 1 1 −α log2 K X k=1 πα Θk = 1 α log2 λ log2 K X k=1 πα Θk = logλ K X k=1 πα Θk ! 1 α (6a) =⇒λHα(Πy) = K X k=1 πα Θk ! 1 α = K X k=1 πα Θk ! 1 α eHα + 1 (6b) where we use the definition of α, i.e., α = 1 1+log2 λ in (6a). Now, we note from Lemma 1 that eLλ = X a∈I λdaπΘa =⇒λLλ(Π) = 1 + X a∈I (λ −1)λdaπΘa (7) where da denotes the depth of internal node ‘a’ in the tree T. Similarly, we note from (6b) and Lemma 2 that λHα(Πy) = 1 + X a∈I  πΘaDα(Θa) −πΘl(a)Dα(Θl(a)) −πΘr(a)Dα(Θr(a))  . (8) Finally, the result follows from (7) and (8) above. Lemma 1. The function eLλ can be decomposed over the internal nodes in a tree T, as eLλ = P a∈I λdaπΘa, where da denotes the depth of internal node a ∈I and πΘa is the probability mass of the objects at that node. Lemma 2. The function eHα can be decomposed over the internal nodes in a tree T, as eHα = 1 PK k=1 πα Θk  1 α X a∈I  πΘaDα(Θa) −πΘl(a)Dα(Θl(a)) −πΘr(a)Dα(Θr(a))  where Dα(Θa) := hPK k=1  πΘka πΘa αi 1 α and πΘa denotes the probability mass of the objects at any internal node a ∈I. The above two lemmas can be proved using induction over subtrees rooted at any internal node ‘a’ in the tree. The details may be found in the Supplemental Material. 8 References [1] S. Dasgupta, “Analysis of a greedy active learning strategy,” Advances in Neural Information Processing Systems, 2004. [2] R. Nowak, “Generalized binary search,” Proceedings of the 46th Allerton Conference on Communications, Control and Computing, pp. 568–574, 2008. [3] ——, “Noisy generalized binary search,” Advances in Neural Information Processing Systems, vol. 22, pp. 1366–1374, 2009. [4] D. Golovin and A. Krause, “Adaptive Submodularity: A new approach to active learning and stochastic optimization,” In Proceedings of International Conference on Learning Theory (COLT), 2010. [5] D. W. Loveland, “Performance bounds for binary testing with arbitrary weights,” Acta Informatica, 1985. [6] F. Yu, F. Tu, H. Tu, and K. Pattipati, “Multiple disease (fault) diagnosis with applications to the QMR-DT problem,” Proceedings of IEEE International Conference on Systems, Man and Cybernetics, vol. 2, pp. 1187–1192, October 2003. [7] J. Shiozaki, H. Matsuyama, E. O’Shima, and M. Iri, “An improved algorithm for diagnosis of system failures in the chemical process,” Computational Chemical Engineering, vol. 9, no. 3, pp. 285–293, 1985. [8] S. Bhavnani, A. Abraham, C. Demeniuk, M. Gebrekristos, A. Gong, S. Nainwal, G. Vallabha, and R. Richardson, “Network analysis of toxic chemicals and symptoms: Implications for designing firstresponder systems,” Proceedings of American Medical Informatics Association, 2007. [9] D. Geman and B. Jedynak, “An active testing model for tracking roads in satellite images,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 18, no. 1, pp. 1–14, 1996. [10] M. J. Swain and M. A. Stricker, “Promising directions in active vision,” International Journal of Computer Vision, vol. 11, no. 2, pp. 109–126, 1993. [11] A. Gupta, R. Krishnaswamy, V. Nagarajan, and R. Ravi, “Approximation algorithms for optimal decision trees and adaptive TSP problems,” 2010, available online at arXiv.org:1003.0722. [12] M. Garey, “Optimal binary identification procedures,” SIAM Journal on Applied Mathematics, vol. 23(2), pp. 173–186, 1972. [13] L. Hyafil and R. Rivest, “Constructing optimal binary decision trees is NP-complete,” Information Processing Letters, vol. 5(1), pp. 15–17, 1976. [14] S. R. Kosaraju, T. M. Przytycka, and R. S. Borgstrom, “On an optimal split tree problem,” Proceedings of 6th International Workshop on Algorithms and Data Structures, WADS, pp. 11–14, 1999. [15] R. M. Goodman and P. Smyth, “Decision tree design from a communication theory standpoint,” IEEE Transactions on Information Theory, vol. 34, no. 5, 1988. [16] P. A. Humblet, “Generalization of Huffman coding to minimize the probability of buffer overflow,” IEEE Transactions on Information Theory, vol. IT-27, no. 2, pp. 230–232, March 1981. [17] F. Schulz, “Trees with exponentially growing costs,” Information and Computation, vol. 206, 2008. [18] M. B. Baer, “R´enyi to R´enyi - source coding under seige,” Proceedings of IEEE International Symposium on Information Theory, pp. 1258–1262, July 2006. [19] T. M. Cover and J. A. Thomas, Elements of Information Theory. John Wiley, 1991. [20] D. A. Huffman, “A method for the construction of minimum-redundancy codes,” Proceedings of the Institute of Radio Engineers, 1952. [21] C. E. Shannon, “A mathematical theory of communication,” Bell Systems Technical Journal, vol. 27, pp. 379 – 423, July 1948. [22] R. M. Fano, Transmission of Information. MIT Press, 1961. [23] D. Golovin, D. Ray, and A. Krause, “Near-optimal Bayesian active learning with noisy observations,” to appear in the Proceedings of the Neural Information Processing Systems (NIPS), 2010. [24] S. Dasgupta, “Coarse sample complexity bounds for active learning,” Advances in Neural Information Processing Systems, 2006. [25] G. Bellala, S. Bhavnani, and C. Scott, “Group-based query learning for rapid diagnosis in time-critical situations,” Tech. Rep., 2009, available online at arXiv.org:0911.4511. [26] L. L. Campbell, “A coding problem and R´enyi’s entropy,” Information and Control, vol. 8, no. 4, pp. 423–429, August 1965. [27] G. Bellala, S. Bhavnani, and C. Scott, “Query learning with exponential query costs,” Tech. Rep., 2010, available online at arXiv.org:1002.4019. 9
2010
115
3,872
Feature Set Embedding for Incomplete Data David Grangier NEC Labs America Princeton, NJ dgrangier@nec-labs.com Iain Melvin NEC Labs America Princeton, NJ iain@nec-labs.com Abstract We present a new learning strategy for classification problems in which train and/or test data suffer from missing features. In previous work, instances are represented as vectors from some feature space and one is forced to impute missing values or to consider an instance-specific subspace. In contrast, our method considers instances as sets of (feature,value) pairs which naturally handle the missing value case. Building onto this framework, we propose a classification strategy for sets. Our proposal maps (feature,value) pairs into an embedding space and then nonlinearly combines the set of embedded vectors. The embedding and the combination parameters are learned jointly on the final classification objective. This simple strategy allows great flexibility in encoding prior knowledge about the features in the embedding step and yields advantageous results compared to alternative solutions over several datasets. 1 Introduction Many applications require classification techniques dealing with train and/or test instances with missing features: e.g. a churn predictor might deal with incomplete log features for new customers, a spam filter might be trained from data originating from servers storing different features, a face detector might deal with images for which high resolution cues are corrupted. In this work, we address a learning setting in which the missing features are either missing at random [6], i.e. deletion due to corruption or noise, or structurally missing [4], i.e. some features do not make sense for some examples, e.g. activity history for new customers. We do not consider setups in which the features are maliciously deleted to fool the classifier [5]. Techniques for dealing with incomplete data fall mainly into two categories: techniques which impute the missing features and techniques considering an instance-specific subspace. Imputation-based techniques are the most common. In this case, the data instances are viewed as feature vectors in a high-dimensional space and the classifier is a function from this space into the discrete set of classes. Prior to classification, the missing vector components need to be imputed. Early imputation approaches fill any missing value with a constant, zero or the average of the feature over the observed cases [18]. This strategy neglects inter-feature correlation, and completion techniques based on k-nearest-neighbors (k-NN) have subsequently been proposed to circumvent this limitation [1]. Along this line, more complex strategies based on generative models have been used to fill missing features according to the most likely value given the observed features. In this case, the Expectation-Maximization algorithm is typically adopted to estimate the data distribution over the incomplete training data [9]. Building upon this generative model strategy, several approaches have considered integrating out the missing values, either by integrating the loss [2] or the decision function [22]. Recently, [15] and [6] have proposed to avoid the initial maximum likelihood distribution estimation. Instead, they proposed to learn jointly the generative model and the decision function to optimize the final classification loss. As an alternative to imputation-based approaches, [4] has proposed a different framework. In this case, each instance is viewed as a vector from a subspace of the feature space determined by its 1 Input Feature A: 0.15 Feature B missing Feature C missing Feature D missing Feature E: 0.28 Feature F: 0.77 Feature G missing p Set Embedding p(A, 0.15) p(E, 0.28) p(F, 0.77) Φ (Non) Linear Combination Φ (. . .) V Linear Descision Input Class 1 Class 2 Class 3 Class 4 Class 5 Figure 1: Feature Set Embedding: An example is given a set of (feature, value) pairs. Each pair is mapped into an embedding space, then the embedded vectors are combined into a single vector (either linearly with mean or non-linearly with max). Linear classification is then applied. Our learning procedure learns both the embedding space and the linear classifier jointly. observed features. A decision function is learned for each specific subspace and parameter sharing between the functions allows the method to achieve tractability and generalization. Compared to imputation-based approaches, this strategy avoids choosing a generative model, i.e. making an assumption about the missing data. Other alternatives to imputation have been proposed in [10] and [5]. These approaches focus on linear classifiers and propose learning procedures which avoid concentrating the weights on a small subset of the features, which helps achieve better robustness with respect to feature deletion. In this work, we propose a novel strategy called feature set embedding. Contrary to previous work, we do not consider instances as vectors from a given feature space. Instead, we consider instances as a set of (feature, value) pairs and propose to learn to classify sets directly. For that purpose, we introduce a model which maps each (feature, value) pair onto an embedding space and combines the embedded pairs into a single vector before applying a linear classifier, see Figure 1. The embedding space mapping and the linear classifier are jointly learned to maximize the conditional probability of the label given the observed input. Contrary to previous work, this set embedding framework naturally handles incomplete data without modeling the missing feature distribution, or considering an instance specific decision function. Compared to other work on learning from sets, our approach is original as it proposes to learn to embed set elements and to classify sets as a single optimization problem, while prior strategies learn their decision function considering a fixed mapping from sets into a feature space [12, 3]. The rest of the paper is organized as follows: Section 2 presents the proposed approach, Section 3 describes our experiments and results. Section 4 concludes. 2 Feature Set Embedding We denote an example as (X, y) where X = {(fi, vi)}|X| i=1 is a set of (feature, value) pairs and y is a class label in Y = {1, . . . , k}. The set of features is discrete, i.e. ∀i, fi ∈{1, . . . d}, while the feature values are either continuous or discrete, i.e. ∀i, vi ∈Vfi where Vfi = R or Vfi = {1, . . . , cfi}. Given a labeled training dataset Dtrain = {(Xi, yi)}n i=1, we propose to learn a classifier g which predicts a class from an input set X. For that purpose, we combine two levels of modeling. At the lower level, (feature, value) pairs are individually mapped into an embedding space of dimension m: given an example X = {(fi, vi)}|X| i=1, a function p predicts an embedding vector pi = p(fi, vi) ∈Rm for each feature value pair (fi, vi). At the upper level, the embedded vectors are combined to make the class prediction: a function h takes the set of embedded vectors {pi}|X| i=1 and predicts a vector of confidence values h({pi}|X| i=1) ∈Rk in which the correct class should be assigned the highest value. Our classifier composes the two levels, i.e g = h ◦p. Intuitively, the first level extracts the information relevant to class prediction provided by each feature, while the second level combines this information over all observed features. 2 2.1 Feature Embedding Feature embedding offers great flexibility. It can accommodate discrete and continuous data and allows encoding prior knowledge on characteristics shared between groups of features. For discrete features, the simplest embedding strategy learns a distinct parameter vector for each (f, v) pair, i.e. p(f, v) = Lf,v where Lf,v ∈Rm. For capacity control, rank regularization can be applied, p(f, v) = WLf,v where Lf,v ∈Rl and W ∈Rm×l, In this case, l < m is a hyperparameter bounding the rank of WL, where L denotes the matrix concatenating all Lf,v vectors. One can further indicate that two pairs (f, v) and (f, v′) originate from the same feature by parameterizing Lf,v as Lf,v = " L(a) f L(b) f,v # where ( L(a) f ∈Rl(a) and L(b) f,v ∈Rl(b) l(a) + l(b) = l (1) Similarly, one can indicate that two pairs (f, v) and (f ′, v) shares the same value by parameterizing, Lf,v = " L(a) f,v L(b) v # where ( L(a) f,v ∈Rl(a) and L(b) v ∈Rl(b) l(a) + l(b) = l (2) This is useful when feature values share a common physical meaning, like gray levels at different pixel locations or temperatures measured by different sensors. Of course, the parameter sharing strategies (1) and (2) can be combined. When the feature values are continuous, we adopt a similar strategy and define p(f, v) = W " L(a) f vL(b) f # where ( L(a) f ∈Rl(a) and L(b) f ∈Rl(b) l(a) + l(b) = l (3) where L(a) f informs about the presence of feature f, while vL(b) f informs about its value. If the model is thought not to need presence information, L(a) f can be omitted, i.e. l(a) = 0. When the dataset contains a mix of continuous and discrete features, both embedding approaches can be used jointly. Feature embedding is hence a versatile strategy; the practitioner defines the model parameterization according to the nature of the features, and the learned parameters L and W encode the correlation between features. 2.2 Classifying from an Embedded Feature Set The second level of our architecture h considers the set of embedded features and predicts a vector of confidence values. Given an example X = {(fi, vi)}|X| i=1, the function h takes the set P = {p(fi, vi)}|X| i=1 as input, and outputs h(P) ∈Rk according to h(P) = V Φ(P) where Φ is a function which takes a set of vector of Rm and outputs a single vector of Rm, while V is a k-by-m matrix. This second level is hence related to kernel methods for sets, which first apply a fixed mapping Φ from sets to vectors, before learning a linear classifier in the feature space [12]. In our case, however, we make sure that Φ is a generalized differentiable function [19], so that h and p can be optimized jointly. In the following, we consider two alternatives for Φ: a linear function, the mean, and a non-linear function, the component-wise max. Linear Model In this case, one can remark that h(P) = V mean({p(fi, vi)}|X| i=1) = V mean({WLfi,vi}|X| i=1) = V W mean({Lfi,vi}|X| i=1) 3 by linearity of the mean. Hence, in this case, the dimension of the embedding space m bounds the rank of the matrix V W. This also means that considering m > k is irrelevant in the linear case. In the specific case where features are continuous and no presence information is provided, i.e. Lf,v = vL(b) f , our model is equivalent to a classical linear classifier operating on feature vectors when all features are present, i.e. |X| = d, g(X) = V W mean({Lfi,vi}d i=1) = 1 dV W d X i=1 viL(b) fi = 1 d(V WL)v where L denotes the matrix [L(b) f1 , . . . , L(b) fd ] and v denotes the vector [v1, . . . , vd]. Hence, in this case, our model corresponds to g(X) = Mv where M ∈Rk×d s.t. rank(M) = min{k, l, m, d} Non-linear Model In this case, we rely on the component-wise max. This strategy can model more complex decision functions. In this case, selecting m > k, l is meaningful. Intuitively, each dimension in the embedding space provides a meta-feature describing each (feature, value) pair, the max operator then outputs the best meta-feature match over the set of (feature, value) pairs, performing a kind of soft-OR, i.e. checking whether there is at least one pair for which the metafeature is high. The final classification decision is then taken as a linear combination of the m soft-ORs. One can relate our use of the max operator to its common use in fixed set mapping for computer vision [3]. 2.3 Model Training Model learning aims at selecting the parameter matrices L, W and V . For that purpose, we maximize the (log) posterior probability of the correct class over the training set Dtrain = {(Xi, yi)}n i=1, i.e. C = n X i=1 log P(yi|Xi) where model outputs are mapped to probabilities through a softmax function, i.e. P(y|X) = exp(g(X)y) Pk y′=1 exp(g(X)y′) . Capacity control is achieved by selecting the hyperparameters l and m. For linear models, the criterion C is referred to as the multiclass logistic regression objective and [16] has studied the relation between C and margin maximization. In the binary case (k = 2), the criterion C is often referred to as the cross entropy objective. The maximization of C is conducted through stochastic gradient ascent for random initial parameters. This algorithm enables the addressing of large training sets and has good properties for non-convex problems [14], which is of interest for our non-linear model and for the linear model when rank regularization is used. One can note that our non-linear model relies on the max function, which is not differentiable everywhere. However, [8] has shown that gradient ascent can also be applied to generalized differentiable functions, which is the case of our criterion. 3 Experiments Our experiments consider different setups: features missing at train and test time, features missing only at train time, features missing only at test time. In each case, our model is compared to alternative solutions relying on experimental setups introduced in prior work. Finally, we study our model in various conditions over the larger MNIST dataset. 3.1 Missing Features at Train and Test Time The setup in which features are missing at train and test time is relevant to applications suffering sensor failure or communication errors. It is also relevant to applications in which some features are 4 Table 1: Dataset Statistics Train set Test set # eval. Total # Missing Continuous size size splits feat. feat.(%) or discrete UCI sick 2,530 633 5 25 90 c pima 614 154 5 8 90 c hepatitis 124 31 5 19 90 c echo 104 27 5 7 90 c hypo 2,530 633 5 25 90 c MNIST-5-vs-6 1,000 200 2 784 25 d Cars 177 45 5 1,900 62 d USPS 1,000 6,291 100 256 85⋆ c Physics 1,000 5,179 100 78 85⋆ c Mine 500 213 100 41 26⋆ c MNIST-miss-test† 12×100 12×300 20 784 0 to 99† d MNIST-full 60,000 10,000 1 784 0 to 87 d ⋆Features missing only at training time for USPS, Physics and Mine. † Features missing only at test time for MNIST-miss-test. This set presents 12 binary problems, 4vs9, 3vs5, 7vs9, 5vs8, 3vs8, 2vs8, 2vs3, 8vs9, 5vs6, 2vs7, 4vs7 and 2vs6, each having 100 examples for training, 200 for validation and 300 for test. structurally missing, i.e. the measurements are absent because they do not make sense (e.g. see the car detection experiments). We compare our model to alternative solutions over the experimental setup introduced in [4]. Three sets of experiments are considered. The first set relies on binary classification problems from the UCI repository. For each dataset, 90% of the features are removed at random. The second set of experiments considers the task of discriminating between handwritten characters of 5 and 6 from the MNIST dataset. Contrary to UCI, the deleted features have some structure; for each example, a square area covering 25% of the image surface is removed at random. The third set of experiments considers detecting cars in images. This task presents a problem where some features are structurally missing. For each example, regions of interests corresponding to potential car parts are detected, and features are extracted for each region. For each image, 19 types of region are considered and between 0 and 10 instances of each region have been extracted. Each region is then described by 10 features. This region extraction process is described in [7]. Hence, at most 1900 = 19 × 10 × 10 features are provided for each image. Data statistics are summarized in Table 1. On these datasets, Feature Set Embedding (FSE) is compared to 7 baseline models. These baselines are all variants of Support Vector Machines (SVMs), suitable for the missing feature problem. Zero, Mean, GMM and kNN are imputation-based strategies: Zero sets the missing values to zero, Mean sets the missing values to the average value of the features over the training set, GMM finds the most likely missing values given the observed ones relying on a Gaussian Mixture learned over the training set, kNN fills the missing values of an instance based on its k-nearest-neighbors, relying on the Euclidean distance in the subspace relevant to each pair of examples. Flag relies on the Zero imputation but complements the examples with binary features indicating whether each feature was observed or imputed. Finally, geom is a subspace-based strategy [4]; for each example, a classifier in the subspace corresponding to the observed features is considered. The instance-specific margin is maximized but the instance-specific classifiers share common weights. For each experiment, the hyperparameters of our model l, m and the number of training iterations are validated by first training the model on 4/5 of the training data and assessing it on the remainder of the training data. A similar strategy has been used for selecting the baseline parameters. The SVM kernel has notably been validated between linear and polynomial up to order 3. Test performance is then reported over the best validated parameters. Table 2 reports the results of our experiments. Overall, FSE performs at least as well as the best alternative for all experiments, except for hepatitis where all models yield almost the same performance. In the case of structurally missing features, the car experiment shows a substantial advantage for FSE over the second best approach geom, which was specifically introduced for this kind of setup. During validation (no validation results are reported due to space constraints), we noted that non-linear mod5 Table 2: Error Rate (%) for Missing Features at Train & Test Time FSE geom zero mean flag GMM kNN UCI sick 9 10 9 37 16 40 30 pima 34 34 34 35 35 35 41 hepatitis 23 22 22 22 22 22 23 echo 33 34 37 33 36 33 33 hypo 5 5 7 35 6 33 19 MNIST-5-vs-6 5 5 5 6 7 5 6 Cars 24 28 39 39 41 38 48 Table 3: Error rate (%) for missing features at train time only FSE meanInput GMM meanFeat USPS 11.7 13.6 9.0 13.2 Physics 23.8 29.2 31.2 29.6 Mines 9.8 11.7 10.5 10.6 els, i.e. the baseline SVM with a polynomial kernel of order 2 and FSE with φ = max, outperformed their linear counterparts. We therefore solely validate non-linear FSE in the following: For feature embedding of continuous data, feature presence information has proven to be useful in all cases, i.e. l(a) > 0 in Eq. (3). For feature embedding of discrete data, sharing parameters across different values of the same feature, i.e. Eq. (1), was also helpful in all cases. We also relied on sharing parameters across different features with the same value, i.e. Eq. (2), for datasets where the feature values shared a common meaning, i.e. gray levels for MNIST and region features for cars. For the hyperparameters (l, m) of our model, we observed that the main control on our model capacity is the embedding size m. Its selection is simple since varying this parameter consistently yields convex validation curves. The rank regularizer l needed little tuning, yielding stable validation performance for a wide range of values. 3.2 Missing Features at Train Time The setup presenting missing features at training time is relevant to applications which rely on different sources for training. Each source might not collect the exact same set of features, or might have introduced novel features during the data collection process. At test time however, the feature detector can be designed to collect the complete feature set. In this case, we compare our model to alternative solutions over the experimental setup introduced in [6]. Three datasets are considered. The first set USPS considers the task of discriminating between odd and even handwritten digits over the USPS dataset. The training set is degraded and 85% of the features are missing. The second set considers the quantum physics data from the KDD Cup 2004 in which two types of particles generated in high energy collider experiments should be distinguished. Again, the training set is degraded and 85% of the features are missing. The third set considers the problem of detecting land-mines from 4 types of sensors, each sensor provides a different set of features or views. In this case, for each instance, whole views are considered missing during training. Data statistics are summarized in Table 1 for the three sets. For this set of experiments, we rely on infinite imputations as a baseline. Infinite imputation is a general technique proposed for the case where features are missing at train time. Instead of pretraining the distribution governing the missing values with a generative objective, infinite imputations proposes to train the imputation model and the final classifier in a joint optimization framework [6]. In this context, we consider an SVM with a RBF kernel as the classifier and three alternative imputation models Mean, GMM and MeanFeat which corresponds to mean imputations in the feature space. For each experiment, we follow the validation strategy defined in the previous section for FSE. The validation strategy for tuning the parameters of the other models is described in [6]. Table 3 reports our results. FSE is the best model for the Physics and Mines dataset, and the second best model for the USPS dataset. In this case, features are highly correlated and GMM imputation yields a challenging baseline. On the other hand, Physics presents a challenging problem with higher 6 0 10 20 30 40 0 150 300 450 600 750 Error rate (%) Num. of missing features FSE Dekel & Shamir Globerson & Roweis Figure 2: Results for MNIST-miss-test (12 binary problems with features missing at test time only) error rates for all models. In this case, feature correlation is low and GMM imputation is yielding the worse performance, while our model brings a strong improvement. 3.3 Missing Features at Test Time The setup presenting missing features at test time considers applications in which the training data have been produced with more care than the test data. For example, in a face identification application, customers could provide clean photographs for training while, at test time, the system should be required to work in the presence of occlusions or saturated pixels. In this case, we compare our work to [10] and [5]. Both strategies propose to learn a classifier which avoids assigning high weight to a small subset of features, hence limiting the impact of the deletion of some features at test time. [10] formulates their strategy as a min-max problem, i.e. identifying the best classifier under the worst deletion, while [5] relies on an L∞regularizer to avoid assigning high weights to few features. We compare our algorithm to these alternatives over binary problems discriminating handwritten digits originating from MNIST. This experimental setup has been introduced in [10] and Table 1 summarizes its statistics. In this setup, the data is split into training, validation and test sets. For a fair comparison, the validation set is used solely to select hyperparameters, i.e. we do not retrain the model over both training and validation sets after hyperparameter selection. Since no features are missing at train time, we adapt our training procedure to take into account the mismatched conditions between train and test. Each time an example is considered during our stochastic training procedure, we delete a random subset of its features. The size of this subset is sampled uniformly between 0 and the total number of features minus 1. Figure 2 plots the error rate as a function of the number of missing features. FSE has a clear advantage in most settings: it achieves a lower error rate than Globerson & Roweis [10] in all cases, while it is better than Dekel & Shamir [5], as soon as the number of missing features is above 50, i.e. less than 6% missing features. In fact, we observe that FSE is very robust to feature deletion; its error rate remains below 20% for up to 700 missing features i.e. 90% missing features. On the other end, the alternative strategies report performance close to random when the number of missing features reaches 150, i.e. 20% missing features. Note that [10] and [5] further evaluate their models in an adversarial setting, i.e. features are intentionally deleted to fool the classifier, that is beyond the scope of this work. 3.4 MNIST-full experiments The previous experiments compared our model to prior approaches relying on the experimental setups introduced to evaluate these approaches. These setups proposed small training sets motivated by the training cost of the compared alternatives (see Table 1). In this section, we stress the scalability of our learning procedure and study FSE on the whole MNIST dataset with 10 classes and 60, 000 training instances. All conditions are considered: features missing at training time, at testing time, and at both times. We train 4 models which have access to training sets with various numbers of available features, i.e. 100, 200, 500 and 784 features which approximately correspond to 90, 60, 35 and 0% missing 7 Table 4: Error Rate (%) 10-class MNIST-full Experiments # train f. # test features 100 300 500 784 100 19.8 8.9 7.5 6.9 300 34.2 7.4 4.8 3.9 500 55.6 12.3 4.8 2.9 784 78.3 46.7 17.8 2.5 random 10.7 2.9 2.1 1.8 features. We train a 5th model referred to as random with the algorithm introduced in Section 3.3, i.e. all training features are available but the training procedure randomly hides some features each time it examines an example. All models are evaluated with 100, 200, 500 and 784 available features. Table 4 reports the results of these experiments. Excluding the random model, the result matrix is strongly diagonal, e.g. when facing a test problem with 300 available features, the model trained with 300 features is better than the models trained with 100, 500 or 784 features. This is not surprising as the training distribution is closer to the testing distribution in that case. We also observe that models facing less features at test time than at train time yield poor performance, while the models trained with few features yield satisfying performance when facing more features. This seems to suggest that training with missing features yields more robust models as it avoids the decision function to rely solely on few specific features that might be corrupted. In other word, training with missing features seems to achieve a similar goal as L∞regularization [5]. This observation is precisely what led us to introduce the random training procedure. In this case, the model performs better than all other models in all conditions, even when all features are present, confirming our regularization hypothesis. In fact, the results obtained with no missing features (1.8% error) are comparable to the best nonconvolutional methods, including traditional neural networks (1.6% error) [20]. Only recent work on Deep Boltzmann Machines [17] achieved significantly better performance (0.95% error). The regularization effect of missing training features could be related to noise injection techniques for regularization [21, 11]. 4 Conclusions This paper introduces Feature Set Embedding for the problem of classification with missing features. Our approach deviates from the standard classification paradigm: instead of considering examples as feature vectors, we consider examples as sets of (feature, value) pairs which handle the missing feature problem more naturally. In order to classify sets, we propose a new strategy relying on two levels of modeling. At the first level, each (feature, value) is mapped onto an embedding space. At the second level, the set of embedded vectors is compressed onto a single embedded vector over which linear classification is applied. Our training algorithm then relies on stochastic gradient ascent to jointly learn the embedding space and the final linear decision function. This proposed strategy has several advantages compared to prior work. First, sets are conceptually better suited than vectors for dealing with missing values. Second, embedding (feature, value) pairs offers a flexible framework which easily allows encoding prior knowledge about the features. Third, our experiments demonstrate the effectiveness and the scalability of our approach. From a broader perspective, the flexible feature embedding framework could go beyond the missing feature application. In particular, it allows using meta-features (attributes describing a feature) [13], e.g. the embedding vector of the temperature features in a weather prediction system could be computed from the locations of their sensors. It also enables the designing of a system in which new sensors are added without requiring full model re-training; in this case, the model could be quickly adapted by only updating embedding vectors corresponding to the new sensors. Also, our approach of relying on feature sets offers interesting opportunities for feature selection and adversarial feature deletion. We plan to study these aspects in the future. Acknowledgments The authors are grateful to Gal Chechik and Uwe Dick for sharing their data and experimental setups. 8 References [1] G. Batista and M. Monard. A study of k-nearest neighbour as an imputation method. In Hybrid Intelligent Systems (HIS), pages 251–260, 2002. [2] C. Bhattacharyya, P. K. Shivaswamy, and A. Smola. A second order cone programming formulation for classifying missing data. In Neural Information Processing Systems (NIPS), pages 153–160, 2005. [3] S. Boughhorbel, J-P. Tarel, and F. Fleuret. Non-mercer kernels for svm object recognition. In British Machine Vision Conference (BMVC), 2004. [4] G. Chechik, G. Heitz, G. Elidan, P. Abbeel, and D. Koller. Max margin classification of data with absent features. Journal of Machine Learning Research (JMLR), 9:1–21, 2008. [5] O. Dekel, O. Shamir, and L. Xiao. Learning to classify with missing and corrupted features. Machine Learning Journal, 2010 (to appear). [6] U. Dick, P. Haider, and T. Scheffer. Learning from incomplete data with infinite imputations. In International Conference on Machine Learning (ICML), 2008. [7] G. Elidan, G. Heitz, and D. Koller. Learning object shape: From drawings to images. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 2064–2071, 2006. [8] Y. M. Ermoliev and V. I. Norkin. Stochastic generalized gradient method with application to insurance risk management. Technical Report 21, International Institute for Applied Systems Analysis, 1997. [9] Z. Ghahramani and M. I. Jordan. Supervised learning from incomplete data via an em approach. In Neural Information Processing Systems (NIPS), pages 120–127, 1993. [10] A. Globerson and S. Roweis. Nightmare at test time: robust learning by feature deletion. In International Conference on Machine Learning (ICML), pages 353–360, 2006. [11] Y. Grandvalet, S. Canu, and S. Boucheron. Noise injection: Theoretical prospects. Neural Computation, 9(5):1093–1108, 1997. [12] R. Kondor and T. Jebara. A kernel between sets of vectors. In International Conference on Machine Learning (ICML), 2003. [13] E. Krupka, A. Navot, and N. Tishby. Learning to select features using their properties. Journal of Machine Learning Research (JMLR), 9:2349–2376, 2008. [14] Y. LeCun, L. Bottou, G. B. Orr, and K. R. Mueller. Efficient backprop. In G. B Orr and K. R. Mueller, editors, Neural Networks: Tricks of the Trade, chapter 1, pages 9–50. Springer, 1998. [15] X. Liao, H. Li, and L. Carin. Quadratically gated mixture of experts for incomplete data classification. In International Conference on Machine Learning (ICML), pages 553–560, 2007. [16] S. Rosset, J. Zhu, and T. Hastie. Margin maximizing loss functions. In Neural Information Processing Systems (NIPS), 2003. [17] R. Salakhutdinov and H. Larochelle. Efficient learning of deep Boltzmann machines. In Artificial Intelligence and Statistics (AISTATS), 2010. [18] J.L. Schafer. Analysis of Incomplete Multivariate Data. Chapman & Hall, London, UK, 1998. [19] N.Z. Shor. Minimization Methods for Non-Differentiable Functions and Applications. Springer, Berlin, Germany, 1985. [20] P. Simard, D. Steinkraus, and J.C. Platt. Best practices for convolutional neural networks applied to visual document analysis. In International Conference on Document Analysis and Recognition (ICDAR), pages 958–962, 2003. [21] P. Vincent, H. Larochelle, Y. Bengio, and P.A. Manzagol. Extracting and composing robust features with denoising autoencoders. In International Conference on Machine Learning (ICML), pages 1096–1103, 2008. [22] D. Williams, X. Liao, Y. Xue, and L. Carin. Incomplete-data classification using logistic regression. In International Conference on Machine Learning (ICML), pages 972–979, 2005. 9
2010
116
3,873
Decontaminating Human Judgments by Removing Sequential Dependencies Michael C. Mozer,⋆Harold Pashler,† Matthew Wilder,⋆ Robert V. Lindsey,⋆Matt C. Jones,◦& Michael N. Jones‡ ⋆Dept. of Computer Science, University of Colorado †Dept. of Psychology, UCSD ◦Dept. of Psychology, University of Colorado ‡Dept. of Psychological and Brain Sciences, Indiana University Abstract For over half a century, psychologists have been struck by how poor people are at expressing their internal sensations, impressions, and evaluations via rating scales. When individuals make judgments, they are incapable of using an absolute rating scale, and instead rely on reference points from recent experience. This relativity of judgment limits the usefulness of responses provided by individuals to surveys, questionnaires, and evaluation forms. Fortunately, the cognitive processes that transform internal states to responses are not simply noisy, but rather are influenced by recent experience in a lawful manner. We explore techniques to remove sequential dependencies, and thereby decontaminate a series of ratings to obtain more meaningful human judgments. In our formulation, decontamination is fundamentally a problem of inferring latent states (internal sensations) which, because of the relativity of judgment, have temporal dependencies. We propose a decontamination solution using a conditional random field with constraints motivated by psychological theories of relative judgment. Our exploration of decontamination models is supported by two experiments we conducted to obtain ground-truth rating data on a simple length estimation task. Our decontamination techniques yield an over 20% reduction in the error of human judgments. 1 Introduction Suppose you are asked to make a series of moral judgments by rating, on a 1–10 scale, various actions, with a rating of 1 indicating ’not particularly bad or wrong’ and a rating of 10 indicating ’extremely evil.’ Consider the series of actions on the left. (1) Stealing a towel from a hotel (1′) Testifying falsely for pay (2) Keeping a dime you find on the ground (2′) Using guns on striking workers (3) Poisoning a barking dog (3′) Poisoning a barking dog Now consider that instead you had been shown the series on the right. Even though individuals are asked to make absolute judgments, the mean rating of statement (3) in the first context is reliably higher than the mean rating of the identical statement (3′) in the second context (Parducci, 1968). The classic explanation of this phenomenon is cast in terms of anchoring or primacy: information presented early in time serves as a basis for making judgments later in time (Tversky & Kahneman, 1974). In the Netflix contest, significant attention was paid to anchoring effects by considering that an individual who gives high ratings early in a session is likely to be biased toward higher ratings later in a session (Koren, August 2009; Ellenberg, March 2008). The need for anchors comes from the fact that individuals are poor at or incapable of making absolute judgments and instead must rely on reference points to make relative judgments (e.g., Laming, 1984; Parducci, 1965, 1968; Stewart, Brown, & Chater, 2005). Where do these reference points come from? There is a rich literature in experimental and theoretical psychology exploring sequential 1 dependencies suggesting that reference points change from one trial to the next in a systematic manner. (We use the psychological jargon ‘trial’ to refer to a single judgment or rating in a series.) Sequential dependencies occur in many common tasks in which an individual is asked to make a series of responses, such as filling out surveys, questionnaires, and evaluations (e.g., usability ratings, pain assessment inventories). Every faculty member is aware of drift in grading that necessitates comparing papers graded early on a stack with those graded later. Recency effects have been demonstrated in domains as varied as legal reasoning and jury evidence interpretation (Furnham, 1986; Hogarth & Einhorn, 1992) and clinical assessments (Mumma & Wilson, 2006). However, the most carefully controlled laboratory studies of sequential dependencies, dating back to the the 1950’s (discussed by Miller, 1956), involve the rating of unidimensional stimuli, such as the loudness of a tone or the length of a line. Human performance at rating stimuli is surprisingly poor compared to an individual’s ability to discriminate the same stimuli. Regardless of the domain, responses convey not much more than 2 bits of mutual information with the stimulus (Stewart et al., 2005). Different types of judgment tasks have been studied including absolute identification, in which the individual’s task is to specify the distinct stimulus level (e.g., 10 levels of loudness), magnitude estimation, in which the task is to estimate the magnitude of a stimulus which may vary continuously along a dimension, and categorization which is a hybrid task requiring individuals to label stimuli by range. Because the number of responses in absolute identification and categorization tasks is often quite large, and because individuals are often not aware of the discreteness of stimuli in absolute identification tasks, there isn’t a qualitative difference among tasks. Feedback is typically provided, especially in absolute identification and categorization tasks. Without feedback, there are no explicit anchors against which stimuli can be assessed. The pattern of sequential effects observed is complex. Typically, experimental trial t, trial t−1 has a large influence on ratings, and trials t −2, t −3, etc., have successively diminishing influences. The influence of recent trials is exerted by both the stimuli and responses, a fact which makes sense in light of the assumption that individuals form their response on the current trial by analogy to recent trials (i.e., they determine a response to the current stimulus that has the same relationship as the previous response had to the previous stimulus). Both assimilation and contrast effects occur: an assimilative response on trial t occurs when the response moves in the direction of the stimulus or response on trial t −k; a contrastive response is one that moves away. Interpreting recency effects in terms of assimilation and contrast is nontrivial and theory dependent (DeCarlo & Cross, 1990). Many mathematical models have been developed to explain the phenomena of sequential effects in judgment tasks. All adopt the assumption that the transduction of a stimulus to its internal representation is veridical. We refer to this internal representation as the sensation, as distinguished from the external stimulus. (For judgments of nonphysical quantities such as emotional states and affinities, perhaps the terms impression or evaluation would be more appropriate than sensation.) Sequential dependencies and other corruptions of the representation occur in the mapping of the sensation to a response. According to all theories, this mapping requires reference to previous sensation-response pairings. However, the theories differ with respect to the reference set. At one extreme, the theory of Stewart et al. (2005) assumes that only the previous sensation-response pair matters. Other theories assume that multiple sensation-response anchors are required, one fixed and unchanging and another varying from trial to trial (e.g., DeCarlo & Cross, 1990). And in categorization and absolute identification tasks, some theories posit anchors for each distinct response, which are adjusted trial-to-trial (e.g., Petrov & Anderson, 2005). Range-frequency theory (Parducci, 1965) claims that sequential effects arise because the sensation-response mapping is adjusted to utilize the full response range, and to produce roughly an equal number of responses of each type. This effect is the consequence of many other theories, either explicitly or implicitly. Because recent history interacts with the current stimulus to determine an individual’s response, responses have a complex relationship with the underlying sensation, and do not provide as much information about the internal state of the individual as one would hope. In the applied psychology literature, awareness of sequential dependencies has led some researchers to explore strategies that mitigate relativity of judgment, such as increasing the number of response categories and varying the type and frequency of anchors (Mumma & Wilson, 2006; Wedell, Parducci, & Lane, 1990). In contrast, our approach to extracting more information from human judgments is to develop automatic techniques that recover the underlying sensation from a response that has been contaminated 2 by cognitive processes producing the response. We term this recovery process decontamination. As we mentioned earlier, there is some precedent in the Netflix competition for developing empirical approaches to decontamination. However, to the best of our knowledge, the competitors were not focused on trial-to-trial effects, and their investigation was not systematic. Systematic investigation requires ground truth knowledge of the individuals’ sensations. 2 Experiments To collect ground-truth data for use in the design of decontamination techniques, we conducted two behavioral experiments using stimuli whose magnitudes could be objectively determined. In both experiments, participants were asked to judge the horizontal gap between two vertically aligned dots on a computer monitor. The position of the dots on the monitor shifted randomly from trial to trial. Participants were asked to respond to each dot pair using a 10-point rating scale, with 1 corresponding to the smallest gap they would see, and 10 corresponding to the largest. The task requires absolute identification of 10 distinct gaps. The participants were only told that their task was to judge the distance between the dots. They were not told that only 10 unique stimuli were presented, and were likely unaware of this fact (memory of exact absolute gaps is too poor), and thus the task is indistinguishable from a magnitude estimation or categorization task in which the gap varied continuously. The experiment began with a practice block of ten trials. During the practice block, participants were shown every one of the ten gaps in random order, and simultaneous with the stimulus they were told—via text on the screen below the dots—the correct classification. After the practice blocks, no further feedback was provided. Although the psychology literature is replete with line-length judgment studies (two recent examples: Lacouture, 1997; Petrov & Anderson, 2005), the vast majority provide feedback to participants on at least some trials beyond the practice block. We wanted to avoid the anchoring provided by feedback in order that the task is more analogous to the the type of survey tasks we wish to decontaminate, e.g., the Netflix movie scores. Another distinction between our experiments and previous experiments is an attempt to carefully control the sequence structure, as described next. 2.1 Experiment Methodology In Experiment 1, the practice block was followed by 2 blocks of 90 trials. Within a block, the trial sequence was arranged such that each gap was preceded exactly once by each other gap, with the exception that no repetitions occurred. Further, every ten trials in a block consisted of exactly one presentation of each gap. In Experiment 2, the practice block was followed by 2 blocks of 100 trials. The constraint on the sequence in Experiment 2 was looser than in Experiment 1: within a block, each gap occurred exactly once preceded by each other gap. However, repetitions were included, and there was no constraint on the subblocks of ten trials. The other key difference between experiments was the gap lengths. In Experiment 1, gap g, with g ∈{1, 2, ...10} spanned a proportion .08g of the screen width. In Experiment 2, gap g spanned a proportion .061 + .089g of the screen width. The main reason for conducting Experiment 2 was that we found the gaps used in Experiment 1 resulted in low error rates and few sequential effects for the smaller gaps. Other motivations for Experiment 2 will be explained later. Both experiments were conducted via the web, using a web portal set up for psychology studies. Participants were prescreened for their ability to understand English instructions, and were paid $4 for the 10–15 minutes required to complete the experiment. Two participants in Experiment 1 and one participant in Experiment 2 were excluded from data analysis because their accuracy was below 20%. The portal was opened for long enough to obtain good data from 76 participants in each Experiment. Individuals were allowed to participate in only one of the two experiments. 2.2 Results and Discussion of Human Experiments Figure 1 summarizes the data from Experiments 1 and 2 (top and bottom rows, respectively). All graphs depict the error on a trial, defined as the signed difference Rt −St between the current response, Rt, and the current stimulus level St. The left column plots the error on trial t as a function of St−1 (along the abscissa) and St (the different colored lines, as specified by the key between the graphs). Pairs of stimulus gaps (e.g., G1 and G2) have been grouped together to simplify the graph. 3 G1,G2 G3,G4 G5,G6 G7,G8 G9,G10 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 Experiment 1 R(t) − S(t) S(t−1) error as a function of S(t−1) and S(t) 1 2 3 4 5 −0.6 −0.5 −0.4 −0.3 −0.2 −0.1 lag R(t)−S(t) error as a function of lagged stimulus −9−8−7−6−5−4−3−2−1 0 1 2 3 4 5 6 7 8 9 0 0.2 0.4 0.6 0.8 1 S(t)−S(t−1) P(R(t)−S(t)) error as a function of stimulus difference G1,G2 G3,G4 G5,G6 G7,G8 G9,G10 −1 −0.5 0 0.5 Experiment 2 R(t) − S(t) S(t−1) 1 2 3 4 5 −0.3 −0.2 −0.1 0 0.1 0.2 lag R(t)−S(t) −9−8−7−6−5−4−3−2−1 0 1 2 3 4 5 6 7 8 9 0 0.2 0.4 0.6 0.8 1 S(t)−S(t−1) P(R(t)−S(t)) G1,G2 G3,G4 G5,G6 G7,G8 G9,G10 G1,G2 G3,G4 G5,G6 G7,G8 G9,G10 < −1 −1 0 1 >1 Figure 1: Human data from Experiments 1 (top row) and 2 (bottom row). The small bars around the point indicate one standard error of the mean. The variation along the abscissa reflects sequential dependencies: assimilation is indicated by pairs of points with positive slopes (larger values of St−1 result in larger Rt), and contrast is indicated by negative slopes. The pattern of results across the two experiments is remarkably consistent. The middle column shows another depiction of sequential dependencies by characterizing the distribution of errors (Rt −St ∈{> 1, 1, 0, −1, < −1}) as a function of St −St−1. The predominance of assimilative responses is reflected in more Rt > St responses when St −St−1 < 0, and vice-versa. The rightmost column presents the lag profile that characterizes how the stimulus on trial t −k for k = 1...5 influences the response on trial t. The bars on each point indicate one standard error of the mean. For the purpose of the current work, most relevant is that sequential dependencies in this task may stretch back two or three trials. 3 Approaches To Decontamination From a machine learning perspective, decontamination can be formulated in at least three different ways. First, it could be considered an unsupervised infomax problem of determining a sensation associated with each distinct stimulus such that the sensation sequence has high mutual information with the response sequence. Second, it could be considered a supervised learning problem in which a specialized model is constructed for each individual, using some minimal amount of ground-truth data collected from that individual. Here, the ground truth is the stimulus-sensation correspondence, which can be obtained—in principle, even with unknown stimuli—by laborious data collection techniques, such as asking individuals to provide a full preference ordering or multiple partial orderings over sets of stimuli, or asking individuals to provide multiple ratings of a stimulus in many different contexts, so as to average out sequential effects. Third, decontamination models could be built based on ground-truth data for one group of individuals and then tested on another group. In this paper, we adopt this third formulation of the problem. Formally, the decontamination problem involves inferring the sequence of (unobserved) sensations given the complete response sequence. To introduce some notation, let Rp t1,t2 denote the sequence of responses made by participant p on trials t1 through t2 when shown a sequence of stimuli that 4 evoke the sensation sequence Sp t1,t2.1 Decontamination can be cast as computing the expectation or probability over Sp 1,T given Rp 1,T , where T is the total number of judgments made by the individual. Although psychological theories of human judgment address an altogether different problem—that of predicting Rp t , the response on trial t, given Sp 1,t and Rp 1,t−1—they can inspire decontamination techniques. Two classes of psychological theories correspond to two distinct function approximation techniques. Many early models of sequential dependencies, culminating in the work of DeCarlo and Cross (1990), are framed in terms of autoregression. In contrast, other models favor highly flexible, nonlinear approaches that allow for similarity-based assimilation and contrast, and independent representations for each response label (e.g., Petrov & Anderson, 2005). Given the discrete stimuli and responses, a lookup table seems the most general characterization of these models. We explore a two-dimensional space of decontamination techniques. The first dimension of this space is the model class: regression, lookup table, or an additive hybrid. We define our regression model estimating St as: REGt(m, n) = α + β · Rt−m+1,t + γ · St−n,t−1, (1) where the model parameters β and γ are vectors, and α is a scalar. Similarly, we define our lookup table LUTt(m, n) to produce an estimate of St by indexing over the m responses Rt−m+1,t and the n sensations St−n,t−1. Finally, we define an additive hybrid, REG⊕LUT(m, n) by first constructing a regression model, and then building a lookup table on the residual error, St −REGt(m, n). The motivation for the hybrid is the complementarity of the two models, the regression model capturing linear regularities and the lookup table representing arbitrary nonlinear relationships. The second dimension in our space of decontamination techniques specifies how inference is handled. Decontamination is fundamentally a problem of inferring unobserved states. To utilize any of the models above for n > 0, sensations St−n,t−1 must be estimated. Although time flows in one direction, inference flows in two: in psychological models, Rt is influenced by both St and St−1; this translates to a dependence of St on both St−1 and St+1 when conditioned on R1,T . To handle inference properly, we construct a linear-chain conditional random field (Lafferty, McCallum, & Pereira, 2001; Sutton & McCallum, 2007). As an alternative to the conditional random field (hereafter, CRF), we also consider a simple approach in which we simply set n = 0 and discard the sensation terms in our regression and lookup tables. At the other extreme, we can assume an oracle that provides St−n,t−1; this oracle approach offers an upper bound on achievable performance. We explore the full Cartesian product of approaches consisting of models chosen from {REG, LUT, REG⊕LUT} and inference techniques chosen from {SIMPLE, CRF, ORACLE}. The SIMPLE and ORACLE approaches are straightforward classic statistics, but we need to explain how the different models are incorporated into a CRF. The linear-chain CRF is a distribution P(S1,T |R1,T ) = 1 Z(R1,T ) exp ( T X t=1 K X k=1 λkfk(t, St−1,t, R1,T ) ) (2) with a given set of feature functions, {fk}. The linear combination of these functions determines the potential at some time t, denoted Φt, where a higher potential reflects a more likely configuration of variables. To implement a CRF-REG model, we would like the potential to be high when the regression equation is satisfied, e.g., Φt = −(REGt(m, n) −St)2. Simply expanding this error yields a collection of first and second order terms. Folding the terms not involving the sensations into the normalization constant, the following terms remain for REG(2, 1): St, RtSt, S2 t , RtSt−1, Rt−1St, and StSt−1.2 The regression potential function can be obtained by making each of these terms into a real-valued feature, and determining the λ parameters in Equation 2 to yield the α, β, and γ parameters in Equation 1.3 The CRF-LUT model could be implemented using indicator features, as is common in CRF models, but this approach yields an explosion of free parameters: a feature would be required for each cell of 1We are switching terminology: in the discussion of our experiment, S refers to the stimulus. In the discussion of decontamination, S will refer to the sensation. The difference is minor because the stimulus and sensation are in one-to-one correspondence. 2The terms Rt−1St−1 and S2 t−1 are omitted because they correspond to RtSt and S2 t , respectively. 3As we explain shortly, the {λk} are determined by CRF training; our point here is that the CRF has the capacity to represent a least-squares regression solution. 5 the table and each value of St, yielding 104 free parameters for a gap detection task with a modest CRF-LUT(2, 1). Instead, we opted for the direct analog of the CRF-REG: encouraging configurations in which St is consistent with LUTt(m, n) via potential Φt = −(LUTt(m, n) −St)2. This approach yields three real-valued features: LUTt(m, n)2, St 2, and LUTt(m, n)St. (Remember that lookup table values are indexed by St−1, and therefore cannot be folded into the normalization constant.) Finally, the CRF-REG⊕LUT is a straightforward extension of the models we’ve described, based on the potential Φt = −(REGt(m, n) + LUTt(m, n) −St)2, which still has only quadratic terms in Stand St−1. Having now described a 3 × 3 space of decontamination approaches, we turn to the details of our decontamination experiments. 3.1 Debiasing and Decompressing Although our focus is on decontaminating sequential dependencies, or desequencing, the quality of human judgments can be reduced by at least three other factors. First, individuals may have an overall bias toward smaller or larger ratings. Second, individuals may show compression, possibly nonlinear, of the response range. Third, there may be slow drift in the center or spread of the response range, on a relatively long time scale. All of these factors are likely to be caused at least in part by trial-to-trial sequential effects. For example, compression will be a natural consequence of assimilation because the endpoints of the response scale will move toward the center. Nonetheless we find it useful to tease apart the factors that are easy to describe (bias, compression) from those that are more subtle (assimilation, contrast). In the data from our two experiments, we found no evidence of drift, as determined by the fact that regression models with moving averages of the responses did not improve predictions. This finding is not terribly surprising given that the entire experiment took only 10–15 minutes to complete. We briefly describe how we remove bias and compression from our data. Decompression can be achieved with a LUT(1, 0), which maps each response into the expected sensation. For example, in Experiment 1, the shortest stimuli reported as G1 and G2 with high accuracy, but the longest stimuli tended to be underestimated by all participants. The LUT(1, 0) compensates for this compression by associating responses G8 and G9 with higher sensation levels if the table entries are filled based on the training data according to: LUTt(1, 0) ≡E[St|Rt]. All of the higher order lookup tables, LUT(m, n), for m ≥1 and n ≥0, will also perform nonlinear decompression in the same manner. The REG models alone will also achieve decompression, though only linear decompression. We found ample evidence of individual biases in the use of the response scale. To debias the data, we compute the mean response of a particular participant p, ¯Rp ≡1/T P Rp t , and ensure the means are homogeneous via the constraint Rp t −¯Rp = Sp t −¯Sp. Assuming that the mean sensation is identical for all participants—as it should be in our experiments—debiasing can be incorporated into the lookup tables by storing not E[St|Rt...], but rather E[Sp t + ¯Rp|Rt...], and recovering the sensation for a particular individual using LUT(m, n) −¯Rp. (This trick is necessary to index into the lookup table with discrete response levels. Simply normalizing individuals’ responses will yield noninteger responses.) Debiasing of the regression models can be achieved by adding a ¯Rp term to the regression. Note that this extra term—whether in the lookup table retrieval or the regression— results in additional features involving combinations of ¯Rp and St, St−1, and LUT(m, n) being added to the three CRF models. 3.2 Modeling Methodology In all the results we report on, we use a one-back response history, i.e., m = 2. Therefore, the SIMPLE models are REG(2, 0), LUT(2, 0), and REG⊕LUT(2, 0), the ORACLE and CRF models are REG(2, 1), LUT(2, 1), and REG⊕LUT(2, 1). In the ORACLE models, St−1 is assumed to be known when St is estimated; in the CRF models, the sensations are all inferred. The models are trained via multiple splits of the available data into equal-sized training and test sets (38 participants per set). Parameters of the SIMPLE-REG and ORACLE-REG models are determined by least-squares regression on the training set. Entries in the SIMPLE-LUT and ORACLE-LUT are the expectation over trials and participants: E[Sp t + ¯Rp|Rt, Rt−1, ...]. The SIMPLE-REG⊕LUT and ORACLE-REG⊕LUT models are trained first by obtaining the regression coefficients, and then filling lookup table entries with the expected residual, E[Sp t −REGp t |Rt, Rt−1, ...]. For the CRF models, the feature coefficients {λk} are obtained via gradient descent and the forward-backward algorithm, as detailed in Sutton 6 0.88 0.9 0.92 0.94 ORACLE−REG⊕LUT(2,1) CRF−REG⊕LUT(2,1) SIMPLE−REG⊕LUT(2,0) ORACLE−LUT(2,1) CRF−LUT(2,1) SIMPLE−LUT(2,0) ORACLE−REG(2,1) CRF−REG(2,1) SIMPLE−REG(2,0) sensation reconstruction error (RMSE) p < .001 p < .001 p < .05 0.9 0.95 1 1.05 1.1 1.15 Experiment 1 CRF−REG⊕LUT(2,1) debias + decompress debias decompress baseline sensation reconstruction error (RMSE) 0.95 0.96 0.97 0.98 0.99 1 ORACLE−REG⊕LUT(2,1) CRF−REG⊕LUT(2,1) SIMPLE−REG⊕LUT(2,0) ORACLE−LUT(2,1) CRF−LUT(2,1) SIMPLE−LUT(2,0) ORACLE−REG(2,1) CRF−REG(2,1) SIMPLE−REG(2,0) sensation reconstruction error (RMSE) p < .001 p < .001 p < .001 1 1.05 1.1 1.15 Experiment 2 CRF−REG⊕LUT(2,1) debias + decompress debias decompress baseline sensation reconstruction error (RMSE) Figure 2: Results from Experiment 1 (left column) and Experiment 2 (right column). The top row compares the reduction in prediction error for different types of decontamination. The bottom row compares reduction in prediction error for different desequencer algorithms. and McCallum (2007). The lookup tables used in the CRF-LUT and CRF-REG⊕LUT are the same as those in the ORACLE-LUT and ORACLE-REG⊕LUT models. The CRF λ parameters are initialized to be consistent with our notion of the potential as the negative squared error, using initialization values obtained from the regression coefficients of the ORACLE-REG model. This initialization is extremely useful because it places the parameters in easy reach of an effective local minimum. No regularization is used on the CRF because of the small number of free parameters (7 for CRF-REG, 5 for CRF-LUT, and 14 for CRF-REG⊕LUT). Each model is used to determine the expected value of St. We had initially hoped that a Viterbi decoding of the CRF might yield useful predictions, but the expectation proved far superior, most likely because there is not a single path through the CRF that is significantly better than others due to high level of noise in the data. Beyond the primary set of models described above, we explored several other models. We tested models in which the sensation and/or response values are log transformed, because sensory transduction introduces logarithmic compression. However, these models do not reliably improve decontamination. We examined higher-order regression models, i.e., m > 2. These models are helpful for Experiment 1, but only because we inadvertently introduced structure into the sequences via the constraint that each stimulus had to be presented once before it could be repeated. The consequence of this constraint is that a series of small gaps predicted a larger gap on the next trial, and viceversa. One reason for conducting Experiment 2 was to eliminate this constraint. It also eliminated the benefit of higher-order regression models. We also examined switched regression models whose parameters were contingent on the current response. These models do not significantly outperform the REG⊕LUT models. 4 Results Figure 2 shows the root mean squared error (RMSE) between the ground-truth sensation and the model-estimated sensation over the set of validation subjects for 100 different splits of the data. The left and right columns present results for Experiments 1 and 2, respectively. In the top row of the figure, we compare baseline performance with no decontamination—where the sensation prediction is simply the participant’s actual response (pink bar)—against decompression alone (magenta bar), debiasing alone (red bar), debiasing and decompression (purple bar), and the best full decontamination model, which includes debiasing, decompression, and desequencing (blue bar). The difference between each pair of these results is highly reliable, indicating that bias, compression, and recency effects all contribute to the contamination of human judgments. 7 The reduction of error due to debiasing is 14.8% and 11.1% in Experiments 1 and 2, respectively. The further reduction in error when decompressing is incorporated is 4.8% and 3.4% in Experiments 1 and 2. Finally, the further reduction in error when desequencing is incorporated is 5.0% and 4.1% in Experiments 1 and 2. We reiterate that bias and compression likely have at least part of their basis in sequential dependencies. Indeed models like CRF-REG⊕LUT perform nearly as well even without separate debiasing and decompression corrections. The bottom row of Figure 2 examines the relative performance of the nine models defined by the Cartesian product of model type (REG, LUT and REG⊕LUT) and inference type (SIMPLE, CRF, and ORACLE). The joint model REG⊕LUT that exploits both the regularity of the regression model and the flexibility of the lookup table clearly works better than either REG or LUT in isolation. Comparing SIMPLE, which ignores the mutual constraints provided by the inferred sensations, to to CRF, which exploits bidirectional temporal constraints, we see that the CRF inference produces reliably better results in five of six cases, as evaluated by paired t-tests. We do not have a good explanation for the advantage of SIMPLE-LUT over CRF-LUT in Experiment 1, although there are some minor differences in how the lookup tables for the two models are constructed, and we are investigating whether those differences might be responsible. We included the ORACLE models to give us a sense of how much improvement we might potentially obtain, and clearly there is still some potential gain as indicated by ORACLE-REG⊕LUT. 5 Discussion Psychologists have long been struck by the relativity of human judgments and have noted that relativity limits how well individuals can communicate their internal sensations, impressions, and evaluations via rating scales. We’ve shown that decontamination techniques can improve the quality of judgments, reducing error by over 20% Is a 20% reduction significant? In the Netflix competition, if this improvement in the reliability of the available ratings translated to a comparable improvement in the collaborative filtering predictions, it would have been of critical significance. In this paper, we explored a fairly mundane domain: estimating the gap between pairs of dots on a computer monitor. The advantage of starting our explorations in this domain is that it provided us with ground truth data for training and evaluation of models. Will our conclusions about this sensory domain generalize to more subjective and emotional domains such as movies and art? We are currently designing a study in which we will collect liking judgments for paintings. Using the models we developed for this study, we can obtain a decontamination of the ratings and identify pairs of paintings where the participant’s ratings conflict with the decontaminated impressions. Via a later session in which we ask participants for pairwise preferences, we can determine whether the decontaminator or the raw ratings are more reliable. We have reason for optimism because all evidence in the psychological literature suggests that corruption occurs in the mapping of internal states to responses, and there’s no reason to suspect that the mapping is different for different types of sensations. Indeed, it seems that if even responses to simple visual stimuli are contaminated, responses to more complex stimuli with a more complex judgment task will be even more vulnerable. One key limitation of the present work is that it examines unidimensional stimuli, and any interesting domain will involve multidimensional stimuli, such as movies, that could be rated in many different ways depending on the current focus of the evaluator. Anchoring likely determines relevant dimensions as well as the reference points along those dimensions, and it may require a separate analysis to decontaminate this type of anchor. On the positive side, the domain is ripe for further explorations, and our work suggests many directions for future development. For instance, one might better leverage the CRF’s ability to predict not just the expected sensation, but the distribution over sensations. Alternatively, one might pay closer attention to the details of psychological theory in the hope that it provides helpful constraints. One such hint is the finding that systematic effects of sequences have been observed on response latencies in judgment tasks (Lacouture, 1997); therefore, latencies may prove useful for decontamination. A Wired Magazine article on the Netflix competition was entitled, “This psychologist might outsmart the math brains competing for the Netflix prize” (Ellenberg, March 2008). This provocative title didn’t turn out to be true, but the title did suggest—consistent with the findings of our research— that the math brains may do well to look inward at the mechanisms of their own brains. 8 Acknowledgments This research was supported by NSF grants BCS-0339103, BCS-720375, and SBE-0518699. The fourth author was supported by an NSF Graduate Student Fellowship. We thank Owen Lewis for conducting initial investigations and discussions that allowed us to better understand the various cognitive models, and Dr. Dan Crumly for the lifesaving advice on numerical optimization techniques. References DeCarlo, L. T., & Cross, D. V. (1990). Sequential effects in magnitude scaling: Models and theory. Journal of Experimental Psychology: General, 119, 375–396. Ellenberg, J. (March 2008). This psychologist might outsmart the math brains competing for the netflix prize. Wired Magazine, 16. (http://www.wired.com/techbiz/media/magazine/1603/mf netflix?currentPage=all#) Furnham, A. (1986). The robustness of the recency effect: Studies using legal evidence. Journal of General Psychology, 113, 351–357. Hogarth, R. M., & Einhorn, H. J. (1992). Order effects in belief updating: The belief adjustment model. Cognitive Psychology, 24, 1–55. Koren, Y. (August 2009). The bellkor solution to the netflix grand prize. Lacouture, Y. (1997). Bow, range, and sequential effects in absolute identification: A response-time analysis. Psychological Research, 60, 121-133. Lafferty, J., McCallum, A., & Pereira, F. (2001). Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In International conference on machine learning (pp. 282–289). San Mateo, CA: Morgan Kaufmann. Laming, D. R. J. (1984). The relativity of “absolute” judgements. Journal of Mathematical and Statistical Psychology, 37, 152–183. Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for information processing. Psychological Review, 63, 81–97. Mumma, G. H., & Wilson, S. B. (2006). Procedural debiasing of primacy/anchoring effects in clinical-like judgments. Journal of Clinical Psychology, 51, 841–853. Parducci, A. (1965). Category judgment: A range-frequency model. Psychological Review, 72, 407–418. Parducci, A. (1968). The relativism of absolute judgment. Scientific American, 219, 84–90. Petrov, A. A., & Anderson, J. R. (2005). The dynamics of scaling: A memory-based anchor model of category rating and identification. Psychological Review, 112, 383–416. Stewart, N., Brown, G. D. A., & Chater, N. (2005). Absolute identification by relative judgment. Psychological Review, 112, 881–911. Sutton, C., & McCallum, A. (2007). An introduction to conditional random fields for relational learning. In L. Getoor & B. Taskar (Eds.), Introduction to statistical relational learning. Cambridge, MA: MIT Press. Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185, 1124–1131. Wedell, D. H., Parducci, A., & Lane, M. (1990). Reducing the dependence of clinical judgment on the immediate context: Effects of number of categories and type of anchors. Journal of Personality and Social Psychology, 58, 319–329. 9
2010
117
3,874
Scrambled Objects for Least-Squares Regression Odalric-Ambrym Maillard and R´emi Munos SequeL Project, INRIA Lille - Nord Europe, France {odalric.maillard, remi.munos}@inria.fr Abstract We consider least-squares regression using a randomly generated subspace GP ⊂ F of finite dimension P, where F is a function space of infinite dimension, e.g. L2([0, 1]d). GP is defined as the span of P random features that are linear combinations of the basis functions of F weighted by random Gaussian i.i.d. coefficients. In particular, we consider multi-resolution random combinations at all scales of a given mother function, such as a hat function or a wavelet. In this latter case, the resulting Gaussian objects are called scrambled wavelets and we show that they enable to approximate functions in Sobolev spaces Hs([0, 1]d). As a result, given N data, the least-squares estimate bg built from P scrambled wavelets has excess risk ||f ∗−bg||2 P = O(||f ∗||2 Hs([0,1]d)(log N)/P + P(log N)/N) for target functions f ∗∈Hs([0, 1]d) of smoothness order s > d/2. An interesting aspect of the resulting bounds is that they do not depend on the distribution P from which the data are generated, which is important in a statistical regression setting considered here. Randomization enables to adapt to any possible distribution. We conclude by describing an efficient numerical implementation using lazy expansions with numerical complexity ˜O(2dN 3/2 log N + N 2), where d is the dimension of the input space. 1 Introduction We consider ordinary least-squares regression using randomly generated feature spaces. Let us first describe the general regression problem: we observe data DN = ({xn, yn}1≤n≤N) (with xn ∈X a compact subset of Rd, and yn ∈R), assumed to be independently and identically distributed (i.i.d.) with xn ∼P and yn = f ∗(xn) + ηn, where f ∗is the (unknown) target function, such that ||f ∗||∞≤L, and ηn is a centered, independent noise of variance bounded by σ2. We assume that L and σ are known. Now, for a given class of functions F, and f ∈F, we define the empirical ℓ2-error LN(f) def = 1 N N X n=1 [yn −f(xn)]2, and the generalization error L(f) def = EX,Y [(Y −f(X))2]. The goal is to return a regression function bf ∈F with lowest possible generalization error L( bf). The excess risk L( bf)−L(f ∗) = ||f ∗−bf||P (where ||g||2 P = EX∼P[g(X)2]) measures the closeness to optimality. In this paper we consider infinite dimensional spaces F that are generated by a denumerable family of functions {ϕi}i≥1, called initial features (such as wavelets). We will assume that f ∗∈F. 1 Since F is an infinite dimensional space, the empirical risk minimizer in F is certainly subject to overfitting. Traditional methods to circumvent this problem have considered penalization, i.e. one searches for a function in F which minimizes the empirical error plus a penalty term, for example bf = arg minf∈F LN(f) + λ||f||p p for p = 1 or 2, where λ is a parameter and usual choices for the norm are ℓ2 (ridge-regression [17]) and ℓ1 (LASSO [16]). In this paper we follow an alternative approach introduced in [10], called Compressed Least Squares Regression, which considers generating randomly a subspace GP (of finite dimension P) of F, and then returning the empirical risk minimizer in GP , i.e. arg ming∈GP LN(g). This previous work considered the case when F is of finite dimension. Here we consider specific cases of infinite dimensional spaces F and provide a characterization of the resulting approximation spaces. 2 Regression with random spaces Let us briefly recall the method described in [10] and extend it to the case of infinite dimensional spaces F. In this paper we assume that the set of features (ϕi)i≥1 are continuous and are such that, sup x∈X ||ϕ(x)||2 < ∞, where ||ϕ(x)||2 def = X i≥1 ϕi(x)2. (1) Examples of feature spaces satisfying this property include rescaled wavelets and will be described in Section 3. The random subspace GP is generated by building a set of P random features (ψp)1≤p≤P defined as linear combinations of the initial features {ϕi}1≥1 weighted by random coefficients: ψp(x) def = X i≥1 Ap,iϕi(x), for 1 ≤p ≤P, (2) where the (infinitely many) coefficients Ap,i are drawn i.i.d. from a centered distribution with variance 1/P. Here we explicitly choose a Gaussian distribution N(0, 1/P). Such a definition of the features ψp as an infinite sum of random variable is not obvious (this is called an expansion of a Gaussian object) and we refer to [11] for elements of theory about Gaussian objects and for the expansion of a Gaussian object. It is shown that under assumption (1), the random features are well defined. Actually, they are random samples of a centered Gaussian process indexed by the space X with covariance structure given by 1 P ⟨ϕ(x), ϕ(x′)⟩, where we use the notation ⟨u, v⟩= P i uivi for two square-summable sequences u and v. Indeed, EAp[ψp(x)] = 0, and CovAp(ψp(x), ψp(x′)) = EAp[ψp(x)ψp(x′)] = 1 P X i≥1 ϕi(x)ϕi(x′) = 1 P ⟨ϕ(x), ϕ(x′)⟩. The continuity of the initial features (ϕi) guarantees that there exists a continuous version of the process ψp which is thus a Gaussian process. Then we define GP ⊂F to be the (random) vector space spanned by those features, i.e. GP def = {gβ(x) def = P X p=1 βpψp(x), β ∈RP }. Now, the least-squares estimate gbβ ∈GP is the function in GP with minimal empirical error, i.e. gbβ = arg min gβ∈GP LN(gβ), (3) and is the solution of a least-squares regression problem, i.e. bβ = Ψ†Y ∈RP , where Ψ is the N × P-matrix composed of the elements: Ψn,p def = Ψp(xn), and Ψ† is the Moore-Penrose pseudoinverse of Ψ1. The final prediction function bg(x) is the truncation (to the threshold ±L) of gbβ, i.e. bg(x) def = TL[gbβ(x)], where TL(u) def = ½ u if |u| ≤L, L sign(u) otherwise. Next, we provide bounds on the approximation error of f ∗in GP and deduce excess risk bounds. 1In the full rank case when N ≥P, Ψ† = (ΨT Ψ)−1ΨT 2 2.1 Approximation error We now extend the result of [10] and derive approximation error bounds both in expectation and in high probability. We restrict the set of target functions to belong to the approximation space K ⊂F (also identified to the kernel space associated to the expansion of a Gaussian object): K def = {fα ∈F, ||α||2 def = X i≥1 α2 i < ∞}. (4) Remark 1. This space may be seen from two equivalent points of view: either as a set of functions that are random linear combinations of the initial features, or a set of functions that are the expectation of some random processes (interpretation in terms of kernel space). We will not develop the related theory of Gaussian processes here but we refer the reader interested in the construction of kernel spaces to [11] Let fα = P i αiϕi ∈K. Write g∗the projection of fα onto GP w.r.t. the norm || · ||P, i.e. g∗= arg ming∈GP ||fα −g||P, and ¯g∗= TLg∗its truncation at the threshold L ≥||fα||∞. Notice that due to the randomness of the features (ψp)1≤p≤P of GP , the space GP is also random, and so is ¯g∗. The following result provides bounds for the approximation error ||fα −¯g∗||P both in expectation and in high probability. Theorem 1. For any η > 0, whenever P ≥c1 log(Pγ2p log(1/η)/η), we have with probability 1 −η (w.r.t. the choice of the random subspace GP ), inf g∈G ||f ∗−TL(g)||2 P ≤c2 ||α||2 supx ||ϕ(x)||2 P ¡ 1 + log(Pγ2p log(1/η)/η) ¢ , where γ = L ||α|| supx ||ϕ(x)|| and c1, c2 are some universal constants (see [11]). A similar result holds in expectation. This result relies on the property that infg∈GP ||fα −g||P ≤||fα −gAα||P and that gAα, considered as a random variable w.r.t. the choice of the random elements A, concentrates around fα (in || · ||Pnorm) when P increases. Indeed, gAα(x) = (Aα) · ψ(x) = (Aα) · (Aϕ(x)) which is close to α · ϕ(x) = fα(s), since inner-products are approximately preserved through random projections (from a variant of Johnson-Lindenstrauss (JL) Lemma). The proof of Theorem 1 (provided in Appendix of [11]) relies in generating auxiliary samples X′ 1, . . . , X′ J from P, applying JL Lemma at those points and combining it with a Chernoff-Hoeffding bound for generalizing the result to hold in ||·||P-norm. Remark 2. An interesting property of this result is that the bound does not depend on the distribution P. This distribution is used in the definition of the norm || · ||P to assess how well a function space GP can approximate a function fα. It is thus surprising that the measure P does not appear in the bound. Actually, the fact that GP is random enables it to be close to fα (in high probability or in expectation) whatever the measure P is. This is especially interesting in a regression setting where the distribution P from which the data are generated is not known in advance. 2.2 Excess risk bounds We now combine the approximation error bound from Theorem 1 with usual estimation error bounds for linear spaces (see e.g. [7]). Let us consider a target function f ∗= P i α∗ i ϕi ∈K. Remember that our prediction function bg is the truncation bg def = TL[gbβ] of the (ordinary) least-squares estimate gbβ (empirical risk minimizer in the random space GP ) defined by (3). We now provide upper bounds (both in expectation and in high probability) on the excess risk for the least-squares estimate using random subspaces (the proof is given in [11]). Theorem 2. Whenever P ≥c3 log N, we have the following bound in expectation (w.r.t. all sources of randomness, i.e. input data, noise, and the choice of the random features): EGP ,X,Y ||f ∗−bg||2 P ≤c4 ¡ σ2 P N + L2 P log N N + log N P ||α∗||2 sup x ||ϕ(x)||2¢ , (5) Now, for any η > 0, whenever P ≥c5 log(N/η), we have the following bound in high probability (w.r.t. the choice of the random features), where c3, c4, c5, c6 are universal constant (see [11]): EX,Y ||f ∗−bg||2 P ≤c6 ¡ σ2 P N + L2 P log N N + log N/η P ||α∗||2 sup x ||ϕ(x)||2¢ . (6) 3 The results of Theorems 1 and 2 say that if the term ||α∗||2 supx ||ϕ(x)||2 is small, then the leastsquares estimate in the random subspace GP has low excess risk. The question we wish to address now is whether we can define spaces for which this is the case. In the next section we provide two examples of feature spaces and characterize the space of functions for which this term is controlled. 3 Regression with Scrambled Objects In the two examples provided below we consider (infinitely many) initial features that are translations and rescaling of a given mother function (which is assumed to be continuous) at all scales. Thus each random feature ψp is a Gaussian object based on a multi-scale scheme built from an object (the mother function), and will be called a “scrambled object”, to refer to the disorderly construction of this multi-resolution random process. We thus propose to solve the regression problem by ordinary Least Squares on the (random) approximation space defined by the span of P such scrambled objects. In the next sections we provide two examples. The first one considers the case when the mother function is a hat function and we show that the corresponding scrambled objects are Brownian motions. The second example considers wavelets. The proof of bounds (7) and (8) can be found in [11]. 3.1 Brownian motions and Brownian Sheets Dimension 1: We start with the 1-dimensional case where X = [0, 1]. Let us choose as object (mother function) the hat function Λ(x) = xI[0,1/2[ + (1 −x)I[1/2,1[. We define the (infinite) set of initial features as translated and rescaled hat functions: Λj,l(x) = 2−j/2Λ(2jx −l) for any scale j ≥1 and translation index 0 ≤l ≤2j −1. We also write Λ0,0(x) = x. This defines a basis of the space of continuous functions C0([0, 1]) equal to 0 at 0 (introduced by Faber in 1910, and known as the Schauder basis, see [8] for an interesting overview). Those functions are indexed by the scale j and translation index l, but all functions may be equivalently indexed by a unique index i ≥1. We have the property that the random features ψp(x), defined as linear combinations of those hat functions weighted by Gaussian i.i.d. random numbers, are Brownian motions (See Example 1 of [11] for the proof). In addition, we can characterize the corresponding kernel space K, which is the Sobolev space H1([0, 1]) of order 1 (space of functions which have a weak derivative in L2([0, 1])). Dimension d: For the extension to dimension d, we define the initial features as the tensor product ϕj,l of one-dimensional hat functions (thus j and l are multi-indices). The random features ψp(x) are Brownian sheets (extensions of Brownian motions to several dimensions) and the corresponding kernel K is the so-called Cameron-Martin space [9], endowed with the norm ||f||K = || ∂df ∂x1...∂xd ||L2([0,1]d) (see also Example 1 of [11] for the proof). One may interpret this space as the set of functions which have a d-th order crossed (weak) derivative ∂df ∂x1...∂xd in L2([0, 1]d), vanishing on the “left” boundary (edges containing 0) of the unit d-dimensional cube. Note that in dimension d > 1, this space differs from the Sobolev space H1. Regression with Brownian Sheets: When one uses Brownian sheets for regression with a target function f ∗= P i α∗ i ϕi that lies in the Cameron-Martin space K defined previously (i.e. such that ||α∗|| < ∞), then the term ||α∗||2 supx∈X ||ϕ(x)||2 that appears in Theorems 1 and 2 is bounded as: ||α∗||2 sup x∈X ||ϕ(x)||2 ≤2−d||f ∗||2 K. Thus, from Theorem 2, ordinary least-squares performed on random subspaces spanned by P Brownian sheets has an expected excess risk EGP ,X,Y ||f ∗−bg||2 P = O ³log N N P + log N P ||f ∗||2 K ´ , (7) (and a similar bound holds in high probability). 4 3.2 Scrambled Wavelets in [0, 1]d We now introduce a second example built from a family of orthogonal wavelets ( ˜ϕε,j,l) ∈ Cq([0, 1]d) (where ε ∈{0, 1}d is a multi-index, j is a scale index, l a multi-index, see [2, 12] for details of the notations) with at least q > d/2 vanishing moments. Now for s ∈(d/2, q), we define the initial features (ϕε,j,l) as the rescaled wavelets ( ˜ϕε,j,l), i.e. ϕε,j,l def = 2−js ˜ϕε,j,l || ˜ϕε,j,l||2 . Again, the initial features may equivalently be indexed by a unique index i ≥1. The random features ψp defined from (2) are called “scrambled wavelets”. It can be shown that the resulting approximation space K (i.e. {fα = P i αiϕi, ||α|| < ∞) is the Sobolev space Hs([0, 1]d). Regression with Scambled Wavelets: Assume that the mother wavelet ˜ϕ has compact support [0, 1]d and is bounded by λ, and assume that the target function f ∗= P i α∗ i ϕi lies in the Sobolev space Hs([0, 1]d) with s > d/2 (i.e. such that ||α∗|| < ∞). Then, we have, ||α∗||2 sup x∈X ||ϕ(x)||2 ≤ λ2d(2d −1) 1 −2−2(s−d/2) ||f ∗||2 Hs([0,1]d). Thus from Theorem 2, ordinary least-squares performed on random subspaces spanned by P scrambled wavelets has an expected excess risk EGP ,X,Y ||f ∗−bg||2 P = O ³log N N P + log N P ||f ∗||2 Hs([0,1]d) ´ , (8) (and a similar bound holds in high probability). In both examples, by choosing P of order √ N||f ∗||K, one deduces the excess risk E||f ∗−bg||2 P = O ³||f ∗||K log N √ N ´ . (9) 3.3 Remark about randomized spaces Note that the bounds on the excess risk obtained in (7), (8), and (9) do not depend on the distribution P under which the data are generated. This is crucial in our setting since P is usually unknown. It should be noticed that this property does not hold when one considers non-randomized approximation spaces. Indeed, it is relatively easy to exhibit a particularly well-chosen set of features ϕi that will approximate functions in a given class using a particular measure P. For example when P = λ, the Lebesgue measure, and f ∗∈Hs([0, 1]d) (with s > d/2), then linear regression using wavelets (with at least d/2 vanishing moments), which form an orthonormal basis of L2,λ([0, 1]d), enables to achieve a bound similar to (8). However, this is no more the case when P is not the Lebesgue measure and it seems difficult to modify the features ϕi in order to recover the same bound, even when P is known. This seems to be even harder when P is arbitrary and not known in advance. Randomization enables to define approximation spaces such that the approximation error (either in expectation or in high probability on the choice of the random space) is controlled, whatever the measure P used to assess the performance (even when P is unknown) is. For illustration, consider a very peaky (a spot) distribution P in a high-dimensional space X. Regular linear approximation, say with wavelets (see e.g. [6]), will most probably miss the specific characteristics of f ∗at the spot, since the first wavelets have large support. On the contrary, scrambled wavelets, which are functions that contain (random combinations of) all wavelets, will be able to detect correlations between the data and some high frequency wavelets, and thus discover relevant features of f ∗at the spot. This is illustrated in the numerical experiment below. Here P is a very peaky Gaussian distribution and f ∗is a 1-dimensional periodic function. We consider as initial features (ϕi)i≥1 the set of hat functions defined in Section 3.1. Figure 3.3 shows the target function f ∗, the distribution P, and the data (xn, yn)1≤n≤100 (left plots). The middle plots represents the least-squares estimate bg using P = 40 scrambled objects (ψp)1≤p≤40 (here Brownian motions). The right plots shows the least-squares estimate using the initial features (ϕi)1≤i≤40. The top figures represent a high level view of the whole domain [0, 1]. No method is able to learn f ∗on the whole space (this is normal since the available data are only generated from a peaky distribution). The bottom figures shows a zoom [0.45, 0.51] around the data. Least-squares regression using scrambled objects is able to learn the structure of f ∗in terms of the measure P. 5 0.0 0.2 0.4 0.6 0.8 1.0 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 Target function 0.0 0.2 0.4 0.6 0.8 1.0 -1.0 -0.5 0.0 0.5 1.0 Predicted function: BLSR_Hat 0.0 0.2 0.4 0.6 0.8 1.0 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted function: LSR_Hat 0.45 0.46 0.47 0.48 0.49 0.50 0.51 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 Target function 0.45 0.46 0.47 0.48 0.49 0.50 0.51 -1.0 -0.5 0.0 0.5 1.0 Predicted function: BLSR_Hat 0.45 0.46 0.47 0.48 0.49 0.50 0.51 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted function: LSR_Hat Figure 1: LS estimate of f ∗using N = 100 data generated from a peaky distribution P (left plots), using 40 Brownian motions (ψp) (middle plots) and 40 hat functions (ϕi) (right plots). The bottom row shows a zoom around the data. 4 Discussion Minimax optimality: Note that although the rate ˜O(N −1/2) deduced in (9), does not depend on the dimension d of the input data X, it does not contradict the known minimax lower bounds, which are Ω(N −2s/(2s+d)) for functions defined over [0, 1]d that possess s-degrees of smoothness (e.g. that are s-times differentiable), see e.g. Chapter 3 of [7]. Indeed, the kernel space K is composed of functions whose order of smoothness may depend on d. For illustration, in the case of scrambled wavelets, the kernel space is the Sobolev space Hs([0, 1]d) with s > d/2. Thus 2s/(2s + d) > 1/2. Notice that if one considers wavelets with q vanishing moments, where q > d/2, then one may choose s (such that q > s > d/2) arbitrarily close to d/2, and deduce that the excess risk rate ˜O(N −1/2) deduced from Theorem 2 is arbitrarily close to the minimax lower rate. Thus regression using scrambled wavelets is minimax optimal (up to logarithmic factors). Now, concerning Brownian sheets, we are not aware of minimax lower bounds for Cameron-Martin spaces, thus we do not know whether regression using Brownian sheets is minimax optimal or not. Links with RKHS Theory: There are strong links between the kernel space of Gaussian objects (see eq.(4)) and Reproducing Kernel Hilbert Spaces (RKHS). We now remind two properties that illustrate those links: • Kernel spaces of Gaussian objects can be built using a Carleman operator, i.e. a linear injective mapping J : H 7→S (where H is a Hilbert space) such that J(h)(t) = R Γt(s)h(s)ds where (Γt)t is a collection of functions of H. There is a bijection between Carleman operators and the set of RKHSs [4, 15]. • Expansion of a Mercer kernel. The expansion of a Mercer kernel k (i.e. when X is compact Haussdorff and k is a continuous kernel) is given by k(x, y) = P∞ i=1 λiei(x)ei(y), where (λi)i and (ei)i are the eigenvalues and eigenfunctions of the integral operator Lk : L2,µ(X) →L2,µ(X) defined by (Lk(f))(x) = R X k(x, y)f(y)dµ(y). The associated RKHS is K = {f = P i αiϕi; P i α2 i < ∞}, where ϕi = √λiei, endowed with the inner product ⟨fα, fβ⟩= ⟨α, β⟩l2. This space is thus also the kernel space of the Gaussian object as defined by (4). 6 The expansion of a Mercer kernel gives an explicit construction of the functions of the RKHS. However it may not be straightforward to compute the eigenvalues and eigenfunctions of the integral operator Lk and thus the basis functions ϕi in the general case. The approach described in this paper enables to choose explicitly the initial basis functions, and build the corresponding kernel space. For example we have presented examples of expansions using multiresolution bases (such as hat functions and wavelets), which is not easy to obtain from the Mercer expansion. This is interesting because from the choice of the initial basis, we can characterize the corresponding approximations spaces (e.g. Sobolev space in the case of wavelets). Another more practical benefit is that by using multi-resolution bases (with compact mother function), we can derive efficient numerical implementations, as described in Section 5. Related works In [14, 13], the authors consider, for a given parameterized function Φ : X × Θ →R bounded by 1, and a probability measure µ over Θ, the space F of functions f(x) = R Θ α(θ)Φ(x, θ)dθ such that ||f||µ = supθ | α(θ) µ(θ)| < ∞. They show that this is a dense subset of the RKHS with kernel k(x, y) = R Θ µ(θ)Φ(x, θ)Φ(y, θ)dθ, and that if f ∈F, then with high probability over (θp)p≤P i.i.d ∼µ, there exist coefficients (cp)p≤P such that bf(x) = PP p=1 cpΦ(x, θp) satisfies || bf −f||2 2 ≤O( ||f||µ √ P ). The method is analogous to the construction of the empirical estimates gAα ∈GP of function fα ∈K in our setting. Indeed we may formally identify Φ(x, θp) with ψp(x) = P i Ap,iϕi(x), θp with the sequence (Ap,i)i, and the law µ with the law of this infinite sequence. However, in our setting we do not require the condition supx,θ Φ(x, θ) ≤1 to hold and the fact that Θ is a set of infinite sequences makes the identification tedious without the Gaussian random functions theory used here. Anyway, we believe that this link provides a better mutual understanding of both approaches (i.e. [14] and this paper). In the work [1], the authors provide excess risk bounds for greedy algorithms (i.e. in a non-linear approximation setting). The bounds derived in their Theorem 3.1 is similar to the result stated in our Theorem 2. The main difference is that their bound makes use of the l1 norm of the coefficients α∗instead of the l2 norm in our setting. It would be interesting to further investigate whether this difference is a consequence of the non-linear aspect of their approximation or if it results from the different assumptions made about the approximation spaces, in terms of rate of decrease of the coefficients. 5 Efficient implementation using a lazy multi-resolution expansion In practice, in order to build the least-squares estimate, one needs to compute the values of the random features (ψp)1≤p≤P at the data points (xn)1≤n≤N, i.e. the matrix Ψ = (ψp(xn))p≤P,n≤N. Due to finite memory and precision of computers, numerical implementations can only handle a finite number F of initial features (ϕi)1≤i≤F . In [10] it was mentioned that the computation of Ψ, which makes use of the random matrix A = (Ap,i)p≤P,i≤F , has a complexity O(FPN). However, in the multi-resolution schemes described here, provided that the mother function has compact support (such as the hat functions or the Daubechie wavelets), we can significantly speed up the computation of the matrix Ψ by using a tree-based lazy expansion, i.e. where the expansion of the random features (ψp)p≤P is built only when needed for the evaluation at the points (xn)n. Consider the example of the scrambled wavelets. In dimension 1, using a wavelet dyadic-tree of depth H (i.e. F = 2H+1), the numerical cost for computing Ψ is O(HPN) (using one tree per random feature). Now, in dimension d the classical extension of one-dimensional wavelets uses a family of 2d −1 wavelets, thus requires 2d −1 trees each one having 2dH nodes. While the resulting number of initial features F is of order 2d(H+1), thanks to the lazy evaluation (notice that one never computes all the initial features), one needs to expand at most one path of length H per training point, and the resulting complexity to compute Ψ is O(2dHPN). Note that one may alternatively use the so-called sparse-grids instead of wavelet trees, which have been introduced by Griebel and Zenger (see [18, 3]). The main result is that one can reduce significantly the total number of features to F = O(2HHd) (while preserving a good approximation for sufficiently smooth functions). Similar lazy evaluation techniques can be applied to sparse-grids. 7 Now, using a finite F introduces an additional approximation (squared) error term in the final excess risk bounds or order O(F −2s d ) for a wavelet basis adapted to Hs([0, 1]d). This additional error (due to the numerical approximation) can be made arbitrarily small, e.g. o(N −1/2), whenever H ≥log N d . Thus, using P = O( √ N) random features, we deduce that the complexity of building the matrix Ψ is O(2dN 3/2 log N). Then in order to solve the least squares system, one has to compute ΨT Ψ, that has numerical cost O(P 2N), and then solve the system by inversion, which has numerical cost O(P 2.376) by [5]. Thus, the overall cost of the algorithm is O(2dN 3/2 log N + N 2). 6 Conclusion and future works We analyzed least-squares regression using sub-spaces GP that are generated by P random linear combinations of infinitely many initial features. We showed that the approximation space K = {fα, ||α|| < ∞} (which is also the kernel space of the related Gaussian object) provides a characterization of the set of target functions f ∗for which this random regression works. We illustrated the approach on two examples for which the approximation space is a known functional space, namely a Cameron-Martin space when the random features are Brownian sheets (generated by random combinations at all scales of a hat function), and a Sobolev space in the case of scrambled wavelets. We derived a general approximation error result from which we deduced excess risk bounds of order O( log N N P + log N P ||f ∗||2 K). We showed that least-squares regression with scrambled wavelets provides rates that are arbitrarily close to minimax optimality. However in the case of regression with Brownian sheets, we are not aware of minimax lower bounds for Cameron-Martin spaces in dimension d > 1. We discussed a key aspect of randomized approximation spaces which is that the approximation error can be controlled independently of the measure P used to assess the performance. This is essential in a regression setting where P is unknown, and excess risk rates independent of P are obtained. We concluded by mentioning a nice property of using multiscale objects like Brownian sheets and scrambled wavelets (with compact mother wavelet) which is the possibility to be efficiently implemented. We described a lazy expansion approach for computing the regression function which has a numerical complexity O(N 2 + 2dN 3/2 log N). A limitation of the current scrambled wavelets is that, so far, we did not consider refined analysis for spaces Hs with large smoothness s ≫d/2. Possible directions for better handling such spaces may involve refined covering number bounds which will be the object of future works. Acknowledgment This work has been supported by French National Research Agency (ANR) through COSINUS program (project EXPLO-RA number ANR-08-COSI-004). 8 References [1] Andrew Barron, Albert Cohen, Wolfgang Dahmen, and Ronald Devore. Approximation and learning by greedy algorithms. 36:1:64–94, 2008. [2] Gerard Bourdaud. Ondelettes et espaces de besov. Rev. Mat. Iberoamericana, 11:3:477–512, 1995. [3] Hans-Joachim Bungartz and Michael Griebel. Sparse grids. In Arieh Iserles, editor, Acta Numerica, volume 13. University of Cambridge, 2004. [4] St´ephane Canu, Xavier Mary, and Alain Rakotomamonjy. Functional learning through kernel. arXiv, 2009, October. [5] D. Coppersmith and S. Winograd. Matrix multiplication via arithmetic progressions. In STOC ’87: Proceedings of the nineteenth annual ACM symposium on Theory of computing, pages 1–6, New York, NY, USA, 1987. ACM. [6] R. DeVore. Nonlinear Approximation. Acta Numerica, 1997. [7] L. Gy¨orfi, M. Kohler, A. Krzy˙zak, and H. Walk. A distribution-free theory of nonparametric regression. Springer-Verlag, 2002. [8] St´ephane Jaffard. D´ecompositions en ondelettes. In Development of mathematics 1950–2000, pages 609–634. Birkh¨auser, Basel, 2000. [9] Svante Janson. Gaussian Hilbert spaces. Cambridge Univerity Press, Cambridge, UK, 1997. [10] Odalric-Ambrym Maillard and R´emi Munos. Compressed Least-Squares Regression. In NIPS 2009, Vancouver Canada, 2009. [11] Odalric-Ambrym Maillard and R´emi Munos. Linear regression with random projections. Technical report, Hal INRIA: http://hal.archives-ouvertes.fr/inria-00483014/, 2010. [12] Stephane Mallat. A Wavelet Tour of Signal Processing. Academic Press, 1999. [13] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In John C. Platt, Daphne Koller, Yoram Singer, Sam T. Roweis, John C. Platt, Daphne Koller, Yoram Singer, and Sam T. Roweis, editors, NIPS. MIT Press, 2007. [14] Ali Rahimi and Benjamin Recht. Uniform approximation of functions with random bases. 2008. [15] S. Saitoh. Theory of reproducing Kernels and its applications. Longman Scientific & Technical, Harlow, UK, 1988. [16] Robert Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1994. [17] A. N. Tikhonov. Solution of incorrectly formulated problems and the regularization method. Soviet Math Dokl 4, pages 1035–1038, 1963. [18] C. Zenger. Sparse grids. In W. Hackbusch, editor, Parallel Algorithms for Partial Differential Equations, Proceedings of the Sixth GAMM-Seminar, volume 31 of Notes on Num. Fluid Mech., Kiel, 1990. Vieweg-Verlag. 9
2010
118
3,875
Subgraph Detection Using Eigenvector L1 Norms Benjamin A. Miller Lincoln Laboratory Massachusetts Institute of Technology Lexington, MA 02420 bamiller@ll.mit.edu Nadya T. Bliss Lincoln Laboratory Massachusetts Institute of Technology Lexington, MA 02420 nt@ll.mit.edu Patrick J. Wolfe Statistics and Information Sciences Laboratory Harvard University Cambridge, MA 02138 wolfe@stat.harvard.edu Abstract When working with network datasets, the theoretical framework of detection theory for Euclidean vector spaces no longer applies. Nevertheless, it is desirable to determine the detectability of small, anomalous graphs embedded into background networks with known statistical properties. Casting the problem of subgraph detection in a signal processing context, this article provides a framework and empirical results that elucidate a “detection theory” for graph-valued data. Its focus is the detection of anomalies in unweighted, undirected graphs through L1 properties of the eigenvectors of the graph’s so-called modularity matrix. This metric is observed to have relatively low variance for certain categories of randomly-generated graphs, and to reveal the presence of an anomalous subgraph with reasonable reliability when the anomaly is not well-correlated with stronger portions of the background graph. An analysis of subgraphs in real network datasets confirms the efficacy of this approach. 1 Introduction A graph G = (V, E) denotes a collection of entities, represented by vertices V , along with some relationship between pairs, represented by edges E. Due to this ubiquitous structure, graphs are used in a variety of applications, including the natural sciences, social network analysis, and engineering. While this is a useful and popular way to represent data, it is difficult to analyze graphs in the traditional statistical framework of Euclidean vector spaces. In this article we investigate the problem of detecting a small, dense subgraph embedded into an unweighted, undirected background. We use L1 properties of the eigenvectors of the graph’s modularity matrix to determine the presence of an anomaly, and show empirically that this technique has reasonable power to detect a dense subgraph where lower connectivity would be expected. In Section 2 we briefly review previous work in the area of graph-based anomaly detection. In Section 3 we formalize our notion of graph anomalies, and describe our experimental regime. In Section 4 we give an overview of the modularity matrix and observe how its eigenstructure plays a role in anomaly detection. Sections 5 and 6 respectively detail subgraph detection results on simulated and actual network data, and in Section 7 we summarize and outline future research. 1 2 Related Work The area of anomaly detection has, in recent years, expanded to graph-based data [1, 2]. The work of Noble and Cook [3] focuses on finding a subgraph that is dissimilar to a common substructure in the network. Eberle and Holder [4] extend this work using the minimum description length heuristic to determine a “normative pattern” in the graph from which the anomalous subgraph deviates, basing 3 detection algorithms on this property. This work, however, does not address the kind of anomaly we describe in Section 3; our background graphs may not have such a “normative pattern” that occurs over a significant amount of the graph. Research into anomaly detection in dynamic graphs by Priebe et al [5] uses the history of a node’s neighborhood to detect anomalous behavior, but this is not directly applicable to our detection of anomalies in static graphs. There has been research on the use of eigenvectors of matrices derived from the graphs of interest to detect anomalies. In [6] the angle of the principal eigenvector is tracked in a graph representing a computer system, and if the angle changes by more than some threshold, an anomaly is declared present. Network anomalies are also dealt with in [7], but here it is assumed that each node in the network has some highly correlated time-domain input. Since we are dealing with simple graphs, this method is not general enough for our purposes. Also, we want to determine the detectability of small anomalies that may not have a significant impact on one or two principal eigenvectors. There has been a significant amount of work on community detection through spectral properties of graphs [8, 9, 10]. Here we specifically aim to detect small, dense communities by exploiting these same properties. The approach taken here is similar to that of [11], in which graph anomalies are detected by way of eigenspace projections. We here focus on smaller and more subtle subgraph anomalies that are not immediately revealed in a graph’s principal components. 3 Graph Anomalies As in [12, 11], we cast the problem of detecting a subgraph embedded in a background as one of detecting a signal in noise. Let GB = (V, E) denote the background graph; a network in which there exists no anomaly. This functions as the “noise” in our system. We then define the anomalous subgraph (the “signal”) GS = (VS, ES) with VS ⊂V . The objective is then to evaluate the following binary hypothesis test; to decide between the null hypothesis H0 and alternate hypothesis H1: H0 : The observed graph is “noise” GB H1 : The observed graph is “signal+noise” GB ∪GS. Here the union of the two graphs GB ∪GS is defined as GB ∪GS = (V, E ∪ES). In our simulations, we formulate our noise and signal graphs as follows. The background graph GB is created by a graph generator, such as those outlined in [13], with a certain set of parameters. We then create an anomalous “signal” graph GS to embed into the background. We select the vertex subset VS from the set of vertices in the network and embed GS into GB by updating the edge set to be E ∪ES. We apply our detection algorithm to graphs with and without the embedding present to evaluate its performance. 4 The Modularity Matrix and its Eigenvectors Newman’s notion of the modularity matrix [8] associated with an unweighted, undirected graph G is given by B := A − 1 2|E|KKT . (1) Here A = {aij} is the adjacency matrix of G, where aij is 1 if there is an edge between vertex i and vertex j and is 0 otherwise; and K is the degree vector of G, where the ith component of K is the number of edges adjacent to vertex i. If we assume that edges from one vertex are equally likely to be shared with all other vertices, then the modularity matrix is the difference between the “actual” and “expected” number of edges between each pair of vertices. This is also very similar to 2 (a) (b) (c) Figure 1: Scatterplots of an R-MAT generated graph projected into spaces spanned by two eigenvectors of its modularity matrix, with each point representing a vertex. The graph with no embedding (a) and with an embedded 8-vertex clique (b) look the same in the principal components, but the embedding is visible in the eigenvectors corresponding to the 18th and 21st largest eigenvalues (c). the matrix used as an “observed-minus-expected” model in [14] to analyze the spectral properties of random graphs. Since B is real and symmetric, it admits the eigendecomposition B = UΛU T , where U ∈R|V |×|V | is a matrix where each column is an eigenvector of B, and Λ is a diagonal matrix of eigenvalues. We denote by λi, 1 ≤i ≤|V |, the eigenvalues of B, where λi ≥λi+1 for all i, and by ui the unit-magnitude eigenvector corresponding to λi. Newman analyzed the eigenvalues of the modularity matrix to determine if the graph can be split into two separate communities. As demonstrated in [11], analysis of the principal eigenvectors of B can also reveal the presence of a small, tightly-connected component embedded in a large graph. This is done by projecting B into the space of its two principal eigenvectors, calculating a Chisquared test statistic, and comparing this to a threshold. Figure 1(a) demonstrates the projection of an R-MAT Kronecker graph [15] into the principal components of its modularity matrix. Small graph anomalies, however, may not reveal themselves in this subspace. Figure 1(b) demonstrates an 8-vertex clique embedded into the same background graph. In the space of the two principal eigenvectors, the symmetry of the projection looks the same as in Figure 1(a). The foreground vertices are not at all separated from the background vertices, and the symmetry of the projection has not changed (implying no change in the test statistic). Considering only this subspace, the subgraph of interest cannot be detected reliably; its inward connectivity is not strong enough to stand out in the two principal eigenvectors. The fact that the subgraph is absorbed into the background in the space of u1 and u2, however, does not imply that it is inseparable in general; only in the subspace with the highest variance. Borrowing language from signal processing, there may be another “channel” in which the anomalous signal subgraph can be separated from the background noise. There is in fact a space spanned by two eigenvectors in which the 8-vertex clique stands out: in the space of the u18 and u21, the two eigenvectors with the largest components in the rows corresponding to VS, the subgraph is clearly separable from the background, as shown in Figure 1(c). 4.1 Eigenvector L1 Norms The subgraph detection technique we propose here is based on L1 properties of the eigenvectors of the graph’s modularity matrix, where the L1 norm of a vector x = [x1 · · · xN]T is ∥x∥1 := PN i=1 |xi|. When a vector is closely aligned with a small number of axes, i.e., if |xi| is only large for a few values of i, then its L1 norm will be smaller than that of a vector of the same magnitude where this is not the case. For example, if x ∈R1024 has unit magnitude and only has nonzero components along two of the 1024 axes, then ∥x∥1 ≤ √ 2. If it has a component of equal magnitude along all axes, then ∥x∥1 = 32. This property has been exploited in the past in a graph-theoretic setting, for finding maximal cliques [16, 17]. This property can also be useful when detecting anomalous clustering behavior. If there is a subgraph GS that is significantly different from its expectation, this will manifest itself in the modularity 3 (a) (b) Figure 2: L1 analysis of modularity matrix eigenvectors. Under the null model, ∥u18∥has the distribution in (a). With an 8-vertex clique embedded, ∥u18∥1 falls far from its average value, as shown in (b). matrix as follows. The subgraph GS has a set of vertices VS, which is associated with a set of indices corresponding to rows and columns of the adjacency matrix A. Consider the vector x ∈{0, 1}N, where xi is 1 if vi ∈VS and xi = 0 otherwise. For any S ⊆V and v ∈V , let dS(v) denote the number of edges between the vertex v and the vertex set S. Also, let dS(S′) := P v∈S′ dS(v) and d(v) := dV (v). We then have ∥Bx∥2 2 = X v∈V  dVS(v) −d(v)d(VS) d(V ) 2 , (2) xT Bx = dVS(VS) −d2(VS) d(V ) , (3) and ∥x∥2 = p |VS|. Note that d(V ) = 2|E|. A natural interpretation of (2) is that Bx represents the difference between the actual and expected connectivity to VS across the entire graph, and likewise (3) represents this difference within the subgraph. If x is an eigenvector of B, then of course xT Bx/(∥Bx∥2∥x∥2) = 1. Letting each subgraph vertex have uniform internal and external degree, this ratio approaches 1 as P v /∈VS (dVS(v) −d(v)d(VS)/d(V ))2 is dominated by P v∈VS (dVS(v) −d(v)d(VS)/d(V ))2. This suggests that if VS is much more dense than a typical subset of background vertices, x is likely to be well-correlated with an eigenvector of B. (This becomes more complicated when there are several eigenvalues that are approximately dVS(VS)/|VS|, but this typically occurs for smaller graphs than are of interest.) Newman made a similar observation: that the magnitude of a vertex’s component in an eigenvector is related to the “strength” with which it is a member of the associated community. Thus if a small set of vertices forms a community, with few belonging to other communities, there will be an eigenvector well aligned with this set, and this implies that the L1 norm of this eigenvector would be smaller than that of an eigenvector with a similar eigenvalue when there is no anomalously dense subgraph. 4.2 Null Model Characterization To examine the L1 behavior of the modularity matrix’s eigenvectors, we performed the following experiment. Using the R-MAT generator we created 10,000 graphs with 1024 vertices, an average degree of 6 (the result being an average degree of about 12 since we make the graph undirected), and a probability matrix P =  0.5 0.125 0.125 0.25  . For each graph, we compute the modularity matrix B and its eigendecomposition. We then compute ∥ui∥1 for each i and store this value as part of our background statistics. Figure 2(a) demonstrates the distribution of ∥u18∥1. The distribution has a slight left skew, but has a tight variance (a standard deviation of 0.35) and no large deviations from the mean under the null (H0) model. After compiling background data, we computed the mean and standard deviation of the L1 norms for each ui. Let µi be the average of ∥ui∥1 and σi be its standard deviation. Using the R-MAT graph with the embedded 8-vertex clique, we observed eigenvector L1 norms as shown in Figure 2(b). In 4 the figure we plot ∥ui∥1 as well as µi, µi + 3σi and µi −3σi. The vast majority of eigenvectors have L1 norms close to the mean for the associated index. There are very few cases with a deviation from the mean of greater than 3σ. Note also that µi decreases with decreasing i. This suggests that the community formation inherent in the R-MAT generator creates components strongly associated with the eigenvectors with larger eigenvalues. The one outlier is u18, which has an L1 norm that is over 10 standard deviations away from the mean. Note that u18 is the horizontal axis in Figure 1(c), which by itself provides significant separation between the subgraph and the background. Simple L1 analysis would certainly reveal the presence of this particular embedding. 5 Embedded Subgraph Detection With the L1 properties detailed in Section 4 in mind, we propose the following method to determine the presence of an embedding. Given a graph G, compute the eigendecomposition of its modularity matrix. For each eigenvector, calculate its L1 norm, subtract its expected value (computed from the background statistics), and normalize by its standard deviation. If any of these modified L1 norms is less than a certain threshold (since the embedding makes the L1 norm smaller), H1 is declared, and H0 is declared otherwise. Pseudocode for this detection algorithm is provided in Algorithm 1. Algorithm 1 L1SUBGRAPHDETECTION Input: Graph G = (V, E), Integer k, Numbers ℓ1MIN, µ[1..k], σ[1..k] B ←MODMAT(G) U ←EIGENVECTORS(B, k) ⟨⟨k eigenvectors of B⟩⟩ for i ←1 to k do m[i] ←(∥ui∥1 −µ[i])/σ[i] if m[i] < ℓ1MIN then return H1 ⟨⟨declare the presence of an embedding⟩⟩ end if end for return H0 ⟨⟨no embedding found⟩⟩ We compute the eigenvectors of B using eigs in MATLAB, which has running time O(|E|kh + |V |k2h + k3h), where h is the number of iterations required for eigs to converge [10]. While the modularity matrix is not sparse, it is the sum of a sparse matrix and a rank-one matrix, so we can still compute its eigenvalues efficiently, as mentioned in [8]. Computing the modified L1 norms and comparing them to the threshold takes O(|V |k) time, so the complexity is dominated by the eigendecomposition. The signal subgraphs are created as follows. In all simulations in this section, |VS| = 8. For each simulation, a subgraph density of 70%, 80%, 90% or 100% is chosen. For subraphs of this size and density, the method of [11] does not yield detection performance better than chance. The subgraph is created by, uniformly at random, selecting the chosen proportion of the 8 2  possible edges. To determine where to embed the subgraph into the background, we find all vertices with at most 1, 3 or 5 edges and select 8 of these at random. The subgraph is then induced on these vertices. For each density/external degree pair, we performed a 10,000-trial Monte Carlo simulation in which we create an R-MAT background with the same parameters as the null model, embed an anomalous subgraph as described above, and run Algorithm 1 with k = 100 to determine whether the embedding is detected. Figure 3 demonstrates detection performance in this experiment. In the receiver operating characteristic (ROC), changing the L1 threshold (ℓ1MIN in Algorithm 1) changes the position on the curve. Each curve corresponds to a different subgraph density. In Figure 3(a), each vertex of the subgraph has 1 edge adjacent to the background. In this case the subgraph connectivity is overwhelmingly inward, and the ROC curve reflects this. Also, the more dense subgraphs are more detectable. When the external degree is increased so that a subgraph vertex may have up to 3 edges adjacent to the background, we see a decline in detection performance as shown in Figure 3(b). Figure 3(c) demonstrates the additional decrease in detection performance when the external subgraph connectivity is increased again, to as much as 5 edges per vertex. 5 (a) (b) (c) Figure 3: ROC curves for the detection of 8-vertex subgraphs in a 1024-vertex R-MAT background. Performance is shown for subgraphs of varying density when each foreground vertex is connected to the background by up to 1, 3 and 5 edges in (a), (b) and (c), respectively. 6 Subgraph Detection in Real-World Networks To verify that we see similar properties in real graphs that we do in simulated ones, we analyzed five data sets available in the Stanford Network Analysis Package (SNAP) database [18]. Each network is made undirected before we perform our analysis. The data sets used here are the Epinions who-trusts-whom graph (Epinions, |V | = 75,879, |E| = 405,740) [19], the arXiv.org collaboration networks on astrophysics (AstroPh, |V | = 18,722, |E| = 198,050) and condensed matter (CondMat, |V |=23,133, |E|=93,439) [20], an autonomous system graph (asOregon, |V |=11,461, |E|=32,730) [21] and the Slashdot social network (Slashdot, |V |=82,168, |E|=504,230) [22]. For each graph, we compute the top 110 eigenvectors of the modularity matrix and the L1 norm of each. Comparing each L1 sequence to a “smoothed” (i.e., low-pass filtered) version, we choose the two eigenvectors that deviate the most from this trend, except in the case of Slashdot, where there is only one significant deviation. Plots of the L1 norms and scatterplots in the space of the two eigenvectors that deviate most are shown in Figure 4. The eigenvectors declared are highlighted. Note that, with the exception of the asOregon, we see as similar trend in these networks that we did in the R-MAT simulations, with the L1 norms decreasing as the eigenvalues increase (the L1 trend in asOregon is fairly flat). Also, with the exception of Slashdot, each dataset has a few eigenvectors with much smaller norms than those with similar eigenvalues (Slashdot decreases gradually, with one sharp drop at the maximum eigenvalue). The subgraphs detected by L1 analysis are presented in Table 1. Two subgraphs are chosen for each dataset, corresponding to the highlighted points in the scatterplots in Figure 4. For each subgraph we list the size (number of vertices), density (internal degree divided by the maximum number of edges), external degree, and the eigenvector that separates it from the background. The subgraphs are quite dense, at least 80% in each case. To determine whether a detected subgraph is anomalous with respect to the rest of the graph, we sample the network and compare the sample graphs to the detected subgraphs in terms of density and external degree. For each detected subgraph, we take 1 million samples with the same number of vertices. Our sampling method consists of doing a random walk and adding all neighbors of each vertex in the path. We then count the number of samples with density above a certain threshold and external degree below another threshold. These thresholds are the parenthetical values in the 4th and 5th columns of Table 1. Note that the thresholds are set so that the detected subgraphs comfortably meet them. The 6th column lists the number of samples out of 1 million that satisfy both thresholds. In each case, far less than 1% of the samples meet the criteria. For the Slashdot dataset, no sample was nearly as dense as the two subgraphs we selected by thresholding along the principal eigenvector. After removing samples that are predominantly correlated with the selected eigenvectors, we get the parenthetical values in the same column. In most cases, all of the samples meeting the thresholds are correlated with the detected eigenvectors. Upon further inspection, those remaining are either correlated with another eigenvector that deviates from the overall L1 trend, or correlated with multiple eigenvectors, as we discuss in the next section. 6 (a) Epinions L1 norms (b) Epinions scatterplot (c) AstroPh L1 norms (d) AstroPh scatterplot (e) CondMat L1 norms (f) CondMat scatterplot (g) asOregon L1 norms (h) asOregon scatterplot (i) Slashdot L1 norms (j) Slashdot scatterplot Figure 4: Eigenvector L1 norms in real-world network data (left column), and scatterplots of the projection into the subspace defined by the indicated eigenvectors (right column). 7 dataset eigenvector subgraph size subgraph (sample) density subgraph (sample) external degree # samples that meet threshold Epinions u36 34 80% (70%) 721 (1000) 46 (0) Epinions u45 27 83% (75%) 869 (1200) 261 (6) AstroPh u57 30 100% (90%) 93 (125) 853 (0) AstroPh u106 24 100% (90%) 73 (100) 944 (0) CondMat u29 19 100% (90%) 2 (50) 866 (0) CondMat u36 20 83% (75%) 70 (120) 1596 (0) asOregon u6 15 96% (85%) 1089 (1500) 23 (0) asOregon u32 6 93% (80%) 177 (200) 762 (393) Slashdot u1 > 0.08 36 95% (90%) 10570 (∞) 0 (0) Slashdot u1 > 0.07 51 89% (80%) 12713 (∞) 0 (0) Table 1: Subgraphs detected by L1 analysis, and a comparison with randomly-sampled subgraphs in the same network. Figure 5: An 8-vertex clique that does not create an anomalously small L1 norm in any eigenvector. The scatterplot looks similar to one in which the subgraph is detectable, but is rotated. 7 Conclusion In this article we have demonstrated the efficacy of using eigenvector L1 norms of a graph’s modularity matrix to detect small, dense anomalous subgraphs embedded in a background. Casting the problem of subgraph detection in a signal processing context, we have provided the intuition behind the utility of this approach, and empirically demonstrated its effectiveness on a concrete example: detection of a dense subgraph embedded into a graph generated using known parameters. In real network data we see trends similar to those we see in simulation, and examine outliers to see what subgraphs are detected in real-world datasets. Future research will include the expansion of this technique to reliably detect subgraphs that can be separated from the background in the space of a small number of eigenvectors, but not necessarily one. While the L1 norm itself can indicate the presence of an embedding, it requires the subgraph to be highly correlated with a single eigenvector. Figure 5 demonstrates a case where considering multiple eigenvectors at once would likely improve detection performance. The scatterplot in this figure looks similar to the one in Figure 1(c), but is rotated such that the subgraph is equally aligned with the two eigenvectors into which the matrix has been projected. There is not significant separation in any one eigenvector, so it is difficult to detect using the method presented in this paper. Minimizing the L1 norm with respect to rotation in the plane will likely make the test more powerful, but could prove computationally expensive. Other future work will focus on developing detectability bounds, the application of which would be useful when developing detection methods like the algorithm outlined here. Acknowledgments This work is sponsored by the Department of the Air Force under Air Force Contract FA8721-05-C0002. Opinions, interpretations, conclusions and recommendations are those of the author and are not necessarily endorsed by the United States Government. 8 References [1] J. Sun, J. Qu, D. Chakrabarti, and C. Faloutsos, “Neighborhood formation and anomaly detection in bipartite graphs,” in Proc. IEEE Int’l. Conf. on Data Mining, Nov. 2005. [2] J. Sun, Y. Xie, H. Zhang, and C. Faloutsos, “Less is more: Compact matrix decomposition for large sparse graphs,” in Proc. SIAM Int’l. Conf. on Data Mining, 2007. [3] C. C. Noble and D. J. Cook, “Graph-based anomaly detection,” in Proc. ACM SIGKDD Int’l. Conf. on Knowledge Discovery and Data Mining, pp. 631–636, 2003. [4] W. Eberle and L. Holder, “Anomaly detection in data represented as graphs,” Intelligent Data Analysis, vol. 11, pp. 663–689, December 2007. [5] C. E. Priebe, J. M. Conroy, D. J. Marchette, and Y. Park, “Scan statistics on enron graphs,” Computational & Mathematical Organization Theory, vol. 11, no. 3, pp. 229–247, 2005. [6] T. Id´e and H. Kashima, “Eigenspace-based anomaly detection in computer systems,” in Proc. KDD ’04, pp. 440–449, 2004. [7] S. Hirose, K. Yamanishi, T. Nakata, and R. Fujimaki, “Network anomaly detection based on eigen equation compression,” in Proc. KDD ’09, pp. 1185–1193, 2009. [8] M. E. J. Newman, “Finding community structure in networks using the eigenvectors of matrices,” Phys. Rev. E, vol. 74, no. 3, 2006. [9] J. Ruan and W. Zhang, “An efficient spectral algorithm for network community discovery and its applications to biological and social networks,” in Proc. IEEE Int’l Conf. on Data Mining, pp. 643–648, 2007. [10] S. White and P. Smyth, “A spectral clustering approach to finding communities in graphs,” in Proc. SIAM Data Mining Conf., 2005. [11] B. A. Miller, N. T. Bliss, and P. J. Wolfe, “Toward signal processing theory for graphs and other non-Euclidean data,” in Proc. IEEE Int’l Conf. on Acoustics, Speech and Signal Processing, pp. 5414–5417, 2010. [12] T. Mifflin, “Detection theory on random graphs,” in Proc. Int’l Conf. on Information Fusion, pp. 954–959, 2009. [13] D. Chakrabarti and C. Faloutsos, “Graph mining: Laws, generators, and algorithms,” ACM Computing Surveys, vol. 38, no. 1, 2006. [14] F. Chung, L. Lu, and V. Vu, “The spectra of random graphs with given expected degrees,” Proc. of National Academy of Sciences of the USA, vol. 100, no. 11, pp. 6313–6318, 2003. [15] D. Chakrabarti, Y. Zhan, and C. Faloutsos, “R-MAT: A recursive model for graph mining,” in Proc. Fourth SIAM Int’l Conference on Data Mining, vol. 6, pp. 442–446, 2004. [16] T. S. Motzkin and E. G. Straus, “Maxima for graphs and a new proof of a theorem of Tur´an,” Canad. J. Math., vol. 17, pp. 533–540, 1965. [17] C. Ding, T. Li, and M. I. Jordan, “Nonnegative matrix factorization for combinatorial optimization: Spectral clustering, graph matching, and clique finding,” in Proc. IEEE Int’l Conf. on Data Mining, pp. 183–192, 2008. [18] J. Leskovec, “Stanford network analysis package.” http://snap.stanford.edu. [19] M. Richardson, R. Agrawal, and P. Domingos, “Trust management for the semantic web,” in Proc. ISWC, 2003. [20] J. Leskovec, J. Kleinberg, and C. Faloutsos, “Graph evolution: Densification and shinking diameters,” ACM Trans. on Knowledge Discovery from Data, vol. 1, no. 1, 2007. [21] J. Leskovec, J. Kleinberg, and C. Faloutsos, “Graphs over time: Densification laws, shinking diameters and possible explanations,” in Proc. KDD ’05, 2005. [22] J. Leskovec, K. Lang, A. Dasgupta, and M. Mahoney, “Community structure in large networks: Natural cluster sizes and the absence of large well-defined clusters.” arXiv.org:0810.1355, 2008. 9
2010
119
3,876
Transduction with Matrix Completion: Three Birds with One Stone Andrew B. Goldberg1, Xiaojin Zhu1, Benjamin Recht1, Jun-Ming Xu1, Robert Nowak2 Department of {1Computer Sciences, 2Electrical and Computer Engineering} University of Wisconsin-Madison, Madison, WI 53706 {goldberg, jerryzhu, brecht, xujm}@cs.wisc.edu, nowak@ece.wisc.edu Abstract We pose transductive classification as a matrix completion problem. By assuming the underlying matrix has a low rank, our formulation is able to handle three problems simultaneously: i) multi-label learning, where each item has more than one label, ii) transduction, where most of these labels are unspecified, and iii) missing data, where a large number of features are missing. We obtained satisfactory results on several real-world tasks, suggesting that the low rank assumption may not be as restrictive as it seems. Our method allows for different loss functions to apply on the feature and label entries of the matrix. The resulting nuclear norm minimization problem is solved with a modified fixed-point continuation method that is guaranteed to find the global optimum. 1 Introduction Semi-supervised learning methods make assumptions about how unlabeled data can help in the learning process, such as the manifold assumption (data lies on a low-dimensional manifold) and the cluster assumption (classes are separated by low density regions) [4, 16]. In this work, we present two transductive learning methods under the novel assumption that the feature-by-item and label-by-item matrices are jointly low rank. This assumption effectively couples different label prediction tasks, allowing us to implicitly use observed labels in one task to recover unobserved labels in others. The same is true for imputing missing features. In fact, our methods learn in the difficult regime of multi-label transductive learning with missing data that one sometimes encounters in practice. That is, each item is associated with many class labels, many of the items’ labels may be unobserved (some items may be completely unlabeled across all labels), and many features may also be unobserved. Our methods build upon recent advances in matrix completion, with efficient algorithms to handle matrices with mixed real-valued features and discrete labels. We obtain promising experimental results on a range of synthetic and real-world data. 2 Problem Formulation Let x1 . . . xn ∈Rd be feature vectors associated with n items. Let X = [x1 . . . xn] be the d × n feature matrix whose columns are the items. Let there be t binary classification tasks, y1 . . . yn ∈ {−1, 1}t be the label vectors, and Y = [y1 . . . yn] be the t × n label matrix. Entries in X or Y can be missing at random. Let ΩX be the index set of observed features in X, such that (i, j) ∈ΩX if and only if xij is observed. Similarly, let ΩY be the index set of observed labels in Y. Our main goal is to predict the missing labels yij for (i, j) /∈ΩY. Of course, this reduces to standard transductive learning when t = 1, |ΩX| = nd (no missing features), and 1 < |ΩY| < n (some missing labels). In our more general setting, as a side product we are also interested in imputing the missing features, and de-noising the observed features, in X. 1 2.1 Model Assumptions The above problem is in general ill-posed. We now describe our assumptions to make it a welldefined problem. In a nutshell, we assume that X and Y are jointly produced by an underlying low rank matrix. We then take advantage of the sparsity to fill in the missing labels and features using a modified method of matrix completion. Specifically, we assume the following generative story. It starts from a d × n low rank “pre”-feature matrix X0, with rank(X0) ≪min(d, n). The actual feature matrix X is obtained by adding iid Gaussian noise to the entries of X0: X = X0 + ϵ, where ϵij ∼N(0, σ2 ϵ ). Meanwhile, the t “soft” labels y0 1j . . . y0 tj ⊤≡y0 j ∈Rt of item j are produced by y0 j = Wx0 j + b, where W is a t × d weight matrix, and b ∈Rt is a bias vector. Let Y0 =  y0 1 . . . y0 n  be the soft label matrix. Note the combined (t + d) × n matrix  Y0; X0 is low rank too: rank(  Y0; X0 ) ≤rank(X0) + 1. The actual label yij ∈{−1, 1} is generated randomly via a sigmoid function: P(yij|y0 ij) = 1/ 1 + exp(−yijy0 ij)  . Finally, two random masks ΩX, ΩY are applied to expose only some of the entries in X and Y, and we use ω to denote the percentage of observed entries. This generative story may seem restrictive, but our approaches based on it perform well on synthetic and real datasets, outperforming several baselines with linear classifiers. 2.2 Matrix Completion for Heterogeneous Matrix Entries With the above data generation model, our task can be defined as follows. Given the partially observed features and labels as specified by X, Y, ΩX, ΩY, we would like to recover the intermediate low rank matrix  Y0; X0 . Then, X0 will contain the denoised and completed features, and sign(Y0) will contain the completed and correct labels. The key assumption is that the (t + d) × n stacked matrix  Y0; X0 is of low rank. We will start from a “hard” formulation that is illustrative but impractical, then relax it. argmin Z∈R(t+d)×n rank(Z) (1) s.t. sign(zij) = yij, ∀(i, j) ∈ΩY; z(i+t)j = xij, ∀(i, j) ∈ΩX Here, Z is meant to recover  Y0; X0 by directly minimizing the rank while obeying the observed features and labels. Note the indices (i, j) ∈ΩX are with respect to X, such that i ∈{1, . . . , d}. To index the corresponding element in the larger stacked matrix Z, we need to shift the row index by t to skip the part for Y0, and hence the constraints z(i+t)j = xij. The above formulation assumes that there is no noise in the generation processes X0 →X and Y0 →Y. Of course, there are several issues with formulation (1), and we handle them as follows: • rank() is a non-convex function and difficult to optimize. Following recent work in matrix completion [3, 2], we relax rank() with the convex nuclear norm ∥Z∥∗ = Pmin(t+d,n) k=1 σk(Z), where σk’s are the singular values of Z. The relationship between rank(Z) and ∥Z∥∗is analogous to that of ℓ0-norm and ℓ1-norm for vectors. • There is feature noise from X0 to X. Instead of the equality constraints in (1), we minimize a loss function cx(z(i+t)j, xij). We choose the squared loss cx(u, v) = 1 2(u −v)2 in this work, but other convex loss functions are possible too. • Similarly, there is label noise from Y0 to Y. The observed labels are of a different type than the observed features. We therefore introduce another loss function cy(zij, yij) to account for the heterogeneous data. In this work, we use the logistic loss cy(u, v) = log(1 + exp(−uv)). In addition to these changes, we will model the bias b either explicitly or implicitly, leading to two alternative matrix completion formulations below. Formulation 1 (MC-b). In this formulation, we explicitly optimize the bias b ∈Rt in addition to Z ∈R(t+d)×n, hence the name. Here, Z corresponds to the stacked matrix  WX0; X0 instead of  Y0; X0 , making it potentially lower rank. The optimization problem is argmin Z,b µ∥Z∥∗+ λ |ΩY| X (i,j)∈ΩY cy(zij + bi, yij) + 1 |ΩX| X (i,j)∈ΩX cx(z(i+t)j, xij), (2) 2 where µ, λ are positive trade-off weights. Notice the bias b is not regularized. This is a convex problem, whose optimization procedure will be discussed in section 3. Once the optimal Z, b are found, we recover the task-i label of item j by sign(zij + bi), and feature k of item j by z(k+t)j. Formulation 2 (MC-1). In this formulation, the bias is modeled implicitly within Z. Similar to how bias is commonly handled in linear classifiers, we append an additional feature with constant value one to each item. The corresponding pre-feature matrix is augmented into  X0; 1⊤ , where 1 is the all-1 vector. Under the same label assumption y0 j = Wx0 j + b, the rows of the soft label matrix Y0 are linear combinations of rows in  X0; 1⊤ , i.e., rank(  Y0; X0; 1⊤ ) = rank(  X0; 1⊤ ). We then let Z correspond to the (t + d + 1) × n stacked matrix  Y0; X0; 1⊤ , by forcing its last row to be 1⊤(hence the name): argmin Z∈R(t+d+1)×n µ∥Z∥∗+ λ |ΩY| X (i,j)∈ΩY cy(zij, yij) + 1 |ΩX| X (i,j)∈ΩX cx(z(i+t)j, xij) (3) s.t. z(t+d+1)· = 1⊤. This is a constrained convex optimization problem. Once the optimal Z is found, we recover the task-i label of item j by sign(zij), and feature k of item j by z(k+t)j. MC-b and MC-1 differ mainly in what is in Z, which leads to different behaviors of the nuclear norm. Despite the generative story, we do not explicitly recover the weight matrix W in these formulations. Other formulations are certainly possible. One way is to let Z correspond to  Y0; X0 directly, without introducing bias b or the all-1 row, and hope nuclear norm minimization will prevail. This is inferior in our preliminary experiments, and we do not explore it further in this paper. 3 Optimization Techniques We solve MC-b and MC-1 using modifications of the Fixed Point Continuation (FPC) method of Ma, Goldfarb, and Chen [10].1 While nuclear norm minimization can be converted into a semidefinite programming (SDP) problem [2], current SDP solvers are severely limited in the size of problems they can solve. Instead, the basic fixed point approach is a computationally efficient alternative, which provably converges to the globally optimal solution and has been shown to outperform SDP solvers in terms of matrix recoverability. 3.1 Fixed Point Continuation for MC-b We first describe our modified FPC method for MC-b. It differs from [10] in the extra bias variables and multiple loss functions. Our fixed point iterative algorithm to solve the unconstrained problem of (2) consists of two alternating steps for each iteration k: 1. (gradient step) bk+1 = bk −τbg(bk), Ak = Zk −τZg(Zk) 2. (shrinkage step) Zk+1 = SτZµ(Ak). In the gradient step, τb and τZ are step sizes whose choice will be discussed next. Overloading notation a bit, g(bk) is the vector gradient, and g(Zk) is the matrix gradient, respectively, of the two loss terms in (2) (i.e., excluding the nuclear norm term): g(bi) = λ |ΩY| X j:(i,j)∈ΩY −yij 1 + exp(yij(zij + bi)) (4) g(zij) =    λ |ΩY| −yij 1+exp(yij(zij+bi)), i ≤t and (i, j) ∈ΩY 1 |ΩX|(zij −x(i−t)j), i > t and (i −t, j) ∈ΩX 0, otherwise (5) Note for g(zij), i > t, we need to shift down (un-stack) the row index by t in order to map the element in Z back to the item x(i−t)j. 1While the primary method of [10] is Fixed Point Continuation with Approximate Singular Value Decomposition (FPCA), where the approximate SVD is used to speed up the algorithm, we opt to use an exact SVD for simplicity and will refer to the method simply as FPC. 3 Input: Initial matrix Z0, bias b0, parameters µ, λ, Step sizes τb, τZ Determine µ1 > µ2 > · · · > µL = µ > 0. Set Z = Z0, b = b0. foreach µ = µ1, µ2, . . . , µL do while Not converged do Compute b = b −τbg(b), A = Z −τZg(Z) Compute SVD of A = UΛV⊤ Compute Z = U max(Λ −τZµ, 0)V⊤ end end Output: Recovered matrix Z, bias b Algorithm 1: FPC algorithm for MC-b. Input: Initial matrix Z0, parameters µ, λ, Step sizes τZ Determine µ1 > µ2 > · · · > µL = µ > 0. Set Z = Z0. foreach µ = µ1, µ2, . . . , µL do while Not converged do Compute A = Z −τZg(Z) Compute SVD of A = UΛV⊤ Compute Z = U max(Λ −τZµ, 0)V⊤ Project Z to feasible region z(t+d+1)· = 1⊤ end end Output: Recovered matrix Z Algorithm 2: FPC algorithm for MC-1. In the shrinkage step, SτZµ(·) is a matrix shrinkage operator. Let Ak = UΛV⊤be the SVD of Ak. Then SτZµ(Ak) = U max(Λ −τZµ, 0)V⊤, where max is elementwise. That is, the shrinkage operator shifts the singular values down, and truncates any negative values to zero. This step reduces the nuclear norm. Even though the problem is convex, convergence can be slow. We follow [10] and use a continuation or homotopy method to improve the speed. This involves beginning with a large value µ1 > µ and solving a sequence of subproblems, each with a decreasing value and using the previous solution as its initial point. The sequence of values is determined by a decay parameter ηµ: µk+1 = max{µkηµ, µ}, k = 1, . . . , L −1, where µ is the final value to use, and L is the number of rounds of continuation. The complete FPC algorithm for MC-b is listed in Algorithm 1. A minor modification of the argument in [10] reveals that as long as we choose non-negative step sizes satisfying τb < 4|ΩY|/(λn) and τZ < min {4|ΩY|/λ, |ΩX|}, the algorithms MC-b will be guaranteed to converge to a global optimum. Indeed, to guarantee convergence, we only need that the gradient step is non-expansive in the sense that ∥b1−τbg(b1)−b2+τbg(b2)∥2+∥Z1−τZg(Z1)−Z2+τZg(Z2)∥2 F ≤∥b1−b2∥2+∥Z1−Z2∥2 F for all b1, b2, Z1, and Z2. Our choice of τb and τZ guarantee such non-expansiveness. Once this non-expansiveness is satisfied, the remainder of the convergence analysis is the same as in [10]. 3.2 Fixed Point Continuation for MC-1 Our modified FPC method for MC-1 is similar except for two differences. First, there is no bias variable b. Second, the shrinkage step will in general not satisfy the all-1-row constraints in (3). Thus, we add a third projection step at the end of each iteration to project Zk+1 back to the feasible region, by simply setting its last row to all 1’s. The complete algorithm for MC-1 is given in Algorithm 2. We were unable to prove convergence for this gradient + shrinkage + projection algorithm. Nonetheless, in our empirical experiments, Algorithm 2 always converges and tends to outperform MC-b. The two algorithms have about the same convergence speed. 4 Experiments We now empirically study the ability of matrix completion to perform multi-class transductive classification when there is missing data. We first present a family of 24 experiments on a synthetic task by systematically varying different aspects of the task, including the rank of the problem, noise level, number of items, and observed label and feature percentage. We then present experiments on two real-world datasets: music emotions and yeast microarray. In each experiments, we compare MC-b and MC-1 against four other baseline algorithms. Our results show that MC-1 consistently outperforms other methods, and MC-b follows closely. Parameter Tuning and Other Settings for MC-b and MC-1: To tune the parameters µ and λ, we use 5-fold cross validation (CV) separately for each experiment. Specifically, we randomly 4 divide ΩX and ΩY into five disjoint subsets each. We then run our matrix completion algorithms using 4 5 of the observed entries, measure its performance on the remaining 1 5, and average over the five folds. Since our main goal is to predict unobserved labels, we use label error as the CV performance criterion to select parameters. Note that tuning µ is quite efficient since all values under consideration can be evaluated in one run of the continuation method. We set ηµ = 0.25 and, as in [10], consider µ values starting at σ1ηµ, where σ1 is the largest singular value of the matrix of observed entries in [Y; X] (with the unobserved entries set to 0), and decrease µ until 10−5. The range of λ values considered was {10−3, 10−2, 10−1, 1}. We initialized b0 to be all zero and Z0 to be the rank-1 approximation of the matrix of observed entries in [Y; X] (with unobserved entries set to 0) obtained by performing an SVD and reconstructing the matrix using only the largest singular value and corresponding left and right singular vectors. The step sizes were set as follows: τZ = min( 3.8|ΩY| λ , |ΩX|), τb = 3.8|ΩY| λn . Convergence was defined as relative change in objective functions (2)(3) smaller than 10−5. Baselines: We compare to the following baselines, each consisting of some missing feature imputation step on X first, then using a standard SVM to predict the labels: [FPC+SVM] Matrix completion on X alone using FPC [10]. [EM(k)+SVM] Expectation Maximization algorithm to impute missing X entries using a mixture of k Gaussian components. As in [9], missing features, mixing component parameters, and the assignments of items to components are treated as hidden variables, which are estimated in an iterative manner to maximize the likelihood of the data. [Mean+SVM] Impute each missing feature by the mean of the observed entries for that feature. [Zero+SVM] Impute missing features by filling in zeros. After imputation, an SVM is trained using the available (noisy) labels in ΩY for that task, and predictions are made for the rest of the labels. All SVMs are linear, trained using SVMlin2, and the regularization parameter is tuned using 5-fold cross validation separately for each task. The range of parameter values considered was {10−8, 10−7, . . . , 107, 108}. Evaluation Method: To evaluate performance, we consider two measures: transductive label error, i.e., the percentage of unobserved labels predicted incorrectly; and relative feature imputation error P ij /∈ΩX(xij −ˆxij)2 /P ij /∈ΩX x2 ij, where ˆx is the predicted feature value. In the tables below, for each parameter setting, we report the mean performance (and standard deviation in parenthesis) of different algorithms over 10 random trials. The best algorithm within each parameter setting, as well as any statistically indistinguishable algorithms via a two-tailed paired t-test at significance level α = 0.05, are marked in bold. 4.1 Synthetic Data Experiments Synthetic Data Generation: We generate a family of synthetic datasets to systematically explore the performance of the algorithms. We first create a rank-r matrix X0 = LR⊤, where L ∈Rd×r and R ∈Rn×r with entries drawn iid from N(0, 1). We then normalize X0 such that its entries have variance 1. Next, we create a weight matrix W ∈Rt×d and bias vector b ∈Rt, with all entries drawn iid from N(0, 10). We then produce X, Y0, Y according to section 2.1. Finally, we produce the random ΩX, ΩY masks with ω percent observed entries. Using the above procedure, we vary ω = 10%, 20%, 40%, n = 100, 400, r = 2, 4, and σ2 ϵ = 0.01, 0.1, while fixing t = 10, d = 20, to produce 24 different parameter settings. For each setting, we generate 10 trials, where the randomness is in the data and mask. Synthetic experiment results: Table 1 shows the transductive label errors, and Table 2 shows the relative feature imputation errors, on the synthetic datasets. We make several observations. Observation 1: MC-b and MC-1 are the best for feature imputation, as Table 2 shows. However, the imputations are not perfect, because in these particular parameter settings the ratio between the number of observed entries over the degrees of freedom needed to describe the feature matrix (i.e., r(d + n −r)) is below the necessary condition for perfect matrix completion [2], and because there is some feature noise. Furthermore, our CV tuning procedure selects parameters µ, λ to optimize label error, which often leads to suboptimal imputation performance. In a separate experiment (not reported here) when we made the ratio sufficiently large and without noise, and specifically tuned for 2http://vikas.sindhwani.org/svmlin.html 5 Table 1: Transductive label error of six algorithms on the 24 synthetic datasets. The varying parameters are feature noise σ2 ϵ , rank(X0) = r, number of items n, and observed label and feature percentage ω. Each row is for a unique parameter combination. Each cell shows the mean(standard deviation) of transductive label error (in percentage) over 10 random trials. The “meta-average” row is the simple average over all parameter settings and all trials. σ2 ϵ r n ω MC-b MC-1 FPC+SVM EM1+SVM Mean+SVM Zero+SVM 0.01 2 100 10% 37.8(4.0) 31.8(4.3) 34.8(7.0) 34.6(3.9) 40.5(5.7) 40.5(5.1) 20% 23.5(2.9) 17.0(2.2) 17.6(2.1) 19.7(2.4) 28.7(4.1) 27.4(4.4) 40% 15.1(3.1) 10.8(1.8) 9.6(1.5) 10.4(1.0) 16.5(2.5) 15.4(2.3) 400 10% 26.5(2.0) 19.9(1.7) 23.7(1.7) 24.2(1.9) 32.4(2.9) 31.5(2.7) 20% 15.9(2.5) 11.7(1.9) 12.6(2.2) 12.0(1.9) 20.0(1.9) 19.7(1.7) 40% 11.7(2.0) 8.0(1.6) 7.2(1.8) 7.3(1.4) 12.2(1.8) 12.1(2.0) 4 100 10% 42.5(4.0) 40.8(4.4) 41.5(2.6) 43.2(2.2) 43.5(2.9) 42.9(2.9) 20% 33.2(2.3) 26.2(2.8) 26.7(1.7) 30.8(2.7) 35.5(1.4) 33.9(1.5) 40% 19.6(3.1) 14.3(2.7) 13.6(2.6) 14.1(2.4) 22.5(2.0) 21.7(2.3) 400 10% 35.3(3.1) 32.1(1.6) 33.4(1.6) 34.2(1.8) 37.7(1.2) 38.2(1.4) 20% 24.4(2.3) 19.1(1.3) 20.5(1.4) 19.8(1.1) 26.9(1.5) 26.9(1.3) 40% 14.6(1.8) 9.5(0.5) 9.2(0.9) 8.6(1.1) 16.4(1.2) 16.5(1.3) 0.1 2 100 10% 39.6(5.5) 34.6(3.5) 37.3(6.4) 40.2(5.3) 41.5(6.0) 41.0(5.7) 20% 25.2(2.6) 20.1(1.7) 21.6(2.6) 26.8(3.7) 31.8(4.7) 29.9(4.0) 40% 15.7(3.1) 12.6(1.4) 13.2(2.0) 15.1(2.4) 18.5(2.7) 17.2(2.4) 400 10% 27.6(2.1) 22.6(1.9) 27.6(2.4) 28.8(2.6) 34.5(3.3) 33.6(2.8) 20% 18.0(2.2) 15.2(1.7) 16.8(2.3) 18.4(2.5) 22.6(2.4) 21.8(2.5) 40% 12.0(2.1) 10.1(1.3) 10.4(2.1) 11.1(1.9) 14.1(2.0) 14.0(2.4) 4 100 10% 42.5(4.3) 41.5(2.5) 42.3(2.0) 45.6(1.9) 44.6(2.9) 43.6(2.3) 20% 33.3(1.9) 29.0(2.2) 30.9(3.1) 34.9(3.0) 36.2(2.3) 35.4(1.6) 40% 21.4(2.7) 18.4(3.1) 18.7(2.4) 21.6(2.4) 23.9(2.0) 23.3(2.5) 400 10% 36.3(2.7) 34.0(1.7) 35.1(1.2) 36.3(1.4) 38.7(1.3) 39.1(1.2) 20% 25.5(2.0) 21.8(1.0) 23.8(1.5) 25.1(1.4) 28.4(1.7) 28.4(1.8) 40% 16.0(1.8) 12.8(0.8) 13.9(1.2) 14.7(1.3) 18.3(1.2) 18.2(1.2) meta-average 25.6 21.4 22.6 24.1 28.6 28.0 imputation error, both MC-b and MC-1 did achieve perfect feature imputation. Also, FPC+SVM is slightly worse in feature imputation. This may seem curious as FPC focuses exclusively on imputing X. We believe the fact that MC-b and MC-1 can use information in Y to enhance feature imputation in X made them better than FPC+SVM. Observation 2: MC-1 is the best for multi-label transductive classification, as suggested by Table 1. Surprisingly, the feature imputation advantage of MC-b did not translate into classification, and FPC+SVM took second place. Observation 3: The same factors that affect standard matrix completion also affect classification performance of MC-b and MC-1. As the tables show, everything else being equal, less feature noise (smaller σ2 ϵ ), lower rank r, more items, or more observed features and labels, reduce label error. Beneficial combination of these factors (the 6th row) produces the lowest label errors. Matrix completion benefits from more tasks. We performed one additional synthetic data experiment examining the effect of t (the number of tasks) on MC-b and MC-1, with the remaining data parameters fixed at ω = 10%, n = 400, r = 2, d = 20, and σ2 ϵ = 0.01. Table 3 reveals that both MC methods achieve statistically significantly better label prediction and imputation performance with t = 10 than with only t = 2 (as determined by two-sample t-tests at significance level 0.05). 4.2 Music Emotions Data Experiments In this task introduced by Trohidis et al. [14], the goal is to predict which of several types of emotion are present in a piece of music. The data3 consists of n = 593 songs of a variety of musical genres, each labeled with one or more of t = 6 emotions (i.e., amazed-surprised, happy-pleased, relaxingcalm, quiet-still, sad-lonely, and angry-fearful). Each song is represented by d = 72 features (8 rhythmic, 64 timbre-based) automatically extracted from a 30-second sound clip. 3Available at http://mulan.sourceforge.net/datasets.html 6 Table 2: Relative feature imputation error on the synthetic datasets. The algorithm Zero+SVM is not shown because it by definition has relative feature imputation error 1. σ2 ϵ r n ω MC-b MC-1 FPC+SVM EM1+SVM Mean+SVM 0.01 2 100 10% 0.84(0.04) 0.87(0.06) 0.88(0.06) 1.01(0.12) 1.06(0.02) 20% 0.54(0.08) 0.57(0.06) 0.57(0.07) 0.67(0.13) 1.03(0.02) 40% 0.29(0.06) 0.27(0.06) 0.27(0.06) 0.34(0.03) 1.01(0.01) 400 10% 0.73(0.03) 0.72(0.04) 0.76(0.03) 0.79(0.07) 1.02(0.01) 20% 0.43(0.04) 0.46(0.05) 0.50(0.04) 0.45(0.04) 1.01(0.00) 40% 0.30(0.10) 0.22(0.04) 0.24(0.05) 0.21(0.04) 1.00(0.00) 4 100 10% 0.99(0.04) 0.96(0.03) 0.96(0.03) 1.22(0.11) 1.05(0.01) 20% 0.77(0.05) 0.78(0.05) 0.77(0.04) 0.92(0.07) 1.02(0.01) 40% 0.42(0.07) 0.40(0.03) 0.42(0.04) 0.49(0.04) 1.01(0.01) 400 10% 0.87(0.04) 0.88(0.03) 0.89(0.01) 1.00(0.08) 1.01(0.00) 20% 0.69(0.07) 0.67(0.04) 0.69(0.03) 0.66(0.03) 1.01(0.00) 40% 0.34(0.05) 0.34(0.03) 0.38(0.03) 0.29(0.02) 1.00(0.00) 0.1 2 100 10% 0.92(0.05) 0.93(0.04) 0.93(0.05) 1.18(0.10) 1.06(0.02) 20% 0.69(0.07) 0.72(0.06) 0.74(0.06) 0.94(0.07) 1.03(0.02) 40% 0.51(0.05) 0.52(0.05) 0.53(0.05) 0.67(0.08) 1.02(0.01) 400 10% 0.79(0.03) 0.80(0.03) 0.84(0.03) 0.96(0.07) 1.02(0.01) 20% 0.64(0.06) 0.64(0.06) 0.67(0.04) 0.73(0.07) 1.01(0.00) 40% 0.48(0.04) 0.45(0.05) 0.49(0.05) 0.57(0.07) 1.00(0.00) 4 100 10% 1.01(0.04) 0.97(0.03) 0.97(0.03) 1.25(0.05) 1.05(0.02) 20% 0.84(0.03) 0.85(0.03) 0.85(0.03) 1.07(0.06) 1.02(0.01) 40% 0.59(0.03) 0.61(0.04) 0.63(0.04) 0.80(0.09) 1.01(0.01) 400 10% 0.90(0.02) 0.92(0.02) 0.92(0.01) 1.08(0.07) 1.01(0.01) 20% 0.75(0.04) 0.77(0.02) 0.79(0.03) 0.86(0.05) 1.01(0.00) 40% 0.56(0.03) 0.55(0.04) 0.59(0.04) 0.66(0.06) 1.00(0.00) meta-average 0.66 0.66 0.68 0.78 1.02 Table 3: More tasks help matrix completion (ω = 10%, n = 400, r = 2, d = 20, σ2 ϵ = 0.01). t MC-b MC-1 FPC+SVM MC-b MC-1 FPC+SVM 2 30.1(2.8) 22.9(2.2) 20.5(2.5) 0.78(0.07) 0.78(0.04) 0.76(0.03) 10 26.5(2.0) 19.9(1.7) 23.7(1.7) 0.73(0.03) 0.72(0.04) 0.76(0.03) transductive label error relative feature imputation error Table 4: Performance on the music emotions data. ω =40% 60% 80% Algorithm ω =40% 60% 80% 28.0(1.2) 25.2(1.0) 22.2(1.6) MC-b 0.69(0.05) 0.54(0.10) 0.41(0.02) 27.4(0.8) 23.7(1.6) 19.8(2.4) MC-1 0.60(0.05) 0.46(0.12) 0.25(0.03) 26.9(0.7) 25.2(1.6) 24.4(2.0) FPC+SVM 0.64(0.01) 0.46(0.02) 0.31(0.03) 26.0(1.1) 23.6(1.1) 21.2(2.3) EM1+SVM 0.46(0.09) 0.23(0.04) 0.13(0.01) 26.2(0.9) 23.1(1.2) 21.6(1.6) EM4+SVM 0.49(0.10) 0.27(0.04) 0.15(0.02) 26.3(0.8) 24.2(1.0) 22.6(1.3) Mean+SVM 0.18(0.00) 0.19(0.00) 0.20(0.01) 30.3(0.6) 28.9(1.1) 25.7(1.4) Zero+SVM 1.00(0.00) 1.00(0.00) 1.00(0.00) transductive label error relative feature imputation error We vary the percentage of observed entries ω = 40%, 60%, 80%. For each ω, we run 10 random trials with different masks ΩX, ΩY. For this dataset, we tuned only µ with CV, and set λ = 1. The results are in Table 4. Most importantly, these results show that MC-1 is useful for this realworld multi-label classification problem, leading to the best (or statistically indistinguishable from the best) transductive error performance with 60% and 80% of the data available, and close to the best with only 40%. We also compared these algorithms against an “oracle baseline” (not shown in the table). In this baseline, we give 100% features (i.e., no indices are missing from ΩX) and the training labels in ΩY to a standard SVM, and let it predict the unspecified labels. On the same random trials, for observed percentage ω = 40%, 60%, 80%, the oracle baseline achieved label error rate 22.1(0.8), 21.3(0.8), 20.5(1.8) respectively. Interestingly, MC-1 with ω = 80% (19.8) is statistically indistinguishable from the oracle baseline. 7 4.3 Yeast Microarray Data Experiments This dataset comes from a biological domain and involves the problem of Yeast gene functional classification. We use the data studied by Elisseeff and Weston [5], which contains n = 2417 examples (Yeast genes) with d = 103 input features (results from microarray experiments).4 We follow the approach of [5] and predict each gene’s membership in t = 14 functional classes. For this larger dataset, we omitted the computationally expensive EM4+SVM methods, and tuned only µ for matrix completion while fixing λ = 1. Table 5 reveals that MC-b leads to statistically significantly lower transductive label error for this biological dataset. Although not highlighted in the table, MC-1 is also statistically better than the SVM methods in label error. In terms of feature imputation performance, the MC methods are weaker than FPC+SVM. However, it seems simultaneously predicting the missing labels and features appears to provide a large advantage to the MC methods. It should be pointed out that all algorithms except Zero+SVM in fact have small but non-zero standard deviation on imputation error, despite what the fixed-point formatting in the table suggests. For instance, with ω = 40%, the standard deviation is 0.0009 for MC-1, 0.0011 for FPC+SVM, and 0.0001 for Mean+SVM. Again, we compared these algorithms to an oracle SVM baseline with 100% observed entries in ΩX. The oracle SVM approach achieves label error of 20.9(0.1), 20.4(0.2), and 20.1(0.3) for ω =40%, 60%, and 80% observed labels, respectively. Both MC-b and MC-1 significantly outperform this oracle under paired t-tests at significance level 0.05. We attribute this advantage to a combination of multi-label learning and transduction that is intrinsic to our matrix completion methods. Table 5: Performance on the yeast data. ω =40% 60% 80% Algorithm ω =40% 60% 80% 16.1(0.3) 12.2(0.3) 8.7(0.4) MC-b 0.83(0.02) 0.76(0.00) 0.73(0.02) 16.7(0.3) 13.0(0.2) 8.5(0.4) MC-1 0.86(0.00) 0.92(0.00) 0.74(0.00) 21.5(0.3) 20.8(0.3) 20.3(0.3) FPC+SVM 0.81(0.00) 0.76(0.00) 0.72(0.00) 22.0(0.2) 21.2(0.2) 20.4(0.2) EM1+SVM 1.15(0.02) 1.04(0.02) 0.77(0.01) 21.7(0.2) 21.1(0.2) 20.5(0.4) Mean+SVM 1.00(0.00) 1.00(0.00) 1.00(0.00) 21.6(0.2) 21.1(0.2) 20.5(0.4) Zero+SVM 1.00(0.00) 1.00(0.00) 1.00(0.00) transductive label error relative feature imputation error 5 Discussions and Future Work We have introduced two matrix completion methods for multi-label transductive learning with missing features, which outperformed several baselines. In terms of problem formulation, our methods differ considerably from sparse multi-task learning [11, 1, 13] in that we regularize the feature and label matrix directly, without ever learning explicit weight vectors. Our methods also differ from multi-label prediction via reduction to binary classification or ranking [15], and via compressed sensing [7], which assumes sparsity in that each item has a small number of positive labels, rather than the low-rank nature of feature matrices. These methods do not naturally allow for missing features. Yet other multi-label methods identify a subspace of highly predictive features across tasks in a first stage, and learn in this subspace in a second stage [8, 12]. Our methods do not require separate stages. Learning in the presence of missing data typically involves imputation followed by learning with completed data [9]. Our methods perform imputation plus learning in one step, similar to EM on missing labels and features [6], but the underlying model assumption is quite different. A drawback of our methods is their restriction to linear classifiers only. One future extension is to explicitly map the partial feature matrix to a partially observed polynomial (or other) kernel Gram matrix, and apply our methods there. Though such mapping proliferates the missing entries, we hope that the low-rank structure in the kernel matrix will allow us to recover labels that are nonlinear functions of the original features. Acknowledgements: This work is supported in part by NSF IIS-0916038, NSF IIS-0953219, AFOSR FA955009-1-0313, and AFOSR A9550-09-1-0423. We also wish to thank Brian Eriksson for useful discussions and source code implementing EM-based imputation. 4Available at http://mulan.sourceforge.net/datasets.html 8 References [1] Andreas Argyriou, Charles A. Micchelli, and Massimiliano Pontil. On spectral learning. Journal of Machine Learning Research, 11:935–953, 2010. [2] Emmanuel J. Cand`es and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9:717–772, 2009. [3] Emmanuel J. Cand`es and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Transactions on Information Theory, 56:2053–2080, 2010. [4] Olivier Chapelle, Alexander Zien, and Bernhard Sch¨olkopf, editors. Semi-supervised learning. MIT Press, 2006. [5] Andr´e Elisseeff and Jason Weston. A kernel method for multi-labelled classification. In Thomas G. Dietterich, Suzanna Becker, and Zoubin Ghahramani, editors, NIPS, pages 681– 687. MIT Press, 2001. [6] Zoubin Ghahramani and Michael I. Jordan. Supervised learning from incomplete data via an EM approach. In Advances in Neural Information Processing Systems 6, pages 120–127. Morgan Kaufmann, 1994. [7] Daniel Hsu, Sham Kakade, John Langford, and Tong Zhang. Multi-label prediction via compressed sensing. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 772–780. 2009. [8] Shuiwang Ji, Lei Tang, Shipeng Yu, and Jieping Ye. Extracting shared subspace for multi-label classification. In KDD ’08: Proceeding of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 381–389, New York, NY, USA, 2008. ACM. [9] Roderick J. A. Little and Donald B. Rubin. Statistical Analysis with Missing Data. WileyInterscience, 2nd edition, September 2002. [10] Shiqian Ma, Donald Goldfarb, and Lifeng Chen. Fixed point and Bregman iterative methods for matrix rank minimization. Mathematical Programming Series A, to appear (published online September 23, 2009). [11] Guillaume Obozinski, Ben Taskar, and Michael I. Jordan. Joint covariate selection and joint subspace selection for multiple classification problems. Statistics and Computing, 20(2):231– 252, 2010. [12] 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. [13] Nathan Srebro and Adi Shraibman. Rank, trace-norm and max-norm. In Proceedings of the 18th Annual Conference on Learning Theory, pages 545–560. Springer-Verlag, 2005. [14] K. Trohidis, G. Tsoumakas, G. Kalliris, and I. Vlahavas. Multilabel classification of music into emotions. In Proc. 9th International Conference on Music Information Retrieval (ISMIR 2008), Philadelphia, PA, USA, 2008, 2008. [15] G. Tsoumakas, I. Katakis, and I. Vlahavas. Mining multi-label data. In Data Mining and Knowledge Discovery Handbook. Springer, 2nd edition, 2010. [16] Xiaojin Zhu and Andrew B. Goldberg. Introduction to Semi-Supervised Learning. Morgan & Claypool, 2009. 9
2010
12
3,877
Error Propagation for Approximate Policy and Value Iteration Amir massoud Farahmand Department of Computing Science University of Alberta Edmonton, Canada, T6G 2E8 amirf@ualberta.ca R´emi Munos Sequel Project, INRIA Lille Lille, France remi.munos@inria.fr Csaba Szepesv´ari ∗ Department of Computing Science University of Alberta Edmonton, Canada, T6G 2E8 szepesva@ualberta.ca Abstract We address the question of how the approximation error/Bellman residual at each iteration of the Approximate Policy/Value Iteration algorithms influences the quality of the resulted policy. We quantify the performance loss as the Lp norm of the approximation error/Bellman residual at each iteration. Moreover, we show that the performance loss depends on the expectation of the squared Radon-Nikodym derivative of a certain distribution rather than its supremum – as opposed to what has been suggested by the previous results. Also our results indicate that the contribution of the approximation/Bellman error to the performance loss is more prominent in the later iterations of API/AVI, and the effect of an error term in the earlier iterations decays exponentially fast. 1 Introduction The exact solution for the reinforcement learning (RL) and planning problems with large state space is difficult or impossible to obtain, so one usually has to aim for approximate solutions. Approximate Policy Iteration (API) and Approximate Value Iteration (AVI) are two classes of iterative algorithms to solve RL/Planning problems with large state spaces. They try to approximately find the fixedpoint solution of the Bellman optimality operator. AVI starts from an initial value function V0 (or Q0), and iteratively applies an approximation of T ∗, the Bellman optimality operator, (or T π for the policy evaluation problem) to the previous estimate, i.e., Vk+1 ≈T ∗Vk. In general, Vk+1 is not equal to T ∗Vk because (1) we do not have direct access to the Bellman operator but only some samples from it, and (2) the function space in which V belongs is not representative enough. Thus there would be an approximation error εk = T ∗Vk −Vk+1 between the result of the exact VI and AVI. Some examples of AVI-based approaches are tree-based Fitted Q-Iteration of Ernst et al. [1], multilayer perceptron-based Fitted Q-Iteration of Riedmiller [2], and regularized Fitted Q-Iteration of Farahmand et al. [3]. See the work of Munos and Szepesv´ari [4] for more information about AVI. ∗Csaba Szepesv´ari is on leave from MTA SZTAKI. We would like to acknowledge the insightful comments by the reviewers. This work was partly supported by AICML, AITF, NSERC, and PASCAL2 under no216886. 1 API is another iterative algorithm to find an approximate solution to the fixed point of the Bellman optimality operator. It starts from a policy π0, and then approximately evaluates that policy π0, i.e., it finds a Q0 that satisfies T π0Q0 ≈Q0. Afterwards, it performs a policy improvement step, which is to calculate the greedy policy with respect to (w.r.t.) the most recent action-value function, to get a new policy π1, i.e., π1(·) = arg maxa∈A Q0(·, a). The policy iteration algorithm continues by approximately evaluating the newly obtained policy π1 to get Q1 and repeating the whole process again, generating a sequence of policies and their corresponding approximate action-value functions Q0 →π1 →Q1 →π2 →· · · . Same as AVI, we may encounter a difference between the approximate solution Qk (T πkQk ≈Qk) and the true value of the policy Qπk, which is the solution of the fixed-point equation T πkQπk = Qπk. Two convenient ways to describe this error is either by the Bellman residual of Qk (εk = Qk −T πkQk) or the policy evaluation approximation error (εk = Qk −Qπk). API is a popular approach in RL literature. One well-known algorithm is LSPI of Lagoudakis and Parr [5] that combines Least-Squares Temporal Difference (LSTD) algorithm (Bradtke and Barto [6]) with a policy improvement step. Another API method is to use the Bellman Residual Minimization (BRM) and its variants for policy evaluation and iteratively apply the policy improvement step (Antos et al. [7], Maillard et al. [8]). Both LSPI and BRM have many extensions: Farahmand et al. [9] introduced a nonparametric extension of LSPI and BRM and formulated them as an optimization problem in a reproducing kernel Hilbert space and analyzed its statistical behavior. Kolter and Ng [10] formulated an l1 regularization extension of LSTD. See Xu et al. [11] and Jung and Polani [12] for other examples of kernel-based extension of LSTD/LSPI, and Taylor and Parr [13] for a unified framework. Also see the proto-value function-based approach of Mahadevan and Maggioni [14] and iLSTD of Geramifard et al. [15]. A crucial question in the applicability of API/AVI, which is the main topic of this work, is to understand how either the approximation error or the Bellman residual at each iteration of API or AVI affects the quality of the resulted policy. Suppose we run API/AVI for K iterations to obtain a policy πK. Does the knowledge that all εks are small (maybe because we have had a lot of samples and used powerful function approximators) imply that V πK is close to the optimal value function V ∗ too? If so, how does the errors occurred at a certain iteration k propagate through iterations of API/AVI and affect the final performance loss? There have already been some results that partially address this question. As an example, Proposition 6.2 of Bertsekas and Tsitsiklis [16] shows that for API applied to a finite MDP, we have lim supk→∞∥V ∗−V πk∥∞≤ 2γ (1−γ)2 lim supk→∞∥V πk −Vk∥∞where γ is the discount facto. Similarly for AVI, if the approximation errors are uniformly bounded (∥T ∗Vk −Vk+1∥∞≤ε), we have lim supk→∞∥V ∗−V πk∥∞≤ 2γ (1−γ)2 ε (Munos [17]). Nevertheless, most of these results are pessimistic in several ways. One reason is that they are expressed as the supremum norm of the approximation errors ∥V πk −Vk∥∞or the Bellman error ∥Qk −T πkQk∥∞. Compared to Lp norms, the supremum norm is conservative. It is quite possible that the result of a learning algorithm has a small Lp norm but a very large L∞norm. Therefore, it is desirable to have a result expressed in Lp norm of the approximation/Bellman residual εk. In the past couple of years, there have been attempts to extend L∞norm results to Lp ones [18, 17, 7]. As a typical example, we quote the following from Antos et al. [7]: Proposition 1 (Error Propagation for API – [7]). Let p ≥1 be a real and K be a positive integer. Then, for any sequence of functions {Q(k)} ⊂B(X × A; Qmax)(0 ≤k < K), the space of Qmaxbounded measurable functions, and their corresponding Bellman residuals εk = Qk −T πQk, the following inequalities hold: ∥Q∗−QπK∥p,ρ ≤ 2γ (1 −γ)2  C1/p ρ,ν max 0≤k<K ∥εk∥p,ν + γ K p −1 Rmax  , where Rmax is an upper bound on the magnitude of the expected reward function and Cρ,ν = (1 −γ)2 X m≥1 mγm−1 sup π1,...,πm d (ρP π1 · · · P πm) dν ∞ . This result indeed uses Lp norm of the Bellman residuals and is an improvement over results like Bertsekas and Tsitsiklis [16, Proposition 6.2], but still is pessimistic in some ways and does 2 not answer several important questions. For instance, this result implies that the uniform-over-alliterations upper bound max0≤k<K ∥εk∥p,ν is the quantity that determines the performance loss. One may wonder if this condition is really necessary, and ask whether it is better to put more emphasis on earlier/later iterations? Or another question is whether the appearance of terms in the form of || d(ρP π1···P πm) dν ||∞is intrinsic to the difficulty of the problem or can be relaxed. The goal of this work is to answer these questions and to provide tighter upper bounds on the performance loss of API/AVI algorithms. These bounds help one understand what factors contribute to the difficulty of a learning problem. We base our analysis on the work of Munos [17], Antos et al. [7], Munos [18] and provide upper bounds on the performance loss in the form of ∥V ∗−V πk∥1,ρ (the expected loss weighted according to the evaluation probability distribution ρ – this is defined in Section 2) for API (Section 3) and AVI (Section 4). This performance loss depends on a certain function of ν-weighted L2 norms of εks, in which ν is the data sampling distribution, and Cρ,ν(K) that depends on the MDP, two probability distributions ρ and ν, and the number of iterations K. In addition to relating the performance loss to Lp norm of the Bellman residual/approximation error, this work has three main contributions that to our knowledge have not been considered before: (1) We show that the performance loss depends on the expectation of the squared Radon-Nikodym derivative of a certain distribution, to be specified in Section 3, rather than its supremum. The difference between this expectation and the supremum can be considerable. For instance, for a finite state space with N states, the ratio can be of order O(N 1/2). (2) The contribution of the Bellman/approximation error to the performance loss is more prominent in later iterations of API/AVI. and the effect of an error term in early iterations decays exponentially fast. (3) There are certain structures in the definition of concentrability coefficients that have not been explored before. We thoroughly discuss these qualitative/structural improvements in Section 5. 2 Background In this section, we provide a very brief summary of some of the concepts and definitions from the theory of Markov Decision Processes (MDP) and reinforcement learning (RL) and a few other notations. For further information about MDPs and RL the reader is referred to [19, 16, 20, 21]. A finite-action discounted MDP is a 5-tuple (X, A, P, R, γ), where X is a measurable state space, A is a finite set of actions, P is the probability transition kernel, R is the reward kernel, and 0 ≤γ < 1 is the discount factor. The transition kernel P is a mapping with domain X × A evaluated at (x, a) ∈X × A that gives a distribution over X, which we shall denote by P(·|x, a). Likewise, R is a mapping with domain X × A that gives a distribution of immediate reward over R, which is denoted by R(·|x, a). We denote r(x, a) = E [R(·|x, a)], and assume that its absolute value is bounded by Rmax. A mapping π : X →A is called a deterministic Markov stationary policy, or just a policy in short. Following a policy π in an MDP means that at each time step At = π(Xt). Upon taking action At at Xt, we receive reward Rt ∼R(·|x, a), and the Markov chain evolves according to Xt+1 ∼P(·|Xt, At). We denote the probability transition kernel of following a policy π by P π, i.e., P π(dy|x) = P(dy|x, π(x)). The value function V π for a policy π is defined as V π(x) ≜E hP∞ t=0 γtRt X0 = x i and the action-value function is defined as Qπ(x, a) ≜E hP∞ t=0 γtRt X0 = x, A0 = a i . For a discounted MDP, we define the optimal value and action-value functions by V ∗(x) = supπ V π(x) (∀x ∈X) and Q∗(x, a) = supπ Qπ(x, a) (∀x ∈X, ∀a ∈A). We say that a policy π∗is optimal if it achieves the best values in every state, i.e., if V π∗= V ∗. We say that a policy π is greedy w.r.t. an action-value function Q and write π = ˆπ(·; Q), if π(x) ∈arg maxa∈A Q(x, a) holds for all x ∈X. Similarly, the policy π is greedy w.r.t. V , if for all x ∈X, π(x) ∈ argmaxa∈A R P(dx′|x, a)[r(x, a) + γV (x′)] (If there exist multiple maximizers, some maximizer is chosen in an arbitrary deterministic manner). Greedy policies are important because a greedy policy w.r.t. Q∗(or V ∗) is an optimal policy. Hence, knowing Q∗is sufficient for behaving optimally (cf. Proposition 4.3 of [19]). 3 We define the Bellman operator for a policy π as (T πV )(x) ≜r(x, π(x)) + γ R V π(x′)P(dx′|x, a) and (T πQ)(x, a) ≜r(x, a) + γ R Q(x′, π(x′))P(dx′|x, a). Similarly, the Bellman optimality operator is defined as (T ∗V )(x) ≜maxa n r(x, a) + γ R V (x′)P(dx′|x, a) o and (T ∗Q)(x, a) ≜ r(x, a) + γ R maxa′ Q(x′, a′)P(dx′|x, a). For a measurable space X, with a σ-algebra σX , we define M(X) as the set of all probability measures over σX . For a probability measure ρ ∈M(X) and the transition kernel P π, we define ρP π(dx′) = R P(dx′|x, π(x))dρ(x). In words, ρ(P π)m ∈M(X) is an m-step-ahead probability distribution of states if the starting state distribution is ρ and we follow P π for m steps. In what follows we shall use ∥V ∥p,ν to denote the Lp(ν)-norm of a measurable function V : X →R: ∥V ∥p p,ν ≜ν|V |p ≜ R X |V (x)|pdν(x). For a function Q : X × A 7→R, we define ∥Q∥p p,ν ≜ 1 |A| P a∈A R X |Q(x, a)|pdν(x). 3 Approximate Policy Iteration Consider the API procedure and the sequence Q0 →π1 →Q1 →π2 →· · · →QK−1 →πK, where πk is the greedy policy w.r.t. Qk−1 and Qk is the approximate action-value function for policy πk. For the sequence {Qk}K−1 k=0 , denote the Bellman Residual (BR) and policy Approximation Error (AE) at each iteration by εBR k = Qk −T πkQk, (1) εAE k = Qk −Qπk. (2) The goal of this section is to study the effect of ν-weighted L2p norm of the Bellman residual sequence {εBR k }K−1 k=0 or the policy evaluation approximation error sequence {εAE k }K−1 k=0 on the performance loss ∥Q∗−QπK∥p,ρ of the outcome policy πK. The choice of ρ and ν is arbitrary, however, a natural choice for ν is the sampling distribution of the data, which is used by the policy evaluation module. On the other hand, the probability distribution ρ reflects the importance of various regions of the state space and is selected by the practitioner. One common choice, though not necessarily the best, is the stationary distribution of the optimal policy. Because of the dynamical nature of MDP, the performance loss ∥Q∗−QπK∥p,ρ depends on the difference between the sampling distribution ν and the future-state distribution in the form of ρP π1P π2 · · · . The precise form of this dependence will be formalized in Theorems 3 and 4. Before stating the results, we require to define the following concentrability coefficients. Definition 2 (Expected Concentrability of the Future-State Distribution). Given ρ, ν ∈M(X), ν ≪λ1 (λ is the Lebesgue measure), m ≥0, and an arbitrary sequence of stationary policies {πm}m≥1, let ρP π1P π2 . . . P πm ∈M(X) denote the future-state distribution obtained when the first state is distributed according to ρ and then we follow the sequence of policies {πk}m k=1. Define the following concentrability coefficients that is used in API analysis: cPI1,ρ,ν(m1, m2; π) ≜  EX∼ν   d ρ(P π∗)m1(P π)m2 dν (X) 2    1 2 , cPI2,ρ,ν(m1, m2; π1, π2) ≜  EX∼ν   d ρ(P π∗)m1(P π1)m2P π2 dν (X) 2    1 2 , cPI3,ρ,ν ≜  EX∼ν   d ρP π∗ dν (X) 2    1 2 , 1For two measures ν1 and ν2 on the same measurable space, we say that ν1 is absolutely continuous with respect to ν2 (or ν2 dominates ν1) and denote ν1 ≪ν2 iff ν2(A) = 0 ⇒ν1(A) = 0. 4 with the understanding that if the future-state distribution ρ(P π∗)m1(P π)m2 (or ρ(P π∗)m1(P π1)m2P π2 or ρP π∗) is not absolutely continuous w.r.t. ν, then we take cPI1,ρ,ν(m1, m2; π) = ∞(similar for others). Also define the following concentrability coefficient that is used in AVI analysis: cVI,ρ,ν(m1, m2; π) ≜  EX∼ν   d ρ(P π)m1(P π∗)m2 dν (X) 2    1 2 , with the understanding that if the future-state distribution ρ(P π∗)m1(P π)m2 is not absolutely continuous w.r.t. ν, then we take cVI,ρ,ν(m1, m2; π) = ∞. In order to compactly present our results, we define the following notation: αk = (1 −γ)γK−k−1 1 −γK+1 0 ≤k < K. Theorem 3 (Error Propagation for API). Let p ≥1 be a real number, K be a positive integer, and Qmax ≤Rmax 1−γ . Then for any sequence {Qk}K−1 k=0 ⊂B(X × A, Qmax) (space of Qmax-bounded measurable functions defined on X × A) and the corresponding sequence {εk}K−1 k=0 defined in (1) or (2) , we have ∥Q∗−QπK∥p,ρ ≤ 2γ (1 −γ)2  inf r∈[0,1] C 1 2p PI(BR/AE),ρ,ν(K; r)E 1 2p (ε0, . . . , εK−1; r) + γ K p −1Rmax  . where E(ε0, . . . , εK−1; r) = PK−1 k=0 α2r k ∥εk∥2p 2p,ν. (a) If εk = εBR for all 0 ≤k < K, we have CPI(BR),ρ,ν(K; r) = (1 −γ 2 )2 sup π′ 0,...,π′ K K−1 X k=0 α2(1−r) k X m≥0 γm cPI1,ρ,ν(K −k −1, m + 1; π′ k+1)+ cPI1,ρ,ν(K −k, m; π′ k) !2 . (b) If εk = εAE for all 0 ≤k < K, we have CPI(AE),ρ,ν(K; r, s) = (1 −γ 2 )2 sup π′ 0,...,π′ K K−1 X k=0 α2(1−r) k X m≥0 γmcPI1,ρ,ν(K −k −1, m + 1; π′ k+1)+ X m≥1 γmcPI2,ρ,ν(K −k −1, m; π′ k+1, π′ k) + cPI3,ρ,ν !2 . 4 Approximate Value Iteration Consider the AVI procedure and the sequence V0 →V1 →· · · →VK−1, in which Vk+1 is the result of approximately applying the Bellman optimality operator on the previous estimate Vk, i.e., Vk+1 ≈T ∗Vk. Denote the approximation error caused at each iteration by εk = T ∗Vk −Vk+1. (3) The goal of this section is to analyze AVI procedure and to relate the approximation error sequence {εk}K−1 k=0 to the performance loss ∥V ∗−V πK∥p,ρ of the obtained policy πK, which is the greedy policy w.r.t. VK−1. 5 Theorem 4 (Error Propagation for AVI). Let p ≥1 be a real number, K be a positive integer, and Vmax ≤ Rmax 1−γ . Then for any sequence {Vk}K−1 k=0 ⊂B(X, Vmax), and the corresponding sequence {εk}K−1 k=0 defined in (3), we have ∥V ∗−V πK∥p,ρ ≤ 2γ (1 −γ)2  inf r∈[0,1] C 1 2p VI,ρ,ν(K; r)E 1 2p (ε0, . . . , εK−1; r) + 2 1 −γ γ K p Rmax  , where CVI,ρ,ν(K; r) = (1 −γ 2 )2 sup π′ K−1 X k=0 α2(1−r) k  X m≥0 γm (cVI,ρ,ν(m, K −k; π′) + cVI,ρ,ν(m + 1, K −k −1; π′))   2 , and E(ε0, . . . , εK−1; r) = PK−1 k=0 α2r k ∥εk∥2p 2p,ν. 5 Discussion In this section, we discuss significant improvements of Theorems 3 and 4 over previous results such as [16, 18, 17, 7]. 5.1 Lp norm instead of L∞norm As opposed to most error upper bounds, Theorems 3 and 4 relate ∥V ∗−V πK∥p,ρ to the Lp norm of the approximation or Bellman errors ∥εk∥2p,ν of iterations in API/AVI. This should be contrasted with the traditional, and more conservative, results such as lim supk→∞∥V ∗−V πk∥∞≤ 2γ (1−γ)2 lim supk→∞∥V πk −Vk∥∞for API (Proposition 6.2 of Bertsekas and Tsitsiklis [16]). The use of Lp norm not only is a huge improvement over conservative supremum norm, but also allows us to benefit from the vast literature on supervised learning techniques, which usually provides error upper bounds in the form of Lp norms, in the context of RL/Planning problems. This is especially interesting for the case of p = 1 as the performance loss ∥V ∗−V πK∥1,ρ is the difference between the expected return of the optimal policy and the resulted policy πK when the initial state distribution is ρ. Convenient enough, the errors appearing in the upper bound are in the form of ∥εk∥2,ν which is very common in the supervised learning literature. This type of improvement, however, has been done in the past couple of years [18, 17, 7] - see Proposition 1 in Section 1. 5.2 Expected versus supremum concentrability of the future-state distribution The concentrability coefficients (Definition 2) reflect the effect of future-state distribution on the performance loss ∥V ∗−V πK∥p,ρ. Previously it was thought that the key contributing factor to the performance loss is the supremum of the Radon-Nikodym derivative of these two distributions. This is evident in the definition of Cρ,ν in Proposition 1 where we have terms in the form of || d(ρ(P π)m) dν ||∞ instead of  EX∼ν h | d(ρ(P π)m) dν (X)|2i 1 2 that we have in Definition 2. Nevertheless, it turns out that the key contributing factor that determines the performance loss is the expectation of the squared Radon-Nikodym derivative instead of its supremum. Intuitively this implies that even if for some subset of X ′ ⊂X the ratio d(ρ(P π)m) dν is large but the probability ν(X ′) is very small, performance loss due to it is still small. This phenomenon has not been suggested by previous results. As an illustration of this difference, consider a Chain Walk with 1000 states with a single policy that drifts toward state 1 of the chain. We start with ρ(x) = 1 201 for x ∈[400, 600] and zero everywhere else. Then we evaluate both || d(ρ(P π)m) dν ||∞and (EX∼ν h | d(ρ(P π)m) dν |2i ) 1 2 for m = 1, 2, . . . when ν is the uniform distribution. The result is shown in Figure 1a. One sees that the ratio is constant in the beginning, but increases when the distribution ρ(P π)m concentrates around state 1, until it reaches steady-state. The growth and the final value of the expectation-based concentrability coefficient is much smaller than that of supremum-based. 6 1 500 1000 1500 10 0 10 1 10 2 10 3 Step (m) Concentrability Coefficients Infinity norm−based concentrability Expectation−base concentrability (a) 10 20 40 60 80 100 120 140 160 180 200 0.2 0.3 0.4 0.5 0.6 0.8 1 1.5 2 3 4 5 Iteration L1 error Uniform Exponential (b) Figure 1: (a) Comparison of EX∼ν h | d(ρ(P π)m) dν |2i 1 2 and d(ρ(P π)m) dν ∞(b) Comparison of ∥Q∗−Qk∥1 for uniform and exponential data sampling schedule. The total number of samples is the same. [The Y -scale of both plots is logarithmic.] It is easy to show that if the Chain Walk has N states and the policy has the same concentrating behavior and ν is uniform, then || d(ρ(P π)m) dν ||∞→N, while (EX∼ν h | d(ρ(P π)m) dν |2i ) 1 2 → √ N when m →∞. The ratio, therefore, would be of order Θ( √ N). This clearly shows the improvement of this new analysis in a simple problem. One may anticipate that this sharper behavior happens in many other problems too. More generally, consider C∞= || dµ dν ||∞and CL2 = (EX∼ν h | dµ dν |2i ) 1 2 . For a finite state space with N states and ν is the uniform distribution, C∞≤N but CL2 ≤ √ N. Neglecting all other differences between our results and the previous ones, we get a performance upper bound in the form of ∥Q∗−QπK∥1,ρ ≤c1(γ)O(N 1/4) supk ∥εk∥2,ν, while Proposition 1 implies that ∥Q∗−QπK∥1,ρ ≤c2(γ)O(N 1/2) supk ||ϵk||2,ν. This difference between O(N 1/4) and O(N 1/2) shows a significant improvement. 5.3 Error decaying property Theorems 3 and 4 show that the dependence of performance loss ∥V ∗−V πK∥p,ρ (or ∥Q∗−QπK∥p,ρ) on {εk}K−1 k=0 is in the form of E(ε0, . . . , εK−1; r) = PK−1 k=0 α2r k ∥εk∥2p 2p,ν. This has a very special structure in that the approximation errors at later iterations have more contribution to the final performance loss. This behavior is obscure in previous results such as [17, 7] that the dependence of the final performance loss is expressed as E(ε0, . . . , εK−1; r) = maxk=0,...,K−1 ∥εk∥p,ν (see Proposition 1). This property has practical and algorithmic implications too. It says that it is better to put more effort on having a lower Bellman or approximation error at later iterations of API/AVI. This, for instance, can be done by gradually increasing the number of samples throughout iterations, or to use more powerful, and possibly computationally more expensive, function approximators for the later iterations of API/AVI. To illustrate this property, we compare two different sampling schedules on a simple MDP. The MDP is a 100-state, 2-action chain similar to Chain Walk problem in the work of Lagoudakis and Parr [5]. We use AVI with a lookup-table function representation. In the first sampling schedule, every 20 iterations we generate a fixed number of fresh samples by following a uniformly random walk on the chain (this means that we throw away old samples). This is the fixed strategy. In the exponential strategy, we again generate new samples every 20 iterations but the number of samples at the kth iteration is ckγ. The constant c is tuned such that the total number of both sampling strategy is almost the same (we give a slight margin of about 0.1% of samples in favor of the fixed strategy). What we compare is ∥Q∗−Qk∥1,ν when ν is the uniform distribution. The result can be seen in Figure 1b. The improvement of the exponential sampling schedule is evident. Of course, one 7 may think of more sophisticated sampling schedules but this simple illustration should be sufficient to attract the attention of practitioners to this phenomenon. 5.4 Restricted search over policy space One interesting feature of our results is that it puts more structure and restriction on the way policies may be selected. Comparing CPI,ρ,ν(K; r) (Theorem 3) and CVI,ρ,ν(K; r) (Theorem 4) with Cρ,ν (Proposition 1) we see that: (1) Each concentrability coefficient in the definition of CPI,ρ,ν(K; r) depends only on a single or two policies (e.g., π′ k in cPI1,ρ,ν(K −k, m; π′ k)). The same is true for CVI,ρ,ν(K; r). In contrast, the mth term in Cρ,ν has π1, . . . , πm as degrees of freedom, and this number is growing as m →∞. (2) The operator sup in CPI,ρ,ν and CVI,ρ,ν appears outside the summation. Because of that, we only have K + 1 degrees of freedom π′ 0, . . . , π′ K to choose from in API and remarkably only a single degree of freedom in AVI. On the other other hand, sup appears inside the summation in the definition of Cρ,ν. One may construct an MDP that this difference in the ordering of sup leads to an arbitrarily large ratio of two different ways of defining the concentrability coefficients. (3) In API, the definitions of concentrability coefficients cPI1,ρ,ν, cPI2,ρ,ν, and cPI3,ρ,ν (Definition 2) imply that if ρ = ρ∗, the stationary distribution induced by an optimal policy π∗, then cPI1,ρ,ν(m1, m2; π) = cPI1,ρ,ν(·, m2; π) = (EX∼ν  d(ρ∗(P π)m2) dν 2 ) 1 2 (similar for the other two coefficients). This special structure is hidden in the definition of Cρ,ν in Proposition 1, and instead we have an extra m1 degrees of flexibility. Remark 1. For general MDPs, the computation of concentrability coefficients in Definition 2 is difficult, as it is for similar coefficients defined in [18, 17, 7]. 6 Conclusion To analyze an API/AVI algorithm and to study its statistical properties such as consistency or convergence rate, we require to (1) analyze the statistical properties of the algorithm running at each iteration, and (2) study the way the policy approximation/Bellman errors propagate and influence the quality of the resulted policy. The analysis in the first step heavily uses tools from the Statistical Learning Theory (SLT) literature, e.g., Gy¨orfiet al. [22]. In some cases, such as AVI, the problem can be cast as a standard regression with the twist that extra care should be taken to the temporal dependency of data in RL scenario. The situation is a bit more complicated for API methods that directly aim for the fixed-point solution (such as LSTD and its variants), but still the same kind of tools from SLT can be used too – see Antos et al. [7], Maillard et al. [8]. The analysis for the second step is what this work has been about. In our Theorems 3 and 4, we have provided upper bounds that relate the errors at each iteration of API/AVI to the performance loss of the whole procedure. These bounds are qualitatively tighter than the previous results such as those reported by [18, 17, 7], and provide a better understanding of what factors contribute to the difficulty of the problem. In Section 5, we discussed the significance of these new results and the way they improve previous ones. Finally, we should note that there are still some unaddressed issues. Perhaps the most important one is to study the behavior of concentrability coefficients cPI1,ρ,ν(m1, m2; π), cPI2,ρ,ν(m1, m2; π1, π2), and cVI,ρ,ν(m1, m2; π) as a function of m1, m2, and of course the transition kernel P of MDP. A better understanding of this question alongside a good understanding of the way each term εk in E(ε0, . . . , εK−1; r) behaves, help us gain more insight about the error convergence behavior of the RL/Planning algorithms. References [1] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005. 8 [2] Martin Riedmiller. Neural fitted Q iteration – first experiences with a data efficient neural reinforcement learning method. In 16th European Conference on Machine Learning, pages 317–328, 2005. [3] Amir-massoud Farahmand, Mohammad Ghavamzadeh, Csaba Szepesv´ari, and Shie Mannor. Regularized fitted Q-iteration for planning in continuous-space markovian decision problems. In Proceedings of American Control Conference (ACC), pages 725–730, June 2009. [4] R´emi Munos and Csaba Szepesv´ari. Finite-time bounds for fitted value iteration. Journal of Machine Learning Research, 9:815–857, 2008. [5] Michail G. Lagoudakis and Ronald Parr. Least-squares policy iteration. Journal of Machine Learning Research, 4:1107–1149, 2003. [6] Steven J. Bradtke and Andrew G. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22:33–57, 1996. [7] Andr´as Antos, Csaba Szepesv´ari, and R´emi Munos. Learning near-optimal policies with Bellman-residual minimization based fitted policy iteration and a single sample path. Machine Learning, 71:89–129, 2008. [8] Odalric Maillard, R´emi Munos, Alessandro Lazaric, and Mohammad Ghavamzadeh. Finitesample analysis of bellman residual minimization. In Proceedings of the Second Asian Conference on Machine Learning (ACML), 2010. [9] Amir-massoud Farahmand, Mohammad Ghavamzadeh, Csaba Szepesv´ari, and Shie Mannor. Regularized policy iteration. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 441–448. MIT Press, 2009. [10] J. Zico Kolter and Andrew Y. Ng. Regularization and feature selection in least-squares temporal difference learning. In ICML ’09: Proceedings of the 26th Annual International Conference on Machine Learning, pages 521–528, New York, NY, USA, 2009. ACM. [11] Xin Xu, Dewen Hu, and Xicheng Lu. Kernel-based least squares policy iteration for reinforcement learning. IEEE Trans. on Neural Networks, 18:973–992, 2007. [12] Tobias Jung and Daniel Polani. Least squares SVM for least squares TD learning. In In Proc. 17th European Conference on Artificial Intelligence, pages 499–503, 2006. [13] Gavin Taylor and Ronald Parr. Kernelized value function approximation for reinforcement learning. In ICML ’09: Proceedings of the 26th Annual International Conference on Machine Learning, pages 1017–1024, New York, NY, USA, 2009. ACM. [14] Sridhar Mahadevan and Mauro 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. [15] Alborz Geramifard, Michael Bowling, Michael Zinkevich, and Richard S. Sutton. iLSTD: Eligibility traces and convergence analysis. In B. Sch¨olkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems 19, pages 441–448. MIT Press, Cambridge, MA, 2007. [16] Dimitri P. Bertsekas and John N. Tsitsiklis. Neuro-Dynamic Programming (Optimization and Neural Computation Series, 3). Athena Scientific, 1996. [17] R´emi Munos. Performance bounds in lp norm for approximate value iteration. SIAM Journal on Control and Optimization, 2007. [18] R´emi Munos. Error bounds for approximate policy iteration. In ICML 2003: Proceedings of the 20th Annual International Conference on Machine Learning, 2003. [19] Dimitri P. Bertsekas and Steven E. Shreve. Stochastic Optimal Control: The Discrete-Time Case. Academic Press, 1978. [20] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction (Adaptive Computation and Machine Learning). The MIT Press, 1998. [21] Csaba Szepesv´ari. Algorithms for Reinforcement Learning. Morgan Claypool Publishers, 2010. [22] L´aszl´o Gy¨orfi, Michael Kohler, Adam Krzy˙zak, and Harro Walk. A Distribution-Free Theory of Nonparametric Regression. Springer Verlag, New York, 2002. 9
2010
120
3,878
PAC-Bayesian Model Selection for Reinforcement Learning Mahdi Milani Fard School of Computer Science McGill University Montreal, Canada mmilan1@cs.mcgill.ca Joelle Pineau School of Computer Science McGill University Montreal, Canada jpineau@cs.mcgill.ca Abstract This paper introduces the first set of PAC-Bayesian bounds for the batch reinforcement learning problem in finite state spaces. These bounds hold regardless of the correctness of the prior distribution. We demonstrate how such bounds can be used for model-selection in control problems where prior information is available either on the dynamics of the environment, or on the value of actions. Our empirical results confirm that PAC-Bayesian model-selection is able to leverage prior distributions when they are informative and, unlike standard Bayesian RL approaches, ignores them when they are misleading. 1 Introduction Bayesian methods in machine learning, although elegant and concrete, have often been criticized not only for their computational cost, but also for their strong assumptions on the correctness of the prior distribution. There are usually no theoretical guarantees when performing Bayesian inference with priors that do not admit the correct posterior. Probably Approximately Correct (PAC) learning techniques, on the other hand, provide distribution-free convergence guarantees with polynomiallybounded sample sizes [1]. These bounds, however, are notoriously loose and impractical. One can argue that such loose bounds are to be expected, as they reflect the inherent difficulty of the problem when no assumptions are made on the distribution of the data. Both PAC and Bayesian methods have been proposed for reinforcement learning (RL) [2, 3, 4, 5, 6, 7, 8], where an agent is learning to interact with an environment to maximize some objective function. Many of these methods aim to solve the so-called exploration–exploitation problem by balancing the amount of time spent on gathering information about the dynamics of the environment and the time spent acting optimally according to the currently built model. PAC methods are much more conservative than Bayesian methods as they tend to spend more time exploring the system and collecting information [9]. Bayesian methods, on the other hand, are greedier and only solve the problem over a limited planning horizon. As a result of this greediness, Bayesian methods can converge to suboptimal solutions. It has been shown that Bayesian RL is not PAC [9]. We argue here that a more adaptive method can be PAC and at the same time more data efficient if an informative prior is taken into account. Such adaptive techniques have been studied within the PAC-Bayesian literature for supervised learning. The PAC-Bayesian approach, first introduced by McAllester [10] (extending the work of ShaweTaylor et al. [11]), combines the distribution-free correctness of PAC theorems with the dataefficiency of Bayesian inference. This is achieved by removing the assumption of the correctness of the prior and, instead, measuring the consistency of the prior over the training data. The empirical results of model selection algorithms for classification tasks using these bounds are comparable to some of the most popular learning algorithms such as AdaBoost and Support Vector Machines [12]. PAC-Bayesian bounds have also been linked to margins in classification tasks [13]. 1 This paper introduces the first results of the application of PAC-Bayesian techniques to the batch RL problem. We derive two PAC-Bayesian bounds on the approximation error in the value function of stochastic policies for reinforcement learning on observable and discrete state spaces. One is a bound on model-based RL where a prior distribution is given on the space of possible models. The second one is for the case of model-free RL, where a prior is given on the space of value functions. In both cases, the bound depends both on an empirical estimate and a measure of distance between the stochastic policy and the one imposed by the prior distribution. We present empirical results where model-selection is performed based on these bounds, and show that PAC-Bayesian bounds follow Bayesian policies when the prior is informative and mimic the PAC policies when the prior is not consistent with the data. This allows us to adaptively balance between the distribution-free correctness of PAC and the data-efficiency of Bayesian inference. 2 Background and Notation In this section, we introduce the notations and definitions used in the paper. A Markov Decision Process (MDP) M = (S, A, T, R) is defined by a set of states S, a set of actions A, a transition function T(s, a, s′) defined as: T(s, a, s′) = p(st+1 = s′|st = s, at = a), ∀s, s′ ∈S, a ∈A, (1) and a (possibly stochastic) reward function R(s, a) : S ×A →[Rmin, Rmax]. Throughout the paper we assume finite-state, finite-action, discounted-reward MDPs, with the discount factor denoted by γ. A reinforcement learning agent chooses an action and receives a reward. The environment will then change to a new state according to the transition probabilities. A policy is a (possibly stochastic) function from states to actions. The value of a state–action pair (s, a) for policy π, denoted by Qπ(s, a), is the expected discounted sum of rewards (P t γtrt) if the agent acts according to that policy after taking action a in the first step. The value function satisfies the Bellman equation [14]: Qπ(s, a) = R(s, a) + γ X s′∈S (T(s, a, s′)Qπ(s′, π(s′))) . (2) The optimal policy is the policy that maximizes the value function. The optimal value of a state– action pair, denoted by Q∗(s, a), satisfies the Bellman optimality equation [14]: Q∗(s, a) = R(s, a) + γ X s′∈S  T(s, a, s′) max a′∈A Q∗(s′, a′)  . (3) There are many methods developed to find the optimal policy for a given MDP when transition and reward functions are known. Value iteration [14] is a simple dynamic programming method in which one iteratively applies the Bellman optimality operator, denoted by B, to an initial guess of the optimal value function: BQ(s, a) = R(s, a) + γ X s′∈S  T(s, a, s′) max a′∈A Q(s′, a′)  . (4) For simplicity we write BQ when B is applied to the value of all state–action pairs. Since B is a contraction with respect to the infinity norm [15] (i.e. ∥BQ −BQ′∥∞≤γ∥Q −Q′∥∞), the value iteration algorithm will converge to the fixed point of the Bellman optimality operator, which is the optimal value function (BQ∗= Q∗). 3 Model-Based PAC-Bayesian Bound In model-based RL, one aims to estimate the transition and reward functions and then act optimally according to the estimated models. PAC methods use the empirical average for their estimated model along with frequentist bounds. Bayesian methods use the Bayesian posterior to estimate the model. This section provides a bound that suggests an adaptive method to choose a stochastic estimate between these two extremes, which is both data-efficient and has guaranteed performance. 2 Assuming that the reward model is known (we make this assumption throughout this section), one can build empirical models of the transition dynamics by gathering sample transitions, denoted by U, and taking the empirical average. Let this empirical average model be ˆT(s, a, s′) = ns,a,s′/ns,a, where ns,a,s′ and ns,a are the number of corresponding transitions and samples. Trivially, E ˆT = T. The empirical value function, denoted by ˆQ, is defined to be the value function on an MDP with the empirical transition model. As one observes more and more sample trajectories on the MDP, the empirical model gets increasingly more accurate, and so will the empirical value function. Different forms of the following lemma, connecting the error rates on ˆT and ˆQ, are used in many of the PAC-MDP results [4]: Lemma 1. There is a constant k ≥(1 −γ)2/γ such that: ∀s, a : ∥ˆT(s, a, .) −T(s, a, .)∥1 ≤kϵ ⇒ ∀π : ∥ˆQπ −Qπ∥∞≤ϵ. (5) As a consequence of the above lemma, one can act near-optimally in the part of the MDP for which we have gathered enough samples to have a good empirical estimate of the transition model. PACMDP methods explicitly [2] or implicitly [3] use that fact to exploit the knowledge on the model as long as they are in the “known” part of the state space. The downside of these methods is that without further assumptions on the model, it will take a large number of sample transitions to get a good empirical estimate of the transition model. The Bayesian approach to modeling the transition dynamics, on the other hand, starts with a prior distribution over the transition probability and then marginalizes this prior over the data to get a posterior distribution. This is usually done by assuming independent Dirichlet distributions over the transition probabilities, with some initial count vector α, and then adding up the observed counts to this initial vector to get the conjugate posterior [6]. The initial α-vector encodes the prior knowledge on the transition probabilities, and larger initial values further bias the empirical observation towards the initial belief. If a strong prior is close to the true values, the Bayesian posterior will be more accurate than the empirical point estimate. However, a strong prior peaked on the wrong values will bias the Bayesian model away from the correct probabilities. Therefore, the Bayesian posterior might not provide the optimal estimate of the model parameters. A good posterior distribution might be somewhere between the empirical point estimate and the Bayesian posterior. The following theorem is the first PAC-Bayesian bound on the estimation error in the value function when we build a stochastic policy1 based on some arbitrary posterior distribution Mq. Theorem 2. Let π∗ T ′ be the optimal policy with respect to the MDP with transition model T ′ and ∆T ′ = ∥ˆQπ∗ T ′ −Qπ∗ T ′ ∥∞. For any prior distribution Mp on the transition model, any posterior Mq, any i.i.d. sampling distribution U, with probability no less than 1 −δ over the sampling of U ∼U: ∀Mq : ET ′∼Mq∆T ′ ≤ s D(Mq∥Mp) −ln δ + |S| ln 2 + ln |S| + ln nmin (nmin −1)k2/2 , (6) where nmin = mins,a ns,a and D(.∥.) is the Kullback–Leibler (KL) divergence. The above theorem (proved in the Appendix) provides a lower bound on the expectation of the true value function when the policy is taken to be optimal according to the sampled model from the posterior: EQπ∗ T ′ ≥E ˆQπ∗ T ′ −˜O q D(Mq∥Mp)/nmin  . (7) This lower bound suggests a stochastic model-selection method in which one searches in the space of posteriors to maximize the bound. Notice that there are two elements to the above bound. One is the PAC part of the bound that suggests the selection of models with high empirical value functions for their optimal policy. There is also a penalty term (or a regularization term) that penalizes distributions that are far from the prior (the Bayesian side of the bound). 1This is a more general form of stochastic policy than is usually seen in the RL literature. A complete policy is sampled from an imposed distribution, correlating the selection of actions on different states. 3 Margin for Deterministic Policies One could apply Theorem 2 with any choice Mq. Generally, this will result in a bound on the value of a stochastic policy. However, if the optimal policy is the same for all of the possible samples from the posterior, then we will get a bound for that particular deterministic policy. We define the support of policy π, denoted by Tπ, to be the set of transition models for which the optimal policy is π. Putting all the posterior probability on Tπ will result in a tighter bound for the value of the policy π. The tightest bound occurs when Mq is a scaled version of Mp summing to 1 over Tπ, that is when we have: Mq(T ′) = ( Mp(T ′) Mp(Tπ) T ′ ∈Tπ 0 T ′ /∈Tπ (8) In that case, the KL divergence is D(Mq∥Mp) = −ln Mp(Tπ), and the bound will be: EQπ∗ T ′ ≥E ˆQπ∗ T ′ −˜O q −ln Mp(Tπ)/nmin  . (9) Intuitively, we will get tighter bounds for policies that have larger empirical values and higher prior probabilities supporting them. Finding Mp(Tπ) might not be computationally tractable. Therefore, we define a notion of margin for transition functions and policies and use it to get tractable bounds. The margin of a transition function T ′, denoted by θT ′, is the maximum distance we can move away from T ′ such that the optimal policy does not change: ∥T ′′ −T ′∥1 ≤θT ′ ⇒π∗ T ′′ = π∗ T ′. (10) The margin defines a hypercube around T ′ for which the optimal policy does not change. In cases where the support set of a policy is difficult to find, one can use this hypercube to get a reasonable bound for the true value function of the corresponding policy. In that case, we would define the posterior to be the scaled prior defined only on the margin hypercube. The idea behind this method is similar to that of the Luckiness framework [11] and large-margin classifiers [16, 13]. This shows that the idea of maximizing margins can be applied to control problems as well as classification and regression tasks. To find the margin of any given T ′, if we know the value of the second best policy, we can calculate its regret according to T ′ (it will be the smallest regret ηmin). Using Lemma 1, we can conclude that if ∥T ′′ −T ′∥1 ≤kηmin/2, then the value of the best and second best policies can change by at most ηmin/2, and thus the optimal policy will not change. Therefore, θT ′ ≥kηmin/2. One can then define the posterior on the transitions inside the margin to get a bound for the value function. 4 Model-Free PAC-Bayes Bound In this section we introduce a PAC-Bayesian bound for model-free reinforcement learning on discrete state spaces. This time we assume that we are given a prior distribution on the space of value functions, rather than on transition models. This prior encodes an initial belief about the optimal value function for a given RL domain. This could be useful, for example, in the context of transfer learning, where one has learned a value function in one environment and then uses that as the prior belief on a similar domain. We start by defining the TD error of a given value function Q to be ∥Q −BQ∥∞. In most cases, we do not have access to the Bellman optimality operator. When we only have access to a sample set U collected on the RL domain, we can define the empirical Bellman optimality operator ˆB to be: ˆBQ(s, a) = 1 ns,a X (s,a,s′,r)∈U  r + γ max a′ Q(s′, a′)  , (11) Note that E[ ˆBQ] = BQ. We further make an assumption that all the BQ values we could observe are bounded in the range [cmin, cmax], with c = cmax −cmin. Using this assumption, one can use Hoeffding’s inequality to bound the difference between the empirical and true Bellman operators: Pr{| ˆBQ(s, a) −BQ(s, a)| > ϵ} ≤e−2ns,aϵ2/c2. (12) 4 When the true Bellman operator is not known, one makes use of the empirical TD error, similarly defined to be ∥Q −ˆBQ∥∞. Q-learning [14] and its derivations with function approximation [17], and also batch methods such as LSTD [18], often aim to minimize the empirical (projected) TD error. We argue that it might be better to choose a function that is not a fixed point of the empirical Bellman operator. Instead, we aim to minimize the upper bound on the approximation error (which might be referred to as loss) of the Q function, as compared to the true optimal value. The following theorem (proved in the Appendix) is the first PAC-Bayesian bound for model-free batch RL on discrete state spaces: Theorem 3. Let ∆Q = ∥Q −Q∗∥∞−∥Q−ˆ BQ∥∞ 1−γ . For all prior distributions Jp and posteriors Jq over the space of value functions, with probability no less than 1 −δ over the sampling of U ∼U: ∀Jq : EQ∼Jq∆Q ≤ s D(Jq∥Jp) −ln δ + ln |S| + ln |A| + ln nmin 2(nmin −1)(1 −γ)2/c2 . (13) This time we have an upper bound on the expected approximation error: E∥Q −Q∗∥∞≤E∥Q −ˆBQ∥∞ 1 −γ + ˜O q D(Jq∥Jp)/nmin  . (14) This suggests a model-selection method in which one would search for a posterior Jq to minimize the above bound. The PAC side of the bound guides this model-selection method to look for posteriors with smaller empirical TD error. The Bayesian part, on the other hand, penalizes the selection of posteriors that are far from the prior distribution. One can use general forms of priors that would impose smoothness or sparsity for this modelselection technique. In that sense, this method would act as a regularization technique that penalizes complex and irregular functions. The idea of regularization in RL with function approximation is not new to this work [19]. This bound, however, is more general, as it could incorporate not only smoothness constraints, but also other forms of prior knowledge into the learning process. 5 Empirical Results To illustrate the model-selection techniques based on the bounds in the paper, we consider one model-based RL domain and one model-free problem. The model-based domain is a chain model in which states are ordered by their index. The last state has a reward of 1 and all other states have reward 0. There are two types of actions. One is a stochastic “forward” operation which moves us to the next state in the chain with probability 0.5 and otherwise makes a random transition. The second type is a stochastic “reset” which moves the system to the first state in the chain with probability 0.5 and makes a random transition otherwise. In this domain, we have at each state two actions that do stochastic reset and one action that is a stochastic forward. There are 10 states and γ = 0.9. When there are only a few number of sample transitions for each state–action pair, there is a high chance that the frequentist estimate confuses a reset action with a forward. Therefore, we expect a good model-based prior to be useful in this case. We use independent Dirichlets as our prior. We experiment with priors for which the Dirichlet α-vector sums up to 10. We define our good prior to have α-vectors proportional to the true transition probabilities. A misleading prior is one for which the vector is proportional to a transition model when the actions are switched between forward and reset. A weighted sum between the good and bad priors creates a range of priors that gradually change from being informative to misleading. We compare the expected regret of three different methods. The empirical method uses the optimal policy with respect to the empirical models. The Bayesian method samples a transition model from the Bayesian Dirichlet posteriors (when the observed counts are added to the prior α-vectors) and then uses the optimal policy with respect to the sampled model. The PAC-Bayesian method uses counts + λαprior as the α-vector of the posterior and finds the value of λ ∈[0, 1], using linear search within values with distance 0.1, that maximizes the lower bound of Theorem 2 (with a more optimistic value for k and δ = 0.05). It then samples from that distribution and uses the optimal policy with respect to the sampled model. The running time for a single run is a few seconds. 5 Figure 1 (left) shows the comparison between the maximum regret in these methods for different sample sizes when the prior is informative. This is averaged over 50 runs for the Bayesian and PACBayesian methods and 10000 runs for the empirical method. The number of sampled transitions is the same for all state–action pairs. As expected, the Bayesian method outperforms the empirical one for small sample sizes. We can see that the PAC-Bayesian method is closely following the Bayesian one in this case. With a misleading prior, however, as we can see in Figure 1 (center), the empirical method outperforms the Bayesian one. This time, the regret rate of the PAC-Bayesian method follows that of the empirical method. Figure 1 (right) shows how the PAC-Bayesian method switches between following the empirical estimate and the Bayesian posterior as the prior gradually changes from being misleading to informative (four sample transitions per state action pair). This shows that the bound of Theorem 2 is helpful as a model selection technique. 5 10 15 20 0.04 0.06 0.08 0.1 0.12 0.14 0.16 sample size for each state−action pair regret Empirical Bayesian PAC−Bayesian 5 10 15 20 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 sample size for each state−action pair regret Empirical Bayesian PAC−Bayesian 0 0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 weight on the good prior regret Empirical Bayesian PAC−Bayesian Figure 1: Average regrets of different methods. Error bars are 1 standard deviation of the mean. The next experiment is to test the model-free bound of Theorem 3. The domain is a “puddle world”. An agent moves around in a grid world of size 5×9 containing puddles with reward −1, an absorbing goal state with reward +1, and reward 0 for the remaining states. There are stochastic actions along each of the four cardinal directions that move in the correct direction with probability 0.7 and move in a random direction otherwise. If the agent moves towards the boundary then it stays in its current position. G G G Figure 2: Maps of puddle world RL domain. Shaded boxes are puddles. We first learn the true value function of a known prior map of the world (Figure 2, left). We then use that value function as the prior for our model-selection technique on two other environments. One of them is a similar environment where the shape of the puddle is slightly changed (Figure 2, center). We expect the prior to be informative and useful in this case. The other environment is, however, largely different from the first map (Figure 2, right). We thus expect the prior to be misleading. Table 1: Performance of different model-selection methods. Empirical Regret Bayesian Regret PAC-Bayesian Regret Average λ Similar Map 0.21 ± 0.03 0.10 ± 0.01 0.12 ± 0.01 0.58 ± 0.01 Different Map 0.19 ± 0.03 1.16 ± 0.09 0.22 ± 0.04 0.03 ± 0.03 We start with independent Gaussians (one for each state–action pair) as the prior, with the initial map’s Q-values for the mean µ0, and σ2 0 = 0.01 for the variance. The posterior is chosen to be the product of Gaussians with mean  λµ0 σ2 0 + n ˆ Q(.,.) ˆσ2 .  λ σ2 0 + n ˆσ2  and variance  λ σ2 0 + n ˆσ2 −1 , where ˆσ2 is the empirical variance. We sample from this posterior and act according to its greedy policy. For λ = 1, this is the Bayesian posterior for the mean of a Gaussian with known variance. For λ = 0, the prior is completely ignored. We will, however, find the λ ∈[0, 1] that minimizes the PAC-Bayesian bound of Theorem 3 (with an optimistic choice of c and δ = 0.05) and compare it with the performance of the empirical policy and a semi-Bayesian policy that acts according to a sampled value from the Bayesian posterior. Table 1 shows the average over 100 runs of the maximum regret for these methods and the average of the selected λ, with equal sample size of 20 per state–action pair. Again, it can be seen that the PAC-Bayesian method makes use of the prior (with higher values of λ) when the prior is informative, and otherwise follows the empirical estimate (smaller values of λ). It adaptively balances the usage of the prior based on its consistency over the observed data. 6 6 Discussion This paper introduces the first set of PAC-Bayesian bounds for the batch RL problem in finite state spaces. We demonstrate how such bounds can be used for both model-based and model-free RL methods. Our empirical results show that PAC-Bayesian model-selection uses prior distributions when they are informative and useful, and ignores them when they are misleading. For the model-based bound, we expect the running time of searching in the space of parametrized posteriors to increase rapidly with the size of the state space. A more scalable version would sample models around the posteriors, solve each model, and then use importance sampling to estimate the value of the bound for each possible posterior. This problem does not exist with the model-free approach, as we do not need to solve the MDP for each sampled model. A natural extension to this work would be on domains with continuous state spaces, where one would use different forms of function approximation for the value function. There is also the possibility of future work in applications of PAC-Bayesian theorems in online reinforcement learning, where one targets the exploration–exploitation problem. Online PAC RL with Bayesian priors has recently been addressed with the BOSS algorithm [20]. PAC-Bayesian bounds could help derive similar model-free algorithms with theoretical guarantees. Acknowledgements: Funding for this work was provided by the National Institutes of Health (grant R21 DA019800) and the NSERC Discovery Grant program. Appendix The following lemma, due to McAllester [21], forms the basis of the proofs for both bounds: Lemma 4. For β > 0, K > 0, and Q, P, ∆∈Rn satisfying Pi, Qi, ∆i ≥0 and Pn i=1 Qi = 1: n X i=1 Pieβ∆2 i ≤K ⇒ n X i=1 Qi∆i ≤ p (D(Q∥P) + ln K)/β. (15) Note that even when we have arbitrary probability measures Q and P on a continuous space of ∆’s, it might still be possible to define a sequence of vectors Q(1), Q(2), . . . , P(1), P(2), . . . and ∆(1), ∆(2), . . . such that Q(n), P(n) and ∆(n) satisfy the condition of the lemma and EQ∆= lim n→∞ n X i=1 Q(n) i ∆(n) i , D(Q∥P) = lim n→∞ n X i=1 Q(n) i ln Q(n) i P(n) i . (16) We will then take the limit of the conclusion of the lemma to get a bound for the continuous case [21]. Proof of Theorem 2 (Model-Based Bound) Lemma 5. Let ∆T ′ = ∥ˆQπ∗ T ′ −Qπ∗ T ′ ∥∞. With probability no less than 1 −δ over the sampling: ET ′∼Mp[e 1 2 (nmin−1)k2∆2 T ′ ] ≤|S|2|S|nmin δ . (17) Before proving Lemma 5, note that Lemma 5 and Lemma 4 together imply Therorem 2. We only need to apply the method described for arbitrary probability measures. To prove Lemma 5, it suffices to prove the following, swap the expectations and apply Markov’s inequality: ET ′∼MP EU∼U[e 1 2 (nmin−1)k2∆2 T ′ ] ≤|S|2|S|nmin. (18) Therefore, we only need to show that for any choice of T ′, EU∼U[e 1 2 (nmin−1)k2∆2 T ′ ] follows the bound. Let as = π∗ T ′(s). We have: Pr{∆T ′ ≥ϵ} ≤ X s Pr{∥ˆT(s, as, .) −T(s, as, .)∥1 > kϵ} (19) ≤ X s  2|S|e−1 2 ns,as(kϵ)2 ≤|S|2|S|e−1 2 nmin(kϵ)2. (20) 7 The first line is by Lemma 1. The second line is a concentration inequality for multinomials [22]. We choose to maximize EU∼U[e 1 2 (nmin−1)k2∆2 T ′ ], subject to Pr{∆T ′ ≥ϵ} ≤|S|2|S|e−1 2 nmin(kϵ)2. The maximum occurs when the inequality is tight and the p.d.f. for ∆T ′ is: f(∆) = |S|2|S|k2nmin∆e−1 2 nmink2∆2. (21) We thus get: EU∼U[e 1 2 (nmin−1)k2∆2 T ′ ] ≤ Z ∞ 0 e 1 2 (nmin−1)k2∆2f(∆)d∆ (22) = Z ∞ 0 |S|2|S|k2nmin∆e−1 2 k2∆2d∆≤|S|2|S|nmin. (23) This concludes the proof of Lemma 5 and consequently Theorem 2. Proof of Theorem 3 (Model-Free Bound) Since B is a contraction with respect to the infinity norm and Q∗is its fixed point, we have: ∥Q −Q∗∥∞ = ∥Q −BQ + BQ −BQ∗∥∞≤∥Q −BQ∥∞+ ∥BQ −BQ∗∥∞ (24) ≤ ∥Q −BQ∥∞+ γ∥Q −Q∗∥∞ (25) And thus ∥Q −Q∗∥∞≤ 1 1−γ ∥Q −BQ∥∞. Lemma 6. Let ∆Q = max(0, ∥Q −Q∗∥∞−∥Q−ˆ BQ∥∞ 1−γ ). With probability no less than 1 −δ: EQ∼Jp[e2(nmin−1)(1−γ)2∆2 Q/c2] ≤|S||A|nmin δ . (26) Similar to the previous section, Lemma 6 and Lemma 4 together imply Theorem 3. To prove Lemma 6, similar to the previous proof, we only need to show that for any choice of Q, EU∼U[e2(nmin−1)(1−γ)2∆2 Q/c2] follows the bound. We have that: Pr{∆Q≥ϵ} = Pr n ∥Q −Q∗∥∞≥ϵ + ∥Q −ˆBQ∥∞/(1 −γ) o (27) ≤Pr n ∥Q −BQ∥∞≥(1 −γ)  ϵ + ∥Q −ˆBQ∥∞/(1 −γ) o (28) ≤ X s,a Pr n |Q(s, a) −BQ(s, a)| ≥(1 −γ)ϵ + ∥Q −ˆBQ∥∞ o (29) ≤ X s,a Pr n |Q(s, a) −ˆBQ(s, a)| + | ˆBQ(s, a) −BQ(s, a)| ≥(1 −γ)ϵ + ∥Q −ˆBQ∥∞ o (30) ≤ X s,a Pr n | ˆBQ(s, a) −BQ(s, a)| ≥(1 −γ)ϵ o (31) ≤ X s,a e−2ns,a(1−γ)2ϵ2/c2 ≤|S||A|e−2nmin(1−γ)2ϵ2/c2 (32) Eqn (28) follows from the derivations at the beginning of this section. Eqn (29) is by the union bound. Eqn (31) is by the definition of infinity norm. Last derivation is by Hoeffding inequality of Equation (12). Now again, similar to the model-based case, when the inequality is tight the p.d.f. is: f(∆) = 4|S||A|nmin(1 −γ)2c−2∆e−2nmin(1−γ)2∆2/c2. We thus get: EU∼U[e2(nmin−1)(1−γ)2∆2 Q/c2] ≤ Z ∞ 0 e2(nmin−1)(1−γ)2∆2/c2f(∆)d∆ = Z ∞ 0 4|S||A|nmin(1 −γ)2c−2∆e−2(1−γ)2∆2/c2d∆ ≤ |S||A|nmin. This concludes the proof of Lemma 6 and consequently Theorem 3. 8 References [1] L. G. Valiant. A theory of the learnable. Commun. ACM, 27(11):1134–1142, 1984. [2] M. Kearns and S. Singh. Near-optimal reinforcement learning in polynomial time. Machine Learning, 49(2-3):209–232, 2002. [3] R. I. Brafman and M. Tennenholtz. R-max – A general polynomial time algorithm for near-optimal reinforcement learning. The Journal of Machine Learning Research, 3:213–231, 2003. [4] A. L. Strehl and M. L. Littman. A theoretical analysis of model-based interval estimation. In Proceedings of the 22nd International Conference on Machine Learning, pages 856–863, 2005. [5] S. M. Kakade. On the sample complexity of reinforcement learning. PhD thesis, University College London, 2003. [6] M. O. G. Duff. Optimal learning: Computational procedures for Bayes-adaptive Markov decision processes. PhD thesis, University of Massachusetts Amherst, 2002. [7] M. J. A. Strens. A Bayesian Framework for Reinforcement Learning. In Proceedings of the 17th International Conference on Machine Learning, pages 943–950, 2000. [8] T. Wang, D. Lizotte, M. Bowling, and D. Schuurmans. Bayesian sparse sampling for on-line reward optimization. In Proceedings of the 22nd International Conference on Machine Learning, page 963, 2005. [9] J. Z. Kolter and A. Y. Ng. Near-Bayesian exploration in polynomial time. In Proceedings of the 26th International Conference on Machine Learning, pages 513–520, 2009. [10] D. A. McAllester. Some PAC-Bayesian theorems. Machine Learning, 37(3):355–363, 1999. [11] J. Shawe-Taylor and R. C. Williamson. A PAC analysis of a Bayesian estimator. In Proceedings of the 10th Annual Conference on Computational Learning Theory, pages 2–9, 1997. [12] P. Germain, A. Lacasse, F. Laviolette, and M. Marchand. PAC-Bayesian learning of linear classifiers. In Proceedings of the 26th International Conference on Machine Learning, pages 353–360, 2009. [13] J. Langford and J. Shawe-Taylor. PAC-Bayes and margins. In Proceedings of Advances in Neural Information Processing Systems, pages 439–446, 2002. [14] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [15] D. P. Bertsekas and J. N. Tsitsiklis. Neuro-Dynamic Programming (Optimization and Neural Computation Series, 3). Athena Scientific, 1996. [16] R. Herbrich and T. Graepel. A PAC-Bayesian margin bound for linear classifiers. IEEE Transactions on Information Theory, 48(12):3140–3150, 2002. [17] R. S. Sutton, D. McAllester, S. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. Proceedings of Advances in Neural Information Processing Systems, 12:1057–1063, 2000. [18] J. A. Boyan. Technical update: Least-squares temporal difference learning. Machine Learning, 49(2):233–246, 2002. [19] A. Farahmand, M. Ghavamzadeh, C. Szepesv´ari, and S. Mannor. Regularized fitted Q-iteration: Application to planning. Recent Advances in Reinforcement Learning, pages 55–68, 2008. [20] J. Asmuth, L. Li, M. L. Littman, A. Nouri, and D. Wingate. A Bayesian sampling approach to exploration in reinforcement learning. The 25th Conference on Uncertainty in Artificial Intelligence, 2009. [21] D. A. McAllester. PAC-Bayesian model averaging. In Proceedings of the 12th Annual Conference on Computational Learning Theory, pages 164–170, 1999. [22] T. Weissman, E. Ordentlich, G. Seroussi, S. Verdu, and M. J. Weinberger. Inequalities for the L1 deviation of the empirical distribution. Technical report, Information Theory Research Group, HP Laboratories, 2003. 9
2010
121
3,879
Learning to combine foveal glimpses with a third-order Boltzmann machine Hugo Larochelle and Geoffrey Hinton Department of Computer Science, University of Toronto 6 King’s College Rd, Toronto, ON, Canada, M5S 3G4 {larocheh,hinton}@cs.toronto.edu Abstract We describe a model based on a Boltzmann machine with third-order connections that can learn how to accumulate information about a shape over several fixations. The model uses a retina that only has enough high resolution pixels to cover a small area of the image, so it must decide on a sequence of fixations and it must combine the “glimpse” at each fixation with the location of the fixation before integrating the information with information from other glimpses of the same object. We evaluate this model on a synthetic dataset and two image classification datasets, showing that it can perform at least as well as a model trained on whole images. 1 Introduction Like insects with unmovable compound eyes, most current computer vision systems use images of uniform resolution. Human vision, by contrast, uses a retina in which the resolution falls off rapidly with eccentricity and it relies on intelligent, top-down strategies for sequentially fixating parts of the optic array that are relevant for the task at hand. This “fixation point strategy” has many advantages: • It allows the human visual system to achieve invariance to large scale translations by simply translating all the fixation points. • It allows a reduction in the number of “pixels” that must be processed in parallel yet preserves the ability to see very fine details when necessary. This reduction allows the visual system to apply highly parallel processing to the sensory input produced by each fixation. • It removes most of the force from the main argument against generative models of perception, which is that they waste time computing detailed explanations for parts of the image that are irrelevant to the task at hand. If task-specific considerations are used to select fixation points for a variable resolution retina, most of the irrelevant parts of the optic array will only ever be represented in a small number of large pixels. If a system with billions of neurons at its disposal has adopted this strategy, the use of a variable resolution retina and a sequence of intelligently selected fixation points is likely to be even more advantageous for simulated visual systems that have to make do with a few thousand “neurons”. In this paper we explore the computational issues that arise when the fixation point strategy is incorporated in a Boltzmann machine and demonstrate a small system that can make good use of a variable resolution retina containing very few pixels. There are two main computational issues: • What-where combination: How can eye positions be combined with the features extracted from the retinal input (glimpses) to allow evidence for a shape to be accumulated across a sequence of fixations? • Where to look next: Given the results of the current and previous fixations, where should the system look next to optimize its object recognition performance? 1 Retinal transformation (reconstruction from ) Fovea (high-resolution) Periphery (low-resolution) I Image x1 x2 x3 xk A Retinal transformation (reconstruction from ) Fovea (high-resolution) Periphery (low-resolution) I Image x1 x2 x3 xk B x3 i3, j3 x2 i2, j2 x1 i1, j1 h z(i1, j1) z(i2, j2) z(i3, j3) y C Figure 1: A: Illustration of the retinal transformation r(I, (i, j)). The center dot marks the pixel at position (i, j) (pixels are drawn as dotted squares). B: examples of glimpses computed by the retinal transformation, at different positions (visualized through reconstructions). C: Illustration of the multi-fixation RBM. To tackle these issues, we rely on a special type of restricted Boltzmann machine (RBM) with thirdorder connections between visible units (the glimpses), hidden units (the accumulated features) and position-dependent units which gate the connections between the visible and hidden units. We describe approaches for training this model to jointly learn and accumulate useful features from the image and control where these features should be extracted, and evaluate it on a synthetic dataset and two image classification datasets. 2 Vision as a sequential process with retinal fixations Throughout this work, we will assume the following problem framework. We are given a training set of image and label pairs {(It, lt)}N t=1 and the task is to predict the value of lt (e.g. a class label lt ∈{1, . . . , C}) given the associated image It. The standard machine learning approach would consist in extracting features from the whole image It and from those directly learn to predict lt. However, since we wish to incorporate the notion of fixation into our problem framework, we need to introduce some constraints on how information from It is acquired. To achieve this, we require that information about an image I (removing the superscript t for simplicity) must be acquired sequentially by fixating (or querying) the image at a series of K positions [(i1, j1), . . . , (iK, jK)]. Given a position (ik, jk), which identifies a pixel I(ik, jk) in the image, information in the neighborhood of that pixel is extracted through what we refer to as a retinal transformation r(I, (ik, jk)). Much like the fovea of the human retina, this transformation extracts high-resolution information (i.e. copies the value of the pixels) from the image only in the neighborhood of pixel I(ik, jk). At the periphery of the retina, lower-resolution information is extracted by averaging the values of pixels falling in small hexagonal regions of the image. The hexagons are arranged into a spiral, with the size of the hexagons increasing with the distance from the center (ik, jk) of the fixation1. All of the high-resolution and low-resolution information is then concatenated into a single vector given as output by r(I, (ik, jk)). An illustration of this retinal transformation is given in Figure 1. As a shorthand, we will use xk to refer to the glimpse given by the output of the retinal transformation r(I, (ik, jk)). 3 A multi-fixation model We now describe a system that can predict l from a few glimpses x1, . . . , xK. We know that this problem is solvable: [1] demonstrated that people can “see” a shape by combining information from multiple glimpses through a hole that is much smaller than the whole shape. He called this “anorthoscopic perception”. The shape information derived from each glimpse cannot just be added 1A retina with approximately hexagonal pixels produced by a log conformal mapping centered on the current fixation point has an interesting property: It is possible to use weight-sharing over scale and orientation instead of translation, but we do not explore this here. 2 as implied in [2]. It is the conjunction of the shape of a part and its relative location that provides evidence for the shape of a whole object, and the natural way to deal with this conjunction is to use multiplicative interactions between the “what” and “where”. Learning modules that incorporate multiplicative interactions have recently been developed [3, 4]. These can be viewed as energy-based models with three-way interactions. In this work, we build on [5, 6] who introduced a method of keeping the number of parameters under control when incorporating such high-order interactions in a restricted Boltzmann machine. We start by describing the standard RBM model for classification, and then describe how we adapt it to the multi-fixation framework. 3.1 Restricted Boltzmann Machine for classification RBMs are undirected generative models which model the distribution of a visible vector v of units using a hidden vector of binary units h. For a classification problem with C classes, the visible layer is composed of an input vector x and a target vector y, where the target vector follows the so-called “1 out of C” representation of the classification label l (i.e. y = el where all the components of el are 0 except for the lth which is 1). More specifically, given the following energy function: E(y, x, h) = −h⊤Wx −b⊤x −c⊤h −d⊤y −h⊤Uy (1) we define the associated distribution over x, y and h: p(y, x, h) = exp(−E(y, x, h))/Z. Assuming x is a binary vector, it can be shown that this model has the following posteriors: p(h|y, x) = Y j p(hj|y, x), where p(hj = 1|y, x) = sigm(cj + Uj·y + Wj·x) (2) p(x|h) = Y i p(xi|h), where p(xi = 1|h) = sigm(bi + h⊤W·i) (3) p(y = el|h) = exp(dl + h⊤U·l) PC l∗=1 exp(dl∗+ h⊤U·l∗) (4) where Aj· and A·i respectively refer to the jth row and ith column of matrix A. These posteriors make it easy to do inference or sample from the model using Gibbs sampling. For real-valued input vectors, an extension of Equation 1 can be derived to obtain a Gaussian distribution for the conditional distribution over x of Equation 3 [7]. Another useful property of this model is that all hidden units can be marginalized over analytically in order to exactly compute p(y = el|x) = exp(dl + P j softplus(cj + Ujl + Wj·x)) PC l∗=1 exp(dl∗+ P j softplus(cj + Ujl∗+ Wj·x)) (5) where softplus(a) = log(1 + exp(a)). Hence, classification can be performed for some given input x by computing Equation 5 and choosing the most likely class. 3.2 Multi-fixation RBM At first glance, a very simple way of using the classification RBM of the previous section in the multi-fixation setting would be to set x = x1:K = [x1, . . . , xK]. However, doing so would completely throw away the information about the position of the fixations. Instead, we could redefine the energy function of Equation 1 as follows: E(y, x1:K, h) = K X k=1 −h⊤W(ik,jk)xk −b⊤xk ! −c⊤h −d⊤y −h⊤Uy (6) where the connection matrix W(ik,jk) now depends on the position of the fixation2. Such connections are called high-order (here third order) because they can be seen as connecting the hidden 2To be strictly correct in our notation, we should add the position coordinates (i1, j1), . . . , (iK, jK) as an input of the energy function E(y, x, h). To avoid clutter however, we will consider the position coordinates to be implicitly given by x1, . . . , xK. 3 units, input units and implicit position units (one for each possible value of positions (ik, jk)). Conditioned on the position units (which are assumed to be given), this model is still an RBM satisfying the traditional conditional independence properties between the hidden and visible units. For a given m×m grid of possible fixation positions, all W(ik,jk) matrices contain m2HR parameters where H is the number of hidden units and R is the size of the retinal transformation. To reduce that number, we parametrize or factorize the W(ik,jk) matrices as follows W(ik,jk) = P diag(z(ik, jk)) F (7) where F is R × D, P is D × H, z(ik, jk) is a (learned) vector associated to position (ik, jk) and diag(a) is a matrix whose diagonal is the vector a. Hence, W(ik,jk) is now an outer product of the D lower-dimensional bases in F (“filters”) and P (“pooling”), gated by a position specific vector z(ik, jk). Instead of learning a separate matrix W(ik,jk) for each possible position, we now only need to learn a separate vector z(ik, jk) for each position. Intuitively, the vector z(ik, jk) controls which rows of F and columns of P are used to accumulate the glimpse at position (ik, jk) into the hidden layer of the RBM. A similar factorization has been used by [8]. We emphasize that z(ik, jk) is not stochastic but is a deterministic function of position (ik, jk), trained by backpropagation of gradients from the multi-fixation RBM learning cost. In practice, we force the components of z(ik, jk) to be in [0, 1]3. The multi-fixation RBM is illustrated in Figure 1. 4 Learning in the multi-fixation RBM The multi-fixation RBM must learn to accumulate useful features from each glimpse, and it must also learn a good policy for choosing the fixation points. We refer to these two goals as “learning the what-where combination” and “learning where to look”. 4.1 Learning the what-where combination For now, let’s assume that we are given the sequence of glimpses xt 1:K fed to the multi-fixation RBM for each image It. As suggested by [9], we can train the RBM to minimize the following hybrid cost over each input xt 1:K and label lt : Hybrid cost: Chybrid = −log p(yt|xt 1:K) −α log p(yt, xt 1:K) (8) where yt = elt. The first term in Chybrid is the discriminative cost and its gradient with respect to the RBM parameters can be computed exactly, since p(yt|xt 1:K) can be computed exactly (see [9] for more details on how to derive these gradients) . The second term is the generative cost and its gradient can only be approximated. Contrastive Divergence [10] based on one full step of Gibbs sampling provides a good enough approximation. The RBM is then trained by doing stochastic or mini-batch gradient descent on the hybrid cost. In [9], it was observed that there is typically a value of α which yields better performance than using either discriminative or generative costs alone. Putting more emphasis on the discriminative term ensures that more capacity is allocated to predicting the label values than to predicting each pixel value, which is important because there are many more pixels than labels. The generative term acts as a data-dependent regularizer that encourages the RBM to extract features that capture the statistical structure of the input. This is a much better regularizer than the domain-independent priors implemented by L1 or L2 regularization. We can also take advantage of the following obvious fact: If the sequence xt 1:K is associated with a particular target label yt, then so are all the subsequences xt 1:k where k < K. Hence, we can also train the multi-fixation RBM on these subsequences using the following “hybrid-sequential” cost: Hybrid-sequential cost: Chybrid−seq = K X k=1 −log p(yt|xt 1:k) −α log p(yt, xt k|xt 1:k−1) (9) where the second term, which corresponds to negative log-likelihoods under a so-called conditional RBM [8], plays a similar role to the generative cost term of the hybrid cost and encourages the 3This is done by setting z(ik, jk) = sigm(¯z(ik, jk)) and learning the unconstrained ¯z(ik, jk) vectors instead. We also use a learning rate 100 times larger for learning those parameters. 4 RBM to learn about the statistical structure of the input glimpses. An estimate of the gradient of this term can also be obtained using Contrastive Divergence (see [8] for more details). While being more expensive than the hybrid cost, the hybrid-sequential cost could yield better generalization performance by better exploiting the training data. Both costs are evaluated in Section 6.1. 4.2 Learning where to look Now that we have a model for processing the glimpses resulting from fixating at different positions, we need to define a model which will determine where those fixations should be made on the m×m grid of possible positions. After k −1 fixations, this model should take as input some vector sk containing information about the glimpses accumulated so far (e.g. the current activation probabilities of the multi-fixation RBM hidden layer), and output a score f(sk, (ik, jk)) for each possible fixation position (ik, jk). This score should be predictive of how useful fixating at the given position will be. We refer to this model as the controller. Ideally, the fixation position with highest score under the controller should be the one which maximizes the chance of correctly classifying the input image. For instance, a good controller could be such that f(sk, (ik, jk)) ∝ log p(yt|xt 1:k−1, xt k = r(I, (ik, jk))) (10) i.e. its output is proportional to the log-probability the RBM will assign to the true target yt of the image It once it has fixated at position (ik, jk) and incorporated the information in that glimpse. In other words, we would like the controller to assign high scores to fixation positions which are more likely to provide the RBM with the necessary information to make a correct prediction of yt. A simple training cost for the controller could then be to reduce the absolute difference between its prediction f(sk, (ik, jk)) and the observed value of log p(yt|xt 1:k−1, xk = r(I, (ik, jk))) for the sequences of glimpses generated while training the multi-fixation RBM. During training, these sequences of glimpses can be generated from the controller using the Boltzmann distribution pcontroller((ik, jk)|xt 1:k−1) ∝ exp(f(sk, (ik, jk))) (11) which ensures that all fixation positions can be sampled but those which are currently considered more useful by the controller are also more likely to be chosen. At test time however, for each k, the position that is the most likely under the controller is chosen4. In our experiments, we used a linear model for f(sk, (ik, jk)), with separate weights for each possible value of (ik, jk). The controller is the same for all k, i.e. f(sk, (ik, jk)) only depends on the values of sk and (ik, jk) (though one could consider training a separate controller for each k). A constant learning rate of 0.001 was used for training. As for the value taken by sk, we set it to sigm c + k−1 X k∗=1 W(ik∗,jk∗)xk∗ ! = sigm c + k−1 X k∗=1 P diag(z(ik∗, jk∗)) F xk∗ ! (12) which can be seen as an estimate of the probability vector for each hidden unit of the RBM to be 1, given the previous glimpses x1:k−1. For the special case k = 1, s1 is computed based on a fixation at the center of the image but all the information in this initial glimpse is then “forgotten”, i.e. it is only used for choosing the first image-dependent fixation point and is not used by the multi-fixation RBM to accumulate information about the image. We also concatenate to sk a binary vector of size m2 (one component for each possible fixation position), where a component is 1 if the associated position has been fixated. Finally, in order to ensure that a fixation position is never sampled twice, we impose that pcontroller((ik, jk)|xt 1:k−1) = 0 for all positions previously sampled. 4.3 Putting it all together Figure 2 summarizes how the multi-fixation RBM and the controller are jointly trained, for either the hybrid cost or the hybrid-sequential cost. Details on gradient computations for both costs are 4While it might not be optimal, this greedy search for the best sequence of fixation positions is simple and worked well in practice. 5 also given in the supplementary material. To our knowledge, this is the first implemented system for combining glimpses that jointly trains a recognition component (the RBM) with an attentional component (the fixation controller). 5 Related work A vast array of work has been dedicated to modelling the visual search behavior of humans [11, 12, 13, 14], typically through the computation of saliency maps [15, 16]. Most of such work, however, is concerned with the prediction of salient regions in an image, and not with the other parts of a task-oriented vision classifier. Surprisingly little work has been done on how best to combine multiple glimpses in a recognition system. SIFT features have been proposed either as a prefilter for reducing the number of possible fixation positions [17] or as a way of preprocessing the raw glimpses [13]. [18] used a fixed and hand-tuned saliency map to sample small patches in images of hand-written characters and trained a recursive neural network from sequences of such patches. By contrast, the model proposed here does not rely on hand-tuned features or saliency maps and learns from scratch both the where to look and what-where combination components. A further improvement on the aforecited work consists in separately learning both the where to look and the what-where combination components [19, 20]. In this work however, both components are learned jointly, as opposed to being put together only at test time. For instance, [19] use a saliency map based on filters previously trained on natural images for the where to look component, and the what-where combination component for recognition is a nearest neighbor density estimator. Moreover, their goal is not to avoid fixating everywhere, but to obtain more robust recognition by using a saliency map (whose computation effectively corresponds to fixating everywhere in the image). In that respect, our work is orthogonal, as we are treating each fixation as a costly operation (e.g. we considered up to 6 fixations, while they used 100 fixations). 6 Experiments We present three experiments on three different image classification problems. The first is based on the MNIST dataset and is meant to evaluate the multi-fixation RBM alone (i.e. without the controller). The second is on a synthetic dataset and is meant to analyze the controller learning algorithm and its interaction with the multi-fixation RBM. Finally, results on a facial expression recognition problem are presented. 6.1 Experiment 1: Evaluation of the multi-fixation RBM In order to evaluate the multi-fixation RBM of Section 3.2 separately from the controller model, we trained a multi-fixation RBM5 on a fixed set of 4 fixations (i.e. the same fixation positions for all images). Those fixations were centered around the pixels at positions {(9, 9), (9, 19), (19, 9), (19, 19)} (MNIST images are of size 28 × 28) and their order was chosen at random for every parameter update of the RBM. The retinal transformation had a high-resolution fovea covering 38 pixels and 60 hexagonal low-resolution regions in the periphery (see Figure 2 for an illustration). We used the training, validation and test splits proposed by [21], with a training set of 10 000 examples. The results are given in Figure 2, with comparisons with an RBF kernel SVM classifier and a single hidden layer neural network initialized using unsupervised training of an RBM on the training set (those two baselines were trained on the full MNIST images). The multi-fixation RBM yields performance comparable to the baselines despite only having four glimpses, and the hybrid-sequential cost function works better than the non-sequential, hybrid cost. 6.2 Experiment 2: evaluation of the controller In this second experiment, we designed a synthetic problem where the optimal fixation policy is known, to validate the proposed training algorithm for the controller. The task is to identify whether 5The RBM used H = 500 hidden units and was trained with a constant learning rate of 0.1 (no momentum was used). The learned position vectors z(ik, jk) were of size D = 250. Training lasted for 2000 iterations, with a validation set used to keep track of generalization performance and remember the best parameter value of the RBM. We report results when using either the hybrid cost of Equation 8 or the hybrid-sequential cost of Equation 9, with α = 0.1. Mini-batches of size 100 were used. 6 Pseudocode for training update · compute s1 based on center of image for k from 1 to K do · sample (ik, jk) from pcontroller((ik, jk)|xt 1:k−1) · compute xk = r(I, (ik, jk)) · update controller with a gradient step for error |f(sk, (ik, jk)) −log p(y|x1:k)| if using hybrid-sequential cost then · accumulate gradient on RBM parameters of kth term in cost Chybrid−seq end if · compute sk+1 end for if using hybrid-sequential cost then · update RBM parameters based on accumulated gradient of hybrid-sequential cost Chybrid−seq else {using hybrid cost} · update RBM based on gradient of hybrid cost Chybrid end if A Experiment 1: MNIST with 4 fixations Model Error NNet+RBM [22] 3.17% (± 0.15) SVM [21] 3.03% (± 0.15) Multi-fixation RBM 3.20% (± 0.15) (hybrid) Multi-fixation RBM 2.76% (± 0.14) (hybrid-sequential) B Figure 2: A: Pseudocode for the training update of the multi-fixation RBM, using either the hybrid or hybrid-sequential cost. B: illustration of glimpses and results for experiment on MNIST. there is a horizontal (positive class) or vertical (negative class) 3-pixel white bar somewhere near the edge of a 15 × 15 pixel image. At the center of the image is one of 8 visual symbols, indicating the location of the bar. This symbol conveys no information about the class (the positive and negative classes are equiprobable) but is necessary to identify where to fixate. Figure 3 shows positive and negative examples. There are only 48 possible images and the model is trained on all of them (i.e. we are measuring the capacity of the model to learn this problem perfectly). Since, as described earlier, the input s1 of the controller contains information about the center of the image, only one fixation decision by the controller suffices to solve this problem. A multi-fixation RBM was trained jointly with a controller on this problem6, with only K = 1 fixation. When trained according to the hybrid cost of Equation 8 (α = 1), the model was able to solve this problem perfectly without errors, i.e. the controller always proposes to fixate at the region containing the white bar and the multi-fixation RBM always correctly recognizes the orientation of the bar. However, using only the discriminative cost (α = 0), it is never able to solve it (i.e. has an error rate of 50%), even if trained twice as long as for α = 1. This is because the purely discriminative RBM never learns meaningful features for the non-discriminative visual symbol at the center, which are essential for the controller to be able to predict the position of the white bar. 6.3 Experiment 3: facial expression recognition experiment Finally, we applied the multi-fixation RBM with its controller to a problem of facial expression recognition. The dataset [23] consists in 4178 images of size 100 × 100, depicting people acting one of seven facial expressions (anger, disgust, fear, happiness, sadness, surprise and neutral, see Figure 3 for examples). Five training, validation and test set splits where generated, ensuring that all images of a given person can only be found in one of the three sets. Pixel values of the images were scaled to the [−0.5, 0.5] interval. A multi-fixation RBM learned jointly with a controller was trained on this problem7, with K = 6 fixations. Possible fixation positions were layed out every 10 pixels on a 7 × 7 grid, with the top-left 6Hyper-parameters: H = 500, D = 250. Stochastic gradient descent was used with a learning rate of 0.001. The controller had the choice of 9 possible fixation positions, each covering either one of the eight regions where bars can be found or the middle region where the visual symbol is. The retinal transformation was such that information from only one of those regions is transferred. 7Hyper-parameters: H = 250, D = 250. Stochastic gradient descent was used with a learning rate of 0.01. The RBM was trained with the hybrid cost of Equation 8 with α = 0.001 (the hybrid cost was preferred mainly because it is faster). Also, the matrix P was set to the identity matrix and only F was learned (this removed a matrix multiplication and thus accelerated learning in the model, while still giving good results). The vectors 7 Examples Experiment 3: facial expression recognition dataset Results Experiment 2: synthetic dataset Positive examples Negative examples 1 2 3 4 5 6 0.4 0.45 0.5 0.55 0.6 0.65 Number of fixations Accuracy Multi!fixation RBM SVM A B Figure 3: A: positive and negative from the synthetic dataset of experiment 2. B: examples and results for the facial expression recognition dataset. position being at pixel (20, 20). The retinal transformation covered around 2000 pixels and didn’t use a periphery8 (all pixels were from the fovea). Moreover, glimpses were passed through a “preprocessing” hidden layer of size 250, initialized by unsupervised training of an RBM with Gaussian visible units (but without target units) on glimpses from the 7 × 7 grid. During training of the multifixation RBM, the discriminative part of its gradient was also passed through the preprocessing hidden layer for fine-tuning of its parameters. Results are reported in Figure 3, where the multi-fixation RBM is compared to an RBF kernel SVM trained on the full images. The accuracy of the RBM is given after a varying number of fixations. We can see that after 3 fixations (i.e. around 60% of the image) the multi-fixation RBM reaches a performance that is statistically equivalent to that of the SVM (58.2 ± 1.5%) trained on the full images. Training the SVM on a scaled-down version of the data (48 × 48 pixels) gives a similar performance of 57.8% (±1.5%). At 5 fixations, the multi-fixation RBM now improves on the SVM, and gets even better at 6 fixations, with an accuracy of 62.7% (±1.5%). Finally, we also computed the performance of a linear SVM classifier trained on the concatenation of the hidden units from a unique RBM with Gaussian visible units applied at all 7 × 7 positions (the same RBM used for initializing the preprocessing layer of the multi-fixation RBM was used). This convolutional approach, which requires 49 fixations, yields a performance of 61.2% (±1.5%), slightly worse but statistically indistinguishable from the multi-fixation RBM which only required 6 fixations. 7 Conclusion Human vision is a sequential sampling process in which only a fraction of the optic array is ever processed at the highest resolution. Most computer vision work on object recognition ignores this fact and can be viewed as modelling tachistoscopic recognition of very small objects that lie entirely within the fovea. We have focused on the other extreme, i.e. recognizing objects by using multiple task-specific fixations of a retina with few pixels, and obtained positive results. We believe that the intelligent choice of fixation points and the integration of multiple glimpses will be essential for making biologically inspired vision systems work well on large images. Acknowledgments We thank Marc’Aurelio Ranzato and the reviewers for many helpful comments, and Josh Susskind and Tommy Liu for help with the facial expression dataset. This research was supported by NSERC. References [1] Hermann von Helmholtz. Treatise on physiological optics. Dover Publications, New York, 1962. z(i, j) were initialized in a topographic manner (i.e. each component of z(i, j) is ≫0 only in a small region of the image). Finally, to avoid overfitting, exponentially decaying averages of the parameters of the model were maintained throughout training and were used as the values of the model at test time. 8This simplification of the retinal transformation makes it more convenient to estimate the percentage of high-resolution pixels used by the multi-fixation RBM and contrast it with the SVM trained on the full image. 8 [2] Arash Fazl, Stephen Grossberg, and Ennio Mingolla. View-invariant object category learning, recognition, and search: how spatial and object attention are coordinated using surface-based attentional shrouds. Cogn Psychol, 58(1):1–48, 2009. [3] Roland Memisevic and Geoffrey E. Hinton. Unsupervised learning of image transformations. In In Computer Vision and Pattern Recognition. IEEE Computer Society, 2007. [4] Urs K¨oster and Aapo Hyv¨arinen. A two-layer ica-like model estimated by score matching. In ICANN’07: Proceedings of the 17th international conference on Artificial neural networks, pages 798–807, Berlin, Heidelberg, 2007. Springer-Verlag. [5] Geoffrey E. Hinton. Learning to represent visual input. Phil. Trans. R. Soc., 365(1537):177–84, 2010. [6] Roland Memisevic and Geoffrey E. Hinton. Learning to represent spatial transformations with factored higher-order boltzmann machines. Neural Computation, 22:1473–1492, 2010. [7] Geoffrey E. Hinton and Ruslan Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, July 2006. [8] Graham W. Taylor and Geoffrey E. Hinton. Factored conditional restricted boltzmann machines for modeling motion style. In ICML ’09: Proceedings of the 26th Annual International Conference on Machine Learning, pages 1025–1032, New York, NY, USA, 2009. ACM. [9] Hugo Larochelle and Yoshua Bengio. Classification using discriminative restricted boltzmann machines. In ICML ’08: Proceedings of the 25th international conference on Machine learning, pages 536–543, New York, NY, USA, 2008. ACM. [10] Geoffrey E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14:1771–1800, 2002. [11] Rajesh P.N. Rao, Gregory J. Zelinsky, Mary M. Hayhoe, and Dana H. Ballard. Modeling saccadic targeting in visual search. In David S. Touretzky, Michael Mozer, and Michael E. Hasselmo, editors, Advances in Neural Information Processing Systems 8, pages 830–836. MIT Press, 1996. [12] Laura Walker Renninger, James M. Coughlan, Preeti Verghese, and Jitendra Malik. An information maximization model of eye movements. In Lawrence K. Saul, Yair Weiss, and L´eon Bottou, editors, Advances in Neural Information Processing Systems 17, pages 1121–1128. MIT Press, Cambridge, MA, 2005. [13] Wei Zhang, Hyejin Yang, Dimitris Samaras, and Gregory Zelinsky. A computational model of eye movements during object class detection. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, Advances in Neural Information Processing Systems 18, pages 1609–1616. MIT Press, Cambridge, MA, 2006. [14] Antonio Torralba, Monica S. Castelhano, Aude Oliva, and John M. Henderson. Contextual guidance of eye movements and attention in real-world scenes: the role of global features in object search. Psychological Review, 113:2006, 2006. [15] Laurent Itti, Christof Koch, and Ernst Niebur. A model of saliency-based visual attention for rapid scene analysis. IEEE Trans. Pattern Anal. Mach. Intell., 20(11):1254–1259, 1998. [16] Laurent Itti and Christof Koch. Computational modelling of visual attention. Nature Reviews Neuroscience, 2(3):194–203, 2001. [17] Lucas Paletta, Gerald Fritz, and Christin Seifert. Q-learning of sequential attention for visual object recognition from informative local descriptors. In ICML ’05: Proceedings of the 22nd international conference on Machine learning, pages 649–656, New York, NY, USA, 2005. ACM. [18] Ethem Alpaydin. Selective attention for handwritten digit recognition. In David S. Touretzky, Michael Mozer, and Michael E. Hasselmo, editors, Advances in Neural Information Processing Systems 8, pages 771–777. MIT Press, 1996. [19] Christopher Kanan and Garrison Cottrell. Robust classification of objects, faces, and flowers using natural image statistics. In CVPR, 2010. [20] Stephen Gould, Joakim Arfvidsson, Adrian Kaehler, Benjamin Sapp, Marius Messner, Gary Bradski, Paul Baumstarck, Sukwon Chung, and Andrew Y. Ng. Peripheral-foveal vision for real-time object recognition and tracking in video. In In International Joint Conference on Artificial Intelligence (IJCAI, 2007. [21] Hugo Larochelle, Dumitru Erhan, Aaron Courville, James Bergstra, and Yoshua Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In ICML ’07: Proceedings of the 24th international conference on Machine learning, pages 473–480, New York, NY, USA, 2007. ACM. [22] Hugo Larochelle, Yoshua Bengio, Jerome Louradour, and Pascal Lamblin. Exploring strategies for training deep neural networks. Journal of Machine Learning Research, 10:1–40, 2009. [23] Josh M. Susskind, Adam K. Anderson, and Geoffrey E. Hinton. The toronto face database. Technical Report UTML TR 2010-001, Dept. of Computer Science, University of Toronto, 2010. 9
2010
122
3,880
Collaborative Filtering in a Non-Uniform World: Learning with the Weighted Trace Norm Ruslan Salakhutdinov Brain and Cognitive Sciences and CSAIL, MIT Cambridge, MA 02139 rsalakhu@mit.edu Nathan Srebro Toyota Technological Institute at Chicago Chicago, Illinois 60637 nati@ttic.edu Abstract We show that matrix completion with trace-norm regularization can be significantly hurt when entries of the matrix are sampled non-uniformly, but that a properly weighted version of the trace-norm regularizer works well with non-uniform sampling. We show that the weighted trace-norm regularization indeed yields significant gains on the highly non-uniformly sampled Netflix dataset. 1 Introduction Trace-norm regularization is a popular approach for matrix completion and collaborative filtering, motivated both as a convex surrogate to the rank [7, 6] and in terms of a regularized infinite factor model with connections to large-margin norm-regularized learning [17, 1, 15]. Current theoretical guarantees on using the trace-norm for matrix completion assume a uniform sampling distribution over entries of the matrix [18, 6, 5, 13]. In a collaborative filtering setting, where rows of the matrix represent e.g. users and columns represent e.g. movies, this corresponds to assuming all users are equally likely to rate movies and all movies are equally likely to be rated. This of course cannot be further from the truth, as invariably some users are more active than others and some movies are rated by many people while others are rarely rated. In this paper we show, both analytically and through simulations, that this is not a deficiency of the proof techniques used to establish the above guarantees. Indeed, a non-uniform sampling distribution can lead to a significant deterioration in prediction quality and an increase in the sample complexity. Under non-uniform sampling, as many as Ω(n4/3) samples might be needed for learning even a simple (e.g. orthogonal low rank) n × n matrix. This is in sharp contrast to the uniform sampling case, in which ˜O(n) samples are enough. It is important to note that if the rank could be minimized directly, which is in general not computationally tractable, ˜O(n) samples would be enough to learn a low-rank model even under an arbitrary non-uniform distribution. Our analysis further suggests a weighted correction to the trace-norm regularizer, that takes into account the sampling distribution. Although appearing at first as counter-intuitive, and indeed being the opposite of a previously suggested weighting [21], this weighting is well-motivated by our analytic analysis and we discuss how it corrects the problems that the unweighted trace-norm has with non-uniform sampling. We show how the weighted trace-norm indeed yields a significant improvement on the highly non-uniformly sampled Netflix dataset. The only other work we are aware of that studies matrix completion under non-uniform sampling is work on exact completion (i.e. when the matrix is assumed to be exactly low rank) under powerlaw sampling [12]. Other then being limited to one specific distribution, the requirement of the matrix being exactly low rank is central to this work, and the results cannot be directly applied in the presence of even small noise. Empirically, the approach leads to deterioration in predictive performance on the Netflix data [12]. 1 2 Complexity Control in terms of Matrix Factorizations Consider the problem of predicting the entries of some unknown target matrix Y ∈Rn×m based on a random subset S of observed entries YS. For example, n and m may represent the number of users and the number of movies, and Y may represent a matrix of partially observed rating values. Predicting elements of Y can be done by finding a matrix X minimizing the training error, here measured as a squared error, and some measure c(X) of complexity. That is, minimizing either: min X ∥XS −YS∥2 F + λc(X) (1) or: min c(X)≤C ∥XS −YS∥2 F , (2) where YS, and similarly XS, denotes the matrix “masked” by S, where (YS)i,j = Yi,j if (i, j) ∈S and 0 otherwise. For now we ignore possible repeated entries in S and we also assume that n ≤m without loss of generality. The two formulations (1) and (2) are equivalent up to some (unknown) correspondence between λ and C, and we will be referring to them interchangeably. A basic measure of complexity is the rank of X, corresponding to the minimal dimensionality k such that X = U ⊤V for some U ∈Rk×n and V ∈Rk×m. Directly constraining the rank of X forms one of the most popular approaches to collaborative filtering. However, the rank is non-convex and hard to minimize. It is also not clear if a strict dimensionality constraint is most appropriate for measuring the complexity. Trace-norm Regularization Lately, methods regularizing the norm of the factorization U ⊤V , rather than its dimensionality, have been advocated and were shown to enjoy considerable empirical success [14, 15]. This corresponds to measuring complexity in terms of the trace-norm of X, which can be defined equivalently either as the sum of the singular values of X, or as [7]: ∥X∥tr = min X=U′V 1 2(∥U∥2 F + ∥V ∥2 F), (3) where the dimensionality of U and V is not constrained. Beyond the modeling appeal of normbased, rather than dimension-based, regularization, the trace-norm is a convex function of X and so can be minimized by either local search or more sophisticated convex optimization techniques. Scaling The rank, as a measure of complexity, does not scale with the size of the matrix. That is, even very large matrices can have low rank. Viewing the rank as a complexity measure corresponding to the number of underlying factors, if data is explained by e.g. two factors, then no matter how many rows (“users”) and columns (“movies”) we consider, the data will still have rank two. The trace-norm, however, does scale with the size of the matrix. To see this, note that the trace-norm is the ℓ1 norm of the spectrum, while the Frobenius norm is the ℓ2 norm of the spectrum, yielding: ∥X∥F ≤∥X∥tr ≤∥X∥F p rank(X) ≤√n ∥X∥F . (4) The Frobenius norm certainly increases with the size of the matrix, since the magnitude of each element does not decrease when we have more elements, and so the trace-norm will also increase. The above suggests measuring the trace-norm relative to the Frobenius norm. Without loss of generality, consider each target entry to be of roughly unit magnitude, and so in order to fit Y each entry of X must also be of roughly unit magnitude. This suggests scaling the trace-norm by √nm. More specifically, we study the trace-norm through the complexity measure: tc(X) = ∥X∥2 tr nm , (5) which puts the trace-norm on a comparable scale to the rank. In particular, when each entry of X is, on-average, of unit magnitude (i.e. has unit variance) we have 1 ≤tc(X) ≤rank(X). The relationship between tc(X) and the rank is tight for “orthogonal” low-rank matrices, i.e. lowrank matrices X = U ⊤V where the rows of U and also the rows of V are orthogonal and of equal magnitudes. In order for the entries in Y to have unit magnitude, i.e. ∥Y ∥2 F = nm, we have that rows 2 in U have norm q n/ √ k and rows in V have norm q m/ √ k, yielding precisely tc(X) = rank(X). Such an orthogonal low-rank matrix can be obtained, e.g., when entries of U and V are zero-mean i.i.d. Gaussian with variance 1/ √ k, corresponding to unit-variance entries in X. Generalization Guarantees Another place where we can see that tc(X) plays a similar role to rank(X) is in the generalization and sample complexity guarantees that can be obtained for low-rank and low-trace-norm learning. If there is a low-rank matrix X∗achieving low average error relative to Y (e.g. if Y = X∗+ noise), then by minimizing the training error subject to a rank constraint (a computationally intractable task), |S| = ˜O(rank(X∗)(n + m)) samples are enough in order to guarantee learning a matrix X whose overall average error is close to that of X∗[16]. Similarly, if there is a low-trace-norm matrix X∗achieving low average error, then minimizing the training error and the trace-norm (a convex optimization problem), |S| = ˜O(tc(X∗)(n+m)) samples are enough in order to guarantee learning a matrix X whose overall average error is close to that of X∗[18]. In these bounds tc(X) plays precisely the same role as the rank, up to logarithmic factors. In order to get some intuitive understanding of low-rank learning guarantees, it is enough to consider the number of parameters in the rank-k factorization X = U ⊤V . It is easy to see that the number of parameters in the factorization is roughly k(m + n) (perhaps a bit less due to rotational invariants). We therefore would expect to be able to learn X when we have roughly this many samples, as is indeed confirmed by the rigorous sample complexity bounds. For low-trace-norm learning, consider a sample S of size |S| ≤Cn, for some constant C. Taking entries of Y to be of unit magnitude, we have ∥YS∥F = p |S| ≤ √ Cn (recall that YS is defined to be zero outside S). From (4) we therefore have: ∥YS∥tr ≤ √ Cn · √n = √ Cn and so tc(YS) ≤C. That is, we can “shatter” any sample of size |S| ≤Cn with tc(X) = C: no matter what the underlying matrix Y is, we can always perfectly fit the training data with a low trace-norm matrix X s.t. tc(X) ≤C, without generalizing at all outside S. On the other hand, we must allow matrices with tc(X) = tc(X∗), otherwise we can not hope to find X∗, and so we can only constrain tc(X) ≤ C = tc(X∗). We therefore cannot expect to learn with less than ntc(X∗) samples. It turns out that this is essentially the largest random sample that can be shattered with tc(X) ≤C = tc(X∗). If we have more than this many samples we can start learning. 3 Trace-Norm Under a Non-Uniform Distribution In this section, we analyze trace-norm regularized learning when the sampling distribution is not uniform. That is, when there is some, known or unknown, non-uniform distribution D over entries of the matrix Y (i.e. over index pairs (i, j)) and our sample S is sampled i.i.d. from D. Our objective is to get low average error with respect to the distribution D. That is, we measure generalization performance in terms of the weighted sum-squared-error: ∥X −Y ∥2 D = E(i,j)∼D  (Xij −Yij)2 = X ij D(i, j)(Xij −Yij)2. (6) We first point out that when using the rank for complexity control, i.e. when minimizing the training error subject to a low-rank constraint, non-uniformitydoes not pose a problem. The same generalization and learning guarantees that can be obtained in the uniform case, also hold under an arbitrary distribution D. In particular, if there is some low-rank X∗such that ∥X∗−Y ∥2 D is small, then ˜O(rank(X∗)(n + m)) samples are enough in order to learn (by minimizing training error subject to a rank constraint) a matrix X with ∥X −Y ∥2 D almost as small as ∥X∗−Y ∥2 D [16]. However, the same does not hold when learning using the trace-norm. To see this, consider an orthogonal rank-k square n×n matrix, and a sampling distribution which is uniform over an nA×nA sub-matrix A, with nA = na. That is, the row (e.g. “user”) is selected uniformly among the first nA rows, and the column (e.g. “movie”) is selected uniformly among the first nA columns. We will use A to denote the subset of entries in the submatrix, i.e. A = {(i, j)|1 ≤i, j ≤nA}. For any sample S, we have: tc(YS) = ∥YS∥2 tr n2 ≤∥YS∥2 F rank(YS) n2 ≤|S|na n2 = |S| n2−a , (7) 3 where we again take the entries in Y to be of unit magnitude. In the second inequality above we use the fact that YS is zero outside of A, and so we can bound the rank of YS by the dimensionality nA = na of A. Setting a < 1, we see that we can shatter any sample of size1 kn2−a = ˜ω(n) with a matrix X for which tc(X)<k. When a ≤1/2, the total number of entries in A is less than n. In this case ˜O(n) observations are enough in order to memorize2 YA. But when 1/2 < a < 1, with ˜O(n) observations, restricting to even tc(X) < 1, we can neither learn Y , since we can shatter YS, nor memorize it. For example, when a = 2/3 and so nA = n2/3, we need roughly n4/3 to start learning by constraining tc(X) to a constant — the same as we would need in order to memorize YA. This is a factor of n1/3 greater than the sample size needed to learn a matrix with constant tc(X) in the uniform case. The above arguments establish that restricting the complexity to tc(X) < k might not lead to generalization with ˜O(kn) samples in the non-uniform case. But does this mean that we cannot learn a rank-k matrix by minimizing the trace-norm using ˜O(kn) samples when the sampling distribution is concentrated on a small submatrix? Of course this is not the case. Since the samples are uniform on a small submatrix, we can just think of the submatrix A as our entire space. The target matrix still has low rank, even when restricted to A, and we are back in the uniform sampling scenario. The only issue here is that tc(X) ≤k, i.e. ∥X∥tr ≤n √ k, is the right constraint in the uniform observation scenario. When samples are concentrated in nA, we actually need to restrict to a much smaller trace norm, ∥X∥tr ≤na√ k, which will allow learning with ˜O(kna) samples. We can, however, modify the example and construct a sampling distribution under which Ω(n4/3) samples are required in order to learn even an “orthogonal” low-rank matrix, no matter what constraint is placed on the trace-norm. This is a significantly large sample complexity than ˜O(kn), which is what we would expect, and what is required for learning by constraining the rank directly. A B To do so, consider another submatrix B of size nB × nB with nB = n/2, such that the rows and columns of A and B do not overlap (see figure). Now, consider a sampling distribution D which is uniform over A with probability half, and uniform over B with probability half. Consider fitting a noisy matrix Y = X∗+noise where X∗is “orthogonal” rank-k. In order to fit on B, we need to allow a tracenorm of at least ∥X∗ B∥tr = n 2 √ k, i.e. allow tc(X) = k/4. But as discussed above, with such a generous constraint on the trace-norm, we will be able to shatter S ⊂A whenever |S ∩A| = |S|/2 ≤kn2−a/4. Since there is no overlap in rows and columns, and so values in the sub-matrices A and B are independent, shattering S∩A means we cannot hope to learn in A. Setting a=2/3 as before, with o(n4/3) samples, we cannot learn in A and B jointly: either we constrain to a trace-norm which is too low to fit X∗ B (we under-fit on B), or we allow a trace-norm which is high enough to overfit YS∩A. In any case, we will make errors on at least half the mass of D.3 Empirical Example Let us consider a simple simulation experiment that will help us illustrates this phenomenon. Consider a simple synthetic example, where we used nA = 300 and nB = 4700, with an orthogonal rank-2 matrix X∗and Y = X∗+ N(0, 1) (in case of repeated entries, the noise is independent for each appearance in the sample). The training sample size was also set to |S|=140,000. The three curves of Fig. 1 measure the excess (test) error ∥X −X∗∥2 D = ∥X −Y ∥2 D−∥Y −X∗∥2 D of the learned model, as well as the error contribution from A and from B, as a function of the constraint on tc(X), for the sampling distribution discussed above and a specific sample size. As can be seen, although it is possible to constrain tc(X) so as to achieve squared-error of less than 0.8 on B, this constraint is too lax for A and allows for over-fitting. Constraining tc(X) so as to avoid overfitting A (achieving almost zero excess test error), leads to a suboptimal fit on B. 1Recall that f(n) = ˜ω(g(n)) iff for all p, g(n) logp g(n) f(n) →0. 2The algorithm saw all (or most) entries of the matrix and does not need to predict any unobserved entries. 3More accurately, if we do allow high enough trace-norm to fit B, and |S| = o(n4/3), then the “cost” of overfitting YS∩A is negligible compared to the cost of fitting X∗ B. For large enough n, we would be tempted to very slightly deteriorate the fit of X∗ B in order to “free up” enough trace-norm and completely overfit YS∩A. 4 10 −3 10 −2 10 −1 10 0 10 1 0 0.2 0.4 0.6 0.8 1 1.2 tc(X) Mean Squared Error 10 15 20 25 30 0 0.2 0.4 0.6 0.8 1 1.2 tcpq(X) Mean Squared Error 10 −2 10 −1 10 0 10 1 0 0.2 0.4 0.6 0.8 1 1.2 Regularization parameter λ Mean Squared Error B A+B shift A shift A+B A B A+B A B A+B A Figure 1: Left: Mean squared error (MSE) of the learned model as a function of the constraint on tc(X) (left), tcpq(X) (middle). Right: The solid curves show the optimum of the mean squared error objective (9) (unweighted trace-norm), as a function of the regularization parameter λ. The dashed curves display a weighted trace-norm. The black (middle) curve is the overall MSE error, the red (bottom) curve measures only the contribution from A, and the blue (top) curve measures only the contribution from B. Penalty Formulation Until now we discussed learning by constraining the trace-norm, i.e. using the formulation (2). It is also insightful to consider the penalty view (1), i.e. learning by minimizing min X ∥YS −XS∥2 F + λ ∥X∥tr . (8) First observe that the characterization (3) allows us to decompose ∥X∥tr = ∥XA∥tr + ∥XB∥tr, where w.l.o.g. we take all columns of U and V outside A and B to be zero. Since we also have ∥YS −XS∥2 F = ∥YA∩S −XA∩S∥2 F + ∥YB∩S −XB∩S∥2 F, we can decompose the training objective (8) as: ∥YS −XS∥2 F + λ ∥X∥tr = (∥YA∩S −XA∩S∥2 F + λ ∥XA∥tr) + (∥YB∩S −XB∩S∥2 F + λ ∥XB∥tr) =  ∥YA∩S −XA∩S∥2 F + λnA p tcA(XA)  +  ∥YB∩S −XB∩S∥2 F + λnB p tcB(XB)  , (9) where tcA(XA) = ∥XA∥2 tr /n2 A (and similarly tcB(XB)) refers to the complexity measure tc(·) measured relative to the size of A (similarly B). We see that the training objective decomposes to objectives over A and B. Each one of these corresponds to a trace-norm regularized learning problem, under a uniform sampling distribution (in the corresponding submatrix) of a noisy low-rank “orthogonal” matrix, and can therefor be learned with ˜O(knA) and ˜O(knB) samples respectively. In other words, ˜O(kn) samples should be enough to learn both inside A and inside B. However, the regularization tradeoff parameter λ compounds the two problems. When the objective is expressed in terms of tc(·), as in (9), the regularization tradeoff is scaled differently in each part of the training objective. With ˜O(kn) samples, it is possible to learn in A with some setting of λ, and it is possible to learn in B with some other setting of λ, but from the discussion above we learn that no single value of λ will allow learning in both A and B. Either λ is too high yielding too strict regularization in B, so learning on B is not possible, perhaps since it is scaled by nB ≫nA. Or λ is too small and does not provide enough regularization in A. Returning to our simulation experiment, the solid curves of Fig. 1, right panel, show the excess test error for the minimizer of the training objective (9), as a function of the regularization tradeoff parameter λ. Note that these are essentially the same curves as displayed in Fig. 1, except the path of regularized solutions is now parameterized by λ rather than by the bound on tc(X). Not surprisingly, we see the same phenomena: different values of λ are required for optimal learning on A and on B. Forcing the same λ on both parts of the training objective (9) yields a deterioration in the generalization performance. 4 Weighted Trace Norm The decomposition (9) and the discussion in the previous section suggests weighting the trace-norm by the frequency of rows and columns. For a sampling distribution D, denote by p(i) the row marginal, i.e. the probability of observing row i, and similarly denote by q(j) the column marginal. We propose using the following weighted version of the trace-norm as a regularizer: ∥X∥tr(p,q) = ∥diag(√p)Xdiag(√q)∥tr = min X=U′V 1 2 X i p(i) ∥Ui∥2 + X j q(j), ∥Vj∥2  (10) 5 where diag(√p) is a diagonal matrix with p p(i) on its diagonal (similarly diag(√q)). The corresponding normalized complexity measure is given by tcpq(X) = ∥X∥2 tr(p,q). Note that for a uniform distribution we have that tcpq(X) = tc(X). Furthermore, it is easy to verify that for an “orthogonal” rank-k matrix X we have tcpq(X) = k for any sampling distribution. Equipped with the weighted trace-norm as a regularizer, let us revisit the problematic sampling distribution studied in the previous Section. In order to fit the “orthogonal” rank-k X∗, we need a weighted trace-norm of ∥X∗∥tr(p,q) = p tcpq(X) = √ k. How large a sample S ∩A can we now shatter using such a weighted trace-norm? We can shatter a sample if ∥YS∩A∥tr ≤ √ k. We can calculate: ∥YS∩A∥tr(p,q) = ∥YS∩A∥tr /(2nA) ≤ p |S ∩A|nA/(2nA) = p |S|/(8nA). (11) That is, we can shatter a sample of size up to |S| = 8knA < 8kn. The calculation for B is identical. It seems that now, with a fixed constraint on the weighted trace-norm, we have enough capacity to both fit X∗, and with ˜O(kn) samples, avoid overfitting on A. Returning to the penalization view (2) we can again decompose the training objective as: ∥YS −XS∥2 F + λ ∥X∥tr(p,q) = (12) =  ∥YA∩S −XA∩S∥2 F + λ/2 p tcA(XA)  +  ∥YB∩S −XB∩S∥2 F + λ/2 p tcB(XB)  avoiding the scaling by the block sizes which we encountered in (9). Returning to the synthetic experiments of Fig. 1 (right panel), and comparing (9) with (12), we see that introducing the weighting corresponds to a relative change of nA/nB in the correspondence of the regularization tradeoff parameters used for A and for B. This corresponds to a shift of log nA nB in the log-domain used in the figure. Shifting the solid red (bottom) curve by this amount yields the dashed red (bottom) curve. The solid blue (top) curve and the dashed red (bottom) curve thus represent the excess error on B and on A when the weighted trace norm is used, i.e. the training objective (12) is minimized. The dashed black (middle) curve is the overall excess error when using this training objective. As can be seen, the weighting aligns the excess errors on A and on B much better, and yields a lower overall error. The weighted trace-norm achieves the lowest MSE of 0.4301 with corresponding λ = 0.11. This is compared to the lowest MSE of 0.4981 with λ = 0.80, achieved by the unweighted trace-norm. It is also interesting to observe that the weighted trace-norm outperforms its unweighted counterpart for a wide range of regularization parameters λ ∈[0.01; 0.6]. This may also suggest that in practice, particularly when working with large and imbalanced datasets, it may be easier to search for regularization parameters using weighted trace-norm. Finally, Fig. 1, right panel, also suggests that the optimal shift might actually be smaller than nA/nB. We can consider a smaller shift by using the partially-weighted trace-norm: ∥X∥tr(p,q,α) = diag(pα/2)Xdiag(qα/2) tr = min X=U⊤V 1 2( X i p(i)α ∥Ui∥2 + X j q(j)α ∥Vj∥2). and the corresponding normalized complexity measure tcα(X) = ∥X∥2 tr(pα/n1−α,qα/m1−α). Other Weightings and Bayesian Perspective The weighted trace-norm motivated by the analysis here (with α = 1) implies that the frequent users (equivalently movies) get regularized much stronger than the rare users (equivalently movies). This might at first seem quite counter-intuitive as the natural weighting might seem to be the opposite. Indeed, Weimer et al. [21] speculated that with a uniform weighting (α = 0) frequent users are regularized too heavily compared to infrequent users, and so suggested regularizing frequent users (and movies) with a lower weight, corresponding to α = −1. Although this might seem natural, we saw here that the reverse is actually true – the Weimer et al. weighting (α = −1) would only make things worse. Indeed, given the analysis here, Weimer et al. actually observed a deterioration in prediction quality when using their weighting. This is also demonstrated in the experiments on the Netflix data in Section 6. 6 The weighted regularization motivated here (with α = 1) is also quite unusual from Bayesian perspective. The trace-norm can be viewed as a negative-log-prior for the Probabilistic Matrix Factorization model [15], where entries of U, V are taken to be i.i.d. Gaussian. The two terms of (8) can then be interpreted as a log-likelihood and log-prior, and minimizing (8) corresponds to finding the MAP parameters. Introducing weighting (with α = 1) effectively states that the effect of the prior becomes stronger as we observe more data. Yet, our analysis strongly suggest that in non-uniform setting, such “unorthodox” regularization is crucial for achieving good generalization performance. 5 Practical Implementation When dealing with large datasets, such as the Netflix data, the most practical way to fit trace-norm regularized models is through stochastic gradient descent [15, 8]. Let ni = P j Sij and mj = P i Sij denote the number of observed ratings for user i and movie j respectively. The training objective using a partially-weighted trace-norm 10 can be written as: X {i,j}∈S Yij −U ⊤ i Vj 2 + λ 2 p(i)α ni ∥Ui∥2 + q(j)α mj ∥Vj∥2  , where U ∈Rk×n and V ∈Rk×m. We can optimize this objective using stochastic gradient descent by picking one training pair (i, j) at random at each iteration, and taking a step in the direction opposite the gradient of the term corresponding to the chosen (i, j). Note that even though the objective (13) as a function of U and V is non-convex, there are no nonglobal local minima if we set k to be large enough, i.e. k > min(n, m) [2]. However, in practice using very large values of k becomes computationally expensive. Instead, we consider truncated trace-norm minimization by restricting k to smaller values. In the next section we demonstrate that even when using truncated trace-norm, its weighted version significantly improves model’s prediction performance. In our experiments, we also replace unknown row p(i) and column q(j) marginals in (13) by their empirical estimates ˆp(i) = ni/|S| and ˆq(j) = mj/|S|. This results in the following objective: X {i,j}∈S Yij −U ⊤ i Vj 2 + λ 2|S|  nα−1 i ∥Ui∥2 + mα−1 j ∥Vj∥2  . (13) Setting α = 1, corresponding to the weighted trace-norm (10), results in stochastic gradient updates that do not involve the row and column counts at all and are in some sense the simplest. Strangely, and likely originating as a “bug” in calculating the stochastic gradients by one of the participants, these steps match the stochastic training used by many practitioners on the Netflix dataset, without explicitly considering the weighted trace-norm [8, 19, 15]. 6 Experimental results We tested the weighted trace-norm 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 qualification set, containing 1,408,395 ratings, out of which we set aside 100,000 ratings for validation. The “qualification set” pairs were selected by Netflix from the most recent ratings for a subset of the users. Due to the special selection scheme, ratings from users with few ratings are overrepresented in the qualification set, relative to the training set. To be able to report results where the train and test sampling distributions are the same, we also created a “test set” by randomly selecting and removing 100,000 ratings from the training set. All ratings were normalized to be zero-mean by subtracting 3.6. The dataset is very imbalanced: it includes users with over 10,000 ratings as well as users who rated fewer than 5 movies. For various values of α, we learned a factorization U ⊤V with k = 30 and with k = 100 dimensions (factors) using stochastic gradient descent as in (13). For each value of α and k we selected the regularization tradeoff λ by minimizing the error on the 100,000 qualification set examples set aside for validation. Results on both the Netflix qualification set and on the test set we created are reported in Table 1. Recall that the sampling distribution of the “test set” matches that of the training data, while the qualification set is sampled differently, explaining the large difference in generalization between the two. 7 Table 1: Root Mean Squared Error (RMSE) on the Netflix qualification set and on a test set that was held out from the training data, for training by minimizing (13). We report λ/|S| minimizing the error on the validation set (held out from the qualification set), qualification and test errors using this tradeoff, and tcα(X) at the optimum. Last row: training by regularizing the max-norm. α k λ/|S| tcα(X) Test Qual k λ/|S| tcα(X) Test Qual 1 30 0.05 4.34 0.7607 0.9105 100 0.08 5.47 0.7412 0.9071 0.9 30 0.07 4.27 0.7573 0.9091 100 0.1 5.23 0.7389 0.9062 0.75 30 0.2 5.04 0.7723 0.9128 100 0.3 6.24 0.7491 0.9098 0.5 30 0.5 7.32 0.7823 0.9159 100 0.8 9.65 0.7613 0.9127 0 30 2.5 10.36 0.7889 0.9235 100 3.0 21.23 0.7667 0.9203 -1 30 450 11.41 0.7913 0.9256 100 700 23.31 0.7713 0.9221 ∥X∥max 30 mc(X) = 5.06 0.7692 0.9131 100 mc(X) = 5.77 0.7432 0.9092 For both k = 30 and k = 100, the weighted trace-norm (α = 1) significantly outperformed the unweighted trace-norm (α = 0). Interestingly, the optimal weighting (setting of α) was a bit lower then, but very close to α = 1. For completeness, we also evaluated the weighting suggested by Weimer et al. [21], corresponding to α = −1. Unsurprising, given our analysis, this seemingly intuitive weighting hurts predictive performance. For both k = 30 and k = 100, we also observed that for the weighted trace-norm (α = 1) good generalization is possible with a wide range of λ settings, while for the unweighted trace-norm (α = 0), the results were much more sensitive to the setting of λ. This confirms our previous results on the synthetic experiment and strongly suggests that it may be far easier to search for regularization parameters using the weighted trace-norm. Comparison with the Max-Norm We also compared the predictive performance on Netflix to predictions based on max-norm regularization. The max-norm is defined as: ∥X∥max = min X=U′V 1 2(max i ∥Ui∥2 + max j ∥Vj∥2). (14) Similarly to the rank, but unlike the trace-norm, generalization and learning guarantees based on the max-norm hold also under an arbitrary, non-uniform, sampling distribution. Specifically, defining mc(X) = ∥X∥2 max (no normalization is necessary here), ˜O(mc(X)(n + m)) samples are enough for generalization w.r.t. any sampling distribution (just like the rank) [18]. This suggests that perhaps the max-norm can be used as an alternative factorization-regularization in the presence of non-uniform sampling. Indeed, as evident in Table 1, max-norm based regularization does perform much better then the unweighted trace-norm. The differences between the max-norm and the weighted tracenorm are small, but it seems that using the weighted trace-norm is slightly but consistently better. 7 Summary In this paper we showed both analytically and empirically that under non-uniform sampling, tracenorm regularization can lead to significant performance deterioration and an increase in sample complexity. Our analytic analysis suggests a non-intuitive weighting for the trace-norm in order to correct the problem. Our results on both synthetic and on the highly imbalanced Netflix datasets further demonstrate that the weighted trace-norm yields significant improvements in prediction quality. In terms of optimization, we focused on stochastic gradient descent,both since it is a simple and practical method for very large-scale trace-norm optimization [15, 8], and since the weighting was originally stumbled upon through this optimization approach. However, most recently proposed methods for trace-norm optimization (e.g. [3, 10, 9, 11, 20]) can also be easily modified for the weighted trace-norm. We hope that the weighted trace-norm, and the discussions in Sections 3 and 4, will be helpful in deriving theoretical learning guarantees for arbitrary non-uniform sampling distributions, both in the form of generalization error bounds as in [18], and generalizing the compressed-sensing inspired work on recovery of noisy low-rank matrices as in [4, 13]. Acknowledgments RS is supported by NSERC, Shell, and NTT Communication Sciences Laboratory. 8 References [1] J. Abernethy, F. Bach, T. Evgeniou, and J.P. Vert. A new approach to collaborative filtering: Operator estimation with spectral regularization. Journal of Machine Learning Research, 10:803–826, 2009. [2] S. Burer and R.D.C. Monteiro. Local minima and convergence in low-rank semidefinite programming. Mathematical Programming, 103(3):427–444, 2005. [3] J.F. Cai, E.J. Cand`es, and Z. Shen. A Singular Value Thresholding Algorithm for Matrix Completion. SIAM Journal on Optimization, 20:1956, 2010. [4] E.J. Candes and Y. Plan. Matrix completion with noise. Proceedings of the IEEE (to appear), 2009. [5] E.J. Candes and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9, 2009. [6] E.J. Candes and T. Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Trans. Inform. Theory (to appear), 2009. [7] M. Fazel, H. Hindi, and S.P. Boyd. A rank minimization heuristic with application to minimum order system approximation. In Proceedings American Control Conference, volume 6, 2001. [8] Yehuda Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. In ACM SIGKDD, pages 426–434, 2008. [9] Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM Journal on Matrix Analysis and Applications, 31(3):1235–1256, 2009. [10] S. Ma, D. Goldfarb, and L. Chen. Fixed point and Bregman iterative methods for matrix rank minimization. Mathematical Programming, pages 1–33, 2009. [11] R. Mazumder, T. Hastie, and R. Tibshirani. Spectral Regularization Algorithms for Learning Large Incomplete Matrices. Journal of Machine Learning Research, 11:2287–2322, 2010. [12] R. Meka, P. Jain, and I. S. Dhillon. Matrix completion from power-law distributed samples. In Advances in Neural Information Processing Systems, volume 21, 2009. [13] B. Recht. A simpler approach to matrix completion. preprint, available from author’s webpage, 2009. [14] J.D.M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In ICML, page 719, 2005. [15] Ruslan Salakhutdinov and Andriy Mnih. Probabilistic matrix factorization. In Advances in Neural Information Processing Systems, volume 20, 2008. [16] N. Srebro, N. Alon, and T. Jaakkola. Generalization error bounds for collaborative prediction with low-rank matrices. In Advances In Neural Information Processing Systems 17, 2005. [17] N. Srebro, J. Rennie, and T. Jaakkola. Maximum margin matrix factorization. In Advances In Neural Information Processing Systems 17, 2005. [18] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In COLT, 2005. [19] G´abor Tak´acs, Istv´an Pil´aszy, Botty´an N´emeth, and Domonkos Tikk. Scalable collaborative filtering approaches for large recommender systems. Journal of Machine Learning Research, 10:623–656, 2009. [20] R. Tomioka, T. Suzuki, M. Sugiyama, and H. Kashima. A fast augmented lagrangian algorithm for learning low-rank matrices. In ICML, pages 1087–1094, 2010. [21] M. Weimer, A. Karatzoglou, and A. Smola. Improving maximum margin matrix factorization. Machine Learning, 72(3):263–276, 2008. 9
2010
123
3,881
Worst-case bounds on the quality of max-product fixed-points Meritxell Vinyals Artificial Intelligence Research Institute (IIIA) Spanish Scientific Research Council (CSIC) Campus UAB, Bellaterra, Spain meritxell@iiia.csic.es Jes´us Cerquides Artificial Intelligence Research Institute (IIIA) Spanish Scientific Research Council (CSIC) Campus UAB, Bellaterra, Spain cerquide@iiia.csic.es Alessandro Farinelli Department of Computer Science University of Verona Strada le Grazie, 15,Verona, Italy alessandro.farinelli@univr.it Juan Antonio Rodr´ıguez-Aguilar Artificial Intelligence Research Institute (IIIA) Spanish Scientific Research Council (CSIC) Campus UAB, Bellaterra, Spain jar@iiia.csic.es Abstract We study worst-case bounds on the quality of any fixed point assignment of the max-product algorithm for Markov Random Fields (MRF). We start providing a bound independent of the MRF structure and parameters. Afterwards, we show how this bound can be improved for MRFs with specific structures such as bipartite graphs or grids. Our results provide interesting insight into the behavior of max-product. For example, we prove that max-product provides very good results (at least 90% optimal) on MRFs with large variable-disjoint cycles1. 1 Introduction Graphical models such as Markov Random Fields (MRFs) have been successfully applied to a wide variety of applications such as image understanding [1], error correcting codes [2], protein folding [3] and multi-agent systems coordination [4]. Many of these practical problems can be formulated as finding the maximum a posteriori (MAP) assignment, namely the most likely joint variable assignment in an MRF. The MAP problem is NP-hard [5], thus requiring approximate methods. Here we focus on a particular MAP approximate method: the (loopy) max-product belief propagation [6, 7]. Max-product’s popularity stems from its very good empirical performance on general MRFs [8, 9, 10, 11], but it comes with few theoretical guarantees. Concretely, max-product is known to be correct in acyclic and single-cycle MRFs [11], although convergence is only guaranteed in the acyclic case. Recently, some works have established that max-product is guarantee to return the optimal solution, if it converges, on MRFs corresponding to some specific problems, namely: (i) weighted b-matching problems [12, 13]; (ii) maximum weight independent set problems [14]; or (iii) problems whose equivalent nand Markov random field (NMRF) is a perfect graph [?]. For weighted b-matching problems with a bipartite structure Huang and Jebara [15] establish that max-product algorithm always converges to the optimal. Despite these guarantees provided in these particular cases, for arbitrary MRFs little is known on the quality of the max-product fixed-point assignments. To the best of our knowledge, the only result in this line is the work of Wainwright et al. [16] where, given any arbitrary MRF, authors derive an upper bound on the absolute error of the max-product fixed-point assignment. This bound 1MRFs in which all cycles are variable-disjoint, namely that they do not share any edge and in which each cycle contains at least 20 variables. 1 is calculated after running the max-sum algorithm and depends on the particular MRF (structure and parameters) and therefore provide no guarantees on the quality of max-product assignments on arbitrary MRFs with cycles. In this paper we provide quality guarantees for max-product fixed-points in general settings that can be calculated prior to the execution of the algorithm. To this end, we define worst-case bounds on the quality of any max-product fixed-point for any MRF, independently of its structure and parameters. Furthermore, we show how tighter guarantees can be obtained for MRFs with specific structures. For example, we prove that in 2-D grids max-product fixed points assignments have at least 33% of the quality of the optimum; and that for MRFs with large variable-disjoint cycles1 they have at least 90% of the quality of the optimum. These results shed some light on the relationship between the quality of max-product assignments and the structure of MRFs. Our results build upon two main components: (i) the characterization of any fixed-point max-product assignment as a neighbourhood maximum in a specific region of the MRF [17]; and (ii) the worstcase bounds on the quality of a neighbourhood maximum obtained in the K-optimality framework [18, 19]. We combine these two results by: (i) generalising the worst-case bounds in [18, 19] to consider any arbitrary region; and (ii) assessing worst-case bounds for the specific region presented in [17] (for which any fixed-point max-product assignment is known to be maximal). 2 Overview 2.1 The max-sum algorithm in Pairwise Markov Random Fields A discrete pairwise Markov Random Field (MRF) is an undirected graphical model where each interaction is specified by a discrete potential function, defined on a single or a pair of variables. The structure of an MRF defines a graph G = ⟨V, E⟩, in which the nodes V represent discrete variables, and edges E represent interactions between nodes. Then, an MRF contains a unary potential function Ψs for each node s ∈V and a pairwise potential function Ψst for each edge (s, t) ∈E; the joint probability distribution of the MRF assumes the following form: p(x) = 1 Z Y s∈V Ψs(xs) Y (s,t)∈E Ψst(xs, xt) = 1 Z exp  X s∈V θs(xs) + X (s,t)∈E θst(xs, xt)  = 1 Z exp (θ(x)), (1) where Z is a normalization constant and θs(xs), θst(xs, xt) stand for the logarithm of Ψs(xs), Ψ(xs, xt) which are well-defined if Ψs(xs), Ψ(xs, xt) are strictly positive. Within this setting, the classical problem of maximum a posteriori (MAP) estimation corresponds to finding the most likely configuration under distribution p(x) in equation 1. In more formal terms, the MAP configuration x∗= {x∗ s|s ∈V } is given by: x∗△= arg max x∈X N  Y s∈V Ψs(xs) Y (s,t)∈E Ψst(xs, xt)   △= arg max x∈X N  X s∈V θs(xs) + X (s,t)∈E θst(xs, xt)  , (2) where X N is the Cartesian product space in which x = {xs|s ∈V } takes values. Note that the MAP configuration may not be unique, that is, there may be multiple configurations, that attain the maximum in equation 1. In this work we assume that: (i) there is a unique MAP assignment (as assumed in [17]); and (ii) all potentials θs and θst are non-negative. The max-product algorithm is an iterative, local, message-passing algorithm for finding the MAP assignment in a discrete MRF as specified by equation 2. The max-sum algorithm is the correspondent of the max-product algorithm when we consider the log-likelihood domain. The standard update rules for max-sum algorithm are: mij(xj) = αij + max xi  θi(xi) + θij(xi, xj) + X k∈N(i)\j mki(xi)   bi(xi) = θi(xi) + P k∈N(i) mki(xi) where αij is a normalization constant and N(i) is the set of indices for variables that are connected to xi. Here mij(xj) represents the message that variable xi sends to variable xj. At the first iteration all messages are initialised to constant functions. At each following iteration, each variable xi aggregates all incoming messages and computes the belief bi(xi), which is then used to obtain the maxsum assignment xMS. Specifically, for every variable xi ∈V we have xMS i = arg maxxi bi(xi). 2 x0 x1 x2 x3 (a) x0 x1 x2 x3 (b) x0 x1 x2 x3 (c) x0 x1 x2 x3 (d) x0 x1 x2 x3 (e) Figure 1: (a) 4-complete graph and (b)-(e) sets of variables covered by the SLT-region. The convergence of the max-sum is usually characterized considering fixed points for the message update rules, i.e. when all the messages exchanged are equal to the last iteration. Now, the max-sum algorithm is known to be correct over acyclic and single-cycle graphs. Unfortunately, on general graphs the aggregation of messages flowing into each variable only represents an approximate solution to the maximization problem. Nonetheless, it is possible to characterise the solution obtained by max-sum as we discuss below. 2.2 Neighborhood maximum characterisation of max-sum fixed points In [17], Weiss et al. characterize how well max-sum approximates the MAP assignment. In particular, they find the conditions for a fixed-point max-sum assignment xMS to be neighbourhood maximum, namely greater than all other assignments in a specific large region around xMS. Notice that characterising an assignment as neighbourhood maximum is weaker than a global maximum, but stronger than a local maximum. Weiss et al. introduce the notion of Single Loops and Trees (SLT) region to characterise the assignments in such region. Definition 1 (SLT region). An SLT-region of x in G includes all assignments x′ that can be obtained from x by: (i) choosing an arbitrary subset S ⊆V such that its vertex-induced subgraph contains at most one cycle per connected component; (ii) assigning arbitrary values to the variables in S while keeping the assignment to the other variables as in x. Hence, we say that an assignment xSLT is SLT-optimal if it is greater than any other assignment in its SLT region. Finally, the main result in [17] is the characterisation of any max-sum fixed-point assignments as an SLT-optimum. Figures 1(b)-(e) illustrate examples of assignments in the SLTregion in the complete graph of figure 1(a), here boldfaced nodes stand for variables that vary the assignment with respect to xSLT . 3 Generalizing size and distance optimal bounds In [18], Pearce et al. introduced worst-case bounds on the quality of a neighbourhood maximum in a region characterized by its size. Similary, Kiekintveld et al. introduced in [19] analogous worst-case bounds but using as a criterion the distance in the graph. In this section we generalize these bounds to use them for any neighbourhood maximum in a region characterized by arbitrary criteria. Concretely we show that our generalization can be used for bounding the quality of max-sum assignments. 3.1 C-optimal bounds Hereafter we propose a general notion of region optimality, the so-called C-optimality, and describe how to calculate bounds for a C-optimal assignment, namely an assignment that is neighbourhood maximum in a region characterized by an arbitrary C criteria. The concept of C-optimality requires the introduction of several concepts. Given A, B ⊆V we say that B completely covers A if A ⊆B. We say that B does not cover A at all if A ∩B = ∅. Otherwise, we say that B covers A partially. A region C ⊂P(V ) is a set composed by subsets of V . We say that A ⊆V is covered by C if there is a Cα ∈C such that Cα completely covers A. Given two assignments xA and xB, we define D(xA, xB) as the set containing the variables whose values in xA and xB differ. An assignment is C-optimal if it cannot be improved by changing the values in any group of variables covered by C. That is, an assignment xA is C-optimal if for every assignment xB s.t. D(xA, xB) is covered by C we have that θ(xA) ≥θ(xB). For any S ∈E we define cc(S, C) = |{Cα ∈C s.t S ⊆Cα}|, that is, the number of elements in C that cover S completely. We also define nc(S, C) = |{Cα ∈C s.t S ∩Cα = ∅}|, that is, the number of elements in C that do not cover S at all. 3 Proposition 1. Let G = ⟨V, E⟩be a graphical model and C a region. If xC is a C-optimum then θ(xC) ≥ cc∗ |C| −nc∗ θ(x∗) (3) where cc∗= minS∈E cc(S, C), nc∗= minS∈E nc(S, C), and x∗is the MAP assignment. Proof. The proof is a generalization of the one in [20] for k-optimality. For every Cα ∈C, consider an assignment xα such that xα i = xC i if xi ̸∈Cα and xα i = x∗ i if xi ∈Cα. Since xC is C-optimal, for all Cα ∈C, θ(xC) ≥θ(xα) holds, and hence: θ(xC) ≥ X Cα∈C θ(xα) ! /|C|. (4) Notice that although θ(xα) is defined as the sum of unary potentials and pairwise potentials values we can always get rid of unary potentials by combining them into pairwise potentials without changing the structure of the MRF. In so doing, for each xα, we have that θ(xα) = P S∈E θS(xα). We classify each edge S ∈E into one of three disjoint groups, depending on whether Cα covers S completely (T(Cα)), partially (P(Cα)), or not at all (N(Cα)), so that θ(xα) = P S∈T (Cα) θS(xα) + P S∈P (Cα) θS(xα) + P S∈N(Cα) θS(xα). We can remove the partially covered potentials at the cost of obtaining a looser bound. Hence θ(xα) ≥P S∈T (Cα) θS(xα) + P S∈N(Cα) θS(xα). Now, by definition of xα, for every variable xi in a potential completely covered by Cα we have that xα i = x∗ i , and for every variable xi in a potential not covered at all by Cα we have that xα i = xC i . Hence, θ(xα) ≥P S∈T (Cα) θS(x∗) + P S∈N(Cα) θS(xC). To assess a bound, after substituting this inequality in equation 4, we have that: θ(xC) ≥ P Cα∈C P S∈T (Cα) θS(x∗) + P Cα∈C P S∈N(Cα) θS(xC) |C| . (5) We need to express the numerator in terms of θ(xC) and θ(x∗). Here is where the previously defined sets cc(S, C) and nc(S, C) come into play. Grouping the sum by potentials and recall that cc∗= minS∈E cc(S, C), the term on the left can be expressed as: X Cα∈C X S∈T (Cα) θS(x∗) = X S∈E cc(S, C) · θS(x∗) ≥ X S∈E cc∗· θS(x∗) = cc∗· θ(x∗). Furthermore, recall that nc∗= minS∈E nc(S, C), we can do the same with the right term: X Cα∈C X S∈N(Cα) θS(xC) = X S∈E nc(S, C) · θS(xC) ≥ X S∈E nc∗· θS(xC) = nc∗· θ(xC). After substituting these two results in equation 5 and rearranging terms, we obtain equation 3. 3.2 Size-optimal bounds as a specific case of C-optimal bounds Now we present the main result in [18] as a specific case of C-optimality. An assignment is k-sizeoptimal if it can not be improved by changing the value of any group of size k or fewer variables. Proposition 2. For any MRF and for any k-optimal assignment xk: θ(xk) ≥ (k −1) (2|V | −k −1)θ(x∗) (6) Proof. This result is just a specific case of our general result where we take as a region all subsets of size k, that is C = {Cα ⊆V | |Cα| = k}. The number of elements in the region is |C| = |V | k  . The number of elements in C that completely cover S is cc(S, C) = |V |−2 k−2  (take the two variables in S plus k −2 variables out of the remaining |V | −2). The number of elements in C that do not cover S at all is nc(S, C) = |V |−2 k  (take k variables out of the remaining |V | −2 variables). Finally, we obtain equation 6 by using |V |, cc∗and nc∗in equation 3, and simplifying. 4 0 20 40 60 80 100 Number of variables 0 20 40 60 80 100 Percent optimal ( θ(xMS ) θ(x ∗) ·100 ) 2D grid Bipartite Complete/Structure-independent (a) Bounds on complete, bipartite and 2-D structures when varying the number of variables. 3 10 20 30 40 50 Minimum number of variables in each cycle 30 40 50 60 70 80 90 100 Percent optimal ( θ(xMS ) θ(x ∗) ·100 ) d=2 d=4 d=8 d=128 d=1024 (b) Bounds on MRFs with variable-disjoint cycles when varying the number of cycles and their size. Figure 2: Percent optimal bounds for max-sum fixed point assignments in specific MRF structures. 4 Quality guarantees on max-sum fixed-point assignments In this section we define quality guarantees for max-sum fixed-point assignments in MRFs with arbitary and specific structures. Our quality guarantees prove that the value of any max-sum fixedpoint assignments can not be less than a fraction of the optimum. The main idea is that by virtue of the characterization of any max-sum fixed point assignment as SLT-optimal, we can select any region C composed of a combination of single cycles and trees of our graph and use it for computing its corresponding C-optimal bound by means of proposition 1. We start by proving that bounds for a given graph apply to its subgraphs. Then, we find that the bound for the complete graph applies to any MRF independently of its structure and parameters. Afterwards we provide tighter bounds for MRFs with specific structures. 4.1 C-optimal bounds based on the SLT region In this section we show that C-optimal bounds based on SLT-optimality for a given graph can be applied to any of its subgraphs. Proposition 3. Let G = ⟨V, E⟩be a graphical model and C the SLT-region of G. Let G′ = ⟨V ′, E′⟩ be a subgraph of G. Then the bound of equation 3 for G holds for any SLT-optimal assignment in G′. Sketch of the proof. We can compose a region C′ containing the same elements as C but removing those variables which are not contained in V ′. Note that SLT-optimality on G′ guarantees optimality in each element of C′. Observe that the bound obtained by applying equation 3 to C′ is greater or equal than the bound obtained for C. Hence, the bound for G applies also to G′. A direct conclusion of proposition 3 is that any bound based on the SLT-region of a complete graph of n variables can be directly applied to any subgraph of n or fewer variables regardless of its structure. In what follows we assess the bound for a complete graph. Proposition 4. Let G = ⟨V, E⟩be a complete MRF. For any max-sum fixed point assignment xMS, θ(xMS) ≥ 1 |V | −2 · θ(x∗). (7) Proof. Let C be a region containing every possible combination of three variables in V . Every set of three variables is part of the SLT-region because it can contain at most one cycle. The development in the proof of proposition 2 can be applied here for k = 3 to obtain equation 7. Corollary 5. For any MRF, any max-sum fixed point assignment xMS satisfies equation 7. Since any graph can be seen as a subgraph of the complete graph with the same number of variables, the corollary is straightforward given propositions 3 and 4. Figure 2(a) plots this structureindependent bound when varying the number of variables. Observe that it rapidly decreases with 5 x0 x1 x2 x3 x4 x5 (a) x0 x1 x2 x3 x4 x5 (b) x0 x1 x2 x3 x4 x5 (c) x0 x1 x2 x3 x4 x5 (d) x0 x1 x2 x3 x4 x5 (e) x0 x1 x2 x3 x4 x5 (f) x0 x1 x2 x3 x4 x5 (g) x0 x1 x2 x3 x4 x5 (h) x0 x1 x2 x3 x4 x5 (i) x0 x1 x2 x3 x4 x5 (j) x0 x1 x2 x3 x4 x5 (k) x0 x1 x2 x3 x4 x5 (l) x0 x1 x2 x3 x4 x5 (m) x0 x1 x2 x3 x4 x5 (n) x0 x1 x2 x3 x4 x5 (o) x0 x1 x2 x3 x4 x5 (p) Figure 3: Example of (a) a 3-3 bipartite graph and (b)-(p) sets of variables covered by the SLT-region. the number of variables and it is only significant on very small MRFs. In the next section, we show how to exploit the knowledge of the structure of an MRF to improve the bound’s significance. 4.2 SLT-bounds for specific MRF structures and independent of the MRF parameters In this section we show that for MRFs with specific structures, it is possible to provide bounds much tighter than the structure-independent bound provided by corollary 5. These structures include, but are not limited to, bipartite graphs, 2-D grids, and variable-disjoint cycle graphs. 4.2.1 Bipartite graphs In this section we define the C-optimal bound of equation 3 for any max-sum fixed point assignment in an n-m bipartite MRF. An n-m bipartite MRF is a graph whose vertices can be divided into two disjoint sets, one with n variables and another one with m variables, such that the n variables in the first set are connected to the m variables in the second set. Figure 3(a) depicts a 3-3 bipartite MRF. Proposition 6. For any MRF with n-m bipartite structure where m ≥n, and for any max-sum fixed point assignment xMS we have that: θ(xMS) ≥b(n, m) · θ(x∗) b(n, m) = ( 1 n m ≥n + 3 2 n+m−2 m < n + 3 (8) Proof. Let CA be a region including one out of the n variables and all of the m variables (in figure 3, elements (n)-(p)). Since the elements of this region are trees, we can guarantee optimality on them. The number of elements of the region is |CA| = n. It is clear that each edge in the graph is completely covered by one of the elements of CA, and hence cc∗= 1. Furthermore, every edge is partially covered, since all of the m variables are present in every element, and hence nc∗= 0. Applying equation 3 gives the bound 1/n. Alternatively, we can define a region CB formed by taking sets of four variables, two from each set. Since the elements of CB are single-cycle graphs (in figure 3, elements (b)-(j)), we can guarantee optimality on them. Applying proposition 1, we obtain the bound 2 n+m−2. Observe that 2 n+m−2 > 1 n when m < n + 3, and so equation 8 holds (details can be found in the additional material). Example 1. Consider the 3-3 bipartite MRF of figure 3(a). Figures 3(b)-(j) show the elements in the region CB composed of sets of four variables, two from each side. Therefore |CB| is 9. Then, for any edge S ∈E there are 4 sets in CB that contain its two variables. For example, the edge that links the upper left variable (x0) and the upper right variable (x3) is included in the subgraphs of figures 3(b), (c), (e) and (f). Moreover, for any edge S ∈E there is a single element in CB that does not cover it at all. For example, the only graph that does not include neither x0 nor x3 is the graph of figure 3(j). Thus, the bound is 4/(9 −1) = 1/2. Figure 2(a) plots the bound of equation 8 for bipartite graphs when varying the number of variables. Note that although, also in this case, the value of the bound rapidly decreases with the number of variables, it is two times the values of the structure-independent bound (see equation 7). 4.2.2 Two-dimensional (2-D) grids In this section we define the C-optimal bound of equation 3 for any max-sum fixed point assignment in a two-dimensional grid MRF. An n-grid structure stands for a graph with n rows and n columns where each variable has 4 neighbours. Figure 4 (a) depicts a 4-grid MRF. 6 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 (a) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 (b) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 (c) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 (d) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 (e) Figure 4: Example of (a) a 4-grid graph and (b)-(e) sets of variables covered by the SLT-region. Proposition 7. For any MRF with an n grid structure where n is an even number, for any max-sum fixed point assignment xMS we have that θ(xMS) ≥ n 3n −4 · θ(x∗) (9) Proof. We can partition columns in pairs joining column 1 with column (n/2) + 1, column 2 with column (n/2) + 2 and so on. We can partition rows in the same way. Let C be a region where each element contains the vertices in a pair of rows at distance n 2 together with those in a pair of columns at distance n 2 . Note that optimality is guaranteed in each Cα ∈C because variables in two non-consecutive rows and two non-consecutive columns create a single-cycle graph. Since we take every possible combination, |C| = ( n 2 )2. Each edge is completely covered by n 2 elements and hence cc∗= n 2 . Finally2, for each edge S, there are nc∗= ( n 2 −1)( n 2 −2) elements of C that do not cover S at all. Substituting these values into equation 3 leads to equation 9. Example 2. Consider the 4-grid MRF of figure 4 (a). Figures 4 (b)-(e) show the vertex-induced subgraphs for each set of vertices in the region C formed by the combination of any pairs of rows in {(1, 3), (2, 4)} and pair of columns in {(1, 3), (2, 4)}. Therefore |C| = 4. Then, for any edge S ∈E there are 2 sets that contain its two variables. For example, the edge that links the two first variables in the first row, namely x0 and x1, is included in the subgraphs of figures (a) and (b). Moreover, for any edge S ∈E there is no set that contains no variable from S. Thus, the bound is 1/2. Figure 2(a) plots the bound for 2-D grids when varying the number of variables. Note that when compared with the bound for complete and bipartite structures, the bound for 2-D grids decreases smoothly and tends to stabilize as the number of variables increases. In fact, observe that by equation 9, the bound for 2-D grids is never less that 1/3 independently of the grid size. 4.2.3 MRFs that are a union of variable-disjoint cycles In this section we assess a bound for MRFs composed of a set of variable-disjoint cycles, namely of cycles that do not share any variable. A common pattern shared by the bounds assessed so far is that they decrease as the number of variables of an MRF grows. This section provides an example showing that there are specific structures for which C-optimality obtains significant bounds for large MRFs. Example 3. Consider the MRF composed of two variable-disjoint cycles of size 4 depicted in figure 5(a). To create the region, we remove each of the variables of the first cycle, one at a time (see figures 5(b)-(e)). We act analogously with the second cycle. Hence, C is composed of 8 elements. Just by counting we observe that each edge is completely covered 6 times, so cc∗= 6. Since we are removing a single variable at a time, nc∗= 0. Hence, the bound for a max-sum fixed point in this MRF structure is 6/8 = 3/4. The following result generalizes the previous example to MRFs containing d variable-disjoint cycles of size larger or equal to l. Proposition 8. For any MRF such that every pair of cycles is variable-disjoint and where there are at most d cycles of size l or larger, and for any max-sum fixed point assignment xMS, we have that: θ(xMS) ≥  1 −2(d −1) d · l  · θ(x∗) = (l −2) · d + 2 l · d · θ(x∗). (10) 2Details can be found in the additional material 7 x0 x1 x2 x3 x4 x5 x6 x7 (a) x0 x1 x2 x3 x4 x5 x6 x7 (b) x0 x1 x2 x3 x4 x5 x6 x7 (c) x0 x1 x2 x3 x4 x5 x6 x7 (d) x0 x1 x2 x3 x4 x5 x6 x7 (e) Figure 5: (a) 2 variable-disjoint cycles MRF of size 4 and (b-e) sets of variables covered by the SLT-region. The proof generalizes the region explained in example 3 to any variable-disjoint cycle MRF by defining a region that includes an element for every possible edge removal from every cycle but one. The proof is omitted here due to lack of space but can be consulted in the additional material. Equation 10 shows that the bound: (i) decreases with the number of cycles; and (ii) increases as the maximum number of variables in each cycle grows. Figure 2(b) illustrates the relationship between the bound, the number of cycles (d), and the maximum size of the cycles (l). The first thing we observe is that the size of the cycles has more impact on the bound than the number of cycles. In fact, observe that by equation 10, the bound for a variable-disjoint cycle graph with a maximum cycle size of l is at least (l−2) l , independently of the number of cycles. Thus, if the minimum size of a cycle is 20, the quality for a fixed point is guaranteed to be at least 90%. Hence, quality guarantees for max-sum fixed points are good whenever: (i) the cycles in the MRF do not share any variables; and (ii) the smallest cycle in the MRF is large. Therefore, our result confirms and refines the recent results obtained for single-cycle MRFs [11]. 4.3 SLT-bounds for arbitrary MRF structures and independent of the MRF parameters In this section we discuss how to assess tight SLT-bounds for any arbitrary MRF structure. Similarly to [18, 20], we can use linear fractional programming (LFP) to compute the structure specific SLT bounds in any MRF with arbitrary structure. Let C be a region for all subsets in the SLT region of the graphical model G = ⟨V, E⟩of an MRF. For each S ∈E, the LFP contains two LFP variables that represents the value of the edge S for the SLT-optimum, xMS, and for the MAP assignment, x∗. The objective of the LFP is to minimize P S∈E θS(xMS) P S∈E θS(x∗) such that for all Cα ∈C, θ(xMS) −θ(xα) ≥0. Following [18, 20], for each Cα ∈C, θ(xα) can be expressed in terms of the value of the potentials for xMS and x∗. Then, the optimal value of this LFP is a tight bound for any MRF with the given specific structure. Indeed, the solution of the LFP provides the values of potentials for xMS and x∗that produce the worst-case MRF whose SLT-optimum has the lowest value with respect to the optimum. However, because this method requires to list all the sets in the SLT-region, the complexity of generating an LFP increases exponentially with the number of variables in the MRF. Therefore, although this method provides more flexibility to deal with any arbitrary structure, its computational cost does not scale with the size of MRFs in contrast with the structure specific SLT-bounds of section 4.2, that are assessed in constant time. 5 Conclusions We provided worst-case bounds on the quality of any max-product fixed point. With this aim, we have introduced C-optimality, which has proven a valuable tool to bound the quality of max-product fixed points. Concretely, we have proven that independently of an MRF structure, max-product has a quality guarantee that decreases with the number of variables of the MRF. Furthermore, our results allow to identify new classes of MRF structures, besides acyclic and single-cycle, for which we can provide theoretical guarantees on the quality of max-product assignments. As an example, we defined significant bounds for 2-D grids and MRFs with variable-disjoint cycles. Acknowledgments Work funded by projects EVE (TIN2009-14702-C02-01,TIN2009-14702-C02-02), AT(CONSOLIDER CSD2007-0022), and Generalitat de Catalunya (2009-SGR-1434). Vinyals is supported by the Ministry of Education of Spain (FPU grant AP2006-04636). 8 References [1] Marshall F. Tappen and William T. Freeman. Comparison of graph cuts with belief propagation for stereo, using identical mrf parameters. In In ICCV, pages 900–907, 2003. [2] Jon Feldman, Martin J. Wainwright, and David R. Karger. Using linear programming to decode binary linear codes. IEEE Transactions on Information Theory, 51(3):954–972, 2005. [3] Chen Yanover and Yair Weiss. Approximate inference and protein-folding. In Advances in Neural Information Processing Systems, pages 84–86. MIT Press, 2002. [4] Alessandro Farinelli, Alex Rogers, Adrian Petcu, and Nicholas R. Jennings. Decentralised coordination of low-power embedded devices using the max-sum algorithm. In AAMAS, pages 639–646, 2008. [5] Solomon Eyal Shimony. Finding MAPs for belief networks is NP-Hard. Artif. Intell., 68(2):399–410, 1994. [6] Judea Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1988. [7] Srinivas M. Aji and Robert J. McEliece. The generalized distributive law. IEEE Transactions on Information Theory, 46(2):325–343, 2000. [8] Srinivas Aji, Gavin Horn, Robert Mceliece, and Meina Xu. Iterative min-sum decoding of tail-biting codes. In In Proc. IEEE Information Theory Workshop, pages 68–69, 1998. [9] Brendan J. Frey, Ralf Koetter, G. David Forney Jr., Frank R. Kschischang, Robert J. McEliece, and Daniel A. Spielman. Introduction to the special issue on codes on graphs and iterative algorithms. IEEE Transactions on Information Theory, 47(2):493–497, 2001. [10] Brendan J. Frey, Ralf Koetter, and Nemanja Petrovic. Very loopy belief propagation for unwrapping phase images. In NIPS, pages 737–743, 2001. [11] Yair Weiss. Correctness of local probability propagation in graphical models with loops. Neural Computation, 12(1):1–41, 2000. [12] Mohsen Bayati, Christian Borgs, Jennifer T. Chayes, and Riccardo Zecchina. Belief-propagation for weighted b-matchings on arbitrary graphs and its relation to linear programs with integer solutions. CoRR, abs/0709.1190, 2007. [13] Sujay Sanghavi, Dmitry Malioutov, and Alan Willsky. Linear programming analysis of loopy belief propagation for weighted matching. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 1273–1280. MIT Press, Cambridge, MA, 2008. [14] Sujay Sanghavi, Devavrat Shah, and Alan S. Willsky. Message-passing for maximum weight independent set. CoRR, abs/0807.5091, 2008. [15] Bert Huang and Tony Jebara. Loopy belief propagation for bipartite maximum weight b-matching. In Marina Meila and Xiaotong Shen, editors, In Proceedings of the Eleventh International Conference on Artificial Intelligence and Statistics, March 2007. [16] Martin J. Wainwright, Tommi Jaakkola, and Alan S. Willsky. Tree consistency and bounds on the performance of the max-product algorithm and its generalizations. Statistics and Computing, 14(2):143–166, 2004. [17] Yair Weiss and William T. Freeman. On the optimality of solutions of the max-product belief-propagation algorithm in arbitrary graphs. IEEE Transactions on Information Theory, 47(2):736–744, 2001. [18] Jonathan P. Pearce and Milind Tambe. Quality guarantees on k-optimal solutions for distributed constraint optimization problems. In IJCAI, pages 1446–1451, 2007. [19] Christopher Kiekintveld, Zhengyu Yin, Atul Kumar, and Milind Tambe. Asynchronous algorithms for approximate distributed constraint optimization with quality bounds. In AAMAS, pages 133–140, 2010. [20] J. P. Pearce. Local Optimization in Cooperative Agent Networks. PhD thesis, University of Southern California, Los Angeles, CA, August 2007. 9
2010
124
3,882
A POMDP Extension with Belief-dependent Rewards Mauricio Araya-L´opez Olivier Buffet Vincent Thomas Franc¸ois Charpillet Nancy Universit´e / INRIA LORIA – Campus Scientifique – BP 239 54506 Vandoeuvre-l`es-Nancy Cedex – France firstname.lastname@loria.fr Abstract Partially Observable Markov Decision Processes (POMDPs) model sequential decision-making problems under uncertainty and partial observability. Unfortunately, some problems cannot be modeled with state-dependent reward functions, e.g., problems whose objective explicitly implies reducing the uncertainty on the state. To that end, we introduce ρPOMDPs, an extension of POMDPs where the reward function ρ depends on the belief state. We show that, under the common assumption that ρ is convex, the value function is also convex, what makes it possible to (1) approximate ρ arbitrarily well with a piecewise linear and convex (PWLC) function, and (2) use state-of-the-art exact or approximate solving algorithms with limited changes. 1 Introduction Sequential decision-making problems under uncertainty and partial observability are typically modeled using Partially Observable Markov Decision Processes (POMDPs) [1], where the objective is to decide how to act so that the sequence of visited states optimizes some performance criterion. However, this formalism is not expressive enough to model problems with any kind of objective functions. Let us consider active sensing problems, where the objective is to act so as to acquire knowledge about certain state variables. Medical diagnosis for example is about asking the good questions and performing the appropriate exams so as to diagnose a patient at a low cost and with high certainty. This can be formalized as a POMDP by rewarding—if successful—a final action consisting in expressing the diagnoser’s “best guess”. Actually, a large body of work formalizes active sensing with POMDPs [2, 3, 4]. An issue is that, in some problems, the objective needs to be directly expressed in terms of the uncertainty/information on the state, e.g., to minimize the entropy over a given state variable. In such cases, POMDPs are not appropriate because the reward function depends on the state and the action, not on the knowledge of the agent. Instead, we need a model where the instant reward depends on the current belief state. The belief MDP formalism provides the needed expressiveness for these problems. Yet, there is not much research on specific algorithms to solve them, so they are usually forced to fit in the POMDP framework, which means changing the original problem definition. One can argue that acquiring information is always a means, not an end, and thus, a “well-defined” sequential-decision making problem with partial observability must always be modeled as a normal POMDP. However, in a number of cases the problem designer has decided to separate the task of looking for information from that of exploiting information. Let us mention two examples: (i) the 1 surveillance [5] and (ii) the exploration [2] of a given area, in both cases when one does not know what to expect from these tasks—and thus how to react to the discoveries. After reviewing some background knowledge on POMDPs in Section 2, Section 3 introduces ρPOMDPs—an extension of POMDPs where the reward is a (typically convex) function of the belief state—and proves that the convexity of the value function is preserved. Then we show how classical solving algorithms can be adapted depending whether the reward function is piecewise linear (Sec. 3.3) or not (Sec. 4). 2 Partially Observable MDPs The general problem that POMDPs address is for the agent to find a decision policy π choosing, at each time step, the best action based on its past observations and actions in order to maximize its future gain (which can be measured for example through the total accumulated reward or the average reward per time step). Compared to classical deterministic planning, the agent has to face the difficulty to account for a system not only with uncertain dynamics but also whose current state is imperfectly known. 2.1 POMDP Description Formally, POMDPs are defined by a tuple ⟨S, A, Ω, T, O, r, b0⟩where, at any time step, the system being in some state s ∈S (the state space), the agent performs an action a ∈A (the action space) that results in (1) a transition to a state s′ according to the transition function T(s, a, s′) = Pr(s′|s, a), (2) an observation o ∈Ω(the observation space) according to the observation function O(s′, a, o) = Pr(o|s′, a), and (3) a scalar reward r(s, a). b0 is the initial probability distribution over states. Unless stated otherwise, the state, action and observation sets are finite [6]. The agent can typically reason about the state of the system by computing a belief state b ∈∆= Π(S) (the set of probability distributions over S),1 using the following update formula (based on the Bayes rule) when performing action a and observing o: ba,o(s′) = O(s′, a, o) Pr(o|a, b) X s∈S T(s, a, s′)b(s), where Pr(o|a, b) = P s,s′′∈S O(s′′, a, o)T(s, a, s′′)b(s). Using belief states, a POMDP can be rewritten as an MDP over the belief space, or belief MDP, ⟨∆, A, τ, ρ⟩, where the new transition τ and reward functions ρ are defined respectively over ∆× A × ∆and ∆× A. With this reformulation, a number of theoretical results about MDPs can be extended, such as the existence of a deterministic policy that is optimal. An issue is that, even if a POMDP has a finite number of states, the corresponding belief MDP is defined over a continuous—and thus infinite—belief space. In this continuous MDP, the objective is to maximize the cumulative reward by looking for a policy taking the current belief state as input. More formally, we are searching for a policy verifying π∗= argmaxπ∈A∆Jπ(b0) where Jπ(b0) = E [P∞ t=0 γρt|b0, π], ρt being the expected immediate reward obtained at time step t, and γ a discount factor. Bellman’s principle of optimality [7] lets us compute the function Jπ∗recursively through the value function Vn(b) = max a∈A  ρ(b, a) + γ Z b′∈∆ τ(b, a, b′)Vn−1(b′)db′   = max a∈A " ρ(b, a) + γ X o Pr(o|a, b)Vn−1(ba,o) # , (1) where, for all b ∈∆, V0(b) = 0, and Jπ∗(b) = Vn=H(b) (where H is the—possibly infinite— horizon of the problem). The POMDP framework presents a reward function r(s, a) based on the state and action. On the other hand, the belief MDP presents a reward function ρ(b, a) based on beliefs. This belief-based 1Π(S) forms a simplex because ∥b∥1 = 1, that is why we use ∆as the set of all possible b. 2 reward function is derived as the expectation of the POMDP rewards: ρ(b, a) = X s b(s)r(s, a). (2) An important consequence of Equation 2 is that the recursive computation described in Eq. 1 has the property to generate piecewise-linear and convex (PWLC) value functions for each horizon [1], i.e., each function is determined by a set of hyperplanes (each represented by a vector), the value at a given belief point being that of the highest hyperplane. For example, if Γn is the set of vectors representing the value function for horizon n, then Vn(b) = maxα∈Γn P s b(s)α(s). 2.2 Solving POMDPs with Exact Updates Using the PWLC property, one can perform the Bellman update using the following factorization of Eq. 1: Vn(b) = max a∈A X o X s b(s) " r(s, a) |Ω| + X s′ T(s, a, s′)O(s′, a, o)χn−1(ba,o, s′) # , (3) with2 χn(b) = argmax α∈Γn b · α. If we consider the term in brackets in Eq. 3, this generates |Ω| × |A| Γ-sets, each one of size |Γn−1|. These sets are defined as Γn a,o =  ra |Ω| + P a,o · αn−1 αn−1 ∈Γn−1  , (4) where P a,o(s, s′) = T(s, a, s′)O(s′, a, o) and ra(s) = r(s, a). Therefore, for obtaining an exact representation of the value function, one can compute (L being the cross-sum between two sets): Γn = [ a M o Γn a,o. Yet, these Γn a,o sets—and also the final Γn—are non-parsimonious: some α-vectors may be useless because the corresponding hyperplanes are below the value function. Pruning phases are then required to remove dominated vectors. There are several algorithms based on pruning techniques like Batch Enumeration [8] or more efficient algorithms such as Witness or Incremental Pruning [6]. 2.3 Solving POMDPs with Approximate Updates The value function updating processes presented above are exact and provide value functions that can be used whatever the initial belief state b0. A number of approximate POMDP solutions have been proposed to reduce the complexity of these computations, using for example heuristic estimates of the value function, or applying the value update only on selected belief points [9]. We focus here on the latter point-based (PB) approximations, which have largely contributed to the recent progress in solving POMDPs, and whose relevant literature goes from Lovejoy’s early work [10] via Pineau et al.’s PBVI [11], Spaan and Vlassis’ Perseus [12], Smith and Simmons’ HSVI2 [13], through to Kurniawati et al.’s SARSOP [14]. At each iteration n until convergence, a typical PB algorithm: 1. selects a new set of belief points Bn based on Bn−1 and the current approximation Vn−1; 2. performs a Bellman backup at each belief point b ∈Bn, resulting in one α-vector per point; 3. prunes points whose associated hyperplanes are dominated or considered negligible. The various PB algorithms differ mainly in how belief points are selected, and in how the update is performed. Existing belief point selection methods have exploited ideas like using a regular discretization or a random sampling of the belief simplex, picking reachable points (by simulating action sequences starting from b0), adding points that reduce the approximation error, or looking in particular at regions relevant to the optimal policy [15]. 2The χ function returns a vector, so χn(b, s) = (χn(b))(s). 3 3 POMDP extension for Active Sensing 3.1 Introducing ρPOMDPs All problems with partial observability confront the issue of getting more information to achieve some goal. This problem is usually implicitly addressed in the resolution process, where acquiring information is only a means for optimizing an expected reward based on the system state. Some active sensing problems can be modeled this way (e.g. active classification), but not all of them. A special kind of problem is when the performance criterion incorporates an explicit measure of the agent’s knowledge about the system, which is based on the beliefs rather than states. Surveillance for example is a never-ending task that does not seem to allow for a modeling with state-dependent rewards. Indeed, if we consider the simple problem of knowing the position of a hidden object, it is possible to solve this without even having seen the object (for instance if all the locations but one have been visited). However, the reward of a POMDP cannot model this since it is only based on the current state and action. One solution would be to include the whole history in the state, leading to a combinatorial explosion. We prefer to consider a new way of defining rewards based on the acquired knowledge represented by belief states. The rest of the paper explores the fact that belief MDPs can be used outside the specific definition of ρ(b, a) in Eq. 2, and therefore discusses how to solve this special type of active sensing problems. As Eq. 2 is no longer valid, the direct link with POMDPs is broken. We can however still use all the other components of POMDPs such as states, observations, etc. A way of fixing this is to generalize the POMDP framework to a ρ-based POMDP (ρPOMDP), where the reward is not defined as a function r(s, a), but directly as a function ρ(b, a). The nature of the ρ(b, a) function depends on the problem, but is usually related to some uncertainty or error measure [3, 2, 4]. Most common methods are those based on Shannon’s information theory, in particular Shannon’s entropy or the Kullback-Leibler distance [16]. In order to present these functions as rewards, they have to measure information rather than uncertainty, so the negative entropy function ρent(b) = log2(|S|)+ P s∈S b(s) log2(b(s))—which is maximal in the corners of the simplex and minimal in the center— is used rather than Shannon’s original entropy. Also, other simpler functions based on the same idea can be used, such as the distance from the simplex center (DSC), ρdsc(b) = ∥b −c∥m, where c is the center of the simplex and m a positive integer that denotes the order of the metric space. Please note that ρ(b, a) is not restricted to be only an uncertainty measurement, but can be a combination of the expected state-action rewards—as in Eq. 2—and an uncertainty or error measurement. For example, Mihaylova et al.’s work [3] defines the active sensing problem as optimizing a weighted sum of uncertainty measurements and costs, where the former depends on the belief and the latter on the system state. In the remainder of this paper, we show how to apply classical POMDP algorithms to ρPOMDPs. To that end, we discuss the convexity of the value function, which permits extending these algorithms using PWLC approximations. 3.2 Convexity Property An important property used to solve normal POMDPs is the result that a belief-based value function is convex, because r(s, a) is linear with respect to the belief, and the expectation, sum and max operators preserve this property [1]. For ρPOMDPs, this property also holds if the reward function ρ(b, a) is convex, as shown in Theorem 3.1. Theorem 3.1. If ρ and V0 are convex functions over ∆, then the value function Vn of the belief MDP is convex over ∆at any time step n. [Proof in [17, Appendix]] This last theorem is based on ρ(b, a) being a convex function over b, which is a natural property for uncertainty (or information) measures, because the objective is to avoid belief distributions that do not give much information on which state the system is in, and to assign higher rewards to those beliefs that give higher probabilities of being in a specific state. Thus, a reward function meant to reduce the uncertainty must provide high payloads near the corners of the simplex, and low payloads near its center. For that reason, we will focus only on reward functions that comply with convexity in the rest of the paper. The initial value function V0 might be any convex function for infinite-horizon problems, but by 4 definition V0 = 0 for finite-horizon problems. We will use the latter case for the rest of the paper, to provide fairly general results for both kinds of problems. Plus, starting with V0 = 0, it is also easy to prove by induction that, if ρ is continuous (respectively differentiable), then Vn is continuous (respectively piecewise differentiable). 3.3 Piecewise Linear Reward Functions This section focuses on the case where ρ is a PWLC function and shows that only a small adaptation of the exact and approximate updates in the POMDP case is necessary to compute the optimal value function. The complex case where ρ is not PWLC is left for Sec. 4. 3.3.1 Exact Updates From now on, ρ(b, a), being a PWLC function, can be represented as several Γ-sets, one Γa ρ for each a. The reward is computed as: ρ(b, a) = max α∈Γaρ "X s b(s)α(s) # . Using this definition leads to the following changes in Eq. 3 Vn(b) = max a∈A X s b(s) " χa ρ(b, s) + X o X s′ T(s, a, s′)O(s′, a, o)χn−1(ba,o, s′) # , where χa ρ(b, s) = argmax α∈Γaρ (b · α). This uses the Γ-set Γa ρ and generates |Ω| × |A| Γ-sets: Γn a,o = {P a,o · αn−1| αn−1 ∈Γn−1}, where P a,o(s, s′) = T(s, a, s′)O(s′, a, o). Exact algorithms like Value Iteration or Incremental Pruning can then be applied to this POMDP extension in a similar way as for POMDPs. The difference is that the cross-sum includes not only one αa,o for each observation Γ-set Γn a,o, but also one αρ from the Γ-set Γa ρ corresponding to the reward: Γn = [ a "M o Γn a,o ⊕Γa ρ # . Thus, the cross-sum generates |R| times more vectors than with a classic POMDP, |R| being the number of α-vectors specifying the ρ(b, a) function3. 3.3.2 Approximate Updates Point-based approximations can be applied in the same way as PBVI or SARSOP do to the original POMDP update. The only difference is again the reward function representation as an envelope of hyperplanes. PB algorithms select the hyperplane that maximizes the value function at each belief point, so the same simplification can be applied to the set Γa ρ. 4 Generalizing to Other Reward Functions Uncertainty measurements such as the negative entropy or the DSC (with m > 1 and m ̸= ∞) are not piecewise linear functions. In theory, each step of value iteration can be analytically computed using these functions, but the expressions are not closed as in the linear case, growing in complexity and making them unmanageable after a few steps. Moreover, pruning techniques cannot be applied directly to the resulting hypersurfaces, and even second order measures do not exhibit standard quadratic forms to apply quadratic programming. However, convex functions can be efficiently approximated by piecewise linear functions, making it possible to apply the techniques described in Section 3.3 with a bounded error, as long as the approximation of ρ is bounded. 3More precisely, the number |R| depends on the considered action. 5 4.1 Approximating ρ Consider a continuous, convex and piecewise differentiable reward function ρ(b),4 and an arbitrary (and finite) set of points B ⊂∆where the gradient is well defined. A lower PWLC approximation of ρ(b) can be obtained by using each element b′ ∈B as a base point for constructing a tangent hyperplane which is always a lower bound of ρ(b). Concretely, ωb′(b) = ρ(b′) + (b −b′) · ∇ρ(b′) is the linear function that represents the tangent hyperplane. Then, the approximation of ρ(b) using a set B is defined as ωB(b) = maxb′(ωb′(b)). At any point b ∈∆the error of the approximation can be written as ϵB(b) = |ρ(b) −ωB(b)|, (5) and if we specifically pick b as the point where ϵB(b) is maximal (worst error), then we can try to bound this error depending on the nature of ρ. It is well known that a piecewise linear approximation of a Lipschitz function is bounded because the gradient ∇ρ(b′) that is used to construct the hyperplane ωb′(b) has bounded norm [18]. Unfortunately, the negative entropy is not Lipschitz (f(x) = x log2(x) has an infinite slope when x →0), so this result is not generic enough to cover a wide range of active sensing problems. Yet, under certain mild assumptions a proper error bound can still be found. The aim of the rest of this section is to find an error bound in three steps. First, we will introduce some basic results over the simplex and the convexity of ρ. Informally, Lemma 4.1 will show that, for each b, it is possible to find a belief point in B far enough from the boundary of the simplex but within a bounded distance to b. Then, in a second step, we will assume the function ρ(b) verifies the α-H¨older condition to be able to bound the norm of the gradient in Lemma 4.2. In the end, Theorem 4.3 will use both lemmas to bound the error of ρ’s approximation under these assumptions. ∆ ∆ε b b′ b” ε ε′ Figure 1: Simplices ∆and ∆ε, and the points b, b′ and b′′. For each point b ∈∆, it is possible to associate a point b∗= argmaxx∈B ωx(b) corresponding to the point in B whose tangent hyperplane gives the best approximation of ρ at b. Consider the point b ∈∆where ϵB(b) is maximum: this error can be easily computed using the gradient ∇ρ(b∗). Unfortunately, some partial derivatives of ρ may diverge to infinity on the boundary of the simplex in the non-Lipschitz case, making the error hard to analyze. Therefore, to ensure that this error can be bounded, instead of b∗, we will take a safe b′′ ∈B (far enough from the boundary) by using an intermediate point b′ in an inner simplex ∆ε, where ∆ε = {b ∈[ε, 1]N | P i bi = 1} with N = |S|. Thus, for a given b ∈∆and ε ∈(0, 1 N ], we define the point b′ = argminx∈∆ε ∥x −b∥1 as the closest point to b in ∆ε and b′′ = argminx∈B ∥x−b′∥1 as the closest point to b′ in B (see Figure 1). These two points will be used to find an upper bound for the distance ∥b−b′′∥1 based on the density of B, defined as δB = min b∈∆max b′∈B ∥b −b′∥1. Lemma 4.1. The distance (1-norm) between the maximum error point b ∈∆and the selected b′′ ∈B is bounded by ∥b −b′′∥1 ≤2(N −1)ε + δB. [Proof in [17, Appendix]] If we pick ε > δB, then we are sure that b′′ is not on the boundary of the simplex ∆, with a minimum distance from the boundary of η = ε −δB. This will allow finding bounds for the PWLC 4For convenience—and without loss of generality—we only consider the case where ρ(b, a) = ρ(b). 6 approximation of convex α-H¨older functions, which is a broader family of functions including the negative entropy, convex Lipschitz functions and others. The α-H¨older condition is a generalization of the Lipschitz condition. In our setting it means, for a function f : D 7→R with D ⊂Rn, that it complies with ∃α ∈(0, 1], ∃Kα > 0, s.t. |f(x) −f(y)| ≤Kα∥x −y∥α 1 . The limit case, where a convex α-H¨older function has infinite-valued norm for the gradient, is always on the boundary of the simplex ∆(due to the convexity), and therefore the point b′′ will be free of this predicament because of η. More precisely, an α-H¨older function in ∆with constant Kα in 1-norm complies with the Lipschitz condition on ∆η with a constant Kαηα (see [17, Appendix]). Moreover, the norm of the gradient ∥∇f(b′′)∥1 is also bounded as stated by Lemma 4.2. Lemma 4.2. Let η > 0 and f be an α-H¨older (with constant Kα), bounded and convex function from ∆to R, f being differentiable everywhere in ∆o (the interior of ∆). Then, for all b ∈∆η, ∥∇f(b)∥1 ≤Kαηα−1. [Proof in [17, Appendix]] Under these conditions, we can show that the PWLC approximation is bounded. Theorem 4.3. Let ρ be a continuous and convex function over ∆, differentiable everywhere in ∆o (the interior of ∆), and satisfying the α-H¨older condition with constant Kα. The error of an approximation ωB can be bounded by Cδα b , where C is a scalar constant. [Proof in [17, Appendix]] 4.2 Exact Updates Knowing that the approximation of ρ is bounded for a wide family of functions, the techniques described in Sec. 3.3.1 can be directly applied using ωB(b) as the PWLC reward function. These algorithms can be safely used because the propagation of the error due to exact updates is bounded. This can be proven using a similar methodology as in [11, 10]. Let Vt be the value function using the PWLC approximation described above and V ∗ t the optimal value function both at time t, H being the exact update operator and ˆH the same operator with the PWLC approximation. Then, the error from the real value function is ∥Vt −V ∗ t ∥∞= ∥ˆHVt−1 −HV ∗ t−1∥∞ (By definition) ≤∥ˆHVt−1 −HVt−1∥∞+ ∥HVt−1 −HV ∗ t−1∥∞ (By triangular inequality) ≤|ωb∗+ αb∗· b −ρ(b) −αb∗· b| + ∥HVt−1 −HV ∗ t−1∥∞ (Maximum error at b) ≤Cδα B + ∥HVt−1 −HV ∗ t−1∥∞ (By Theorem 4.3) ≤Cδα B + γ∥Vt−1 −V ∗ t−1∥ (By contraction) ≤Cδα B 1 −γ (By sum of a geometric series) For these algorithms, the selection of the set B remains open, raising similar issues as the selection of belief points in PB algorithms. 4.3 Approximate Updates In the case of PB algorithms, the extension is also straightforward, and the algorithms described in Sec. 3.3.2 can be used with a bounded error. The selection of B, the set of points for the PWLC approximation, and the set of points for the algorithm, can be shared5. This simplifies the study of the bound when using both approximation techniques at the same time. Let ˆVt be the value function at time t calculated using the PWLC approximation and a PB algorithm. Then the error between ˆVt and V ∗ t is ∥ˆVt −V ∗ t ∥∞≤∥ˆVt −Vt∥∞+ ∥Vt −V ∗ t ∥∞. The second term is the same as in Sec. 4.2, so it is bounded by Cδα B 1−γ . The first term can be bounded by the same reasoning as in [11], where ∥ˆVt −Vt∥∞= (Rmax−Rmin+Cδα B)δB 1−γ , with Rmin and Rmax the minimum and maximum values for 5Points from ∆’s boundary can be removed where the gradient is not defined, as the proofs only rely on interior points. 7 ρ(b) respectively. This is because the worst case for an α vector is Rmin−ϵ 1−γ , meanwhile the best case is only Rmax 1−γ because the approximation is always a lower bound. 5 Conclusions We have introduced ρPOMDPs, an extension of POMDPs that allows for expressing sequential decision-making problems where reducing the uncertainty on some state variables is an explicit objective. In this model, the reward ρ is typically a convex function of the belief state. Using the convexity of ρ, a first important result that we prove is that a Bellman backup Vn = HVn−1 preserves convexity. In particular, if ρ is PWLC and the value function V0 is equal to 0, then Vn is also PWLC and it is straightforward to adapt many state-of-the-art POMDP algorithms. Yet, if ρ is not PWLC, performing exact updates is much more complex. We therefore propose employing PWLC approximations of the convex reward function at hand to come back to a simple case, and show that the resulting algorithms converge to the optimal value function in the limit. Previous work has already introduced belief-dependent rewards, such as Spaan’s discussion about POMDPs and Active Perception [19], or Hero et al.’s work in sensor management using POMDPs [5]. Yet, the first one only presents the problem of non-PWLC value functions without giving a specific solution, meanwhile the second solves the problem using Monte-Carlo techniques that do not rely on the PWLC property. In the robotics field, uncertainty measurements within POMDPs have been widely used as heuristics [2], with very good results but no convergence guarantees. These techniques use only state-dependent rewards, but uncertainty measurements are employed to speed up the solving process, at the cost of losing some basic properties (e.g. Markovian property). Our work paves the way for solving problems with belief-dependent rewards, using new algorithms approximating the value function (e.g. point-based ones) in a theoretically sound manner. An important point is that the time complexity of the new algorithms only changes due to the size of the approximation of ρ. Future work includes conducting experiments to measure the increase in complexity. A more complex task is to evaluate the quality of the resulting approximations due to the lack of other algorithms for ρPOMDPs. An option is to look at online Monte-Carlo algorithms [20] as they should require little changes. Acknowledgements This research was supported by the CONICYT-Embassade de France doctoral grant and the COMAC project. We would also like to thank Bruno Scherrer for the insightful discussions and the anonymous reviewers for their helpful comments and suggestions. References [1] R. Smallwood and E. Sondik. The optimal control of partially observable Markov decision processes over a finite horizon. Operation Research, 21:1071–1088, 1973. [2] S. Thrun. Probabilistic algorithms in robotics. AI Magazine, 21(4):93–109, 2000. [3] L. Mihaylova, T. Lefebvre, H. Bruyninckx, K. Gadeyne, and J. De Schutter. Active sensing for robotics - a survey. In Proc. 5th Intl. Conf. On Numerical Methods and Applications, 2002. [4] S. Ji and L. Carin. Cost-sensitive feature acquisition and classification. Pattern Recogn., 40(5):1474–1485, 2007. [5] A. Hero, D. Castan, D. Cochran, and K. Kastella. Foundations and Applications of Sensor Management. Springer Publishing Company, Incorporated, 2007. [6] A. Cassandra. Exact and approximate algorithms for partially observable Markov decision processes. PhD thesis, Providence, RI, USA, 1998. [7] R. Bellman. The theory of dynamic programming. Bull. Amer. Math. Soc., 60:503–516, 1954. [8] G. Monahan. A survey of partially observable Markov decision processes. Management Science, 28:1–16, 1982. 8 [9] M. Hauskrecht. Value-function approximations for partially observable Markov decision processes. Journal of Artificial Intelligence Research, 13:33–94. [10] W. Lovejoy. Computationally feasible bounds for partially observed Markov decision processes. Operations Research, 39(1):162–175. [11] J. Pineau, G. Gordon, and S. Thrun. Anytime point-based approximations for large POMDPs. Journal of Artificial Intelligence Research (JAIR), 27:335–380, 2006. [12] M. Spaan and N. Vlassis. Perseus: Randomized point-based value iteration for POMDPs. Journal of Artificial Intelligence Research, 24:195–220, 2005. [13] T. Smith and R. Simmons. Point-based POMDP algorithms: Improved analysis and implementation. In Proc. of the Int. Conf. on Uncertainty in Artificial Intelligence (UAI), 2005. [14] H. Kurniawati, D. Hsu, and W. Lee. SARSOP: Efficient point-based POMDP planning by approximating optimally reachable belief spaces. In Robotics: Science and Systems IV, 2008. [15] R. Kaplow. Point-based POMDP solvers: Survey and comparative analysis. Master’s thesis, Montreal, Quebec, Canada, 2010. [16] T. Cover and J. Thomas. Elements of Information Theory. Wiley-Interscience, 1991. [17] M. Araya-L´opez, O. Buffet, V. Thomas, and F. Charpillet. A POMDP extension with beliefdependent rewards – extended version. Technical Report RR-7433, INRIA, Oct 2010. (See also NIPS supplementary material). [18] R. Saigal. On piecewise linear approximations to smooth mappings. Mathematics of Operations Research, 4(2):153–161, 1979. [19] M. Spaan. Cooperative active perception using POMDPs. In AAAI 2008 Workshop on Advancements in POMDP Solvers, July 2008. [20] S. Ross, J. Pineau, S. Paquet, and B. Chaib-draa. Online planning algorithms for POMDPs. Journal of Artificial Intelligence Research (JAIR), 32:663–704, 2008. 9
2010
125
3,883
Infinite Relational Modeling of Functional Connectivity in Resting State fMRI Morten Mørup Section for Cognitive Systems DTU Informatics Technical University of Denmark mm@imm.dtu.dk Kristoffer Hougaard Madsen Danish Research Centre for Magnetic Resonance Copenhagen University Hospital Hvidovre khm@drcmr.dk Anne Marie Dogonowski Danish Research Centre for Magnetic Resonance Copenhagen University Hospital Hvidovre annemd@drcmr.dk Hartwig Siebner Danish Research Centre for Magnetic Resonance Copenhagen University Hospital Hvidovre hartwig.siebner@drcmr.dk Lars Kai Hansen Section for Cognitive Systems DTU Informatics Technical University of Denmark lkh@imm.dtu.dk Abstract Functional magnetic resonance imaging (fMRI) can be applied to study the functional connectivity of the neural elements which form complex network at a whole brain level. Most analyses of functional resting state networks (RSN) have been based on the analysis of correlation between the temporal dynamics of various regions of the brain. While these models can identify coherently behaving groups in terms of correlation they give little insight into how these groups interact. In this paper we take a different view on the analysis of functional resting state networks. Starting from the definition of resting state as functional coherent groups we search for functional units of the brain that communicate with other parts of the brain in a coherent manner as measured by mutual information. We use the infinite relational model (IRM) to quantify functional coherent groups of resting state networks and demonstrate how the extracted component interactions can be used to discriminate between functional resting state activity in multiple sclerosis and normal subjects. 1 Introduction Neuronal elements of the brain constitute an intriguing complex network [4]. Functional magnetic resonance imaging (fMRI) can be applied to study the functional connectivity of the neural elements which form this complex network at a whole brain level. It has been suggested that fluctuations in the blood oxygenation level-dependent (BOLD) signal during rest reflecting the neuronal baseline activity of the brain correspond to functionally relevant networks [9, 3, 19]. Most analysis of functional resting state networks (RSN) have been based on the analysis of correlation between the temporal dynamics of various regions of the brain either assessed by how well voxels correlate with the signal from predefined regions (so-called) seeds [3, 24] or through unsupervised multivariate approaches such as independent component analysis (ICA) [10, 9]. While 1 Figure 1: The proposed framework. All pairwise mutual information (MI) are calculated between the 2x2x2 group of voxels for each subjects resting state fMRI activity. The graph of pairwise mutual information is thresholded such that the top 100,000 un-directed links are kept. The graphs are analyzed by the infinite relational model (IRM) assuming the functional units Z are the same for all subjects but their interactions ρ(n) are individual. We will use these extracted interactions to characterize the individuals. these models identify coherently behaving groups in terms of correlation they give limited insight into how these groups interact. Furthermore, while correlation is optimal for extracting second order statistics it easily fails in establishing higher order interactions between regions of the brain [22, 7]. In this paper we take a different view on the analysis of functional resting state networks. Starting from the definition of resting state as functional coherent groups we search for functional units of the brain that communicate with other parts of the brain in a coherent manner. Consequently, what define functional units are the way in which they interact with the remaining parts of the network. We will consider functional connectivity between regions as measured by mutual information. Mutual information (MI) is well rooted in information theory and given enough data MI can detect functional relations between regions regardless of the order of the interaction [22, 7]. Thereby, resting state fMRI can be represented as a mutual information graph of pairwise relations between voxels constituting a complex network. Numerous studies have analyzed these graphs borrowing on ideas from the study of complex networks [4]. Here common procedures have been to extract various summary statistics of the networks and compare them to those of random networks and these analyses have demonstrated that fMRI derived graphs behave far from random [11, 1, 4]. In this paper we propose to use relational modeling [17, 16, 27] in order to quantify functional coherent groups of resting state networks. In particular, we investigate how this line of modeling can be used to discriminate patients with multiple sclerosis from healthy individuals. Multiple Sclerosis (MS) is an inflammatory disease resulting in widespread demyelinization of the subcortical and spinal white matter. Focal axonal demyelinization and secondary axonal degeneration results in variable delays or even in disruption of signal transmission along cortico-cortical and cortico-subcortical connections [21, 26]. In addition to the characteristic macroscopic white-matter lesions seen on structural magnetic resonance imaging (MRI), pathology- and advanced MRI-studies have shown demyelinated lesions in cortical gray-matter as well as in white-matter that appear normal on structural MRI [18, 12]. These findings show that demyelination is disseminated throughout the brain affecting brain functional connectivity. Structural MRI gives information about the extent of white-matter lesions, but provides no information on the impact on functional brain connectivity. Given the widespread demyelinization in the brain (i.e., affecting the brain’s anatomical and functional ’wiring’) MS represents a disease state which is particular suited for relational modeling. Here, relational modeling is able to provide a global view of the communication in the functional network between the extracted functional units. Furthermore, the method facilitates the examination of all brain networks simultaneously in a completely data driven manner. An illustration of the proposed analysis is given in figure 1. 2 2 Methods Data: 42 clinically stable patients with relapsing-remitting (RR) and secondary progressive multiple sclerosis (27 RR; 22 females; mean age: 43.5 years; range 25-64 years) and 30 healthy individuals (15 females; mean age: 42.6 years; range 22-69 years) participated in this cross-sectional study. Patients were neurologically examined and assigned a score according to the EDSS which ranged from 0 to 7 (median EDSS: 4.25; mean disease duration: 14.3 years; range 3-43 years). rs-fMRI was performed with the subjects being at rest and having their eyes closed (3 Tesla Magnetom Trio, Siemens, Erlangen, Germany). We used a gradient echo T2*-weighted echo planar imaging sequence with whole-brain coverage (repetition time: 2490 ms; 3 mm isotropic voxels). The rs-fMRI session lasted 20 min (482 brain volumes). During the scan session the cardiac and respiratory cycles were monitored using a pulse oximeter and a pneumatic belt. Preprocessing: After exclusion of 2 pre-saturation volumes each remaining volume was realigned to the mean volume using a rigid body transformation. The realigned images were then normalized to the MNI template. In order to remove nuisance effects related to residual movement or physiological effects a linear filter comprised of 24 motion related and a total of 60 physiological effects (cardiac, respiratory and respiration volume over time) was constructed [14]. After filtering, the voxel were masked [23] and divided into 5039 voxel groups consisting of 2 × 2 × 2 voxels for the estimation of pairwise MI. 2.1 Mutual Information Graphs The mutual information between voxel groups i and j is given by I(i, j) = P uv Pij(u, v) log Pij(u,v) Pi(u)Pj(u). Thus, the mutual information hinges on the estimation of the joint density Pij(u, v). Several approaches exists for the estimation of mutual information [25] ranging from parametric to non-parametric methods such as nearest neighbor density estimators [7] and histogram methods. The accuracy of both approaches relies on the number of observations present. We used the histogram approach. We used equiprobable rather than equidistant bins [25] based on 10 percentiles derived from the individual distribution of each voxel group, i.e. Pi(u) = Pj(v) = 1 10. Pij(u, v) counts the number of co-occurrences of observations from voxels in voxel group i that are at bin u while the corresponding voxels from group j are at bin v at time t. As such, we had a total of 8·480 = 3840 samples to populate the 100 bins in the joint histogram. To generate the mutual information graphs for each subject a total of 72·5039·(5039−1)/2 ≈1 billion pairwise MI were evaluated. We thresholded each graph keeping the top 100, 000 pairwise MI as links in the graph. As such, each graph had size 5039×5039 with a total of 200,000 directed links (i.e. 100, 000 undirected link) which resulted in each graph having link density 100,000 5039·(5039−1)/2 = 0.0079 while the total number of links was 72 · 100, 000 = 7.2 million links (when counting links only in the one direction). 2.2 Infinite Relational Modeling (IRM) The importance of modeling brain connectivity and interactions is widely recognized in the literature on fMRI [13, 28, 20]. Approaches such as dynamic causal modeling [13], structural equation models [20] and dynamic Bayes nets [28] are normally limited to analysis of a few interactions between known brain regions or predefined regions of interest. The benefits of the current relational modeling approach are that regions are defined in a completely data driven manner while the method establishes interaction at a low computational complexity admitting the analysis of large scale brain networks. Functional connectivity graphs have previously been considered in [6] for the discrimination of schizophrenia. In [24] resting state networks were defined based on normalized graph cuts in order to derive functional units. While normalized cuts are well suited for the separation of voxels into groups of disconnected components the method lacks the ability to consider coherent interaction between groups. In [17] the stochastic block model also denoted the relational model (RM) was proposed for the identification of coherent groups of nodes in complex networks. Here, each node i belongs to a class zir where ir denote the ith row of a clustering assignment matrix Z, and the probability, πij, of a link between node i and j is determined by the class assignments zir and zjr as πij = zirρz⊤ jr. Here, ρkℓ∈[0, 1] denotes the probability of generating a link between a node in class k and a node in class ℓ. Using the Dirichlet process (DP), [16, 27] propose a nonparametric generalization of the model with a potentially infinite number of classes, i.e. the infinite 3 relational model (IRM). Inference in IRM jointly determines the number of latent classes as well as class assignments and class link probabilities. To our knowledge this is the first attempt to explore the IRM model for fMRI data. Following [16] we have the following generative model for the infinite relational model Z|α ∼ DP(α) ρ(n)(a, b)|β+(a, b), β−(a, b) ∼ Beta(β+(a, b), β−(a, b)) A(n)(i, j)|Z, ρ(n) ∼ Bernoulli(zirρ(n)z⊤ jr) As such an entitys tendency to participate in relations is determined solely by its cluster assignment in Z. Since the prior on the elements of ρ is conjugate the resulting integral P(A(n)|Z, β+, β−) = R P(A(n)|ρ(n), Z)P(ρ(n)|β+, β−)dρ(n) has an analytical solution such that P(A(n)|Z, β+, β−) = Y a≥b Beta(M (n) + (a, b) + β+(a, b), M (n) −(a, b) + β−(a, b)) Beta(β+(a, b), β−(a, b)) , M (n) + (a, b) = (1 −1 2δa,b)z⊤ a (A(n) + A(n)⊤)zb M (n) −(a, b) = (1 −1 2δa,b)z⊤ a (ee⊤−I)zb −M (n) + (a, b) M (n) + (a, b) is the number of links between functional units a and b whereas M (n) −(a, b) is the number of non-links between functional unit a and b when disregarding links between a node and itself. e is a vector of length J with ones in all entries where J is the number of voxel groups. We will assume that the graphs are independent over subjects such that P(A(1), . . . , A(N)|Z, β+, β−) = Y n Y a≥b Beta(M (n) + (a, b) + β+(a, b), M (n) −(a, b) + β−(a, b)) Beta(β+(a, b), β−(a, b)) . As a result, the posterior likelihood is given by P(Z|A(1), . . . , A(N), β+, β−, α) ∝ Y n P(A(n)|Z, β+, β−) ! P(Z|α) =  Y n Y a≥b Beta(M (n) + (a, b) + β+(a, b), M (n) −(a, b) + β−(a, b)) Beta(β+(a, b), β−(a, b))  · αD Γ(α) Γ(J + α) Y a Γ(na) ! . Where D is the number of expressed functional units and na the number of voxel groups assigned to functional unit a. The expected value of ρ(n) is given by ⟨ρ(n)(a, b)⟩= M (n) + (a,b)+β+(a,b) M (n) + (a,b)+M (n) −(a,b)+β+(a,b)+β−(a,b). MCMC Sampling the IRM model: As proposed in [16] we use a Gibbs sampling scheme in combination with split-merge sampling [15] for the clustering assignment matrix Z. We used the split-merge sampling procedure proposed in [15] with three restricted Gibbs sampling sweeps. We initialized the restricted Gibbs sampler by the sequential allocation procedure proposed in [8]. For the MCMC sampling, the posterior likelihood for a node assignment given the assignment of the remaining nodes is needed both for the Gibbs sampler as well as for calculating the split-merge acceptance ratios [15]. P(zia = 1|Z\zir, A(1), ..., A(N)) ∝      ma Q n Q b Beta(M(n) + (a,b)+β+(a,b),M(n) − (a,b)+β−(a,b)) Beta(β+(a,b),β−(a,b)) if ma > 0 α Q n Q b Beta(M(n) + (a,b)+β+(a,b),M(n) − (a,b)+β−(a,b)) Beta(β+(a,b),β−(a,b)) otherwise . where ma = P j̸=i zj,a is the size of the ath functional unit disregarding the assignment of the ith node. We note that this posterior likelihood can be efficiently calculated only considering the parts of the computation of M (n) + (a, b) and M (n) −(a, b) as well as evaluation of the Beta function that are affected by the considered assignment change. 4 Scoring the functional units in terms of stability: By sampling we obtain a large amount of potential solutions, however, for visualization and interpretation it is difficult to average across all samples as this requires that the extracted groups in different samples and runs can be related to each other. For visualization we instead selected the single best extracted sample r∗(i.e., the MAP estimate) across 10 separate randomly initialized runs each of 500 iterations. To facilitate interpretation we displayed the top 20 extracted functional units most reproducible across the separate runs. To identify these functional units we analyzed how often nodes co-occurred in the same cluster across the extracted samples from the other random starts r according to C = P r̸=r∗(Z(r)Z(r)⊤−I) using the following score ηc ηc = sc stot c , sc = 1 2z(r∗)⊤ c Cz(r∗) c , stot c = z(r∗)⊤ c Ce −sc. sc counts the number of times the voxels in group c co-occurred with other voxels in the group whereas stot gives the total number of times voxels in group c co-occurred with other voxels in the graph. As such 0 ≤ηc ≤1 where 1 indicates that all voxels in the cth group were in the same cluster across all samples whereas 0 indicates that the voxels never co-occurred in any of the other samples. 3 Results and Discussion Following [11] we calculated the average shortest path length ⟨L⟩, average clustering coefficient ⟨C⟩, degree distribution γ and largest connected component (i.e., giant component) G for each subject specific graph as well as the MI threshold value tc used to define the top 100, 000 links. In table 1 it can be seen that the derived graphs are far from Erd¨os-R´enyi random graphs. Both the clustering coefficient, degree distribution parameter γ and giant component G differ significantly from the random graphs. However, there are no significant differences between the Normal and MS group indicating that these global features do not appear to be affected by the disease. For each run, we initialized the IRM model with D = 50 randomly generated functional units. We set the prior β+(a, b) =  5 a = b 1 otherwise and β−(a, b) =  1 a = b 5 otherwise favoring a priori higher within functional unit link density relative to between link density. We set α = log J (where J is the number of voxel groups). In the model estimation we treated 2.5% of the links and an equivalent number of non-links as missing at random in the graphs. When treating entries as missing at random these can be ignored maintaining counts only over the observed values [16]. The estimated models are very stable as they on average extracted D = 72.6 ± 0.6 functional units. In figure 2 the area under curve (AUC) scores of the receiver operator characteristic for predicting links are given for each subject where the prediction of links was based on averaging over the final 100 samples. While these AUC scores are above random for all subjects we see a high degree of variability across the subjects in terms of the model’s ability to account for links and non-links in the graphs. We found no significant difference between the Normal and MS group in terms of the Table 1: Median threshold values tc, average shortest path ⟨L⟩, average clustering coefficient ⟨C⟩, degree distribution exponent γ (i.e. p(k) ∝k−γ) and giant component G (i.e. largest connected component in the graphs relative to the complete graph) for the normal and multiple-sclerosis group as well as a non-parametric test of difference in median between the two groups. The random graph is an Erd¨os-R´enyi random graph with same density as the constructed graphs. tc ⟨L⟩ ⟨C⟩ γ G Normal 0.0164 2.77 0.1116 1.40 0.8587 MS 0.0163 2.70 0.0898 1.36 0.8810 Random 2.73 0.0079 0.88 1 P-value(Normal vs. MS) 0.9964 0.4509 0.9954 0.7448 0.7928 P-value(Normal and MS vs. Random) 0.6764 p ≤0.001 p ≤0.001 p ≤0.001 5 Figure 2: AUC score across the 10 different runs for each subject in the Normal group (top) and MS group (bottom). At the top right the distribution of the AUC scores is given for the two groups (Normal: blue, MS: red). No significant difference between the median value of the two distributions are found (p ≈0.34). model’s ability to account for the network dynamics. Thus, there seem to be no difference in terms of how well the IRM model is able to account for structure in the networks of MS and Normal subjects. Finally, we see that the link prediction is surprisingly stable for each subject across runs as well as links and non-links treated as missing. This indicate that there is a high degree of variability in the graphs extracted from resting state fMRI between the subjects relative to the variability within each subject. Considering the inference a stochastic optimization procedure we have visualized the sample with highest likelihood (i.e. the MAP estimate) over the runs in figure 3. We display the top 20 most reproducible extracted voxel groups (i.e., functional units) across the 10 runs. Fifteen of the 20 functional units are easily identified as functionally relevant networks. These selected functional units are similar to the networks previously identified on resting-state fMRI data using ICA [9]. The sensori-motor network is represented by the functional units 2, 3, 13 and 20; the posterior part of the default-mode network [19] by functional units 6, 14, 16, 19; a fronto-parietal network by the functional units 7,10 and 12; the visual system represented by the functional units 5, 11, 15, 18. Note the striking similarity to the sensori-motor ICA1, posterior part of the default network ICA2 and fronto-parietal network ICA3 and visual component ICA4. Contrary to ICA the current approach is able to also model interactions between components and a consistent pattern is revealed where the functional units with the highest within connectivity also show the strongest between connectivity. Furthermore the functional units appear to have symmetric connectivity profiles e.g. functional unit 2 is strongly connected to functional unit 3 (sensori-motor system), and these both strongly connect to the same other functional units, in this case 6 and 16 (default-mode network). Functional units 1, 4, 8, 9, 17 we attribute to vascular noise and these units appear to be less connected with the remaining functional units. In panel C of figure 3 we tested the difference between medians in the connectivity of the extracted functional units. Given are connections that are significant at p ≤0.05. Healthy individuals show stronger connectivity among selected functional units relative to patients. The functional units involved are distributed throughout the brain and comprise the visual system (functional unit 5 and 11), the sensori-motor network (functional unit 2), and the fronto-parietal network (functional unit 10). This is expected since MS affects the brain globally by white-matter changes disseminated throughout the brain [12]. Patients with MS show stronger connectivity relative to healthy individuals between selected parts of the sensori-motor (functional unit 13) and fronto-parietal network (functional units 7 and 12). An interpretation of this finding could be that the communication increases between the fronto-parietal and the sensori-motor network either as a maladaptive consequence of the disease or as part of a beneficial compensatory mechanism to maintain motor function. 6 Figure 3: Panel A: Visualization of the MAP model over the 10 restarts. Given are the functional units indicated in red while circles indicate median within unit link density and lines median between functional unit link density. Gray scale and line width code the link density between and within the functional units using a logarithmic scale. Panel B: Selected resting state components extracted from a group independent component analysis (ICA) are given. After temporal concatenation over subjects the Infomax ICA algorithm [2] was used to identify 20 spatially independent components. Subsequently the individual component time series was used in a regression model to obtain subject specific component maps [5]. The displayed ICA maps are based on one sample t-tests corrected for multiple comparisons p ≤0.05 using Gaussian random fields theory. Panel C: AUC score for relations between the extracted groups thresholded at a significance level of α = 5% based on a two sided rank-sum test. Blue indicates that the link density is larger for Normal than MS, yellow that MS is larger than Normal. (A high resolution version of the figure can be found in the supplementary material). 7 Table 2: Leave one out classification performance based on support vector machine (SVM) with a linear kernel, linear discriminant analysis (LDA) and K-nearest neighbor (KNN). Significance level estimated by comparing to classification performance for the corresponding classifiers with randomly permuted class labels, bold indicates significant classification at a p ≤0.05. Raw data PCA ICA Degree IRM SVM 51.39 55.56 63.89 (p ≤0.04) 59.72 72.22(p ≤0.002) LDA 59.72 51.39 63.89 (p ≤0.05) 51.39 75.00(p ≤0.001) KNN 38.89 58.33 56.94 51.39 66.67(p ≤0.01) Discriminating Normal subjects from MS: We evaluated the classification performance of the subject specific group link densities ρ(n) based on leave one out cross-validation. We considered three standard classifiers, soft margin support vector machine (SVM) with linear kernel (C = 1), linear discriminant analysis (LDA) based on the pooled variance estimate (features projected by principal component analysis to a 20 dimensional feature space prior to analysis), as well as K-nearest neighbor (KNN), K = 3. We compared the classifier performances to classifying the normalized raw subject specific voxel ×time series, i.e. the matrix given by subject×voxel −time as well as the data projected to the most dominant 20 dimensional subspace denoted (PCA). For comparison we also included a group ICA [5] analysis as well as the performance using node degree (Degree) as features which has previously been very successful for classification of schizophrenia [6]. For the IRM model we used the Bayesian average over predictions which was dominated by the MAP estimate given in figure 3. For all the classification analyses we normalized each feature. In table 2 is given the classification results. Group ICA as well as the proposed IRM model significantly classify above random. The IRM model has a higher classification rate and is significant across all the classifiers. Finally, we note that contrary to analysis based on temporal correlation such as the ICA and PCA approaches used for the classification the benefit of mutual information is that it can take higher order dependencies into account that are not necessarily reflected by correlation. As such, a brain region driven by the variance of another brain region can be captured by mutual information whereas this is not necessarily captured by correlation. 4 Conclusion The functional units extracted using the IRM model correspond well to previously described RSNs [19, 9]. Whereas conventional models for assessing functional connectivity in rs-fMRI data often aim to divide the brain into segregated networks the IRM explicitly models relations between functional units enabling visualization and analysis of interactions. Using classification models to predict the subject disease state revealed that the IRM model had a higher prediction rate than discrimination based on the components extracted from a conventional group ICA approach [5]. IRM readily extends to directed graphs and networks derived from task related functional activation. As such we believe the proposed method constitutes a promising framework for the analysis of functionally derived brain networks in general. References [1] S. Achard, R. Salvador, B. Whitcher, J. Suckling, and E. Bullmore. A resilient, low-frequency, smallworld human brain functional network with highly connected association cortical hubs. The Journal of Neuroscience, 26(1):63–72, 2006. [2] A. J. Bell and T. J. Sejnowski. An information maximization approach to blind source separation and blind deconvolution. Neural Computation, 7:1129–1159, 1995. [3] B. Biswal, F. Z. Yetkin, V. M. Haughton, and J. S. Hyde. Functional connectivity in the motor cortex of resting human brain using echo-planar MRI. Magnetic Resonance in Medicine, 34(4):537–541, 1995. [4] E. Bullmore and O. Sporns. Complex brain networks: graph theoretical analysis of structural and functional systems. Nature Reviews. Neuroscience, 10(3):186-98, 2009. 8 [5] V. D. Calhoun, T. Adali, G. D. Pearlson, and J. J. Pekar. A method for making group inferences from functional MRI data using independent component analysis. Human Brain Mapping, 14:140–151, 2001. [6] G. Cecchi, I. Rish, B. Thyreau, B. Thirion, M. Plaze, M.-L. Paillere-Martinot, C. Martelli, J.-L. Martinot, and J.-B. Poline. Discriminative network models of schizophrenia. Advances in Neural Information Processing Systems, 22:252–260, 2009. [7] B. Chai, D. Walther, D. Beck, and L. Fei-Fei. Exploring functional connectivities of the human brain using multivariate information analysis. Advances in Neural Information Processing Systems, 22:270– 278, 2009. [8] D. B. Dahl. Sequentially-allocated merge-split sampler for conjugate and nonconjugate Dirichlet process mixture models. Technical report, Texas A&M University, 2005. [9] J. S. Damoiseaux, S.A.R.B. Rombouts, F. Barkhof, P. Scheltens, C. J. Stam, S. M. Smith, and C. F. Beckmann. Consistent resting-state networks across healthy subjects. Proceedings of the National Academy of Sciences of the United States of America, 103(37):13848–13853, 2006. [10] M. De Luca, S. Smith, N. De Stefano, A. Federico, and P. M. Matthews. Blood oxygenation level dependent contrast resting state networks are relevant to functional activity in the neocortical sensorimotor system. Experimental Brain Research, 167(4):587–594, 2005. [11] V. M. Eguiluz, D. R. Chialvo, G. A. Cecchi, M. Baliki, and A. V. Apkarian. Scale-free brain functional networks. Physical Review Letters, 94(1):018102, 2005. [12] M. Filippi and M. A. Rocca. MRI evidence for multiple sclerosis as a diffuse disease of the central nervous system. Journal of Neurology, 252 Suppl 5:v16–v24, 2005. [13] K.J. Friston, L. Harrison, and W.D. Penny. Dynamic Causal Modelling. NeuroImage, 19(4):1273–1302, 2003. [14] G. H. Glover, T. Q. Li, and D. Ress. Image-based method for retrospective correction of physiological motion effects in fMRI: RETROICOR. Magnetic Resonance in Medicine, 44:162–167, 2000. [15] S. Jain and R. M. Neal. A split-merge markov chain monte carlo procedure for the dirichlet process mixture model. Journal of Computational and Graphical Statistics, 13(1):158–182, 2004. [16] C. Kemp, J. B. Tenenbaum, T. L. Griffiths, T. Yamada, and N. Ueda. Learning systems of concepts with an infinite relational model. In Artificial Intelligence, Proceedings of the 21st National AAAI Conference on, 1:381–388, 2006. [17] K. Nowicki and T. A. B. Snijders. Estimation and prediction for stochastic blockstructures. Journal of the American Statistical Association, 96(455):1077–1087, 2001. [18] J. W. Peterson, L. B¨o, S. M¨ork, A. Chang, and B. D. Trapp. Transected neurites, apoptotic neurons, and reduced inflammation in cortical multiple sclerosis lesions. Annals of Neurology, 50:389–400, 2001. [19] M. E. Raichle, A. M. MacLeod, A. Z. Snyder, W. J. Powers, D. A. Gusnard, and G. L. Shulman. A default mode of brain function. Proceedings of the National Academy of Sciences of the United States of America, 98(2):676–682, 2001. [20] A. J. Storkey, E. Simonotto, H. Whalley, S. Lawrie, L. Murray, and D. McGonigle. Learning structural equation models for fMRI. Advances in Neural Information Processing Systems, 19:1329–1336, 2007. [21] B. D. Trapp, J. Peterson, R. M. Ransohoff, R. Rudick, S. M¨ork, and L B¨o. Axonal transection in the lesions of multiple sclerosis. The New England journal of medicine, 338(5):278–85, 1998. [22] A. Tsai, J. W. Fisher, III, C. Wible, W. M. Wells, III, J. Kim, and A. S. Willsky. Analysis of functional MRI data using mutual information. In MICCAI ’99: Proc. of the Sec. Intern. Conf. on Medical Image Computing and Computer-Assisted Intervention, Lecture Notes in Computer Science, 1679:473–480, 1999. [23] N. Tzourio-Mazoyer, B. Landeau, D. Papathanassiou, F. Crivello, O. Etard, N. Delcroix, B. Mazoyer, and M. Joliot. Automated anatomical labeling of activations in SPM using a macroscopic anatomical parcellation of the MNI MRI single-subject brain. NeuroImage, 15(1):273–89, 2002. [24] M. van den Heuvel, R. Mandl, and H. Hulshoff Pol. Normalized cut group clustering of resting-state fMRI data. PLoS ONE, 3(4), 2008. [25] J. Walters-williams, Y. Li. Estimation of Mutual Information: A Survey. Lecture Notes in Computer Science, 5589:389–396, 2009. [26] S. G Waxman. Axonal conduction and injury in multiple sclerosis: the role of sodium channels. Nature reviews. Neuroscience, 7(12):932–41, 2006. [27] Z. Xu, V. Tresp, K. Yu, and H. P. Kriegel. Infinite hidden relational models. In In Proceedings of the 22nd International Conference on Uncertainty in Artificial Intelligence, 2006. [28] L. Zhang, D. Samaras, N. Alia-klein, N. Volkow, and R. Goldstein. Modeling neuronal interactivity using dynamic bayesian networks. Advances in Neural Information Processing Systems, 18:1593–1600, 2006. 9
2010
126
3,884
An Alternative to Low-Level-Synchrony-Based Methods for Speech Detection Paul Ruvolo University of California, San Diego Machine Perception Laboratory Atkinson Hall (CALIT2), 6100 9500 Gilman Dr., Mail Code 0440 La Jolla, CA 92093-0440 paul@mplab.ucsd.edu Javier R. Movellan University of California, San Diego Machine Perception Laboratory Atkinson Hall (CALIT2), 6100 9500 Gilman Dr., Mail Code 0440 La Jolla, CA 92093-0440 movellan@mplab.ucsd.edu Abstract Determining whether someone is talking has applications in many areas such as speech recognition, speaker diarization, social robotics, facial expression recognition, and human computer interaction. One popular approach to this problem is audio-visual synchrony detection [10, 21, 12]. A candidate speaker is deemed to be talking if the visual signal around that speaker correlates with the auditory signal. Here we show that with the proper visual features (in this case movements of various facial muscle groups), a very accurate detector of speech can be created that does not use the audio signal at all. Further we show that this person independent visual-only detector can be used to train very accurate audio-based person dependent voice models. The voice model has the advantage of being able to identify when a particular person is speaking even when they are not visible to the camera (e.g. in the case of a mobile robot). Moreover, we show that a simple sensory fusion scheme between the auditory and visual models improves performance on the task of talking detection. The work here provides dramatic evidence about the efficacy of two very different approaches to multimodal speech detection on a challenging database. 1 Introduction In recent years interest has been building [10, 21, 16, 8, 12] in the problem of detecting locations in the visual field that are responsible for auditory signals. A specialization of this problem is determining whether a person in the visual field is currently taking. Applications of this technology are wide ranging: from speech recognition in noisy environments, to speaker diarization, to expression recognition systems that may benefit from knowledge of whether or not the person is talking to interpret the observed expressions. Past approaches to the problem of speaker detection have focused on exploiting audio-visual synchrony as a measure of how likely a person in the visual field is to have generated the current audio signal [10, 21, 16, 8, 12]. One benefit of these approaches is their general purpose nature, i.e., they are not limited to detecting human speech [12]. Another benefit is that they require very little processing of the visual signal (some of them operating on raw pixel values [10]). However, as we show in this document, when visual features tailored to the analysis of facial expressions are used it is possible to develop a very robust speech detector that is based only on the visual signal that far outperforms the past approaches. Given the strong performance for the visual speech detector we incorporate auditory information using the paradigm of transductive learning. Specifically we use the visual-only detector’s output as 1 an uncertain labeling of when a given person is speaking and then use this labeling along with a set of acoustic measurements to create a voice model of how that person sounds when he/she speaks. We show that the error rate of the visual-only speech detector can be more than halved by combining it with the auditory voice models developed via transductive learning. Another view of our proposed approach is that it is also based on synchrony detection, however, at a much higher level and much longer time scale than previous approaches. More concretely our approach moves from the level of synchrony between pixel fluctuations and sound energy to the level of the visual markers of talking and auditory markers of a particular person’s voice. As we will show later, a benefit of this approach is that the auditory model that is optimized to predict the talking/not-talking visual signal for a particular candidate speaker also works quite well without using any visual input. This is an important property since the visual input is often periodically absent or degraded in real world applications (e.g. when a mobile robot moves to a part of the room where it can no longer see everyone in the room, or when a subject’s mouth is occluded). The results presented here challenge the orthodoxy of the use of low-level synchrony related measures that dominates research in this area. 2 Methods In this section we review a popular approach to speech detection that uses Canonical Correlation Analysis (CCA). Next we present our method for visual-only speaker detection using facial expression dynamics. Finally, we show how to incorporate auditory information using our visual-only model as a training signal. 2.1 Speech Detection by Low-level Synchrony Hershey et. al. [10] pioneered the use of audio-visual synchrony for speech detection. Slaney et. al. [21] presented a thorough evaluation of methods for detecting audio-visual synchrony. Slaney et. al. were chiefly interested in designing a system to automatically synchronize audio and video, however, their results inspired others to use similar approaches for detecting regions in the visual field responsible for auditory events [12]. The general idea is that if measurements in two different sensory modalities are correlated then they are likely to be generated by a single underlying common cause. For example, if mouth pixels of a potential speaker are highly predictable based on sound energy then it is likely that there is a common cause underlying both sensory measurements (i.e. that the candidate speaker is currently talking). A popular apprach to detect correlations between two different signals is Canonical Correlation Analysis. Let A1, . . . , AN and V1, . . . , VN be sequences of audio and visual features respectively with each Ai ∈Rv and Vi ∈Ru. We collectively refer to the audio and visual features with the variables A ∈Rv×N and V ∈Ru×N. The goal of CCA is to find weight vectors wA ∈Rv and wV ∈Ru such that the projection of each sequence of sensory measurements onto these weight vectors is maximally correlated. The objective can be stated as follows: (wA, wV ) = argmax ||wA||2≤1,||wV ||2≤1 ρ(A⊤wA, V ⊤wv) (1) Where ρ is the Pearson correlation coefficient. Equation 1 reduces to a generalized Eigenvalue problem (see [9] for more details). Our model of speaker detection based on CCA involves computing canonical vectors wA and wV that solve Equation 1 and then computing time-windowed estimates of the correlation of the auditory and visual features projected on these vectors at each point in time. The final judgment as to whether or not a candidate face is speaking is determined by thresholding the windowed correlation value. 2.2 Visual Detector of Speech The Facial Action Coding System (FACS) is an anatomically inspired, comprehensive and versatile method to describe human facial expressions [7]. FACS encodes the observed expressions as combinations of Action Unit (AUs). Roughly speaking AUs describe changes in the appearance of the face that are due to the effect of individual muscle movements. 2 Figure 1: The Computer Expression Recognition Toolbox was used to automatically extract 84 features describing the observed facial expressions. These features were used for training a speech detector. In recent years significant progress has been made in the full automation of FACS. The Computer Expression Recognition Toolbox (CERT, shown in Figure 1) [2] is a state of the art system for automatic FACS coding from video. The output of the CERT system provides a versatile and effective set of features for vision-based automatic analysis of facial behavior. Among other things it has been successfully used to recognize driver fatigue [22], discriminate genuine from faked pain [13] , and estimate how difficult a student finds a video lecture [24, 23]. In this paper we used 84 outputs of the CERT system ranging from the locations of key feature points on the face to movements of individual facial muscle groups (Action Units) to detectors that specify high-level emotional categories (such as distress). Figure 2 shows an example of the dynamics of CERT outputs during periods of talking and non-talking. There appears to be a periodicity to the modulations in the chin raise Action Unit (AU 17) during the speech period. In order to capture this type of temporal fluctuation we processed the raw CERT outputs with a bank of temporal Gabor filters. Figure 3 shows a subset of the filters we used. The Figure shows the real and imaginary parts of the filter output over a range of bandwidth and fundamental frequency values. In this work we use a total of 25 temporal Gabors. Specifically we use all combinations of half-magnitude bandwidths of 3.4, 6.8, 10.2, 13.6, and 17 Hz peak frequency values of 1, 2, 3, 4, and 5 Hz. The outputs of these filters were used as input to a ridge logistic regression classifer [5]. Logistic regression is a ubiquitous tool for machine learning and has performed quite well over a range of tasks [11]. Popular approaches like Support Vector Machines, and Boosting, can be seen as special cases of logistic regression. One advantage of logistic regression is that it provides estimates of the posterior probability of the category of interest, given the input. In our case, the probability that a sequence of observed images corresponds to a person talking. 2.3 Voice Model The visual speech detector described above was then used to automatically label audio-visual speech signals. These labels where then used to train person-specific voice models. This paradigm for combining weakly labeled data and supervised learning is known as transductive learning in the machine learning community. It is possible to cast the bootstrapping of the voice model very similarly to the more conventional Canonical Correlation method discussed in Section 2.1. Although it is known [20] that non-linear models provide superior performance to linear models for auditory speaker identification, consider the case where we seek to learn a linear model over auditory features to determine a model of a particular speaker’s voice. If we assume that we are given a fixed linear 3 Time AU 17 (Chin Raise) Talking Not Talking Not Talking Figure 2: An example of the shift in action unit output when talking begins. The Figure shows a bar graph where the height of each black line corresponds to the value of Action Unit 17 for a particular frame. Qualitatively there is a periodicity in CERT’s Action Unit 17 (Chin Raise) output during the talking period. !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 Time (seconds) Filter Amplitude 0 50 100 150 200 !0.2 !0.15 !0.1 !0.05 0 0.05 0.1 0.15 0.2 Viewer Confederate Real Imaginary A Selection of Temporal Gabors Figure 3: A selection of the temporal Gabor filter bank used to express the modulation of the CERT outputs. Shown are both the real and imaginary Gabor components over a range of bandwidths and peak frequencies. 4 model, wV , that predicts when a subject is talking based on visual features we can reformulate the CCA-based approach to learning an auditory model as a simple linear regression problem: wA = argmax ||wA||2≤1 ρ(A⊤wA, V ⊤wv) (2) = arg min wa  min b ∥A⊤wa + b −V ⊤wv∥2  (3) Where b is a bias term. While this view is useful for seeing the commonalities between our approach and the classical synchrony approaches it is important to note that our approach does not have the restriction of requiring the use of linear models of either the auditory or visual talking detectors. In this section we show how we can fit a non-linear voice model that is very popular for the task of speaker detection using the visual detector output as a training signal. 2.3.1 Auditory Features We use the popular Mel-Frequency Cesptral Coefficients (MFCCs) [3] as the auditory descriptors to model the voice of a candidate speaker. MFCCs have been applied to a wide range of audio category recognition problems such as genre identification and speaker identification [19], and can be seen as capturing the timbral information of sound. See [14] for a more thorough discussion of the MFCC feature. In other work various statistics of the MFCC features have also been shown to be informative (e.g. first or second temporal derivatives). In this work we only use the raw MFCC outputs leaving a systematic exploration of the acoustic feature space as future work. 2.3.2 Learning and Classification Given a temporal segmentation of when each of a set of candidate speakers is speaking we define the set of MFCC features generated by speaker i as FAi where each column of FAij denotes the MFCC features of speaker i at the jth time point that the speaker is talking. In order to build an auditory model that can discriminate who is speaking we first model the density of input features pi for the ith speaker based on the training data FAi. In order to determine the probability of a speaker generating new input audio features, TA, we apply Bayes’ rule p(Si = 1|TA) ∝p(TA|Si = 1)p(Si = 1). Where Si indicates whether or not the ith speaker is currently speaking. The probability distributions of the audio features given whether or not a given speaker is talking are modeled using 4-state hidden Markov models with each state having an independent 4 component Gaussian Mixture model. The transition matrix is unconstrained (i.e. any state may transition to any other). The parameters of the voice model were learned using the Expectation Maximization Algorithm [6]. 2.3.3 Threshold Selection The outputs of the visual detector over time provide an estimate of whether or not a candidate speaker is talking. In this work we convert these outputs into a binary temporal segmentation of when a candidate speaker was or was not talking. In practice we found that the outputs of the CERT system had different baselines for each subject, and thus it was necessary to develop a method for automatically finding person dependent thresholds of the visual detector output in order to accurately segment the areas of where each speaker was or was not talking. Our threshold selection mechanism uses a training portion of audio-visual input as a method of tuning the threshold to each candidate speaker. In order to select an appropriate threshold we trained a number of audio models each trained using a different threshold for the visual speech detector output. Each of these thresholds induces a binary segmentation which in turn is fed to the voice model learning component described in Section 2.3. Next, we evaluate each voice model on a set of testing samples (e.g. those collected after a sufficient amount of time audio-visual input has been collected for a particular candidate speaker). The acoustic model that achieved the highest generalization performance (with respect to the thresholded visual detector’s output on the testing portion) was then selected for fusion with the visual-only model. The reason for this choice is that models trained with less-noisy labels are likely to yield better generalization performance and thus the boundary used to create those labels was 5 Time Visual Detector Output Candidate Thresholds Training Portion Time Auditory Model 1 Output Testing Portion Time Auditory Model 2 Output Testing Portion Not Talking Talking Not Talking Talking Segmentation Based on Thresholded Visual Detector Output Segmentation Based on Thresholded Visual Detector Output 10 20 30 40 50 60 70 80 90 2 4 6 8 10 12 Training Portion Time MFCCs Training Segmentation 1 Training Segmentation 2 Audio Model 1 Audio Model 2 Threshold Selection Mechanism Testing Portion Fused Output Visual Detector Output Testing Portion Candidate Thresholds Fusion Model Training Phase Testing Phase Figure 4: A schematic of our threshold selection system. In the training stage several models are trained with different temporal segmentations over who is speaking. In the testing stage each of these discrete models is evaluated (in the figure there are only two but in practice we use more) to see how well it generalizes on the testing set (where ground truth is defined based on the visual detector’s thresholded output). Finally, the detector that generalizes the best is fused with the visual detector to give the final output of our system. most likely at the boundary between the two classes. See Figure 4 for a graphical depiction of this approach. Note that at no point in this approach is it necessary to have ground truth values for when a particular person was speaking. All assessments of generalization performance are with respect to the outputs of the visual classifier and not the true speaking vs. not speaking label. 2.4 Fusion There are many approaches [15] to fusing the visual and auditory model outputs to estimate the likelihood that someone is or is not talking. In the current work we employ a very simple fusion scheme that likely could be improved upon in the future. In order to compute the fused output we simply add the whitened outputs of the visual and auditory detectors’ outputs. 6 2.5 Related Work Most past approaches for detecting whether someone is talking have either been purely visual [18] (i.e. using a classifier trained on visual features from a training database) or based on audio-visual synchrony [21, 8, 12]. The system most similar to that proposed in this document is due to Noulas and Krose [16]. In their work a switching model is proposed that modifies the audio-visual probability emission distributions based on who is likely speaking. Three principal differences with our work are: Noulas and Krose use a synchrony-based method for initializing the learning of both the voice and visual model (in contrast to our system that uses a robust visual detector for initializing), Noulas and Krose use static visual descriptors (in contrast to our system that uses Gabor energy filters which capture facial expression dynamics), and finally we provide a method for automatic threshold selection to adjust the initial detector’s output to the characteristics of the current speaker. 3 Results We compared the performance of two multi-modal methods for speech detection. The first method used low-level audio-visual synchrony detection to estimate the probability of whether or not someone is speaking at each point in time (see Section 2.1). The second approach is the approach proposed in this document: start with a visual-only speech detector, then incorporate acoustic information by training speaker-dependent voice models, and finally fuse the audio and visual models’ outputs. The database we use for training and evaluation is the D006 (aka RUFACS) database [1]. The portion of the database we worked with contains 33 interviews (each approximately 3 minutes in length) between college students and an interrogator who is not visible in the video. The database contains a wide-variety of vocal and facial expression behavior as the responses of the interviewees are not scripted but rather spontaneous. As a consequence this database provides a much more realistic testbed for speech detection algorithms then the highly scripted databases (e.g. the CUAVE database [17]) used to evaluate other approaches. Since we cannot extract visual information of the person behind the camera we define the task of interest to be a binary classification of whether or not the person being interviewed is talking at each point in time. It is reasonable to conclude that our performance would only be improved on the task of speaker detection in two speaker environments if we could see both speakers’ faces. The generalization to more than two speakers is untested in this document. We leave the determination of the scalability of our approach to more than two speakers as future work. In order to test the effect of the voice model bootstrapping we use the first half of each interview as a training portion (that is the portion on which the voice model is learned) and the second half as the testing portion. The specific choice of a 50/50 split between training and test is somewhat arbitrary, however, it is a reasonable compromise between spending too long learning the voice model and not having sufficient audio input to fit the voice model. It is important to note that no ground truth was used from the first 50% of each interview as the labeling was the result of the person independent visual speech detector. In total we have 6 interviews that are suitable for evaluation purposes (i.e. we have audio and video information and codes as to when the person in front of the camera is talking). However, we have 27 additional interviews where only video was available. The frames from these videos were used to train the visual-only speech detector. For both our method and the synchrony method the audio modality was summarized by the first 13 (0th through 12th) MFCCs. To evaluate the synchrony-based model we perform the following steps. First we apply CCA between MFCCs and CERT outputs (plus the temporal derivatives and absolute value of the temporal derivatives) over the database of six interviews. Next we look for regions in the interview where the projection of the audio and video onto the vectors found by CCA yield high correlation. To compute this correlation we summarized the correlation at each point in time by computing the correlation over a 5 second window centered at that point. This evaluation method is called “Windowed Correlation” in the results table for the synchrony detection (see Table 2). We tried several different window lengths and found that the performance was best with 5 seconds. 7 Subject Visual Only Audio Only Fused Visual No Dynamics 16 0.9891 0.9796 0.9929 0.7894 17 0.9444 0.9560 0.9776 0.8166 49 0.9860 0.9858 0.9956 0.8370 56 0.9598 0.8924 0.9593 0.8795 71 0.9800 0.9321 0.9780 0.9375 94 0.9125 0.8924 0.9364 0.7506 mean 0.9620 0.9397 0.9733 0.8351 Table 1: Results of our bootstrapping model for detecting speech. Each row indicates the performance (as measured by area under the ROC) of the a particular detector on the second half of a video of a particular subject. Subject Windowed Correlation 16 .5925 17 .7937 49 .6067 56 .7290 71 .8078 94 .6327 mean .6937 Table 2: The performance of the synchrony detection model. Each row indicates the performance of the a particular detector on the second half of a video of a particular subject. Table 2 and Table 1 summarize the performance of the synchrony detection approach and our approach respectively. Our approach achieves an average area under the ROC of .9733 compared to .6937 for the synchrony approach. Moreover, our approach is able to do considerably better using only vision on the area under the ROC metric (.9620), than the synchrony detection approach that has access to both audio and video. The Gabor temporal filter bank helped to signficantly improve performace, raising it from .8351 to .962 (see Table 1). It is also encouraging that our method was able to learn an accurate audio-only model of the interviewee (average area under the ROC of .9397). This validates that our method is of use in situations where we cannot expect to always have visual input on each of the candidate speakers’ faces. Our approach also benefitted from fusing the learned audio-based speaker models. This can be seen by the fact that 2-AFC error (1 - area under the ROC gives the 2-AFC error) for the fused model decreased by an average (geometric mean over each of the six interviews) of 57% over the vision only model. 4 Discussion and Future Work We described a new method for multi-modal detection of when a candidate person is speaking. Our approach used the output of a person independent-vision based speech detector to train a persondependent voice model. To this end we described a novel approach for threshold selection for training the voice model based on the outputs of the visual detector. We showed that our method greatly improved performance with respect to previous approaches to the speech detection problem. We also briefly discussed how the work proposed here can be seen in a similar light as the more conventional synchrony detection methods of the past. This view combined with the large gain in performance for the method presented here demonstrates that synchrony over long time scales and high-level features (e.g. talking / not talking) works significantly better than over short time scales and low-level features (e.g. pixel intensities). In the future, we would like to extend our approach to learn fully online by incorporating approximations to the EM algorithm that are able to run in real-time [4] as well as performing threshold selection on the fly. Another challenge is incorporating confidences from the visual detector output in the learning of the voice model. 8 References [1] M. S. Bartlett, G. Littlewort, C. Lainscsek, I. Fasel, and J. Movellan. Recognition of facial actions in spontaneous expressions,. Journal of Multimedia, 2006. 7 [2] M. S. Bartlett, G. C. Littlewort, M. G. Frank, C. Lainscsek, I. R. Fasel, and J. R. Movellan. Automatic recognition of facial actions in spontaneous expressions. Journal of Multimedia, 1(6):22, 2006. 3 [3] J. Bridle and M. Brown. An experimental automatic word recognition system. JSRU Report, 1003, 1974. 5 [4] A. Declercq and J. Piater. Online learning of gaussian mixture models-a two-level approach. In Intl. l Conf. Comp. Vis., Imaging and Comp. Graph. Theory and Applications, pages 605–611, 2008. 8 [5] A. DeMaris. A tutorial in logistic regression. Journal of Marriage and the Family, pages 956–968, 1995. 3 [6] 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, 39(Series B):1–38, 1977. 5 [7] P. Ekman, W. Friesen, and J. Hager. Facial Action Coding System (FACS): Manual and Investigator’s Guide. A Human Face, Salt Lake City, UT, 2002. 2 [8] J. Fisher and T. Darrell. Speaker association with signal-level audiovisual fusion. IEEE Transactions on Multimedia, 6(3):406–413, 2004. 1, 7 [9] D. Hardoon, S. Szedmak, and J. Shawe-Taylor. Canonical correlation analysis: an overview with application to learning methods. Neural Computation, 16(12):2639–2664, 2004. 2 [10] J. Hershey and J. Movellan. Audio-vision: Using audio-visual synchrony to locate sounds. Advances in Neural Information Processing Systems, 12:813–819, 2000. 1, 2 [11] D. Hosmer and S. Lemeshow. Applied logistic regression. Wiley-Interscience, 2000. 3 [12] E. Kidron, Y. Schechner, and M. Elad. Pixels that sound. In IEEE COMPUTER SOCIETY CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION, volume 1, page 88. Citeseer, 2005. 1, 2, 7 [13] G. Littlewort, M. Bartlett, and K. Lee. Faces of pain: automated measurement of spontaneousallfacial expressions of genuine and posed pain. In Proceedings of the 9th international conference on Multimodal interfaces, pages 15–21. ACM, 2007. 3 [14] B. Logan. Mel frequency cepstral coefficients for music modeling. In International Symposium on Music Information Retrieval, volume 28, 2000. 5 [15] J. Movellan and P. Mineiro. Robust sensor fusion: Analysis and application to audio visual speech recognition. Machine Learning, 32(2):85–100, 1998. 6 [16] A. Noulas and B. Krose. On-line multi-modal speaker diarization. In Proceedings of the 9th international conference on Multimodal interfaces, pages 350–357. ACM, 2007. 1, 7 [17] E. Patterson, S. Gurbuz, Z. Tufekci, and J. Gowdy. CUAVE: A new audio-visual database for multimodal human-computer interface research. In IEEE INTERNATIONAL CONFERENCE ON ACOUSTICS SPEECH AND SIGNAL PROCESSING, volume 2. Citeseer, 2002. 7 [18] J. Rehg, K. Murphy, and P. Fieguth. Vision-based speaker detection using bayesian networks. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2, pages 110–116, 1999. 7 [19] D. Reynolds. Experimental evaluation of features for robust speaker identification. IEEE Transactions on Speech and Audio Processing, 2(4):639–643, 1994. 5 [20] D. Reynolds, T. Quatieri, and R. Dunn. Speaker verification using adapted Gaussian mixture models. Digital signal processing, 10(1-3):19–41, 2000. 3 [21] M. Slaney and M. Covell. Facesync: A linear operator for measuring synchronization of video facial images and audio tracks. Advances in Neural Information Processing Systems, pages 814–820, 2001. 1, 2, 7 [22] E. Vural, M. Cetin, A. Ercil, G. Littlewort, M. Bartlett, and J. Movellan. Drowsy driver detection through facial movement analysis. Lecture Notes in Computer Science, 4796:6–18, 2007. 3 [23] J. Whitehill, M. Bartlett, and J. Movellan. Automatic facial expression recognition for intelligent tutoring systems. Computer Vision and Pattern Recognition, 2008. 3 [24] J. Whitehill, M. S. Bartlett, and J. R. Movellan. Measuring the difficulty of a lecture using automatic facial expression recognition. In Intelligent Tutoring Systems, 2008. 3 9
2010
127
3,885
A Rational Decision-Making Framework for Inhibitory Control Pradeep Shenoy Department of Cognitive Science University of California, San Diego pshenoy@ucsd.edu Rajesh P. N. Rao Department of Computer Science University of Washington rao@cs.washington.edu Angela J. Yu Department of Cognitive Science University of California, San Diego ajyu@ucsd.edu Abstract Intelligent agents are often faced with the need to choose actions with uncertain consequences, and to modify those actions according to ongoing sensory processing and changing task demands. The requisite ability to dynamically modify or cancel planned actions is known as inhibitory control in psychology. We formalize inhibitory control as a rational decision-making problem, and apply to it to the classical stop-signal task. Using Bayesian inference and stochastic control tools, we show that the optimal policy systematically depends on various parameters of the problem, such as the relative costs of different action choices, the noise level of sensory inputs, and the dynamics of changing environmental demands. Our normative model accounts for a range of behavioral data in humans and animals in the stop-signal task, suggesting that the brain implements statistically optimal, dynamically adaptive, and reward-sensitive decision-making in the context of inhibitory control problems. 1 Introduction In natural behavior as well as in engineering applications, there is often the need to choose, under time pressure, an action among multiple options with imprecisely known consequences. For example, consider the decision of buying a house. A wise buyer should collect sufficient data to make an informed decision, but waiting too long might mean missing out on a dream home. Thus, balanced against the informational gain afforded by lengthier deliberation is the opportunity cost of inaction. Further complicating matters is the possible occurrence of a rare and unpredictably timed adverse event, such as job loss or serious illness, that would require a dynamic reformulation of one’s plan of action. This ability to dynamically modify or cancel a planned action that is no longer advantageous or appropriate is known as inhibitory control in psychology. In psychology and neuroscience, inhibitory control has been studied extensively using the stopsignal (or countermanding) task [17]. In this task, subjects perform a simple two-alternative forced choice (2AFC) discrimination task on a go stimulus, whereby one of two responses is required depending on the stimulus. On a small fraction of trials, an additional stop signal appears after some delay, which instructs the subject to withhold the discrimination or go response. As might be expected, the later the stop signal appears, the harder it is for subjects to stop the response [9] (see Figure 3). The classical model of the stop-signal task is the race model [11], which posits a race to threshold between independent go and stop processes. It also hypothesizes a stopping latency, the stop-signal reaction time (SSRT), which is the delay between stop signal onset and successful withholding of a go response. The (unobservable) SSRT is estimated as shown in Figure 1A, and is 1 thought to be longer in patient populations associated with inhibitory deficit than in healthy controls (attention-deficit hyperactivity disorder [1], obsessive-compulsive disorder [12], and substance dependence [13]). Some evidence suggests a neural correlate of the SSRT [8, 14, 5]. Although the race model is elegant in its simplicity and captures key experimental data, it is descriptive in nature and does not address how the stopping latency and other elements of the model depend on various underlying cognitive factors. Consequently, it cannot explain why behavior and stopping latency varies systematically across different experimental conditions or across different subject populations. We present a normative, optimal decision-making framework for inhibitory control. We formalize interactions among various cognitive components: the continual monitoring of noisy sensory information, the integration of sensory inputs with top-down expectations, and the assessment of the relative values of potential actions. Our model has two principal components: (1) a monitoring process, based on Bayesian statistical inference, that infers the go stimulus identity within each trial, as well as task parameters across trials, (2) a decision process, formalized in terms of stochastic control, that translates current belief state based on sensory inputs into a moment-by-moment valuation of whether to choose one of the two go responses, or to wait longer. Given a certain belief state, the relative values of the various actions depend both on experimental parameters, such as the fraction of stop trials and the difficulty of go stimulus discrimination, as well as subject-specific parameters, such as learning rate and subjective valuation of rewards and costs. Within our normative model of inhibitory control, stopping latency is an emergent property, arising from interactions between the monitoring and decision processes. We show that our model captures classical behavioral data in the task, makes quantitative behavioral predictions under different experimental manipulations, and suggests that the brain may be implementing near-optimal decision-making in the stop-signal task. 2 Sensory processing as Bayes-optimal statistical inference We model sensory processing in the stop-signal task as Bayesian statistical inference. In the generative model (see Figure 1B for graphical model), there are two independent hidden variables, corresponding to the identity of the go stimulus, d ∈{0, 1}, and whether or not the current trial is a stop trial, s ∈{0, 1}. Priors over d and s reflect experimental parameters: e.g. P(d = 1) = .5, P(s = 1) =.25 in typical stop signal experiments. Conditioned on d, a stream of iid inputs are generated on each trial, x1, . . . , xt, . . ., where t indexes small increments of time within a trial, p(xt|d = 0) = f0(xt), and p(xt|d = 1) = f1(xt). For simplicity, we assume f0 and f1 to be Bernoulli distributions with distinct rate parameters qd and 1−qd, respectively. The dynamic variable zt denotes the presence/absence of the stop signal: if the stop signal appears at time θ then z1 = . . . = zθ−1 = 0 and zθ = zθ+1 = . . . = 1. On a go trial, s = 0, the stop-signal of course never appears, P(θ = ∞) = 1. On a stop trial, s = 1, we assume for simplicity that the onset of the stop signal follows a constant hazard rate, i.e. θ is generated from an exponential distribution: p(θ|s = 1) = λe−λθ. Conditioned on zt, there is a separate iid stream of observations associated with the stop signal: p(yt|zt = 0) = g0(yt), and p(yt|zt = 1) = g1(yt). Again, we assume for simplicity that g0 and g1 are Bernoulli distributions with distinct rate parameters qs and 1 −qs, respectively. In the recognition model, the posterior probability associated with signal identity pt d ≜P(d=1|xt), where xt ≜{x1, . . . , xt} denotes all the data observed so far, can be computed via Bayes’ Rule: pt d = pt−1 d f1(xt) pt−1 d f1(xt) + (1 −pt−1 d )f0(xt) = p0 dΠt i=1f1(xi) p0 dΠt i=1f1(xi) + (1 −p0 d)Πt i=1f0(xi) Inference about the stop signal is slightly more complicated due to the dynamics in zt. First, we define pt z as the posterior probability that the stop signal has already appeared pt z ≜P{θ ≤t|yt}, where yt ≜{y1, . . . , yt}. It can also be computed iteratively: pt z = g1(yt)(pt−1 z + (1 −pt−1 z )h(t)) g1(yt)(pt−1 z + (1 −pt−1 z )h(t)) + g0(yt)(1 −pt−1 z )(1 −h(t)) where h(t) is the posterior probability that the stop-signal will appear in the next instant given it has not appeared already, h(t)≜P(θ=t|θ > t−1, yt−1). h(t) = r · P(θ = t|s = 1) r · P(θ > t −1|s = 1) + (1 −r) = rλe−λt re−λ(t−1) + (1 −r) 2 Figure 1: Modeling inhibitory control in the stop-signal task. (A) shows the race model for behavior in the stop-signal task [11]. Go and stop stimuli, separated by a stop signal delay (SSD), initiate two independent processes that race to thresholds and determine trial outcome. On go trials, noise in the go process results in a broad distribution over threshold-crossing times, i.e., the go reaction time (RT) distribution. The stop process is typically modeled as deterministic, with an associated stop signal reaction time or SSRT. The SSRT determines the fraction of go responses successfully stopped: the go RT cumulative density function evaluated at SSD+SSRT should give the stopping error rate at that SSD. Based on these assumptions, the SSRT is estimated from data given the go RT distribution, and error rate as a function of SSD. (B) Graphical model for sensory input generation in our Bayesian model. Two separate streams of observations, {x1, . . . , xt, . . .} and {y1, . . . , yt, . . .}, are associated with the go and stop stimuli, respectively. xt depend on the identity of the target, d ∈{0, 1}. yt depends on whether the current trial is a stop trial, s = {0, 1}, and whether the stop-signal has already appeared by time t, zt ∈{0, 1}. where r = P(s = 1) is the prior probability of a stop trial. Note that h(t) does not depend on the observations, since given that the stop signal has not yet appeared, whether it will appear in the next instant does not depend on previous observations. In the stop-signal task, a stop trial is considered a stop trial even if the subject makes the go response early, before the stop signal is presented. Following this convention, we need to compute the posterior probability that the current trial is a stop trial, denoted pt s, which depends both on the current belief about the presence of the stop signal, and the expectation that it will appear in the future: pt s ≜P(s = 1|yt) = pt z · 1 + (1 −pt z) · P(s = 1|θ > t, yt) where P(s=1|θ>t, yt) = P(s=1|θ>t) again does not depend on past observations: P(s=1|θ>t)= P(θ>t|s=1)P(s=1) P(θ>t|s=1)P(s=1) + P(θ>t|s=0)P(s=0) = e−λt · r e−λt · r + 1 · (1 −r) Finally, we define the belief state at time t to be the vector bt =(pt d, pt s). Figure 2A shows the evolution of belief states for various trial types: (1) go trials, where no stop signal appears, (2) stop error (SE) trials, where a stop signal is presented but a response is made, and (3) stop success (SS) trials, where the stop signal is successfully processed to cancel the response. For simplicity, only trials where d = 1 are shown, and θs on stop trials is 17 steps. Due to stochasticity in the sensory information, the go stimulus is processed slower and the stop signal is detected faster than average on some trials; these lead to successful stopping, with SE trials showing the opposite trend. On all trials, ps shows an initial increase due to anticipation of the stop signal. Parameters used for the simulation were chosen to approximate typical experimental conditions (see e.g., Figure 3), and kept constant throughtout except where explicitly noted. The results do not change qualitatively when these settings are varied (data not shown). 3 Decision making as optimal stochastic control In order to understand behavior as optimal decision-making, we need to specify a loss function that captures the reward structure of the task. We assume there is a deadline D for responding on go trials, and an opportunity cost of c per unit time on each trial. In addition, there is a penalty cs for choosing to respond on a stop-signal trial, and a unit cost for making an error on a go trial (by 3 choosing the wrong discrimination response or exceeding the deadline for responding). Because only the relative costs matter in the optimization, we can normalize the coefficients associated with all the costs such that one of them is unit cost. Let τ denote the trial termination time, so that τ =D if no response is made before the deadline, and τ <D if a response is made. On each trial, the policy π produces a stopping time τ and a possible binary response δ∈{0, 1}. The loss function is: l(τ, δ; d, s, θ, D) = cτ + cs1{τ<D,s=1} + 1{τ<D,δ̸=d,s=0} + 1{τ=D,s=0} where 1{·} is the indicator function. The optimal decision policy minimizes the average or expected loss, Lπ ≜⟨l(τ, δ; d, s, D)⟩, Lπ = c⟨τ⟩+ csrP(τ <D|s=1) + (1−r)P(τ <D, δ̸=d|s=0) + (1−r)P(τ =D|s=0) . Minimizing Lπ over the policy space directly is computationally intractable, but the dynamic programming principle provides an iterative relationship, the optimality equation, in terms of the value function (defined in terms of costs here), V t(bt) V t(bt) = min a Z p(bt+1|bt; a)V t+1(bt+1)dbt+1  , where a ranges over all possible actions. In our model, the action space consists of {go, wait}, with the corresponding expected costs (also known as Q-factors), Qt g(bt) and Qt w(bt), respectively. Qt g(bt) = ct + cspt s + (1 −pt s)min(pt d, 1 −pt d) Qt w(bt) = 1{D>t+1}⟨V t+1(bt+1)|bt⟩bt+1 + 1{D=t+1}(c(t + 1) + 1 −pt s) V t(bt) = min(Qt g, Qt w) The value function is the smaller of the Q-factors Qt g and Qt w, and the optimal decision policy chooses the action corresponding to the smallest Q-factor. Note that the go action results in either δ =1 or δ =0, depending on whether pτ d is greater or smaller than .5, respectively. The dependence of Qt w on V t+1 allows us to recursively compute the value function backwards in time. Given V t+1, we can compute ⟨V t+1⟩by summing over the uncertainty about the next observations xt+1, yt+1, since the belief state bt+1 is a deterministic function of bt and the observations. ⟨V t+1(bt+1)|bt⟩bt = X xt+1,yt+1 p(xt+1, yt+1|bt)V t+1(bt+1(bt, xt+1, yt+1)) p(xt+1, yt+1|bt) = p(xt+1|pt d)p(yt+1|pt s) p(xt+1|pt d) = pt df1(xt+1) + (1 −pt d)f0(xt+1) p(yt+1|pt s) = (pt z + (1 −pt z)h(t + 1))g1(yt+1) + (1 −pt z)(1 −h(t + 1))g0(yt+1) The initial condition of the value function can be computed exactly at the deadline since there is only one outcome (subject is no longer allowed to go or stop): V D(bD) = cD + (1 −pD s ). We can then compute {V t}D t=1 and the corresponding optimal decision policy backwards in time from t=D−1 to t = 1. In our simulations, we do so numerically by discretizing the probability space for pt s into 1000 bins; pt d is represented exactly using its sufficient statistics. Note that dynamic programming is merely a convenient tool for computing the exact optimal policy. Our results show that humans and animals behave in a manner consistent with the optimal policy, indicating that the brain must use computations that are similar in nature. The important question of how such a policy may be computed or approximated neurally will be explored in future work. Figure 2B demonstrates graphically how the Q-factors Qg, Qw evolve over time for the trial types indicated in Figure 2A. Reflecting the sensory processing differences, SS trials show a slower drop in the cost of going, and a faster increase after the stop signal is processed; this is the converse of stop error trials. Note that although the average trajectory Qg does not dip below Qw in the non-canceled (error) stop trials, there is substantial variability in the individual trajectories under a Bernoulli observation model, and each one of them dips below Qw at some point. The histograms show reaction time distributions for go and SE trials. 4 Results 4.1 Model captures classical behavioral data in the stop-signal task We first show that our model captures the basic behavioral results characteristic of the stop-signal task. Figure 3 compares our model predictions to data from Macaque monkeys performing a version 4 Figure 2: Mean trajectories of posteriors and Q-factors. (A) Evolution of the average belief states pd and ps corresponding to go and stop signals, for various trials–GO: go trials, SS: stop trials with successfully canceled response, SE: stop error trials. Stochasticity results in faster or slower processing of the two sensory input streams; these lead to stop success or error. For simplicity, d = 1 for all trials in the figure. The stop signal is presented at θs = 17 time steps (dashed vertical line); the initial rise in ps corresponds to anticipation of a potential stop signal. (B) Go and Wait costs for the same partitioning of trials, along with the reaction time distributions for go and SE trials. On SE trials, the cost of going drops faster, and crosses below the cost of waiting before the stop signal can be adequately processed. Although the average go cost does not drop below the average wait cost, each individual trajectory crosses over at various time points, as indicated by the RT histograms. Simulation parameters: qd = 0.68, qs = 0.72, λ = 0.1, r = 0.25, D = 50 steps, cs = 50 ∗c, where c = 0.005 per time step. c is approximately the rate at which monkeys earn rewards in the task, which is equivalent to assuming that the cost of time (opportunity cost) should be set by the reward rate. Unless otherwise stated, these parameters are used in all the subsequent simulations. Thickness of lines indicates standard errors of the mean. Figure 3: Optimal decision-making model captures classical behavioral effects in the stop-signal task. (A) Inhibition function: errors on stop trials increase as a function of SSD. (B) Effect reproduced by our model. (C) Discrimination RT is faster on non-canceled stop trials than go trials. (D) Effect reproduced by our model. (A,C) Data of two monkeys performing the stopping task (from [9]). of the stop-signal task [9]. One of the basic measures of performance is the inhibition function, which is the average error rate on stop trials as a function of SSD. Error increases as SSD increases, as shown in the monkeys’ behavior and also in our model (Figure 3A;B). Another classical result in the stop-signal task is that RT’s on non-canceled (error) stop trials are on average faster than those on go trials (Figure 3C). Our model also reproduces this result (Figure 3D). Intuitively, this is because inference about the go stimulus identity can proceed slowly or rapidly on different trials, due to noise in the observation process. Non-canceled trials are those in which pd happens to evolve rapidly enough for a go response to be initiated before the stop signal is adequately processed. Go trial RT’s, on the other hand, include all trajectories, whether pd happens to evolve quickly or not (see Figure 2). 5 4.2 Effect of stop trial frequency on behavior The overall frequency of stop signal trials has systematic effects on stopping behavior [6]. As the fraction of stop trials is increased, go responses slow down and stop errors decrease in a graded fashion (Figure 4A;B). In our model (Figure 4C;D), the stop signal frequency, r, influences the speed with which a stop signal is detected, whereby larger r leads to greater posterior belief that a stop signal is present, and also greater confidence that a stop signal will appear soon even it has not already. It therefore controls the tradeoff between going and stopping in the optimal policy. If stop signals are more prevalent, the optimal decision policy can use that information to make fewer errors on stop trials, by delaying the go response, and by detecting the stop signal faster. Even in experiments where the fraction of stop trials is held constant, chance runs of stop or go trials may result in fluctuating local frequency of stop trials, which in turn may lead to trial-by-trial behavioral adjustments due to subjects’ fluctuating estimate of r. Indeed, subjects speed up after a chance run of go trials, and slow down following a sequence of stop trials [6] (see Figure 4E). We model these effects by assuming that subjects believe that the stop signal frequency rk on trial k has probability α of being the same as rk−1 and probability 1 −α of being re-sampled from a prior distribution p0(r), chosen in our simulations to be a beta distribution with a bias toward small r (infrequent stop trials). Previous work has shown that this is essentially equivalent to using a causal, exponential window to estimate the current rate of stop trials [20], where the exponential decay constant is monotonically related to the assumed volatility in the environment in the Bayesian model. The probability of trial k being a stop trial, P(sk =1|sk−1), where sk ≜{s1, . . . , sk}, is P(sk = 1|sk−1) = Z P(sk = 1|rk)p(rk|sk−1)drk = Z rkp(rk|sk−1)drk = ⟨rk|sk−1⟩. In other words, the predictive probability of seeing a stop trial is just the mean of the predictive distribution p(rk|sk−1). We denote this mean as ˆrk. The predictive distribution is a mixture of the previous posterior distribution and a fixed prior distribution, with α and 1−α acting as the mixing coefficients, respectively: p(rk|sk−1) = αp(rk−1|sk−1) + (1 −α)p0(rk) and the posterior distribution is updated according to Bayes’ Rule: p(rk|sk) ∝P(sk|rk)p(rk|sk−1) . As shown in Figure 4F, our model successfully explains observed sequential effects in behavioral data. Since the majority of trials (75%) are go trials, a chance run of go trials impacts RT much less than a chance run of stop trials. The figure also shows results for different values of α, with all other parameters kept constant. These values encode different expectations about volatility in the stop trial frequency, and produce slightly different predictions about sequential effects. Thus, α may be an important source of individual variability observed in the data, along with the other model parameters. Recent data shows that neural activity in the supplementary eye field is predictive of trial-by-trial slowing as a function of the recent stop trial frequency [15]. Moreover, microstimulation of supplementary eye field neurons results in slower responses to the go stimulus and fewer stop errors [16]. Together, this suggests that supplementary eye field may encode the local frequency of stop trials, and influence stopping behavior in a statistically appropriate manner. 4.3 Influence of reward structure on behavior The previous section demonstrated how adjustments to behavior in the face of experimental manipulations can be seen as instances of optimal decision-making in the stop signal task. An important component of the race model for stopping behavior [11] is the SSRT, which is thought to be a stable, subject-specific index of stopping ability. In this section, we demonstrate that the SSRT can be seen as an emergent property of optimal decision-making, and is consequently modified in predictable ways by experimental manipulation. Leotti & Wager showed that subjects can be biased toward stopping or going when the relative penalties associated with go and stop errors are experimentally manipulated [10]. Figure 5A;B show that as subjects are biased toward stopping, they make fewer stop trial errors and have slower 6 Figure 4: Effect of global and local frequency of stop trials on behavior. We compare model predictions with experimental data from a monkey performing the stop-signal task (adapted from Emeric et al., 2007). (A) Go reaction times shift to the right (slower), as the fraction of stop trials is increased. (B) Inhibitory function (stop error rate as a function of SSD) shifts to the right (fewer errors), as the fraction of stop trials is increased. Data adapted from [6]. (C;D) Our model predicts similar effects. (E) Sequential effects in reaction times from 6 subjects showing faster go RTs following longer sequences of go trials (columns 1-3), and slower RTs following longer sequences of stop trials (columns 4-6, data adapted from [6]). (F) Our model reproduces these changes; the parameter α controls the responsiveness to trial history, and may explain inter-subject differences. Values of alpha: low=0.85, med=0.95, high=0.98. go responses. Our model reproduces this behavior when cs, the parameter representing the cost of stopping, is set to small, medium and high values. Increasing the cost of a stop error induces an increase in reaction time and an associated decrease in the fraction of stop errors. This is a direct consequence of the optimal model attempting to minimize the total expected cost – with stop errors being more expensive, there is an incentive to slow down the go response in order to minimize the possibility of missing a stop signal. Critically, the SSRT in the human data decreases with increasing bias toward stopping (Figure 5C). Although the SSRT is not an explicit component of our model, we can nevertheless estimate it from the reaction times and fraction of stop errors produced by our model simulations, following the race model’s prescribed procedure [11]. Essentially, the SSRT is estimated as the difference between mean go RT and the SSD at which 50% stop errors are committed (see Figure 1). By reconciling the competing demands of stopping and going in an optimal manner, the estimated SSRT from our simulations is automatically adjusted to mimic the observed human behavior (Figure 5F). This suggests that the SSRT emerges naturally out of rational decision-making in the task. 5 Discussion We presented an optimal decision-making model for inhibitory control in the stop-signal task. The parameters of the model are either set directly by experimental design (cost function, stop frequency and timing), or correspond to subject-specific abilities that can be estimated from behavior (sensory processing); thus, there are no “free” parameters. The model successfully captures classical behavioral results, such as the increase in error rate on stop trials with the increase of SSD, as well as the decreases in average response time from go trials to error stop trials. The model also captures more subtle changes in stopping behavior, when the fraction of stop-signal trials, the penalties for various types of errors, and the history of experienced trials are manipulated. The classical model for the task 7 Figure 5: Effect of reward on stopping. (A-C) Data from human subjects performing a variant of the stop-signal task where the ratio of rewards for quick go responses and successful stopping was varied, inducing a bias towards going or stopping (Data from [10]). An increased bias towards stopping (i.e., fewer stop errors, (A)) is associated with an increase in the average reaction time on go trials (B), and a decrease in the stopping latency or SSRT (C). (D-F) Our model captures this change in SSRT as a function of the inherent tradeoff between RT and stop errors. Values of cs: low=0.15, med=0.25, high=0.5. (the race model) does not directly explain or quantitatively predict these changes in behavior. Moreover, the stopping latency measure prescribed by the race model (the SSRT) changes systematically across various experimental manipulations, indicating that it cannot be used as a simplistic, global measure of inhibitory control for each subject. Instead, inhibitory control is a multifaceted function of factors such as subject-specific sensory processing rates, attentional factors, and internal/external bias towards stopping or going, which are explicitly related to parameters in our normative model. The close correspondence of model predictions with human and animal behavior suggests that the computations necessary for optimal behavior are exactly or approximately implemented by the brain. We used dynamic programming as a convenient tool to compute the optimal monitoring and decisional computations, but the brain is unlikely to use this computationally expensive method. Recent studies of the frontal eye fields (FEF, [8]) and superior colliculus [14] of monkeys show neural responses that diverge on go and correct stop trials, indicating that they may encode computations leading to the execution or cancellation of movement. It is possible that optimal behavior can be approximated by a diffusion process implementing the race model [4, 19], with the rate and threshold parameters adjusted according to task demands. In future work, we will study more explicitly how optimal decision-making can be approximated by a diffusion model implementation of the race model (see e.g., [18], and how the parameters of such an implementation may be set to reflect task demands. We will also assess alternatives to the race model, in the form of other approximate algorithms, in terms of their ability to capture behavioral data and explain neural data. One major aim of our work is to understand how stopping ability and SSRT arise from various cognitive factors, such as sensitivity to rewards, learning capacity related to estimating stop signal frequency, and the rate at which sensory inputs are processed. This composite view of stopping ability and SSRT may help explain group differences in stopping behavior, in particular, differences in SSRT observed in a number of psychiatric and neurological conditions, such as substance abuse [13], attention-deficit hyperactivity disorder [1], schizophrenia [3], obsessive-compulsive disorder [12], Parkinson’s disease [7], Alzheimer’s disease [2], et cetera. One of our goals for future research is to map group differences in stopping behavior to the parameters of our model, thus gaining insight into exactly which cognitive components go awry in each dysfunctional state. 8 References [1] R.M. Alderson, M.D. Rapport, and M.J. Kofler. Attention-deficit/hyperactivity disorder and behavioral inhibition: a meta-analytic review of the stop-signal paradigm. Journal of Abnormal Child Psychology, 35(5):745–758, 2007. [2] H Amieva, S Lafont, S Auriacombe, N Le Carret, J F Dartigues, J M Orgogozo, and C Fabrigoule. Inhibitory breakdown and dementia of the Alzheimer type: A general phenomenon? Journal of Clinical and Experimental Neuropsychology, 24(4):503–516, 2992. [3] J C Badcock, P T Michie, L Johnson, and J Combrinck. Acts of control in schizophrenia: Dissociating the components of inhibition. Psychological Medicine, 32(2):287–297, 2002. [4] L. Boucher, T.J. Palmeri, G.D. Logan, and J.D. Schall. Inhibitory control in mind and brain: an interactive race model of countermanding saccades. Psychological Review, 114(2):376–397, 2007. [5] CD Chambers, H Garavan, and MA Bellgrove. Insights into the neural basis of response inhibition from cognitive and clinical neuroscience. Neuroscience and Biobehavioral Reviews, 33(5):631–646, 2009. [6] E.E. Emeric, J.W. Brown, L. Boucher, R.H.S. Carpenter, D.P. Hanes, R. Harris, G.D. Logan, R.N. Mashru, M. Par´e, P. Pouget, V. Stuphorn, T.L. Taylor, and J Schall. Influence of history on saccade countermanding performance in humans and macaque monkeys. Vision research, 47(1):35–49, 2007. [7] S Gauggel, M Rieger, and T Feghoff. Inhibition of ongoing responses in patients with Pakingson’s disease. J. Neurol. Neurosurg. Psychiatry, (75):4, 539-544 2004. [8] D.P. Hanes, W.F. Patterson, and J.D. Schall. The role of frontal eye field in countermanding saccades: Visual, movement and fixation activity. Journal of Neurophysiology, 79:817–834, 1998. [9] DP Hanes and JD Schall. Countermanding saccades in macaque. Visual Neuroscience, 12(5):929, 1995. [10] L.A. Leotti and T.D. Wager. Motivational influences on response inhibition measures. J Exp Psychol Hum Percept Perform, 2009. [11] G.D. Logan and W.B. Cowan. On the ability to inhibit thought and action: A theory of an act of control. Psychological Review, 91(3):295–327, 1984. [12] L. Menzies, S. Achard, S.R. Chamberlain, N. Fineberg, C.H. Chen, N. del Campo, B.J. Sahakian, T.W. Robbins, and E. Bullmore. Neurocognitive endophenotypes of obsessivecompulsive disorder. Brain, 130(12):3223, 2007. [13] J.T. Nigg, M.M. Wong, M.M. Martel, J.M. Jester, L.I. Puttler, J.M. Glass, K.M. Adams, H.E. Fitzgerald, and R.A. Zucker. Poor response inhibition as a predictor of problem drinking and illicit drug use in adolescents at risk for alcoholism and other substance use disorders. Journal of Amer Academy of Child & Adolescent Psychiatry, 45(4):468, 2006. [14] M. Pare and D.P. Hanes. Controlled movement processing: superior colliculus activity associated with countermanded saccades. Journal of Neuroscience, 23(16):6480–6489, 2003. [15] V. Stuphorn, J.W. Brown, and J.D. Schall. Role of Supplementary Eye Field in Saccade Initiation: Executive, Not Direct, Control. Journal of Neurophysiology, 103(2):801, 2010. [16] V. Stuphorn and J.D. Schall. Executive control of countermanding saccades by the supplementary eye field. Nature neuroscience, 9(7):925–931, 2006. [17] F. Verbruggen and G.D. Logan. Models of response inhibition in the stop-signal and stopchange paradigms. Neuroscience & Biobehavioral Reviews, 33(5):647–661, 2009. [18] F. Verbruggen and G.D. Logan. Proactive adjustments of response strategies in the stopsignal paradigm. Journal of Experimental Psychology: Human Perception and Performance, 35(3):835–854, 2009. [19] K.F. Wong-Lin, P. Eckhoff, P. Holmes, and J.D. Cohen. Optimal performance in a countermanding saccade task. Brain Research, 2009. [20] AJ Yu and JD Cohen. Sequential effects: Superstition or rational behavior? Advances in Neural Information Processing Systems, 21:1873–1880, 2009. 9
2010
128
3,886
Policy gradients in linearly-solvable MDPs Emanuel Todorov Applied Mathematics and Computer Science & Engineering University of Washington todorov@cs.washington.edu Abstract We present policy gradient results within the framework of linearly-solvable MDPs. For the first time, compatible function approximators and natural policy gradients are obtained by estimating the cost-to-go function, rather than the (much larger) state-action advantage function as is necessary in traditional MDPs. We also develop the first compatible function approximators and natural policy gradients for continuous-time stochastic systems. 1 Introduction Policy gradient methods [18] in Reinforcement Learning have gained popularity, due to the guaranteed improvement in control performance over iterations (which is often lacking in approximate policy or value iteration) as well as the discovery of more efficient gradient estimation methods. In particular it has been shown that one can replace the true advantage function with a compatible function approximator without affecting the gradient [8,14], and that a natural policy gradient (with respect to Fisher information) can be computed [2,5,11]. The goal of this paper is to apply policy gradient ideas to the linearly-solvable MDPs (or LMDPs) we have recently-developed [15, 16], as well as to a class of continuous stochastic systems with similar properties [4, 7, 16]. This framework has already produced a number of unique results – such as linear Bellman equations, general estimation-control dualities, compositionality of optimal control laws, path-integral methods for optimal control, etc. The present results with regard to policy gradients are also unique, as summarized in Abstract. While the contribution is mainly theoretical and scaling to large problems is left for future work, we provide simulations demonstrating rapid convergence. The paper is organized in two sections, treating discrete and continuous problems. 2 Discrete problems Since a number of papers on LMDPs have already been published, we will not repeat the general development and motivation here, but instead only summarize the background needed for the present paper. We will then develop the new results regarding policy gradients. 2.1 Background on LMDPs An LMDP is defined by a state cost () over a (discrete for now) state space X, and a transition probability density (0|) corresponding to the notion of passive dynamics. In this paper we focus on infinite-horizon average-cost problems where (0|) is assumed to be ergodic, i.e. it has a unique stationary density. The admissible "actions" are all transition probability densities (0|) which are ergodic and satisfy (0|) = 0 whenever (0|) = 0. The cost function is ((·|)) = () + KL ((·|) ||(·|)) (1) 1 Thus the controller is free to modify the default/passive dynamics in any way it wishes, but incurs a control cost related to the amount of modification. The average cost and differential cost-to-go () for given (0|) satisfy the Bellman equation + () = () + P 0(0|) µ log (0|) (0|) + (0) ¶ (2) where () is defined up to a constant. The optimal ∗and ∗() can be shown to satisfy ∗+ ∗() = () −log P 0(0|) exp (−∗(0)) (3) and the optimal ∗(0|) can be found in closed form given ∗(): ∗(0|) = (0|) exp (−∗(0)) P (|) exp (−∗()) (4) Exponentiating equation (3) makes it linear in exp (−∗()), although this will not be used here. 2.2 Policy gradient for a general parameterization Consider a parameterization (0|w) which is valid in the sense that it satisfies the above conditions and Ow, w exists for all w ∈R. Let (w) be the corresponding stationary density. We will also need the pair-wise density (0w) = (w) (0|w). To avoid notational clutter we will suppress the dependence on w in most of the paper; keep in mind that all quantities that depend on are functions of w. Our objective here is to compute Ow. This is done by differentiating the Bellman equation (2) and following the template from [14]. The result (see Supplement) is given by Theorem 1. The LMDP policy gradient for any valid parameterization is Ow= P () P 0Ow(0|) µ log (0|) (0|) + (0) ¶ (5) Let us now compare (5) to the policy gradient in traditional MDPs [14], which is Ow= P () P Ow(|) () (6) Here (|) is a stochastic policy over actions (parameterized by w) and () is the corresponding state-action cost-to-go. The general form of (5) and (6) is similar, however the term log ()+ in (5) cannot be interpreted as a -function. Indeed it is not clear what a -function means in the LMDP setting. On the other hand, while in traditional MDPs one has to estimate (or rather the advantage function) in order to compute the policy gradient, it will turn out that in LMDPs it is sufficient to estimate . 2.3 A suitable policy parameterization The relation (4) between the optimal policy ∗and the optimal cost-to-go ∗suggests parameterizing as a -weighted Gibbs distribution. Since linear function approximators have proven very successful, we will use an energy function (for the Gibbs distribution) which is linear in w : (0|w) , (0|) exp ¡ −wTf (0) ¢ P (|) exp (−wTf ()) (7) Here f () ∈Ris a vector of features. One can verify that (7) is a valid parameterization. We will also need the -expectation operator Π [] () , P (|) () (8) defined for both scalar and vector functions over X. The general result (5) is now specialized as Theorem 2. The LMDP policy gradient for parameterization (7) is Ow= P 0(0) (Π [f] () −f (0)) ¡ (0) −wTf (0) ¢ (9) As expected from (4), we see that the energy function wTf () and the cost-to-go () are related. Indeed if they are equal the gradient vanishes (the converse is not true). 2 2.4 Compatible cost-to-go function approximation One of the more remarkable aspects of policy gradient results [8, 14] in traditional MDPs is that, when the true function is replaced with a compatible approximation satisfying certain conditions, the gradient remains unchanged. Key to obtaining such results is making sure that the approximation error is orthogonal to the remaining terms in the expression for the policy gradient. Our goal in this section is to construct a compatible function approximator for LMDPs. The procedure is somewhat elaborate and unusual, so we provide the derivation before stating the result in Theorem 3 below. Given the form of (9), it makes sense to approximate () as a linear combination of the same features f () used to represent the energy function: b(r) , rTf (). Let us also define the approximation error r () , () −b(r). If the policy gradient Owis to remain unchanged when is replaced with bin (9), the following quantity must be zero: d (r) , P 0(0) (Π [f] () −f (0)) r (0) (10) Expanding (10) and using the stationarity of , we can simplify d as d (r) = P () (Π [f] () Π [r] () −f () r ()) (11) One can also incorporate an -dependent baseline in (9), such as () which is often used in traditional MDPs. However the baseline vanishes after the simplification, and the result is again (11). Now we encounter a complication. Suppose we were to fit bto in a least-squares sense, i.e. minimize the squared error weighted by . Denote the resulting weight vector r: r, arg min r P () ¡ () −rTf () ¢2 (12) This is arguably the best fit one can hope for. The error r is now orthogonal to the features f, thus for r = rthe second term in (11) vanishes, but the first term does not. Indeed we have verified numerically (on randomly-generated LMDPs) that d (r) 6= 0. If the best fit is not good enough, what are we to do? Recall that we do not actually need a good fit, but rather a vector r such that d (r) = 0. Since d (r) and r are linearly related and have the same dimensionality, we can directly solve this equation for r. Replacing r () with () −rTf () and using the fact that Π is a linear operator, we have d (r) = r −k where , P () ³ f () f ()T −Π [f] () Π [f] ()T´ (13) k , P () (f () () −Π [f] () Π [] ()) We are not done yet because k still depends on . The goal now is to approximate in such a way that k remains unchanged. To this end we use (2) and express Π [] in terms of : + () −() = Π [] () (14) Here () is shortcut notation for ((·|w)). Thus the vector k becomes k = P () (g () () + Π [f] () (() −)) (15) where the policy-specific auxiliary features g () are related to the original features f () as g () , f () −Π [f] () (16) The second term in (15) does not depend on ; it only depends on = P () (). The first term in (15) involves the projection of on the auxiliary features g. This projection can be computed by defining the auxiliary function approximator e(s) , sTg () and fitting it to in a least-squares sense, as in (12) but using g () rather than f (). The approximation error is now orthogonal to the auxiliary features g (), and so replacing () with e(s) in (15) does not affect k. Thus we have Theorem 3. The following procedure yields the exact LMDP policy gradient: 1. fit e(s) to () in a least squares sense, and also compute  2. compute from (13), and k from (15) by replacing () with e(s) 3. "fit" b(r) by solving r = k 4. the policy gradient is Ow= P 0(0) (f (0) −Π [f] ()) f (0)T (w −r) (17) 3 This is the first policy gradient result with compatible function approximation over the state space rather than the state-action space. The computations involve averaging over , which in practice will be done through sampling (see below). The requirement that −ebe orthogonal to g is somewhat restrictive, however an equivalent requirement arises in traditional MDPs [14]. 2.5 Natural policy gradient When the parameter space has a natural metric (w), optimization algorithms tend to work better if the gradient of the objective function is pre-multiplied by (w)−1. This yields the so-called natural gradient [1]. In the context of policy gradient methods [5, 11] where w parameterizes a probability density, the natural metric is given by Fisher information (which depends on because w parameterizes the conditional density). Averaging over yields the metric (w) , P 0(0) Ow log (0|) Ow log (0|)T (18) We then have the following result (see Supplement): Theorem 4. With the vector r computed as in Theorem 3, the LMDP natural policy gradient is (w)−1 Ow= w −r (19) Let us compare this result to the natural gradient in traditional MDPs [11], which is (w)−1 Ow= r (20) In traditional MDPs one maximizes reward while in LMDPs one minimizes cost, thus the sign difference. Recall that in traditional MDPs the policy is parameterized using features over the state-action space while in LMDPs we only need features over the state space. Thus the vectors wr will usually have lower dimensionality in (19) compared to (20). Another difference is that in LMDPs the (regular as well as natural) policy gradient vanishes when w = r, which is a sensible fixed-point condition. In traditional MDPs the policy gradient vanishes when r = 0, which is peculiar because it corresponds to the advantage function approximation being identically 0. The true advantage function is of course different, but if the policy becomes deterministic and only one action is sampled per state, the resulting data can be fit with r = 0. Thus any deterministic policy is a local maximum in traditional MDPs. At these local maxima the policy gradient theorem cannot actually be applied because it requires a stochastic policy. When the policy becomes near-deterministic, the number of samples needed to obtain accurate estimates increases because of the lack of exploration [6]. These issues do not seem to arise in LMDPs. 2.6 A Gauss-Newton method for approximating the optimal cost-to-go Instead of using policy gradient, we can solve (3) for the optimal ∗directly. One option is approximate policy iteration – which in our context takes on a simple form. Given the policy parameters w() at iteration , approximate the cost-to-go function and obtain the feature weights r(), and then set w(+1) = r(). This is equivalent to the above natural gradient method with step size 1, using a biased approximator instead of the compatible approximator given by Theorem 3. The other option is approximate value iteration – which is a fixed-point method for solving (3) while replacing ∗() with wTf (). We can actually do better than value iteration here. Since (3) has already been optimized over the controls and is differentiable, we can apply an efficient Gauss-Newton method. Up to an additive constant , the Bellman error from (3) is (w) , wTf () −() + log P (|) exp ¡ −wTf () ¢ (21) Interestingly, the gradient of this Bellman error coincides with our auxilliary features g: Ow(w) = f () −P  (|) exp ¡ −wTf () ¢ P (|) exp (−wTf ())f () = f () −Π [f] () = g () (22) where Π and g are the same as in (16, 8). We now linearize: (w + w) ≈(w) + wTg () and proceed to minimize (with respect to and w) the quantity P () ¡ + (w) + wTg () ¢2 (23) 4 Figure 1: (A) Learning curves for a random LMDP. "resid" is the Gauss-Newton method. The sampling versions use 400 samples per evaluation: 20 trajectories with 20 steps each, starting from the stationary distribution. (B) Cost-to-go functions for the metronome LMDP. The numbers show the average costs obtained. There are 2601 discrete states and 25 features (Gaussians). Convergence was observed in about 10 evaluations (of the objective and the gradient) for both algorithms, exact and sampling versions. The sampling version of the Gauss-Newton method worked well with 400 samples per evaluation; the natural gradient needed around 2500 samples. Normally the density () would be fixed, however we have found empirically that the resulting algorithm yields better policies if we set () to the policy-specific stationary density (w) at each iteration. It is not clear how to guarantee convergence of this algorithm given that the objective function itself is changing over iterations, but in practice we observed that simple damping is sufficient to make it convergent (e.g. w ←w + w2). It is notable that minimization of (23) is closely related to policy evaluation via Bellman residual minimization. More precisely, using (14, 16) it is easy to see that TD(0) applied to our problem would seek to minimize P (w) ¡ −(w) + rTg () ¢2 (24) The similarity becomes even more apparent if we write −(w) more explicitly as −(w) = wTΠ [f] () −() + log P (|) exp ¡ −wTf () ¢ (25) Thus the only difference from (21) is that one expression has the term wTf () at the place where the other expression has the term wTΠ [f] (). Note that the Gauss-Newton method proposed here would be expected to have second-order convergence, even though the amount of computation/sampling per iteration is the same as in a policy gradient method. 2.7 Numerical experiments We compared the natural policy gradient and the Gauss-Newton method, both in exact form and with sampling, on two classes of LMDPs: randomly generated, and a discretization of a continuous "metronome" problem taken from [17]. Fitting the auxiliary approximator e(s) was done using the LSTD() algorithm [3]. Note that Theorem 3 guarantees compatibility only for = 1, however lower values of reduce variance and still provide good descent directions in practice (as one would expect). We ended up using = 02 after some experimentation. The natural gradient was used with the BFGS minimizer "minFunc" [12]. Figure 1A shows typical learning curves on a random LMDP with 100 states, 20 random features, and random passive dynamics with 50% sparsity. In this case the algorithms had very similar performance. On other examples we observed one or the other algorithm being slightly faster or producing better minima, but overall they were comparable. The average cost of the policies found by the Gauss-Newton method occasionally increased towards the end of the iteration. Figure 1B compares the optimal cost-to-go ∗, the least-squares fit to the known ∗using our features (which were a 5-by-5 grid of Gaussians), and the solution of the policy gradient method initialized with w = 0. Note that the latter has lower cost compared to the least-squares fit. In this case both algorithms converged in about 10 iterations, although the Gauss-Newton method needed about 5 times fewer samples in order to achieve similar performance to the exact version. 5 3 Continuous problems Unlike the discrete case where we focused exclusively on LMDPs, here we begin with a very general problem formulation and present interesting new results. These results are then specialized to a narrower class of problems which are continuous (in space and time) but nevertheless have similar properties to LMDPs. 3.1 Policy gradient for general controlled diffusions Consider the controlled Ito diffusion x = b (xu) + (x)  (26) where () is a standard multidimensional Brownian motion process, and u is now a traditional control vector. Let (xu) be a cost function. As before we focus on infinite-horizon average-cost optimal control problems. Given a policy u = (x), the average cost and differential cost-to-go (x) satisfy the Hamilton-Jacobi-Bellman (HJB) equation = (x(x)) + L [] (x) (27) where L is the following 2nd-order linear differential operator: L [] (x) , b (x(x))T Ox(x) + 1 2 trace ³ (x) (x)T Oxx(x) ´ (28) In can be shown [10] that L coincides with the infinitesimal generator of (26), i.e. it computes the expected directional derivative of along trajectories generated by (26). We will need Lemma 1. Let L be the infinitesimal generator of an Ito diffusion which has a stationary density , and let be a twice-differentiable function. Then Z (x) L [] (x) x = 0 (29) Proof: The adjoint L∗of the infinitesimal generator L is known to be the Fokker-Planck operator – which computes the time-evolution of a density under the diffusion [10]. Since is the stationary density, L∗[] (x) = 0 for all x, and so hL∗[] i = 0. Since L and L∗are adjoint, hL∗[] i = hL []i. Thus hL []i = 0. This lemma seems important-yet-obvious so we would not be surprised if it was already known, but we have not seen in the literature. Note that many diffusions lack stationary densities. For example the density of Brownian motion initialized at the origin is a zero-mean Gaussian whose covariance grows linearly with time – thus there is no stationary density. If however the diffusion is controlled and the policy tends to keep the state within some region, then a stationary density would normally exist. The existence of a stationary density may actually be a sensible definition of stability for stochastic systems (although this point will not be pursued in the present paper). Now consider any policy parameterization u = (xw) such that (for the current value of w) the diffusion (26) has a stationary density and Owexists. Differentiating (27), and using the shortcut notation b (x) in place of b (x(xw)) and similarly for (x), we have Ow= Ow(x) + Owb (x)Ox(x) + L [Ow] (x) (30) Here L [Ow] is meant component-wise. If we now average over , the last term will vanish due to Lemma 1. This is essential for a policy gradient procedure which seeks to avoid finite differencing; indeed Owcould not be estimated while sampling from a single policy. Thus we have Theorem 5. The policy gradient of the controlled diffusion (26) is Ow= Z (x) ³ Ow(x) + Owb (x)Ox(x) ´ x (31) Unlike most other results in stochastic optimal control, equation (31) does not involve the Hessian Oxx, although we can obtain a Oxx-dependent term here if we allow to depend on u. We now illustrate Theorem 5 on a linear-quadratic-Gaussian (LQG) control problem. 6 Example (LQG). Consider dynamics = + and cost () = 2 + 2. Let = − be the parameterized policy with 0. The differential cost-to-go is known to be in the form () = 2. Substituting in the HJB equation and matching powers of yields = = 2+1 2, and so the policy gradient can be computed directly as O= 1 −2+1 22 . The stationary density () is a zero-mean Gaussian with variance 2 = 1 2. One can now verify that the gradient given by Theorem 5 is identical to the Ocomputed above. Another interesting aspect of Theorem 5 is that it is a natural generalization of classic results from finite-horizon deterministic optimal control [13], even though it cannot be derived from those results. Suppose we have an open-loop control trajectory u () 0 ≤≤, the resulting state trajectory (starting from a given x0) is x (), and the corresponding co-state trajectory (obtained by integrating Pontryagin’s ODE backwards in time) is (). It is known that the gradient of the total cost w.r.t. u is Ou+ OubT. Now suppose u () is parameterized by some vector w. Then Ow= Z Owu ()T Ou()= Z ³ Ow(x () u ()) + Owb (x () u ())T () ´  (32) The co-state () is known to be equal to the gradient Ox(x) of the cost-to-go function for the (closed-loop) deterministic problem. Thus (31) and (32) are very similar. Of course in finite-horizon settings there is no stationary density, and instead the integral in (32) is over the trajectory. An RL method for estimating Owin deterministic problems was developed in [9]. Theorem 5 suggests a simple procedure for estimating the policy gradient via sampling: fit a function approximator bto , and use Oxbin (31). Alternatively, a compatible approximation scheme can be obtained by fitting Oxbto Oxin a least-squares sense, using a linear approximator with features Owb (x). This however is not practical because learning targets for Oxare difficult to obtain. Ideally we would construct a compatible approximation scheme which involves fitting brather than Oxb. It is not clear how to do that for general diffusions, but can be done for a restricted problem class as shown next. 3.2 Natural gradient and compatible approximation for linearly-solvable diffusions We now focus on a more restricted family of stochastic optimal control problems which arise in many situations (e.g. most mechanical systems can be described in this form): x = (a (x) + (x) u) + (x)  (33) (xu) = () + 1 2uT(x) u Such problems have been studied extensively [13]. The optimal control law u∗and the optimal differential cost-go-to ∗(x) are known to be related as u∗= −−1TOx∗. As in the discrete case we use this relation to motivate the choice of policy parameterization and cost-to-go function approximator. Choosing some features f (x), we define b(xr) , rTf (x) as before, and (xw) , −(x)−1 (x)T Ox ¡ wTf (x) ¢ (34) It is convenient to also define the matrix (x) , Oxf (x)T, so that Oxb(xr) = (x) r. We can now substitute these definitions in the general result (31), replace with the approximation b, and skipping the algebra, obtain the corresponding approximation to the policy gradient: eOw= Z (x) (x)T (x) (x)−1 (x)T (x) (w −r) x (35) Before addressing the issue of compatibility (i.e. whether eOw= Ow), we seek a natural gradient version of (35). To this end we need to interpret T−1Tas Fisher information for the (infinitesimal) transition probability density of our parameterized diffusion. We do this by discretizing the time axis with time step , and then dividing by . The -step explicit Euler discretization of the stochastic dynamics (33) is given by the Gaussian (·|xw) = N ³ x + a (x) −(x) (x)−1 (x)T (x) w; (x) (x)T´ (36) Suppressing the dependence on x, Fisher information becomes 1  Z Ow log Ow log T x0 = T−1T ¡ T¢−1 −1T (37) 7 Comparing to (35) we see that a natural gradient result is obtained when (x) (x)T = (x) (x)−1 (x)T (38) Assuming (38) is satisfied, and defining (w) as the average of Fisher information over (x), (w)−1 eOw= w −r (39) Condition (38) is rather interesting. Elsewhere we have shown [16] that the same condition is needed to make problem (33) linearly-solvable. More precisely, the exponentiated HJB equation for the optimal ∗in problem (33, 38) is linear in exp (−∗). We have also shown [16] that the continuous problem (33, 38) is the limit (when →0) of continuous-state discrete-time LMDPs constructed via Euler discretization as above. The compatible function approximation scheme from Theorem 3 can then be applied to these LMDPs. Recall (8). Since L is the infinitesimal generator, for any twice-differentiable function we have Π [] (x) = (x) + L [] (x) +  ¡ 2¢ (40) Substituting in (13), dividing by and taking the limit →0, the matrix and vector k become = Z (x) ³ −L [f] (x) f (x)T −f (x) L [f] (x)T´ x (41) k = Z (x) (−L [f] (x) (x) + f (x) ((x) −)) x Compatibility is therefore achieved when the approximation error in is orthogonal to L [f]. Thus the auxiliary function approximator is now e(xs) , sTL [f] (x), and we have Theorem 6. The following procedure yields the exact policy gradient for problem (33, 38): 1. fit e(xs) to (x) in a least-squares sense, and also compute  2. compute and k from (41), replacing (x) with e(xs) 3. "fit" b(xr) by solving r = k 4. the policy gradient is (35), and the natural policy gradient is (39) This is the first policy gradient result with compatible function approximation for continuous stochastic systems. It is very similar to the corresponding results in the discrete case (Theorems 3,4) except it involves the differential operator L rather than the integral operator Π. 4 Summary Here we developed compatible function approximators and natural policy gradients which only require estimation of the cost-to-go function. This was possible due to the unique properties of the LMDP framework. The resulting approximation scheme is unusual, using policy-specific auxiliary features derived from the primary features. In continuous time we also obtained a new policy gradient result for control problems that are not linearly-solvable, and showed that it generalizes results from deterministic optimal control. We also derived a somewhat heuristic but nevertheless promising Gauss-Newton method for solving for the optimal cost-to-go directly; it appears to be a hybrid between value iteration and policy gradient. One might wonder why we need policy gradients here given that the (exponentiated) Bellman equation is linear, and approximating its solution using features is faster than any other procedure in Reinforcement Learning and Approximate Dynamic Programming. The answer is that minimizing Bellman error does not always give the best policy – as illustrated in Figure 1B. Indeed a combined approach may be optimal: solve the linear Bellman equation approximately [17], and then use the solution to initialize the policy gradient method. This idea will be explored in future work. Our new methods require a model – as do all RL methods that rely on state values rather than stateaction values. We do not see this as a shortcoming because, despite all the effort that has gone into model-free RL, the resulting methods do not seem applicable to truly complex optimal control problems. Our methods involve model-based sampling which combines the best of both worlds: computational speed, and grounding in reality (assuming we have a good model of reality). Acknowledgements. This work was supported by the US National Science Foundation. Thanks to Guillaume Lajoie and Jan Peters for helpful discussions. 8 References [1] S. Amari. Natural gradient works efficiently in learning. Neural Computation, 10:251–276, 1998. [2] J. Bagnell and J. Schneider. Covariant policy search. In International Joint Conference on Artificial Intelligence, 2003. [3] J. Boyan. Least-squares temporal difference learning. In International Conference on Machine Learning, 1999. [4] W. Fleming and S. Mitter. Optimal control and nonlinear filtering for nondegenerate diffusion processes. Stochastics, 8:226–261, 1982. [5] S. Kakade. A natural policy gradient. In Advances in Neural Information Processing Systems, 2002. [6] S. Kakade. On the Sample Complexity of Reinforcement Learning. PhD thesis, University College London, 2003. [7] H. Kappen. Linear theory for control of nonlinear stochastic systems. Physical Review Letters, 95, 2005. [8] V. Konda and J. Tsitsiklis. Actor-critic algorithms. SIAM Journal on Control and Optimization, pages 1008–1014, 2001. [9] R. Munos. Policy gradient in continuous time. The Journal of Machine Learning Research, 7:771–791, 2006. [10] B. Oksendal. Stochastic Differential Equations (4th Ed). Springer-Verlag, Berlin, 1995. [11] J. Peters and S. Schaal. Natural actor-critic. Neurocomputing, 71:1180–1190, 2008. [12] M. Schmidt. minfunc. online material, 2005. [13] R. Stengel. Optimal Control and Estimation. Dover, New York, 1994. [14] R. Sutton, D. Mcallester, S. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems, 2000. [15] E. Todorov. Linearly-solvable Markov decision problems. Advances in Neural Information Processing Systems, 2006. [16] E. Todorov. Efficient computation of optimal actions. PNAS, 106:11478–11483, 2009. [17] E. Todorov. Eigen-function approximation methods for linearly-solvable optimal control problems. IEEE ADPRL, 2009. [18] R. Williams. Simple statistical gradient following algorithms for connectionist reinforcement learning. Machine Learning, pages 229–256, 1992. 9
2010
129
3,887
Extended Bayesian Information Criteria for Gaussian Graphical Models Rina Foygel University of Chicago rina@uchicago.edu Mathias Drton University of Chicago drton@uchicago.edu Abstract Gaussian graphical models with sparsity in the inverse covariance matrix are of significant interest in many modern applications. For the problem of recovering the graphical structure, information criteria provide useful optimization objectives for algorithms searching through sets of graphs or for selection of tuning parameters of other methods such as the graphical lasso, which is a likelihood penalization technique. In this paper we establish the consistency of an extended Bayesian information criterion for Gaussian graphical models in a scenario where both the number of variables p and the sample size n grow. Compared to earlier work on the regression case, our treatment allows for growth in the number of non-zero parameters in the true model, which is necessary in order to cover connected graphs. We demonstrate the performance of this criterion on simulated data when used in conjunction with the graphical lasso, and verify that the criterion indeed performs better than either cross-validation or the ordinary Bayesian information criterion when p and the number of non-zero parameters q both scale with n. 1 Introduction This paper is concerned with the problem of model selection (or structure learning) in Gaussian graphical modelling. A Gaussian graphical model for a random vector X = (X1, . . . , Xp) is determined by a graph G on p nodes. The model comprises all multivariate normal distributions N(µ, Θ−1) whose inverse covariance matrix satisfies that Θjk = 0 when {j, k} is not an edge in G. For background on these models, including a discussion of the conditional independence interpretation of the graph, we refer the reader to [1]. In many applications, in particular in the analysis of gene expression data, inference of the graph G is of significant interest. Information criteria provide an important tool for this problem. They provide the objective to be minimized in (heuristic) searches over the space of graphs and are sometimes used to select tuning parameters in other methods such as the graphical lasso of [2]. In this work we study an extended Bayesian information criterion (BIC) for Gaussian graphical models. Given a sample of n independent and identically distributed observations, this criterion takes the form BICγ(E) = −2ln(ˆΘ(E)) + |E| log n + 4|E|γ log p, (1) where E is the edge set of a candidate graph and ln(ˆΘ(E)) denotes the maximized log-likelihood function of the associated model. (In this context an edge set comprises unordered pairs {j, k} of distinct elements in {1, . . . , p}.) The criterion is indexed by a parameter γ ∈[0, 1]; see the Bayesian interpretation of γ given in [3]. If γ = 0, then the classical BIC of [4] is recovered, which is well known to lead to (asymptotically) consistent model selection in the setting of fixed number of variables p and growing sample size n. Consistency is understood to mean selection of the smallest true graph whose edge set we denote E0. Positive γ leads to stronger penalization of large graphs and our main result states that the (asymptotic) consistency of an exhaustive search over a restricted 1 model space may then also hold in a scenario where p grows moderately with n (see the Main Theorem in Section 2). Our numerical work demonstrates that positive values of γ indeed lead to improved graph inference when p and n are of comparable size (Section 3). The choice of the criterion in (1) is in analogy to a similar criterion for regression models that was first proposed in [5] and theoretically studied in [3, 6]. Our theoretical study employs ideas from these latter two papers as well as distribution theory available for decomposable graphical models. As mentioned above, we treat an exhaustive search over a restricted model space that contains all decomposable models given by an edge set of cardinality |E| ≤q. One difference to the regression treatment of [3, 6] is that we do not fix the dimension bound q nor the dimension |E0| of the smallest true model. This is necessary for connected graphs to be covered by our work. In practice, an exhaustive search is infeasible even for moderate values of p and q. Therefore, we must choose some method for preselecting a smaller set of models, each of which is then scored by applying the extended BIC (EBIC). Our simulations show that the combination of EBIC and graphical lasso gives good results well beyond the realm of the assumptions made in our theoretical analysis. This combination is consistent in settings where both the lasso and the exhaustive search are consistent but in light of the good theoretical properties of lasso procedures (see [7]), studying this particular combination in itself would be an interesting topic for future work. 2 Consistency of the extended BIC for Gaussian graphical models 2.1 Notation and definitions In the sequel we make no distinction between the edge set E of a graph on p nodes and the associated Gaussian graphical model. Without loss of generality we assume a zero mean vector for all distributions in the model. We also refer to E as a set of entries in a p × p matrix, meaning the 2|E| entries indexed by (j, k) and (k, j) for each {j, k} ∈E. We use ∆to denote the index pairs (j, j) for the diagonal entries of the matrix. Let Θ0 be a positive definite matrix supported on ∆∪E0. In other words, the non-zero entries of Θ0 are precisely the diagonal entries as well as the off-diagonal positions indexed by E0; note that a single edge in E0 corresponds to two positions in the matrix due to symmetry. Suppose the random vectors X1, . . . , Xn are independent and distributed identically according to N(0, Θ−1 0 ). Let S = 1 n P i XiXT i be the sample covariance matrix. The Gaussian log-likelihood function simplifies to ln(Θ) = n 2 [log det(Θ) −trace(SΘ)] . (2) We introduce some further notation. First, we define the maximum variance of the individual nodes: σ2 max = max j (Θ−1 0 )jj. Next, we define θ0 = mine∈E0 |(Θ0)e|, the minimum signal over the edges present in the graph. (For edge e = {j, k}, let (Θ0)e = (Θ0)jk = (Θ0)kj.) Finally, we write λmax for the maximum eigenvalue of Θ0. Observe that the product σ2 maxλmax is no larger than the condition number of Θ0 because 1/λmin(Θ0) = λmax(Θ−1 0 ) ≥σ2 max. 2.2 Main result Suppose that n tends to infinity with the following asymptotic assumptions on data and model:            E0 is decomposable, with |E0| ≤q, σ2 maxλmax ≤C, p = O(nκ), p →∞, γ0 = γ −(1 − 1 4κ) > 0, (p + 2q) log p × λ2 max θ2 0 = o(n) (3) Here C, κ > 0 and γ are fixed reals, while the integers p, q, the edge set E0, the matrix Θ0, and thus the quantities σ2 max, λmax and θ0 are implicitly allowed to vary with n. We suppress this latter dependence on n in the notation. The ‘big oh’ O(·) and the ‘small oh’ o(·) are the Landau symbols. 2 Main Theorem. Suppose that conditions (3) hold. Let E be the set of all decomposable models E with |E| ≤q. Then with probability tending to 1 as n →∞, E0 = arg min E∈E BICγ(E). That is, the extended BIC with parameter γ selects the smallest true model E0 when applied to any subset of E containing E0. In order to prove this theorem we use two techniques for comparing likelihoods of different models. Firstly, in Chen and Chen’s work on the GLM case [6], the Taylor approximation to the loglikelihood function is used and we will proceed similarly when comparing the smallest true model E0 to models E which do not contain E0. The technique produces a lower bound on the decrease in likelihood when the true model is replaced by a false model. Theorem 1. Suppose that conditions (3) hold. Let E1 be the set of models E with E ̸⊃E0 and |E| ≤q. Then with probability tending to 1 as n →∞, ln(Θ0) −ln(ˆΘ(E)) > 2q(log p)(1 + γ0) ∀E ∈E1. Secondly, Porteous [8] shows that in the case of two nested models which are both decomposable, the likelihood ratio (at the maximum likelihood estimates) follows a distribution that can be expressed exactly as a log product of Beta distributions. We will use this to address the comparison between the model E0 and decomposable models E containing E0 and obtain an upper bound on the improvement in likelihood when the true model is expanded to a larger decomposable model. Theorem 2. Suppose that conditions (3) hold. Let E0 be the set of decomposable models E with E ⊃E0 and |E| ≤q. Then with probability tending to 1 as n →∞, ln(ˆΘ(E)) −ln(ˆΘ(E0)) < 2(1 + γ0)(|E| −|E0|) log p ∀E ∈E0\{E0}. Proof of the Main Theorem. With probability tending to 1 as n →∞, both of the conclusions of Theorems 1 and 2 hold. We will show that both conclusions holding simultaneously implies the desired result. Observe that E ⊂E0 ∪E1. Choose any E ∈E\{E0}. If E ∈E0, then (by Theorem 2): BICγ(E) −BICγ(E0) = −2(ln(ˆΘ(E)) −ln(ˆΘ(E0))) + 4(1 + γ0)(|E| −|E0|) log p > 0. If instead E ∈E1, then (by Theorem 1, since |E0| ≤q): BICγ(E) −BICγ(E0) = −2(ln(ˆΘ(E)) −ln(ˆΘ(E0))) + 4(1 + γ0)(|E| −|E0|) log p > 0. Therefore, for any E ∈E\{E0}, BICγ(E) > BICγ(E0), which yields the desired result. Some details on the proofs of Theorems 1 and 2 are given in the Appendix in Section 5. 3 Simulations In this section, we demonstrate that the EBIC with positive γ indeed leads to better model selection properties in practically relevant settings. We let n grow, set p ∝nκ for various values of κ, and apply the EBIC with γ ∈{0, 0.5, 1} similarly to the choice made in the regression context by [3]. As mentioned in the introduction, we first use the graphical lasso of [2] (as implemented in the ‘glasso’ package for R) to define a small set of models to consider (details given below). From the selected set we choose the model with the lowest EBIC. This is repeated for 100 trials for each combination of values of n, p, γ in each scaling scenario. For each case, the average positive selection rate (PSR) and false discovery rate (FDR) are computed. We recall that the graphical lasso places an ℓ1 penalty on the inverse covariance matrix. Given a penalty ρ ≥0, we obtain the estimate ˆΘρ = arg min Θ −ln(Θ) + ρ∥Θ∥1. (4) 3 Figure 1: The chain (top) and the ‘double chain’ (bottom) on 6 nodes. (Here we may define ∥Θ∥1 as the sum of absolute values of all entries, or only of off-diagonal entries; both variants are common). The ℓ1 penalty promotes zeros in the estimated inverse covariance matrix ˆΘρ; increasing the penalty yields an increase in sparsity. The ‘glasso path’, that is, the set of models recovered over the full range of penalties ρ ∈[0, ∞), gives a small set of models which, roughly, include the ‘best’ models at various levels of sparsity. We may therefore apply the EBIC to this manageably small set of models (without further restriction to decomposable models). Consistency results on the graphical lasso require the penalty ρ to satisfy bounds that involve measures of regularity in the unknown matrix Θ0; see [7]. Minimizing the EBIC can be viewed as a data-driven method of tuning ρ, one that does not require creation of test data. While cross-validation does not generally have consistency properties for model selection (see [9]), it is nevertheless interesting to compare our method to cross-validation. For the considered simulated data, we start with the set of models from the ‘glasso path’, as before, and then perform 100-fold cross-validation. For each model and each choice of training set and test set, we fit the model to the training set and then evaluate its performance on each sample in the test set, by measuring error in predicting each individual node conditional on the other nodes and then taking the sum of the squared errors. We note that this method is computationally much more intensive than the BIC or EBIC, because models need to be fitted many more times. 3.1 Design In our simulations, we examine the EBIC as applied to the case where the graph is a chain with node j being connected to nodes j−1, j+1, and to the ‘double chain’, where node j is connected to nodes j −2, j −1, j + 1, j + 2. Figure 1 shows examples of the two types of graphs, which have on the order of p and 2p edges, respectively. For both the chain and the double chain, we investigate four different scaling scenarios, with the exponent κ selected from {0.5, 0.9, 1, 1.1}. In each scenario, we test n = 100, 200, 400, 800, and define p ∝nκ with the constant of proportionality chosen such that p = 10 when n = 100 for better comparability. In the case of a chain, the true inverse covariance matrix Θ0 is tridiagonal with all diagonal entries (Θ0)j,j set equal to 1, and the entries (Θ0)j,j+1 = (Θ0)j+1,j that are next to the main diagonal equal to 0.3. For the double chain, Θ0 has all diagonal entries equal to 1, the entries next to the main diagonal are (Θ0)j,j+1 = (Θ0)j+1,j = 0.2 and the remaining non-zero entries are (Θ0)j,j+2 = (Θ0)j+2,j = 0.1. In both cases, the choices result in values for θ0, σ2 max and λmax that are bounded uniformly in the matrix size p. For each data set generated from N(0, Θ−1 0 ), we use the ‘glasso’ package [2] in R to compute the ‘glasso path’. We choose 100 penalty values ρ which are logarithmically evenly spaced between ρmax (the smallest value which will result in a no-edge model) and ρmax/100. At each penalty value ρ, we compute ˆΘρ from (4) and define the model Eρ based on this estimate’s support. The R routine also allows us to compute the unpenalized maximum likelihood estimate ˆΘ(Eρ). We may then readily compute the EBIC from (1). There is no guarantee that this procedure will find the model with the lowest EBIC along the full ‘glasso path’, let alone among the space of all possible models of size ≤q. Nonetheless, it serves as a fast way to select a model without any manual tuning. 3.2 Results Chain graph: The results for the chain graph are displayed in Figure 2. The figure shows the positive selection rate (PSR) and false discovery rate (FDR) in the four scaling scenarios. We observe that, for the larger sample sizes, the recovery of the non-zero coefficients is perfect or nearly perfect for all three values of γ; however, the FDR rate is noticeably better for the positive values of γ, especially 4 for higher scaling exponents κ. Therefore, for moderately large n, the EBIC with γ = 0.5 or γ = 1 performs very well, while the ordinary BIC0 produces a non-trivial amount of false positives. For 100-fold cross-validation, while the PSR is initially slightly higher, the growing FDR demonstrates the extreme inconsistency of this method in the given setting. Double chain graph: The results for the double chain graph are displayed in Figure 3. In each of the four scaling scenarios for this case, we see a noticeable decline in the PSR as γ increases. Nonetheless, for each value of γ, the PSR increases as n and p grow. Furthermore, the FDR for the ordinary BIC0 is again noticeably higher than for the positive values of γ, and in the scaling scenarios κ ≥0.9, the FDR for BIC0 is actually increasing as n and p grow, suggesting that asymptotic consistency may not hold in these cases, as is supported by our theoretical results. 100-fold crossvalidation shows significantly better PSR than the BIC and EBIC methods, but the FDR is again extremely high and increases quickly as the model grows, which shows the unreliability of crossvalidation in this setting. Similarly to what Chen and Chen [3] conclude for the regression case, it appears that the EBIC with parameter γ = 0.5 performs well. Although the PSR is necessarily lower than with γ = 0, the FDR is quite low and decreasing as n and p grow, as desired. For both types of simulations, the results demonstrate the trade-off inherent in choosing γ in the finite (non-asymptotic) setting. For low values of γ, we are more likely to obtain a good (high) positive selection rate. For higher values of γ, we are more likely to obtain a good (low) false discovery rate. (In the Appendix, this corresponds to assumptions (5) and (6)). However, asymptotically, the conditions (3) guarantee consistency, meaning that the trade-off becomes irrelevant for large n and p. In the finite case, γ = 0.5 seems to be a good compromise in simulations, but the question of determining the best value of γ in general settings is an open question. Nonetheless, this method offers guaranteed asymptotic consistency for (known) values of γ depending only on n and p. 4 Discussion We have proposed the use of an extended Bayesian information criterion for multivariate data generated by sparse graphical models. Our main result gives a specific scaling for the number of variables p, the sample size n, the bound on the number of edges q, and other technical quantities relating to the true model, which will ensure asymptotic consistency. Our simulation study demonstrates the the practical potential of the extended BIC, particularly as a way to tune the graphical lasso. The results show that the extended BIC with positive γ gives strong improvement in false discovery rate over the classical BIC, and even more so over cross-validation, while showing comparable positive selection rate for the chain, where all the signals are fairly strong, and noticeably lower, but steadily increasing, positive selection rate for the double chain with a large number of weaker signals. 5 Appendix We now sketch proofs of non-asymptotic versions of Theorems 1 and 2, which are formulated as Theorems 3 and 4. We also give a non-asymptotic formulation of the Main Theorem; see Theorem 5. In the non-asymptotic approach, we treat all quantities as fixed (e.g. n, p, q, etc.) and state precise assumptions on those quantities, and then give an explicit lower bound on the probability of the extended BIC recovering the model E0 exactly. We do this to give an intuition for the magnitude of the sample size n necessary for a good chance of exact recovery in a given setting but due to the proof techniques, the resulting implications about sample size are extremely conservative. 5.1 Preliminaries We begin by stating two lemmas that are used in the proof of the main result, but are also more generally interesting as tools for precise bounds on Gaussian and chi-square distributions. First, Cai [10, Lemma 4] proves the following chi-square bound. For any n ≥1, λ > 0, P{χ2 n > n(1 + λ)} ≤ 1 λ√πne−n 2 (λ−log(1+λ)). We can give an analagous left-tail upper bound. The proof is similar to Cai’s proof and omitted here. We will refer to these two bounds together as (CSB). 5 Figure 2: Simulation results when the true graph is a chain. Lemma 1. For any λ > 0, for n such that n ≥4λ−2 + 1, P{χ2 n < n(1 −λ)} ≤ 1 λ p π(n −1) e n−1 2 (λ+log(1−λ)). Second, we give a distributional result about the sample correlation when sampling from a bivariate normal distribution. Lemma 2. Suppose (X1, Y1), . . . , (Xn, Yn) are independent draws from a bivariate normal distribution with zero mean, variances equal to one and covariance ρ. Then the following distributional equivalence holds, where A and B are independent χ2 n variables: n X i=1 (XiYi −ρ) D= 1 + ρ 2 (A −n) −1 −ρ 2 (B −n). Proof. Let A1, B1, A2, B2, . . . , An, Bn be independent standard normal random variables. Define: Xi = r 1 + ρ 2 Ai + r 1 −ρ 2 Bi; Yi = r 1 + ρ 2 Ai − r 1 −ρ 2 Bi; A = n X i=1 A2 i ; B = n X i=1 B2 i . Then the variables X1, Y1, X2, Y2, . . . , Xn, Yn have the desired joint distribution, and A, B are independent χ2 n variables. The claim follows from writing P i XiYi in terms of A and B. 6 Figure 3: Simulation results when the true graph is a ‘double chain’. 5.2 Non-asymptotic versions of the theorems We assume the following two conditions, where ϵ0, ϵ1 > 0, C ≥σ2 maxλmax, κ = logn p, and γ0 = γ −(1 − 1 4κ): (p + 2q) log p n × λ2 max θ2 0 ≤ 1 3200 max{1 + γ0, 1 + ϵ1 2  C2} (5) 2( p 1 + γ0 −1) −log log p + log(4√1 + γ0) + 1 2 log p ≥ϵ0 (6) Theorem 3. Suppose assumption (5) holds. Then with probability at least 1 − 1 √π log pp−ϵ1, for all E ̸⊃E0 with |E| ≤q, ln(Θ0) −ln(ˆΘ(E)) > 2q(log p)(1 + γ0). Proof. We sketch a proof along the lines of the proof of Theorem 2 in [6], using Taylor series centered at the true Θ0 to approximate the likelihood at ˆΘ(E). The score and the negative Hessian of the log-likelihood function in (2) are sn(Θ) = d dΘln(Θ) = n 2 Θ−1 −S  , Hn(Θ) = −d dΘsn(Θ) = n 2 Θ−1 ⊗Θ−1. Here, the symbol ⊗denotes the Kronecker product of matrices. Note that, while we require Θ to be symmetric positive definite, this is not reflected in the derivatives above. We adopt this convention for the notational convenience in the sequel. 7 Next, observe that ˆΘ(E) has support on ∆∪E0 ∪E, and that by definition of θ0, we have the lower bound |ˆΘ(E) −Θ0|F ≥θ0 in terms of the Frobenius norm. By concavity of the log-likelihood function, it suffices to show that the desired inequality holds for all Θ with support on ∆∪E0 ∪E with |Θ −Θ0|F = θ0. By Taylor expansion, for some ˜Θ on the path from Θ0 to Θ, we have: ln(Θ) −ln(Θ0) = vec(Θ −Θ0)T sn(Θ0) −1 2vec(Θ −Θ0)T Hn(˜Θ)vec(Θ −Θ0). Next, by (CSB) and Lemma 2, with probability at least 1 − 1 √π log pe−ϵ1 log p, the following bound holds for all edges e in the complete graph (we omit the details): (sn(Θ0))2 e ≤6σ4 max(2 + ϵ1)n log p. Now assume that this bound holds for all edges. Fix some E as above, and fix Θ with support on ∆∪E0 ∪E, with |Θ −Θ0| = θ0. Note that the support has at most (p + 2q) entries. Therefore, |vec(Θ −Θ0)T sn(Θ0)|2 ≤θ2 0(p + 2q) × 6σ4 max(2 + ϵ1)n log p. Furthermore, the eigenvalues of Θ are bounded by λmax + θ0 ≤2λmax, and so by properties of Kronecker products, the minimum eigenvalue of Hn(˜Θ) is at least n 2 (2λmax)−2. We conclude that ln(Θ) −ln(Θ0) ≤ q θ2 0(p + 2q) × 6σ4max(2 + ϵ1)n log p −1 2θ2 0 × n 2 (2λmax)−2. Combining this bound with our assumptions above, we obtain the desired result. Theorem 4. Suppose additionally that assumption (6) holds (in particular, this implies that γ > 1 − 1 4κ). Then with probability at least 1 − 1 4√π log p p−ϵ0 1−p−ϵ0 , for all decomposable models E such that E ⊋E0 and |E| ≤q, ln(ˆΘ(E)) −ln(ˆΘ(E0)) < 2(1 + γ0)(|E| −|E0|) log p. Proof. First, fix a single such model E, and define m = |E| −|E0|. By [8, 11], ln(ˆΘ(E)) − ln(ˆΘ(E0)) is distributed as −n 2 log (Qm i=1 Bi), where Bi ∼Beta( n−ci 2 , 1 2) are independent random variables and the constants c1, . . . , cm are bounded by 1 less than the maximal clique size of the graph given by model E, implying ci ≤√2q for each i. Also shown in [8] is the stochastic inequality −log(Bi) ≤ 1 n−ci−1χ2 1. It follows that, stochastically, ln(ˆΘ(E)) −ln(ˆΘ(E0)) ≤n 2 × 1 n −√2q −1χ2 m. Finally, combining the assumptions on n, p, q and the (CSB) inequalities, we obtain: P{ln(ˆΘ(E)) −ln(ˆΘ(E0)) ≥2(1 + γ0)m log(p)} ≤ 1 4√π log pe−m 2 (4(1+ ϵ0 2 ) log p). Next, note that the number of models |E| with E ⊃E0 and |E| −|E0| = m is bounded by p2m. Taking the union bound over all choices of m and all choices of E with that given m, we obtain that the desired result holds with the desired probability. We are now ready to give a non-asymptotic version of the Main Theorem. For its proof apply the union bound to the statements in Theorems 3 and 4, as in the asymptotic proof given in section 2. Theorem 5. Suppose assumptions (5) and (6) hold. Let E be the set of subsets E of edges between the p nodes, satisfying |E| ≤q and representing a decomposable model. Then it holds with probability at least 1 − 1 4√π log p p−ϵ0 1−p−ϵ0 − 1 √π log pp−ϵ1 that E0 = arg min E∈E BICγ(E). That is, the extended BIC with parameter γ selects the smallest true model. Finally, we note that translating the above to the asymptotic version of the result is simple. If the conditions (3) hold, then for sufficiently large n (and thus sufficiently large p), assumptions (5) and (6) hold. Furthermore, although we may not have the exact equality κ = logn p, we will have logn p →κ; this limit will be sufficient for the necessary inequalities to hold for sufficiently large n. The proofs then follow from the non-asymptotic results. 8 References [1] Steffen L. Lauritzen. Graphical models, volume 17 of Oxford Statistical Science Series. The Clarendon Press Oxford University Press, New York, 1996. Oxford Science Publications. [2] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008. [3] Jiahua Chen and Zehua Chen. Extended Bayesian information criterion for model selection with large model space. Biometrika, 95:759–771, 2008. [4] Gideon Schwarz. Estimating the dimension of a model. Ann. Statist., 6(2):461–464, 1978. [5] Malgorzata Bogdan, Jayanta K. Ghosh, and R. W. Doerge. Modifying the Schwarz Bayesian information criterion to locate multiple interacting quantitative trait loci. Genetics, 167:989– 999, 2004. [6] Jiahua Chen and Zehua Chen. Extended BIC for small-n-large-p sparse GLM. Preprint. [7] Pradeep Ravikumar, Martin J. Wainwright, Garvesh Raskutti, and Bin Yu. Highdimensional covariance estimation by minimizing ℓ1-penalized log-determinant divergence. arXiv:0811.3628, 2008. [8] B. T. Porteous. Stochastic inequalities relating a class of log-likelihood ratio statistics to their asymptotic χ2 distribution. Ann. Statist., 17(4):1723–1734, 1989. [9] Jun Shao. Linear model selection by cross-validation. J. Amer. Statist. Assoc., 88(422):486– 494, 1993. [10] T. Tony Cai. On block thresholding in wavelet regression: adaptivity, block size, and threshold level. Statist. Sinica, 12(4):1241–1273, 2002. [11] P. Svante Eriksen. Tests in covariance selection models. Scand. J. Statist., 23(3):275–284, 1996. 9
2010
13
3,888
Sufficient Conditions for Generating Group Level Sparsity in a Robust Minimax Framework Hongbo Zhou and Qiang Cheng Computer Science department, Southern Illinois University Carbondale, IL, 62901 hongboz@siu.edu, qcheng@cs.siu.edu Abstract Regularization technique has become a principled tool for statistics and machine learning research and practice. However, in most situations, these regularization terms are not well interpreted, especially on how they are related to the loss function and data. In this paper, we propose a robust minimax framework to interpret the relationship between data and regularization terms for a large class of loss functions. We show that various regularization terms are essentially corresponding to different distortions to the original data matrix. This minimax framework includes ridge regression, lasso, elastic net, fused lasso, group lasso, local coordinate coding, multiple kernel learning, etc., as special cases. Within this minimax framework, we further give mathematically exact definition for a novel representation called sparse grouping representation (SGR), and prove a set of sufficient conditions for generating such group level sparsity. Under these sufficient conditions, a large set of consistent regularization terms can be designed. This SGR is essentially different from group lasso in the way of using class or group information, and it outperforms group lasso when there appears group label noise. We also provide some generalization bounds in a classification setting. 1 Introduction A general form of estimating a quantity w ∈Rn from an empirical measurement set X by minimizing a regularized or penalized functional is ˆw = argmin w {L(Iw(X)) + λJ (w)}, (1) where Iw(X) ∈Rm expresses the relationship between w and data X, L(.) := Rm →R+ is a loss function, J (.) := Rn →R+ is a regularization term and λ ∈R is a weight. Positive integers n, m represent the dimensions of the associated Euclidean spaces. Varying in specific applications, the loss function L has lots of forms, and the most often used are these induced (A is induced by B, means B is the core part of A) by squared Euclidean norm or squared Hilbertian norms. Empirically, the functional J is often interpreted as smoothing function, model bias or uncertainty. Although Equation (1) has been widely used, it is difficult to establish a general mathematically exact relationship between L and J . This directly encumbers the interpretability of parameters in the model selection. It would be desirable if we can represent Equation (1) by a simpler form ˆw = argmin w L ′(I ′ w(X)). (2) Obviously, Equation (2) provides a better interpretability for the regularization term in Equation (1) by explicitly expressing the model bias or uncertainty as a variable of the relationship functional. In this paper, we introduce a minimax framework and show that for a large family of Euclidean norm induced loss functions, an equivalence relationship between Equation (1) and Equation (2) can be 1 established. Moreover, the model bias or uncertainty will be expressed as distortions associated with certain functional spaces. We will give a series of corollaries to show that well-studied lasso, group lasso, local coordinate coding, multiple kernel learning, etc., are all special cases of this novel framework. As a result, we shall see that various regularization terms associated with lasso, group lasso, etc., can be interpreted as distortions that belong to different distortion sets. Within this framework, we further investigate a large family of distortion sets which can generate a special type of group level sparsity which we call sparse grouping representation (SGR). Instead of merely designing one specific regularization term, we give sufficient conditions for the distortion sets to generate the SGR. Under these sufficient conditions, a large set of consistent regularization terms can be designed. Compared with the well-known group lasso which uses group distribution information in a supervised learning setting, the SGR is an unsupervised one and thus essentially different from the group lasso. In a novel fault-tolerance classification application, where there appears class or group label noise, we show that the SGR outperforms the group lasso. This is not surprising because the class or group label information is used as a core part of the group lasso while the group sparsity produced by the SGR is intrinsic, in that the SGR does not need the class label information as priors. Finally, we also note that the group level sparsity is of great interests due to its wide applications in various supervised learning settings. In this paper, we will state our results in a classification setting. In Section 2 we will review some closely related work, and we will introduce the robust minimax framework in Section 3. In Section 4, we will define the sparse grouping representation and prove a set of sufficient conditions for generating group level sparsity. An experimental verification on a low resolution face recognition task will be reported in Section 5. 2 Related Work In this paper, we will mainly work with the penalized linear regression problem and we shall review some closely related work here. For penalized linear regression, several well-studied regularization procedures are ridge regression or Tikhonov regularization [15], bridge regression [10], lasso [19] and subset selection [5], fused lasso [20], elastic net [27], group lasso [25], multiple kernel learning [3, 2], local coordinate coding [24], etc. The lasso has at least three prominent features to make itself a principled tool among all of these procedures: continuous shrinkage and automatic variable selection at the same time, computational tractability (can be solved by linear programming methods) as well as inducing sparsity. Recent results show that lasso can recover the solution of l0 regularization under certain regularity conditions [8, 6, 7]. Recent advances such as fused lasso [20], elastic net [27], group lasso [25] and local coordinate coding [24] are motivated by lasso [19]. Two concepts closely related to our work are the elastic net or grouping effect observed by [27] and the group lasso [25]. The elastic net model hybridizes lasso and ridge regression to preserve some redundancy for the variable selection, and it can be viewed as a stabilized version of lasso [27] and hence it is still biased. The group lasso can produce group level sparsity [25, 2] but it requires the group label information as prior. We shall see that in a novel classification application when there appears class label noise [22, 18, 17, 26], the group lasso fails. We will discuss the differences of various regularization procedures in a classification setting. We will use the basic schema for the sparse representation classification (SRC) algorithm proposed in [21], and different regularization procedures will be used to replace the lasso in the SRC. The proposed framework reveals a fundamental connection between robust linear regression and various regularized techniques using regularization terms of l0, l1, l2, etc. Although [11] first introduced a robust model for least square problem with uncertain data and [23] discussed a robust model for lasso, our results allow for using any positive regularization functions and a large family of loss functions. 3 Minimax Framework for Robust Linear Regression In this section, we will start with taking the loss function L as squared Euclidean norm, and we will generalize the results to other loss functions in section 3.4. 2 3.1 Notations and Problem Statement In a general M (M > 1)-classes classification setting, we are given a training dataset T = {(xi, gi)}n i=1, where xi ∈Rp is the feature vector and gi ∈{1, · · · , M} is the class label for the ith observation. A data (observation) matrix is formed as A = [x1, · · · , xn] of size p×n. Given a test example y, the goal is to determine its class label. 3.2 Distortion Models Assume that the jth class Cj has nj observations x(j) 1 , · · · , x(j) nj . If x belongs to the jth class, then x ∈span{x(j) 1 , · · · , x(j) nj }. We approximate y by a linear combination of the training examples: y = Aw + η, (3) where w = [w1, w2, · · · , wn]T is a vector of combining coefficients; and η ∈Rp represents a vector of additive zero-mean noise. We assume a Gaussian model v ∼N(0, σ2I) for this additive noise, so a least squares estimator can be used to compute the combining coefficients. The observed training dataset T may have undergone various noise or distortions. We define the following two classes of distortion models. Definition 1: A random matrix ∆A is called bounded example-wise (or attribute) distortion (BED) with a bound λ, denoted as BED(λ), if ∆A := [d1, · · · , dn], dk ∈Rp, ||dk||2 ≤λ, k = 1, · · · , n. where λ is a positive parameter. This distortion model assumes that each observation (signal) is distorted independently from the other observations, and the distortion has a uniformly upper bounded energy (“uniformity” refers to the fact that all the examples have the same bound). BED includes attribute noise defined in [22, 26], and some examples of BED include Gaussian noise and sampling noise in face recognition. Definition 2: A random matrix ∆A is called bounded coefficient distortion (BCD) with bound f, denoted as BCD(f), if ||∆Aw||2 ≤f(w), ∀w ∈Rp, where f(w) ∈R+ . The above definition allows for any distortion with or without inter-observation dependency. For example, we can take f(w) = λ||w||2, and Definition 2 with this f(w) means that the maximum eigenvalue of ∆A is upper limited by λ. This can be easily seen as follows. Denote the maximum eigenvalue of ∆A by σmax(∆A). Then we have σmax(∆A) = sup u,v̸=0 uT ∆Av ||u||2||v||2 = sup u̸=0 ||∆Au||2 ||u||2 , which is a standard result from the singular value decomposition (SVD) [12]. That is, the condition of ||∆Aw||2 ≤λ||w||2 is equivalent to the condition that the maximum eigenvalue of ∆A is upper bounded by λ. In fact, BED is a subset of BCD by using triangular inequality and taking special forms of f(w). We will use D := BCD to represent the distortion model. Besides the additive residue η generated from fitting models, to account for the above distortion models, we shall consider multiplicative noise by extending Equation (3) as follows: y = (A + ∆A)w + η, (4) where ∆A ∈D represents a possible distortion imposed to the observations. 3.3 Fundamental Theorem of Distortion Now with the above refined linear model that incorporates a distortion model, we estimate the model parameters w by minimizing the variance of Gaussian residues for the worst distortions within a permissible distortion set D. Thus our robust model is min w∈Rp max ∆A∈D ||y −(A + ∆A)w||2. (5) The above minimax estimation will be used in our robust framework. An advantage of this model is that it considers additive noise as well as multiplicative one within a class of allowable noise models. As the optimal estimation of the model parameter in Equation 3 (5), w∗, is derived for the worst distortion in D, w∗will be insensitive to any deviation from the underlying (unknown) noise-free examples, provided the deviation is limited to the tolerance level given by D. The estimate w∗thus is applicable to any A + ∆A with ∆A ∈D. In brief, the robustness of our framework is offered by modeling possible multiplicative noise as well as the consequent insensitivity of the estimated parameter to any deviations (within D) from the noise-free underlying (unknown) data. Moreover, this model can seamlessly incorporate either example-wise noise or class noise, or both. Equation (5) provides a clear interpretation of the robust model. In the following, we will give a theorem to show an equivalence relationship between the robust minimax model of Equation (5) and a general form of regularized linear regression procedure. Theorem 1. Equation (5) with distortion set D(f) is equivalent to the following generalized regularized minimization problem: min w∈Rp||y −Aw||2 + f(w). (6) Sketch of the proof: Fix w = w∗and establish equality between upper bound and lower bound. ||y −(A + ∆A)w∗||2 ≤||y −Aw∗||2 + ||∆Aw∗||2 ≤||y −Aw∗||2 + f(w∗). In the above we have used the triangle inequality of norms. If y −Aw∗̸= 0, we define u = (y −Aw∗)/||y −Aw∗||2. Since max ∆A∈Df(∆A) ≥f(∆A∗), by taking ∆A∗= −uf(w∗)t(w∗)T /k, where t(w∗ i ) = 1/w∗ i for w∗ i ̸= 0, t(w∗ i ) = 0 for w∗ i = 0 and k is the number of non-zero w∗ i (note that w∗is fixed so we can define t(w∗)), we can actually attain the upper bound. It is easily verified that the expression is also valid if y −Aw∗= 0. Theorem 1 gives an equivalence relationship between general regularized least squares problems and the robust regression under certain distortions. It should be noted that Equation (6) involves min ||.||2, and the standard form for least squares problem uses min ||.||2 2 as a loss function. It is known that these two coincide up to a change of the regularization coefficient so the following conclusions are valid for both of them. Several corollaries related to l0, l1, l2, elastic net, group lasso, local coordinate coding, etc., can be derived based on Theorem 1. Corollary 1: l0 regularized regression is equivalent to taking a distortion set D(f l0) where f l0(w) = t(w)wT , t(wi) = 1/wi for wi ̸= 0, t(wi) = 0 for wi = 0. Corollary 2: l1 regularized regression (lasso) is equivalent to taking a distortion set D(f l1) where f l1(w) = λ||w||1. Corollary 3: Ridge regression (l2) is equivalent to taking a distortion set D(f l2) where f l2(w) = λ||w||2. Corollary 4: Elastic net regression [27] (l2 + l1) is equivalent to taking a distortion set D(f e) where f e(w) = λ1||w||1 + λ2||w||2 2, with λ1 > 0, λ2 > 0. Corollary 5: Group lasso [25] (grouped l1 of l2) is equivalent to taking a distortion set D(f gl1) where f gl1(w) = Pm j=1 dj||wj||2, dj is the weight for jth group and m is the number of group. Corollary 6: Local coordinate coding [24] is equivalent to taking a distortion set D(f lcc) where f lcc(w) = Pn i=1 |wi|||xi −y||2 2, xi is ith basis, n is the number of basis, y is the test example. Similar results can be derived for multiple kernel learning [3, 2], overlapped group lasso [16], etc. 3.4 Generalization to Other Loss Functions From the proof of Theorem 1, we can see the Euclidean norm used in Theorem 1 can be generalized to other loss functions too. We only require the loss function is a proper norm in a normed vector space. Thus, we have the following Theorem for a general form of Equation (1). Theorem 2. Given the relationship function Iw(X) = y −Aw and J ∈R+ in a normed vector space, if the loss functional L is a norm, then Equation (1) is equivalent to the following minimax estimation with a distortion set D(J ): min w∈Rp max ∆A∈D(J ) L(y −(A + ∆A)w). (7) 4 4 Sparse Grouping Representation 4.1 Definition of SGR We consider a classification application where class noise is present. The class noise can be viewed as inter-example distortions. The following novel representation is proposed to deal with such distortions. Definition 3. Assume all examples are standardized with zero mean and unit variance. Let ρij = xT i xj be the correlation for any two examples xi, xj ∈T. Given a test example y, w ∈Rn is defined as a sparse grouping representation for y, if both of the following two conditions are satisfied, (a) If wi ≥ǫ and ρij > δ, then |wi −wj| →0 (when δ →1) for all i and j. (b) If wi < ǫ and ρij > δ, then wj →0 (when δ →1) for all i and j. Especially, ǫ is the sparsity threshold, and δ is the grouping threshold. This definition requires that if two examples are highly correlated, then the resulted coefficients tend to be identical. Condition (b) produces sparsity by requiring that these small coefficients will be automatically thresholded to zero. Condition (a) preserves grouping effects [27] by selecting all these coefficients which are larger than a certain threshold. In the following we will provide sufficient conditions for the distortion set D(J ) to produce this group level sparsity. 4.2 Group Level Sparsity As known, D(l1) or lasso can only select arbitrarily one example from many identical candidates [27]. This leads to the sensitivity to the class noise as the example lasso chooses may be mislabeled. As a consequence, the sparse representation classification (SRC), a lasso based classification schema [21], is not suitable for applications in the presence of class noise. The group lasso can produce group level sparsity, but it uses group label information to restrict the distribution of the coefficients. When there exists group label noise or class noise, group lasso will fail because it cannot correctly determine the group. Definition 3 says that the SGR is defined by example correlations and thus it will not be affected by class noise. In the general situation where the examples are not identical but have high within-class correlations, we give the following theorem to show that the grouping is robust in terms of data correlation. From now on, for distortion set D(f(w)), we require that f(w) = 0 for w = 0 and we use a special form of f(w), which is a sum of components fj(w), f(w) = µ n X j=1 fj(wj). Theorem 3. Assume all examples are standardized. Let ρij = xT i xj be the correlation for any two examples. For a given test example y, if both fi ̸= 0 and fj ̸= 0 have first order derivatives, we have |f ′ i −f ′ j| ≤2||y||2 µ q 2(1 −ρij). (8) Sketch of the proof: By differentiating ||y −Aw||2 2 + P fj with respect to wi and wj respectively, we have −2xT i {y −Aw} + µf ′ i = 0 and −2xT j {y −Aw} + µf ′ j = 0. The difference of these two equations is f ′ i −f ′ j = 2(xT i −xT j )r µ where r = y −Aw is the residual vector. Since all examples are standardized, we have ||xT i −xT j ||2 2 = 2(1 −ρij) where ρ = xT i xj. For a particular value w = 0, we have ||r||2 = ||y||2, and thus we can get ||r||2 ≤||y||2 for the optimal value of w. Combining r and ||xT i −xT j ||2, we proved the Theorem 3. This theorem is different from the Theorem 1 in [27] in the following aspects: a) we have no restrictions on the sign of the wi or wj; b) we use a family of functions which give us more choices to bound the coefficients. As aforementioned, it is not necessary for fi to be the same with fj and we even can use different growth rates for different components; and c) f ′ i(wi) does not have to be wi and a monotonous function with very small growth rate would be enough. 5 As an illustrative example, we can choose fi(wi) or fj(wj) to be a second order function with respect to wi or wj. Then the resulted |f ′ i −f ′ j| will be the difference of the coefficients λ|wi −wj| with a constant λ. If the two examples are highly correlated and µ is sufficiently large, then we can conclude that the difference of the coefficients will be close to zero. The sparsity implies an automatic thresholding ability with which all small estimated coefficients will be shrunk to zero, that is, f(w) has to be singular at the point w = 0 [9]. Incorporating this requirement with Theorem 3, we can achieve group level sparsity: if some of the group coefficients are small and automatically thresholded to zero, all other coefficients within this group will be reset to zero too. This correlation based group level sparsity does not require any prior information on the distribution of group labels. To make a good estimator, there are still two properties we have to consider: continuity and unbiasedness [9]. In short, to avoid instability, we always require the resulted estimator for w be a continuous function; and a sufficient condition for unbiasedness is that f ′(|w|) = 0 when |w| is large. Generally, the requirement of stability is not consistent with that of sparsity. Smoothness determines the stability and singularity at zero measures the degree of sparsity. As an extreme example, l1 can produce sparsity while l2 does not because l1 is singular while l2 is smooth at zero; at the same time, l2 is more stable than l1. More details regarding these conditions can be found in [1, 9]. 4.3 Sufficient Condition for SGR Based on the above discussion, we can readily construct a sparse grouping representation based on Equation (5) where we only need to specify a distortion set D(f ∗(w)) satisfying the following sufficient conditions: Lemma 1: Sufficient condition for SGR. (a). f ∗ j ′′ ∈R+ for all f ′ j ̸= 0. (b). f ∗ j is continuous and singular at zero with respect to wj for all j. (c). f ∗ j ′(|wj|) = 0 for large |wj| for all j. Proof: Together with Theorem 3, it is easy to be verified. As we can see, the regularization term λl1 +(1−λ)l2 2 proposed by [27] satisfies the above condition (a) and (b), but it fails to comply with (c). So, it may become biased for large |w|. Based on these conditions, we can easily construct regularization terms f ∗to generate the sparse grouping representation. We will call these f ∗as core functions for producing the SGR. As some concrete examples, we can construct a large family of clipped µ1Lq + µ2l2 2 where 0 < q ≤1 by restricting f ′ i = wiI(|wi| < ǫ) + c for some constant ǫ and c. Also, SCAD [9] satisfies all three conditions so it belongs to f ∗. This gives more theoretic justifications for previous empirical success of using SCAD. 4.4 Generalization Bounds for Presence of Class Noise We will follow the algorithm given in [21] and merely replace the lasso with the SGR or group lasso. After estimating the (minimax) optimal combining coefficient vector w∗by the SGR or group lasso, we may calculate the distance from the new test data y to the projected point in the subspace spanned by class Ci: di(A, w∗|Ci) = di(A|Ci, w∗) = ||y −Aw∗|Ci||2 (9) where w∗|Ci represents restricting w∗to the ith class Ci; that is, (w∗|Ci)j = w∗ j 1(xj ∈Ci), where 1(·) is an indicator function; and similarly A|Ci represents restricting A to the ith class Ci. A decision rule may be obtained by choosing the class with the minimum distance: ˆi = argmini∈{1,··· ,M}{di}. (10) Based on these notations, we now have the following generalization bounds for the SGR in the presence of class noise in the training data. Theorem 4. All examples are standardized to be zero mean and unit variance. For an arbitrary class Ci of N examples, we have p (p < 0.5) percent (fault level) of labels mis-classified into class 6 Ck ̸= Ci. We assume w is a sparse grouping representation for any test example y and ρij > δ (δ is in Definition 3) for any two examples. Under the distance function d(A|Ci, w) = d(A, w|Ci) = ||y −Aw|Ci||2 and f ′ j = w for all j, we have confidence threshold τ to give correct estimation ˆi for y, where τ ≤(1 −p) × N × (w0)2 d , where w0 is a constant and the confidence threshold is defined as τ = di(A|Ci) −di(A|Ck). Sketch of the proof: Assume y is in class Ci. The correctly labeled (mislabeled, respectively) subset for Ci is C1 i (C2 i , respectively) and the size of set C1 i is larger than that of C2 i . We use A1w to denote Aw|C1 i and A2w to denote Aw|C2 i . By triangular inequality, we have τ = ||y −Aw|C1 i ||2 −||y −Aw|C2 i ||2 ≤||A1w −A2w||2. For each k ∈C1 i , we differentiate with respect to wk and do the same procedure as in proof of Theorem 3. Then summarizing all equalities for C1 i and repeating the same procedure for each i ∈C2 i . Finally we subtract the summation of C2 i from the summation of C1 i . Use the conditions that w is a sparse grouping representation and ρij > δ, combing Definition 3, so all wk in class Ci should be the same as a constant w0 while others →0. By taking the l2-norm for both sides, we have ||A1w −A2w||2 ≤(1−p)N(w0)2 d . This theorem gives an upper bound for the fault-tolerance against class noise. By this theorem, we can see that the class noise must be smaller than a certain value to guarantee a given fault correction confidence level τ. 5 Experimental Verification In this section, we compare several methods on a challenging low-resolution face recognition task (multi-class classification) in the presence of class noise. We use the Yale database [4] which consists of 165 gray scale images of 15 individuals (each person is a class). There are 11 images per subject, one per different facial expression or configuration: center-light, w/glasses, happy, left-light, w/no glasses, normal, right-light, sad, sleepy, surprised, and wink. Starting from the orignal 64 × 64 images, all images are down-sampled to have a dimension of 49. A training/test data set is generated by uniformly selecting 8 images per individual to form the training set, and the rest of the database is used as the test set; repeating this procedure to generate five random split copies of training/test data sets. Five class noise levels are tested. Class noise level=p means there are p percent of labels (uniformly drawn from all labels of each class) mislabeled for each class. For SVM, we use the standard implementation of multiple-class (one-vs-all) LibSVM in MatlabArsenal1. For lasso based SRC, we use the CVX software [13, 14] to solve the corresponding convex optimization problems. The group lasso based classifier is implemented in the same way as the SRC. We use a clipped λl1 + (1 −λ)l2 as an illustrative example of the SGR, and the corresponding classifier is denoted as SGRC. For lasso, group Lasso and the SGR based classifier, we run through λ ∈{0.001, 0.005, 0.01, 0.05, 0.1, 0.2} and report the best results for each classifier. Figure 1 (b) shows the parameter range of λ that is appropriate for lasso, group lasso and the SGR based classifier. Figure 1 (a) shows that the SGR based classifier is more robust than lasso or group lasso based classifier in terms of class noise. These results verify that in a novel application when there exists class noise in the training data, the SGR is more suitable than group lasso for generating group level sparsity. 6 Conclusion Towards a better understanding of various regularized procedures in robust linear regression, we introduce a robust minimax framework which considers both additive and multiplicative noise or distortions. Within this unified framework, various regularization terms correspond to different 1A matlab package for classification algorithms which can be downloaded from http://www.informedia.cs.cmu.edu/yanrong/MATLABArsenal/MATLABArsenal.htm. 7 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Class noise level Classification error rate SVM SRC SGRC Group lasso (a) 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 λ Classification error rate SRC SGRC Group lasso (b) Figure 1: (a) Comparison of SVM, SRC (lasso), SGRC and Group lasso based classifiers on the low resolution Yale face database. At each level of class noise, the error rate is averaged over five copies of training/test datasets for each classifier. For each classifier, the variance bars for each class noise level are plotted. (b) Illustration of the paths for SRC (lasso), SGRC and group lasso. λ is the weight for regularization term. All data points are averaged over five copies with the same class noise level of 0.2. distortions to the original data matrix. We further investigate a novel sparse grouping representation (SGR) and prove sufficient conditions for generating such group level sparsity. We also provide a generalization bound for the SGR. In a novel classification application when there exists class noise in the training example, we show that the SGR is more robust than group lasso. The SCAD and clipped elastic net are special instances of the SGR. References [1] A. Antoniadis and J. Fan. Regularitation of wavelets approximations. J. the American Statistical Association, 96:939–967, 2001. [2] F. Bach. Consistency of the group lasso and multiple kernel learning. Journal of Machine Learning Research, 9:1179–1225, 2008. [3] F. Bach, G. R. G. Lanckriet, and M. I. Jordan. Multiple kernel learning, conic duality, and the smo algorithm. In Proceedings of the Twenty-first International Conference on Machine Learning, 2004. [4] P. N. Bellhumer, J. Hespanha, and D. Kriegman. Eigenfaces vs. fisherfaces: Recognition using class specific linear projection. IEEE Trans. Pattern Anal. Mach. Intelligence, 17(7):711–720, 1997. [5] L. Breiman. Heuristics of instability and stabilization in model selection. Ann. Statist., 24:2350–2383, 1996. [6] E. Cand´es, J. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Comm. on Pure and Applied Math, 59(8):1207–1233, 2006. [7] E. Cand´es and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Trans. Information Theory, 52(12):5406–5425, 2006. [8] D. Donoho. For most large underdetermined systems of linear equations the minimum l1 nom solution is also the sparsest solution. Comm. on Pure and Applied Math, 59(6):797–829, 2006. [9] J. Fan and R. Li. Variable selection via nonconcave penalized likelihood and its oracle properties. J. Am. Statist. Ass., 96:1348–1360, 2001. [10] I. Frank and J. Friedman. A statistical view of some chemometrics regression tools. Technometrics, 35:109–148, 1993. [11] L. El Ghaoui and H. Lebret. Robust solutions to least-squares problems with uncertain data. SIAM Journal Matrix Analysis and Applications, 18:1035–1064, 1997. [12] G.H. Golub and C.F. Van Loan. Matrix computations. Johns Hopkins Univ Pr, 1996. 8 [13] M. Grant and S. Boyd. Graph implementations for nonsmooth convex programs, recent advances in learning and control. Lecture Notes in Control and Information Sciences, pages 95–110, 2008. [14] M. Grant and S. Boyd. UCI machine learning repositorycvx: Matlab software for disciplined convex programming, 2009. [15] A. Hoerl and R. Kennard. Ridge regression. Encyclpedia of Statistical Science, 8:129–136, 1988. [16] L. Jacob, G. Obozinski, and J.-P. Vert. Group lasso with overlap and graph lasso. In Proceedings of the Twenty-six International Conference on Machine Learning, pages 433–440, 2009. [17] J. Maletic and A. Marcus. Data cleansing: Beyond integrity analysis. In Proceedings of the Conference on Information Quality, 2000. [18] K. Orr. Data quality and systems theory. Communications of the ACM, 41(2):66–71, 1998. [19] R. Tibshirani. Regression shrinkage and selection via the lasso. J. R. Statist. Soc. B, 58:267– 288, 1996. [20] R. Tibshirani, M. Saunders, S. Rosset, J. Zhu, and K. Knight. Sparsity and smoothness via the fused lasso. J.R.Statist.Soc.B, 67:91–108, 2005. [21] J. Wright, A.Y. Yang, A. Ganesh, S.S. Sastry, and Y. Ma. Robust face recognition via sparse representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 210– 227, 2009. [22] X. Wu. Knowledge Acquisition from Databases. Ablex Pulishing Corp, Greenwich, CT, USA, 1995. [23] H. Xu, C. Caramanis, and S. Mannor. Robust regression and lasso. In NIPS, 2008. [24] K. Yu, T. Zhang, and Y. Gong. Nonlinear learning using local coordinate coding. In Advances in Neural Information Processing Systems, volume 22, 2009. [25] 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. [26] X. Zhu, X. Wu, and S. Chen. Eliminating class noise in large datasets. In Proceedings of the 20th ICML International Conference on Machine Learning, Washington D.C., USA, March 2003. [27] H. Zou and T. Hastie. Regularization and variable selection via the elastic net. J. R. Statist. Soc. B, 67(2):301–320, 2005. 9
2010
130
3,889
Learning Concept Graphs from Text with Stick-Breaking Priors America L. Chambers Department of Computer Science University of California, Irvine Irvine, CA 92697 ahollowa@ics.uci.edu Padhraic Smyth Department of Computer Science University of California, Irvine Irvine, CA 92607 smyth@ics.uci.edu Mark Steyvers Department of Cognitive Science University of California, Irvine Irvine, CA 92697 mark.steyvers@uci.edu Abstract We present a generative probabilistic model for learning general graph structures, which we term concept graphs, from text. Concept graphs provide a visual summary of the thematic content of a collection of documents—a task that is difficult to accomplish using only keyword search. The proposed model can learn different types of concept graph structures and is capable of utilizing partial prior knowledge about graph structure as well as labeled documents. We describe a generative model that is based on a stick-breaking process for graphs, and a Markov Chain Monte Carlo inference procedure. Experiments on simulated data show that the model can recover known graph structure when learning in both unsupervised and semi-supervised modes. We also show that the proposed model is competitive in terms of empirical log likelihood with existing structure-based topic models (hPAM and hLDA) on real-world text data sets. Finally, we illustrate the application of the model to the problem of updating Wikipedia category graphs. 1 Introduction We present a generative probabilistic model for learning concept graphs from text. We define a concept graph as a rooted, directed graph where the nodes represent thematic units (called concepts) and the edges represent relationships between concepts. Concept graphs are useful for summarizing document collections and providing a visualization of the thematic content and structure of large document sets - a task that is difficult to accomplish using only keyword search. An example of a concept graph is Wikipedia’s category graph1. Figure 1 shows a small portion of the Wikipedia category graph rooted at the category MACHINE LEARNING2. From the graph we can quickly infer that the collection of machine learning articles in Wikipedia focuses primarily on evolutionary algorithms and Markov models with less emphasis on other aspects of machine learning such as Bayesian networks and kernel methods. The problem we address in this paper is that of learning a concept graph given a collection of documents where (optionally) we may have concept labels for the documents and an initial graph structure. In the latter scenario, the task is to identify additional concepts in the corpus that are 1http://en.wikipedia.org/wiki/Category:Main topic classifications 2As of May 5, 2009 1 Machine learning Learning Education Computational Statistics Statistics Algorithms Society Knowledge Knowledge Sharing Mathematical Sciences Software Engineering Computing Computer Programming Applied Mathematics Computer Science Formal Sciences Applied Sciences Cognition Philosophy Of mind Cognitive Science Philosophy By field Metaphysics Artificial Intelligence Probability and Statistics Thought Figure 1: A portion of the Wikipedia category supergraph for the node MACHINE LEARNING Bayesian Networks Classification Algorithms Ensemble Learning Genetic Algorithms Kernel Methods Genetic Programming Interactive Evolutionary Computation Learning in Computer Vision Markov Networks Statistical Natural Language Processing Evolutionary Algorithms Markov Models Machine Learning Figure 2: A portion of the Wikipedia category subgraph rooted at the node MACHINE LEARNING not reflected in the graph or additional relationships between concepts in the corpus (via the cooccurrence of concepts in documents) that are not reflected in the graph. This is particularly suited for document collections like Wikipedia where the set of articles is changing at such a fast rate that an automatic method for updating the concept graph may be preferable to manual editing or re-learning the hierarchy from scratch. The foundation of our approach is latent Dirichlet allocation (LDA) [1]. LDA is a probabilistic model for automatically identifying topics within a document collection where a topic is a probability distribution over words. The standard LDA model does not include any notion of relationships, or dependence, between topics. In contrast, methods such as the hierarchical topic model (hLDA) [2] learn a set of topics in the form of a tree structure. The restriction to tree structures however is not well suited for large document collections like Wikipedia. Figure 1 gives an example of the highly non-tree like nature of the Wikipedia category graph. The hierarchical Pachinko allocation model (hPAM) [3] is able to learn a set of topics arranged in a fixedsized graph with a nonparametric version introduced in [4]. The model we propose in this paper is a simpler alternative to hPAM and nonparametric hPAM that can achieve the same flexibility (i.e. learning arbitrary directed acyclic graphs over a possibly infinite number of nodes) within a simpler probabilistic framework. In addition, our model provides a formal mechanism for utilizing labeled data and existing concept graph structures. Other methods for creating concept graphs include the use of techniques such as hierarchical clustering, pattern mining and formal concept analysis to construct ontologies from document collections [5, 6, 7]. Our approach differs in that we utilize a probabilistic framework which enables us (for example) to make inferences about concepts and documents. Our primary novel contribution is the introduction of a flexible probabilistic framework for learning general graph structures from text that is capable of utilizing both unlabeled documents as well as labeled documents and prior knowledge in the form of existing graph structures. In the next section we introduce the stick-breaking distribution and show how it can be used as a prior for graph structures. We then introduce our generative model and explain how it can be adapted for the case where we have an initial graph structure. We derive collapsed Gibbs’ sampling equations for our model and present a series of experiments on simulated and real text data. We compare our performance against hLDA and hPAM as baselines. We conclude with a discussion of the merits and limitations of our approach. 2 2 Stick-breaking Distributions Stick-breaking distributions P(·) are discrete probability distributions of the form: P(·) = ∞ X j=1 πjδxj(·) where ∞ X j=1 πj = 1, 0 ≤πj ≤1 and δxj(·) is the delta function centered at the atom xj. The xj variables are sampled independently from a base distribution H (where H is assumed to be continuous). The stick-breaking weights πj have the form π1 = v1, πj = vj j−1 Y k=1 (1 −vk) for j = 2, 3, . . . , ∞ where the vj are independent Beta(αj, βj) random variables. Stick-breaking distributions derive their name from the analogy of repeatedly breaking the remainder of a unit-length stick at a randomly chosen breakpoint. See [8] for more details. Unlike the Chinese restaurant process, the stick-breaking process lacks exchangeability. The probability of sampling a particular cluster from P(·) given the sequences {xj} and {vj} is not equal to the probability of sampling the same cluster given a permutation of the sequences {xσ(j)} and {vσ(j)}. This can be seen in Equation 2 where the probability of sampling xj depends upon the value of the j −1 proceeding Beta random variables {v1, v2, . . . , vj−1}. If we fix xj and permute every other atom, then the probability of sampling xj changes: it is now determined by the Beta random variables {vσ(1), vσ(2), . . . , vσ(j−1)}. The stick-breaking distribution can be utilized as a prior distribution on graph structures. We construct a prior on graph structures by specifying a distribution at each node (denoted as Pt) that governs the probability of transitioning from node t to another node in the graph. There is some freedom in choosing Pt; however we have two constraints. First, making a new transition must have non-zero probability. In Figure 1 it is clear that from MACHINE LEARNING we should be able to transition to any of its children. However we may discover evidence for passing directly to a leaf node such as STATISTICAL NATURAL LANGUAGE PROCESSING (e.g. if we observe new articles related to statistical natural language processing that do not use Markov models). Second, making a transition to a new node must have non-zero probability. For example, we may observe new articles related to the topic of Bioinformatics. In this case, we want to add a new node to the graph (BIOINFORMATICS) and assign some probability of transitioning to it from other nodes. With these two requirements we can now provide a formal definition for Pt. We begin with an initial graph structure G0 with t = 1 . . . T nodes. For each node t we define a feasible set Ft as the collection of nodes to which t can transition. The feasible set may contain the children of node t or possible child nodes of node t (as discussed above). In general, Ft is some subset of the nodes in G0. We add a special node called the ”exit node” to Ft. If we sample the exit node then we exit from the graph instead of transitioning forward. We define Pt as a stick-breaking distribution over the finite set of nodes Ft where the remaining probability mass is assigned to an infinite set of new nodes (nodes that exist but have not yet been observed). The exact form of Pt is shown below. Pt(·) = |Ft| X j=1 πtjδftj(·) + ∞ X j=|Ft|+1 πtjδxtj(·) The first |Ft| atoms of the stick-breaking distribution are the feasible nodes ftj ∈Ft. The remaining atoms are unidentifiable nodes that have yet to be observed (denoted as xtj for simplicity). This is not yet a working definition unless we explicitly state which nodes are in the set Ft. Our model does not in general assume any specific form for Ft. Instead, the user is free to define it as they like. In our experiments, we first assign each node to a unique depth and then define Ft as any node at the next lower depth. The choice of Ft determines the type of graph structures that can be learned. For the choice of Ft used in this paper, edges that traverse multiple depths are not allowed and edges between nodes at the same depth are not allowed. This prevents cycles from forming and allows inference to be performed in a timely manner. More generally, one could extend the definition of Ft to include any node at a lower depth. 3 1. For node t ∈{1, . . . , ∞} i. Sample stick-break weights {vtj}|α, β ∼Beta(α, β) ii. Sample word distribution φt|η ∼Dirichlet(η) 2. For document d ∈{1, 2, . . . D} i. Sample a distribution over levels τd|a, b ∼Beta(a,b) ii. Sample path pd ∼{Pt}∞ t=1 iii. For word i ∈{1, 2, . . . , Nd} Sample level ld,i ∼TruncatedDiscrete(τd) Generate word xd,i|{pd, ld,i, Φ} ∼Multinomial(φpd[ldi]) Figure 3: Generative process for GraphLDA Due to a lack of exchangeability, we must specify the stick-breaking order of the elements in Ft. Note that despite the order, the elements of Ft always occur before the infinite set of new nodes in the stick-breaking permutation. We use a Metropolis-Hastings sampler proposed by [10] to learn the permutation of feasible nodes with the highest likelihood given the data. 3 Generative Process Figure 3 shows the generative process for our proposed model, which we refer to as GraphLDA. We observe a collection of documents d = 1 . . . D where document d has Nd words. As discussed earlier, each node t is associated with a stick-breaking prior Pt. In addition, we associate with each node a multinomial distribution φt over words in the fashion of topic models. A two-stage process is used to generate document d. First, a path through the graph is sampled from the stick-breaking distributions. We denote this path as pd. The i + 1st node in the path is sampled from Ppdi(·) which is the stick-breaking distribution at the ith node in the path. This process continues until an exit node is sampled. Then for each word xi a level in the path, ldi, is sampled from a truncated discrete distribution. The word xi is generated by the topic at level ldi of the path pd which we denote as pd[ldi]. In the case where we observe labeled documents and an initial graph structure the paths for document d is restricted to end at the concept label of document d. One possible option for the length distribution is a multinomial distribution over levels. We take a different approach and instead use a parametric smooth form. The motivation is to constrain the length distribution to have the same general functional form across documents (in contrast to the relatively unconstrained multinomial), but to allow the parameters of the distribution to be documentspecific. We considered two simple options: Geometric and Poisson (both truncated to the number of possible levels). In initial experiments the Geometric performed better than the Poisson, so the Geometric was used in all experiments reported in this paper. If word xdi has level ldi = 0 then the word is generated by the topic at the last node on the path and successive levels correspond to earlier nodes in the path. In the case of labeled documents, this matches our belief that a majority of words in the document should be assigned to the concept label itself. 4 Inference We marginalize over the topic distributions φt and the stick-breaking weights {vtj}. We use a collapsed Gibbs sampler [9] to infer the path assignment pd for each document, the level distribution parameter τd for each document, and the level assignment ldi for each word. Of the five hyperparameters in the model, inference is sensitive to the value of β and η so we place an Exponential prior on both and use a Metropolis-Hastings sampler to learn the best setting. 4.1 Sampling Paths For each document, we must sample a path pd conditioned on all other paths p−d, the level variables, and the word tokens. We only consider paths whose length is greater than or equal to the maximum 4 level of the words in the document. p(pd|x, l, p−d, τ) ∝p(xd|x−d, l, p) · p(pd|p−d) (1) The first term in Equation 1 is the probability of all words in the document given the path pd. We compute this probability by marginalizing over the topic distributions φt: p(xd|x−d, l, p) = λd Y l=1 VY v=1 Γ(η + Npd[l],v) Γ(η + N −d pd[l],v) ! ∗ Γ(V η + P v N −d pd[l],v) Γ(V η + P v Npd[l],v) We use λd to denote the length of path pd. The notation Npd[l],v stands for the number of times word type v has been assigned to node pd[l]. The superscript −d means we first decrement the count Npd[l],v for every word in document d. The second term is the conditional probability of the path pd given all other paths p−d. We present the sampling equation under the assumption that there is a maximum number of nodes M allowed at each level. We first consider the probability of sampling a single edge in the path from a node x to one of its feasible nodes {y1, y2, . . . , yM} where the node y1 has the first position in the stickbreaking permutation, y2 has the second position, y3 the third and so on. We denote the number of paths that have gone from x to yi as N(x,yi). We denote the number of paths that have gone from x to a node with a strictly higher position in the stick-breaking distribution than yi as N(x,>yi). That is, N(x,>yi) = PM k=i+1 N(x,yk). Extending this notation we denote the sum N(x,yi) + N(x,>yi) as N(x,≥yi). The probability of selecting node yi is given by: p(x →yi | p−d) = α + N(x,yi) α + β + N(x,≥yi) i−1 Y r=1 β + N(x,>yr) α + β + N(x,≥yr) for i = 1 . . . M If ym is the last node with a nonzero count N(x,ym) and m << M it is convenient to compute the probability of transitioning to yi, for i ≤m, and the probability of transitioning to any node higher than ym. The probability of transitioning to a node higher than ym is given by M X k=m+1 p(x →yk|p−d) = ∆ " 1 − β α + β M−m# where ∆= Qm r=1 β+N(x,>yr) α+β+N(x,≥yr) . A similar derivation can be used to compute the probability of sampling a node higher than ym when M is equal to infinity. Now that we have computed the probability of a single edge, we can compute the probability of an entire path pd: p(pd|p−d) = λd Y j=1 p(pdj →pd,j+1|p−d) 4.2 Sampling Levels For the ith word in the dth document we must sample a level ldi conditioned on all other levels l−di, the document paths, the level parameters τ, and the word tokens. p(ldi|x, l−di, p, τ) = η + N −di pd[ldi],xdi Wη + N −di pd[ldi],· ! · (1 −τd)ldi τd (1 −(1 −τd)λd+1) The first term is the probability of word type xdi given the topic at node pd[ldi]. The second term is the probability of the level ldi given the level parameter τd. 4.3 Sampling τ Variables Finally, we must sample the level distribution τd conditioned on the rest of the level parameters τ −d, the level variables, and the word tokens. p(τd|x, l, p, τ −d) = Nd Y i=1 (1 −τd)ldi τd (1 −(1 −τd)λd+1) ! ∗ τ a−1 d (1 −τd)b−1 B a, b  ! (2) 5 1 2 3 4 5 6 7 8 9 10 973 1069 957 486 331 385 524 524 278 306 453 513 154 (a) Simulated Graph 1 2 3 4 5 6 7/10 4 9 8/4 973 1060 957 496 194 545 515 682 275 316 423 4 275 3/10 9 20 20 9 (b) Learned Graph (0 labeled documents) 1 2 3 4/7 5/1 6/9 7/10 8/4/1 9/2 10 972 1057 968 484 235 384 512 274 283 26 245 24 5/2 2 2 1 268 (c) Learned Graph (250 labeled documents) 1 2 3 4 5 6 7 8 9 10 973 1069 957 486 331 385 524 524 278 306 453 513 154 (d) Learned Graph (4000 labeled documents) Figure 4: Learning results with simulated data Due to the normalization constant (1 −(1 −τd)λd+1), Equation 2 is not a recognizable probability distribution and we must use rejection sampling. Since the first term in Equation 2 is always less than or equal to 1, the sampling distribution is dominated by a Beta(a, b) distribution. According to the rejection sampling algorithm, we sample a candidate value for τd from Beta(a, b) and either accept with probability QNd i=1 (1−τd)ldi τd (1−(1−τd)λd+1) or reject and sample again. 4.4 Metropolis Hastings for Stick-Breaking Permutations In addition to the Gibbs sampling, we employ a Metropolis Hastings sampler presented in [10] to mix over stick-breaking permutations. Consider a node x with feasible nodes {y1, y2, . . . , yM}. We sample two feasible nodes yi and yj from a uniform distribution3. Assume yi comes before yj in the stick-breaking distribution. Then the probability of swapping the position of nodes yi and yj is given by min ( 1, N(x,yi)−1 Y k=0 α + β + N ∗ (x,>yi) + k α + β + N(x,>yj) + k · N(x,yj )−1 Y k=0 α + β + N(x,>yj) + k α + β + N ∗ (x,>yi) + k ) where N ∗ (x,>yi) = N(x,>yi) −N(x,yj). See [10] for a full derivation. After every new path assignment, we propose one swap for each node in the graph. 5 Experiments and Results In this section, we present experiments performed on both simulated and real text data. We compare the performance of GraphLDA against hPAM and hLDA. 5.1 Simulated Text Data In this section, we illustrate how the performance of GraphLDA improves as the fraction of labeled data increases. Figure 4(a) shows a simulated concept graph with 10 nodes drawn according to the 3In [10] feasible nodes are sampled from the prior probability distribution. However for small values of α and β this results in extremely slow mixing. 6 stick-breaking generative process with parameter values η = .025, α = 10, β = 10, a = 2 and b = 5. The vocabulary size is 1, 000 words and we generate 4, 000 documents with 250 words each. Each edge in the graph is labeled with the number of paths that traverse it. Figures 4(b)-(d) show the learned graph structures as the fraction of labeled data increases from 0 labeled and 4, 000 unlabeled documents to all 4, 000 documents being labeled. In addition to labeling the edges, we label each node based upon the similarity of the learned topic at the node to the topics of the original graph structure. The Gibbs sampler is initialized to a root node when there is no labeled data. With labeled data, the Gibbs sampler is initialized with the correct placement of nodes to levels. The sampler does not observe the edge structure of the graph nor the correct number of nodes at each level (i.e. the sampler may add additional nodes). With no labeled data, the sampler is unable to recover the relationship between concepts 8 and 10 (due to the relatively small number of documents that contain words from both concepts). With 250 labeled documents, the sampler is able to learn the correct placement of both nodes 8 and 10 (although the topics contain some noise). 5.2 Wikipedia Articles In this section, we compare the performance of GraphLDA to hPAM and hLDA on a set of 518 machine-learning articles taken from Wikipedia. The input to each model is only the article text. All models are restricted to learning a three-level hierarchical structure. For both GraphLDA and hPAM, the number of nodes at each level was set to 25. For GraphLDA, the parameters were fixed at α = 1, a = 1 and b = 1. The parameters β and η were initialized to 1 and .001 respectively and optimized using a Metropolis Hastings sampler. We used the MALLET toolkit implementation of hPAM4 and hLDA [11]. For hPAM, we used different settings for the topic hyperparameter η = (.001, .01, .1). For hLDA we set η = .1 and considered γ = (.1, 1, 10) where γ is the smoothing parameter for the Chinese restaurant process and α = (.1, 1, 10) where α is the smoothing over levels in the graph. All models were run for 9, 000 iterations to ensure burn-in and samples were taken every 100 iterations thereafter, for a total of 10, 000 iterations. The performance of each model was evaluated on a hold-out set consisting of 20% of the articles using both empirical likelihood and the left-toright evaluation algorithm (see Sections 4.1 and 4.5 of [12]) which are measures of generalization to unseen data. For both GraphLDA and hLDA we use the distribution over paths that was learned during training to compute the per-word log likelihood. For hPAM we compute the MLE estimate of the Dirichlet hyperparameters for both the distribution over super-topics and the distributions over sub-topics from the training documents. Table 5.2 shows the per-word log-likelihood for each model averaged over the ten samples. GraphLDA is competitive when computing the empirical log likelihood. We speculate that GraphLDA’s lower performance in terms of left-to-right log-likelihood is due to our choice of the geometric distribution over levels (and our choice to position the geometric distribution at the last node of the path) and that a more flexible approach could result in better performance. Table 1: Per-word log likelihood of test documents Model Parameters Empirical LL Left-to-Right LL GraphLDA MH opt. -7.10 ± .003 -7.13 ± .009 hPAM η = .1 -7.36 ± .013 -6.11 ± .007 η = .01 -7.33 ± .012 -6.47 ± .012 η = .001 -7.38 ± .006 -6.71 ± .013 hLDA γ = .1, α = .1 -7.10 ± .004 -6.82 ± .007 γ = .1, α = 1 -7.09 ± .003 -6.86 ± .006 γ = .1, α = 10 -7.08 ± .003 -6.90 ± .008 γ = 1, α = .1 -7.08 ± .003 -6.83 ± .007 γ = 1, α = 1 -7.08 ± .002 -6.86 ± .006 γ = 1, α = 10 -7.06 ± .003 -6.88 ± .008 γ = 10, α = .1 -7.07 ± .004 -6.81 ± .006 γ = 10, α = 1 -7.07 ± .003 -6.83± .005 γ = 10, α = 10 -7.06 ± .003 -6.88 ± .010 7 set data learning concept model learning data model method kernel learning dimensionality classification reduction method algorithm svm vector problem multiclass clustering data principal component kmeans model noise algorithm hidden training model selection rbm algorithm feature learning policy decision graph function model multitask inference Bayesian Dirichlet variables node network parent Bayesian decision classification class classifier data classifier boosting ensemble hypothesis margin evolution evolutionary algorithm individual search kernel linear space vector point Markov time probability chain distribution network neural neuron cnn function genetic fitness mutation selection solution graph Markov network random field word topic language model document learning algorithm kernel convex constraint Figure 5: Wikipedia graph structure with additional machine learning abstracts. The edge widths correspond to the probability of the edge in the graph 5.3 Wikipedia Articles with a Graph Structure In our final experiment we illustrate how GraphLDA can be used to update an existing category graph. We use the aforementioned 518 machine-learning Wikipedia articles, along with their category labels, to learn topic distributions for each node in Figure 1. The sampler is initialized with the correct placement of nodes and each document is initialized to a random path from the root to its category label. After 2, 000 iterations, we fix the path assignments for the Wikipedia articles and introduce a new set of documents. We use a collection of 400 machine learning abstracts from the International Conference on Machine Learning (ICML). We sample paths for the new collection of documents keeping the paths from the Wikipedia articles fixed. The sampler was allowed to add new nodes to each level to explain any new concepts that occurred in the ICML text set. Figure 5 illustrates a portion of the final graph structure. The nodes in bold are the original nodes from the Wikipedia category graph. The results show that the model is capable of augmenting an existing concept graph with new concepts (e.g. clustering, support vector machines (SVMs), etc.) and learning meaningful relationships (e.g. boosting/ensembles are on the same path as the concepts for SVMs and neural networks). 6 Discussion and Conclusion Motivated by the increasing availability of large-scale structured collections of documents such as Wikipedia, we have presented a flexible non-parametric Bayesian framework for learning concept graphs from text. The proposed approach can combine unlabeled data with prior knowledge in the form of labeled documents and existing graph structures. Extensions such as allowing the model to handle multiple paths per document are likely to be worth pursuing. In this paper we did not discuss scalability to large graphs which is likely to be an important issue in practice. Computing the probability of every path during sampling, where the number of graphs is a product over the number of nodes at each level, is a computational bottleneck in the current inference algorithm and will not scale. Approximate inference methods that can address this issue should be quite useful in this context. 7 Acknowledgements This material is based upon work supported in part by the National Science Foundation under Award Number IIS-0083489, by a Microsoft Scholarship (AC), and by a Google Faculty Research award (PS). The authors would also like to thank Ian Porteous and Alex Ihler for useful discussions. 4MALLET implements the “exit node” version of hPAM 8 References [1] David Blei, Andrew Ng, and Michael Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [2] 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, 2010. [3] David Mimno, Wei Li, and Andrew McCallum. mixtures of hierarchical topics with pachinko allocation. In Proceedings of the 21st Intl. Conf. on Machine Learning, 2007. [4] Wei Li, David Blei, and Andrew McCallum. Nonparametric bayes pachinko allocation. In Proceedings of the Twenty-Third Annual Conference on Uncertainty in Artificial Intelligence (UAI-07), pages 243–250, 2007. [5] Blaz Fortuna, Marko Grobelnki, and Dunja Mladenic. Ontogen: Semi-automatic ontology editor. In Proceedings of theHuman Computer Interaction International Conference, volume 4558, pages 309–318, 2007. [6] S. Bloehdorn, P. Cimiano, and A. Hotho. Learning ontologies to improve text clustering and classification. In From Data and Inf. Analysis to Know. Eng.: Proc. of the 29th Annual Conf. the German Classification Society (GfKl ’05), volume 30 of Studies in Classification, Data Analysis and Know. Org., pages 334–341. Springer, Feb. 2005. [7] P. Cimiano, A. Hotho, and S. Staab. Learning concept hierarchies from text using formal concept analysis. J. Artificial Intelligence Research (JAIR), 24:305–339, 2005. [8] 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. [9] Tom Griffiths and Mark Steyvers. Finding scientific topics. Proceedings of the Natl. Academy of the Sciences of the U.S.A., 101 Suppl 1:5228–5235, 2004. [10] Ian Porteous, Alex Ihler, Padhraic Smyth, and Max Welling. Gibbs sampling for coupled infinite mixture models in the stick-breaking representation. In Proceedings of UAI 2006, pages 385–392, July 2006. [11] Andrew Kachites McCallum. Mallet: A machine learning for language toolkit. http://mallet.cs.umass.edu, 2002. [12] Hanna M. Wallach, Iain Murray, Ruslan Salakhutdinov, and David Mimno. Evaluation methods for topic models. In Proceedings of the 26th Intl. Conf. on Machine Learning (ICML 2009), 2009. 9
2010
131
3,890
Fast Large-scale Mixture Modeling with Component-specific Data Partitions Bo Thiesson∗ Microsoft Research Chong Wang∗† Princeton University Abstract Remarkably easy implementation and guaranteed convergence has made the EM algorithm one of the most used algorithms for mixture modeling. On the downside, the E-step is linear in both the sample size and the number of mixture components, making it impractical for large-scale data. Based on the variational EM framework, we propose a fast alternative that uses component-specific data partitions to obtain a sub-linear E-step in sample size, while the algorithm still maintains provable convergence. Our approach builds on previous work, but is significantly faster and scales much better in the number of mixture components. We demonstrate this speedup by experiments on large-scale synthetic and real data. 1 Introduction Probabilistic mixture modeling [7] has been widely used for density estimation and clustering applications. The Expectation-Maximization (EM) algorithm [4, 11] is one of the most used methods for this task for clear reasons – elegant formulation of an iterative procedure, ease of implementation, and guaranteed monotone convergence for the objective. On the other hand, the EM algorithm also has some acknowledged shortcomings. In particular, the E-step is linear in both the number of data points and the number of mixture components, and therefore computationally impractical for large-scale applications. Our work was motivated by a large-scale geo-spatial problem, demanding a mixture model of a customer base (a huge number of data points) for competing businesses (a large number mixture components), as the basis for site evaluation (where to locate a new store). Several approximation schemes for EM have been proposed to address the scalability problem, e.g. [2, 12, 14, 10, 17, 16] , to mention a few. Besides [17, 16], none of these variants has both an E-step that is truly sub-linear in sample size and also enjoys provable convergence for a well-defined objective function. More details are discussed in Section 5. Our work is inspired by the “chunky EM” algorithm in [17, 16], a smart application of the variational EM framework [11], where a lower bound on the objective function increases at each iteration and convergence is guaranteed. An E-step in standard EM calculates expected sufficient statistics under mixture-component membership probabilities calculated for each individual data point given the most recent model estimate. The variational EM framework alters the E-step to use sufficient statistics calculated under a variational distribution instead. In chunky EM, the speedup is obtained by using a variational distribution with shared (variational) membership probabilities for blocks of data (in an exhaustive partition for the entire data into non-overlapping blocks of data). The chunky EM starts from a coarse partition of the data and gradually refines the partition until convergence. However, chunky EM does not scale well in the number of components, since all components share the same partition. The individual components are different – in order to obtain membership probabilities of appropriate quality, one component may need fine-grained blocks in one area of the data space, while another component is perfectly fine with coarse blocks in that area. Chunky EM expands the shared partition to match the needed granularity for the most demanding mixture component in any area of the data space, which might unnecessarily increase the computational *Equal contributors. †Work done during internship at Microsoft Research. 1 cost. Here, we derive a principled variation, called component-specific EM (CS-EM) that allows component-specific partitions. We demonstrate a significant performance improvement over standard and chunky EM for experiments on synthetic and mentioned customer-business data. 2 Background: Variational and Chunky EM Variational EM. Given a set of i.i.d. data x ≜{x1, · · · , xN}, we are interested in estimating the parameters θ = {η1:K, π1:K} in the K-component mixture model with log-likelihood function L(θ) = P n log P k p(xn|ηk)πk. (1) For this task, we consider a variational generalization [11] of standard EM [4], which maximizes a lower bound of L(θ) through the introduction of a variational distribution q. We assume that the variational distribution factorizes in accordance with data points, i.e, q = Q n qn, where each qn is an arbitrary discrete distribution over mixture components k = 1, . . . , K. We can lower bound L(θ) by multiplying each p(xn|ηk)πk in (1) with qn(k) qn(k) and apply Jensen’s inequality to get L(θ) ≥P n P k qn(k)[log p(xn|ηk)πk −log qn(k)] (2) = L(θ) −P n KL (qn||p(·|xn, θ)) ≜F(θ, q), (3) where p(·|xn, θ) defines the posterior distribution of membership probabilities and KL(q||p) is the Kullback-Leibler (KL) divergence between q and p. The variational EM algorithm alternates the following two steps, i.e. coordinate ascent on F(θ, q), until convergence. E-step: qt+1 = arg maxq F(θt, q), M-step: θt+1 = arg maxθ F(θ, qt+1). If q is not restricted in any form, the E-step produces qt+1 = Q n p(·|xn, θt), because the KLdivergence is the only term in (3) depending on q. The variational EM is in this case equivalent to the standard EM, and hence produces the maximum likelihood (ML) estimate. In the following, we consider certain ways of restricting q to attain speedup over standard EM, implying that the minimum KL-divergence between qn and p(·|xn, θ) is not necessarily zero. Still the variational EM defines a convergent algorithm, which instead optimizes a lower bound of the log-likelihood. Chunky EM. The chunky EM algorithm [17, 16] falls into the framework of variational EM algorithms. In chunky EM, the variational distribution q = Q n qn is restricted according to a partition into exhaustive and mutually exclusive blocks of the data. For a given partition, if data points xi and xj are in the same block, then qi = qj. The intuition is that data points in the same block are somewhat similar and can be treated in the same way, which leads to computational savings in the E-step. If M is the number of blocks in a given partition, the E-step for chunky EM has cost O(KM) whereas in standard EM the cost is O(KN). The speedup can be tremendous for M ≪N. The speedup is gained by a trade-off between the tightness of the lower bound for the log-likelihood and the restrictiveness of constraints. Chunky EM starts from a coarse partition and iteratively refines it. This refinement process always produces a tighter bound, since restrictions on the variational distribution are gradually relaxed. The chunky EM algorithm stops when refining any block in a partition will not significantly increase the lower bound. 3 Component-specific EM In chunky EM, all mixture components share the same data partition. However, for a particular block of data, the variation in membership probabilities differs across components, resulting in varying differences from the equality constrained variational probabilities. Roughly, the variation in membership probabilities is greatest for components closer to a block of data, and, in particular, for components far away the membership probabilities are all so small that the variation is insignificant. This intuition suggests that we might gain a computational speedup, if we create component-specific data partitions, where a component pays more attention to nearby data (fine-grained blocks) than data far away (coarser blocks). Let Mk be the number of data blocks in the partition for component k. The complexity for the E-step is then O(P k Mk), compared to O(KM) in chunky EM. Our conjecture is that we can lower bound the log-likelihood equally well with P k Mk significantly smaller than KM, resulting in a much faster E-step. Since our model maintains different partitions for different mixture components, we call it the component-specific EM algorithm (CS-EM). 2 1 2 3 4 5 + + + + = {5} {1,2} {3,4} {3,4}{1,2} {1,2} {3,4} a b c d e f g e e f f a a b b c c d d g Figure 1: Trees 1-5 represent 5 mixture components with individual tree-consistent partitions (B1-B5) indicated by the black nodes. The bottom-right figure is the corresponding MPT, where {·} indicates the component marks and a, b, c, d, e, f, g enumerate all the marked nodes. This MPT encodes all the component-specific information for the 5 mixtures. Main Algorithm. Figure 2 (on p. 6) shows the main flow of CS-EM. Starting from a coarse partition for each component (see Section 4.1 for examples), CS-EM runs variational EM to convergence and then selectively refine the component-specific partitions. This process continues until further refinements will not significantly improve the lower bound. Sections 3.1-3.5 provide a detailed description of basic concepts in support of this brief outline for the main structure of the algorithm. 3.1 Marked Partition Trees It is convenient to organize the data into a pre-computed partition tree, where a node in the tree represents the union of the data represented by its children. Individual data points are not actually stored in each node, but rather, the sufficient statistics necessary for our estimation operations are pre-computed and stored here. (We discuss these statistics in Section 3.3.) Any hierarchical decomposition of data that ensures some degree of similarity between data in a block is suitable for constructing a partition tree. We exemplify our work by using KD-trees [9]. Creating a KD-tree and storing the sufficient statistics in its nodes has cost O(N log N), where N is the number of data point. We will in the following consider tree-consistent partitions, where each data block in a partition corresponds to exactly one node for a cut (possibly across different levels) in the tree–see Figure 1. Let us now define a marked partition tree (MPT), a simple encoding of all component-specific partitions, as follows. Let Bk be the data partition (a set of blocks) in the tree-consistent partition for mixture component k. In Figure 1, for example, B1 is the partition into data blocks associated with nodes {e, c, d}. In the shared data partition tree used to generate the component-specific partitions, we mark the corresponding nodes for the data blocks in each Bk by the component identifier k. Each node v in the tree will in this way contain a (possibly empty) set of component marks, denoted by Kv. The MPT is now the subtree obtained by pruning all unmarked nodes without marked descendants from the tree. Figure 1 shows an example of a MPT. This example is special in the sense that all nodes in the MPT are marked. In general, a MPT may have unmarked nodes at any location above the leaves. For example, in chunky EM, the component-specific partitions are the same for each mixture component. In this case, only the leaves in the MPT are marked, with each leaf marked by all mixture components. The following important property for a MPT holds since all component-specific partitions are constructed with respect to the same data partition tree. Property 1. Let T denote a MPT. The marked nodes on a path from leaf to root in T mark exactly one data block from each of the K component-specific data partitions. In the following, it becomes important to identify the data block in a component-specific partition, which embeds the block defined by a leaf. Let L denote the set of leaves in T , and let BL denote a partition with data blocks Bl ∈BL according to these leaves. We let Bk(l) denote the specific Bk ∈Bk with the property that Bl ⊆Bk. Property 1 ensures that Bk(l) exists for all l, k. Example: In Figure 1, the path a →e →g in turn marks the components Ka = {3, 4}, Ke = {1, 2}, and Kg = {5} and we see that each component is marked exactly once on this path, as stated in Property 1. Accordingly, for the leaf a, (B3(a) = B4(a)) ⊆(B1(a) = B2(a)) ⊆B5(a). 2 3.2 The Variational Distribution Our variational distribution q assigns the same variational membership probability to mixture component k for all data points in a component-specific block Bk ∈Bk. That is, qn(k) = qBk for all xn ∈Bk, (4) which we denote as the component-specific block constraint. Unlike chunky EM, we do not assume that the data partition Bk is the same across different mixture components. The extra flexibility complicates the estimation of q in the E-step. This is the central challenge of our algorithm. 3 To further drive intuition behind the E-step complication, let us make the sum-to-one constraint for the variational distributions qn(·) explicit. That is, P k qn(k) = 1 for all data points n, which according to the above block constraint and using Property 1 can be reformulated as the |L| constraints P k qBk(l) = 1 for all l ∈L. (5) Notice that since qBk can be associated with an internal node in T it may be the case that qBk(l) represent the same qBk across different constraints in (5). In fact, qBk(l) = qBk for all l ∈{l ∈L|Bl ⊆Bk}, (6) implying that the constraints in (5) are intertwined according to the nested structure given by T . The closer a data block Bk is to the root of T the more constraints simultaneously involve the same qBk. Example: Consider the MPT in Figure 1. Here, qB5(a) = qB5(b) = qB5(c) = qB5(d), and hence the density for component 5 is the same across all four sum-to-one constraints. Similarly, qB1(a) = qB1(b), so the density is the same for component 1 in the two constraints associated with leaves a and b. 2 3.3 Efficient Variational E-step Accounting for the component-specific block constraint in (4), the lower bound, F(θ, q), in Eq. (2) can be expressed as a sum of local parts, F(θ, qBk), as follows F(θ, q) = P k P Bk∈Bk |Bk| qBk (gBk + log πk −log qBk) = P k P Bk∈Bk F(θ, qBk), (7) where we have defined the block-specific geometric mean gBk = ⟨log p(x|ηk)⟩Bk = P x∈Bk log p(x|ηk)/|Bk|. (8) We integrate the sum-to-one constraints in (5) into the lower bound in (7) by using the standard principle of Lagrange duality (see, e.g., [1]). Accordingly, we construct the Lagrangian F(θ, q, λ) = P k P Bk F(θ, qBk) + P l λl(P k qBk(l) −1), where λ ≜{λ1, . . . , λL} are the Lagrange multipliers for the constraints in Eq. (5). Recall the relationship between qBk and qBk(l) in (6). By setting ∂F(θ, q, λ)/∂qBk = 0, we obtain qBk(λ) = exp  (1/|Bk|) P l:Bl⊆Bk λl −1  πk exp (gBk) . (9) Solving the dual optimization problem λ∗= arg minλ F(θ, q(λ), λ) now leads to the primal solution given by q∗ Bk = qBk(λ∗).1 For chunky EM, the E-step is straightforward, because Bk(l) = Bl and therefore P l:Bl⊆Bk(l) λl = λl for all k = 1, . . . , K. Substituting (9) into the sum-to-one constraints in (5) reveals that each λl can be solved independently, leading to the following closed-form solution for qBk(l) λ∗ l = |Bl| 1 + log P k πk exp(gBk(l))  , q∗ Bk(l) = πk exp(gBk(l))/Z, (10) where Z = P k πk exp(gBk(l)) is a normalizing constant. CS-EM does not enjoy a similar simple optimization, because of the intertwined constraints, as described in Section 3.2. Fortunately, we can still obtain a closed-form solution. Essentially, we use the nesting structure of the constraints to reduce Lagrange multipliers from the solution one at a time until only one is left, in which case the optimization is easily solved. We describe the basic approach here and defer the technical details (and pseudo-code) to the supplement. Consider a leaf node l ∈L and recall that Kl denotes the components with Bk(l) = Bl in their partitions. The sum-to-one constraint in (5) that is associated with leaf l can therefore be written as P k∈Kl qBk(l) + P k̸∈Kl qBk(l) = 1. Furthermore, for all k ∈Kl the qBk(l), as defined in (9), is a function of the same λl. Accordingly, ql ≜P k∈Kl qBk(l) = exp (λl/|Bl| −1) P k∈Kl πk exp(gBk(l)). (11) 1Notice that Eq. (9) implies that positivity constraints qn(k) ≥0 are automatically satisfied during estimation. 4 Now, consider l’s leaf-node sibling, l′. For example, in Figure 1, node l = a and l′ = b. The two leaves share the same path from their parent to the root in T . Hence, using Property 1, it must be the case that Bk(l) = Bk(l′) for k ̸∈Kl. The two sum-to-one constraints–one for each leaf–therefore imply that ql = ql′. Using (11), it now follows that λl′ = |Bl′|(λl/|Bl| + log P k∈Kl πk exp(gBk(l)) −log P k∈Kl′ πk′ exp(gBk(l′))) ≜f(λl). Thus, we can replace λl′ with f(λl) in all qBk expressions. Further analysis (detailed in the supplement) shows how we more efficiently account for this parameter reduction and continue the process, now considering the parent node a new “leaf” node once all children have been processed. When reaching the root, every qBk expression on the path from l only involves the single λl, and the optimal λ∗ l can therefore be found analytically by solving the corresponding sum-to-one constraint in (5). Following, all optimal q∗ Bk are found by inserting λ∗ l into the reduced qBk expressions. Finally, it is important to notice that gBk is the only data-dependent part in the above E-step solution. It is therefore key to the computational efficiency of the CS-EM algorithm that gBk can be calculated from pre-computed statistics, which is in fact the case for the large class of exponential family distributions. These are the statistics that are stored in the nodes of the MPT. Example: Let p(x|ηk) be an exponential family distribution p(x|ηk) = h(x) exp(ηT k T(x) −A(ηk)), (12) where ηk is the natural parameter, h(x) is the reference function, T(x) is the sufficient statistic, and A(ηk) is the normalizing constant. Then gBk = ⟨log h(x)⟩Bk + ηT k ⟨T(x)⟩Bk −A(ηk), where ⟨log h(x)⟩Bk and ⟨T(x)⟩Bk are the statistics that we pre-compute for (8). In particular, if p(x|ηk) = Nd (µk, Σk), a Gaussian distribution, then h(x)=1, T(x)=(x, xxT ), ηk = (µkΣ−1 k , −Σ−1 k /2), A(ηk) = −1 2 d log(2π)+log |Σk|+µT k Σ−1µk  , and the statistics ⟨log h(x)⟩Bk = 0 and ⟨T(x)⟩Bk = (⟨x⟩Bk, ⟨xxT ⟩Bk) can be pre-computed. 2 3.4 Efficient Variational M-step In the variational M-step the model parameters θ = {η1:K, π1:K} are updated by maximizing Eq. (7) w.r.t. θ under the constraint P k πk = 1. Hereby, the update is πk ∝P Bk∈Bk |Bk|qBk, ηk = arg maxηk P Bk∈Bk |Bk|qBkgBk. (13) Thus, the M-step can be efficiently computed using the pre-computed sufficient statistics as well. Example: If p(x|ηk) has the exponential family form in Eq. (12), ηk is obtained by solving ηk = arg maxηk(P Bk∈Bk qBk P x∈Bk T(x))ηk −(P Bk∈Bk |Bk|qBk)A(ηk). In particular, if p(x|ηk) = Nd (µk, Σk), then µk = (P Bk∈Bk |Bk|qBk⟨x⟩Bk)/ (Nπk) , Σk = (P Bk∈Bk |Bk|qBk⟨xxT ⟩Bk −µkµT k )/ (Nπk) . 2 3.5 Efficient Variational R-step Given the current component-specific data partitions, as marked in the MPT T , a refining step (R-step) selectively refines these partitions. Any refinement enlarges the family of variational distributions, and therefore always tightens the optimal lower bound for the log-likelihood. We define a refinement unit as the refinement of one data block in the current partition for one component in the model. The efficiency of CS-EM is affected by the number of refinement units performed at each R-step. With too few units we spend too much time on refining, and with too many units some of the refinements may be far from optimal and therefore unnecessarily slow down the algorithm. We have empirically found K refinement units at each R-step to be a good choice. This introduces K new free variational parameters, which is similar to a refinement step in chunky EM. However, chunky EM refines the same data block across all components, which is not the case in CS-EM. 5 Figure 2: The CS-EM algorithm. 1: Initialization: build KD-tree, set initial MPT, set initial θ, run E-step to set q, set t, s=0, compute Ft, Fs using (7). 2: repeat 3: repeat 4: Run variational E-step and M-step. 5: Set t ←t + 1 and compute Ft using (7). 6: until (Ft −Ft−1)/(Ft −F0) < 10−4. 7: Run variational R-step. 8: Set s ←s + 1 and Fs = Ft. 9: until (Fs −Fs−1)/(Fs −F0) < 10−4. Figure 3: Variational R-step algorithm. 1: Initialize priority queue Q favoring high ∆Fv,k values. 2: for each marked node v in T do 3: Compute q via E-step with constraints as in (14). 4: for all k ∈Kv do 5: Insert candidate (v, k) into Q according to ∆Fv,k. 6: end for 7: end for 8: Select K top-ranked (v, k) in Q for refinement. Ideally, an R-step should select the refinement units leading to optimal improvement for F. Good candidates can be found by performing a single E-step for each candidate and then select the units that improve F the most. This demands the evaluation of an E-step for each of the P k Mk possible refinement units. Exact evaluation for this many full E-steps is prohibitively expensive, and we therefore instead approximate these refinement-guiding E-steps by a local computation scheme based on the intuition that refining a block for a specific component mostly affects components with similar local partition structures. The algorithm is described in Figure 3 with details as follows. Consider moving all component-marks for v ∈T to its children ch(v), where each child u ∈ch(v) receives a copy. Let ¯T denote the altered MPT, and ¯Kv, ¯Ku denote the set of marks at v, u ∈¯T . Hence, ¯Kv = ∅and ¯Ku = Ku ∪Kv. To approximate the new variational distribution ¯q, we fix the value for each ¯qBk(l), with k ̸∈¯Ku and l ∈L, to the value obtained for the distribution q before the refinement. In this case, the sum-to-one constraints for ¯q simplifies as P k∈¯Ku ¯qBk(l) + Rl = 1 for all l ∈L, (14) with Rl = 1 −P k∈¯Ku qBk(l) being the fixed values. Notice that P k∈¯Ku qBk(l) = 0 for any leaf l not under u, and that qBk(l) = qBk(u) and ¯qBk(l) = ¯qBk(u) for k ∈¯Ku and any leaf l under u. The constraints in (14) therefore reduces to the following |ch(v)| independent constraints P k∈¯Ku ¯qBk(u) + Ru = 1 for all u ∈ch(v). Each ¯qBk(u), k∈¯Ku now has a local closed form solution similar to (10)–with Z =P k∈¯Ku ¯qBk(u)+Ru. The improvement to F that is achieved by the refinement-guiding E-step for the refinement unit refining data block v for component k is denoted ∆Fv,k, and can be computed as ∆Fv,k = P u∈ch(v) F(θ, ¯qBk(u)) −F(θ, qBk(v)). This improvement is computed for all possible refinement units and the K highest scoring units are then selected in the R-step. Notice that this selective refinement step will most likely not refine the same data block for all components and therefore creates component-specific partitions. Example: In Figure 1, node e and its children {a, b} are marked Ke = {1, 2} and Ka = Kb = {3, 4}. For the two candidate refinement units associated with e, we have ¯Ke = ∅and ¯Ka = ¯Kb = {1, 2, 3, 4}. With q5(u) held fixed, we will for each child u ∈{a, b} optimize ¯qBk(u), k = 1, 2, 3, 4, and following (e, 1) and (e, 2) are inserted into the priority queue of candidates according to their ∆Fv,k values. 2 4 Experiments In this section we provide a systematic evaluation of CS-EM, chunky EM, and standard EM on synthetic data, as well as a comparison between CS-EM and chunky EM on the business-customer data, mentioned in Section 1. (Standard EM is too slow to be included in the latter experiment.) 4.1 Experimental setup For the synthetic experiments, we generated random training and test data sets from Gaussian mixture models (GMMs) by varying one (in a single case two) of the following default settings: #data points N = 100, 000, #mixture components K = 40, #dimensions d = 2, and c-separation2 c = 2. 2A GMM is c-separated [3], if for any i ̸= j, f(i, j) ≜||µi −µj||2/ max(λmax(Σi), λmax(Σj)) ≥dc2, where λmax(Σ) denotes the maximum eigenvalue of Σ. We only require that Median [f(i, j)] ≥dc2. 6 The (proprietary) business-customer data was obtained through collaboration with PitneyBowes Inc. and Yellowpages.com LLC. For the experiments on this data, N = 6.5 million and d = 2, corresponding to the latitude and longitude for potential customers in Washington state. The basic assumption is that potential customers act as rational consumers and frequent the somewhat closest business locations to purchase a good or service. The locations for competing stores of a particular type, in this way, correspond to fixed centers for components in a mixture model. (A less naive model with the penetration level for a good or service and the relative attractiveness for stores, is the object of related research, but is not important for the computational feasibility studied here.) The synthetic experiments are initialized as follows. After constructing KD-tree, the first tree-level containing at least K nodes (⌈log2 K⌉) is used as the initial data partition for both chunky EM and all components in CS-EM. For all algorithms (including standard EM), we randomly chose K data blocks from the initial partition and initialized parameters for the individual mixture components accordingly. Mixture weights are initialized with a uniform distribution. The experiments on the business-customer data are initialized in the same way, except that the component centers are fixed and the initial data blocks that cover these centers are used for initializing the remaining parameters. For CS-EM we also considered an alternative initialization of data partitions, which better matches the rationale behind component-specific partitions. It starts from the CS-EM initialization and recursively, according to the KD-tree structure, merges two data blocks in a component-specific partition, if the merge has little effect on that component.3 We name this variant as CS-EM∗. 4.2 Results For the synthetic experiments, we compared the run-times for the competing algorithms to reach a parameter estimate of same quality (and therefore similar clustering performance not counting different local maxima), defined as follows. We recorded the log-likelihood for the test data at each iteration of the EM algorithm, and before each S-step in chunky EM and the CS-EM. We ran all algorithms to convergence at level 10−4, and the test log-likelihood for the algorithm with lowest value was chosen as baseline.4 We now recorded the run-time for each algorithm to reach this baseline, and computed the EM-speedup factors for chunky EM, CS-EM, and CS-EM∗, each defined as the standard EM run-time divided by the run-time for the alternative algorithm. We repeated all experiments with five different parameter initializations and report the averaged results. Figure 4 shows the EM-speedups for the synthetic data. First of all, we see that both CS-EM and CSEM∗are significantly faster than chunky EM in all experiments. In general, the P k Mk variational parameters needed for the CS-EM algorithms is far fewer than the KM parameters needed for chunky EM in order to reach an estimate of same quality. For example, for the default experimental setting, the ratio KM/ P k Mk is 2.0 and 2.1 for, respectively, CS-EM and CS-EM∗. We also see that there is no significant difference in speedup between CS-EM and CS-EM∗. This observation can be explained by the fact that the resulting component-specific data partitions greatly refine the initial partitions, and any computational speedup due to the smarter initial partition in CS-EM∗is therefore overwhelmed. Hence, a simple initial partition, as in CS-EM, is sufficient. Finally, similar to results already reported for chunky EM in [17, 16], we see for all of chunky EM, CS-EM, and CS-EM∗that the number of data points and the amount of c-separation have a positive effect on EM-speedup, while the number of dimensions and the number of components have a negative effect. However, the last plot in Figure 4 reveals an important difference between chunky EM and CS-EM: with a fixed ratio between number of data points and number of clusters, the EM-speedup declines a lot for chunky EM, as the number of clusters and data points increases. This observation is important for the business-customer data, where increasing the area of investigation (from city to county to state to country) has this characteristic for the data. In the second experiment on the business-customer data, standard EM is computationally too demanding. For example, for the “Nail salon” example in Figure 5, a single EM iteration takes about 5 hours. In contrast, CS-EM runs to convergence in 20 minutes. To compare run-times for chunky 3Let µ and Σ be the mean and variance parameter for an initial component, and µp, µl, and µr denote the sample mean for data in the considered parent, left and right child. We merge if |MD(µl, µ|Σ)/MD(µp, µ|Σ)− 1| < 0.05 and |MD(µr, µ|Σ)/MD(µp, µ|Σ) −1| < 0.05, where MD(·, ·|Σ) is the Mahalanobis distance. 4For the default experimental setting, for example, the baseline is reached at 96% of the log-likelihood improvement from initialization to standard EM convergence. 7 Figure 4: EM-speedup factors on synthetic data. Figure 5: A comparison of run-time and final number of variational parameters for Chunky EM vs. CS-EM for exemplary business types with different number of stores (mixture components). Business type #stores time parameter ratio ratio Bowling 129 5.0 2.41 Dry cleaning 815 21.2 2.81 Nail salon 1290 35.8 3.51 Pizza 1327 33.0 3.18 Tax filing 1459 34.8 3.41 Conv. store 1739 29.4 3.42 EM and CS-EM, we therefore slightly modified the way we ensure that the two algorithm reach a parameter estimate of same quality. We use the lowest of the F values (on training data) obtained for the two algorithms at convergence as the baseline, and record the time for each algorithm to reach this baseline. Figure 5 shows the speedup (time ratio) and the reduction in number of variational parameters (parameter ratio) for CS-EM compared to chunky EM, as evaluated on exemplary types of businesses. Again, CS-EM is significantly faster than chunky EM and the speedup is achieved by a better targeting of variational distribution through the component-specific partitions. 5 Related and Future Work Related work. CS-EM combines the best from two major directions in the literature regarding speedup of EM for mixture modeling. The first direction is based on powerful heuristic ideas, but without provable convergence due to the lack of a well-defined objective function. The work in [10] is a prominent example, where KD-tree partitions were first used for speeding up EM. As also pointed out in [17, 16], the method will likely–but not provably–converge for fine-grained partitions. In contrast, CS-EM is provable convergent–even for arbitrary rough partitions, if extreme speedup is needed. The granularity of partitions in [10] is controlled by a user-specified threshold on the minimum and maximum membership probabilities that are reachable within the boundaries of a node in the KD-tree. In contrast, we have almost no tuning parameters. We instead let the data speak by itself by having the final convergence determine the granularity of partitions. Finally, [10] “prunes” a component (sets the membership probability to zero) for data far away from the component. It relates to our component-specific partitions, but ours is more principled with convergence guarantees. The second direction of speedup approaches are based on the variational EM framework [11]. In [11], a “sparse” EM was presented, which at some iterations, only updates part of the parameters and hence relates it to the pruning idea in [10]. [14] presents an “incremental” and a “lazy” EM, which gain speedup by performing E-steps on varying subsets of the data rather than the entire data. All three methods guarantee convergence. However, they need to periodically perform an E-step over the entire data, and, in contrast to CS-EM, their E-step is therefore not truly sub-linear in sample size, making them potentially unsuitable for large-scale applications. The chunky EM in [17, 16] is the approach most similar to our CS-EM. Both are based on the variational EM framework and therefore guarantees convergence, but CS-EM is faster and scales better in the number of clusters. In addition, heuristic sub-sampling is common practice when faced with a large amount of data. One could argue that chunky EM is an intelligent sub-sampling method, where 1) instead of sampled data points it uses geometric averages for blocks of data in a given data partition, and 2) it automatically chooses the “sampling size” by a learning curve method, where F is used to measure the utility of increasing the granularity for the partition. Sub-sampling therefore has same computational complexity as chunky EM, and our results therefore suggest that we should expect CS-EM to be much faster than sub-sampling and scale better in the number of mixture components. Finally, we exemplified our work by using KD-trees as the tree-consistent partition structure for generating the component-specific partitions in CS-EM, which limited its effectiveness in high dimensions. However, any hierarchical partition structure can be used, and the work in [8] therefore suggest that changing to an anchor tree (a special kind of metric tree [15]) will also render CS-EM effective in high dimensions, under the assumption of lower intrinsic dimensionality for the data. Future Work. Future work will include parallelization of the algorithm and extensions to 1) nonprobabilistic clustering methods, e.g., k-means clustering [6, 13, 5] and 2) general EM applications beyond mixture modeling. 8 References [1] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [2] P. S. Bradley, U. M. Fayyad, and C. A. Reina. Scaling EM (expectation maximization) clustering to large databases. Technical Report MSR-TR-98-3, Microsoft Research, 1998. [3] S. Dasgupta. Learning mixtures of Gaussians. In Proceedings of the 40th Annual Symposium on Foundations of Computer Science, pages 634–644, 1999. [4] 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, 39(1):1–38, 1977. [5] G. Hamerly. Making k-means even faster. In SIAM International Conference on Data Mining (SDM), 2010. [6] T. Kanungo, D. M. Mount, N. S. Netanyahu, C. D. Piatko, R. Silverman, and A. Y. Wu. An efficient k-means clustering algorithm: Analysis and implementation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(7):881–892, 2002. [7] G. J. McLachlan and D. Peel. Finite Mixture Models. Wiley Interscience, New York, USA, 2000. [8] A. Moore. The anchors hierarchy: Using the triangle inequality to survive high-dimensional data. In Proceedings of the Fourteenth Conference on Uncertainty in Artificial Intelligence, pages 397–405. AAAI Press, 2000. [9] A. W. Moore. A tutorial on kd-trees. Technical Report 209, University of Cambridge, 1991. [10] A. W. Moore. Very fast EM-based mixture model clustering using multiresolution kd-trees. In Advances in Neural Information Processing Systems, pages 543–549. Morgan Kaufman, 1999. [11] R. Neal and G. E. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. In Learning in Graphical Models, pages 355–368, 1998. [12] L. E. Ortiz and L. P. Kaelbling. Accelerating EM: An empirical study. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence, pages 512–521, 1999. [13] D. Pelleg and A. Moore. Accelerating exact k-means algorithms with geometric reasoning. In S. Chaudhuri and D. Madigan, editors, Proceedings of the Fifth International Conference on Knowledge Discovery in Databases, pages 277–281. AAAI Press, 1999. [14] B. Thiesson, C. Meek, and D. Heckerman. Accelerating EM for large databases. Machine Learning, 45(3):279–299, 2001. [15] J. K. Uhlmann. Satisfying general proximity/similarity queries with metric trees. Information Processing Letters, 40(4):175–179, 1991. [16] J. J. Verbeek, J. R. Nunnink, and N. Vlassis. Accelerated EM-based clustering of large data sets. Data Mining and Knowledge Discovery, 13(3):291–307, 2006. [17] J. J. Verbeek, N. Vlassis, and J. R. J. Nunnink. A variational EM algorithm for large-scale mixture modeling. In In Proceedings of the 8th Annual Conference of the Advanced School for Computing and Imaging (ASCI), 2003. 9
2010
132
3,891
Improvements to the Sequence Memoizer Jan Gasthaus Gatsby Computational Neuroscience Unit University College London London, WC1N 3AR, UK j.gasthaus@gatsby.ucl.ac.uk Yee Whye Teh Gatsby Computational Neuroscience Unit University College London London, WC1N 3AR, UK ywteh@gatsby.ucl.ac.uk Abstract The sequence memoizer is a model for sequence data with state-of-the-art performance on language modeling and compression. We propose a number of improvements to the model and inference algorithm, including an enlarged range of hyperparameters, a memory-efficient representation, and inference algorithms operating on the new representation. Our derivations are based on precise definitions of the various processes that will also allow us to provide an elementary proof of the “mysterious” coagulation and fragmentation properties used in the original paper on the sequence memoizer by Wood et al. (2009). We present some experimental results supporting our improvements. 1 Introduction The sequence memoizer (SM) is a Bayesian nonparametric model for discrete sequence data producing state-of-the-art results for language modeling and compression [1, 2]. It models each symbol of a sequence using a predictive distribution that is conditioned on all previous symbols, and thus can be understood as a non-Markov sequence model. Given the very large (infinite) number of predictive distributions needed to model arbitrary sequences, it is essential that statistical strength be shared in their estimation. To do so, the SM uses a hierarchical Pitman-Yor process prior over the predictive distributions [3]. One innovation of the SM over [3] is its use of coagulation and fragmentation properties [4, 5] that allow for efficient representation of the model using a data structure whose size is linear in the sequence length. However, in order to make use of these properties, all concentration parameters, which were allowed to vary freely in [3], were fixed to zero. In this paper we explore a number of further innovations to the SM. Firstly, we propose a more flexible setting of the hyperparameters with potentially non-zero concentration parameters that still allow the use of the coagulation/fragmentation properties. In addition to better predictive performance, the setting also partially mitigates a problem observed in [1], whereby on encountering a long sequence of the same symbol, the model becomes overly confident that it will continue with the same symbol. The second innovation addresses memory usage issues in inference algorithms for the SM. In particular, current algorithms use a Chinese restaurant franchise representation for the HPYP, where the seating arrangement of customers in each restaurant is represented by a list, each entry being the number of customers sitting around one table [3]. This is already an improvement over the na¨ıve Chinese restaurant franchise in [6] which stores pointers from customers to the tables they sit at, but can still lead to huge memory requirements when restaurants contain many tables. One approach to mitigate this problem has been explored in [7], which uses a representation that stores a histogram of table sizes instead of the table sizes themselves. Our proposal is to store even less, namely only the minimal statistics about each restaurant required to make predictions: the number of customers and the number of tables occupied by the customers. Inference algorithms will have to be adapted to this compact representation, and we describe and compare a number of these. 1 In Section 2 we will give precise definitions of Pitman-Yor processes and Chinese restaurant processes. These will be used to define the SM model in Section 3, and to derive the results about the extended hyperparameter setting in Section 4 and the memory-efficient representation in Section 5. As a side benefit we will also be able to give an elementary proof of the coagulation and fragmentation properties in Section 4, which was presented as a fait accompli in [1], while the general and rigorous treatment in the original papers [4, 5] is somewhat inaccessible to a wider audience. 2 Pitman-Yor Processes and Chinese Restaurant Processes A Pitman-Yor process (PYP) is a particular distribution over distributions over some probability space Σ [8, 9]. We denote by PY(α, d, G0) a PYP with concentration parameter α > −d, discount parameter d ∈[0, 1), and base distribution G0 over Σ. We can describe a Pitman-Yor process using its associated Chinese restaurant process (CRP). A Chinese restaurant has customers sitting around tables which serve dishes. If there are c customers we index them with [c] = {1, . . . , c}. We define a seating arrangement of the customers as a set of disjoint non-empty subsets partitioning [c]. Each subset is a table and consists of the customers sitting around it, e.g. {{1, 3}, {2}} means customers 1 and 3 sit at one table and customer 2 sits at another by itself. Let Ac be the set of seating arrangements of c customers, and Act those with exactly t tables. The CRP describes a distribution over seating arrangements as follows: customer 1 sits at a table; for customer c + 1, if A ∈Ac is the current seating arrangement, then she joins a table a ∈A with probability |a|−d α+c and starts a new table with probability α+|A|d α+c . We denote the resulting distribution over Ac as CRPc(α, d). Multiplying the conditional probabilities together, P(A) = [α + d]|A|−1 d [α + 1]c−1 1 Y a∈A [1 −d]|a|−1 1 for each A ∈Ac, (1) where [y]n d = Qn−1 i=0 y + id is Kramp’s symbol. Note that the denominator is the normalization constant. Fixing the number of tables to be t ≤c, the distribution, denoted as CRPct(d), becomes: P(A) = Q a∈A[1 −d]|a|−1 1 Sd(c, t) for each A ∈Act, (2) where the normalization constant Sd(c, t) = P A∈Act Q a∈A[1 −d]|a|−1 1 is a generalized Stirling number of type (−1, −d, 0) [10]. These can be computed recursively [3] (see also Section 5). Note that conditioning on a fixed t the seating arrangement will not depend on α, only on d. Suppose G ∼PY(α, d, G0) and z1, . . . , zc|G iid ∼G. The CRP describes the PYP in terms of its effect on z1:c = z1, . . . , zc. In particular, marginalizing out G, the distribution of z1:c can be described as follows: draw A ∼CRPc(α, d), on each table serve a dish which is an iid draw from G0, finally let variable zi take on the value of the dish served at the table that customer i sat at. Now suppose we wish to perform inference given observation of z1:c. This is equivalent to conditioning on the dishes that each customer is served. Since customers at the same table are served the same dish, the different values among the zi’s split the restaurant into multiple sections, with customers and tables in each section being served a distinct dish. There can be more than one table in each section since multiple tables can serve the same dish (if G0 has atoms). If s ∈Σ is a dish, let cs be the number of zi’s with value s (number of customers served dish s), ts the number of tables, and As ∈Acsts the seating arrangement of customers around the tables serving dish s (we reindex the cs customers to be [cs]). The joint distribution over seating arrangements and observations is then:1 P({cs, ts, As}, z1:c) = Y s∈Σ G0(s)ts ! [α + d]t·−1 d [α + 1]c·−1 1 Y s∈Σ Y a∈As [1 −d]|a|−1 1 ! , (3) where t· = P s∈Σ ts and similarly for c·.We can marginalize out {As} from (3) using (2): P({cs, ts}, z1:c) = Y s∈Σ G0(s)ts ! [α + d]t·−1 d [α + 1]c·−1 1 Y s∈Σ Sd(cs, ts) ! . (4) Inference then amounts to computing the posterior of either {ts, As} or only {ts} given z1:c (cs are fixed) and can be achieved by Gibbs sampling or other means. 1We have omitted the set subscript {·}s∈Σ. We will drop these subscripts when they are clear from context. 2 3 The Sequence Memoizer and its Chinese Restaurant Representation In this section we review the sequence memoizer (SM) and its representation using Chinese restaurants [3, 11, 1, 2]. Let Σ be the discrete set of symbols making up the sequences to be modeled, and let Σ∗be the set of finite sequences of symbols from Σ. The SM models a sequence x1:T = x1, x2, . . . , xT ∈Σ∗using a set of conditional distributions: P(x1:T ) = T Y i=1 P(xi|x1:i−1) = T Y i=1 Gx1:i−1(xi), (5) where Gu(s) is the conditional probability of the symbol s ∈Σ occurring after a context u ∈Σ∗(the sequence of symbols occurring before s). The parameters of the model consist of all the conditional distributions {Gu}u∈Σ∗, and are given a hierarchical Pitman-Yor process (HPYP) prior: Gε ∼PY(αε, dε, H) Gu|Gσ(u) ∼PY(αu, du, Gσ(u)) for u ∈Σ∗\{ε}, (6) where ε is the empty sequence, σ(u) is the sequence obtained by dropping the first symbol in u, and H is the overall base distribution over Σ (we take H to be uniform over a finite Σ). Note that we have generalized the model to allow each Gu to have its own concentration and discount parameters, whereas [1, 2] worked with αu = 0 and du = d|u| (i.e. context length-dependent discounts). As in previous works, the hierarchy over {Gu} is represented using a Chinese restaurant franchise [6]. Each Gu has a corresponding restaurant indexed by u. Customers in the restaurant are draws from Gu, tables are draws from its base distribution Gσ(u), and dishes are the drawn values from Σ. For each s ∈Σ and u ∈Σ∗, let cus and tus be the numbers of customers and tables in restaurant u served dish s, and let Aus ∈Acustus be their seating arrangement. Each observation of xi in context x1:i−1 corresponds to a customer in restaurant x1:i−1 who is served dish xi, and each table in each restaurant u, being a draw from the base distribution Gσ(u), corresponds to a customer in the parent restaurant σ(u). Thus, the numbers of customers and tables have to satisfy the constraints cus = cx us + X v:σ(v)=u tvs, (7) where cx us = 1 if s = xi and u = x1:i−1 for some i, and 0 otherwise. The goal of inference is to compute the posterior over the states {cus, tus, Aus}s∈Σ,u∈Σ∗of the restaurants (and possibly the concentration and discount parameters). The joint distribution can be obtained by multiplying the probabilities of all seating arrangements (3) in all restaurants: P({cus, tus, Aus}, x1:T ) = Y s∈Σ H(s)tεs ! Y u∈Σ∗ [αu + du]tu·−1 du [αu + 1]cu·−1 1 Y s∈Σ Y a∈Aus [1 −du]|a|−1 1 ! . (8) The first parentheses contain the probability of draws from the overall base distribution H, and the second parentheses contain the probability of the seating arrangement in restaurant u. Given a state of the restaurants drawn from the posterior, the predictive probability of symbol s in context v can then be computed recursively (with P ∗ σ(ε)(s) defined to be H(s)): P ∗ v(s) = cvs −tvsd αv + cv· + αv + tv·d αv + cv· P ∗ σ(v)(s). (9) 4 Non-zero Concentration Parameters In [1] the authors proposed setting all the concentration parameters to zero. Though limiting the flexibility of the model, this allowed them to take advantage of coagulation and fragmentation properties of PYPs [4, 5] to marginalize out all but a linear number (in T) of restaurants from the hierarchy. We propose the following enlarged family of hyperparameter settings: let αε = α > 0 be free to vary at the root of the hierarchy, and set each αu = ασ(u)du for each u ∈Σ∗\{ε}. The 3 a1 a2 C Figure 1: Illustration of the relationship between the restaurants A1, A2, C and Fa. A1 A2 Fa1 Fa2 discounts can vary freely. In addition to more flexible modeling, this also partially mitigates the overconfidence problem [2]. To see why, notice from (9) that the predictive probability is a weighted average of predictive probabilities given contexts of various lengths. Since αv > 0, the model gives higher weights to the predictive probabilities of shorter contexts (compared to αv = 0). These typically give less extreme values since they include influences not just from the sequence of identical symbols, but also from other observations of other symbols in other contexts. Our hyperparameter settings also retain the coagulation and fragmentation properties which allow us to marginalize out many PYPs in the hierarchy for efficient inference. We will provide an elementary proof of these results in terms of CRPs in the following. First we describe the coagulation and fragmentation operations. Let c ≥1 and suppose A2 ∈Ac and A1 ∈A|A2| are two seating arrangements where the number of customers in A1 is the same as that of tables in A2. Each customer in A1 can be put in one-to-one correspondence to a table in A2 and sits at a table in A1. Now consider re-representing A1 and A2. Let C ∈Ac be the seating arrangement obtained by coagulating (merging) tables of A2 corresponding to customers in A1 sitting at the same table. Further, split A2 into sections, one for each table a ∈C, where each section Fa ∈A|a| contains the |a| customers and tables merged to make up a. The converse of coagulating tables of A2 into C is of course to fragment each table a ∈C into the smaller tables in Fa. Note that there is a one-to-one correspondence between tables in C and in A1, and the number of customers in each table of A1 is that of tables in the corresponding Fa. Thus A1 and A2 can be reconstructed from C and {Fa}a∈C. Theorem 1 ([4, 5]). Suppose A2 ∈Ac, A1 ∈A|A2|, C ∈Ac and Fa ∈A|a| for each a ∈C are related as above. Then the following describe equivalent distributions: (I) A2 ∼CRPc(αd2, d2) and A1|A2 ∼CRP|A2|(α, d1). (II) C ∼CRPc(αd2, d1d2) and Fa|C ∼CRP|a|(−d1d2, d2) for each a ∈C. Proof. We simply show that the joint distributions are the same. Starting with (I) and using (1), P(A1, A2) = [α + d1]|A1|−1 d1 [α + 1]|A2|−1 1 Y a∈A1 [1 −d1]|a|−1 1 [αd2 + d2]|A2|−1 d2 [αd2 + 1]c−1 1 Y b∈A2 [1 −d2]|b|−1 1  =[αd2 + d1d2]|A1|−1 d1d2 [αd2 + 1]c−1 1  Y a∈A1 [d2 −d1d2]|a|−1 d2  Y b∈A2 [1 −d2]|b|−1 1  . We used the identity [βδ + δ]n−1 δ = δn−1[β + 1]n−1 1 for all β, δ, n. Re-grouping the products and expressing the same quantities in terms of C and {Fa}, =[αd2 + d1d2]|C|−1 d1d2 [αd2 + 1]c−1 1 Y a∈C  [d2 −d1d2]|Fa|−1 d2 Y b∈Fa [1 −d2]|b|−1 1  = P(C, {Fa}a∈C). We see that conditioning on C each Fa ∼CRP|a|(−d1d2, d2). Marginalizing {Fa} out using (1), P(C) = [αd2 + d1d2]|C|−1 d1d2 [αd2 + 1]c−1 1 Y a∈C [1 −d1d2]|a|−1 1 . So C ∼CRPc(αd2, d1d2) and (I)⇒(II). Reversing the same argument shows that (II)⇒(I). Statement (I) of the theorem is exactly the Chinese restaurant franchise of the hierarchical model G1|G0 ∼PY(α, d1, G0), G2|G1 ∼PY(αd2, d2, G1) with c iid draws from G2. The theorem shows 4 that the clustering structure of the c customers in the franchise is equivalent to the seating arrangement in a CRP with parameters αd2, d1d2, i.e. G2|G0 ∼PY(αd2, d1d2, G0) with G1 marginalized out. Conversely, the fragmentation operation (II) regains Chinese restaurant representations for both G2|G1 and G1|G0 from one for G2|G0. This result can be applied to marginalize out all but a linear number of PYPs from (6) [1]. The resulting model is still a HPYP of the same form as (6), except that it only need be defined over the prefixes of x1:T as well as some subset of their ancestors. In the rest of this paper we will refer to (6) and its Chinese restaurant franchise representation (8) with the understanding that we are operating in this reduced hierarchy. Let U denote the reduced set of contexts, and redefine σ(u) to be the parent of u in U. The concentration and discount parameters need to be modified accordingly. 5 Compact Representation Current inference algorithms for the SM and hierarchical Pitman-Yor processes operate in the Chinese restaurant franchise representation, and use either Gibbs sampling [3, 11, 1] or particle filtering [2]. To lower memory requirements, instead of storing the precise seating arrangement of each restaurant, the algorithms only store the numbers of customers, numbers of tables and sizes of all tables in the franchise. This is sufficient for sampling and for prediction. However, for large data sets the amount of memory required to store the sizes of the tables can still be very large. We propose algorithms that only store the numbers of customers and tables but not the table sizes. This compact representation needs to store only two integers (cus, tus) per context/symbol pair, as opposed to tus integers.2 These counts are already sufficient for prediction, as (9) does not depend on the table sizes. We will also consider a number of sampling algorithms in this representation. Our starting point is the joint distribution over the Chinese restaurant franchise (8). Integrating out the seating arrangements {Aus} using (2) gives the joint distribution over {cus, tus}: P({cus, tus}, x1:T ) = Y s∈Σ H(s)tεs ! Y u∈U [αu + du]tu·−1 du [αu + 1]cu·−1 1 Y s∈Σ Sdu(cus, tus) ! . (10) Note that each cus is in fact determined by (7) so in fact the only unobserved variables in (10) are {tus}. With this joint distribution we can now derive various sampling algorithms. 5.1 Sampling Algorithms Direct Gibbs Sampling of {cus, tus}. It is straightforward derive a Gibbs sampler from (10). Since each cus is determined by cx us and the tvs at child restaurants v, it is sufficient to update each tus, which for tus in the range {1, . . . , cus} has conditional distribution P(tus|rest) ∝ [αu + du]tu·−1 du [ασ(u) + 1] cσ(u)·−1 1 Sdu(cus, tus)Sdσ(u)(cσ(u)s, tσ(u)s), (11) where tu·, cσ(u)· and cσ(u)s all depend on tus through the constraints (7). One problem with this sampler is that we need to compute Sdu(c, t) for all 1 ≤c, t ≤cus. If du is fixed these can be precomputed and stored, but the resulting memory requirement is again large since each restaurant typically has its own du value. If du is updated in the sampling, then these will need to be computed each time as well, costing O(c2 us) per iteration. Further, Sd(c, t) typically has very high dynamic range, so care has to be taken to avoid numerical under-/overflow (e.g. by performing the computations in the log domain, involving many expensive log and exp computations). Re-instantiating Seating Arrangements. Another strategy is to re-instantiate the seating arrangement by sampling Aus ∼CRPcustus(du) from its conditional distribution given cus, tus (see Section 5.2 below), then performing the original Gibbs sampling of seating arrangements [3, 11]. This produces a new number of tables tus and the seating arrangement can be discarded. Note however that when tus changes this sampler will introduce changes to ancestor restaurants (by adding 2In both representations one may also want to store the total number of customers and tables in each restaurant for efficiency. In practice, where there is additional overhead due to the data structures involved, storage space for the full representation can be reduced by treating context/symbol pairs with only one customer separately. 5 or removing customers), so these will need to have their seating arrangements instantiated as well. To implement this sampler efficiently, we visit restaurants in depth-first order, keeping in memory only the seating arrangements of all restaurants on the path to the current one. The computational cost is O(custus), but with a potentially smaller hidden constant (no log/exp computations are required). Original Gibbs Sampling of {cus, tus}. A third strategy is to “imagine” having a seating arrangement and running the original Gibbs sampler, incrementing tus if a table would have been created, and decrementing tus if a table would have been deleted. Recall that the original Gibbs sampler operates by iterating over customers, treating each as the last customer in the restaurant, removing it, then adding it back into the restaurant. When removing, if the customer were sitting by himself, a table would need to be deleted too, so the probability of decrementing tus is the probability of a customer sitting by himself. From (2), this can be worked out to be P(decrement tus) = Sdu(cus −1, tus −1) Sdu(cus, tus) . (12) The numerator is due to a sum over all seating arrangements where the other cus −1 customers sit at the other tus −1 tables. When adding back the customer, the probability of incrementing the number of tables is the probability that the customer sits at a new table of the same dish s: P(increment tus) = (αu + dutu·)P ∗ σ(u)(s) (αu + dutu·)P ∗ σ(u)(s) + cus −tusdu , (13) where P ∗ σ(u)(s) is the predictive (9) with the current value of tus, and cus, tus are values with the customer removed. This sampler also requires computation of Sdu(c, t), but only for 1 ≤t ≤tus which can be significantly smaller than cus. Computation cost is O(custus) (but again with a larger constant due to computing the Stirling numbers in a stable way). We did not find a sampling method taking less time than O(custus). Particle Filtering. (13) gives the probability of incrementing tus (and adding a customer to the parent restaurant) when a customer is added into a restaurant. This can be used as the basis for a particle filter, which iterates through the sequence x1:T , adding a customer corresponding to s = xi in context u = x1:i−1 at each step. Since no customer deletion is required, the cost is very small: just O(cus) for the cus customers per s and u (plus the cost of traversing the hierarchy to the current restaurant, which is always necessary). Particle filtering works very well in online settings, e.g. compression [2], and as initialization for Gibbs sampling. 5.2 Re-instantiating Aus given cus, tus To simplify notation, here we will let d = du, c = cus, t = tus and A = Aus ∈Act. We will use the forward-backward algorithm in an undirected chain to sample A from CRPct(d) given in (2). First we re-express A using two sets of variables z1, . . . , zc and y1, . . . , yc. Label a table a ∈A using the index of the first customer at the table, i.e. the smallest element of a. Let zi be the number of tables occupied by the first i customers, and yi the label of the table that customer i sits at. The variables satisfy the following constraints: z1 = 1, zc = t, and zi = zi−1 in which case yi ∈[i −1] or zi = zi−1 + 1 in which case yi = i. This gives a one-to-one correspondence between seating arrangements in Act and settings of the variables satisfying the above constraints. Consider the following distribution over the variables satisfying the constraints: z1, . . . , zc is distributed according to a Markov network with z1 = 1, zc = t, and edge potentials: f(zi, zi−1) =    i −1 −zid if zi = zi−1, 1 if zi = zi−1 + 1, 0 otherwise. (14) It is easy to see that the normalization constant is simply Sd(c, t) and P(z1:c) = Q i:zi=zi−1(i −1 −zid) Sd(c, t) . (15) Given z1:c, we give each yi the following distribution conditioned on y1:i−1: P(yi|z1:c, y1:i−1) = ( 1 if yi = i and zi = zi−1 + 1, Pi−1 j=1 1(yj=yi)−d i−1−zid if zi = zi−1 and yi ∈[i −1]. (16) 6 0 1 2 3 x 105 0 0.5 1 1.5 2 2.5 x 107 Input size Calgary: news context/symbol pairs tables (sampling) tables (particle filter) (a) 0 2 4 6 8 x 105 0 2 4 6 8 x 107 Brown corpus Input size context/symbol pairs tables (sampling) tables (particle filter) (b) 0 2 4 6 8 x 105 0 10 20 30 40 Input size Seconds per iteration Brown corpus Original Re−instantiating (c) Figure 2: (a), (b) Number of context/symbol pairs and total number of tables (counted after particle filter initialization and 10 sampling iterations using the compact original sampler) as a function input size. Subfigure (a) shows the counts obtained from a byte-level model of the news file in the Calgary corpus, whereas (b) shows the counts for word-level model of the Brown corpus (training set). The space required for the compact representation is proportional to the number of context/symbol pairs, whereas for the full representation it is proportional to the number of tables. Note also that sampling tends to increase the number of tables over the particle filter initialization. (c) Time per iteration (seconds) as a function of input size for the original Gibbs sampler in the compact representation and the re-instantiating sampler (on the Brown corpus). Multiplying all the probabilities together, we see that P(z1:c, y1:c) is exactly equal to P(A) in (2). Thus we can sample A by first sampling z1:c from (15), then each yi conditioned on previous ones using (16), and converting this representation into A. We use a backward-filtering-forward-sampling algorithm to sample z1:c, as this avoids numerical underflow problems that can arise when using forward-filtering. Backward-filtering avoids these problems by incorporating the constraint that zc has to equal t into the messages from the beginning. Fragmenting a Restaurant. In particle filtering and in prediction, we often need to re-instantiate a restaurant which was previously marginalized out. We can do so by sampling Aus given cus, tus for each s, then fragmenting each Aus using Theorem 1, counting the resulting numbers of customers and tables, then forgetting the seating arrangements. 6 Experiments In order to evaluate the proposed improvements in terms of reduced memory requirements and to compare the performance of the different sampling schemes we performed three sets of experiments.3 In the first experiment we evaluated the potential space saving due to the compact representation. Figure 2 shows the number of context/symbol pairs and the total number of tables as a function of data set size. While the difference does not seem dramatic, there is still a significant amount of memory that can be saved by using the compact representation, as there is no additional overhead and memory fragmentation due to variable-size arrays. The comparison between the byte-level model and the word-level model in Figure 2 also demonstrates that the compact representation saves more space when |Σ| is small (which leads to context/symbol pairs having larger cus’s and tus’s). Finally, Figure 2 illustrates another interesting effect: the number of tables is generally larger after a few iterations of Gibbs sampling have been performed after the initialization using a single-particle particle filter [2]. The second experiment compares the computational cost of the compact original sampler and the sampler that re-instantiates full seating arrangements. The main computational cost of the original sampler is computing the ratio (12), while sampling the seating arrangements is the main computational cost of the re-instantiating sampler. Figure 2(c) shows the time needed for one iteration of Gibbs sampling as a function of data set size. The re-instantiating sampler is found to be much more efficient, as it avoids the overhead involved in computing the Stirling numbers in a stable manner (e.g. log/exp computations). For the original sampler, time can be traded off with space 3All experiments were performed on two data sets: the news file from the Calgary corpus (modeled as a sequence of 377,109 bytes; |Σ| = 256), and the Brown corpus (preprocessed as in [12]), modeled as a sequence of words (800,000 words training set; 181,041 words test set; |Σ| = 16383). Following [1], the discount parameters were fixed to .62, .69, .74, .80 for the first 4 levels and .95 for all subsequent levels of the hierarchy. 7 α Particle Filter only Gibbs (1 sample) Gibbs (50 samples averaged) Online Fragment Parent Fragment Parent Fragment Parent PF Gibbs 0 8.45 8.41 8.44 8.41 8.43 8.39 8.04 8.04 1 8.41 8.39 8.40 8.39 8.39 8.38 8.01 8.01 3 8.37 8.37 8.37 8.37 8.35 8.35 7.98 7.98 10 8.33 8.34 8.33 8.33 8.32 8.32 7.95 7.94 20 8.32 8.33 8.32 8.32 8.31 8.31 7.94 7.94 50 8.32 8.33 8.31 8.32 8.31 8.31 7.95 7.95 Table 1: Average log-loss on the Brown corpus (test set) for different values of α, different inference strategies, and different modes of prediction. Inference is performed by either just using the particle filter or using the particle filter followed by 50 burn-in iterations of Gibbs sampling. Subsequently either 1 or 50 samples are collected for prediction. Prediction is performed either using fragmentation or by predicting from the parent node. The final two columns labelled Online show the results obtained by using the particle filter on the test set as well, after training with either just the particle filter or particle filter followed by 50 Gibbs iterations. Non-zero values of α can be seen to provide a significant increase in perfomance, while the gains due to averaging samples or proper fragmentation during prediction are small. by tabulating all required Stirling numbers along the path down the tree (as was done in these experiments). However, this leads to an additional memory overhead that mostly undoes any savings from the compact representation. The third set of experiments uses the re-instantiating sampler and compares different modes of prediction and the effect of the non-zero concentration parameter. The results are shown in Table 1. Predictions with the SM can be made in several different ways. After obtaining one or more samples from the posterior distribution over customers and tables (either using particle filtering or Gibbs sampling on the training set) one has a choice of either using particle filtering on the test set as well (online setting), or making predictions while keeping the model fixed. One also has a choice when making predictions involving contexts that were marginalized out from the model: one can either re-instantiate these contexts by fragmentation or simply predict from the parent (or even the child) of the required node. While one ultimately wants to average predictions over the posterior distribution, one may consider using just a single sample for computational reasons. 7 Discussion In this paper we proposed an enlarged set of hyperparameters for the sequence memoizer that retains the coagulation/fragmentation properties important for efficient inference, and we proposed a new minimal representation of the Chinese restaurant processes to reduce the memory requirement of the sequence memoizer. We developed novel inference algorithms for the new representation, and presented experimental results exploring their behaviors. We found that the algorithm which re-instantiates seating arrangements is significantly more efficient than the other two Gibbs samplers, while particle filtering is most efficient but produces slightly worse predictions. Along the way, we formalized the metaphorical language often used to describe Chinese restaurant processes in the machine learning literature, and were able to provide an elementary proof of the coagulation/fragmentation properties. We believe this more precise language will be of use to researchers interested in hierarchical Dirichlet processes and its various generalizations. We are currently exploring methods to compute or approximate the generalized Stirling numbers, and efficient methods to optimize the hyperparameters in the sequence memoizer. A parting remark is that the posterior distribution over {cus, tus} in (10) is in the form of a standard Markov network with sum constraints (7). Thus other inference algorithms like loopy belief propagation or variational inference can potentially be applied. There are however two difficulties to be resolved before these are possible: the large domains of the variables, and the large dynamic ranges of the factors. Acknowledgments We would like to thank the Gatsby Charitable Foundation for generous funding. 8 References [1] F. Wood, C. Archambeau, J. Gasthaus, L. F. James, and Y. W. Teh. A stochastic memoizer for sequence data. In Proceedings of the International Conference on Machine Learning, volume 26, pages 1129–1136, 2009. [2] J. Gasthaus, F. Wood, and Y. W. Teh. Lossless compression based on the Sequence Memoizer. In James A. Storer and Michael W. Marcellin, editors, Data Compression Conference, pages 337–345, Los Alamitos, CA, USA, 2010. IEEE Computer Society. [3] Y. W. Teh. A Bayesian interpretation of interpolated Kneser-Ney. Technical Report TRA2/06, School of Computing, National University of Singapore, 2006. [4] J. Pitman. Coalescents with multiple collisions. Annals of Probability, 27:1870–1902, 1999. [5] M. W. Ho, L. F. James, and J. W. Lau. Coagulation fragmentation laws induced by general coagulations of two-parameter Poisson-Dirichlet processes. http://arxiv.org/abs/math.PR/0601608, 2006. [6] 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. [7] P. Blunsom, T. Cohn, S. Goldwater, and M. Johnson. A note on the implementation of hierarchical Dirichlet processes. In Proceedings of the ACL-IJCNLP 2009 Conference Short Papers, pages 337–340, Suntec, Singapore, August 2009. Association for Computational Linguistics. [8] J. Pitman and M. Yor. The two-parameter Poisson-Dirichlet distribution derived from a stable subordinator. Annals of Probability, 25:855–900, 1997. [9] H. Ishwaran and L. F. James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453):161–173, 2001. [10] L. C. Hsu and P. J.-S. Shiue. A unified approach to generalized Stirling numbers. Advances in Applied Mathematics, 20:366–384, 1998. [11] Y. W. Teh. A hierarchical Bayesian language model based on Pitman-Yor processes. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics, pages 985–992, 2006. [12] Y. Bengio, R. Ducharme, P. Vincent, and C. Jauvin. A neural probabilistic language model. Journal of Machine Learning Research, 3:1137–1155, 2003. 9
2010
133
3,892
Simultaneous Object Detection and Ranking with Weak Supervision Matthew B. Blaschko Andrea Vedaldi Department of Engineering Science University of Oxford United Kingdom Andrew Zisserman Abstract A standard approach to learning object category detectors is to provide strong supervision in the form of a region of interest (ROI) specifying each instance of the object in the training images [17]. In this work are goal is to learn from heterogeneous labels, in which some images are only weakly supervised, specifying only the presence or absence of the object or a weak indication of object location, whilst others are fully annotated. To this end we develop a discriminative learning approach and make two contributions: (i) we propose a structured output formulation for weakly annotated images where full annotations are treated as latent variables; and (ii) we propose to optimize a ranking objective function, allowing our method to more effectively use negatively labeled images to improve detection average precision performance. The method is demonstrated on the benchmark INRIA pedestrian detection dataset of Dalal and Triggs [14] and the PASCAL VOC dataset [17], and it is shown that for a significant proportion of weakly supervised images the performance achieved is very similar to the fully supervised (state of the art) results. 1 Introduction Learning from weakly annotated data is a long standing goal for the practical application of machine learning techniques to real world data. Expensive manual labeling steps should be avoided if possible, while weakly labeled and unlabeled data sources should be exploited in order to improve performance with little to no additional cost. In this work, we propose a unified framework for learning to detect objects in images from data with heterogeneous labels. In particular, we consider the case of image collections for which we would like to predict bounding box localizations, but that (for a significant proportion of the training data) only image level binary annotations are provided indicating the presence or absence of an object, or that weak indications of object location are given without a precise bounding box annotation. We approach this task from the perspective of structured output learning [3, 35, 36], building on the approach of Blaschko and Lampert [8], in which a structured output support vector machine formulation [36] is used to directly learn a regressor from images to object localizations parameterized by the coordinates of a bounding box. We extend this framework here to weakly annotated images by treating missing information in a latent variable fashion following [2, 40]. Available annotation, such as the presence or absence of an object in an image, constrains the set of values the latent variable can take. In the case that complete label information is provided [40] reduces to [36], giving a unified framework for data with heterogeneous levels of annotation. We empirically observe that the localization approach of [8] fails in the case that there are many images with no object present, motivating a slight modification of the learning algorithm to optimize detection ranking analogous 1 to [11, 21, 41]. We extend these works to the case that the predictions to be ranked are structured outputs. When combined with discriminative latent variable learning, this results in an algorithm similar to multiple instance ranking [6], but we exploit the full generality of structured output learning. The computer vision literature has approached learning from weakly annotated data in many different ways. Search engine results [20] or associated text captions [5, 7, 13, 34] are attractive due to the availability of millions of tagged or captioned images on the internet, providing a weak form of labels beyond unsupervised learning [37]. This generally leads to ambiguity as captions tend to be correlated with image content, but may contain errors. Alternatively, one may approach the problem of object detection by considering generic properties of objects or their attributes in order to combine training data from multiple classes [1, 26, 18]. Deselaers et al. learn the common appearance of multiple object categories, which yields an estimate of where in an image an object is without specifying the specific class to which it belongs [15]. This can then be utilized in a weak supervision setting to learn a detector for a specific object category. Carbonetto et al. consider a Bayesian framework for learning across incomplete, noisy, segmentation-level annotation [10]. Structured output learning with latent variables has been proposed for inferring partial truncation of detections due to occlusion or image boundaries [38]. Image level binary labels have often been used, as this generally takes less time for a human annotator to produce [4, 12, 23, 28, 30, 31, 33]. Here, we consider this latter kind of weak annotation, and will also consider cases where the object center is constrained to a region in the image, but that exact coordinates are not given [27]. Simultaneous localization and classification using a discriminative latent variable model has been recently explored in [29], but that work has not considered mixed annotation, or a structured output loss. The rest of this paper is structured as follows. In Section 2 we review a structured output learning formulation for object detection that will form the basis of our optimization. We then propose to improve that approach to better handle negative training instances by developing a ranking objective in Section 3. The resulting objective allows us to approach the problem of weakly annotated data in Section 4, and the methods are empirically validated in Section 5. 2 Object Detection with Structured Output Learning Structured output learning generalizes traditional learning settings to the prediction of more complex output spaces, in which there may be non-trivial interdependencies between components of the output. In our case, we would like to learn a mapping f : X →Y where X the space of images and Y is the space of bounding boxes or no bounding box: Y ≡∅S(l, t, r, b), where (l, t, r, b) ∈R4 specifies the left, top, right, and bottom coordinates of a bounding box. This approach was first proposed by [8] using the Structured Output SVM formulation of [36]: min w,ξ 1 2∥w∥2 + C 1 n X i ξi (1) s.t. ⟨w, φ(xi, yi)⟩−⟨w, φ(xi, y)⟩≥∆(yi, y) −ξi, ∀i, y ∈Y \ {yi} (2) ξi ≥0 ∀i (3) where ∆(yi, y) is a loss for predicting y when the true output is yi, and φ(xi, yi) is a joint kernel map that measures statistics of the image, xi, local to the bounding box, yi [8, 9].1 Training is achieved using delayed constraint generation, and at test time, a prediction is made by computing f(x) = argmaxy⟨w, φ(x, y)⟩. It was proposed in [8] to treat images in which there is no instance of the object of interest as zero vectors in the Hilbert space induced by φ, i.e. φ(x, y−) = 0 ∀x where y−indicates the label that there is no object in the image (i.e. y−≡∅). During training, constraints are generated by finding ˜y∗ i = argmaxy∈Y\{yi}⟨w, φ(xi, y)⟩+∆(yi, y). For negative images, ∆(y−, y) = 1 if y indicates an object is present, so the maximization corresponds simply to finding the bounding box with highest score. The resulting constraint corresponds to: ξi ≥1 + ⟨w, φ(xi, ˜y∗ i )⟩ (4) 1As in [8], we make use of the margin rescaling formulation of structured output learning. The slack rescaling variant is equally applicable [36]. 2 which tends to decrease the score associated with all bounding boxes in the image. The primary problem with this approach is that it optimizes a regularized risk functional for which negative images are treated equally with positive images. In the case of imbalances in the training data where a large majority of images do not contain the object of interest, the objective function may be dominated by the terms in P i ξi for which there is no bounding box present. The learning procedure may focus on decreasing the score of candidate detections in negative images rather than on increasing the score of correct detections. We show empirically in Section 5 that this treatment of negative images is in fact detrimental to localization performance. The results presented in [8] were achieved by training only on images with an instance of the object present, ignoring large quantities of negative training data. Although one may attempt to address this problem by adjusting the loss function, ∆, to penalize negative images less than positive images, this approach is heuristic and requires searching over an additional parameter during training (the relative size of the loss for negative images). We address this imbalance more elegantly without introducing additional parameters in the following section. 3 Learning to Rank We propose to remedy the shortcomings outlined in the previous section by modifying the objective in Equation (1) to simultaneously localize and rank object detections. The following constraints applied to the test set ensure a perfect ranking, that is that every true detection has a higher score than all false detections: ⟨w, φ(xi, yi)⟩> ⟨w, φ(xj, ˜yj)⟩ ∀i, j, ˜yj ∈Y \ {yj}. (5) We modify these constraints, incorporating a structured output loss, in the following structured output ranking objective min w,ξ 1 2∥w∥2 + C 1 n · n+ X i,j ξij (6) s.t. ⟨w, φ(xi, yi)⟩−⟨w, φ(xj, ˜yj)⟩≥∆(yj, ˜yj) −ξij ∀i, j, ˜yj ∈Y \ {yj} (7) ξij ≥0 ∀i, j (8) where n+ denotes the number of positive instances in the training set. As compared with Equations (1)-(3), we now compare each positive instance to all bounding boxes in all images in the training set instead of just the bounding boxes from the image it comes from. The constraints attempt to give all positive instances a score higher than all negative instances, where the size of the margin is scaled to be proportional to the loss achieved by the negative instance. We note that one can use this same approach to optimize related ranking objectives, such as precision at a given detection rate, by extending the formulations of [11, 41] to incorporate our structured output loss function, ∆. As in [8, 36] we have an intractable number of constraints in Equation (7). We will address this problem using a constraint generation approach with a 1-slack formulation min w,ξ 1 2∥w∥2 + Cξ (9) s.t. X ij ⟨w, φ(xi, yi)⟩−⟨w, φ(xj, ˜yj)⟩≥ X ij ∆(yj, ˜yj) −ξ ∀˜y ∈ M j Y \ {yj} (10) ξ ≥0 (11) where ˜y is a vector with jth element ˜yj. Although this results in a number of constraints exponential in the number of training examples, we can solve this efficiently using a cutting plane algorithm. The proof of equivalence between this optimization problem and that in Equations (6)-(8) is analogous to the proof in [22, Theorem 1]. We are only left to find the maximally violated constraints in Equation (10). Algorithm 1 gives an efficient procedure for doing so. Algorithm 1 works by first scoring all positive regions, as well as finding and scoring the maximally violated regions from each image. We make use of the transitivity of ordering these two sets of scores to avoid comparing all pairs in a na¨ıve fashion. If ⟨w, φ(xj, ˜y∗ j )⟩≥⟨w, φ(xi, yi)⟩and 3 Algorithm 1 1-slack structured output ranking – maximally violated constraint. Ensure: Maximally violated constraint is δ −⟨w, ψ⟩≤ξ for all i do s+ i = ⟨w, φ(xi, yi)⟩ end for for all j do ˜y∗ j = argmaxy⟨w, φ(xj, y)⟩+ ∆(yj, y) s− j = ⟨w, φ(xj, ˜y∗ j )⟩+ ∆(yj, ˜y∗ j ) end for (s+, p+) = sort(s+) {p+ is a vector of indices specifying a given score’s original index.} (s−, p−) = sort(s−) δ = 0, k = 1, ψ = φ+ = 0 for all j do while s− j > s+ k ∧k ≤n+ + 1 do φ+ = φ+ + φ  xp+ k , yp+ k  k = k + 1 end while ψ = ψ + φ+ −(k −1)φ  xp− j , ˜y∗ p− j  δ = δ + (k −1)∆(yj, ˜y∗ j ) end for ⟨w, φ(xi, yi)⟩≥⟨w, φ(xp, yp)⟩, we do not have to compare ⟨w, φ(xj, ˜y∗ j )⟩and ⟨w, φ(xp, yp)⟩. Instead, we sort the instances of the class by their score, and sort the negative instances by their score as well. We keep an accumulator vector for positive images, φ+, and a count of the number of violated constraints (k −1). We iterate through each violated region, ordered by score, and sum the violated constraints into ψ and δ, yielding the maximally violated 1-slack constraint. 4 Weakly Supervised Data Now that we have developed a structured output learning framework that is capable of appropriately handling images from the background class, we turn our attention to the problem of learning with weakly annotated data. We will consider the problem in full generality by assuming that we have bounding box level annotation for some training images, but only binary labels or weak location information for others. For negatively labeled images, we know that no bounding box in the entire image contains an instance of the object class, while for positive images at least one bounding box belongs to the class of interest. We approach this issue by considering the location of a bounding box to be a latent variable to be inferred during training. The value that this variable can take is constrained by the weak annotation. In the case that we have only a binary image-level label, we constrain the latent variable to indicate that some region of the image corresponds to the object of interest. In a more constrained case, such as annotation indicating the object center, we constrain the latent variable to belong to the set of bounding boxes that have a center consistent with the annotation. There is an asymmetry in the image level labeling in that negative labels can be considered to be full annotation (i.e. all bounding boxes do not contain an instance of the object), while positive labels are incomplete.2 We consider the index variable j to range over all completely labeled images, including negative images. We consider a modification of the constrained objective developed in the previous section to include constraints of the form given in Equation (7), but also constraints for our weakly annotated positive images, which we index by m,  max ˆym∈Ym⟨w, φ(xm, ˆym)⟩  −⟨w, φ(xj, ˜yj)⟩≥∆(yj, ˜yj) −ξmj ∀m, j, ˜yj ∈Y \ {yj}, (12) 2Note that this is exactly the asymmetry discussed in [2] in the context of multiple instance learning. Our setting can be seen as a generalization to mixed annotations. 4 where Ym is the set of bounding boxes consistent with the weak annotation for image m. Due to the maximization over ˆym, the optimization is no longer convex, but we can find a local optimum using the CCCP algorithm [40]. This is effectively equivalent to the case of loss-rescaled multiple instance learning, and we note that the resulting objective has similarities to that of [2]. Viewed another way, we treat the location of the hypothesized bounding box as a latent variable. In order to use this in our discriminative optimization, we will try to put a large margin between the maximally scoring box and all bounding boxes with high loss. Though our algorithm does not have direct information about the true location of the object of interest, it tries to learn a discriminant function that can distinguish a region in the positively labeled images from all regions in the negatively labeled images. 5 Results We validate our model on the benchmark INRIA pedestrian detection dataset of Dalal and Triggs [14] using a histogram of oriented gradients (HOG) representation, and the PASCAL VOC dataset [16, 17]. Following [9, 24, 25], we provide detailed results on the cat class as the high variation in pose is appropriate for testing a bag of words model, but also provide summary results for all classes in the form of improvement in mean average precision (mean AP). We first illustrate the performance of the ranking objective developed in Section 3 and subsequently show the performance of learning with weakly supervised data using the latent variable approach of Section 4. 5.1 Experimental Setup We have implemented variants of two popular object detection systems in order to show the generalization of the approaches developed in this work to different levels of supervision and feature descriptors. In the first variant, we have used a linear bag of words model similar to that developed in [8, 24, 25]. Inference of maximally violated constraints and object detection was performed using Efficient Subwindow Search (ESS) branch-and-bound inference [24, 25]. The joint kernel map, φ, was constructed using a concatenation of the bounding box visual words histogram (the restriction kernel) and a global image histogram, similar to the approach described in [9]. Results are presented on the VOC 2007 dataset [16, 17]. The second variant of the detector is based on the histogram of oriented gradients (HOG) representation [14]. HOG subdivides the image into cells, usually of size 8 × 8 pixels, and computes for each cell a weighed histogram of the gradient orientations. The experiments use the HOG variant of [19], which results in a 31-dimensional histogram for each cell. The HOG features are extracted at multiple scales, forming a pyramid. An object is described by a rectangular arrangement of HOG cells (the aspect ratio of the rectangular grouping is fixed). The joint feature map, φ, extracts from the HOG representation of the image the rectangular group of HOG cells at a given scale and location [38]. A constant bias term is appended to the resulting feature [38] for all but the ranking cost functional, as the bias term cancels out in that formulation. Note that the model is analogous to the HOG detector of [14], and in particular does not use flexible parts as in [19]. Results are presented for the INRIA pedestrian data set [14]. 5.2 Learning to Rank In order to evaluate the effects of optimizing the ranking objective developed in this work, we begin by comparing the performance of the objective in Equations (6)-(8) in a fully supervised setting with that of the objective in Equations (1)-(3), which correspond to the optimization proposed in [8]. In Figure 1, we show the relative performance of the linear bag of visual words model applied to the PASCAL VOC 2007 data set [17]. We first show results for the cat class in which 10% of negative images are included in the training set (Figure 1(a)), and subsequently results for which all negative images are used for training (Figure 1(b)). While the ranking objective can appropriately handle varying amounts of negative training data, the objective in Equation (1) fails, resulting in worse performance as the amount of negative training data increases. These results empirically show the shortcomings of the treatment of negative images proposed in [8], but the ranking objective by contrast is robust to large imbalances between positive and negative images. Mean AP increases by 69% as a result of using the ranking objective when 10% of negative images are included during training, and mean AP improves by 71% when all negative images are used. 5 0 0.05 0.1 0.15 0.2 0.25 0.3 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 precision recall Ranking objective Standard objective (a) cat class trained with 10% of available negative images. 0 0.05 0.1 0.15 0.2 0.25 0.3 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 precision recall Ranking objective Standard objective (b) cat class trained with 100% of available negative images. Figure 1: Precision-recall curves for the structured output ranking objective proposed in this paper (blue) vs. the structured output objective proposed in [8] (red) for varying amounts of negative training data. Results are shown on the cat class from the PASCAL VOC 2007 data set for 10% of negative images (1(a)) and for 100% of negatives (1(b)). In all cases a linear bag of visual words model was employed (see text for details). The structured output objective proposed in [8] performs worse with increasing amounts of negative training data, and the algorithm completely fails in 1(b). The ranking objective, on the other hand, does not suffer from this shortcoming (blue curves). Figure 2.(a) analyzes the performance of the HOG pedestrian detection on the INRIA data set. Three cost functionals are compared: a simple binary SVM, the structural SVM model of (1), and the ranking SVM model of (6). The INRIA dataset contains 1218 negative images (i.e. images not containing people). Each image is subdivided (in scale and space) into twenty sub-images and a maximally violating window (object location) is extracted from each of those. This results in 24360 negative windows. The dataset contains also 612 positive images, for a total of 1237 labeled pedestrians. Thus there are about twenty times more negative examples than positive ones. Reweighted versions of the binary and structural SVM models that balance the number of positive and negative examples are also tested. As the figure shows, balancing the data in the cost functional is important, especially for the binary SVM model; the ranking model is slightly superior to the other formulations, with average precision of 77%, and does not require an adjustment to the loss to account for a given level of data imbalance. By comparison, the state-of-the-art detector of [32] has average precision 78%. We conjecture that this small difference in performance is due to their use of color information. 5.3 Learning with Weak Annotations To evaluate the objective in the case of weak supervision, we have additionally performed experiments in which we have varied the percentage of bounding box annotations provided to the learning algorithm. Figure 3 contrasts the performance on the VOC dataset of our proposed discriminative latent variable algorithm with that of a fully supervised algorithm in which weakly annotated training data are ignored. We have run the algorithm for 10% of images having full bounding box annotations (with the other 90% weakly labeled) and for 50% of images having complete annotation. In the fully supervised case, we ignore all images that do not have full bounding box annotation and train the fully supervised ranking objective developed in Section 3. In all cases, the latent variable model performs convincingly better than subsampling. For 10% of images fully annotated, mean AP increases by 64%, and with 50% of images fully annotated, mean AP increases by 83%. Figure 2.(b) reports the performance of the latent variable ranking model (8) for the HOG-based detector on the INRIA pedestrian dataset. Only one positive image is fully labeled with the pedestrian bounding boxes while the remaining positive images are weakly labeled. Since most positive images contain multiple pedestrians, the weak annotations carry a minimal amount of information that is still sufficient to distinguish the different pedestrian instances. Specifically, the bounding boxes are discarded and only their centers are kept. Estimating the latent variables consists of a search over 6 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 recall precision 73.97% (structural) 59.51% (binaray) 76.23% (structural bal.) 75.85% (binary bal.) 77.33% (rank) (a) 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 recall precision 31.89% (no weak) 50.83% (50 weak) 54.30% (100 weak) 59.68% (200 weak) 66.10% (500 weak) 75.35% (all weak) (b) Figure 2: (a) Precision-recall curves for different formulations: binary and structural SVMs, balanced binary and structural SVMs, ranking SVM. The unbalanced SVMs, and in particular the binary one, do not work well due to the large number of negative examples compared to the positive ones. The ranking formulation is slightly better than the other balanced costs for this dataset. (b) Precision-recall curves for increasing amounts of weakly supervised data for the ranking formulation. For all curves, only one image is fully labeled with bounding boxes around pedestrians, while the other images are labeled only by the pedestrian centers. The first curve (AP 32%) corresponds to the case in which only the fully supervised image is used; the last curve (AP 75%) to the case in which all the other training images are added with weak annotations. The performance is almost as good as the fully supervised case (AP 77%) of (a). 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 precision recall Weak supervision Subsampling (a) cat class trained with 10% of bounding boxes. 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 precision recall Weak supervision Subsampling (b) cat class trained with 50% of bounding boxes. Figure 3: Precision-recall curves for the structured output ranking objective proposed in this paper trained with a linear bag of words image representation and weak supervision (blue) vs. only using fully labeled samples (red). Results are shown for 10% of bounding boxes (left) and for 50% of bounding boxes (right), the remainder of the images were provided with weak annotation indicating the presence or absence of an object in the image, but not the object location. In both cases, the latent variable model (blue) results in performance that is substantially better than discarding weakly annotated images and using a fully supervised setting (red). all object locations and scales for which the corresponding bounding box center is within a given bound of the labeled center (the bound is set to 25% of the length of the box diagonal). In other words, a weak annotation contains only approximate location information. This gives robustness to inaccuracies in manually labeling the centers. The figure shows how the model performs when, in addition to the singly fully annotated image, an increasing number of weakly annotated images are added. Starting from 32% AP, the method improves up to 75% AP, which is remarkably similar to the best result (77% AP) obtained with full supervision. 7 6 Discussion We can draw several conclusions from the results in Section 5. First, using the learning formulation developed in [8], negative images are not handled properly, resulting in the undesired behavior that additional negative images in the training data decrease performance. The special case of the objective in Equations (1)-(3), for which no negative training data are incorporated, can be viewed roughly as an estimate of the log probability of an object being present at a location conditioned on that an object is present in the image. While this results in reasonable performance in terms of recall (c.f. [8]), it does not result in a good average precision (AP) score. In fact, the results presented in [8] were computed by training the objective function only on positive images, and then using a separate non-linear ranking function based on global image statistics. Using only positively labeled images in the objective presented in Section 2 only incorporates a subset of the constraints in Equation (7) corresponding to i = j. Incorporating all these constraints directly optimizes ranking, enabling the use of all available negative training data to improve localization performance. Reweighting the loss corresponding to positive and negative examples resulted in similar performance to the ranking objective on the INRIA pedestrian data set, but requires a search across an additional parameter. From the perspective of regularized risk, subsampling negative images can be viewed as a noisy version of this reweighting, and experiments on PASCAL VOC using the objective in (1) showed poor performance over a wide range of sampling rates. The ranking objective by contrast weights loss from the negative examples appropriately (Algorithm 1) according to their contribution to the loss for the precision-recall curve. This is a much more principled and robust criterion for setting the loss function. By using the ranking objective to treat negative images, learning with weak annotations was made directly applicable using a discriminative latent variable model. Results showed consistent improvement across different proportions of weakly and fully supervised data. Our formulation handled different ratios of weakly annotated and fully annotated training data without additional parameter tuning in the loss function. The discriminative latent variable approach has been able to achieve performance within a few percent of that achieved by a fully supervised system using only one fully supervised label. The weak labels used for the remaining data are significantly less expensive to supply [39]. That this is consistent across the data sets reported here indicates that discriminative latent variable models are a promising strategy for treating weak annotation in general. Acknowledgments The first author is supported by the Royal Academy of Engineering through a Newton International Fellowship. The research leading to these results has received funding from the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007- 2013) / ERC grant agreement no. 228180, and from the PASCAL2 network of excellence. References [1] B. Alexe, T. Deselaers, and V. Ferrari. What is an object? In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, June 2010. [2] S. Andrews, I. Tsochantaridis, and T. Hofmann. Support vector machines for multiple-instance learning. In Advances in Neural Information Processing Systems, pages 561–568. MIT Press, 2003. [3] G. H. Bakır, T. Hofmann, B. Sch¨olkopf, A. J. Smola, B. Taskar, and S. V. N. Vishwanathan. Predicting Structured Data. MIT Press, 2007. [4] A. Bar Hillel, T. Hertz, and D. Weinshall. Efficient learning of relational object class models. In Proceedings of the International Conference on Computer Vision, pages 1762–1769, 2005. [5] T. Berg, A. Berg, J. Edwards, M. Mair, R. White, Y. Teh, E. Learned-Miller, and D. Forsyth. Names and Faces in the News. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Washington, DC, 2004. [6] C. Bergeron, J. Zaretzki, C. Breneman, and K. P. Bennett. Multiple instance ranking. In Proceedings of the International Conference on Machine Learning, pages 48–55, 2008. [7] M. B. Blaschko and C. H. Lampert. Correlational spectral clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [8] M. B. Blaschko and C. H. Lampert. Learning to localize objects with structured output regression. In Proceedings of the European Conference on Computer Vision, 2008. [9] M. B. Blaschko and C. H. Lampert. Object localization with global and local context kernels. In Proceedings of the British Machine Vision Conference, 2009. [10] P. Carbonetto, G. Dork´o, C. Schmid, H. K¨uck, and N. Freitas. Learning to recognize objects with little supervision. International Journal of Computer Vision, 77(1–3):219–237, 2008. 8 [11] O. Chapelle and S. S. Keerthi. Efficient algorithms for ranking with svms. Information Retrieval, 2009. [12] O. Chum and A. Zisserman. An exemplar model for learning object classes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2007. [13] T. Cour, B. Sapp, C. Jordan, and B. Taskar. Learning from ambiguously labeled images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2009. [14] N. Dalal and B. Triggs. Histogram of Oriented Gradients for Human Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 2, pages 886–893, 2005. [15] T. Deselaers, B. Alexe, and V. Ferrari. Localizing objects while learning their appearance. In Proceedings of the European Conference on Computer Vision, 2010. [16] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html, 2007. [17] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303–338, June 2010. [18] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1778–1785, 2009. [19] P. Felzenszwalb, D. Mcallester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [20] R. Fergus, L. Fei-Fei, P. Perona, and A. Zisserman. Learning object categories from Google’s image search. In Proceedings of the International Conference on Computer Vision, 2005. [21] T. Joachims. Optimizing search engines using clickthrough data. In KDD ’02: Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 133–142, New York, NY, USA, 2002. ACM. [22] T. Joachims, T. Finley, and C.-N. J. Yu. Cutting-plane training of structural svms. Machine Learning, 77(1):27–59, 2009. [23] G. Kim and A. Torralba. Unsupervised detection of regions of interest using iterative link analysis. In Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems, pages 961–969. 2009. [24] C. H. Lampert, M. B. Blaschko, and T. Hofmann. Beyond sliding windows: Object localization by efficient subwindow search. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [25] C. H. Lampert, M. B. Blaschko, and T. Hofmann. Efficient subwindow search: A branch and bound framework for object localization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2009. [26] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 951–958, 2009. [27] B. Leibe, A. Leonardis, and B. Schiele. Combined object categorization and segmentation with an implicit shape model. In Workshop on Statistical Learning in Computer Vision, ECCV, May 2004. [28] F. Moosmann, D. Larlus, and F. Jurie. Learning saliency maps for object categorization. In ECCV International Workshop on The Representation and Use of Prior Knowledge in Vision, 2006. [29] M. H. Nguyen, L. Torresani, F. De la Torre Frade, and C. Rother. Weakly supervised discriminative localization and classification: A joint learning process. In Proceedings of the International Conference on Computer Vision, 2009. [30] A. Opelt, A. Fussenegger, A. Pinz, and P. Auer. Weak hypotheses and boosting for generic object detection and recognition. In Proceedings of the 8th European Conference on Computer Vision, Prague, Czech Republic, volume 2, pages 71–84, 2004. [31] A. Opelt and A. Pinz. Object localization with boosting and weak supervision for generic object recognition. In Scandinavian Conference on Image Analysis, pages 862–871, 2005. [32] P. Ott and M. Everingham. Implicit color segmentation features for pedestrian and object detection. In Proceedings of the International Conference on Computer Vision, 2009. [33] C. Pantofaru and M. Hebert. A framework for learning to recognize and segment object classes using weakly supervised training data. In Proceedings of the British Machine Vision Conference, 2007. [34] N. Rasiwasia and N. Vasconcelos. Scene classification with low-dimensional semantic spaces and weak supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2008. [35] B. Taskar, C. Guestrin, and D. Koller. Max-margin markov networks. In S. Thrun, L. Saul, and B. Sch¨olkopf, editors, Advances in Neural Information Processing Systems. 2004. [36] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In Proceedings of the International Conference on Machine Learning, 2004. [37] T. Tuytelaars, C. H. Lampert, M. B. Blaschko, and W. Buntine. Unsupervised object discovery: A comparison. International Journal of Computer Vision, 88(2):61–85, 2010. [38] A. Vedaldi and A. Zisserman. Structured output regression for detection with partial truncation. In Advances in Neural Information Processing Systems, 2009. [39] S. Vijayanarasimhan and K. Grauman. Multi-level active prediction of useful image annotations for recognition. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems, pages 1705–1712. 2009. [40] C.-N. J. Yu and T. Joachims. Learning structural svms with latent variables. In Proceedings of the International Conference on Machine Learning, 2009. [41] Y. Yue, T. Finley, F. Radlinski, and T. Joachims. A support vector method for optimizing average precision. In Special Interest Group on Information Retrieval, 2007. 9
2010
134
3,893
Generating more realistic images using gated MRF’s Marc’Aurelio Ranzato Volodymyr Mnih Geoffrey E. Hinton Department of Computer Science University of Toronto {ranzato,vmnih,hinton}@cs.toronto.edu Abstract Probabilistic models of natural images are usually evaluated by measuring performance on rather indirect tasks, such as denoising and inpainting. A more direct way to evaluate a generative model is to draw samples from it and to check whether statistical properties of the samples match the statistics of natural images. This method is seldom used with high-resolution images, because current models produce samples that are very different from natural images, as assessed by even simple visual inspection. We investigate the reasons for this failure and we show that by augmenting existing models so that there are two sets of latent variables, one set modelling pixel intensities and the other set modelling image-specific pixel covariances, we are able to generate high-resolution images that look much more realistic than before. The overall model can be interpreted as a gated MRF where both pair-wise dependencies and mean intensities of pixels are modulated by the states of latent variables. Finally, we confirm that if we disallow weight-sharing between receptive fields that overlap each other, the gated MRF learns more efficient internal representations, as demonstrated in several recognition tasks. 1 Introduction and Prior Work The study of the statistical properties of natural images has a long history and has influenced many fields, from image processing to computational neuroscience [1]. In this work we focus on probabilistic models of natural images. These models are useful for extracting representations [2, 3, 4] that can be used for discriminative tasks and they can also provide adaptive priors [5, 6, 7] that can be used in applications like denoising and inpainting. Our main focus, however, will be on improving the quality of the generative model, rather than exploring its possible applications. Markov Random Fields (MRF’s) provide a very general framework for modelling natural images. In an MRF, an image is assigned a probability which is a normalized product of potential functions, with each function typically being defined over a subset of the observed variables. In this work we consider a very versatile class of MRF’s in which potential functions are defined over both pixels and latent variables, thus allowing the states of the latent variables to modulate or gate the effective interactions between the pixels. This type of MRF, that we dub gated MRF, was proposed as an image model by Geman and Geman [8]. Welling et al. [9] showed how an MRF in this family1 could be learned for small image patches and their work was extended to high-resolution images by Roth and Black [6] who also demonstrated its success in some practical applications [7]. Besides their practical use, these models were specifically designed to match the statistical properties of natural images, and therefore, it seems natural to evaluate them in those terms. Indeed, several authors [10, 7] have proposed that these models should be evaluated by generating images and 1Product of Student’s t models (without pooling) may not appear to have latent variables but each potential can be viewed as an infinite mixture of zero-mean Gaussians where the inverse variance of the Gaussian is the latent variable. 1 checking whether the samples match the statistical properties observed in natural images. It is, therefore, very troublesome that none of the existing models can generate good samples, especially for high-resolution images (see for instance fig. 2 in [7] which is one of the best models of highresolution images reported in the literature so far). In fact, as our experiments demonstrate the generated samples from these models are more similar to random images than to natural images! When MRF’s with gated interactions are applied to small image patches, they actually seem to work moderately well, as demonstrated by several authors [11, 12, 13]. The generated patches have some coherent and elongated structure and, like natural image patches, they are predominantly very smooth with sudden outbreaks of strong structure. This is unsurprising because these models have a built-in assumption that images are very smooth with occasional strong violations of smoothness [8, 14, 15]. However, the extension of these patch-based models to high-resolution images by replicating filters across the image has proven to be difficult. The receptive fields that are learned no longer resemble Gabor wavelets but look random [6, 16] and the generated images lack any of the long range structure that is so typical of natural images [7]. The success of these methods in applications such as denoising is a poor measure of the quality of the generative model that has been learned: Setting the parameters to random values works almost as well for eliminating independent Gaussian noise [17], because this can be done quite well by just using a penalty for high-frequency variation. In this work, we show that the generative quality of these models can be drastically improved by jointly modelling both pixel mean intensities and pixel covariances. This can be achieved by using two sets of latent variables, one that gates pair-wise interactions between pixels and another one that sets the mean intensities of pixels, as we already proposed in some earlier work [4]. Here, we show that this modelling choice is crucial to make the gated MRF work well on high-resolution images. Finally, we show that the most widely used method of sharing weights in MRF’s for high-resolution images is overly constrained. Earlier work considered homogeneous MRF’s in which each potential is replicated at all image locations. This has the subtle effect of making learning very difficult because of strong correlations at nearby sites. Following Gregor and LeCun [18] and also Tang and Eliasmith [19], we keep the number of parameters under control by using local potentials, but unlike Roth and Black [6] we only share weights between potentials that do not overlap. 2 Augmenting Gated MRF’s with Mean Hidden Units A Product of Student’s t (PoT) model [15] is a gated MRF defined on small image patches that can be viewed as modelling image-specific, pair-wise relationships between pixel values by using the states of its latent variables. It is very good at representing the fact that two-pixel have very similar intensities and no good at all at modelling what these intensities are. Failure to model the mean also leads to impoverished modelling of the covariances when the input images have nonzero mean intensity. The covariance RBM (cRBM) [20] is another model that shares the same limitation since it only differs from PoT in the distribution of its latent variables: The posterior over the latent variables is a product of Bernoulli distributions instead of Gamma distributions as in PoT. We explain the fundamental limitation of these models by using a simple toy example: Modelling two-pixel images using a cRBM with only one binary hidden unit, see fig. 1. This cRBM assumes that the conditional distribution over the input is a zero-mean Gaussian with a covariance that is determined by the state of the latent variable. Since the latent variable is binary, the cRBM can be viewed as a mixture of two zero-mean full covariance Gaussians. The latent variable uses the pairwise relationship between pixels to decide which of the two covariance matrices should be used to model each image. When the input data is pre-proessed by making each image have zero mean intensity (the empirical histogram is shown in the first row and first column), most images lie near the origin because most of the times nearby pixels are strongly correlated. Less frequently we encounter edge images that exhibit strong anti-correlation between the pixels, as shown by the long tails along the anti-diagonal line. A cRBM could model this data by using two Gaussians (first row and second column): one that is spherical and tight at the origin for smooth images and another one that has a covariance elongated along the anti-diagonal for structured images. If, however, the whole set of images is normalized by subtracting from every pixel the mean value of all pixels over all images (second row and first column), the cRBM fails at modelling structured images (second row and second column). It can fit a Gaussian to the smooth images by discovering 2 Figure 1: In the first row, each image is zero mean. In the second row, the whole set of data points is centered but each image can have non-zero mean. The first column shows 8x8 images picked at random from natural images. The images in the second column are generated by a model that does not account for mean intensity. The images in the third column are generated by a model that has both “mean” and “covariance” hidden units. The contours in the first column show the negative log of the empirical distribution of (tiny) natural two-pixel images (x-axis being the first pixel and the y-axis the second pixel). The plots in the other columns are toy examples showing how each model could represent the empirical distribution using a mixture of Gaussians with components that have one of two possible covariances (corresponding to the state of a binary “covariance” latent variable). Models that can change the means of the Gaussians (mPoT and mcRBM) can represent better structured images (edge images lie along the anti-diagonal and are fitted by the Gaussians shown in red) while the other models (PoT and cRBM) fail, overall when each image can have non-zero mean. the direction of strong correlation along the main diagonal, but it is very likely to fail to discover the direction of anti-correlation, which is crucial to represent discontinuities, because structured images with different mean intensity appear to be evenly spread over the whole input space. If the model has another set of latent variables that can change the means of the Gaussian distributions in the mixture (as explained more formally below and yielding the mPoT and mcRBM models), then the model can represent both changes of mean intensity and the correlational structure of pixels (see last column). The mean latent variables effectively subtract off the relevant mean from each data-point, letting the covariance latent variable capture the covariance structure of the data. As before, the covariance latent variable needs only to select between two covariance matrices. In fact, experiments on real 8x8 image patches confirm these conjectures. Fig. 1 shows samples drawn from PoT and mPoT. mPoT (and similarly mcRBM [4]) is not only better at modelling zero mean images but it can also represent images that have non zero mean intensity well. We now describe mPoT, referring the reader to [4] for a detailed description of mcRBM. In PoT [9] the energy function is: EPoT(x, hc) = X i [hc i(1 + 1 2(Ci T x)2) + (1 −γ) log hc i] (1) where x is a vectorized image patch, hc is a vector of Gamma “covariance” latent variables, C is a filter bank matrix and γ is a scalar parameter. The joint probability over input pixels and latent variables is proportional to exp(−EPoT(x, hc)). Therefore, the conditional distribution over the input pixels is a zero-mean Gaussian with covariance equal to: Σc = (Cdiag(hc)CT )−1. (2) In order to make the mean of the conditional distribution non-zero, we define mPoT as the normalized product of the above zero-mean Gaussian that models the covariance and a spherical covariance Gaussian that models the mean. The overall energy function becomes: EmPoT(x, hc, hm) = EPoT(x, hc) + Em(x, hm) (3) 3 Figure 2: Illustration of different choices of weight-sharing scheme for a RBM. Links converging to one latent variable are filters. Filters with the same color share the same parameters. Kinds of weight-sharing scheme: A) Global, B) Local, C) TConv and D) Conv. E) TConv applied to an image. Cells correspond to neighborhoods to which filters are applied. Cells with the same color share the same parameters. F) 256 filters learned by a Gaussian RBM with TConv weight-sharing scheme on high-resolution natural images. Each filter has size 16x16 pixels and it is applied every 16 pixels in both the horizontal and vertical directions. Filters in position (i, j) and (1, 1) are applied to neighborhoods that are (i, j) pixels away form each other. Best viewed in color. where hm is another set of latent variables that are assumed to be Bernoulli distributed (but other distributions could be used). The new energy term is: Em(x, hm) = 1 2xT x − X j hm j Wj T x (4) yielding the following conditional distribution over the input pixels: p(x|hc, hm) = N(Σ(Whm), Σ), Σ = (Σc + I)−1 (5) with Σc defined in eq. 2. As desired, the conditional distribution has non-zero mean2. Patch-based models like PoT have been extended to high-resolution images by using spatially localized filters [6]. While we can subtract off the mean intensity from independent image patches to successfully train PoT, we cannot do that on a high-resolution image because overlapping patches might have different mean. Unfortunately, replicating potentials over the image ignoring variations of mean intensity has been the leading strategy to date [6]3. This is the major reason why generation of high-resolution images is so poor. Sec. 4 shows that generation can be drastically improved by explicitly accounting for variations of mean intensity, as performed by mPoT and mcRBM. 3 Weight-Sharing Schemes By integrating out the latent variables, we can write the density function of any gated MRF as a normalized product of potential functions (for mPoT refer to eq. 6). In this section we investigate different ways of constraining the parameters of the potentials of a generic MRF. Global: The obvious way to extend a patch-based model like PoT to high-resolution images is to define potentials over the whole image; we call this scheme global. This is not practical because 1) the number of parameters grows about quadratically with the size of the image making training too slow, 2) we do not need to model interactions between very distant pairs of pixels since their dependence is negligible, and 3) we would not be able to use the model on images of different size. Conv: The most popular way to handle big images is to define potentials on small subsets of variables (e.g., neighborhoods of size 5x5 pixels) and to replicate these potentials across space while 2The need to model the means was clearly recognized in [21] but they used conjunctive latent features that simultaneously represented a contribution to the “precision matrix” in a specific direction and the mean along that same direction. 3The success of PoT-like models in Bayesian denoising is not surprising since the noisy image effectively replaces the reconstruction term from the mean hidden units (see eq. 5), providing a set of noisy mean intensities that are cleaned up by the patterns of correlation enforced by the covariance latent variables. 4 sharing their parameters at each image location [23, 24, 6]. This yields a convolutional weightsharing scheme, also called homogeneous field in the statistics literature. This choice is justified by the stationarity of natural images. This weight-sharing scheme is extremely concise in terms of number of parameters, but also rather inefficient in terms of latent representation. First, if there are N filters at each location and these filters are stepped by one pixel then the internal representation is about N times overcomplete. The internal representation has not only high computational cost, but it is also highly redundant. Since the input is mostly smooth and the parameters are the same across space, the latent variables are strongly correlated as well. This inefficiency turns out to be particularly harmful for a model like PoT causing the learned filters to become “random” looking (see fig 3-iii). A simple intuition follows from the equivalence between PoT and square ICA [15]. If the filter matrix C of eq. 1 is square and invertible, we can marginalize out the latent variables and write: p(y) = Q i S(yi), where yi = Ci T x and S is a Student’s t distribution. In other words, there is an underlying assumption that filter outputs are independent. However, if the filters of matrix C are shifted and overlapping versions of each other, this clearly cannot be true. Training PoT with the Conv weight-sharing scheme forces the model to find filters that make filter outputs as independent as possible, which explains the very high-frequency patterns that are usually discovered [6]. Local: The Global and Conv weight-sharing schemes are at the two extremes of a spectrum of possibilities. For instance, we can define potentials on a small subset of input variables but, unlike Conv, each potential can have its own set of parameters, as shown in fig. 2-B. This is called local, or inhomogeneous field. Compared to Conv the number of parameters increases only slightly but the number of latent variables required and their redundancy is greatly reduced. In fact, the model learns different receptive fields at different locations as a better strategy for representing the input, overall when the number of potentials is limited (see also fig. 2-F). TConv: Local would not allow the model to be trained and tested on images of different resolution, and it might seem wasteful not to exploit the translation invariant property of images. We therefore advocate the use of a weight-sharing scheme that we call tiled-convolutional (TConv) shown in fig. 2-C and E [18]. Each filter tiles the image without overlaps with copies of itself (i.e. the stride equals the filter diameter). This reduces spatial redundancy of latent variables and allows the input images to have arbitrary size. At the same time, different filters do overlap with each other in order to avoid tiling artifacts. Fig. 2-F shows filters that were (jointly) learned by a Restricted Boltzmann Machine (RBM) [29] with Gaussian input variables using the TConv weight-sharing scheme. 4 Experiments We train gated MRF’s with and without mean hidden units using different weight-sharing schemes. The training procedure is very similar in all cases. We perform approximate maximum likelihood by using Fast Persistence Contrastive Divergence (FPCD) [25] and we draw samples by using Hybrid Monte Carlo (HMC) [26]. Since all latent variables can be exactly marginalized out we can use HMC on the free energy (negative logarithm of the marginal distribution over the input pixels). For mPoT this is: FmPoT(x) = −log(p(x))+const. = X k,i γ log(1+1 2(Cik T xk)2)+1 2xT x− X k,j log(1+exp(W T jkxk)) (6) where the index k runs over spatial locations and xk is the k-th image patch. FPCD keeps samples, called negative particles, that it uses to represent the model distribution. These particles are all updated after each weight update. For each mini-batch of data-points a) we compute the derivative of the free energy w.r.t. the training samples, b) we update the negative particles by running HMC for one HMC step consisting of 20 leapfrog steps. We start at the previous set of negative particles and use as parameters the sum of the regular parameters and a small perturbation vector, c) we compute the derivative of the free energy at the negative particles, and d) we update the regular parameters by using the difference of gradients between step a) and c) while the perturbation vector is updated using the gradient from c) only. The perturbation is also strongly decayed to zero and is subject to a larger learning rate. The aim is to encourage the negative particles to explore the space more quickly by slightly and temporarily raising the energy at their current position. Note that the use of FPCD as opposed to other estimation methods (like Persistent Contrastive Divergence [27]) turns out to be crucial to achieve good mixing of the sampler even after training. We train on mini-batches of 32 samples using gray-scale images of approximate size 160x160 pixels randomly cropped from the Berkeley segmentation dataset [28]. We perform 160,000 weight updates decreasing the learning by a factor of 4 by the end of training. The initial learning rate is set to 0.1 for the covariance 5 Figure 3: 160x160 samples drawn by A) mPoT-TConv, B) mHPoT-TConv, C) mcRBM-TConv and D) PoTTConv. On the side also i) a subset of 8x8 “covariance” filters learned by mPoT-TConv (the plot below shows how the whole set of filters tile a small patch; each bar correspond to a Gabor fit of a filter and colors identify filters applied at the same 8x8 location, each group is shifted by 2 pixels down the diagonal and a high-resolution image is tiled by replicating this pattern every 8 pixels horizontally and vertically), ii) a subset of 8x8 “mean” filters learned by the same mPoT-TConv, iii) filters learned by PoT-Conv and iv) by PoT-TConv. filters (matrix C of eq. 1), 0.01 for the mean parameters (matrix W of eq. 4), and 0.001 for the other parameters (γ of eq. 1). During training we condition on the borders and initialize the negative particles at zero in order to avoid artifacts at the border of the image. We learn 8x8 filters and pre-multiply the covariance filters by a whitening transform retaining 99% of the variance; we also normalize the norm of the covariance filters to prevent some of them from decaying to zero during training4. Whenever we use the TConv weight-sharing scheme the model learns covariance filters that mostly resemble localized and oriented Gabor functions (see fig. 3-i and iv), while the Conv weight-sharing scheme learns structured but poorly localized high-frequency patterns (see fig. 3-iii) [6]. The TConv models re-use the same 8x8 filters every 8 pixels and apply a diagonal offset of 2 pixels between neighboring filters with different weights in order to reduce tiling artifacts. There are 4 sets of filters, each with 64 filters for a total of 256 covariance filters (see bottom plot of fig. 3). Similarly, we have 4 sets of mean filters, each with 32 filters. These filters have usually non-zero mean and exhibit on-center off-surround and off-center on-surround patterns, see fig. 3-ii. In order to draw samples from the learned models, we run HMC for a long time (10,000 iterations, each composed of 20 leap-frog steps). Some samples of size 160x160 pixels are reported in fig. 3 A)D). Without modelling the mean intensity, samples lack structure and do not seem much different from those that would be generated by a simple Gaussian model merely fitting the second order statistics (see fig. 3 in [1] and also fig. 2 in [7]). By contrast, structure, sharp boundaries and some simple texture emerge only from models that have mean latent variables, namely mcRBM, mPoT and mHPoT which differs from mPoT by having a second layer pooling matrix on the squared covariance filter outputs [11]. A more quantitative comparison is reported in table 1. We first compute marginal statistics of filter responses using the generated images, natural images from the test set, and random images. The statistics are the normalized histogram of individual filter responses to 24 Gabor filters (8 orientations and 3 scales). We then calculate the KL divergence between the histograms on random images and generated images and the KL divergence between the histograms on natural images and generated images. The table also reports the average difference of energies between random images and natural images. All results demonstrate that models that account for mean intensity generate images 4The code used in the experiments can be found at the first author’s web-page. 6 MODEL F (R) −F (T ) (104) KL(R ∥G) KL(T ∥G) KL(R ∥G) −KL(T ∥G) PoT - Conv 2.9 0.3 0.6 -0.3 PoT - TConv 2.8 0.4 1.0 -0.6 mPoT - TConv 5.2 1.0 0.2 0.8 mHPoT - TConv 4.9 1.7 0.8 0.9 mcRBM - TConv 3.5 1.5 1.0 0.5 Table 1: Comparing MRF’s by measuring: difference of energy (negative log ratio of probabilities) between random images (R) and test natural images (T), the KL divergence between statistics of random images (R) and generated images (G), KL divergence between statistics of test natural images (T) and generated images (G), and difference of these two KL divergences. Statistics are computed using 24 Gabor filters. that are closer to natural images than to random images, whereas models that do not account for the mean (like the widely used PoT-Conv) produce samples that are actually closer to random images. 4.1 Discriminative Experiments on Weight-Sharing Schemes In future work, we intend to use the features discovered by the generative model for recognition. To understand how the different weight sharing schemes affect recognition performance we have done preliminary tests using the discriminative performance of a simpler model on simpler data. We consider one of the simplest and most versatile models, namely the RBM [29]. Since we also aim to test the Global weight-sharing scheme we are constrained to using fairly low resolution datasets such as the MNIST dataset of handwritten digits [30] and the CIFAR 10 dataset of generic object categories [22]. The MNIST dataset has soft binary images of size 28x28 pixels, while the CIFAR 10 dataset has color images of size 32x32 pixels. CIFAR 10 has 10 classes, 5000 training samples per class and 1000 test samples per class. MNIST also has 10 classes with, on average, 6000 training samples per class and 1000 test samples per class. The energy function of the RBM trained on the CIFAR 10 dataset, modelling input pixels with 3 (R,G,B) Gaussian variables [31], is exactly the one shown in eq. 4; while the RBM trained on MNIST uses logistic units for the pixels and the energy function is again the same as before but without any quadratic term. All models are trained in an unsupervised way to approximately maximize the likelihood in the training set using Contrastive Divergence [32]. They are then used to represent each input image with a feature vector (mean of the posterior over the latent variables) which is fed to a multinomial logistic classifier for discrimination. Models are compared in terms of: 1) recognition accuracy, 2) convergence time and 3) dimensionality of the representation. In general, assuming filters much smaller than the input image and assuming equal number of latent variables, Conv, TConv and Local models process each sample faster than Global by a factor approximately equal to the ratio between the area of the image and the area of the filters, which can be very large in practice. In the first set of experiments reported on the left of fig. 4 we study the internal representation in terms of discrimination and dimensionality using the MNIST dataset. For each choice of dimensionality all models are trained using the same number of operations. This is set to the amount necessary to complete one epoch over the training set using the Global model. This experiment shows that: 1) Local outperforms all other weight-sharing schemes for a wide range of dimensionalities, 2) TConv does not perform as well as Local probably because the translation invariant assumption is clearly violated for these relatively small, centered, images, 3) Conv performs well only when the internal representation is very high dimensional (10 times overcomplete) otherwise it severely underfits, 4) Global performs well when the representation is compact but its performance degrades rapidly as this increases because it needs more than the allotted training time. The right hand side of fig. 4 shows how the recognition performance evolves as we increase the number of operations (or training time) using models that produce a twice overcomplete internal representation. With only very few filters Conv still underfits and it does not improve its performance by training for longer, but Global does improve and eventually it reaches the performance of Local. If we look at the crossing of the error rate at 2% we can see that Local is about 4 times faster than Global. To summarize, Local provides more compact representations than Conv, is much faster than Global while achieving 7 0 1000 2000 3000 4000 5000 6000 7000 8000 1 2 3 4 5 6 dimensionality error rate % Global Local TConv Conv 0 2 4 6 8 10 1.6 1.8 2 2.2 2.4 2.6 # flops (relative to # flops per epoch of Global model) error rate % Global Local Conv Figure 4: Experiments on MNIST using RBM’s with different weight-sharing schemes. Left: Error rate as a function of the dimensionality of the latent representation. Right: Error rate as a function of the number of operations (normalized to those needed to perform one epoch in the Global model); all models have a twice overcomplete latent representation. similar performance in discrimination. Also, Local can easily scale to larger images while Global cannot. Similar experiments are performed using the CIFAR 10 dataset [22] of natural images. Using the same protocol introduced in earlier work by Krizhevsky [22], the RBM’s are trained in an unsupervised way on a subset of the 80 million tiny images dataset [33] and then “fine-tuned” on the CIFAR 10 dataset by supervised back-propagation of the error through the linear classifier and feature extractor. All models produce an approximately 10,000 dimensional internal representation to make a fair comparison. Models using local filters learn 16x16 filters that are stepped every pixel. Again, we do not experiment with the TConv weight-sharing scheme because the image is not large enough to allow enough replicas. Similarly to fig. 3-iii the Conv weight-sharing scheme was very difficult to train and did not produce Gabor-like features. Indeed, careful injection of sparsity and long training time seem necessary [31] for these RBM’s. By contrast, both Local and Global produce Gabor-like filters similar to those shown in fig. 2 F). The model trained with Conv weight-sharing scheme yields an accuracy equal to 56.6%, while Local and Global yield much better performance, 63.6% and 64.8% [22], respectively. Although Local and Global have similar performance, training with the Local weight-sharing scheme took under an hour while using the Global weight-sharing scheme required more than a day. 5 Conclusions and Future Work This work is motivated by the poor generative quality of currently popular MRF models of natural images. These models generate images that are actually more similar to white noise than to natural images. Our contribution is to recognize that current models can benefit from 1) the addition of a simple model of the mean intensities and from 2) the use of a less constrained weight-sharing scheme. By augmenting these models with an extra set of latent variables that model mean intensity we can generate samples that look much more realistic: they are characterized by smooth regions, sharp boundaries and some simple high frequency texture. We validate our approach by comparing the statistics of filter outputs on natural images and generated images. In the future, we plan to integrate these MRF’s into deeper hierarchical models and to use their internal representation to perform object recognition in high-resolution images. The hope is to further improve generation by capturing longer range dependencies and to exploit this to better cope with missing values and ambiguous sensory inputs. References [1] E.P. Simoncelli. Statistical modeling of photographic images. Handbook of Image and Video Processing, pages 431–441, 2005. 8 [2] A. Hyvarinen, J. Karhunen, and E. Oja. Independent Component Analysis. John Wiley & Sons, 2001. [3] G.E. Hinton and R. R Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [4] M. Ranzato and G.E. Hinton. Modeling pixel means and covariances using factorized third-order boltzmann machines. In CVPR, 2010. [5] M.J. Wainwright and E.P. Simoncelli. Scale mixtures of gaussians and the statistics of natural images. In NIPS, 2000. [6] S. Roth and M.J. Black. Fields of experts: A framework for learning image priors. In CVPR, 2005. [7] U. Schmidt, Q. Gao, and S. Roth. A generative perspective on mrfs in low-level vision. In CVPR, 2010. [8] S. Geman and D. Geman. Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. PAMI, 6:721–741, 1984. [9] M. Welling, G.E. Hinton, and S. Osindero. Learning sparse topographic representations with products of student-t distributions. In NIPS, 2003. [10] S.C. Zhu and D. Mumford. Prior learning and gibbs reaction diffusion. PAMI, pages 1236–1250, 1997. [11] S. Osindero, M. Welling, and G. E. Hinton. Topographic product models applied to natural scene statistics. Neural Comp., 18:344–381, 2006. [12] S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of markov random fields. In NIPS, 2008. [13] Y. Karklin and M.S. Lewicki. Emergence of complex cell properties by learning to generalize in natural scenes. Nature, 457:83–86, 2009. [14] B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: a strategy employed by v1? Vision Research, 37:3311–3325, 1997. [15] Y. W. Teh, M. Welling, S. Osindero, and G. E. Hinton. Energy-based models for sparse overcomplete representations. JMLR, 4:1235–1260, 2003. [16] Y. Weiss and W.T. Freeman. What makes a good model of natural images? In CVPR, 2007. [17] S. Roth and M. J. Black. Fields of experts. Int. Journal of Computer Vision, 82:205–229, 2009. [18] K. Gregor and Y. LeCun. Emergence of complex-like cells in a temporal product network with local receptive fields. arXiv:1006.0448, 2010. [19] C. Tang and C. Eliasmith. Deep networks for robust visual recognition. In ICML, 2010. [20] M. Ranzato, A. Krizhevsky, and G.E. Hinton. Factored 3-way restricted boltzmann machines for modeling natural images. In AISTATS, 2010. [21] N. Heess, C.K.I. Williams, and G.E. Hinton. Learning generative texture models with extended fields-ofexperts. In BMCV, 2009. [22] A. Krizhevsky. Learning multiple layers of features from tiny images, 2009. MSc Thesis, Dept. of Comp. Science, Univ. of Toronto. [23] A. Waibel, T. Hanazawa, G. Hinton, K. Shikano, and K. Lang. Phoneme recognition using time-delay neural networks. IEEE Acoustics Speech and Signal Proc., 37:328–339, 1989. [24] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [25] T. Tieleman and G.E. Hinton. Using fast weights to improve persistent contrastive divergence. In ICML, 2009. [26] R.M. Neal. Bayesian learning for neural networks. Springer-Verlag, 1996. [27] T. Tieleman. Training restricted boltzmann machines using approximations to the likelihood gradient. In ICML, 2008. [28] http://www.cs.berkeley.edu/projects/vision/grouping/segbench/. [29] M. Welling, M. Rosen-Zvi, and G.E. Hinton. Exponential family harmoniums with an application to information retrieval. In NIPS, 2005. [30] http://yann.lecun.com/exdb/mnist/. [31] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proc. ICML, 2009. [32] G.E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14:1771–1800, 2002. [33] A. Torralba, R. Fergus, and W.T. Freeman. 80 million tiny images: a large dataset for non-parametric object and scene recognition. PAMI, 30:1958–1970, 2008. 9
2010
135
3,894
Efficient Minimization of Decomposable Submodular Functions Peter Stobbe California Institute of Technology Pasadena, CA 91125 stobbe@caltech.edu Andreas Krause California Institute of Technology Pasadena, CA 91125 krausea@caltech.edu Abstract Many combinatorial problems arising in machine learning can be reduced to the problem of minimizing a submodular function. Submodular functions are a natural discrete analog of convex functions, and can be minimized in strongly polynomial time. Unfortunately, state-of-the-art algorithms for general submodular minimization are intractable for larger problems. In this paper, we introduce a novel subclass of submodular minimization problems that we call decomposable. Decomposable submodular functions are those that can be represented as sums of concave functions applied to modular functions. We develop an algorithm, SLG, that can efficiently minimize decomposable submodular functions with tens of thousands of variables. Our algorithm exploits recent results in smoothed convex minimization. We apply SLG to synthetic benchmarks and a joint classification-and-segmentation task, and show that it outperforms the state-of-the-art general purpose submodular minimization algorithms by several orders of magnitude. 1 Introduction Convex optimization has become a key tool in many machine learning algorithms. Many seemingly multimodal optimization problems such as nonlinear classification, clustering and dimensionality reduction can be cast as convex programs. When minimizing a convex loss function, we can rest assured to efficiently find an optimal solution, even for large problems. Convex optimization is a structural property of continuous optimization problems. However, many machine learning problems, such as structure learning, variable selection, MAP inference in discrete graphical models, require solving discrete, combinatorial optimization problems. In recent years, another fundamental problem structure, which has similar beneficial properties, has emerged as very useful in many combinatorial optimization problems arising in machine learning: Submodularity is an intuitive diminishing returns property, stating that adding an element to a smaller set helps more than adding it to a larger set. Similarly to convexity, submodularity allows one to efficiently find provably (near-)optimal solutions. In particular, the minimum of a submodular function can be found in strongly polynomial time [11]. Unfortunately, while polynomial-time solvable, exact techniques for submodular minimization require a number of function evaluations on the order of n5 [12], where n is the number of variables in the problem (e.g., number of random variables in the MAP inference task), rendering the algorithms impractical for many real-world problems. Fortunately, several submodular minimization problems arising in machine learning have structure that allows solving them more efficiently. Examples include symmetric functions that can be solved in O(n3) evaluations using Queyranne’s algorithm [19], and functions that decompose into attractive, pairwise potentials, that can be solved using graph cutting techniques [7]. In this paper, we introduce a novel class of submodular minimization problems that can be solved efficiently. In particular, we develop an algorithm SLG, that can minimize a class of submodular functions that we call decomposable: These are functions that can be decomposed into sums of concave functions applied to modular (additive) functions. Our algorithm is based on recent techniques of smoothed convex minimization [18] applied to the Lov´asz extension. We demonstrate the usefulness of 1 our algorithm on a joint classification-and-segmentation task involving tens of thousands of variables, and show that it outperforms state-of-the-art algorithms for general submodular function minimization by several orders of magnitude. 2 Background on Submodular Function Minimization We are interested in minimizing set functions that map subsets of some base set E to real numbers. I.e., given f : 2E ! R we wish to solve for A 2 arg minA f(A). For simplicity of notation, we use the base set E = f1; : : : ng, but in an application the base set may consist of nodes of a graph, pixels of an image, etc. Without loss of generality, we assume f(;) = 0. If the function f has no structure, then there is no way solve the problem other than checking all 2n subsets. In this paper, we consider functions that satisfy a key property that arises in many applications: submodularity (c.f., [16]). A set function f is called submodular iff, for all A; B 2 2E, we have f(A [ B) + f(A \ B)  f(A) + f(B): (1) Submodular functions can alternatively, and perhaps more intuitively, be characterized in terms of their discrete derivatives. First, we define kf(A) = f(A[fkg)f(A) to be the discrete derivative of f with respect to k 2 E at A; intuitively this is the change in f’s value by adding the element k to the set A. Then, f is submodular iff: kf(A)  kf(B); for all A  B  E and k 2 E n B: Note the analogy to concave functions; the discrete derivative is smaller for larger sets, in the same way that (x+h)(x)  (y+h)(y) for all x  y; h  0 if and only if  is a concave function on R. Thus a simple example of a submodular function is f(A) = (jAj) where  is any concave function. Yet despite this connection to concavity, it is in fact ‘easier’ to minimize a submodular function than to maximize it1, just as it is easier to minimize a convex function. One explanation for this is that submodular minimization can be reformulated as a convex minimization problem. To see this, consider taking a set function minimization problem, and reformulating it as a minimization problem over the unit cube [0; 1]n  Rn. Define eA 2 Rn to be the indicator vector of the set A, i.e., eA[k] = 0 if k =2 A 1 if k 2 A We use the notation x[k] for the kth element of the vector x. Also we drop brackets and commas in subscripts, so ekl = efk;lg and ek = efkg as with the standard unit vectors. A continuous extension of a set function f is a function ~f on the unit cube ~f : [0; 1]n ! R with the property that f(A) = ~f(eA). In order to be useful, however, one needs the minima of the set function to be related to minima of the extension: A 2 arg min A22E f(A) ) eA 2 arg min x2[0;1]n ~f(x): (2) A key result due to Lov´asz [16] states that each submodular function f has an extension ~f that not only satisfies the above property, but is also convex and efficient to evaluate. We can define the Lov´asz extension in terms of the submodular polyhedron Pf: Pf = fv 2 Rn : v  eA  f(A); for all A 2 2Eg; ~f(x) = sup v2Pf v  x: The submodular polyhedron Pf is defined by exponentially many inequalities, and evaluating ~f requires solving a linear program over this polyhedron. Perhaps surprisingly, as shown by Lov´asz, ~f can be very efficiently computed as follows. For a fixed x let  : E ! E be a permutation such that x[(1)]  : : :  x[(n)], and then define the set Sk = f(1); : : : ; (k)g. Then we have a formula for ~f and a subgradient: ~f(x) = n X k=1 x[(k)](f(Sk) f(Sk1)); @ ~f(x) 3 n X k=1 e(k)(f(Sk) f(Sk1)): Note that if two components of x are equal, the above formula for ~f is independent of the permutation chosen, but the subgradient is not unique. 1With the additional assumption that f is nondecreasing, maximizing a submodular function subject to a cardinality constraint jAj  M is ‘easy’; a greedy algorithm is known to give a near-optimal answer [17]. 2 Equation (2) was used to show that submodular minimization can be achieved in polynomial time [16]. However, algorithms which directly minimize the Lovasz extension are regarded as impractical. Despite being convex, the Lov´asz extension is non-smooth, and hence a simple subgradient descent algorithm would need O(1=2) steps to achieve O() accuracy. Recently, Nesterov showed that if knowledge about the structure of a particular non-smooth convex function is available, it can be exploited to achieve a running time of O(1=) [18]. One way this is done is to construct a smooth approximation of the non-smooth function, and then use an accelerated gradient descent algorithm which is highly effective for smooth functions. Connections of this work with submodularity and combinatorial optimization are also explored in [4] and [2]. In fact, in [2], Bach shows that computing the smoothed Lov´asz gradient of a general submodular function is equivalent to solving a submodular minimization problem. In this paper, we do not treat general submodular functions, but rather a large class of submodular minimization functions that we call decomposable. (To apply the smoothing technique of [18], special structural knowledge about the convex function is required, so it is natural that we would need special structural knowledge about the submodular function to leverage those results.) We further show that we can exploit the discrete structure of submodular minimization in a way that allows terminating the algorithm early with a certificate of optimality, which leads to drastic performance improvements. 3 The Decomposable Submodular Minimization Problem In this paper, we consider the problem of minimizing functions of the following form: f(A) = c  eA + X j j(wj  eA); (3) where c; wj 2 Rn and 0  wj  1 and j : [0; wj  1] ! R are arbitrary concave functions. It can be shown that functions of this form are submodular. We call this class of functions decomposable submodular functions, as they decompose into a sum of concave functions applied to nonnegative modular functions2. Below, we give examples of decomposable submodular functions arising in applications. We first focus on the special case where all the concave functions are of the form j() = dj min(yj; ) for some yj; dj > 0. Since these potentials are of key importance, we define the submodular functions w;y(A) = min(y; w  eA) and call them threshold potentials. In Section 5, we will show in how to generalize our approach to arbitrary decomposable submodular functions. Examples. The simplest example is a 2-potential, which has the form (jA\fk; lgj), where (1)(0)  (1) (2). It can be expressed as a sum of a modular function and a threshold potential: (jA \ fk; lgj) = (0) + ((2) (1))ekl  eA + (2(1) (0) (2)) ekl;1(A) Why are such potential functions interesting? They arise, for example, when finding the Maximum a Posteriori configuration of a pairwise Markov Random Field model in image classification schemes such as in [20]. On a high level, such an algorithm computes a value c[k] that corresponds to the log-likelihood of pixel k being of one class vs. another, and for each pair of adjacent pixels, a value dkl related to the log-likelihood that pixels k and l are of the same class. Then the algorithm classifies pixels by minimizing a sum of 2-potentials: f(A) = c  eA + P k;l dkl(1 j1 ekl  eAj). If the value dkl is large, this encourages the pixels k and l to be classified similarly. More generally, consider a higher order potential function: a concave function of the number of elements in some activation set S, (jA \ Sj) where  is concave. It can be shown that this can be written as a sum of a modular function and a positive linear combination of jSj 1 threshold potentials. Recent work [14] has shown that classification performance can be improved by adding terms corresponding to such higher order potentials j(jRj \Aj) to the objective function where the functions j are piecewise linear concave functions, and the regions Rj of various sizes generated from a segmentation algorithm. Minimization of these particular potential functions can then be reformulated as a graph cut problem [13], but this is less general than our approach. Another canonical example of a submodular function is a set cover function. Such a function can be reformulated as a combination of concave cardinality functions (details omitted here). So all 2A function is called modular if (1) holds with equality. It can be written as A 7! w eA for some w 2 Rn. 3 functions which are weighted combinations of set cover functions can be expressed as threshold potentials. However, threshold potentials with nonuniform weights are strictly more general than concave cardinality potentials. That is, there exists w and y such that w;y(A) cannot be expressed as P j j(jRj \ Aj) for any collection of concave j and sets Rj. Another example of decomposable functions arises in multiclass queuing systems [10]. These are of the form f(A) = c  eA + u  eA(v  eA), where u; v are nonnegative weight vectors and  is a nonincreasing concave function. With the proper choice of j and wj (again details are omitted here), this can in fact be reformulated as sum of the type in Eq. 3 with n terms. In our own experiments, shown in Section 6, we use an implementation of TextonBoost [20] and augment it with quadratic higher order potentials. That is, we use TextonBoost to generate per-pixel scores c, and then minimize f(A) = ceA +P j jA\RjjjRj nAj, where the regions Rj are regions of pixels that we expect to be of the same class (e.g., by running a cheap region-growing heuristic). The potential function jA\RjjjRjnAj is smallest when A contains all of Rj or none of it. It gives the largest penalty when exactly half of Rj is contained in A. This encourages the classification scheme to classify most of the pixels in a region Rj the same way. We generate regions with a basic regiongrowing algorithm with random seeds. See Figure 1(a) for an illustration of examples of regions that we use. In our experience, this simple idea of using higher-order potentials can dramatically increase the quality of the classification over one using only 2-potentials, as can be seen in Figure 2. 4 The SLG Algorithm for Threshold Potentials We now present our algorithm for efficient minimization of a decomposable submodular function f based on smoothed convex minimization. We first show how we can efficiently smooth the Lov´asz extension of f. We then apply accelerated gradient descent to the gradient of the smoothed function. Lastly, we demonstrate how we can often obtain a certificate of optimality that allows us to stop early, drastically speeding up the algorithm in practice. 4.1 The Smoothed Extension of a Threshold Potential The key challenge in our algorithm is to efficiently smooth the Lov´asz extension of f, so that we can resort to algorithms for accelerated convex minimization. We now show how we can efficiently smooth the threshold potentials w;y(A) = min(y; w  eA) of Section 3, which are simple enough to allow efficient smoothing, but rich enough when combined to express a large class of submodular functions. For x  0, the Lov´asz extension of w;y is ~ w;y(x) = sup v  x s.t. v  w; v  eA  y for all A 2 2E: Note that when x  0, the arg max of the above linear program always contains a point v which satisfies v  1 = y, and v  0. So we can restrict the domain of the dual variable v to those points which satisfy these two conditions, without changing the value of ~ (x): ~ w;y(x) = max v2D(w;y) v  x where D(w; y) = fv : 0  v  w; v  1 = yg: Restricting the domain of v allows us to define a smoothed Lov´asz extension (with parameter ) that is easily computed: ~  w;y(x) = max v2D(w;y) v  x  2 kvk2 To compute the value of this function we need to solve for the optimal vector v, which is also the gradient of this function, as we have the following characterization: r~  w;y(x) = arg max v2D(w;y) v  x  2 kvk2 = arg min v2D(w;y) x  v : (4) To derive an expression for v, we begin by forming the Lagrangian and deriving the dual problem: ~  w;y(x) = min t2R;1;20  max v2Rn v  x  2 kvk2 + 1  v + 2  (w v) + t(y v  1)  = min t2R;1;20 1 2kx t1 + 1 2k2 + 2  w + ty: If we fix t, we can solve for the optimal dual variables  1 and  2 componentwise. By strong duality, we know the optimal primal variable is given by v = 1 (x t1 +  1  2). So we have:  1 = max(t1 x; 0);  2 = max(x t1 w; 0) ) v = min (max ((x t1)=; 0) ; w) : 4 This expresses v as a function of the unknown optimal dual variable t. For the simple case of 2-potentials, we can solve for t explicitly and get a closed form expression: r~  ekl;1(x) = 8 > < > : ek if x[k]  x[l] +  el if x[l]  x[k] +  1 2(ekl + 1 (x[k] x[l])(ek el)) if jx[k] x[l]j <  However, in general to find t we note that v must satisfy v  1 = y. So define  x;w(t) as:  x;w(t) = min(max((x t1)=; 0); w)  1 Then we note this function is a monotonic continuous piecewise linear function of t, so we can use a simple root-finding algorithm to solve  x;w(t) = y. This root finding procedure will take no more than O(n) steps in the worst case. 4.2 The SLG Algorithm for Minimizing Sums of Threshold Potentials Stepping beyond a single threshold potential, we now assume that the submodular function to be minimized can be written as a nonnegative linear combination of threshold potentials and a modular function, i.e., f(A) = c  eA + X j dj wj;yj(A): Thus, we have the smoothed Lov´asz extension, and its gradient: ~f (x) = c  x + X j dj ~  wj;yj(x) and r ~f (x) = c + X j djr~  wj;yj(x): We now wish to use the accelerated gradient descent algorithm of [18] to minimize this function. This algorithm requires that the smoothed objective has a Lipschitz continuous gradient. That is, for some constant L, it must hold that kr ~f (x1) r ~f (x2)k  Lkx1 x2k; for all x1; x2 2 Rn. Fortunately, by construction, the smoothed threshold extensions ~  wj;yj(x) all have 1= Lipschitz gradient, a direct consequence of the characterization in Equation 4. Hence we have a loose upper bound for the Lipschitz constant of ~f : L  D  , where D = P j dj. Furthermore, the smoothed threshold extensions approximate the threshold extensions uniformly: j~  wj;yj(x) ~ wj;yj(x)j   2 for all x, so j ~f (x) ~f(x)j  D 2 . One way to use the smoothed gradient is to specify an accuracy ", then minimize ~f  for sufficiently small  to guarantee that the solution will also be an approximate minimizer of ~f. Then we simply apply the accelerated gradient descent algorithm of [18]. See also [3] for a description. Let PC(x) = arg minx02C kx x0k be the projection of x onto the convex set C. In particular, P[0;1]n(x) = min(max(x; 0); 1). Algorithm 1 formalizes our Smoothed Lov´asz Gradient (SLG) algorithm: Algorithm 1: SLG: Smoothed Lov´asz Gradient Input: Accuracy "; decomposable function f. begin  = " 2D, L = D  , x1 = z1 = 1 21; for t = 0; 1; 2; : : : do gt = r ~f (xt1)=L; zt = P[0;1]n  z1 Pt s=0 s+1 2  gs  ; yt = P[0;1]n(xt gt); if gapt  "=2 then stop; xt = (2zt + (t + 1)yt)=(t + 3); x" = yt; Output: "-optimal x" to minx2[0;1]n ~f(x) The optimality gap of a smooth convex function at the iterate yt can be computed from its gradient: gapt = max x2[0;1]n(yt x)  r ~f (yt) = yt  r ~f (yt) + max(r ~f (yt); 0)  1: In summary, as a consequence of the results of [18], we have the following guarantee about SLG: Theorem 1 SLG is guaranteed to provide an "-optimal solution after running for O( D " ) iterations. 5 SLG is only guaranteed to provide an "-optimal solution to the continuous optimization problem. Fortunately, once we have an "-optimal point for the Lov´asz extension, we can efficiently round it to set which is "-optimal for the original submodular function using Alg. 2 (see [9] for more details). Algorithm 2: Set generation by rounding the continuous solution Input: Vector x 2 [0; 1]n; submodular function f. begin By sorting, find any permutation  satisfying: x[(1)]  : : :  x[(n)]; Sk = f(1); : : : ; (k)g; K = arg mink2f0;1;:::;ng f(Sk); C = fSk : k 2 Kg; Output: Collection of sets C, such that f(A)  ~f(x) for all A 2 C 4.3 Early Stopping based on Discrete Certificates of Optimality In general, if the minimum of f is not unique, the output of SLG may be in the interior of the unit cube. However, if f admits a unique minimum A, then the iterates will tend toward the corner eA. One natural question one may ask, if a trend like this is observed, is it necessary to wait for the iterates to converge all the way to the optimal solution of the continuous problem minx2[0;1]n ~f(x), when one is actually iterested in solving the discrete problem minA22E f(A)? Below, we show that it is possible to use information about the current iterates to check optimality of a set and terminate the algorithm before the continuous problem has converged. To prove optimality of a candidate set A, we can use a subgradient of ~f at eA. If g 2 @ ~f(eA), then we can compute an optimality gap: f(A) f   max x2[0;1]n(eA x)  g = X k2A max(0; g[k](eA[k] eEnA[k])): (5) In particular if g[k]  0 for k 2 A and g[k]  0 for k 2 E n A, then A is optimal. But if we only have knowledge of candidate set A, then finding a subgradient g 2 @ ~f(eA) which demonstrates optimality may be extremely difficult, as the set of subgradients is a polyhedron with exponentially many extreme points. But our algorithm naturally suggests the subgradient we could use; the gradient of the smoothed extension is one such subgradient – provided a certain condition is satisfied, as described in the following Lemma. Lemma 1 Suppose f is a decomposable submodular function, with Lov´asz extension ~f, and smoothed extension ~f  as in the previous section. Suppose x 2 Rn and A 2 2E satisfy the following property: min k2A;l2EnA x[k] x[l]  2 Then r ~f (x) 2 @ ~f(eA) This is a consequence of our formula for r~ , but see the appendix of the extended paper [21] for a detailed proof. Lemma 1 states that if the components of point x corresponding to elements of A are all larger than all the other components by at least 2, then the gradient at x is a subgradient for ~f at eA (which by Equation 5 allows us to compute an optimality gap). In practice, this separation of components naturally occurs as the iterates move in the direction of the point eA, long before they ever actually reach the point eA. But even if the components are not separated, we can easily add a positive multiple of eA to separate them and then compute the gradient there to get an optimality gap. In summary, we have the following algorithm to check the optimality of a candidate set: Of critical importance is how to choose the candidate set A. But by Equation 5, for a set to be Algorithm 3: Set Optimality Check Input: Set A; decomposable function f; scale ; x 2 Rn. begin = 2 + maxk2A;l2EnA x[l] x[k]; g = r ~f (x + eA); gap = P k2A max(0; g[k](eA[k] eEnA[k])); Output: gap, which satisfies gap  f(A) f  optimal, we want the components of the gradient r ~f (A + eA)[k] to be negative for k 2 A and positive for k 2 E n A. So it is natural to choose A = fk : r ~f (x)[k]  0g. Thus, if adding eA does not change the signs of the components of the gradient, then in fact we have found the optimal set. This stopping criterion is very effective in practice, and we use it in all of our experiments. 6 R3 R1 R2 (a) Example Regions for Potentials 10 2 10 3 10 0 10 2 Problem Size (n) Running Time (s) SLG SFM3 MinNorm HYBRID PR LEX2 (b) Results for genrmf-long 10 2 10 3 10 0 10 2 Problem Size (n) Running Time (s) SLG SFM3 MinNorm LEX2 HYBRID PR (c) Results genrmf-wide Figure 1: (a) Example regions used for our higher-order potential functions (b-c) Comparision of running times of submodular minimization algorithms on synthetic problems from DIMACS [1]. 5 Extension to General Concave Potentials To extend our algorithm to work on general concave functions, we note that an arbitrary concave function can be expressed as an integral of threshold potential functions. This is a simple consequence of integration by parts, which we state in the following lemma: Lemma 2 For  2 C2([0; T]), (x) = (0) + 0(T)x Z T 0 min(x; y)00(y)dy; 8x 2 [0; T] This means that for a general sum of concave potentials as in Equation (3), we have: f(A) = c  eA + X j  j(0) + 0(wj  1)wj  eA Z wj1 0 wj;y(A)00 j (y)dy  : Then we can define ~f and ~f  by replacing with ~ and ~  respectively. Our SLG algorithm is essentially unchanged, the conditions for optimality still hold, and so on. Conceptually, we just use a different smoothed gradient, but calculating it is more involved. We need to compute the integrals of the form R r~  w;y(x)00(y)dy. Since r~  w;y(x) is a piecewise linear function with repect to y which we can compute, we can evaluate the integral by parts so that we need only evaluate , but not its derivatives. We omit the resulting formulas for space limitations. 6 Experiments Synthetic Data. We reproduce the experimental setup of [8] designed to compare submodular minimization algorithms. Our goal is to find the minimum cut of a randomly generated graph (which requires submodular minimization of a sum of 2-potentials) with the graph generated by the specifications in [1]. We compare against the state of the art combinatorial algorithms (LEX2, HYBRID, SFM3, PR [6]) that are guaranteed to find the exact solution in polynomial time, as well as the Minimum Norm algorithm of [8], a practical alternative with unknown running time. Figures 1(b) and 1(c) compare the running time of SLG against the running times reported in [8]. In some cases, SLG was 6 times faster than the MinNorm algorithm. However the comparison to the MinNorm algorithm is inconclusive in this experiment, since while we used a faster machine, we also used a simple MATLAB implementation. What is clear is that SLG scales at least as well as MinNorm on these problems, and is practical for problem sizes that the combinatorial algorithms cannot handle. Image Segmentation Experiments. We also tested our algorithm on the joint image segmentation-and-classification task introduced in Section 3. We used an implementation of TextonBoost [20], then trained on and tested subsampled images from [5]. As seen in Figures 2(e) and 2(g), using only the per-pixel score from our TextonBoost implementation gets the general area of the object, but does not do a good job of identifying the shape of a classified object. Compare to the ground truth in Figures 2(b) and 2(d). We then perform MAP inference in a Markov Random Field with 2-potentials (as done in [20]). While this regularization, as shown in Figures 2(f) and 2(h), leads to improved performance, it still performs poorly on classifying the boundary. 7 (a) Original Image (b) Ground truth (c) Original Image (d) Ground Truth (e) Pixel-based (f) Pairwise Potentials (g) Pixel-based (h) Pairwise Potentials (i) Concave Potentials (j) Continuous (k) Concave Potentials (l) Continuous Figure 2: Segmentation experimental results Finally, we used SLG to regularize with higher order potentials. To generate regions for our potentials, we randomly picked seed pixels and grew the regions based on HSV channels of the image. We picked our seed pixels with a preference for pixels which were included in the least number of previously generated regions. Figure 1(a) shows what the regions typically looked like. For our experiments, we used 90 total regions. We used SLG to minimize f(A) = ceA+P j jA\RjjjRjnAj, where c was the output from TextonBoost, scaled appropriately. Figures 2(i) and 2(k) show the classification output. The continuous variables x at the end of each run are shown in Figures 2(j) and 2(l); while it has no formal meaning, in general one can interpret a very high or low value of x[k] to correspond to high confidence in the classification of the pixel k. To generate the result shown in Figure 2(k), a problem with 104 variables and 90 concave potentials, our MATLAB/mex implementation of SLG took 71.4 seconds. In comparison, the MinNorm implementation of the SFO toolbox [15] gave the same result, but took 6900 seconds. Similar problems on an image of twice the resolution (4104 variables) were tested using SLG, resulting in runtimes of roughly 1600 seconds. 7 Conclusion We have developed a novel method for efficiently minimizing a large class of submodular functions of practical importance. We do so by decomposing the function into a sum of threshold potentials, whose Lov´asz extensions are convenient for using modern smoothing techniques of convex optimization. This allows us to solve submodular minimization problems with thousands of variables, that cannot be expressed using only pairwise potentials. Thus we have achieved a middle ground between graph-cut-based algorithms which are extremely fast but only able to handle very specific types of submodular minimization problems, and combinatorial algorithms which assume nothing but submodularity but are impractical for large-scale problems. Acknowledgements This research was partially supported by NSF grant IIS-0953413, a gift from Microsoft Corporation and an Okawa Foundation Research Grant. Thanks to Alex Gittens and Michael McCoy for use of their TextonBoost implementation. 8 References [1] Dimacs, The First international algorithm implementation challenge: The core experiments, 1990. [2] F. Bach, Structured sparsity-inducing norms through submodular functions, Advances in Neural Information Processing Systems (2010). [3] S. Becker, J. Bobin, and E.J. Candes, Nesta: A fast and accurate first-order method for sparse recovery, Arxiv preprint arXiv 904 (2009), 1–37. [4] F.A. Chudak and K. Nagano, Efficient solutions to relaxations of combinatorial problems with submodular penalties via the Lov´asz extension and non-smooth convex optimization, Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, Society for Industrial and Applied Mathematics, 2007, pp. 79–88. [5] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman, The PASCAL Visual Object Classes Challenge 2009 (VOC2009) Results, http://www.pascalnetwork.org/challenges/VOC/voc2009/workshop/index.html. [6] L. Fleischer and S. Iwata, A push-relabel framework for submodular function minimization and applications to parametric optimization, Discrete Applied Mathematics 131 (2003), no. 2, 311–322. [7] D. Freedman and P. Drineas, Energy minimization via graph cuts: Settling what is possible, IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2005. CVPR 2005, vol. 2, 2005. [8] Satoru Fujishige, Takumi Hayashi, and Shigueo Isotani, The Minimum-Norm-Point Algorithm Applied to Submodular Function Minimization and Linear Programming, (2006), 1–19. [9] E. Hazan and S. Kale, Beyond convexity: Online submodular minimization, Advances in Neural Information Processing Systems 22 (Y. Bengio, D. Schuurmans, J. Lafferty, C. K. I. Williams, and A. Culotta, eds.), 2009, pp. 700–708. [10] T. Itoko and S. Iwata, Computational geometric approach to submodular function minimization for multiclass queueing systems, Integer Programming and Combinatorial Optimization (2007), 267–279. [11] S. Iwata, L. Fleischer, and S. Fujishige, A combinatorial strongly polynomial algorithm for minimizing submodular functions, Journal of the ACM (JACM) 48 (2001), no. 4, 777. [12] S. Iwata and J.B. Orlin, A simple combinatorial algorithm for submodular function minimization, Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, 2009, pp. 1230–1237. [13] P. Kohli, M.P. Kumar, and P.H.S. Torr, P3 & Beyond: Solving Energies with Higher Order Cliques, 2007 IEEE Conference on Computer Vision and Pattern Recognition (2007), 1–8. [14] P. Kohli, L. Ladick´y, and P.H.S. Torr, Robust Higher Order Potentials for Enforcing Label Consistency, International Journal of Computer Vision 82 (2009), no. 3, 302–324. [15] A. Krause, SFO: A Toolbox for Submodular Function Optimization, The Journal of Machine Learning Research 11 (2010), 1141–1144. [16] L. Lov´asz, Submodular functions and convexity, Mathematical programming: the state of the art, Bonn (1982), 235–257. [17] G. Nemhauser, L. Wolsey, and M. Fisher, An analysis of the approximations for maximizing submodular set functions, Mathematical Programming 14 (1978), 265–294. [18] Yu. Nesterov, Smooth minimization of non-smooth functions, Mathematical Programming 103 (2004), no. 1, 127–152. [19] M. Queyranne, Minimizing symmetric submodular functions, Mathematical Programming 82 (1998), no. 1-2, 3–12. [20] J. Shotton, J. Winn, C. Rother, and A. Criminisi, TextonBoost for Image Understanding: MultiClass Object Recognition and Segmentation by Jointly Modeling Texture, Layout, and Context, Int. J. Comput. Vision 81 (2009), no. 1, 2–23. [21] P. Stobbe and A. Krause, Efficient minimization of decomposable submodular functions, arXiv:1010.5511 (2010). 9
2010
136
3,895
Implicit Differentiation by Perturbation Justin Domke Rochester Institute of Technology justin.domke@rit.edu Abstract This paper proposes a simple and efficient finite difference method for implicit differentiation of marginal inference results in discrete graphical models. Given an arbitrary loss function, defined on marginals, we show that the derivatives of this loss with respect to model parameters can be obtained by running the inference procedure twice, on slightly perturbed model parameters. This method can be used with approximate inference, with a loss function over approximate marginals. Convenient choices of loss functions make it practical to fit graphical models with hidden variables, high treewidth and/or model misspecification. 1 Introduction As graphical models are applied to more complex problems, it is increasingly necessary to learn parameters from data. Though the likelihood and conditional likelihood are the most widespread training objectives, these are sometimes undesirable and/or infeasible in real applications. With low treewidth, if the data is truly distributed according to the chosen graphical model with some parameters, any consistent loss function will recover those true parameters in the high-data limit, and so one might select a loss function according to statistical convergence rates [1]. In practice, the model is usually misspecified to some degree, meaning no "true" parameters exist. In this case, different loss functions lead to different asymptotic parameter estimates. Hence, it is useful to consider the priorities of the user when learning. For lowtreewidth graphs, several loss functions have been proposed that prioritize different types of accuracy (section 2.2). For parameters θ, these loss functions are given as a function L(µ(θ)) of marginals µ(θ). One can directly calculate ∂L ∂µ. The parameter gradient dL dθ can be efficiently computed by loss-specific message-passing schemes[2, 3]. The likelihood may also be infeasible to optimize, due to the computational intractability of computing the log-partition function or its derivatives in high treewidth graphs. On the other hand, if an approximate inference algorithm will be used at test time, it is logical to design the loss function to compensate for defects in inference. The surrogate likelihood (the likelihood with an approximate partition function) can give superior results to the true likelihood, when approximate inference is used at test time[4]. The goal of this paper is to efficiently fit parameters to optimize an arbitrary function of predicted marginals, in a high-treewidth setting. If µ(θ) is the function mapping parameters to (approximate) marginals, and there is some loss function L(µ) defined on those marginals, we desire to recover dL dθ . This enables the use of the marginal-based loss functions mentioned previously, but defined on approximate marginals. There are two major existing approaches for calculating dL dθ . First, after performing inference, this gradient can be obtained by solving a large, sparse linear system[5]. The major disadvantage of this approach is that standard linear solvers can perform poorly on large 1 True (y) Noisy (x) Surrogate likelihood Clique likelihood Univariate likelihood Smooth class. error Figure 1: Example images from the Berkeley dataset, along with marginals for a conditional random field fit with various loss functions. graphs, meaning that calculating this gradient can be more expensive than performing inference (Section 4). A second option is the Back Belief Propagation (BBP) algorithm[6]. This is based on application of reverse-mode automatic differentiation (RAD) to message passing. Crucially, this can be done without storing all intermediate messages, avoiding the enormous memory requirements of a naive application of RAD. This is efficient, with running-time in practice similar to inference. However, it is tied to a specific entropy approximation (Bethe) and algorithm (Loopy Belief Propagation). Extension to similar message-passing algorithms appears possible, but extension to more complex inference algorithms [7, 8, 9] is unclear. Here, we observe that the loss gradient can be calculated by far more straightforward means. Our basic result is extremely simple: dL dθ ≈1 r(µ(θ +r ∂L ∂µ)−µ(θ)  , with equality in the limit r →0. This result follows from, first, the well-known trick of approximating Jacobianvector products by finite differences and, second, the special property that for marginal inference, the Jacobian matrix dµ dθT is symmetric. This result applies when marginal inference takes place over the local polytope with an entropy that is concave and obeys a minor technical condition. It can also be used with non-concave entropies, with some assumptions on how inference recovers different local optima. It is easy to use this to compute the gradient of essentially any differentiable loss function defined on marginals. Effectively, all one needs to do is re-run the inference procedure on a set of parameters slightly "perturbed" in the direction ∂L ∂µ. Conditional training and tied or nonlinear parameters can also be accommodated. One clear advantage of this approach is simplicity and ease of implementation. Aside from this, like the matrix inversion approach, it is independent of the algorithm used to perform independence, and applicable to a variety of different inference approximations. Like BBP, the method is efficient in that it makes only two calls to inference. 2 Background 2.1 Marginal Inference This section briefly reviews the aspects of graphical models and marginal inference that are required for the rest of the paper. Let x denote a vector of discrete random variables. We use the exponential family representation p(x; θ) = exp θ · f(x) −A(θ)  , (1) where f(x) is the features of the observation x, and A = log P x exp θ · f(x) assures normalization. For graphical models, f is typically a vector of indicator functions for each possible configuration of each factor and variable. With a slight abuse of set notation to represent 2 a vector, this can be written as f(x) = {I[xα]} ∪{I[xi]}. It is convenient to refer to the components of vectors like those in Eq. 1 using function notation. Write θ(xα) to refer to the component of θ corresponding to the indicator function I[xα], and similarly for θ(xi). This gives an alternative representation for p, namely p(x; θ) = exp X α θ(xα) + X i θ(xi) −A(θ)  . (2) Marginal inference means recovering the expected value of f or, equivalently, the marginal probability that each factor or variable have a particular value. µ(θ) = X x p(x; θ)f(x) (3) Though marginals could, in principle, be computed by the brute-force sum in Eq. 3, it is useful to consider the paired variational representation [10, Chapter 3] A(θ) = max µ∈M θ · µ + H(µ) (4) µ(θ) = dA dθ = arg max µ∈M θ · µ + H(µ), (5) in which A and µ can both be recovered from solving the same optimization problem. Here, M = {µ(θ)|θ ∈ℜn} is the marginal polytope– those marginals µ resulting from some parameter vector θ. Similarly, H(µ) is the entropy of p(x; θ′), where θ′ is the vector of parameters that produces the marginals µ. As M is a convex set, and H a concave function, Eq. 5 is equivalent to a convex optimization problem. Nevertheless it is difficult to characterize M or compute H(µ) in high-treewidth graphs. A variety of approximate inference methods can be seen as solving a modification of Eqs. 4 and 5, with the marginal polytope and entropy replaced with tractable approximations. Notice that these are also paired; the approximate µ is the exact gradient of the approximate A. The commonest relaxation of M is the local polytope L = {µ ≥0 | µ(xi) = X xα\i µ(xα), X xi µ(xi) = 1}. (6) This underlies loopy belief propagation, as well as tree-reweighted belief propagation. Since a valid set of marginals must obey these constraints, L ⊇M. Note that since the equality constraints are linear, there exists a matrix B and vector d such that L = {µ ≥0|Bµ = d}. (7) A variety of entropy approximations exist. The Bethe approximation implicit in loopy belief propagation [11] is non-concave in general, which results in sometimes failing to achieve the global optimum. Concave entropy functions include the tree-reweighted entropy [12], convexified Bethe entropies [13], and the class of entropies obeying Heskes’ conditions [14]. 2.2 Loss Functions Given some data, {ˆx}, we will pick the parameters θ to minimize the empirical risk X ˆx L(ˆx; θ). (8) Likelihood. The (negative) likelihood is the classic loss function for training graphical models. Exploiting the fact that dA/dθ = µ(θ), the gradient is available in closed-form. 3 L(ˆx; θ) = −log p(ˆx; θ) = −θ · f(ˆx) + A(θ). (9) dL dθ = −f(ˆx) + µ(θ). (10) Surrogate Likelihood. Neither A nor µ is tractable with high treewidth. However, if written in variational form (Eqs. 4 and 5), they can be approximated using approximate inference. The surrogate likelihood [4] is simply the likelihood as in Eq. 9 with an approximate A. It has the gradient as in Eq. 10, but with approximate marginals µ. Unlike the losses below, the surrogate likelihood is convex when based on a concave inference method. See Ganapathi et al.[15] for a variant of this for inference with local optima. Univariate Likelihood. If the application will only make use of univariate marginals at test time, one might fit parameters specifically to make these univariate marginals accurate. Kakade et al.[3] proposed the loss L(ˆx; θ) = − X i log µ(ˆxi; θ). (11) This can be computed in treelike graphs, after running belief propagation to compute marginals. A message-passing scheme can efficiently compute the gradient. Univariate Classification Error. Some applications only use the maximum probability marginals. Gross at al.[2] considered the loss L(ˆx; θ) = X i S max xi̸=ˆxi µ(xi; θ) −µ(ˆxi; θ)  , (12) where S is the step function. This loss measures the number of incorrect components of ˆx if each is predicted to be the “max marginal”. However, since this is non-differentiable, it is suggested to approximate this by replacing S with a sigmoid function S(t) = (1 + exp(−λt))−1, where λ controls the approximation quality. Our experiments use λ = 50. As with the univariate likelihood, this loss can be computed if exact marginals are available. Computing the gradient requires another message passing scheme. Clique loss functions. One can easily define clique versions of the previous two loss functions, where the summations are over α, rather than i. These measure the accuracy of clique-wise marginals, rather than univariate marginals. 2.3 Implicit Differentiation As noted in Eq. 7, the equality constraints in the local polytope are linear, and hence when the positivity constraint can be disregarded, approximate marginal inference algorithms can be seen as solving the optimization µ(θ) = arg maxµ,Bµ=d θ · µ + H(µ). Domke showed[5], in our notation, that dL dθ = D−1BT (BD−1BT )−1BD−1 −D−1dL dµ, (13) where D = ∂2H ∂µ∂µT is the (diagonal) Hessian of the entropy approximation. Unfortunately, this requires solving a sparse linear system for each training example and iteration. As we will see below, with large or poorly conditioned problems, the computational expense of this can far exceed that of inference. Note that BD−1BT is, in general, indefinite, restricting what solvers can be used. Another limitation is that D can be singular if any counting numbers (Eq. 16) are zero. 2.4 Conditional training and nonlinear parameters. For simplicity, all the above discussion was confined to fully parametrized models. Nonlinear and tied parameters are easily dealt with by considering θ(φ) to be a function of the “true” 4 Algorithm 1 Calculating loss derivatives (two-sided). 1. Do inference. µ∗←arg max µ∈M θ · µ + H(µ) 2. At µ∗, calculate the partial derivative ∂L ∂µ. 3. Calculate a perturbation size r. 4. Do inference on perturbed parameters. µ+ ←arg max µ∈M(θ + r ∂L ∂µ) · µ + H(µ) µ−←arg max µ∈M(θ −r ∂L ∂µ) · µ + H(µ) 5. Recover full derivative. dL dθ ←1 2r (µ+ −µ−) parameters φ. Once dL/dθ is known dL/dφ can be recovered by a simple application of the chain rule, namely dL dφ = dθT dφ dL dθ . (14) Conditional training is similar: define a distribution over a random variable y, parametrized by θ(φ; x), the derivative on a particular pair (x, y) is given again by Eq. 14. Examples of both of these are in the experiments. 3 Implicit Differentiation by Perturbation This section shows that when µ(θ) = arg maxµ∈L θ · µ + H(µ), the loss gradient can be computed by Alg. 1 for a concave entropy approximation of the form H(µ) = − X α cα X xα µ(xα) log µ(xα) − X i ci X xi µ(xi) log µ(xi), (15) when the counting numbers c obey (as is true of most proposed entropies) cα > 0, ci + X α,i∈α cα > 0. (16) For intuition, the following Lemma uses notation (µ, θ, H) suggesting the application to marginal inference. However, note that the result is true for any functions satisfying the stated conditions. Lemma. If µ(θ) is implicitly defined by µ(θ) = arg max µ µ · θ + H(µ) (17) s.t Bµ −d = 0, (18) where H(µ) is strictly convex and twice differentiable, then dµ dθT exists and is symmetric. Proof. First, form a Lagrangian enforcing the constraints on the objective function. L = µ · θ + H(µ) + λT (Bµ −d) (19) The solution is µ and λ such that dL/dµ = 0 and dL/dλ = 0.  θ + ∂H(µ)/∂µ + BT λ Bµ −d  =  0 0  (20) 5 Recall the general implicit function theorem. If f(θ) is implicitly defined by the constraint that h(θ, f) = 0, then df dθT = −  ∂h ∂f T −1 ∂h ∂θT . (21) Using Eq. 20 as our definition of h, and differentiating with respect to both µ and λ, we have  dµ/dθT dλ/dθT  = −  ∂2H/∂µ∂µT B BT 0 −1  I 0  . (22) We see that −dµ/dθT is the upper left block of the matrix being inverted. The result follows, since the inverse of a symmetric matrix is symmetric. The following is the main result driving this paper. Again, this uses notation suggesting the application to implicit differentiation and marginal inference, but holds true for any functions satisfying the stated conditions. Theorem. Let µ(θ) be defined as in the previous Lemma, and let L(θ) be defined by L(θ) = M µ(θ)  for some differentiable function M(µ). Then the derivative of L with respect to θ is given by dL dθ = lim r→0 1 r  µ(θ + r∂M ∂µ ) −µ(θ)  . (23) Proof. First note that, by the vector chain rule, dL dθ = dµT dθ ∂M ∂µ . (24) Next, take some vector v. By basic calculus, the derivative of µ(θ) in the direction of v is dµ dθT v = lim r→0 1 r µ(θ + rv) −µ(θ)  . (25) The result follows from substituting ∂M/∂µ for v, and using the previous lemma to establish that dµ/dθT = dµT /dθ. Alg. 1 follows from applying this theorem to marginal inference. However, notice that this does not enforce the constraint that µ ≥0. The following gives mild technical conditions under which µ will be strictly positive, and so the above theorem applies. Theorem. If H(µ) = P α cαH(µc) + P i ciH(µi), and µ∗is a (possibly local) maximum of θ · µ + H(µ), under the local polytope L, then cα > 0, ci + X α,i∈α cα > 0 −→µ∗> 0. (26) This is an extension of a previous result [11, Theorem 9] for the Bethe entropy. However, extremely minor changes to the existing proof give this stronger result. Most proposed entropies satisfy these conditions, including the Bethe entropy (cα = 1, ci + P α,i∈α cα = 1), the TRW entropy (cα = ρ(α), ci + P α,i∈α cα = 1, where ρ(α) > 0 is the probability that α appears in a randomly chosen tree) and any entropy satisfying the slightly strengthened versions on Heskes’ conditions [14, 16, Section 2]. What about non-concave entropies? The only place concavity was used above was in establishing that Eq. 20 has a unique solution. With a non-concave entropy this condition is still valid, not not unique, since there can be local optima. BBP essentially calculates this 6 8 32 128 512 10 −2 10 −1 10 0 10 1 10 2 10 3 grid size running time (s) Bethe entropy 0.5 1 2 10 −2 10 −1 10 0 10 1 10 2 10 3 interaction strength running time (s) Bethe entropy pert−BP symmlq BBP direct BP 8 32 128 512 10 −2 10 −1 10 0 10 1 10 2 10 3 grid size running time (s) TRW entropy 0.5 1 2 10 −2 10 −1 10 0 10 1 10 2 10 3 interaction strength running time (s) TRW entropy pert−TRWS symmlq direct TRWS Figure 2: Times to compute dL/dθ by perturbation, Back Belief Propagation (BBP), sparse matrix factorization (direct) and the iterative symmetric-LQ method (symmlq). Inference with BP and TRWS are shown for reference. As these results use two-sided differences, perturbation always takes twice the running time of the base inference algorithm. BBP takes time similar BP. Results use a pairwise grid with xi ∈{1, 2, ..., 5}, with univariate terms θ(xi) taken uniformly from [−1, +1] and interaction strengths θ(xi, xj) from [−a, +a] for varying a. Top Left: Bethe entropy for varying grid sizes, with a = 1. Matrix factorization is efficient on small problems, but scales poorly. Top Right: Bethe entropy with a grid size of 32 and varying interaction strengths a. High interactions strengths lead to poor conditioning, slowing iterative methods. Bottom Left: Varying grid sizes with the TRW entropy. Bottom Right: TRW entropy with a grid size of 32 and varying interactions. derivative by “tracking” the local optima. If perturbed beliefs are calculated from constant initial messages with a small step, one obtains the same result. Thus, BBP and perturbation give the same gradient for the Bethe approximation. (This was also verified experimentally.) It remains to select the perturbation size r. Though the gradient is exact in the limit r →0, numerical error eventually dominates. Following Andrei[17], the experiments here use r = √ǫ(1 + |θ|∞)/| ∂L ∂µ|∞, where ǫ is machine epsilon. 4 Experiments For inference, we used either loopy belief propagation, or tree-reweighted belief propagation. As these experiments take place on grids, we are able to make use of the convergent TRWS algorithm [18, Alg. 5], which we found to converge significantly faster than standard TRW. BP/TRWS were iterated until predicted beliefs changed less than 10−5 between iterations. BBP used a slightly looser convergence threshold of 10−4, which was similarly accurate. Base code was implemented in Python, with C++ extensions for inference algorithms for efficiency. Sparse systems were solved directly using an interface to Matlab, which calls LAPACK. We selected the Symmetric LQ method as an iterative solver. Both solvers were the fastest among several tested on these problems. (Recall, the system is indefinite.) BBP results were computed by interfacing to the authors’ implementation included in the libDAI toolkit[19]. We found the PAR mode, based on parallel updates [6, Eqs. 14-25] to be much slower than the more sophisticated SEQ_FIX mode, based on sequential updates [6, extended 7 Table 1: Binary denoising results, comparing the surrogate likelihood against three loss functions fit by implicit differentiation. All loss functions are per-pixel, based on treereweighted belief propagation with edge inclusion probabilities of .5. The “Best Published” results are the lowest previously reported pixelwise test errors using essentially loopy-belief propagation based surrogate likelihood. (For all losses, lower is better.) Bimodal Gaussian Berkeley Segmentation Data Test Loss Class. Error Class. Error Surrogate likelihood Clique likelihood Univariate likelihood Class. Error Training Loss Train Test Train Test Train Test Train Test Train Test Train Test Surrogate likelihood .0498 .0540 .0286 .0239 .251 .252 1.328 1.330 .417 .416 .141 .140 Clique likelihood .0488 .0535 .0278 .0236 .275 .277 1.176 1.178 .316 .315 .127 .126 Univariate likelihood .0493 .0541 .0278 .0235 .301 .303 1.207 1.210 .305 .305 .128 .127 Smooth Class. Error .0460 .0527 .0273 .0241 .281 .283 1.179 1.181 .311 .310 .127 .126 Best Published [20] .0548 .0251 version, Fig. 5]. Hence, all results here use the latter. Other modes exceeded the available 12 GB memory. All experiments use a single core of a 2.26 GHz machine. Our first experiment makes use of synthetically generated grid models. This allows systematic variance of graph size and parameter strength. With the TRW entropy, we use uniform edge appearance probabilities of ρ = .49, to avoid singularity in D. Our results (Fig. 2) can be summarized as follows. Matrix inversion (Eq. 13) with a direct solver is very efficient on small problems, but scales poorly. The iterative solver is expensive, and extremely sensitive to conditioning. With the Bethe approximation, perturbation performs similarly to BBP. TRWS converges faster than BP on poorly conditioned problems. The second experiment considers a popular dataset for learning in high-treewidth graphical models[21]. This consists of four base images, each corrupted with 50 random noise patterns (either Gaussian or bimodal). Following the original work, 10 corrupted versions of the first base image are used for training, and the remaining 190 for testing. This dataset has been used repeatedly [22, 23], though direct comparison is sometimes complicated by varying model types and training/test set divisions. This experiment uses a grid model over neighboring pairs (i, j) p(y|x) = exp X i,j θ(yi, yj) + X i θ(yi; xi) −A(θ(x))  , (27) where θ(x) is a function of the input, with θ(yi, yj) = a(yi, yj) fully parametrized (independent of x) and θ(yi; xi) = b(yi)xi + c(yi) an affine function of xi. Enforcing translation invariance gives a total of eight free parameters: four for a(yi, yj), and two for b(yi), and c(yi)1. Once dL dθ is known, we can, following Eq. 14, recover derivatives with respect to tied parameters2. Because the previous dataset is quite limited (only four base 64x64 images), all methods perform relatively well. Hence, we created a larger and more challenging dataset, consisting of 200 200x300 images from the Berkeley segmentation dataset, split half for training and testing. These are binarized by setting yi = 1 if a pixel is above the image mean, and yi = 0 otherwise. The noisy values xi are created by setting xi = yi(1 −t1.25 i ) + (1 −yi)t1.25 i , for ti uniform on [0, 1]. Table 1 shows results for all three datasets. All the results below use batch L-BFGS for learning, and uniform edge appearance probabilities of ρ = .5. The surrogate likelihood performs well, in fact beating the best reported results on the bimodal and Gaussian data. However, the univariate and clique loss functions provide better univariate accuracy. Fig. 1 shows example results. The surrogate likelihood (which is convex), was used to initialize the univariate and clique likelihood, while the univariate likelihood was used to initialize the smooth classification error. 1There are two redundancies, as adding a constant to a(yi, yj) or c(yi) has no effect on p. 2Specifically, dL da(y,y′) = P (i,j) dL dθ(yi=y,yj=y′), dL db(y) = P i dL dθ(yi=y)xi, and dL dc(y) = P i dL dθ(yi=y). 8 References [1] Percy Liang and Michael Jordan. An asymptotic analysis of generative, discriminative, and pseudolikelihood estimators. In ICML, 2008. [2] Samuel Gross, Olga Russakovsky, Chuong Do, and Serafim Batzoglou. Training conditional random fields for maximum labelwise accuracy. In NIPS. 2006. [3] Sham Kakade, Yee Whye Teh, and Sam Roweis. An alternate objective function for Markovian fields. In ICML, 2002. [4] Martin Wainwright. Estimating the "wrong" graphical model: Benefits in the computationlimited setting. Journal of Machine Learning Research, 7:1829–1859, 2006. [5] Justin Domke. Learning convex inference of marginals. In UAI, 2008. [6] Frederik Eaton and Zoubin Ghahramani. Choosing a variable to clamp. In AISTATS, 2009. [7] Max Welling and Yee Whye Teh. Belief optimization for binary networks: A stable alternative to loopy belief propagation. In UAI, 2001. [8] Tom Heskes, Kees Albers, and Bert Kappen. Approximate inference and constrained optimization. In UAI, 2003. [9] Alan Yuille. CCCP algorithms to minimize the Bethe and Kikuchi free energies: Convergent alternatives to belief propagation. Neural Computation, 14:2002, 2002. [10] Martin Wainwright and Michael Jordan. Graphical models, exponential families, and variational inference. Found. Trends Mach. Learn., 1(1-2):1–305, 2008. [11] Jonathan Yedidia, William Freeman, and Yair Weiss. Constructing free energy approximations and generalized belief propagation algorithms. IEEE Transactions on Information Theory, 51:2282–2312, 2005. [12] Martin Wainwright, Tommi Jaakkola, and Alan Willsky. A new class of upper bounds on the log partition function. IEEE Transactions on Information Theory, 51(7):2313–2335, 2005. [13] Ofer Meshi, Ariel Jaimovich, Amir Globerson, and Nir Friedman. Convexifying the bethe free energy. In UAI, 2009. [14] Tom Heskes. Convexity arguments for efficient minimization of the bethe and kikuchi free energies. J. Artif. Intell. Res. (JAIR), 26:153–190, 2006. [15] Varun Ganapathi, David Vickrey, John Duchi, and Daphne Koller. Constrained approximate maximum entropy learning of markov random fields. In UAI, 2008. [16] Tamir Hazan and Amnon Shashua. Convergent message-passing algorithms for inference over general graphs with convex free energies. In UAI, pages 264–273, 2008. [17] Neculai Andrei. Accelerated conjugate gradient algorithm with finite difference hessian/vector product approximation for unconstrained optimization. J. Comput. Appl. Math., 230(2):570– 582, 2009. [18] Talya Meltzer, Amir Globerson, and Yair Weiss. Convergent message passing algorithms - a unifying view, 2009. [19] Joris M. Mooij et al. libDAI 0.2.4: A free/open source C++ library for Discrete Approximate Inference. http://www.libdai.org/, 2010. [20] Sanjiv Kumar, Jonas August, and Martial Hebert. Exploiting inference for approximate parameter learning in discriminative fields: An empirical study. In EMMCVPR, 2005. [21] Sanjiv Kumar and Martial Hebert. Discriminative random fields. International Journal of Computer Vision, 68(2):179–201, 2006. [22] S. V. N. Vishwanathan, Nicol Schraudolph, Mark Schmidt, and Kevin Murphy. Accelerated training of conditional random fields with stochastic gradient methods. In ICML, 2006. [23] Patrick Pletscher, Cheng Soon Ong, and Joachim Buhmann. Spanning tree approximations for conditional random fields. In AISTATS, 2009. 9
2010
137
3,896
The Maximal Causes of Natural Scenes are Edge Filters Gervasio Puertas∗ Frankfurt Institute for Advanced Studies Goethe-University Frankfurt, Germany puertas@fias.uni-frankfurt.de J¨org Bornschein∗ Frankfurt Institute for Advanced Studies Goethe-University Frankfurt, Germany bornschein@fias.uni-frankfurt.de J¨org L¨ucke Frankfurt Institute for Advanced Studies Goethe-University Frankfurt, Germany luecke@fias.uni-frankfurt.de Abstract We study the application of a strongly non-linear generative model to image patches. As in standard approaches such as Sparse Coding or Independent Component Analysis, the model assumes a sparse prior with independent hidden variables. However, in the place where standard approaches use the sum to combine basis functions we use the maximum. To derive tractable approximations for parameter estimation we apply a novel approach based on variational Expectation Maximization. The derived learning algorithm can be applied to large-scale problems with hundreds of observed and hidden variables. Furthermore, we can infer all model parameters including observation noise and the degree of sparseness. In applications to image patches we find that Gabor-like basis functions are obtained. Gabor-like functions are thus not a feature exclusive to approaches assuming linear superposition. Quantitatively, the inferred basis functions show a large diversity of shapes with many strongly elongated and many circular symmetric functions. The distribution of basis function shapes reflects properties of simple cell receptive fields that are not reproduced by standard linear approaches. In the study of natural image statistics, the implications of using different superposition assumptions have so far not been investigated systematically because models with strong non-linearities have been found analytically and computationally challenging. The presented algorithm represents the first large-scale application of such an approach. 1 Introduction If Sparse Coding (SC, [1]) or Independent Component Analysis (ICA; [2, 3]) are applied to image patches, basis functions are inferred that closely resemble Gabor wavelet functions. Because of the similarity of these functions to simple-cell receptive fields in primary visual cortex, SC and ICA became the standard models to explain simple-cell responses, and they are the primary choice in modelling the local statistics of natural images. Since they were first introduced, many different versions of SC and ICA have been investigated. While many studies focused on different ways to efficiently infer the model parameters (e.g. [4, 5, 6]), many others investigated the assumptions used in the underlying generative model itself. The modelling of observation noise can thus be regarded as the major difference between SC and ICA (see, e.g., [7]). Furthermore, different forms of independent sparse priors have been investigated by many modelers [8, 9, 10], while other approaches have gone a step further and studied a relaxation of the assumption of independence between hidden variables [11, 12, 13]. ∗authors contributed equally 1 An assumption that has, in the context of image statistics, been investigated relatively little is the assumption of linear superpositions of basis functions. This assumption is not only a hallmark of SC and ICA but, indeed, is an essential part of many standard algorithms including Principal Component Analysis (PCA), Factor Analysis (FA; [14]), or Non-negative Matrix Factorization (NMF; [15]). For many types of data, linear superposition can be motivated by the actual combination rule of the data components (e.g., sound waveforms combine linearly). For other types of data, including visual data, linear superposition can represent a severe approximation, however. Models assuming linearity are, nevertheless, often used because they are easier to study analytically and many derived algorithms can be applied to large-scale problems. Furthermore, they perform well in many applications and may, to certain extents, succeed well in modelling the distribution, e.g., of local image structure. From the perspective of probabilistic generative models, a major aim is, however, to recover the actual data generating process, i.e., to recover the actual generating causes (see, e.g., [7]). To accomplish this, the crucial properties of the data generation should be modelled as realistically as possible. If the data components combine non-linearly, this should thus be reflected by the generative model. Unfortunately, inferring the parameters in probabilistic models assuming non-linear superpositions has been found to be much more challenging than in the linear case (e.g. [16, 17, 18, 19], also compare [20, 21]). To model image patches, for instance, large-scale applications of non-linear models, with the required large numbers of observed and hidden variables, have so far not been reported. In this paper we study the application of a probabilistic generative model with strongly non-linear superposition to natural image patches. The basic model has first been suggested in [19] where tractable learning algorithms for parameter optimization where inferred for the case of a superposition based on a point-wise maximum. The model (which was termed Maximal Causes Analysis; MCA) used a sparse prior for independent and binary hidden variables. The derived algorithms compared favorably with state-of-the-art approaches on standard non-linear benchmarks and they were applied to realistic data. However, the still demanding computational costs limited the application domain to relatively small-scale problems. The unconstrained model for instance was used with at most H = 20 hidden units. Here we use a novel learning algorithm to infer the parameters of a variant of the MCA generative model. The approach allows for scaling the model up to several hundreds of observed and hidden variables. It enables large-scale applications to image patches and, thus, allows for studying the inferred basis functions as it is commonly done for linear approaches. 2 The Maximal Causes Generative Model Consider a set of N data points {y (n)}n=1,...,N sampled independently from an underlying distribution (y (n) ∈ D×1, D is the number of observed variables). For these data we seek parameters Θ = (W, σ, π) that maximize the data likelihood L = N n=1 p(y (n) | Θ) under a variant of the MCA generative model [19] which is given by: p(s | Θ) =  h πsh (1 −π)1−sh , (Bernoulli distribution) (1) p(y |s, Θ) =  d N(yd; W d(s, W), σ2) , where W d(s, W) = max h {sh Wdh} (2) and where N(yd; w, σ2) denotes a scalar Gaussian distribution. H denotes the number of hidden variables sh, and W ∈RD×H. The model differs from the one previously introduced by the use of Gaussian noise instead of Poisson noise in [19]. Eqn. 2 results in the basis functions Wh = (W1h, . . . , WDh)T of the MCA model to be combined non-linearly by a point-wise maximum. This becomes salient if we compare (2) with the linear case using the vectorial notation maxh{ W  h} =  maxh{W  1h}, . . . , maxh{W  Dh} T for vectors W  h ∈RD×1: p(y |s, Θ) = N(y; max h {sh Wh}, σ2 1) (non-linear superposition) (3) p(y |s, Θ) = N(y;  h sh Wh, σ2 1) (linear superposition) (4) where N(y; µ, Σ) denotes the multi-variate Gaussian distribution (note that  h sh Wh = Ws ). As in linear approaches such as SC, the combined basis functions set the mean values of the observed variables yd, which are independently and identically drawn from Gaussian distributions 2 max max sum sum sum B A C D max Figure 1: A Example patches extracted from an image and preprocessed using a Difference of Gaussians filter. B Two generated patches constructed from two Gabor basis functions with approximately orthogonal wave vectors. In the upper-right the basis functions were combined using linear superposition. In the lower-right they were combined using a point-wise maximum (note that the max was taken after channel-splitting (see Eqn. 15 and Fig. 2). C Superposition of two collinear Gabor functions using the sum (upper-right) or point-wise maximum (lower-right). D Cross-sections through basis functions (along maximum amplitude direction). Left: Cross-sections through two different collinear Gabor functions (compare C). Right: Cross-sections through their superpositions using sum (top) and max (bottom). with variance σ2 (Eqn. 2). The difference between linear and non-linear superposition is illustrated in Fig. 1. In general, the maximum superposition results in much weaker interferences. This is the case for diagonally overlapping basis functions (Fig. 1B) and, at closer inspection, also for overlapping collinear basis functions (Fig. 1C,D). Strong interferences as with linear combinations can not be expected from combinations of image components. For preprocessed image patches (compare Fig. 4D), it could thus be argued that the maximum combination is closer to the actual combination rule of image causes. In any case, the maximum represents an alternative to study the implications of combination rules in the image domain. To optimize the parameters Θ of the MCA model (1) and (2), we use a variational EM approach (see, e.g., [22]). That is, instead of maximizing the likelihood directly, we maximize the free-energy: F(q, Θ)= N  n=1   s q(n)(s ; Θ)  log  p(y (n) |s, W, σ)  + log  p(s | π)  + H(q) , (5) where q(n)(s ; Θ) is an approximation to the exact posterior. In the variational EM scheme F(q, Θ) is maximized alternately with respect to q in the E-step (while Θ is kept fixed) and with respect to Θ in the M-step (while q is kept fixed). As a multiple-cause model, an exact E-step is computationally intractable for MCA. Additionally, the M-step is analytically intractable because of the non-linearity in MCA. The computational intractability in the E-step takes the form of expectation values of functions g, g(s) q(n). These expectations are intractable if the optimal choice of q(n) in (5) is used (i.e., if q(n) is equal to the posterior: q(n)(s ; Θ) = p(s | y (n), Θ)). To derive an efficient learning algorithm, our approach approximates the intractable expectations g(s) q(n) by truncating the sums over the hidden space of s: g(s) q(n) =  s p(s, y (n) | Θ) g(s)  ∼ s p( ∼ s , y (n) | Θ) ≈  s∈K n p(s, y (n) | Θ) g(s)  ∼ s ∈K n p( ∼ s , y (n) | Θ) , (6) where K n is a small subset of the hidden space. Eqn. 6 represents a good approximation if the set K n contains most of the posterior probability mass. The approximation will be referred to as Expectation Truncation and can be derived as a variational EM approach (see Suppl. A). For other generative models similar truncation approaches have successfully been used [19, 23]. For the learning algorithm, K n in (6) is chosen to contain hidden states s with at most γ active causes  h sh ≤γ. Furthermore, we only consider the combinatorics of H ≥γ hidden variables. More formally we define: K n = {s |   j sj ≤γ and ∀i ∈I : si = 0  or  j sj ≤1}, (7) where the index set I contains those H hidden variables that are the most likely to have generated data point y (n) (the last term in Eqn. 7 assures that all states s with just one non-zero entry are also 3 evaluated). To determine the H hidden variables for I we use those variables h with the H largest values of a selection function Sh(y (n)) which is given by: Sh(y (n)) = π N(y (n); W eff h , σ2 1) , with an effective weight W eff dh = max{yd, Wdh} . (8) Selecting hidden variables based on Sh(y (n)) is equivalent to selecting them based on an upper bound of p(sh=1 | y (n), Θ). To see this note that p(y (n) | Θ) is independent of h and that: p(sh=1 | y (n), Θ) p(y (n) | Θ) =  s sh = 1   d p(y(n) d | W d(s, W), σ)  p(s | π) ≤  d p(y(n) d | W eff dh , σ)  s sh = 1 p(s | π), with the right-hand-side being equal to Sh(y (n)) in Eqn. 8 (see Suppl. B for details). A low value of Sh(y (n)) thus implies a low value of p(sh = 1 | y (n), Θ) and hence a low likelihood that cause h has generated data point y (n). In numerical experiments on ground-truth data we have verified that for most data points Eqn. 6 with Eqn. 7 indeed finally approximates the true expectation values with high accuracy. Having derived tractable approximations for the expectation values (6) in the E-step, let us now derive parameter update equations in the M-step. An update rule for the weight matrix W of this model was derived in [19] and is given by: W new dh =  n∈M Aρ dh(s, W) q(n) y(n) d  n∈M Aρ dh(s, W) q(n) , Aρ dh(s, W) = ∂ ∂Wdh W ρ d(s, W) , (9) W ρ d(s, W) = H  h=1 (shWdh)ρ  1 ρ , (10) where the parameter ρ is set to a large value (we used ρ = 20). The derivation of the update rule for σ (Gaussian noise has previously not been used) is straight-forward, and the update equation is given by: σnew =  1 |M| D  n∈M y (n) −max h {sh Wh} 2 qn . (11) Note that in (9) to (11) we do not sum over all data points y (n) but only over those in a subset M (|M| is the number of elements in M). The subset contains the data points for which (6) finally represents a good approximation. It is defined to contain the N cut data points with largest values  s∈K n p(s, y (n) | Θ), i.e., with the largest values for the denominator in (6). N cut is hereby the expected number of data points that have been generated by states with less or equal to γ non-zero entries: N cut = N  s, | s|≤γ p(s | π) = N γ  γ =0 H γ  πγ  (1 −π)H−γ  . (12) The selection of data points is an important difference to earlier truncation approaches (compare [19, 23]), and its necessity can be shown analytically (Suppl. A). Update equations (9), (10), and (11) have been derived by setting the derivatives of the free-energy (w.r.t. W and σ) to zero. Similarly, we can derive the update equation for the sparseness parameter π. However, as the approximation only considers states s with a maximum of γ non-zero entries, the update has to correct for an underestimation of π (compare Suppl. A). If such a correction is taken into account, we obtain the update rule: πnew = A(π) π B(π) 1 |M|  n∈M |s | qn with |s | = H  h=1 sh , (13) A(π) = γ  γ=0 H γ πγ (1 −π)H−γ and B(π) = γ  γ=0 γ H γ πγ (1 −π)H−γ . (14) Note that the correction factor A(π) π B(π) in (13) is equal to one over H if we allow for all possible states (i.e., γ = H = H). Also the set M becomes equal to the set of all data points in this case (because 4 N cut = N). For γ = H = H, Eqn. 13 thus falls back to the exact EM update rule that can canonically be derived by setting the derivative of (5) w.r.t. π to zero (while using the exact posterior). Also the update equations (9), (10), and (11) fall back to their canonical form for γ = H = H. By choosing a γ between one and H we can thus choose the accuracy of the used approximation. The higher the value of γ the more accurate is the approximation but the larger are also the computational costs. For intermediate values of γ we can obtain very good approximations with small computational costs. Crucial for the scalability to large-scale problems is hereby the preselection of H < H hidden variables using the selection function in Eqn. 8. Learning Algorithm Channel Splitting Recombination non-neg. patches basis functions +Channel -Channel Figure 2: Illustration of patch preprocessing and basis function visualization. The left-hand-side shows data points obtained from gray-value patches after DoG filtering. These patches are transformed to non-negative data by Eqn. 15. The algorithm maximizes the data likelihood under the MCA model (1) and (2), and infers basis functions (second from the right). For visualization, the basis functions are displayed after their parts have been recombined again. 3 Numerical Experiments The update equations (9), (10), (11), and (13) together with approximation (6) with (7) and (8) define a learning algorithm that optimizes the full set of parameters of the MCA generative model (1) and (2). We will apply the algorithm to visual data as received by the primary visual cortex of mammals. In mammals, visual information is transferred to the cortex via two types of neurons in the lateral geniculus nucleus (LGN): center-on and center-off cells. The sensitivity of center-on neurons can be modeled by a Difference of Gaussians (DoG) filter with positive central part, while the sensitivity of center-off cells can be modelled by an inverted such filter. A model for preprocessing of an image patch is thus given by a DoG filter and a successive splitting of the positive and the negative parts of the filtered image. More formally, we use a DoG filter to generate patches ˜y with ˜D = 26 × 26 pixels. Such a patch is then converted to a patch of size D = 2 ˜D by assigning: yd = [˜yd]+ and yD+d = [−˜yd]+ (15) (for d = 1, . . . , D) where [x]+ = x for x ≥0 and [x]+ = 0 otherwise. This procedure has repeatedly been used in the context of visual data processing (see, e.g., [24]) and is, as discussed, closely aligned with mammalian visual preprocessing (see Fig. 2 for an illustration). Before we applied the algorithm to natural image patches, it was first evaluated on artificial data with ground-truth. As inferred basis functions of images most commonly resemble Gabor wavelets, we used Gabor functions for the generation of artificial data. The Gabor basis functions were combined according to the MCA generative model (1) and (2). We used Hgen = 400 Gabor functions for generation. The variances of the Gaussian envelop of each Gabor were sampled from a distribution in nx/ny-space (Fig. 3C) with σx and σy denoting the standard deviations of the Gaussian envelope, and with f denoting the Gabor frequency. Angular phases and centers of the Gabors were sampled from uniform distributions. The wave vector’s module was set to 1 (f = 1 2π) and the envelope amplitude was 10. The parameters were chosen to lie in the same range as the parameters inferred in preliminary runs of the algorithm on natural image patches. For the generation of each artificial patch we drew a binary vector s according to (1) with πHgen = 2. We then selected the |s| corresponding Gabor functions and used channel-splitting (15) to convert them into basis functions with only non-negative parts. To form an artificial patch, these basis functions were combined using the point-wise maximum according to (2). We generated N = 150 000 patches as data points in this way (Fig. 3A shows some examples). The algorithm was applied with H = 300 hidden variables and approximation parameters γ = 3 and H = 8. We generated the data with a larger number of basis functions to better match the continuous distribution of the real generating components of images. The basis functions Wh were initialized 5 A C nx ny B Figure 3: A Artificial patches generated by combining artificial Gabors using a point-wise maximum. B Inferred basis functions if the MCA learning algorithm is applied. C Comparison between the shapes of generating (green) and inferred (blue) Gabors. The brighter the blue data points the larger the error between the basis function and the matched Gabor (also for Fig. 5). by setting them to the average over all the preprocessed input patches plus a small Gaussian white noise (≈0.5% of the corresponding mean). The initial noise parameter σ was set following Eqn. 11 by using all data points (setting |M| = N initially). Finally, the initial sparseness level was set to π H = 2. The model parameters were updated according to Eqns. 9 to 13 using 60 EM iterations. To help avoiding local optima, a small amount of Gaussian white noise (≈0.5% of the average basis function value) was added during the first 20 iterations, was linearly decreased to zero between iterations 20 and 40, and kept at zero for the last 20 iterations. During the first 20 iterations the updates considered all N data points (|M| = N). Between iteration number 20 and 40 the amount of used data points was linearly decreased to (|M| = N cut) where it was kept constant for the last 20 iterations. Considering all data points for the updates initially, has proven beneficial because the selection of data points is based on very incomplete knowledge during the first iterations. Fig. 3B displays some of the typical basis functions that were recovered in a run of the algorithm on artificial patches. As can be observed (and as could have been expected), they resemble Gabor functions. When we matched the obtained basis functions with Gabor functions (compare, e.g., [25, 26, 27] for details), the Gabor parameters obtained can be analyzed further. We thus plotted the values parameterizing the Gabor shapes in an nx/ny-plot. This also allowed us to investigate how well the generating distribution of artificial Gabors was recovered. Fig. 3C shows the generating (green) and the recovered distribution of Gabors (blue). Although some few recovered basis functions lie a relatively distant from the generating distribution, it is in general recovered well. The recovered sparseness level was with π H = 2.62 a bit larger than the initial level of π Hgen = 2. This is presumably due to the smaller number of basis function in the model H < Hgen. Also the finite inferred noise level of σ = 0.37 (despite a generation without noise) can be explained by this mismatch. Depending on the parameters of the controls, we can observe different amounts of outliers (usually not more than 5% −10%). These outliers are usually basis functions that represent more than one Gabor or small Gabor parts. Importantly, however, we found that the large majority of inferred Gabors consistently recovered the generating Gabor functions in nx/ny-plots. In particular, when we changed the angle of the generating distribution in the nx/ny-plots (e.g., to 25o or 65o), the angle of the recovered distributions changed accordingly. Note that these controls are a quantitative version of the artificial Gabor and grating data used for controls in [1]. Application to Image Patches. The dataset used in the experiment on natural images was prepared by sampling N = 200 000 patches of ˜D = 26 × 26 pixels from the van Hateren image database [28] (while constraining random selection to patches of images without man-made structures). We preprocessed the patches as described above using a DoG filter1 with a ratio of 3 : 1 between positive and negative parts (see, e.g., [29]) before converting the patches using Eqn. 15. The algorithm was applied with H = 400 hidden variables and approximation parameters γ = 4 and H = 12. We used parameter initialization as described above and ran 120 EM iterations (also as described above). After learning the inferred sparseness level was π H = 1.63 and the inferred noise level was σ = 1.59. The inferred basis functions we found to resembled Gabor-like functions at different locations, and with different orientations and frequencies. Additionally, we obtained many globular basis functions with no or very little orientation preferences. Fig. 4 shows a selection of the H = 400 functions after a run of the algorithm (see suppl. Fig. C.1 for 1Filter parameters were chosen as in [27]; before the brightest 2% of the pixels were clamped to the maximal value of the remaining 98% (influence of light-reflections were reduced in this way). 6 A B D C E Figure 4: Numerical experiment on image patches. A Random selection of 125 basis functions of the H=400 inferred. B Selection of most globular functions and C most elongated functions. D Selection of preprocessed patches extracted from natural images. E Selection of data points generated according to the model using the inferred basis functions and sparseness level (but no noise). all functions). The patches in Fig. 4D,E were chosen to demonstrate the high similarity between preprocessed natural patches (in D) and generated ones (in E). To highlight the diversity of obtained basis functions, Figs. 4B,C display some of the most globular and elongated examples, respectively. The variety of Gabor shapes is currently actively discussed [30, 31, 10, 32, 27] since it became obvious that standard linear models (e.g., SC and ICA), could not explain this diversity [33]. To facilitate comparison with earlier approaches, we have applied Gabor matching (compare [25]) and analyzed the obtained parameters. Instead of matching the basis functions directly, we first computed estimates of their corresponding receptive fields (RFs). These estimates were obtained by convoluting the basis functions with the same DoG filter as used for preprocessing (see, e.g., [27] and Suppl. C.1 for details). In controls we found that these convoluted fields were closely matched by RFs estimated using reverse correlation as described, e.g., in [7]. 90◦ 0◦ 45◦ 135◦ 180◦ A Figure 5: Analysis of Gabor parameters (H=400). A Anglefrequency plot of basis functions. B nx/ny distribution of basis functions. C Distribution measured in vivo [33] (red triangles) and corresponding distribution of MCA basis functions (blue). B C ny ny nx nx After matching the (convoluted) fields with Gabor functions, we found a relatively homogeneous distribution of the fields’ orientations as it is commonly observed (Fig. 5A). The frequencies are distributed around 0.1 cycles per pixel, which reflects the band-pass property of the DoG filter. To analyze the Gabor shapes, we plotted the parameters using an nx/ny-plot (as suggested in [33]). The broad distribution in nx/ny-space hereby reflects the high diversity of basis functions obtained by our algorithm (see Fig. 5B). The specific form of the obtained shape distribution is, hereby, similar to the distribution of macaque V1 simple cells as measure in in vivo recordings [33]. However, the MCA basis functions do quantitatively not match the measurements exactly (see Fig. 5C): the MCA distribution contains a higher percentage of strongly elongated basis functions, and many MCA functions are shifted slightly to the right relative to the measurements. If the basis functions are matched with Gabors directly, we actually do not observe the latter effect (see suppl. Fig. C.2). If simple-cell responses are associated with the posterior probabilities of multiple-cause models, the basis functions should, however, not be compared to measured RFs directly (although it is frequently done in the literature). 7 To investigate the implications of different numbers of hidden variables, we also ran the algorithm with H = 200 and H = 800. In both cases we observed qualitatively and quantitatively similar distributions of basis functions. Runs with H = 200 thus also contained many circular symmetric basis functions (see suppl. Fig. C.3 for the distribution of shapes). This observation is remarkable because it shows that such ‘globular’ fields are a very stable feature for the MCA approach, also for small numbers of hidden variables. Based on standard generative models with linear superposition it has recently been argued [32] that such functions are only obtained in a regime with large numbers of hidden variables relative to the input dimensionality (see [34] for an early contribution). 4 Discussion We have studied the application of a strongly non-linear generative model to image patches. The model combines basis functions using a point-wise maximum as an alternative to the linear combination as assumed by Sparse Coding, ICA, and most other approaches. Our results suggest that changing the component combination rule has a strong impact on the distribution of inferred basis functions. While we still obtain Gabor-like functions, we robustly observe a large variety of basis functions. Most notably, we obtain circular symmetric functions as well as many elongated functions that are closely associated with edges traversing the entire patch (compare Figs. 1 and 4). Approaches using linear component combination, e.g. ICA or SC, do usually not show these features. The differences in basis function shapes between non-linear and linear approaches are, in this respect, consistent with the different types of interferences between basis functions. The maximum results in basis function combinations with much less pronounced interferences, while the stronger interferences of linear combinations might result in a repulsive effect fostering less elongated fields (compare Fig. 1). For linear approaches, a large diversity of Gabor shapes (including circular symmetric fields) could only be obtained in very over-complete settings [34], or specifically modelled priors with hand-set sparseness levels [10]. Such studies were motivated by a recently observed discrepancy of receptive fields as predicted by SC or ICA, and receptive fields as measured in vivo [33]. Compared to these measurements, the MCA basis functions and their approximate receptive fields show a similar diversity of shapes. MCA functions and measured RFs both show circular symmetric fields and in both cases there is a tendency towards fields elongated orthogonal to the wave-vector direction (compare Fig. 4). Possible factors that can influence the distributions of basis functions, for MCA as well as for other methods, are hereby different types of preprocessing, different prior distributions, and different noise models. Even if the prior type is fixed, differences for the basis functions have been reported for different settings of prior parameters (e.g., [10]). If possible, these parameters should thus be learned along with the basis functions. All the different factors named above may result in quantitative differences, and the shift of the MCA functions relative to the measurements might have been caused by one of these factors. For the MCA model, possible effects of assuming binary hidden variables remain to be investigated. Presumably, also dependencies between hidden variables as investigated in recent contributions [e.g. 13, 12, 11] play an important role, e.g., if larger structures of specific arrangements of edges and textures are considered. As the components in such models are combined less randomly, the implications of their combination rule may even be more pronounced in these cases. In conclusion, probably neither the linear nor the maximum combination rule does represent the exact model for local visual component combinations. However, while linear component combinations have extensively been studied in the context of image statistics, the investigation of other combination rules has been limited to relatively small scale applications [17, 16, 35, 19]. Applying a novel training scheme, we could overcome this limitation in the case of the MCA generative model. As with linear approaches, we found that Gabor-like basis functions are obtained. The statistics of their shapes, a subject that is currently and actively discussed [31, 10, 32, 26, 27], is markedly different, however. Future work should, thus, at least be aware that a linear combination of components is not the only possible choice. To recover the generating causes of image patches, a linear combination might, furthermore, not be the best choice. With the results presented in this work, it can neither be considered as the only practical one anymore. Acknowledgements. We gratefully acknowledge funding by the German Federal Ministry of Education and Research (BMBF) in the project 01GQ0840 (BFNT Frankfurt) and by the German Research Foundation (DFG) in the project LU 1196/4-1. Furthermore, we gratefully acknowledge support by the Frankfurt Center for Scientific Computing (CSC Frankfurt) and thank Marc Henniges for his help with Fig. 2. 8 References [1] B. A. Olshausen, D. J. Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381:607 – 609, 1996. [2] P. Comon. Independent component analysis, a new concept? Signal Proc, 36(3):287–314, 1994. [3] A. J. Bell, T. J. Sejnowski. The “independent components” of natural scenes are edge filters. Vision Research, 37(23):3327 – 38, 1997. [4] A. Hyv¨arinen, E. Oja. A fast fixed-point algorithm for independent component analysis. Neural Computation, 9(7):1483–1492, 1997. [5] H. Lee, A. Battle, R. Raina, A. Ng. Efficient sparse coding algorithms. NIPS 22, 801–808, 2007. [6] M. W. Seeger. Bayesian Inference and Optimal Design for the Sparse Linear Model. Journal of Machine Learning Research, 759–813, 2008. [7] P. Dayan, L. F. Abbott. Theoretical Neuroscience. MIT Press, Cambridge, 2001. [8] P. Berkes, R. Turner, M. Sahani. On sparsity and overcompleteness in image models. NIPS 20, 2008. [9] B. A. Olshausen, K. J. Millman. Learning sparse codes with a mixture-of-Gaussians prior. NIPS 12, 841–847, 2000. [10] M. Rehn, F. T. Sommer. A network that uses few active neurones to code visual input predicts the diverse shapes of cortical receptive fields. J Comp Neurosci, 22(2):135–146, 2007. [11] A. Hyv¨arinen, P. Hoyer. Emergence of phase-and shift-invariant features by decomposition of natural images into independent feature subspaces. Neural Computation, 12(7):1705–1720, 2000. [12] F. Sinz, E. P. Simoncelli, M. Bethge. Hierarchical modeling of local image features through Lp-nested symmetric distributions. NIPS 22, 1696–1704, 2009. [13] D. Zoran, Y. Weiss. The ”Tree-Dependent Components” of Natural Images are Edge Filters. NIPS 22, 2340–2348, 2009. [14] B. S. Everitt. An Introduction to Latent Variable Models. Chapman and Hall, 1984. [15] D. D. Lee, H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–91, 1999. [16] P. Dayan, R. S. Zemel. Competition and multiple cause models. Neural Computation, 7:565-579, 1995. [17] E. Saund. A multiple cause mixture model for unsupervised learning. Neural Computation, 7:51-71, 1995. [18] H. Lappalainen, X. Giannakopoulos, A. Honkela, J. Karhunen. Nonlinear independent component analysis using ensemble learning: Experiments and discussion. Proc. ICA, 2000. [19] J. L¨ucke, M. Sahani. Maximal causes for non-linear component extraction. Journal of Machine Learning Research, 9:1227 – 1267, 2008. [20] N. Jojic, B. Frey. Learning flexible sprites in video layers. CVPR, 199–206, 2001. [21] N. Le Roux, N. Heess, J. Shotton, J. Winn. Learning a generative model of images by factoring appearance and shape. Technical Report, Microsoft Research, 2010. [22] R. Neal, G. Hinton. A view of the EM algorithm that justifies incremental, sparse, and other variants. M. I. Jordan, editor, Learning in Graphical Models. Kluwer, 1998. [23] J. L¨ucke, R. Turner, M. Sahani, M. Henniges. Occlusive Components Analysis. NIPS, 1069-1077, 2009. [24] P. O. Hoyer. Non-negative matrix factorization with sparseness constraints. Journal of Machine Learning Research, 5:1457–1469, 2004. [25] J. P. Jones, L. A. Palmer. An evaluation of the two-dimensional gabor filter model of simple receptive fields in cat striate cortex. Journal of Neurophysiology, 58(6):1233 – 1258, 1987. [26] P. Berkes, B.L. White, J. Fiser. No evidence for active sparsification in the visual cortex. NIPS 22, 2009. [27] J. L¨ucke. Receptive field self-organization in a model of the fine-structure in V1 cortical columns. Neural Computation, 21(10):2805–2845, 2009. [28] J. H. van Hateren, A. van der Schaaf. Independent component filters of natural images compared with simple cells in primary visual cortex. Proc Roy Soc London B, 265:359 – 366, 1998. [29] D. C. Somers, S. B. Nelson, M. Sur. An emergent model of orientation selectivity in cat visual cortical simple cells. The Journal of Neuroscience, 15:5448 – 5465, 1995. [30] J. L¨ucke. Learning of representations in a canonical model of cortical columns. Cosyne 2006, 100, 2006. [31] S. Osindero, M. Welling, G. E. Hinton. Topographic product models applied to natural scene statistics. Neural Computation, 18:381 – 414, 2006. [32] D. Arathorn, B. Olshausen, J. DiCarlo. Functional requirements of a visual theory. Workshop Cosyne. www.cosyne.org/c/index.php?title=Functional requirements of a visual theory, 2007. [33] D. L. Ringach. Spatial structure and symmetry of simple-cell receptive fields in macaque primary visual cortex. Journal of Neurophysiology, 88:455 – 463, 2002. Data retrieved 2006 from manuelita.psych.ucla.edu/∼dario. [34] B. A. Olshausen, D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by V1? Vision Research, 37(23):3311–3325, 1997. [35] S. Den´eve, T. Lochmann, U. Ernst. Spike based inference in a network with divisive inhibition. NeuralComp, Marseille, 2008. 9
2010
138
3,897
Regularized estimation of image statistics by Score Matching Diederik P. Kingma Department of Information and Computing Sciences Universiteit Utrecht d.p.kingma@students.uu.nl Yann LeCun Courant Institute of Mathematical Sciences New York University yann@cs.nyu.edu Abstract Score Matching is a recently-proposed criterion for training high-dimensional density models for which maximum likelihood training is intractable. It has been applied to learning natural image statistics but has so-far been limited to simple models due to the difficulty of differentiating the loss with respect to the model parameters. We show how this differentiation can be automated with an extended version of the double-backpropagation algorithm. In addition, we introduce a regularization term for the Score Matching loss that enables its use for a broader range of problem by suppressing instabilities that occur with finite training sample sizes and quantized input values. Results are reported for image denoising and super-resolution. 1 Introduction Consider the subject of density estimation for high-dimensional continuous random variables, like images. Approaches for normalized density estimation, like mixture models, often suffer from the curse of dimensionality. An alternative approach is Product-of-Experts (PoE) [7], where we model the density as a product, rather than a sum, of component (expert) densities. The multiplicative nature of PoE models make them able to form complex densities: in contrast to mixture models, each expert has the ability to have a strongly negative influence on the density at any point by assigning it a very low component density. However, Maximum Likelihood Estimation (MLE) of the model requires differentiation of a normalizing term, which is infeasible even for low data dimensionality. A recently introduced estimation method is Score Matching [10], which involves minimizing the square distance between the model log-density slope (score) and data log-density slope, which is independent of the normalizing term. Unfortunately, applications of SM estimation have thus far been limited. Besides ICA models, SM has been applied to Markov Random Fields [14] and a multi-layer model [13], but reported results on real-world data have been of qualitative, rather than quantitative nature. Differentiating the SM loss with respect to the parameters can be very challenging, which somewhat complicates the use of SM in many situations. Furthermore, the proof of the SM estimator [10] requires certain conditions that are often violated, like a smooth underlying density or an infinite number of samples. Other estimation methods are Constrastive Divergence [8] (CD), Basis Rotation [23] and NoiseContrastive Estimation [6] (NCE). CD is an MCMC method that has been succesfully applied to Restricted Boltzmann Machines (RBM’s) [8], overcomplete Independent Component Analysis 1 (ICA) [9], and convolution variants of ICA and RBM’s [21, 19]. Basis Rotation [23] works by restricting weight updates such that they are probability mass-neutral. SM and NCE are consistent estimators [10, 6], while CD estimation has been shown to be generally asymptotically biased [4]. No consistency results are known for Basis Rotation, to our knowledge. NCE is a promising method, but unfortunately too new to be included in experiments. CD and Basis Rotation estimation will be used as a basis for comparison. In section 2 a regularizer is proposed that makes Score Matching applicable to a much broader class of problems. In section 3 we show how computation and differentiation of the SM loss can be performed in automated fashion. In section 4 we report encouraging quantitative experimental results. 2 Regularized Score Matching Consider an energy-based [17] model E(x; w), where “energy” is the unnormalized negative logdensity such that the pdf is: p(x; w) = e−E(x;w)/Z(w), where Z(w) is the normalizing constant. In other words, low energies correspond to high probability density, and high energies correspond to low probability density. Score Matching works by fitting the slope (score) of the model density to the slope of the true, underlying density at the data points, which is obviously independent of the vertical offset of the logdensity (the normalizing constant). Hyv¨arinen [10] shows that under some conditions, this objective is equivalent to minimizing the following expression, which involves only first and second partial derivatives of the model density: J(w) = Z x∈RN px(x) N X i=1 1 2 ∂E(x; w) ∂xi 2 −∂2E(x; w) (∂xi)2 ! dx + const (1) with N-dimensional data vector x, weight vector w and true, underlying pdf px(x). Among the conditions 1 is (1) that px(x) is differentiable, and (2) that the log-density is finite everywhere. In practice, the true pdf is unknown, and we have a finite sample of T discrete data points. The sample version of the SM loss function is: JS(w) = 1 T T X t=1 N X i=1 1 2 ∂E(x(t); w) ∂xi 2 −∂2E(x(t); w) (∂xi)2 ! (2) which is asymptotically equivalent to the equation (1) as T approaches infinity, due to the law of large numbers. This loss function was used in previous publications on SM [10, 12, 13, 15]. 2.1 Issues Should these conditions be violated, then (theoretically) the pdf cannot be estimated using equation (1). Only some specific special-case solutions exist, e.g. for non-negative data [11]. Unfortunately, situations where the mentioned conditions are violated are not rare. The distribution for quantized data (like images) is discontinuous, hence not differentiable, since the data points are concentrated at a finite number of discrete positions. Moreover, the fact that equation (2) is only equivalent to equation (1) as T approaches infinity may cause problems: the distribution of any finite training set of discrete data points is discrete, hence not differentiable. For proper estimation with SM, data can be smoothened by whitening; however, common whitening methods (such as PCA or SVD) are computational infeasible for large data dimensionality, and generally destroy the local structure of spatial and temporal data such as image and audio. Some previous publications on Score Matching apply zero-phase whitening (ZCA) [13] which computes a weighed sum over an input patch which removes some of the original quantization, and can potentially be applied convolutionally. However, 1 The conditions are: the true (underlying) pdf px(x) is differentiable, the expectations E  ∥∂log px(x)/∂x∥2 and E  ∥∂E(x; w)/∂x∥2 w.r.t. x are finite for any w, and px(x)∂E(x; w)/∂x goes to zero for any w when ∥x∥→∞. 2 the amount of information removed from the input by such whitening is not parameterized and potentially large. 2.2 Proposed solution Our proposed solution is the addition of a regularization term to the loss, approximately equivalent to replacing each data point x with a Gaussian cloud of virtual datapoints (x+ǫ) with i.i.d. Gaussian noise ǫ ∼N(0, σ2I). By this replacement, the sample pdf becomes smooth and the conditions for proper SM estimation become satisfied. The expected value of the sample loss is: E  JS(x + ǫ; w)  = 1 2 N X i=1 E "∂E(x + ǫ; w) ∂(xi + ǫi) 2#! − N X i=1  E ∂2E(x + ǫ; w) (∂(xi + ǫi))2  (3) We approximate the first and second term with a simple first-order Taylor expansion. Recall that since the noise is i.i.d. Gaussian, E [ǫi] = 0, E [ǫiǫj] = E [ǫi] E [ǫj] = 0 if i ̸= j, and E  ǫ2 i  = σ2. The expected value of the first term is: 1 2 N X i=1 E "∂E(x + ǫ; w) ∂(xi + ǫi) 2# = 1 2 N X i=1 E   ∂E(x; w) ∂xi + N X j=1 ∂2E(x; w) ∂xi∂xj ǫj  + O(ǫ2 i ) !2  = 1 2 N X i=1 ∂E(x; w) ∂xi 2 + σ2 N X j=1 ∂2E(x; w) ∂xi∂xj 2 + ˆO(ǫ2 i ) ! (4) The expected value of the second term is: N X i=1  E ∂2E(x + ǫ; w) (∂(xi + ǫi))2  = N X i=1 E " ∂2E(x; w) (∂xi)2 + N X i=1  ∂3E(x; w) ∂xi∂xi∂xj ǫj  + O(ǫ2 i ) #! = N X i=1 ∂2E(x; w) (∂xi)2  + O(ǫ2 i ) (5) Putting the terms back together, we have: E  JS(x + ǫ; w)  = 1 2 N X i=1  ∂E ∂xi 2 − N X i=1  ∂2E (∂xi)2  + 1 2σ2 N X i=1 N X j=1  ∂2E ∂xi∂xj 2 + ˆO(ǫ2) (6) where E = E(x; w). This is the full regularized Score Matching loss. While minimization of above loss may be feasible in some situations, in general it requires differentiation of the full Hessian w.r.t. x which scales like O(W 2). However, the off-diagonal elements of the Hessian are often dominated by the diagonal. Therefore, we will use the diagonal approximation: Jreg(x; w; λ) = JS(x; w) + λ N X i=1  ∂2E (∂xi)2 2 (7) where λ sets regularization strength and is related to (but not exactly equal to) 1 2σ2 in equation (6). This regularized loss is computationally convenient: the added complexity is almost negligible since differentiation of the second derivative terms (∂2E/(∂xi)2) w.r.t. the weights is already required for unregularized Score Matching. The regularizer is related to Tikhonov regularization [22] and curvature-driven smoothing [2] where the square of the curvature of the energy surface at the data points are also penalized. However, its application has been limited since (contrary to our case) in the general case it adds considerable computational cost. 3 Figure 1: Illustration of local computational flow around some node j. Black lines: computation of quantities δj = ∂E/∂gj, δ′ j = ∂2E/(∂gi)2 and the SM loss J(x; w). Red lines indicate computational flow for differentiation of the Score Matching loss: computation of e.g. ∂J/∂δj and ∂J/∂gj. The influence of weights are not shown, for which the derivatives are computed in the last step. 3 Automatic differentiation of J(x; w) In most optimization methods for energy-based models [17], the sample loss is defined in readily obtainable quantities obtained by forward inference in the model. In such situations, the required derivatives w.r.t. the weights can be obtained in a straightforward and efficient fashion by standard application of the backpropagation algorithm. For Score Matching, the situation is more complex since the (regularized) loss (equations 2,7) is defined in terms of {∂E/∂xi} and {∂2E/(∂xi)2}, each term being some function of x and w. In earlier publications on Score Matching for continuous variables [10, 12, 13, 15], the authors rewrote {∂E/∂xi} and {∂2E/(∂xi)2} to their explicit forms in terms of x and w by manually differentiating the energy2. Subsequently, derivatives of the loss w.r.t. the weights can be found. This manual differentiation was repeated for different models, and is arguably a rather inflexible approach. A procedure that could automatically (1) compute and (2) differentiate the loss would make SM estimation more accessible and flexible in practice. A large class of models (e.g. ICA, Product-of-Experts and Fields-of-Experts), can be interpreted as a form of feed-forward neural network. Consequently, the terms {∂E/∂xi} and {∂2E/(∂xi)2} can be efficiently computed using a forward and backward pass: the first pass performs forward inference (computation of E(x; w)) and the second pass applies the backpropagation algorithm [3] to obtain the derivatives of the energy w.r.t. the data point ({∂E/∂xi} and {∂2E/(∂xi)2}). However, only the loss J(x; w) is obtained by these two steps. For differentiation of this loss, one must perform an additional forward and backward pass. 3.1 Obtaining the loss Consider a feed-forward neural network with input vector x and weights w and an ordered set of nodes indexed 1 . . . N, each node j with child nodes i ∈children(j) with j < i and parent nodes k ∈parents(j) with k < j. The first D < N nodes are input nodes, for which the activation value is gj = xj. For the other nodes (hidden units and output unit), the activation value is determined by a differentiable scalar function gj({gi}i∈parents(j), w). The network’s “output” (energy) is determined as the activation of the last node: E(x; w) = gN(.). The values δj = ∂E/∂gj are efficiently computed by backpropagation. However, backpropagation of the full Hessian scales like O(W 2), where W is the number of model weights. Here, we limit backpropagation to the diagonal approximation which scales like O(W) [1]. This will still result in the correct gradients ∂2E/(∂xj)2 for one-layer models and the models considered in this paper. Rewriting the equations for the full Hessian is a straightforward exercise. For brevity, we write δ′ j = ∂2E/(∂gj)2. The SM loss is split in two terms: J(x; w) = K + L with K = 1 2 PD j=1 δ2 j and L = PD j=1 −δ′ j + λ(δ′ j)2. The equations for inference and backpropagation are given as the first two for-loops in Algorithm 1. 2Most previous publications do not express unnormalized neg. log-density as “energy” 4 Input: x, w (data and weight vectors) for j ←D + 1 to N do // Forward propagation compute gj(.) for i ∈parents(j) do compute ∂gj ∂gi , ∂2gj (∂gi)2 , ∂3gj (∂gi)3 δN ←1, δ′ N ←0 for j ←N −1 to 1 do // Backpropagation δj ←P k∈children(j) δk ∂gk ∂gj δ′ j ←P k∈children(j) δk ∂2gk (∂gj)2 + δ′ k  ∂gk ∂gj 2 for j ←1 to D do ∂K ∂δj ←δj; ∂L ∂δj ←0; ∂L ∂δ′ j ←−1 + 2λδ′ j for j ←D + 1 to N do // SM Forward propagation ∂K ∂δj ←P i∈parents(j) ∂K ∂δi ∂gj ∂gi ∂L ∂δj ←P i∈parents(j) ∂L ∂δ′ i ∂2gj (∂gi)2 + ∂L ∂δi ∂gj ∂gi ∂L ∂δ′ j ←P i∈parents(j) ∂L ∂δ′ i  ∂gj ∂gi 2 for j ←N to D + 1 do // SM Backward propagation ∂K ∂gj ←P k∈children(j) ∂K ∂gk ∂gk ∂gj + ∂K ∂δj δk ∂2gk (∂gj)2 ∂L ∂gj ←P k∈children(j) ∂L ∂gk ∂gk ∂gj + ∂L ∂δj δk ∂2gk (∂gj)2 + 2 ∂L ∂δ′ j δ′ k ∂gk ∂gj ∂2gk (∂gj)2 + ∂L ∂δ′ j δk ∂3gk (∂gj)3 for w ∈w do // Derivatives wrt weights ∂J ∂w ←PN j=D+1 ∂K ∂gj ∂gj ∂w + ∂L ∂gj ∂gj ∂w + ∂K ∂δj ∂δj ∂w + ∂L ∂δj ∂δj ∂w + ∂L ∂δ′ j ∂δ′ j ∂w Algorithm 1: Compute ∇wJ. See sections 3.1 and 3.2 for context. 3.2 Differentiating the loss Since the computation of the loss J(x; w) is performed by a deterministic forward-backward mechanism, this two-step computation can be interpreted as a combination of two networks: the original network for computing {gj} and E(x; w), and an appended network for computing {δj}, {δ′ j} and eventually J(x; w). See figure 1. The combined network can be differentiated by an extended version of the double-backpropagation procedure [5], with the main difference that the appended network not only computes {δj}, but also {δ′ j}. Automatic differentiation of the combined network consists of two phases, corresponding to reverse traversal of the appended and original network respectively: (1) obtaining ∂K/∂δj, ∂L/∂δj and ∂L/∂δ′ j for each node j in order 1 to N; (2) obtaining ∂J/∂gj for each node j in order N to D + 1. These procedures are given as the last two for-loops in Algorithm 1. The complete algorithm scales like O(W). 4 Experiments Consider the following Product-of-Experts (PoE) model: E(x; W, α) = M X i=1 αig(wT i x) (8) where M is the number of experts, wi is an image filter and the i-th row of W and αi are scaling parameters. Like in [10], the filters are L2 normalized to prevent a large portion from vanishing.We use a slightly modified Student’s t-distribution (g(z) = log((cz)2/2 + 1)) for latent space, so this is also a Product of Student’s t-distribution model [24]. The parameter c is a non-learnable horizontal scaling parameter, set to e1.5. The vertical scaling parameters αi are restricted to positive, by setting αi = exp βi where βi is the actual weight. 5 4.1 MNIST The first task is to estimate a density model of the MNIST handwritten digits [16]. Since a large number of models need to be learned, a 2× downsampled version of MNIST was used. The MNIST dataset is highly non-smooth: for each pixel, the extreme values (0 and 1) are highly frequent leading to sharp discontinuities in the data density at these points. It is well known that for models with square weight matrix W, normalized g(.) (meaning R ∞ −∞exp(−g(x))dx = 1) and αi = 1, the normalizing constant can be computed [10]: Z(w) = | det W|. For this special case, models can be compared by computing the log-likelihood for the training- and test set. Unregularized, and regularized models for different choices of λ were estimated and log-likelihood values were computed. Subsequently, these models were compared on a classification task. For each MNIST digit class, a small sample of 100 data points was converted to internal features by different models. These features, combined with the original class label, were subsequently used to train a logistic regression classifier for each model. For the PoE model, the “activations” g(wT i x) were used as features. Classification error on the test set was compared against reported results for optimal RBM and SESM models [20]. Results. As expected, unregularized estimation did not result in an accurate model. Figure 2 shows how the log-likelihood of the train- and test set is optimal at λ∗≈0.01, and decreases for smaller λ. Coincidentally, the classification performance is optimal for the same choice of λ. 4.2 Denoising Consider grayscale natural image data from the Berkeley dataset [18]. The data quantized and therefore non-smooth, so regularization is potentially beneficial. In order to estimate the correct regularization magnitude, we again esimated a PoE model as in equation (8) with square W, such that Z(w) = | det W| and computed the log-likelihood of 10.000 random patches under different regularization levels. We found that λ∗≈10−5 for maximum likelihood (see figure 2d). This value is lower than for MNIST data since natural image data is “less unsmooth”. Subsequently, a convolutional PoE model known as Fields-of-Experts [21] (FoE) was estimated using regularized SM: E(x; W, α) = X p M X i=1 αig(wT i x(p)) (9) where p runs over image positions, and x(p) is a square image patch at p. The first model has the same architecture as the CD-1 trained model in [21]: 5 × 5 receptive fields, 24 experts (M = 24), and αi and g(.) as in our PoE model. Note that qualitative results of a similar model estimated with SM have been reported earlier [15]. We found that for best performance, the model is learned on images “whitened” with a 5 × 5 Laplacian kernel. This is approximately equivalent to ZCA whitening used in [15]. Models are evaluated by means of Bayesian denoising using maximum a posteriori (MAP) estimation. As in a general Bayesian image restoration framework, the goal is to estimate the original input x given a noisy image y using the Bayesian proportionality p(x|y) ∝p(y|x)p(x). The assumption is white Gaussian noise such that the likelihood is p(y|x) ∼N(0, σ2I). The model E(x; w) = −log p(x; w) −Z(w) is our prior. The gradient of the log-posterior is: ∇x log p(x|y) = −∇xE(x; w) + 1 2σ2 ∇x N X i=1 (yi −xi)2 (10) Denoising is performed by initializing x to a noise image, and 300 subsequent steps of steepest descent according to x′ ←x+α∇x log p(x|y), with α annealed from 2·10−2 to 5·10−4. For comparison, we ran the same denoising procedure with models estimated by CD-1 and Basis Rotation, from [21] and [23] respectively. Note that the CD-1 model is trained using PCA whitening. The CD-1 model has been extensively applied to denoising before [21] and shown to compare favourably to specialized denoising methods. Results. Training of the convolutional model took about 1 hour on a 2Ghz machine. Regularization turns out to be important for optimal denoising (see figure 2[e-g]). See table 1 for denoising performance of the optimal model for specific standard images. Our model performed significantly better 6 (a) 0 50 100 150 200 250 0.01 0.02 0.03 log-likelihood (avg.) λ test training (b) 8.5 9 9.5 10 10.5 11 11.5 12 12.5 0.01 0.02 0.03 classification error (%) λ Reg. SM RBM SESM (c) -3200 -3100 -3000 -2900 -2800 -6.5 -6 -5.5 -5 -4.5 log-likelihood (avg.) log10 λ Log-l. of image patches (d) 48 48.2 48.4 48.6 48.8 -7 -6 -5 -4 -3 -2 denoised PSNR log10 λ σnoise=1/256 (e) 34 34.5 35 35.5 36 36.5 -7 -6 -5 -4 -3 -2 log10 λ σnoise=5/256 (f) 26 27 28 29 30 -7 -6 -5 -4 -3 -2 log10 λ σnoise=15/256 (g) (h) (i) (j) (k) (l) (m) (n) (o) (p) (q) Figure 2: (a) Top: selection of downsampled MNIST datapoints. Middle and bottom: random sample of filters from unregularized and regularized (λ = 0.01) models, respectively. (b) Average log-likelihood of MNIST digits in training- and test sets for choices of λ. Note that λ∗≈0.01, both for maximum likelihood and optimal classification. (c) Test set error of a logistic regression classifier learned on top of features, with only 100 samples per class, for different choices of λ. Optimal error rates of SESM and RBM (figure 1a in [20]) are shown for comparison. (d) Log-likelihood of 10.000 random natural image patches for complete model, for different choices of λ. (e-g) PSNR of 500 denoised images, for different levels of noise and choices of λ. Note that λ∗≈10−5, both for maximum likelihood and best denoising performance. (h) Some natural images from the Berkeley dataset. (i) Filters of model with 5 × 5 × 24 weights learned with CD-1 [21], (j) filters of our model with 5 × 5 × 24 weights, (k) random selection of filters from the Basis Rotation [23] model with 15 × 15 × 25 weights, (l) random selection of filters from our model with 8 × 8 × 64 weights. (m) Detail of original Lena image. (n) Detail with noise added (σnoise = 5/256). (o) Denoised with model learned with CD-1 [21], (p) Basis Rotation [23], (q) and Score Matching with (near) optimal regularization. 7 than the Basis Rotation model and slightly better than the CD-1 model. As reported earlier in [15], we can verify that the filters are completely intuitive (Gabor filters with different phase, orientation and scale) unlike the filters of CD-1 and Basis Rotation models (see figure 2[i-l]). Table 1: Peak signal-to-noise ratio (PSNR) of denoised images with σnoise = 5/256. Shown errors are aggregated over different noisy images. Image CD-1 Basis Rotation Our model Weights (5 × 5) × 24 (15 × 15) × 25 (5 × 5) × 24 Barbara 37.30±0.01 37.08±0.02 37.31±0.01 Peppers 37.63±0.01 37.09±0.02 37.41±0.03 House 37.85±0.02 37.73±0.03 38.03±0.04 Lena 38.16±0.02 37.97±0.01 38.19±0.01 Boat 36.33±0.01 36.21±0.01 36.53±0.01 4.3 Super-resolution In addition, models are compared with respect to their performance on a simple version of superresolution as follows. An original image xorig is sampled down to image xsmall by averaging blocks of 2 × 2 pixels into a single pixel. A first approximation x is computed by linearly scaling up xsmall and subsequent application of a low-pass filter to remove false high frequency information. The image is than fine-tuned by 200 repetitions of two subsequent steps: (1) refining the image slightly using x′ ←x + α∇xE(x; w) with α annealed from 2 · 10−2 to 5 · 10−4 ; (2) updating each k × k block of pixels such that their average corresponds to the down-sampled value. Note: the simple block-downsampling results in serious aliasing artifacts in the Barbara image, so the Castle image is used instead. Results. PSNR values for standard images are shown in table 2. The considered models made give slight improvements in terms of PSNR over the initial solution with low pass filter. Still, our model did slightly better than the CD-1 and Basis Rotation models. Table 2: Peak signal-to-noise ratio (PSNR) of super-resolved images for different models. Image Low pass filter CD-1 Basis Rotation Our model Weights (5 × 5) × 24 (15 × 15) × 25 (5 × 5) × 24 Peppers 27.54 29.11 27.69 29.76 House 33.15 33.53 33.41 33.48 Lena 32.39 33.31 33.07 33.46 Boat 29.20 30.81 30.77 30.82 Castle 24.19 24.15 24.26 24.31 5 Conclusion We have shown how the addition of a principled regularization term to the expression of the Score Matching loss lifts continuity assumptions on the data density, such that the estimation method becomes more generally applicable. The effectiveness of the regularizer was verified with the discontinuous MNIST and Berkeley datasets, with respect to likelihood of test data in the model. For both datasets, the optimal regularization parameter is approximately equal for both likelihood and subsequent classification and denoising tasks. In addition, we showed how computation and differentiation of the Score Matching loss can be automated using an efficient algorithm. 8 References [1] S. Becker and Y. LeCun. Improving the convergence of back-propagation learning with second-order methods. In D. Touretzky, G. Hinton, and T. Sejnowski, editors, Proc. of the 1988 Connectionist Models Summer School, pages 29–37, San Mateo, 1989. Morgan Kaufman. [2] C. M. Bishop. Neural networks for pattern recognition. Oxford University Press, Oxford, UK, 1996. [3] A. E. Bryson and Y. C. Ho. Applied optimal control; optimization, estimation, and control. Blaisdell Pub. Co. Waltham, Massachusetts, 1969. [4] M. A. Carreira-Perpinan and G. E. Hinton. On contrastive divergence learning. In Artificial Intelligence and Statistics, 2005. [5] H. Drucker and Y. LeCun. Improving generalization performance using double backpropagation. IEEE Transactions on Neural Networks, 3(6):991–997, 1992. [6] M. Gutmann and A. Hyv¨arinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Proc. Int. Conf. on Artificial Intelligence and Statistics (AISTATS2010), 2010. [7] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14:2002, 2000. [8] G. E. Hinton, S. Osindero, and Y. W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [9] G. E. Hinton, S. Osindero, M. Welling, and Y. W. Teh. Unsupervised discovery of non-linear structure using contrastive backpropagation. Cognitive Science, 30(4):725–731, 2006. [10] A. Hyv¨arinen. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6:695–709, 2005. [11] A. Hyv¨arinen. Some extensions of score matching. Computational Statistics & Data Analysis, 51(5):2499–2512, 2007. [12] A. Hyv¨arinen. Optimal approximation of signal priors. Neural Computation, 20:3087–3110, 2008. [13] U. K¨oster and A. Hyv¨arinen. A two-layer ica-like model estimated by score matching. In J. M. de S´a, L. A. Alexandre, W. Duch, and D. P. Mandic, editors, ICANN (2), volume 4669 of Lecture Notes in Computer Science, pages 798–807. Springer, 2007. [14] U. Koster, J. T. Lindgren, and A. Hyv¨arinen. Estimating markov random field potentials for natural images. Proc. Int. Conf. on Independent Component Analysis and Blind Source Separation (ICA2009), 2009. [15] U. K¨oster, J. T. Lindgren, and A. Hyv¨arinen. Estimating markov random field potentials for natural images. In T. Adali, C. Jutten, J. M. T. Romano, and A. K. Barros, editors, ICA, volume 5441 of Lecture Notes in Computer Science, pages 515–522. Springer, 2009. [16] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, pages 2278–2324, 1998. [17] Y. LeCun, S. Chopra, R. Hadsell, M. Ranzato, and F. Huang. A tutorial on energy-based learning. In G. Bakir, T. Hofman, B. Sch¨olkopf, A. Smola, and B. Taskar, editors, Predicting Structured Data. MIT Press, 2006. [18] 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 Proc. 8th Int’l Conf. Computer Vision, volume 2, pages 416–423, July 2001. [19] S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of markov random fields. In J. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 1121–1128. MIT Press, Cambridge, MA, 2008. [20] M. Ranzato, Y. Boureau, and Y. LeCun. Sparse feature learning for deep belief networks. In Advances in Neural Information Processing Systems (NIPS 2007), 2007. [21] S. Roth and M. J. Black. Fields of experts. International Journal of Computer Vision, 82(2):205–229, 2009. [22] A. N. Tikhonov. On the stability of inverse problems. Dokl. Akad. Nauk SSSR, (39):176–179, 1943. [23] Y. Weiss and W. T. Freeman. What makes a good model of natural images. In CVPR 2007: Proceedings of the 2007 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, IEEE Computer Society, pages 1–8, 2007. [24] M. Welling, G. E. Hinton, and S. Osindero. Learning sparse topographic representations with products of student-t distributions. In S. T. S. Becker and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 1359–1366. MIT Press, Cambridge, MA, 2003. 9
2010
139
3,898
Estimating Spatial Layout of Rooms using Volumetric Reasoning about Objects and Surfaces David C. Lee, Abhinav Gupta, Martial Hebert, Takeo Kanade Carnegie Mellon University {dclee,abhinavg,hebert,tk}@cs.cmu.edu Abstract There has been a recent push in extraction of 3D spatial layout of scenes. However, none of these approaches model the 3D interaction between objects and the spatial layout. In this paper, we argue for a parametric representation of objects in 3D, which allows us to incorporate volumetric constraints of the physical world. We show that augmenting current structured prediction techniques with volumetric reasoning significantly improves the performance of the state-of-the-art. 1 Introduction Consider the indoor image shown in Figure 1. Understanding such a complex scene not only involves visual recognition of objects but also requires extracting the 3D spatial layout of the room (ceiling, floor and walls). Extraction of the spatial layout of a room provides crucial geometric context required for visual recognition. There has been a recent push to extract spatial layout of the room by classifiers which predict qualitative surface orientation labels (floor, ceiling, left, right, center wall and object) from appearance features and then fit a parametric model of the room. However, such an approach is limited in that it does not use the additional information conveyed by the configuration of objects in the room and, therefore, it fails to use all of the available cues for estimating the spatial layout. In this paper, we propose to incorporate an explicit volumetric representation of objects in 3D for spatial interpretation process. Unlike previous approaches which model objects by their projection in the image plane, we propose a parametric representation of the 3D volumes occupied by objects in the scene. We show that such a parametric representation of the volume occupied by an object can provide crucial evidence for estimating the spatial layout of the rooms. This evidence comes from volumetric reasoning between the objects in the room and the spatial layout of the room. We propose to augment the existing structured classification approaches with volumetric reasoning in 3D for extracting the spatial layout of the room. Figure 1 shows an example of a case where volumetric reasoning is crucial in estimating the surface layout of the room. Figure 1(b) shows the estimated spatial layout for the room (overlaid on surface orientation labels predicted by a classifier) when no reasoning about the objects is performed. In this case, the couch is predicted as floor and therefore there is substantial error in estimating the spatial layout. If the couch is predicted as clutter and the image evidence from the couch is ignored (Figure 1(c)), multiple room hypotheses can be selected based on the predicted labels of the pixels on the wall (Figure 1(d)) and there is still not enough evidence in the image to select one hypothesis over another in a confident manner. However, if we represent the object by a 3D parametric model, such as a cuboid (Figure 1(e)), then simple volumetric reasoning (the 3D volume occupied by the couch should be contained in the free space of the room) can help us reject physically invalid hypotheses and estimate the correct layout of the room by pushing the walls to completely contain the cuboid (Figure 1(f)). In this paper, we propose a method to perform volumetric reasoning by combining classical constrained search techniques and current structured prediction techniques. We show that the resulting 1 Object pushes wall (a) Input image (b) Spatial layout without object reasoning (c) Object removed (d) Spatial layout with 2D object reasoning (e) Object fitted with parametric model (f) Spatial layout with 3D volumetric reasoning Figure 1: (a) Input image. (b) Estimate of the spatial layout of the room without object reasoning. Colors represent the output of the surface geometry by [8]. Green: floor, red: left wall, yellow: center wall, cyan: right wall. (c) Evidence from object region removed. (d) Spatial layout with 2D object reasoning. (e) Object fitted with 3D parametric model. (f) Spatial layout with 3D volumetric reasoning. The wall is pushed by the volume occupied by the object. approach leads to substantially improved performance on standard datasets with the added benefit of a more complete scene description that includes objects in addition to surface layout. 1.1 Background The goal of extracting 3D geometry by using geometric relationships between objects dates back to the start of computer vision around four decades ago. In the early days of computer vision, researchers extracted lines from “blockworld” scenes [1] and used geometric relationships using constraint satisfaction algorithms on junctions [2, 3]. However, the reasoning approaches used in these block world scenarios (synthetic line drawings) proved too brittle for the real-world images and could not handle the errors in extraction of line-segments or generalize to other shapes. In recent years, there has been renewed interest in extracting camera parameters and threedimensional structures in restricted domains such as Manhattan Worlds [4]. Kosecka et al. [5] developed a method to recover vanishing points and camera parameters from a single image by using line segments found in Manhattan structures. Using the recovered vanishing points, rectangular surfaces aligned with major orientations were also detected by [6]. However, these approaches are only concerned with dominant directions in the 3D world and do not attempt extract three dimensional information of the room and the objects in the room. Yu et al. [7] inferred the relative depth-order of rectangular surfaces by considering their relationship. However, this method only provides depth cues of partial rectangular regions in the image and not the entire scene. There has been a recent series of methods related to our work that attempt to model geometric scene structure from a single image, including geometric label classification [8, 9] and finding vertical/ground fold-lines [10]. Lee et al. [11] introduced parameterized models of indoor environments, constrained by rules inspired by blockworld to guarantee physical validity. However, since this approach samples possible spatial layout hypothesis without clutter, it is prone to errors caused by the occlusion and tend to fit rooms in which the walls coincide with the object surfaces. A recent paper by Hedau et al. [12] uses an appearance based clutter classifier and computes visual features only from the regions classified as “non-clutter”, while parameterizing the 3D structure of the scene by a box. They use structured approaches to estimate the best fitting room box to the image. A similar approach has been used by Wang et al. [13] which does not require the ground truth lables of clutter. In these methods, however, the modeling of interactions between clutter and spatial-layout of the room is only done in the image plane and the 3D interactions between room and clutter are not considered. 2 In a work concurrent to ours, Hedau et al. [14] have also modeled objects as three dimensional cuboids and considered the volumetric intersection with the room structure. The goal of their work differs from ours. Their primary goal is to improve object detection, such as beds, by using information of scene geometry, whereas our goal is to improve scene understanding by proposing a control structure that incorporates volumetric constraints. Therefore, we are able to improve the estimate of the room by estimating the objects and vice versa, whereas in their work information flows in only one direction (from scene to objects). In a very recent work by Gupta et al. [15], qualitative reasoning of scene geometry was done by modeling objects as “blocks” for outdoor scenes. In contrast, we use stronger parameteric models for rooms and objects in indoor scenes, which are more structured, that allows us to do more explicit and exact 3D volumetric reasoning. 2 Overview Our goal is to jointly extract the spatial layout of the room and the configuration of objects in the scene. We model the spatial layout of the room by 3D boxes and we model the objects as solids which occupy 3D volumes in the free space defined by the room walls. Given a set of room hypotheses and object hypotheses, our goal is to search the space of scene configurations and select the configuration that best matches the local surface geometry estimated from image cues and satisfies the volumetric constraints of the physical world. These constraints (shown in Figure 3(i)) are: • Finite volume: Every object in the world should have a non-zero finite volume. • Spatial exclusion: The objects are assumed to be solid objects which cannot intersect. Therefore, the volumes occupied by different object are mutually exclusive. This implies that the volumetric intersection between two objects should be empty. • Containment: Every object should be contained in the free space defined by the walls of the room (i.e, none of the objects should be outside the room walls). Our approach is illustrated in Figure 2. We first extract line segments and estimate three mutually orthogonal vanishing points (Figure 2(b)). The vanishing points define the orientation of the major surfaces in the scene [6, 11, 12] and hence constrain the layout of ceilings, floor and walls of the room. Using the line segments labeled by their orientations, we then generate multiple hypotheses for rooms and objects (Figure 2(e)(f)). A hypothesis of a room is a 3D parametric representation of the layout of major surfaces of the scene, such as floor, left wall, center wall, right wall, and ceiling. A hypothesis of an object is a 3D parametric representation of an object in the scene, approximated as a cuboid. The room and cuboid hypotheses are then combined to form the set of possible configurations of the entire scene (Figure 2(h)). The configuration of the entire scene is represented as one sample of the room hypothesis along with some subset of object hypotheses. The number of possible scene configurations is exponential in the number of object hypotheses 1. However, not all cuboid and room subsets are compatible with each other. We use simple 3D spatial reasoning to enforce the volumetric constraints described above (See Figure 2(g)). We therefore test each room-object pair and each object-object pair for their 3D volumetric compatibility, so that we allow only the scene configurations which have no room-object and no object-object volumetric intersection. Finally, we evaluate the scene configurations created by combinations of room hypotheses and object hypotheses to find the scene configuration that best matches the image (Figure 2(i)). As the scene configuration is a structured variable, we use a variant of the structured prediction algorithm [16] to learn the cost function. We use two sources of surface geometry, orientation map [11] and geometric context [8], which serve as features in the cost function. Since it is computationally expensive to test exhaustive combinations of scene configurations in practice, we use beam-search to sample the scene configurations that are volumetrically-compatible (Section 5.1). 3 Estimating Surface Geometry We would like to predict the local surface geometry of the regions in the image. A scene configuration should satisfy local surface geometry extracted from image cues and should satisfy the 3D 1O(n · 2m) where n is the number of room hypotheses and m is the number of object hypotheses 3 (a) Input image (b) Line segments and Vanishing points (e) Room hypotheses (f) Cube hypotheses (d) Orientation map (c) Geometric context (h) Scene configuration hypotheses (g) Reject invalid configurations (i) Evaluate (j) Final scene configuration Figure 2: Overview of our approach for estimating the spatial layout of the room and the objects. volumetric constraints. The estimated surface geometry is therefore used as features in a scoring function that evaluates a given scene configuration. For estimating surface geometry we use two methods: the line-sweeping algorithm [11] and a multiple segmentation classifier [8]. The line-sweeping algorithm takes line segments as input and predicts an orientation map in which regions are classified as surfaces into one of the three possible orientations. Figure 2(d) shows an example of an orientation map. The region estimated as horizontal surface is colored in red, and vertical surfaces are colored in green and blue, corresponding to the associated vanishing point. This orientation map is used to evaluate scene configuration hypotheses. The multiple segmentation classifier [8] takes the full image as input, uses image features, such as combinations of color and texture, and predicts geometric context represented by surface geometry labels for each superpixel (floor, ceiling, vertical (left, center, right), solid, and porous regions). Similar to orientation maps, the predicted labels are used to evaluate scene configuration hypotheses. 4 Generating Scene Configuration Hypothesis Given the local surface geometry and the oriented line segments extracted from the image, we now create multiple hypotheses for possible spatial layout of the room and object layout in the room. These hypotheses are then combined to produce scene configuration layout such that all the objects occupy exclusive 3D volumes and the objects are inside the freespace of the room defined by the walls. 4.1 Generating Room Hypotheses A room hypothesis encodes the position and orientation of walls, floor, and ceiling. In this paper, we represent a room hypothesis by a parametric box model [12]. Room hypotheses are generated from line segments in a way similar to the method described in Lee et al. [11]. They examine exhaustive combinations of line segments and check which of the resulting combinations define physically valid room models. Instead, we sample random tuples of line segments lines that define the boundaries of the parametric box. Only the minimum number of line segments to define the parametric room model are sampled. Figure 2(e) shows examples of generated room hypotheses. 4 Convex edge (a) Image (b) Orientation Map (c) Convex Edge Check (d) Hypothesized Cuboid (ii) Object Hypothesis Generation (a) Containment Constraint (b) Spatial Exclusion Constraint (i) Volumetric Constraints Figure 3: (i) Examples of volumetric constraint violation. (ii) Object hypothesis generation: we use the orientation maps to generate object hypotheses by finding convex edges. 4.2 Generating Object Hypotheses Our goal is to extract the 3D geometry of the clutter objects to perform 3D spatial reasoning. Estimating precise 3D models of objects from a single image is an extremely difficult problem and probably requires recognition of object classes such as couches and tables. However, our goal is to perform coarse 3D reasoning about the spatial layout of rooms and spatial layout of objects in the room. We only need to model a subset of objects in the scene to provide enough constraints for volumetric reasoning. Therefore, we adopt a coarse 3D model of objects in the scene and model each object-volume as cuboids. We found that parameterizing objects as cuboids provides a good approximation to the occupied volume in man-made environments. Furthermore, by modeling objects by a parametric model of a cuboid, we can determine the location and dimensions in 3D up to scale, which allows volumetric reasoning about the 3D interaction between objects and the room. We generate object hypotheses from the orientation map described above. Figure 3(ii)(a)(b) shows an example scene and its orientation map. The three colors represent the three possible plane orientations used in the orientation map. We can see from the figure that the distribution of surfaces on the objects estimated by the orientation map suggests the presence of a cuboidal object. Figure 3(ii)(c) shows a pair of regions which can potentially form a convex edge if the regions represent the visible surfaces on a cuboidal object. We test all pairs of regions in the orientation map to check whether they can form convex edges. This is achieved by checking the estimated orientation of the regions and the spatial location of the regions with respect to the vanishing points. If the region pair can form a convex corner, we utilize these regions to form an object hypothesis. To generate a cuboidal object hypothesis from pairs of regions, we first fit tight bounding quadrilaterals (Figure 3(ii)(c)) to each region in the pair and then sample all combinations of three points out of the eight vertices on the two quadrilaterals, which do not lie on a plane. Three is the minimum number of points (with (x, y) coordinates) that have enough information to define a cuboid projected onto a 2D image plane, which has five degrees of freedom. We can then hypothesize a cuboid, whose corner best apprximates the three points. Figure 3(ii)(d) shows a sample of a cuboidal object hypothesis generated from the given orientation map. 4.3 Volumetric Compatibility of Scene Configuration Given a room configuration and a set of candidate objects, a key operation is to evaluate whether the resulting combination satisfies the three fundamental volumetric compatibility constraints described in Section 2. The problem of estimating the three dimensional layout of a scene from a single image is inherently ambiguous because any measurement from a single image can only be determined up to scale. In order to test the volumetric compatibility of room-object hypotheses pairs and objectobject hypotheses pairs, we make the assumption that all objects rest on the floor. This assumption fixes the scale ambiguity between room and object hypotheses and allows us to reason about their 3D location. To test whether an object is contained within the free space of a room, we check whether the projection of the bottom surface of the object onto the image is completely contained within the projection of the floor surface of the room. If the projection of the bottom surface of the object is not completely 5 within the floor surface, the corresponding 3D object model must be protruding into the walls of the room. Figure 3(i)(a) shows an example of an incompatible room-object pair. Similarly, to test whether the volume occupied by two objects is exclusive, we assume that the two objects rest on the same floor plane and we compare the projection of their bottom surfaces onto the image. If there is any overlap between the projections of the bottom surface of the two object hypotheses, that means that they occupy intersecting volumes in 3D. Figure 3(i)(b) shows an example of an incompatible object-object pair. 5 Evaluating Scene Configurations 5.1 Inference Given an image x, a set of room hypotheses {r1, r2, ..., rn}, and a set of object hypotheses {o1, o2, ..., om}, our goal is to find the best scene configuration y = (yr, yo), where yr = (y1 r, ..., yn r ), yo = (y1 o, ..., ym o ). yi r = 1 if room hypothesis ri is used in the scene configuration and yi r = 0 otherwise, and yi o = 1 if object hypothesis oi is present in the scene configuration and yi o = 0 otherwise. Note that P i yi r = 1 as only one room hypothesis is needed to define the scene configuration. Suppose that we are given a function f(x, y) that returns a score for y. Finding the best scene configuration y∗= arg maxy f(x, y) through testing all possible scene configurations requires n · 2m evaluations of the score function. We resort to using beam search (fixed width search tree) to keep the computation manageable by avoiding evaluating all scene configurations. In the first level of the search tree, scene configurations with a room hypothesis and no object hypothesis are evaluated. In the following levels, an object hypothesis is added to its parent configuration and the configuration is evaluated. The top kl nodes with the highest score are added to the search tree as the child node, where kl is a pre-determined beam width for level l.2 The search is continued for a fixed number of levels or until no cubes that are compatible with existing configurations can be added. After the search tree has been explored, the best scoring node in the tree is returned as the best scene configuration. 5.2 Learning the Score Function We set the score function to f(x, y) = wT ψ(x, y) + wT φ φ(y), where ψ(x, y) is a feature vector for a given image x and measures the compatibility of the scene configuration y with the estimated surface geometry. φ(y) is the penalty term for incompatible configurations and penalizes the room and object configurations which violate volumetric constraints. We use structured SVM [16] to learn the weight vector w. The weights are learned by solving min w,ξ 1 2 ∥w∥2 + C X i ξi s.t. wT ψ(xi, yi) −wT ψ(xi, y) −wT φ φ(y) ≥∆(yi, y) −ξi, ∀i, ∀y ξi ≥0, ∀i, where xi are images, yi are the ground truth configuration, ξi are slack variables, and ∆(yi, y) is the loss function that measures the error of configuration y. Tsochantaridis [16] deals with the large number of constraints by iteratively adding the most violated constraints. We simplify this by sampling a fixed number of configurations per each training image, using the same beam search process used for inference, and solving using quadratic programming. Loss Function: The loss function ∆(yi, y) is the percentage of pixels in the entire image having incorrect label. For example, pixels that are labeled as left wall when they actually belong to the center wall, or pixels labeled as object when they actually belong to the floor would be counted as incorrectly labeled pixels. A wall is labeled as center if the surface normal is within 45 degrees from the camera optical axis and labeled as left or right, otherwise. Feature Vector: The feature vector ψ(x, y) is computed by measuring how well each surface in the scene configuration y is supported by the orientation map and the geometric context. A feature 2We set kl to (100, 5, 2, 1), with a maximum of 4 levels. The results were not sensitive to these parameters. 6 Input image Room only Room and objects Orientation map Geometric context Figure 4: Two qualitative examples showing how 3D volumetric reasoning aids estimation of the spatial layout of the room. OM+GC OM GC No object reasoning 18.6% 24.7% 22.7% Volumetric reasoning 16.2% 19.5% 20.2% Table 1: Percentage of pixels with correct estimate of room surfaces. First row performs no reasoning about objects. Second row is our approach with 3D volumetric reasoning of objects. Columns shows the features that are used. OM: Orientation map from [11]. GC: Geometric context from [8]. is computed for each of the six surfaces in the scene configuration (floor, left wall, center wall, right wall, ceiling, object) as the relative area which the orientation map or the geometric context correctly explains the attribute of the surface. This results in a twelve dimensional feature vector for a given scene configuration. For example, the feature for the floor surface in the scene configuration is computed by the relative area which the orientation map predicts a horizontal surface, and the area which the geometric context predicts a floor label. Volumetric Penalty: The penalty term φ(y) measures how much the volumetric constraints are violated. (1) The first term φ(yr, yo) measures the volumetric intersection between the volume defined by room walls and objects. It penalizes the configurations where the object hypothesis lie outside the room volume and the penalty is proportional to the volume outside the room. (2) The second term P i,j φ(yi o, yj o) measures the volume intersection between two objects (i, j). This penalty from this term is proportional to the overlap of the cubes projected on the floor. 6 Experimental Results We evaluated our 3D geometric reasoning approach on an indoor image dataset introduced in [12]. The dataset consists of 314 images, and the ground-truth consists of the marked spatial layout of the room and the clutter layouts. For our experiments, we use the same training-test split as used in [12] (209 training and 105 test images). We use training images to estimate the weight vector. Qualitative Evaluation: Figure 4 illustrates the benefit of 3D spatial reasoning introduced in our approach. If no 3D clutter reasoning is used and the room box is fitted to the orientation map and geometric context, the box gets fit to the object surfaces and therefore leads to substantial error in the spatial layout estimation. However, if we use 3D object reasoning walls get pushed due to the containment constraint and the spatial layout estimation improves. We can also see from the examples that extracting a subset of objects in the scene is enough for reasoning and improving the spatial layout estimation. Figure 5 and 6 shows more examples of the spatial layout and the estimated clutter objects in the images. Additional results are in the supplementary material. Quantitative Evaluation: We evaluate the performance of our approach in estimating the spatial layout of the room. We use the pixel-based measure introduced in [12] which counts the percentage of pixels on the room surfaces that disagree with the ground truth. For comparison, we employ the simple multiple segmentation classifier [8] and the recent approach introduced in [12] as baselines. The images in the dataset have significant clutter; therefore, simple classification based approaches with no clutter reasoning perform poorly and have an error of 26.5%. The state-of-the-art approach [12] which utilizes clutter reasoning in the image plane has an error of 21.2%. On the other hand, our 7 Figure 5: Additional examples to show the performance on a wide variety of scenes. Dotted lines represent the room estimate without object reasoning. Figure 6: Failure examples. The first two examples are the failure cases when the cuboids are either missed or estimated wrong. The last two failure cases are due to errors in vanishing point estimation. approach which uses a parametric model of clutter and simple 3D volumetric reasoning outperforms both the approaches and has an error of 16.2%. We also performed several experiments to measure the significance of each step and features in our approach. When we only use the surface layout estimates from [8] as features of the cost function, our approach has an error rate of 20.2% whereas using only orientation maps as features yields an error rate of 19.5%. We also tried several search techniques to search the space of hypotheses. With a greedy approach (best cube added at each iteration) to search the hypothesis space, we achieved an error rate of 19.2%, which shows that early commitment to partial configurations leads to error and search strategy that allows late commitment, such as beam search, should be used. 7 Conclusion In this paper, we have proposed the use of volumetric reasoning between objects and surfaces of room layout to recover the spatial layout of a scene. By parametrically representing the 3D volume of objects and rooms, we can apply constraints for volumetric reasoning, such as spatial exclusion and containment. Our experiments show that volumetric reasoning improves the estimate of the room layout and provides a richer interpretation about objects in the scene. The rich geometric information provided by our method can provide crucial information for object recognition and eventually aid in complete scene understanding. 8 Acknowledgements This research was supported by NSF Grant EEEC-0540865, ONR MURI Grant N00014-07-1-0747, NSF Grant IIS-0905402, and ONR Grant N000141010766. 8 References [1] L. Roberts. Machine perception of 3-d solids. In: PhD. Thesis. (1965) [2] A. Guzman. Decomposition of a visual scene into three dimensional bodies. In Proceedings of Fall Joint Computer Conference, 1968. [3] D. A. Waltz. Generating semantic descriptions from line drawings of scenes with shadows. Technical report, MIT, 1972. [4] J. Coughlan, and A. Yuille. Manhattan world: Compass direction from a single image by bayesian inference. In proc. ICCV, 1999. [5] J. Kosecka, and W. Zhang. Video Compass. In proc. ECCV, 2002. [6] J. Kosecka, and W. Zhang. Extraction, matching, and pose recovery based on dominant rectangular structures. CVIU, 2005. [7] S. Yu, H. Zhang, and J. Malik. Inferring Spatial Layout from A Single Image via Depth-Ordered Grouping. IEEE Computer Society Workshop on Perceptual Organization in Computer Vision, 2008 [8] D. Hoiem, A. Efros, and M. Hebert. Recovering surface layout from an image. IJCV, 75(1), 2007. [9] A. Saxena, M. Sun, and A. Ng. Make3d: Learning 3D scene structure from a single image. PAMI, 2008. [10] E. Delage, H. Lee, and A. Ng. A dynamic bayesian network model for autonomous 3D reconstruction from a single indoor image. CVPR, 2006. [11] D. Lee, M. Hebert, and T. Kanade. Geometric reasoning for single image structure recovery. In proc. CVPR, 2009. [12] V. Hedau, D. Hoiem, and D. Forsyth. Recovering the spatial layout of cluttered rooms. In proc. ICCV, 2009. [13] H. Wang, S. Gould, and D. Koller, Discriminative Learning with Latent Variables for Cluttered Indoor Scene Understanding. ECCV, 2010. [14] V. Hedau, D. Hoiem, and D. Forsyth. Thinking Inside the Box: Using Appearance Models and Context Based on Room Geometry. ECCV, 2010. [15] A. Gupta, A. Efros, and M. Hebert. Blocks World Revisited: Image Understanding using Qualitative Geometry and Mechanics. ECCV, 2010. [16] I. Tsochantaridis, T. Joachims, T. Hofmann and Y. Altun: Large Margin Methods for Structured and Interdependent Output Variables, JMLR, Vol. 6, pages 1453-1484, 2005 9
2010
14
3,899
Identifying Patients at Risk of Major Adverse Cardiovascular Events Using Symbolic Mismatch Zeeshan Syed University of Michigan Ann Arbor, MI 48109 zhs@eecs.umich.edu John Guttag Massachusetts Institute of Technology Cambridge, MA 02139 guttag@csail.mit.edu Abstract Cardiovascular disease is the leading cause of death globally, resulting in 17 million deaths each year. Despite the availability of various treatment options, existing techniques based upon conventional medical knowledge often fail to identify patients who might have benefited from more aggressive therapy. In this paper, we describe and evaluate a novel unsupervised machine learning approach for cardiac risk stratification. The key idea of our approach is to avoid specialized medical knowledge, and assess patient risk using symbolic mismatch, a new metric to assess similarity in long-term time-series activity. We hypothesize that high risk patients can be identified using symbolic mismatch, as individuals in a population with unusual long-term physiological activity. We describe related approaches that build on these ideas to provide improved medical decision making for patients who have recently suffered coronary attacks. We first describe how to compute the symbolic mismatch between pairs of long term electrocardiographic (ECG) signals. This algorithm maps the original signals into a symbolic domain, and provides a quantitative assessment of the difference between these symbolic representations of the original signals. We then show how this measure can be used with each of a one-class SVM, a nearest neighbor classifier, and hierarchical clustering to improve risk stratification. We evaluated our methods on a population of 686 cardiac patients with available long-term electrocardiographic data. In a univariate analysis, all of the methods provided a statistically significant association with the occurrence of a major adverse cardiac event in the next 90 days. In a multivariate analysis that incorporated the most widely used clinical risk variables, the nearest neighbor and hierarchical clustering approaches were able to statistically significantly distinguish patients with a roughly two-fold risk of suffering a major adverse cardiac event in the next 90 days. 1 Introduction In medicine, as in many other disciplines, decisions are often based upon a comparative analysis. Patients are given treatments that worked in the past on apparently similar conditions. When given simple data (e.g., demographics, comorbidities, and laboratory values) such comparisons are relatively straightforward. For more complex data, such as continuous long-term signals recorded during physiological monitoring, they are harder. Comparing such time-series is made challenging by three factors: the need to efficiently compare very long signals across a large number of patients, the need to deal with patient-specific differences, and the lack of a priori knowledge associating signals with long-term medical outcomes. In this paper, we exploit three different ideas to address these problems. 1 • We address the problems related to scale by abstracting the raw signal into a sequence of symbols, • We address the problems related to patient-specific differences by using a novel technique, symbolic mismatch, that allows us to compare sequences of symbols drawn from distinct alphabets. Symbolic mismatch compares long-term time-series by quantifying differences between the morphology and frequency of prototypical functional units, and • We address the problems related to lack of a priori knowledge using three different methods, each of which exploits the observation that high risk patients typically constitute a small minority in a population. In the remainder of this paper, we present our work in the context of risk stratification for cardiovascular disease. Cardiovascular disease is the leading cause of death globally and causes roughly 17 million deaths each year [3]. Despite improvements in survival rates, in the United States, one in four men and one in three women still die within a year of a recognized first heart attack [4]. This risk of death can be substantially lowered with an appropriate choice of treatment (e.g., drugs to lower cholesterol and blood pressure; operations such as coronary artery bypass graft; and medical devices such as implantable cardioverter defibrillators) [3]. However, matching patients with treatments that are appropriate for their risk has proven to be challenging [5,6]. That existing techniques based upon conventional medical knowledge have proven inadequate for risk stratification leads us to explore methods with few a priori assumptions. We focus, in particular, on identifying patients at elevated risk of major adverse cardiac events (death, myocardial infarction and severe recurrent ischemia) following coronary attacks. This work uses long-term ECG signals recorded during patient admission for ACS. These signals are routinely collected, potentially allowing for the work presented here to be deployed easily without imposing additional needs on patients, caregivers, or the healthcare infrastructure. Fortunately, only a minority of cardiac patients experience serious subsequent adverse cardiovascular events. For example, cardiac mortality over a 90 day period following acute coronary syndrome (ACS) was reported to be 1.79% for the SYMPHONY trial involving 14,970 patients [1] and 1.71% for the DISPERSE2 trial with 990 patients [2]. The rate of myocardial infarction (MI) over the same period for the two trials was 5.11% for the SYMPHONY trial and 3.54% for the DISPERSE2 trial. Our hypothesis is that these patients can be discovered as anomalies in the population, i.e., their physiological activity over long periods of time is dissimilar to the majority of the patients in the population. In contrast to algorithms that require labeled training data, we propose identifying these patients using unsupervised approaches based on three machine learning methods previously reported in the literature: one-class support vector machines (SVMs), nearest neighbor analysis, and hierarchical clustering. The main contributions of our work are: (1) we describe a novel unsupervised approach to cardiovascular risk stratification that is complementary to existing clinical approaches, (2) we explore the idea of similarity-based clinical risk stratification where patients are categorized in terms of their similarities rather than specific features based on prior knowledge, (3) we develop the hypothesis that patients at future risk of adverse outcomes can be detected using an unsupervised approach as outliers in a population, (4) we present symbolic mismatch, as a way to efficiently compare very long time-series without first reducing them to a set of features or requiring symbol registration across patients, and (5) we present a rigorous evaluation of unsupervised similarity-based risk stratification using long-term data from nearly 700 patients with detailed admissions and follow-up data. 2 Symbolic Mismatch We start by describing the process through which symbolic mismatch is measured on ECG signals. 2.1 Symbolization As a first step, the ECG signal zm for each patient m = 1, ..., n is symbolized using the technique proposed by [7]. To segment the ECG signal into beats, we use two open-source QRS detection algorithms [8,9]. QRS complexes are marked at locations where both algorithms agree. A variant of dynamic time-warping (DTW) [7] is then used to quantify differences in morphology between 2 beats. Using this information, beats with distinct morphologies are partitioned into groups, with each group assigned a unique label or symbol. This is done using a Max-Min iterative clustering algorithm that starts by choosing the first observation as the first centroid, c1, and initializes the set S of centroids to {c1}. During the i-th iteration, ci is chosen such that it maximizes the minimum difference between ci and observations in S: ci = arg max x/∈S min y∈S C(x, y) (1) where C(x, y) is the DTW difference between x and y. The set S is incremented at the end of each iteration such that S = S ∪ci. The number of clusters discovered by Max-Min clustering is chosen by iterating until the maximized minimum difference falls below a threshold θ. At this point, the set S comprises the centroids for the clustering process, and the final assignment of beats to clusters proceeds by matching each beat to its nearest centroid. Each set of beats assigned to a centroid constitutes a unique cluster. The final number of clusters, γ, obtained using this process depends on the separability of the underlying data. The overall effect of the DTW-based partitioning of beats is to transform the original raw ECG signal into a sequence of symbols, i.e., into a sequence of labels corresponding to the different beat morphology classes that occur in the signal. Our approach differs from the methods typically used to annotate ECG signals in two ways. First, we avoid using specialized knowledge to partition beats into known clinical classes. There is a set of generally accepted labels that cardiologists use to differentiate distinct kinds of heart beats. However, in many cases, finer distinctions than provided by these labels can be clinically relevant [7]. Our use of beat clustering rather than beat classification allows us to infer characteristic morphology classes that capture these finer-grained distinctions. Second, our approach does not involve extracting features (e.g., the length of the beat or the amplitude of the P wave) from individual beats. Instead, our clustering algorithm compares the entire raw morphology of pairs of beats. This approach is potentially advantageous, because it does not assume a priori knowledge about what aspects of a beat are most relevant. It can also be extended to other time-series data (e.g., blood pressure and respiration waveforms). 2.2 Measuring Mismatch in Symbolic Representations Denoting the set of symbol centroids for patient p as Sp and the set of frequencies with which these symbols occur in the electrocardiogram as Fp (for patient q an analogous representation is adopted), we define the symbolic mismatch between the long-term ECG time-series for patients p and q as: ψp,q = ∑ pi∈Sp ∑ qj∈Sq C(pi, qj)Fp[pi]Fq[qj] (2) where C(pi, qj) corresponds to the DTW cost of aligning the centroids of symbol classes pi and qj. Intuitively, the symbolic mismatch between patients p and q corresponds to an estimate of the expected difference in morphology between any two randomly chosen beats from these patients. The symbolic mismatch computation achieves this by weighting the difference between the centroids for every pair of symbols for the patients by the frequencies with which these symbols occur. An important feature of symbolic mismatch is that it avoids the need to set up a correspondence between the symbols of patients p and q. In contrast to cluster matching techniques [10,11] to compare data for two patients by first making an assignment from symbols in one patient to the other, symbolic mismatch does not require any cross-patient registration of symbols. Instead, it performs weighted morphologic comparisons between all symbol centroids for patients p and q. As a result, the symbolization process does not need to be restricted to well-defined labels and is able to use a richer set of patient-specific symbols that capture fine-grained activity over long periods. 2.3 Spectrum Clipping and Adaptation for Kernel-based Methods The formulation for symbolic mismatch in Equation 2 gives rise to a symmetric dissimilarity matrix. For methods that are unable to work directly from dissimilarities, this can be transformed into a similarity matrix using a generalized radial basis function. For both the dissimilarity and similarity case, however, symbolic mismatch can produce a matrix that is indefinite. This can be problematic 3 when using symbolic mismatch with kernel-based algorithms since the optimization problems become non-convex and the underlying theory is invalidated. In particular, kernel-based classification methods require Mercer’s condition to be satisfied by a positive semi-definite kernel matrix [12]. This creates the need to transform the symbolic mismatch matrix before it can be used as a kernel in these methods. We use spectrum clipping to generalize the use of symbolic mismatch for classification. This approach has been shown both theoretically and empirically to offer advantages over other strategies (e.g., spectrum flipping, spectrum shifting, spectrum squaring, and the use of indefinite kernels) [13]. The symmetric mismatch matrix Ψ has an eigenvalue decomposition: Ψ = U T ΛU (3) where U is an orthogonal matrix and Λ is a diagonal matrix of real eigenvalues: Λ = diag(λ1, ..., λn) (4) Spectrum clipping makes Ψ positive semi-definite by clipping all negative eigenvalues to zero. The modified positive semi-definite symbolic mismatch matrix is then given by: Ψclip = U T ΛclipU (5) where: Λclip = diag(max(λ1, 0), ..., max(λn, 0)) (6) Using Ψclip as a kernel matrix is then equivalent to using (Λclip)1/2ui as the i-th training sample. Though we introduce spectrum clipping mainly for the purpose of broadening the applicability of symbolic mismatch to kernel-based methods, this approach offers additional advantages. When the negative eigenvalues of the similarity matrix are caused by noise, one can view spectrum clipping as a denoising step [14]. The results of our experiments, presented later in this paper, support the view of spectrum clipping being useful in a broader context. 3 Risk Stratification Using Symbolic Mismatch We now sketch three different approaches using symbolic mismatch to identify high risk patients in a population. The following two sections contain an empirical evaluation of each. The first approach uses a one-class SVM and a symbolic mismatch similarity matrix obtained using a generalized radial basis transformation. The other two approaches, nearest neighbor analysis and hierarchical clustering, use the symbolic mismatch dissimilarity matrix. In each case, the symbolic mismatch matrix is processed using spectrum clipping. 3.1 Classification Approach SVMs can applied to anomaly detection in a one-class setting [15] . This is done by mapping the data into the feature space corresponding to the kernel and separating instances from the origin with the maximum margin. To separate data from the origin, the following quadratic program is solved: min w,ξ,p 1 2∥w∥2 + 1 vn ∑ i ξi −p (7) subject to: (w · Φ(zi)) ≥p −ξi i = 1, ..., n ξi ≥0 (8) where v reflects the tradeoff between incorporating outliers and minimizing the support region. For a new instance, the label is determined by evaluating which side of the hyperplane the instance falls on in the feature space. The resulting predicted label in terms of the Lagrange multipliers αi and the spectrum clipped symbolic mismatch similarity matrix Ψclip is then: ˆyj = sgn( ∑ i αiΨclip(i, j) −p) (9) 4 We apply this approach to train a one-class SVM on all patients. Patients outside the enclosing boundary are labeled anomalies. The parameter v can be varied to control the size of this group. 3.2 Nearest Neighbor Approach Our second approach is based on the concept of nearest neighbor analysis. The assumption underlying this approach is that normal data instances occur in dense neighborhoods, while anomalies occur far from their closest neighbors. We use an approach similar to [16]. The anomaly score of each patient’s long-term time-series is computed as the sum of its distances from the time-series for its k-nearest neighbors, as measured by symbolic mismatch. Patients with anomaly scores exceeding a threshold θ are labeled anomalies. 3.3 Clustering Approach Our third approach is based on hierarchical clustering. We place each patient in a separate cluster, and then proceed in each iteration to merge the two clusters that are most similar to each other. The distance between two clusters is defined as the average of the pairwise symbolic mismatch of the patients in each cluster. The clustering process terminates when it enters the region of diminishing returns (i.e., at the ’knee’ of the curve corresponding to the distance of clusters merged together at each iteration). At this point, all patients outside the largest cluster are labeled as anomalies. 4 Evaluation Methodology We evaluated our work on patients enrolled in the DISPERSE2 trial [2]. Patients in the study were admitted to a hospital with non-ST-elevation ACS. Three lead continuous ECG monitoring (LifeCard CF / Pathfinder, DelMar Reynolds / Spacelabs, Issaqua WA) was performed for a median duration of four days at a sampling rate of 128 Hz. The endpoints of cardiovascular death, myocardial infarction and severe recurrent ischemia were adjudicated by a blinded Clinical Events Committee for a median follow-up period of 60 days. The maximum follow-up was 90 days. Data from 686 patients was available after removal of noise-corrupted signals. During the follow-up there were 14 cardiovascular deaths, 28 myocardial infarctions, and 13 cases of severe recurrent ischemia. We define a major adverse cardiac event to be any of these three adverse events. We studied the effectiveness of combining symbolic mismatch with each of classification, nearest neighbor analysis and clustering in identifying a high risk group of patients. Consistent with other clinical studies to evaluate methods for risk stratification in the setting of ACS [17], we classified patients in the highest quartile as the high risk group. For the classification approach, this corresponded to choosing v such that the group of patients lying outside the enclosing boundary constituted roughly 25% of the population. For the nearest neighbor approach we investigated all odd values of k from 3 to 9, and patients with anomaly scores in the top 25% of the population were classified as being at high risk. For the clustering approach, the varying sizes of the clusters merged together at each step made it difficult to select a high risk quartile. Instead, patients lying outside the largest cluster were categorized as being at risk. In the tests reported later in this paper, this group contained roughly 23% the patients in the population. We used the LIBSVM implementation for our one-class SVM. Both the nearest neighbor and clustering approaches were carried out using MATLAB implementations. We employed Kaplan-Meier survival analysis to compare the rates for major adverse cardiac events between patients declared to be at high and low risk. Hazard ratios (HR) and 95% confidence interval (CI) were estimated using a Cox proportional hazards regression model. The predictions of each approach were studied in univariate models, and also in multivariate models that additionally included other clinical risk variables (age≥65 years, gender, smoking history, hypertension, diabetes mellitus, hyperlipidemia, history of chronic obstructive pulmonary disorder (COPD), history of coronary heart disease (CHD), previous MI, previous angina, ST depression on admission, index diagnosis of MI) as well as ECG risk metrics proposed in the past (heart rate variability (HRV), heart rate turbulence (HRT), and deceleration capacity (DC)) [18]. 5 Method HR P Value 95% CI One-Class SVM 1.38 0.033 1.04-1.89 3-Nearest Neighbor 1.91 0.031 1.06-3.44 5-Nearest Neighbor 2.10 0.013 1.17-3.76 7-Nearest Neighbor 2.28 0.005 1.28-4.07 9-Nearest Neighbor 2.07 0.015 1.15-3.71 Hierarchical Clustering 2.04 0.017 1.13-3.68 Table 1: Univariate association of risk predictions from different approaches using symbolic mismatch with major adverse cardiac events over a 90 day period following ACS. Clinical Variable HR P Value 95% CI Age≥65 years 1.82 0.041 1.02-3.24 Female Gender 0.69 0.261 0.37-1.31 Current Smoker 1.05 0.866 0.59-1.87 Hypertension 1.44 0.257 0.77-2.68 Diabetes Mellitus 1.95 0.072 0.94-4.04 Hyperlipidemia 1.00 0.994 0.55-1.82 History of COPD 1.05 0.933 0.37-2.92 History of CHD 1.10 0.994 0.37-2.92 Previous MI 1.17 0.630 0.62-2.22 Previous angina 0.94 0.842 0.53-1.68 ST depression>0.5mm 1.13 0.675 0.64-2.01 Index diagnosis of MI 1.42 0.134 0.90-2.26 Heart Rate Variability 1.56 0.128 0.88-2.77 Heart Rate Turbulence 1.64 0.013 1.11-2.42 Deceleration Capacity 1.77 0.002 1.23-2.54 Table 2: Univariate association of existing clinical and ECG risk variables with major adverse cardiac events over a 90 day period following ACS. 5 Results 5.1 Univariate Results Results of univariate analysis for all three unsupervised symbolic mismatch-based approaches are presented in Table 1. The predictions from all methods showed a statistically significant (i.e., p < 0.05) association with major adverse cardiac events following ACS. The results in Table 1 can be interpreted as roughly a doubled rate of adverse outcomes per unit time in patients identified as being at high risk by the nearest neighbor and clustering approaches. For the classification approach, patients identified as being at high risk had a nearly 40% increased risk. For comparison, we also include the univariate association of the other clinical and ECG risk variables in our study (Table 2). Both the nearest neighbor and clustering approaches had a higher hazard ratio in this patient population than any of the other variables studied. Of the clinical risk variables, only age was found to be significantly associated on univariate analysis with major cardiac events after ACS. Diabetes (p=0.072) was marginally outside the 5% level of significance. Of the ECG risk variables, both HRT and DC showed a univariate association with major adverse cardiac events in this population. These results are consistent with the clinical literature on these risk metrics. 5.2 Multivariate Results We measured the correlation between the predictions of the unsupervised symbolic mismatch-based approaches and both the clinical and ECG risk variables. All of the unsupervised approaches had low correlation with both sets of variables (R ≤0.2). This suggests that the results of these novel approaches can be usefully combined with results of existing approaches. On multivariate analysis, both the nearest neighbor approach and the clustering approach were independent predictors of adverse outcomes (Table 3). In our study, the nearest neighbor approach (for k > 3) had the highest hazard ratio on both univariate and multivariate analysis. Both the nearest neighbor and clustering approaches predicted patients with an approximately two-fold increased risk of adverse outcomes. This increased risk did not change much even after adjusting for other clinical and ECG risk variables. 6 Method Adjusted HR P Value 95% CI One-Class SVM 1.32 0.074 0.97-1.79 3-Nearest Neighbor 1.88 0.042 1.02-3.46 5-Nearest Neighbor 2.07 0.018 1.13-3.79 7-Nearest Neighbor 2.25 0.008 1.23-4.11 9-Nearest Neighbor 2.04 0.021 1.11-3.73 Hierarchical Clustering 1.86 0.042 1.02-3.46 Table 3: Multivariate association of high risk predictions from different approaches using symbolic mismatch with major adverse cardiac events over a 90 day period following ACS. Multivariate results adjusted for variables in Table 2. Method HR P Value 95% CI One-Class SVM 1.36 0.038 1.01-1.79 3-Nearest Neighbor 1.74 0.069 0.96-3.16 5-Nearest Neighbor 1.57 0.142 0.86-2.88 7-Nearest Neighbor 1.73 0.071 0.95-3.14 9-Nearest Neighbor 1.89 0.034 1.05-3.41 Hierarchical Clustering 1.19 0.563 0.67-2.12 Table 4: Univariate association of high risk predictions without the use of spectrum clipping. None of the approaches showed a statistically significant association with the study endpoint in any of the multivariate models including other clinical risk variables when spectrum clipping was not used. 5.3 Effect of Spectrum Clipping We also investigated the effect of spectrum clipping on the performance of our different risk stratification approaches. Table 4 presents the associations when spectrum clipping was not used. For all three methods, performance was worse without the use of spectrum clipping, although the effect was small for the one-class SVM case. 6 Related Work Most previous work on comparing signals in terms of their raw samples (e.g., metrics such as dynamic time warping, longest common subsequence, edit distance with real penalty, sequence weighted alignment, spatial assembling distance, threshold queries) [19] focuses on relatively short time-series. This is due to the runtime of these methods (quadratic for many methods) and the need to reason in terms of the frequency and dynamics of higher-level signal constructs (as opposed to individual samples) when studying systems over long periods. Most prior research on comparing long-term time-series focuses instead on extracting specific features from long-term signals and quantifying the differences between these features. In the context of cardiovascular disease, long-term ECG is often reduced to features (e.g., mean heart rate or heart rate variability) and compared in terms of these features. These approaches, unlike our symbolic mismatch based approaches, draw upon significant a priori knowledge. Our belief was that for applications like risk stratifying patients for major cardiac events, focusing on a set of specialized features leads to important information being potentially missed. In our work, we focus instead on developing an approach that avoids use of significant a priori knowledge by comparing the raw morphology of long-term time-series. We propose doing this in a computationally efficient and systematic way through symbolization. While this use of symbolization represents a lossy compression of the original signal, the underlying DTW-based process of quantifying differences between long-term time-series remains grounded in the comparison of raw morphology. Symbolization maps the comparison of long-term time-series into the domain of sequence comparison. There is an extensive body of prior work focusing on the comparison of sequential or string data. Algorithms based on measuring the edit distance between strings are widely used in disciplines such as computational biology, but are typically restricted to comparisons of short sequences because of their computational complexity. Research on the use of profile hidden Markov models [20,21] to optimize recognition of binary labeled sequences is more closely related to our work. This work focuses on learning the parameters of a hidden Markov model that can represent approximations of sequences and can be used to score other sequences. Such approaches require large amounts of data or good priors to train the hidden Markov models. Computing forward and backward prob7 abilities from the Baum-Welch algorithm is also very computationally intensive. Other research in this area focuses on mismatch tree-based kernels [22], which use the mismatch tree data structure [23] to quantify the difference between two sequences based on the approximate occurrence of fixed length subsequences within them. Similar to this approach is work on using a “bag of motifs” representation [24], which provides a more flexible representation than fixed length subsequences but usually requires prior knowledge of motifs in the data [24]. In contrast to these efforts, we use a simple computationally efficient approach to compare symbolic sequences without prior knowledge. Most importantly, our approach helps address the situation where symbolizing long-term time-series in a patient-specific manner leads to the symbolic sequences from different alphabets [25]. In this case, hidden Markov models, mismatch trees or a “bag of motifs” approach trained on one patient cannot be easily used to score the sequences for other patients. Instead, any comparative approach must maintain a hard or soft registration of symbols across individuals. Symbolic mismatch complements existing work on sequence comparison by using a measure that quantifies differences across patients while retaining information on how the symbols for these patients differ. Finally, we distinguish our work from earlier method for ECG-based risk stratification. These methods typically calculate a particular pre-defined feature from the raw ECG signal, and to use it to rank patients along a risk continuum. Our approach, focusing on detecting patients with high symbolic mismatch relative to other patients in the population, is orthogonal to the use of specialized high risk features along two important dimensions. First, it does not require the presence of significant prior knowledge. For the cardiovascular care, we only assume that ECG signals from patients who are at high risk differ from those of the rest of the population. There are no specific assumptions about the nature of these differences. Second, the ability to partition patients into groups with similar ECG characteristics and potentially common risk profiles potentially allows for a more fine-grained understanding of a how a patient’s future health may evolve over time. Matching patients to past cases with similar ECG signals could lead to more accurate assignments of risk scores for particular events such as death and recurring heart attacks. 7 Discussion In this paper, we described a novel unsupervised learning approach to cardiovascular risk stratification that is complementary to existing clinical approaches. We proposed using symbolic mismatch to quantify differences in long-term physiological timeseries. Our approach uses a symbolic transformation to measure changes in the morphology and frequency of prototypical functional units observed over long periods in two signals. Symbolic mismatch avoids feature extraction and deals with inter-patient differences in a parameter-less way. We also explored the hypothesis that high risk patients in a population can be identified as individuals with anomalous long-term signals. We developed multiple comparative approaches to detect such patients, and evaluated these methods in a real-world application of risk stratification for major adverse cardiac events following ACS. Our results suggest that symbolic mismatch-based comparative approaches may have clinical utility in identifying high risk patients, and can provide information that is complementary to existing clinical risk variables. In particular, we note that the hazard ratios we report are typically considered clinically meaningful. In a different study of 118 variables in 15,000 post-ACS patients with 90 day follow-up similar to our population, [1] did not find any variables with a hazard ratio greater than 2.00. We observed a similar result in our patient population, where all of the existing clinical and ECG risk variables had a hazard ratio less than 2.00. In contrast to this, our nearest neighbor-based approach achieved a hazard ratio of 2.28, even after being adjusted for existing risk measures. Our study has limitations. While our decision to compare the morphology and frequency of prototypical functional units leads to a measure that is computationally efficient on large volumes of data, this process does not capture information related to the dynamics of these prototypical units. We also observe that all three of the comparative approaches investigated in our study focus only on identifying patients who are anomalies. While we believe that symbolic mismatch may have further use in supervised learning, this hypothesis needs to be evaluated more fully in future work. 8 References [1] LK Newby, MV Bhapkar, HD White et al. (2003) Predictors of 90-day outcome in patients stabilized after acute coronary syndromes. Eur Heart J, 172-181. [2] C.P. Cannon, S. Husted, R.A. Harringtonet al. (2007) Safety, Tolerability, and Initial Efficacy of AZD6140, the First Reversible Oral Adenosine Diphosphate Receptor Antagonist, Compared With Clopidogrel, in Patients With NonST-Segment Elevation Acute Coronary Syndrome Primary. J Am Coll Cardiol, 1844-1851. [3] World Health Organization. (2009) Cardiovascular Diseases Fact Sheet. [4] J. Mackay, G.A. Mensah, S. Mendis et al. (2004) The Atlas of Heart Disease and Stroke. WHO. [5] J.J. Bailey, A.S. Berson, H. Handelsman et al. (2001) Utility of current risk stratification tests for predicting major arrhythmic events after myocardial infarction. J Am Coll Cardio, 1902-1911. [6] G. Lopera & A.B. Curtis. (2009) Risk stratification for sudden cardiac death: current approaches and predictive value. Curr Cardiol Rev, 56-64. [7] Z. Syed, J. Guttag & C. Stultz. (2007) Clustering and Symbolic Analysis of Cardiovascular Signals: Discovery and Visualization of Medically Relevant Patterns in Long-Term Data Using Limited Prior Knowledge. EURASIP J Adv Sig Proc, 1-16. [8] P.S. Hamilton & W.J. Tompkins. (1986) Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database. IEEE Trans Biomed Eng, 1157-1165. [9] W. Zong, GB Moody, & D. Jiang. (2003) A robust open-source algorithm to detect onset and duration of QRS complexes. Comp Cardiol, 737-740. [10] S.H. Chang, F.H. Cheng, W. Hsu et al. (1997) Fast algorithm for point pattern matching: invariant to translations, rotations and scale changes. Pattern Recognition, 311-320. [11] W.W. Cohen & J. Richman (2002). Learning to match and cluster large high-dimensional data sets for data integration. In Proc. ACM SIGKDD, 475-480. [12] B. Scholkopf & A.J. Smola. (2002) Learning with Kernels. MIT Press. [13] Y. Chen, E.K. Garcia, M.R. Gupta et al. (2009) Similarity-based classification: concepts and algorithms. JMLR, 747-776. [14] G. Wu, EY. Chang & Z. Zhang. (2005) An analysis of transformation on non-positive semidefinite similarity matrix for kernel machines. Technical report, University of California, Santa Barbara. [15] B. Scholkopf, J.C. Platt, J. Shawe-Taylor, et al. (2001) Estimating the support of a high-dimensional distribution. Neural Computation, 1443-1471. [16] E. Eskin, A. Arnold, M. Prerau et al. (2002) A geometric framework for unsupervised anomaly detection. App Data Mining Comp Secur, 1-20. [17] M.G. Shlipak, J.H. Ix, K. Bibbins-Domingo et al. (2008) Biomarkers to predict recurrent cardiovascular disease: the Heart and Soul Study. JAMA, 50-57. [18] B. M. Scirica. (2010) Acute coronary syndrome: emerging tools for diagnosis and risk assessment. J Am Coll Cardiol, 1403-1415. [19] H. Ding, G. Trajcevski, P Scheuermann et al. (2008) Querying and mining of time series data: experimental comparison of representations and distance measures. In Proc. VLDB, 1542-1552. [20] A. Krogh. (1994) Hidden Markov models for labeled sequences. In Proc. ICPR, 140-144. [21] T. Jaakkola, M. Diekhans & D. Haussler. (1999) Using the Fisher kernel method to detect remote protein homologies. In Proc. ICISMB, 149-158. [22] C. Leslie, E. Eskin, J. Weston et al. (2003) Mismatch string kernels for SVM protein classification. In Proc. NIPS, 1441-1448. [23] E. Eskin & P.A. Pevzner. (2002) Finding composite regulatory patterns in DNA sequences. Bioinformatics, 354-363. [24] A. Ben-Hur & D. Brutlag. (2006) Sequence motifs: highly predictive features of protein function. Feature Extraction, 625-645. [25] Z. Syed, C. Stultz, M. Kellis et al. (2010) Motif discovery in physiological datasets: a methodology for inferring predictive elements. ACM Trans. Knowledge Discovery in Data, 1-23. 9
2010
140